Hi @danielmartynek,
Yes, Fls_Erase() function is a blocking function that waits until the flash operation is complete in SRAM
I located Fls_Erase to ".code_ram" section instead of ".code" section, everything worked normally. Setting the function to ".code" section is the cause that led to my fault.
Map file in case function to ".code_ram" section:
AndersonStarling_0-1644249812725.png
Map file in case function to ".code" section(fault exception occurs)
AndersonStarling_1-1644249847749.png
My linker knowledge is small. So could you explain for me a little bit about ".code" and ".code_ram" sections in the linker script?
I attached my linker script to the topic that you could review.
Thank you,