Skip to main content
YNeng.1
Associate
March 30, 2021
Question

STM32L4R9I Fast Program issue

  • March 30, 2021
  • 3 replies
  • 959 views

I referenced the example from STM32CubeL4-master and run the Flash_FastProgram example,

but when I execute to this line 

*dest_addr = *src_addr in FLASH_Program_Fast(uint32_t Address, uint32_t DataAddress),

it will go to HardFault Handler, have any ideas?

Thank you and best regards.

This topic has been closed for replies.

3 replies

Mike_ST
ST Technical Moderator
March 30, 2021

Maybe there is a null pointer somewhere ?

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. 
YNeng.1
YNeng.1Author
Associate
March 30, 2021

But as soon as I entered, I got error (refer to attached) and haven't modify any sample code.

Used STM32CubeIDE1.4.0, does the version of the compiler affect it? Thanks

0693W000008yGXDQA2.png0693W000008yGX3QAM.png

Mike_ST
ST Technical Moderator
March 30, 2021

I don't know, I have just checked FLASH_Program_Fast with an L4R9 discovery board. No problem.

Tested with CubeIDE 1.6.0.

Check option bytes, because there is a warning a the top of the main.c:

/* !!! Be careful the user area should be in another bank than the code !!! */

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.