I have the following problem. I need to store data into the user signature area of the flash memory. I'm using the flash_write_user_signature function from AFS 3.31.0. But the program hangs in the mentioned function, particularly in this line :
*p_dest++ = gs_ul_page_buffer[ul_idx];
It just throws to the dummy handler and hangs there.
I also was trying to use the ordinary flash write but it hangs even at the unlocking stage.
I don't know how to explain such behavior because the FLASH_PROGRAM_EXAMPLE provided by Atmel Studio works perfectly even if I add the user signature read/write functions.
Maybe there is some conflicting periphery in my code or something else, I can't manage.