Question
STM32WLE5CC Hangs on Flash Write when High frequency External GPIO Interrupt is enabled
Hello,
Our application is to count fast external interrupt with denouncing in EXTI_callback().
only When this interrupt is ongoing and try to write flash ,then STM32WLE5CC hangs, and reboot using Independent watchdog.
Write to flash code:
void emulated_eeprom_write_buf(uint8_t * buf, uint16_t length){
if((length)>2047) return;
uint32_t base_addr=0;
base_addr=getHexAddressPage(DATA_PAGE);
memoryPageErase(DATA_PAGE);
HAL_FLASH_Unlock();
for (uint32_t i = 0; i < length; i += 8)
{
uint64_t data64 = u8touint64(buf+i);
if (HAL_FLASH_Program(FLASH_TYPEPROGRAM_DOUBLEWORD, i + base_addr, data64) != HAL_OK)
{
HAL_FLASH_Lock();
return ;
}
}
HAL_FLASH_Lock();
}In HAL_GPIO_EXTI_Callback() there is 50ms debounce check.
If there is no interrupt, then this issue doesn't arise.
please help us to solve this issue.
Thank You