Skip to main content
Explorer
December 12, 2023
Solved

STM32h573 read OTP

  • December 12, 2023
  • 2 replies
  • 2681 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.

    2 replies

    Super User
    December 12, 2023

    maybe....from rm :

    AScha3_0-1702372821439.png

     

    CHeck.1Author
    Explorer
    December 12, 2023

    I think that should not result in a hard fault

    mƎALLEmAnswer
    Technical Moderator
    December 12, 2023

    Hello,

    From Reference Manual: it's due to this:

    SofLit_0-1702057258713.png

    Please refer to this thread.

    Graduate II
    December 12, 2023

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