cancel
Showing results for 
Search instead for 
Did you mean: 

WDG end count reset with non boot bank?

pm9341
Associate II
Posted on May 28, 2008 at 12:23

WDG end count reset with non boot bank?

7 REPLIES 7
pm9341
Associate II
Posted on May 17, 2011 at 09:53

I have bank1 for bootloader and bank0 for application.

When I get WDG end of count (software reset) by application my STR912 hangs. I don't understand why it don't execute like power/reset.

I have a bit experimented and the only way i can execute the bootloader is when i set BBADDR=0x0, NBADDR=0x80000 FLASH registry and then WDG end of count.

So the WDG software reset is not the same as POWER/reset?

I think my problem is that WDG don't resets the BBADDR=0x0, NBADDR=0x80000 and probably try's to execute the code from bank1.

What can i do to?

dcramer
Associate II
Posted on May 17, 2011 at 09:53

I have exactly the same problem. My code will reset if I load it without using the bootloader, but as soon as I use the bootloader to download my application WDG reset stops working.

dcramer
Associate II
Posted on May 17, 2011 at 09:53

I have exactly the same problem. My code will reset if I load it without using the bootloader, but as soon as I use the bootloader to download my application WDG reset stops working.

pm9341
Associate II
Posted on May 17, 2011 at 09:53

I have found my problem description in

http://www.st.com/stonline/products/literature/es/12944.pdf

''Flash memory remapping'' page 5. I have a rev. G str912.

Now I well try the workaround. I hope my bootloader well execute with bank1 address 0x80000, so trying change startup code.

pm9341
Associate II
Posted on May 17, 2011 at 09:53

ect...

If Bootbank is Bank1(32k) on Power reset BBADDR=0x0, NBBADDR=0x80000 and on Software reset BBADDR=0x80000, NBBADDR=0x0.

So the problem of Bootloaders(Bank1 code) str91x_startup.s code is to change the BBADDR, NBBADDR from RAM (do this with assembler) before start c code.

The problem etc.:

if (BBADDR != 0x80000)

{

//execute from RAM

BBADDR = 0x80000

NBBADDR = 0x0

pc=0x80000

}

Could this work??

dcramer
Associate II
Posted on May 17, 2011 at 09:53

I downloaded an2675.zip that contains several examples of software to download code and then start that code. The bootloader does not remap the addresses. It downloads the code starting at 80000 then jumps to 0x80000. The application must have the rom_start and rom_end changed in the linker.xcl file to contain the address range. The boot loader vector table also needs to have 0x80000 added to the addresses so an interrupt will vector to the 0x80000 addresses after the boot loader has run.

dcramer
Associate II
Posted on May 17, 2011 at 09:53

I am a newbie to the STR91x startup code and I have read the errata several times, but I still don't think I understand the workaround. Any help would be greatly appreciated.