cancel
Showing results for 
Search instead for 
Did you mean: 

Can I operate a DSMPS when writing to FLASH from the MCU?

DavidNaviaux
Senior

In my custom board, the STM32G4 is regulating the voltages on two converters, a buck, and an inverting buck.  The peak current mode control used generates an interrupt every 5us for some processing, including current limit detection.

Currently, the MCU is configured for a single 128kB bank (I may not have the option to operate in dual bank mode due to the size of the generated code, but it is close). 

Currently, it appears that each time I write to the FLASH, the serial communication briefly hangs that is causing an occasional serial communication error.   What I'm concerned about is how this short lockup will affect the two power supplies that the MCU is controlling.  The inverting buck converter is particularly a concern since it can short +24V to ground if its PWM signal sticks high for more than 50us or so.

 

1 REPLY 1
DavidNaviaux
Senior

It just occurred to me that if I switch to 2 banks of 64kB each, I can locate all of the interrupt handlers in the bank opposite the bank that I am writing to.  I could also split the application firmware between the two banks. 

Would this solve my problem so that there is no interruption in the DSMPS or serial communications?