SBL doesn't jump into the application by pressing the reset button

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

SBL doesn't jump into the application by pressing the reset button

ソリューションへジャンプ
1,033件の閲覧回数
Bhavin_Dhulkotiya
Contributor II

Hi,

I am using a Secondary bootloader in LPC804. I have flashed an example bootloader as well as the example app. I am able to jump into the application by firing the 'b' command only. if I press the reset button then it stays in the bootloader even if the IRQ line doesn't low but it should jump into the app.
I am using this as a reference: https://www.nxp.com/docs/en/application-note/AN12373.pdf

We debugged the issue is with the pushAppFlag variable shown below in function. we observed that the value is other than 0x44 and it is not consistent.

static uint8_t isbootFromReset(void)
{
/* Was loader booted from app (1) or from FLASH on reset (0x44)? */
if((uint8_t)*pushAppFlag == 0x44){
return 1;
}

return 0;
}

0 件の賞賛
1 解決策
986件の閲覧回数
Bhavin_Dhulkotiya
Contributor II

@Alice_Yang , @frank_m , Thanks.

It is required to set the 0x44 value. This issue is fixed in the provided updated Keil_startup.s file.

元の投稿で解決策を見る

0 件の賞賛
4 返答(返信)
987件の閲覧回数
Bhavin_Dhulkotiya
Contributor II

@Alice_Yang , @frank_m , Thanks.

It is required to set the 0x44 value. This issue is fixed in the provided updated Keil_startup.s file.

0 件の賞賛
981件の閲覧回数
frank_m
Senior Contributor III

Some toolchains provide a _NOINIT section (or similar) for values/variables which are not initialized during startup. Such a boot flag must reside there.

After power-up, RAM cells can contain random values. For our BL, we are using "safe" values for such variables, which consists of an array of 2 values. The first index contains the normal value, the second the binary negated value (e.g. 00/FF, 55/AA). This way, you can catch at least some corruptions, and add some additional safety.

0 件の賞賛
1,001件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello bhavind,

How about your this issue now? 

What the value is about  "pushAppFlag"?

 

BR

Alice

0 件の賞賛
1,021件の閲覧回数
frank_m
Senior Contributor III

I did not work with your MCU variant specifically.

> We debugged the issue is with the pushAppFlag variable shown below in function. we observed that the value is other than 0x44 and it is not consistent.

How does your bootloader initialize memory ?

Did you take care that the location(s) of this variable is not initialized in the second-stage BL startup ?

0 件の賞賛