2017-10-07 12:24 AM
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.
2017-10-07 01:37 AM
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...
2017-10-07 06:57 AM
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?
2017-10-07 12:07 PM
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...