Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
qitas committed Nov 2, 2021
1 parent 1d14b98 commit 10b12b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions project/IAP/User/Src/bootloader.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ void bootinit(void)
if(Mark_Get(bkp_app1_addr))
{
app_ptr=Mark_Get(bkp_app1_addr);
if(app_ptr < FLASH_ADDR_BASE+QITAS_APP_MAX || app_ptr > FLASH_ADDR_BASE + flash_size || app_ptr%FLASH_PAGE_SIZE)
if(app_ptr < FLASH_ADDR_BASE || app_ptr > FLASH_ADDR_BASE + flash_size || app_ptr%FLASH_PAGE_SIZE)
{
Mark_Set(bkp_app1_addr,USER_APP1_ADDRESS);
app_ptr=USER_APP1_ADDRESS; //默认地址
Expand All @@ -110,7 +110,7 @@ void bootinit(void)
if(Mark_Get(bkp_app2_addr))
{
app_ptr=Mark_Get(bkp_app2_addr);
if(app_ptr< FLASH_ADDR_BASE+QITAS_APP_MAX || app_ptr > FLASH_ADDR_BASE + flash_size || app_ptr%FLASH_PAGE_SIZE)
if(app_ptr< FLASH_ADDR_BASE || app_ptr > FLASH_ADDR_BASE + flash_size || app_ptr%FLASH_PAGE_SIZE)
{
Mark_Set(bkp_app2_addr,USER_APP2_ADDRESS);
app_ptr=USER_APP2_ADDRESS;
Expand Down

0 comments on commit 10b12b1

Please sign in to comment.