cancel
Showing results for 
Search instead for 
Did you mean: 

IAP usart implementation on stm32f101 and the user app side

coetzeec
Associate II
Posted on September 09, 2014 at 23:31

Hi ,

I have perhaps a general question on the IAP , I have implemented it on a STM32f101. It works great so no problem there. However my questions is related to the IAP flashing the user app like a basic hallo world type app. for most parts all vector table and linking adresses has been changed to 0x08003000 as described in the APP NOTE . what i am trying to find is the reverse of this. To break it down , once the IAP is loaded and running , i then use the IAP to load the hallo world app which starts up no problem. No how do i get to re-run the IAP to upload a new app ie. hallow world2 for instance. this part of the documentation is a bit vague,?

Regards

CC
3 REPLIES 3
Posted on September 10, 2014 at 02:32

This is where you'd need to add your own code, to allow you to jump back into the IAP boot loader, erase the current app and download a new one.

The examples, I seem to recall, look of a button press to see if the download is required. You could pass a variable in RAM, and reset the processor or jump back into the IAP boot loader.

The mechanics here require you to think through your process for verifying and jumping to the app, erasing the app, and downloading the app.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
coetzeec
Associate II
Posted on September 10, 2014 at 08:47

Hi Clive,

Thanks for the response, i was thinking it may be along those lines of operation.

Thanks

regards

coetzeec
Associate II
Posted on September 11, 2014 at 08:28

Hi Clive,

following your recommendation, i looked at the ways to point back to the IAP application from the user application. I looked at the way the sample code does the jump to the address  but I seem to be running in to a wall on this.

work flow.

1. Load the IAP aplication in the STM32  for binary update through the USART1

2. toggle GPIOB_10 to initiate the process

3. open hyper terminal and update through the ymodem protocol, execute if successful

4. see that user app starts at 0x8003000, UUID is printed out and again GPIOB_10 is checked to see if it should return to the IAP aplication

everything up until point 4 works great, I took the below segment from the sample code in the IAP sample. If it can jump to the user app from IAP the reverse should also be possible, adding it to the user app when GPIOB_10 is toggled it should jump to the IAP app provided the address is pointing back correctly. which i think it is. Am i missing something?

                  /* Jump to user application */

                  JumpAddress = *(__IO uint32_t*) (0x08000000 + 4);

                  Jump_To_Application = (pFunction) JumpAddress;

                  /* Initialize user application's Stack Pointer */

                  __set_MSP(*(__IO uint32_t*) 0x08000000);

                  Jump_To_Application();

Regards cc