2023-10-07 10:34 AM
I want to be able to program a STM32H7 device with something like a device ID, for example, this device is #10, and that devices is #55. This would affect the behavior of the device, so it must be possible to read that number through the firmware, so that the device is aware of which number it is.
I also want to be able to update the firmware on all devices through the built-in UART bootloader, but I don't want this to wipe the device ID. Is it possible to do something like this without adding an external FLASH?
2023-10-07 10:57 AM
Isn't there some OTP memory?
Read Unique ID?
2023-10-07 11:55 AM
..and if battery Vbat there, the backup sram .
2023-10-07 12:46 PM
As @tesla suggested, STM32 has built-in unique ID, 96 bits (3*32). Can you use it?
2023-10-07 05:38 PM
I think OTP will work. Unique ID won't work because it needs to be a specifically programmed number that changes a delay in communication.
Can OTP be rewritten during development or is it truly a one-time thing?
2023-10-07 11:48 PM
OTP is truly one-time. If this weren't bad enough, STM32H7 does not have OTP at all.
2023-10-08 12:54 AM - edited 2023-10-08 12:56 AM
Based how H7 but maybe this helps STM32H7-Memory-Flash (FLASH) have options area 2k
Or if you have spare sectors can use EEPROM emulation ...
And bootloader overwrites only by commands, not all space.
2023-10-08 03:58 PM
Despite the marketing materials, there is no nonvolatile memory store on the STM32H7 apart from the normal FLASH. The "2KB flash of user option bytes for user configuration" mentioned in the datasheet is presumably a disconnect between what is technically on the chip and what is available to the user and it should be embarrassing to ST that it has not yet been corrected.
Would love to be proven wrong here, btw, but all evidence points to the contrary.
Also see (for the L5):
https://community.st.com/t5/stm32-mcus-products/stm32l5-user-option-byte-access/td-p/151170