cancel
Showing results for 
Search instead for 
Did you mean: 

Bootloader: Main App not running after system reset

gajeronline
Associate II
Posted on April 12, 2007 at 09:15

Bootloader: Main App not running after system reset

14 REPLIES 14
kmshim
Associate II
Posted on May 17, 2011 at 09:39

Hi, gajer

If the remap bank1 to 0x00, I recommand that you will modify the start code of IAP as following

-->

Reset_Addr DCD Reset_Handler

Undefined_Addr DCD 0x80004

SWI_Addr DCD 0x80008

Prefetch_Addr DCD 0x8000C

Abort_Addr DCD 0x80010

DCD 0 ;//Reserved vector

IRQ_Addr DCD 0x80018

FIQ_Addr DCD 0x8001C

.

.

.

and then setting software remap in both the application and IAP program as following

FMI_BankRemapConfig(0, 6, 0, 0x80000);

/* Set Flash banks size & address of STR912FW44X6(32K, 512K, 0x0, 0x80000) */

FMI_Config(FMI_READ_WAIT_STATE_2, FMI_WRITE_WAIT_STATE_0,

FMI_PWD_ENABLE,FMI_LVD_ENABLE, FMI_FREQ_HIGH); /* FMI Waite States */

and, to use PLL, you must only set PLL in the IAP because of the difference between system reset and gloabal reset.

I hope that you will success....

Beset regards

KM SHIM ;) ;)

gajeronline
Associate II
Posted on May 17, 2011 at 09:39

Hi kmshim.

>>> and then setting software remap in both the application and

>>> IAP program as following FMI_BankRemapConfig(0, 6, 0, 0x80000);

this not work and don't make sense

IAP -> FMI_BankRemapConfig(0, 6, 0, 0x80000); remap Bank1 to 0x00(IAP run)

APP -> FMI_BankRemapConfig(0, 6, 0, 0x80000); remap Bank1 to 0x00 ???(APP don't run)

>>>FMI_Config(FMI_READ_WAIT_STATE_2, FMI_WRITE_WAIT_STATE_0,

>>>FMI_PWD_ENABLE,FMI_LVD_ENABLE, FMI_FREQ_HIGH); /* FMI Waite States */

I try with and without PLL and I don't need configure FMI because CPU freq <=25 MHz

I suppose this what write Najoua.

>>> ** are modified without keeping the last values corresponding to the >>> software remapping (and are not reset to their default values

>>> corresponding to the hardware remapping using CAPS).

because when I jump from Application to address 0x00 then Application works fine, only when system reset occured (resetbutton or watchog) application hang-off, and when use IAP and bank remap

najoua
Associate II
Posted on May 17, 2011 at 09:39

Hello Gager & kmshim,

Please have a look to my answer in the following discussion forum link:

http://www.stmcu.com/forums-cat-5212-21.html

in this link, explanation of the observed behavior with hardware reset is given.

Best regards,

Najoua.

kmshim
Associate II
Posted on May 17, 2011 at 09:39

Hi, gajer

In the case of H/W remap by FLINK or RLINK,

BANK0(at 0x80000), BANK1(at 0x00)

when globla reset is occued,

SCU_PLLCONF :reset value

SCU_CLKCNTR :reset value

SCU_SYSSTATUS:reset value

FMI_BSSR :reset value

FMI_BBADR :reset value

FMI_NBBSR :reset value

FMI_NBBADR :reset value

FMI_CR :reset value(0x08--->only bank0(Boot setcor) enabled)

when system reset is ouccued,

SCU_PLLCONF :not changed

SCU_CLKCNTR :not changed

SCU_SYSSTATUS:not changed

FMI_BSSR :not changed

FMI_BBADR :not changed

FMI_NBBSR :not changed

FMI_NBBADR :not changed

FMI_CR :0x08(reset value(0x08 --> only bank0(boot sector)enable)

I think that your problem because of FMI_CR, that is bank1 is disabled by reset value of FMI_CR.

I propose that you modified start code to what i recommaned previously and application jump(0x00 --> 0x80000), and don't use the software remap..

good luck,,

Best regards

KMSHIM

gajeronline
Associate II
Posted on May 17, 2011 at 09:39

Hi kmshim

It's really work :) thanks, thanks, thanks :).

.

.

.

but why !!! after system reset

FMI_CR : set to reset value

FMI_BSSR :not changed

FMI_BBADR :not changed

FMI_NBBSR :not changed

FMI_NBBADR :not changed

In my opinion, this is a BUG.

Best regards

gajer