2013-09-09 09:09 AM
I am attempting to erase just flash pages 0x1fc and 0x1fd.
See the attached logic analyzer screen shots. They indicate to me that I am sending the commands correctly and the bootloader is responding with ACKs correctly. My problem is that the flash pages are not actually getting erased, and if I read those locations they return the un-erased data. What am I doing wrong?Thanks #bootloader2013-09-09 10:26 AM
Assume for a second that don't know what part you're using, the address you think you're erasing, and the block/page size in question.
2013-09-09 10:47 AM
Here is the missing information. The part is the STM32F205, with 128K flash. The page size is 256bytes. I am attempting to erase pages 508 and 509 which correspond to addresses' 0x0801fc00 - 0x0801fcff and
0x0801fd00 - 0x0801fdffCheers2013-09-09 12:47 PM
Yeah, I don't think you have any 256 byte pages on the F2
I think the number here has range 0-11 for 1MB die devices, 0-4 covers the 128KB you have 0 0x08000000 (16KB) 1 0x08004000 (16KB) 2 0x08008000 (16KB) 3 0x0800C000 (16KB) 4 0x08010000 (64KB) .. 5 0x08020000 (128KB) 6 0x08040000 (128KB) ..2013-09-09 01:16 PM
Thanks for that, my confusion comes from the fact that the bootloader documentation refers to ''pages'' and since all the read/write instructions only read or write up to 256 bytes, I assumed this was the page size.
Strangely ST uses the term ''sector'' in their reference manual to refer to the same thing as 'pages' in the bootloader manual. Poor choice of working in my opinion, especially since they don't correlate the two terms anywhere.To further confuse things their bootloader ''acks'' when the sectors don't exist.I can see that the technical writers, the hardware designers and the application engineers need to do better at working from the same script.Cheers,Andrew2013-09-09 01:17 PM
2013-09-09 01:37 PM
The Pages were smaller on the F1 devices, but dependent on the flash size, 512-2048 bytes as I recall. You had to read the flash size to figure out which to use.
The read/write routines are limited by the BYTE nature of the protocol in the System Loader. The original F1 loader was implemented in 2KB, and rather simple as a result. There is definitely a lack of consistency and coherency across the documentation of the various STM32 series parts. They are also difficult to find on the site, and fractured (Data Manual, Reference Manual, Programming (Flash) Manual) Confusing things more, your part really has 1 MB of FLASH, and 128 KB of SRAM