cancel
Showing results for 
Search instead for 
Did you mean: 

having trouble on IAP

jsales
Associate II
Posted on July 03, 2009 at 03:19

having trouble on IAP

6 REPLIES 6
jsales
Associate II
Posted on May 17, 2011 at 13:15

I have been working with 2 different projects using a single STM32F103R8T6 hardware and compiled and linked via EWARM 5.11. One project is our bootloader (similar to the IAP example) residing at Flash 0x800000 while the other projects is our application residing at 0x8002000.

I am having problem right now on retaining my device address (which will be saved in RAM during running the bootloader)and being passed to the application code during jumping from bootloader to our application code. How would I make my device address be retained in both bootloader and application even if they are compiled and linked separately?

jaroslaw2
Associate II
Posted on May 17, 2011 at 13:15

You can use battery backup registers to do it.

Is this solves the problem? Do you have battery connected in your project?

trevor1
Associate II
Posted on May 17, 2011 at 13:15

Why can't you save the ''device address'' at a known location in flash? Maybe at the end of flash in the last page. Just means that you might need to ensure your application does not ''grow'' into the last page so that you can erase the last page and program a new ''device address'' from bootloader or application when you ned to.

jsales
Associate II
Posted on May 17, 2011 at 13:15

I don't have any battery back-up registers. Sice this device is a slave, it gets power to my host device.

Saving my ''device address'' at the last part of my flash is my current implementation. I am just trying to explore if I can save in RAM from bootloader to my application so that I can fully utilize all my flash. Is this possible even if a put in an absolute RAM address?

trevor1
Associate II
Posted on May 17, 2011 at 13:15

I think all STM32 processors have backup registers. Theses registers retain their value during a reset so as long as power is not lost they will keep your ''device address'' safe -- you don't need a battery to use them. You might need to connect the battery backup input (VBAT) to VDD. See ''Backup Registers'' in the manual.

jsales
Associate II
Posted on May 17, 2011 at 13:15

My IAP in now working now using back-up registers. Thanks a lot.