63 #include "stm32f4xx.h"
64 #include "stm32f4xx_rcc.h"
65 #include "stm32f4xx_flash.h"
77 #define OTP_START_ADDR (0x1FFF7800)
82 #define OTP_LOCK_ADDR (0x1FFF7A00)
92 #define OTP_BYTES_IN_BLOCK 32
97 #define OTP_SIZE (OTP_BLOCKS * OTP_BYTES_IN_BLOCK)
164 #define TM_OTP_BlockLocked(block) ((*(__IO uint8_t *) (OTP_LOCK_ADDR + block)) == 0x00 ? 1 : 0)
Definition: tm_stm32f4_otp.h:114
uint8_t TM_OTP_Read(uint8_t block, uint8_t byte)
Reads data from specific block and specific byte in this block.
TM_OTP_Result_t
Result enumeration.
Definition: tm_stm32f4_otp.h:112
TM_OTP_Result_t TM_OTP_BlockLock(uint8_t block)
Locks entire block to prevent future programming inside.
Definition: tm_stm32f4_otp.h:113
TM_OTP_Result_t TM_OTP_Write(uint8_t block, uint8_t byte, uint8_t data)
Writes one-time data to specific block and specific byte in this block.