2021-09-29 02:42 PM
There's the Flash Size Register in the Device electronic signature.
Is there an equivalent for the onboard SRAM size? Any way to get the ACTUAL SRAM size at runtime?
2021-09-29 02:49 PM
Yes some STM32 have a register describe the RAM size.
Where they don't you can either use the FLASH size as a guide, or read the Device ID from one of the DBGMCU registers
As I recall there used to be package information in the UNIQUE ID, but I'm not sure how current that its or if it is well/openly documented.
I've use Device ID to determine CPU/BUS speeds within the F4 family
Cache sizes, and core sub-components can be fished out of the ROM TABLEs
2021-09-29 02:52 PM
> Is there an equivalent for the onboard SRAM size?
No, unfortunately.
> Any way to get the ACTUAL SRAM size at runtime?
Here's an ugly hack:
https://stackoverflow.com/questions/23411824/determining-arm-cortex-m3-ram-size-at-run-time