Skip to main content
AW_it
Associate II
July 16, 2021
Question

I'm using an stm32f429 2mb dual bank mcu and erasing a sector in flash bank2 from code running in bank1. This works ok, but interrupts in bank1 seem to stop while the erase is happening.

  • July 16, 2021
  • 3 replies
  • 1116 views

I'd have thought with read-while-write active, that interrupts should continue to run in bank1. For the stm32l devices, the documentation clearly states this will work. Can it also work for the stm32f429? Am I missing some configuration? Or will interrupts in one bank not work when code in that bank is flashing the other bank? Thanks for any help.

This topic has been closed for replies.

3 replies

TDK
July 19, 2021

> interrupts should continue to run in bank1

Which interrupts? Flash programming complete interrupts?

"If you feel a post has answered your question, please click ""Accept as Solution""."
AW_it
AW_itAuthor
Associate II
July 19, 2021

The flash sector erase complete interrupts are working fine.

I expected all code and interrupts running in bank1 flash would continue to run ok while bank2 flash was being erased or programmed. Specifically, I have CAN interrupts on both CAN channels, one of which is bringing down the data I'd be flashing.

But when bank2 flash is being erased, all CAN communication stops, which I didn't expect. I'll look closer today at what other interrupts may or may not be running while bank2 flash is being modified, but I can't find any documentation on this, so I'd be grateful for any clarification.

AW_it
AW_itAuthor
Associate II
July 19, 2021

The flash sector erase complete interrupts are working fine.

I expected all code and interrupts running in bank1 flash would continue to run ok while bank2 flash was being erased or programmed. Specifically, I have CAN interrupts on both CAN channels, one of which is bringing down the data I'd be flashing.

But when bank2 flash is being erased, all CAN communication stops, which I didn't expect. I'll look closer today at what other interrupts may or may not be running while bank2 flash is being modified, but I can't find any documentation on this, so I'd be grateful for any clarification.

TDK
July 19, 2021

As long as your code is solely in the bank that isn't being erased, it should not block. This is what the RM says.

I don't believe a flash erase will stop unrelated interrupts from happening.

"If you feel a post has answered your question, please click ""Accept as Solution""."
AW_it
AW_itAuthor
Associate II
July 19, 2021

Thanks. Your comment is what I'd expect, but this is my first time flashing an stm32 with dual bank and I can't make too many assumptions. I'll now look elsewhere for my missing CAN interrupts. Thanks again.