Very Strange issue with STM32G0 series MCU. (Read if really expert of STM32 MCU)
- March 20, 2022
- 8 replies
- 4093 views
I have almost 2 year experience with stm32 MCU. if I had any problem I solve it with in one or two days.
But right now I'm facing a very strange problem and stuck on it from last 25 days.. I'm working on Grid connected inverter control board. In design process i have to measure ac voltage from grid. 2 month ago I made a circuit and measure grid voltage with STM32F103 MCU and everything was fine i assume my circuit is correct and i can put it on schematic . Which final board i made it has STM32G0 series MCU. When i tried to measure voltage with board MCU stop working after 1-2 sec , i think about all issues which can cause this problem for example new MCU chip, voltage checking on supply, isolation of op amps from grid high voltage ,etc. and still same problem then i come on my code and start to find cause and then I found a very strange problem.
I use a external interrupt for measure mains voltage frequency . when I enable that code processor stop working after 2 or 3 seconds but debugger reading of DMA variable memory address still continue it means half MCU stop but half is working . and when I comment that specific code lines and run debugging everything works fine.
That code lines which cause problem screenshot is attached.
