cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4R9I Fast Program issue

YNeng.1
Associate

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.

3 REPLIES 3
Mike_ST
ST Employee

Maybe there is a null pointer somewhere ?

YNeng.1
Associate

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 Employee

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 !!! */