2024-01-18 06:42 AM
I am developing a custom bootloader for a client on an STM32 system. I am using STM32CubeProgrammer to exercise the new bootloader and the built-in system bootloader to investigate the protocol being used over UART. In addition, I am referring to AN 3155, which describes the protocol.
The issue/confusion I am facing is that when using the system bootloader and STM32CubeProgrammer and capturing the UART traffic for erasure of a single page, I see a different message sent from the programmer than that described in AN 3155, unless I am missing some important detail in the app note.
For example, erasing the first page of an STM32F103 I capture the following output from STM32CubeProgrammer.:
[43h] [BCh] [01h] [00h] [2Bh] [2Ah]
The first difference to the app note is in byte #3, the number of pages to erase. According to AN 3155 this should be N-1, so I would expect this to be "00h."
Secondly, byte #5 appears to be undocumented, the list of pages, in this case just page zero, should be followed by the checksum.
I have revision 16 of AN 3155, if there is a later version, or if some can spot my error, I would much appreciate this.
Sid
Solved! Go to Solution.
2024-01-18 07:01 AM
Looks like it's erasing 2 pages, not 1. Page 0 and page 0x2B. That matches up with the protocol.
More likely to be a bug in STM32CubeProgrammer than in the bootloader.
2024-01-18 07:01 AM
Looks like it's erasing 2 pages, not 1. Page 0 and page 0x2B. That matches up with the protocol.
More likely to be a bug in STM32CubeProgrammer than in the bootloader.
2024-01-18 07:05 AM
That would make sense and I assume the unknown byte #5 is the page number of that second page ... I will proceed based upon that assumption. Maybe ST can comment on this to confirm.