AnsweredAssumed Answered

stm32f107vct6 bootloader problem

Question asked by grant.jason on Jun 13, 2013
Latest reply on Jun 13, 2013 by grant.jason
Hello,
I'm trying to use the STM32F107VCT6 system memory boot loader on remapped USART2.
I can perform bootloader operations successfully but I'm having trouble writing to the flash.

The write memory commands execute successfully initially (from address 0x08000000 to 0x08000140) but as soon as I reach 0x08000150, the address sends successfully but I get a NACK when I try to send the data with checksum (0xAD).

First I send N (the number of data bytes - 1) which is 0x0F.

Then I send data bytes:
0x00,0xF0,0x02,0xF8,
0x00,0xF0,0xB8,0xF8,
0x0A,0xA0,0x90,0xE8,
0x00,0x0C,0x82,0x44

then I send the checksum 0xAD

then I get NACK!

The interesting thing is that this address is also the start address of my application.

My hex file looks something like this:
:020000040800F2 //upper 16 bits address is 0800
...
write commands to 0x08000000 to 0x08000140
...
:1001500000F002F800F0B8F80AA090E8000C824421 //the offending line, writing to
0x08000150 gives a NACK
...
remaining write commands
...
:04000005080001519D //the GO! command starting at 0x08000151, the next address up
from the offending address 0150!

The comms seems fine since the bootloader starts running and gets some way through.
The code seems fine for the same reason and upon inspection it seems to generate all correct
checksum and data values.

Why does it fail at this point? What's special about that location?

Thanks for any help.

Outcomes