cancel
Showing results for 
Search instead for 
Did you mean: 

STM32h573 read OTP

CHeck.1
Associate II

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;
1 ACCEPTED SOLUTION

Accepted Solutions

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 on "Accept as Solution" on the reply which solved your issue or answered your question.

View solution in original post

5 REPLIES 5
AScha.3
Chief III

maybe....from rm :

AScha3_0-1702372821439.png

 

If you feel a post has answered your question, please click "Accept as Solution".

I think that should not result in a hard fault

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 on "Accept as Solution" on the reply which solved your issue or answered your question.

what hard fault ?

try in ide: (while in debug)

menu -> window -> showview -> fault analyzer

If you feel a post has answered your question, please click "Accept as Solution".
MM..1
Chief III

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