2021-01-30 04:43 PM
I'm an Atmel SAM person migrating to STM32...
How big is the flash in the STM32H730??? The first page of the data sheet clearly says it is 128 KB but RM0468, Table 1-14, says there is 128KB of "system" flash and 128KKB of "user" flash.
And, software can't erase the system sector. And, if you do want a gadget to update it's own firmware, you have to erase the ENTIRE 128KB. So it looks to me like you have to use the 128KB system sector for a loader/OTA flasher and the 128KB user sector for the updatable code. Seems a little inefficient. The way I use ATSAMD51xx from Atmel, my boot code is less than 1KB and I keep two complete copies of the application in flash and be able to update either one. I was hoping to do something similar here. Not possible?
I've been poring through the manual and I am just completely confused by the various flash protection options. Starting with how big it is...
2021-01-31 07:20 AM
System flash is just that ... not available for user. ST's bootloader is stored there, not modifiable in any way. So, you're left with the single 128kByte user flash sector. Period. The value line F7 and H7 devices are supposed to be used with external flash. Write your own boot loader / flasher into the internal flash, and use the external flash for you application.
2021-01-31 08:29 AM
In simple cases the built-in bootloader (and the BOOT0 pin) may be enough for updating.
Rewrite of the user's 128k is also possible from code running in RAM.
Of course if the latter fails the device will be bricked, Take care.
--pa
2021-01-31 06:37 PM
Thanks. "supposed to be used with external flash" was the explanation. I just couldn't quite believe that there was a single erase block for the whole device.
In fact, it's still suspicious the way they say the system flash "cannot be erased by software" as if maybe it can be erased by a J-Link or something else.
Now I'm probably looking at the STM32H742VG with two banks, each of which is divided into multiple erasable sectors, and you can even erase one while running code from the other.
2021-01-31 06:56 PM
These are designed to be low cost "value line" parts
This means little flash available/tested. The parts share the same die as more expensive parts, so often the memory is there. The most effective way to extend memory is to use an external QSPI Flash memory, or two. You can either run code from that, or frankly unpack executable code into RAM.
2021-02-01 02:06 PM
Yeah, I read that in your other post. I remember Microchip doing the same thing.
But it begs the question, if they're all the same die, why is the STM32H730 CPU spec'd at 550MHz whereas the others seem to all be 480 MHz?
2021-02-02 12:24 AM
H730, H723, H725 have the same die, and all 550MHz. See RM0468, DBGMCU_IDC: DEV_ID[11:0]: Device ID 0x483: STM32H72x, STM32H73x