cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G4: USART buffer overrun during Flash Erase operation

harisuvarna
Associate III

Hi ,

I am using STM32G4 to receive USART data from external interface and USART buffer overrun when USART interrupt conflicts with Flash Erase operation. 

As mentioned in STM32G4 Reference manual , in single bank mode, any read operation while writing/erasing flash 

stalls the bus until current flash operation is complete. To mitigate this performed following,

  • Moved ISR handler and subroutines invoked inside ISR to SRAM
  • Moved Interrupt Vector table to SRAM     

After all these changes , USART buffer still overruns when it conflicts with Flash erase operation

Request you to share your views.

Regards,

Hareesha

1 REPLY 1
Karl Yamashita
Principal

So there must be some command to have the STM32G4 to erase the flash. Do you not return and ack to let the external device start sending packets of data?

Don't worry, I won't byte.
TimerCallback tutorial! | UART and DMA Idle tutorial!

If you find my solution useful, please click the Accept as Solution so others see the solution.