F-7392: stm32h7: document inherent OTP immutability in set_readonly

The H7 OTP memory is one-time programmable, so the keystore and UDS
are permanent once written; the H7 has no OTP block-lock register
(unlike the H5), so there is no write-protection step to perform.
Replace the misleading TODO with the reason the no-op is correct.
pull/882/head
Daniele Lacamera 2026-09-04 14:33:29 +02:00
parent b9068ce162
commit d64f15af05
1 changed files with 5 additions and 1 deletions

View File

@ -560,7 +560,11 @@ static void hal_flash_otp_lock(void)
int hal_flash_otp_set_readonly(uint32_t flashAddress, uint16_t length)
{
/* TODO: set WP on OTP if needed */
/* The STM32H7 OTP memory is one-time programmable: once the keystore
* and UDS are written, the data is permanent and cannot be overwritten.
* Unlike the STM32H5, the H7 has no OTP block-lock register, so there
* is no explicit write-protection step to perform. The anchor is
* protected by the inherent immutability of the programmed OTP. */
return 0;
}