Skip to main content
CHeck.1
Associate II
December 12, 2023
Solved

STM32h573 read OTP

  • December 12, 2023
  • 5 replies
  • 2730 views

Hello,
I'm trying to read the OTP flash form my application but I get a hardfault.

Is there a read protection or something like that?

 Here is a code snippet:

#define FLASH_START_ADDRESS 0x08FFF000

int main(void) {
 HAL_Init();
uint32_t* flash_data = (uint32_t*)FLASH_START_ADDRESS; uint32_t data = *flash_data;
This topic has been closed for replies.
Best answer by mƎALLEm

Hello,

From Reference Manual: it's due to this:

SofLit_0-1702057258713.png

Please refer to this thread.

5 replies

AScha.3
Super User
December 12, 2023

maybe....from rm :

AScha3_0-1702372821439.png

 

If you feel a post has answered your question, please click on " Best Answer ".
CHeck.1
CHeck.1Author
Associate II
December 12, 2023

I think that should not result in a hard fault

mƎALLEm
mƎALLEmBest answer
ST Technical Moderator
December 12, 2023

Hello,

From Reference Manual: it's due to this:

SofLit_0-1702057258713.png

Please refer to this thread.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
MM..1
Super User
December 12, 2023

I mean your C code is bad check your * chaos.