I tried to write my own flash programming routine. Basically I copied the example 'FLASH_PROGRAM_EXAMPLE'. However I always get a hard fault exception at the point where I write the data to the latch buffer. If one want to look at the corresponding line it is in flash_efc.c line 655 and simply says in a loop:
*p_aligned_dest++ = gs_ul_page_buffer[ul_idx];
I checked in disassembly mode and saw that copying the data from gs_ul_page_buffer to one of the registers works fine. It hard fault occurs at the moment that the data is written from the register to p_aligned_dest. This variable points to the flash address I want to program afterwards.
Unlocking and erasing the corresponding sector works fine. Also the above mentioned example works fine. So I guess it is not hardware problem.
Discussions around product based on ARM Cortex M7 core.
1 post • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests