cancel
Showing results for 
Search instead for 
Did you mean: 

Programm doesn't startup after using USART bootload protocol

fabian2399
Associate II
Posted on October 07, 2017 at 09:24

Hi!

I'm using the USART protocol (AN3155) to write my program into the flash of my STM32F107.

(Start address 0x08000000) 

After all bytes have been written to the memory I execute a GO Command to the Start address.

Result: the software does not boot

When I programm my device with the exact HEX File in my Dev Environment (Eclipse) via JLink, the program boots as it should.

Obviously a simple 'write the programm into the flash' and branch from the start address is not enough.

what am i doing wrong?

Thanks for helping!

Fabian.

3 REPLIES 3
fabian2399
Associate II
Posted on October 07, 2017 at 10:37

I forgot to mention that before I write the data to the memory I execute a global erase... which I think is the problem...

I will try to only earse the old firmware data... 

Posted on October 07, 2017 at 15:57

Does the system loader use a watchdog?

Do you have something early enough in the ResetHandler to know if it executed your code, or not?

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on October 07, 2017 at 19:07

Not yet... And I think this is one problem. The transmitted Data must be corrupt!

The connection between my BLE Module and the MCU in Bootloader Mode via USART is not very stable yet...

Every know and than the transmission stops, without recieving a NACK. Which is a good indicator, I think, for not completly transmitted commands. 

I need to work this out and check if the data gets transmitted correctly (using CR, checksum, e.g.).

Maybe it is a good idea to slow down the Baud Rate...