cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with bootloader and bank switch

Posted on January 18, 2010 at 07:20

Problem with bootloader and bank switch

25 REPLIES 25
ozenozkaya
Associate II
Posted on May 17, 2011 at 09:47

I can not beleive that st did not reply all of that, if you produce a product you should give support...

Interesting...

Cheers

tomas23
Associate II
Posted on May 17, 2011 at 09:47

I have to comment this:

ST gives a good support, but there are rules - first are served customers with clear business agreements (OEM). Then come customers with identified business, currently thousands only in Europe, served by 7 regional supporters. And finally, you've got forum, community able to help, and, if there is some spare and usually free, personal time, the supporters read the forum and try to help here, too.

If you want a dedicated supporter, do use the helpdesk or online support, but don't be surprised about the priorities and limitations here...

dolgov
Associate II
Posted on May 17, 2011 at 09:47

Hello All,

I have similar problems as you do. I need to implement a possibility of a firmware update. The idea is:

1. the main program located on boot bank 0 gets the first part of a new firmware and writes it to bank 1 then jumps to bank 1

2. the new prog on bank 1 implements a custom mass storage device where the user puts the second part of the new firmware

3. program located in bank 1 writes this firmware to bank 0 and jumps back to it

To perform the first step I need to remap banks. I use FMI_BankRemapConfig(0x00,0x06,FMI_BANK_1,0x00);

but the mcu hangs right there.

Do you have a solution??

armmcu
Associate II
Posted on May 17, 2011 at 09:47

Hi dolgov,

If I understood you well,in your config case and for 512K devices

you should use instead:

FMI_BankRemapConfig(0x4,0x2,0x80000,0x00);

Please let me know if it solve your issue.

Cheers

dolgov
Associate II
Posted on May 17, 2011 at 09:47

Hello armmcu.engineer,

thanks for replying. Unfortunately your code did not help...

I added some debugging outputs to my program and played with registers a little:

the mcu hangs if I try to change the FMI->BBSR to 0x00 or change the FMI->BBADDR to a value other than 0x00. Changing FMI->NBBSR and FMI->NBBADDR doesn't stop the MCU.

Some further infos on my project: I use GCC and run eCos. To test jumping to another bank I implemented this routine in ''main'' before tasks are created.

[ This message was edited by: dolgov on 29-12-2009 11:30 ]

[ This message was edited by: dolgov on 20-01-2010 12:05 ]

dolgov
Associate II
Posted on May 17, 2011 at 09:47

Hi all,

I made a stupid error: I forgot to put the JumpToApplication-Function into RAM...

Regards.