hello all, when I use HAL_FLASHEx_Erase() to erase sectors, it is ok! But when I use HAL_FLASHEx_Erase_IT() interrupt mode to erase sectors, it fails! It seems the interrupt not occuring! if I need to do more settings for flash in...
and I debug HAL_FLASHEx_Erase_IT() --> FLASH_Erase_Sector(), find after executing line991, it cause a PGSERR interrupt, which means programming sequence error. But it also not causes an interrupt, I do not know why?
Yes, I call FlashInit() before HAL_FLASHEx_Erase_IT(&EraseInitStruct)! And I retest polling mode ,everything, including read, erase, write are both good!
thanks for you quickly replying. I use following to enable the interrupt in the initialization stage:void FlashInit(void){ /* Enable NVIC for FLASH Interuption */ HAL_NVIC_SetPriority(FLASH_IRQn, 8, 0); HAL_NVIC_EnableIRQ(FLASH_IRQn);}An...