AnsweredAssumed Answered

STM32F031 uart bootloader write command

Question asked by Gregory Holcomb on Jul 13, 2017
Latest reply on Jul 13, 2017 by Clive One

I am using a STM32F031 micro and app note AN3155, using the built in UART bootloader on serial pins A9 and A10.  I wish to write sixteen bytes of zeros to an address near the start of flash, 0x08000010.  Referencing page 18 and 19 in the app note.  The micro is sending ACK for accepting the write command and sending ACK for accepting the address.  The sequence to send the data to write is not clear, with my interpretation the micro neither ACK nor NACK until I send one extra byte.

 

I do note that footnote 2 on page 19 says (N+1) must be a multiple of 16.  Does that mean I can't write 16 bytes because 16+1 is 17, and must instead write 15 or 19?

 

My assumptions:

 

Write 16, my N is equal to 16.

Write sixteen zeros.

Write the checksum, 16 and 16 zeros, checksum is 16.

 

Problem:

 

STM never ACK or NACK.

 

Observation:

 

If I write an extra zero byte, the checksum would be correct still and that makes the STM will ACK.

 

Data decoded in hex on an oscilloscope in HEX if that is clearer than my description.

 

The datastream that I understand a pause and then the one more byte.

Outcomes