2024-04-24 12:27 AM - edited 2024-04-25 01:23 AM
Do I need to disable global interrupts for internal flash erase and write operations?
__disable_irq();
erase();
__enable_irq();
__disable_irq();
write();
__enable_irq();
2024-05-22 04:38 AM
Hello @xiewenliang,
Could you specify the product or serie are you looking to reprogram the internal flash memory on? Additionally, could you share the intended purpose and any other relevant information that might aid in offering you the best support.
Thanks and Best Regards,
Dorsaf
2024-05-22 06:20 AM
Generally NO, but you don't want to erase active code or the vector table.
If you read data/code from the same bank whilst the write/erase is occuring, it will STALL the MCU, basically stuff wait-states. As this can take a lot of time it can block read-time operation, like servicing a UART properly, or USB repressiveness, etc.