Skip to main content
UpStream
Associate
April 5, 2023
Question

Interrupt during execution of function FLASH_Erase_Sector

  • April 5, 2023
  • 1 reply
  • 858 views

Hi​

Is there any way to have the function "FLASH_Erase_Sector" operate with an interrupt during execution?

Of course, the function must be executed only on the SRAM.

Target is STM32F407.

This topic has been closed for replies.

1 reply

gbm
Super User
April 5, 2023

Possible but not easy. You need to relocate exception vectors to RAM and make sure that the interrupt service routines you intend to use:

  1. are in RAM
  2. do not call any routines not in RAM, including the compiler helpers - to ensure this you need to analyze the .list files for the ISRs in question.

Much easier to achieve with dual-bank Flash.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice