cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F0 interesting malfunction

matas
Associate II
Posted on October 30, 2015 at 10:59

Hello, I am working on STM32F030C6 it is measuring ADC and sending data through the USART. Everything is good in debug mode until I let it run without break points :D I added pictures how the variables look before and after. So I was wondering if anybody else ran into the same problem? Just want to fix it as quick as possible :)

Foo Bar
2 REPLIES 2
mckenney
Senior
Posted on October 30, 2015 at 13:01

There's not much to go on here, but when I see ''it stops working when I remove breakpoints'' I think ''it's not waiting for some operation to complete''.

While the CPU is stopped at a breakpoint, other parts of the chip continue running. If your code is failing to wait for something to complete -- ADC, DMA e.g. -- it could complete in the background while you're staring at the breakpoint, and you (appear to) succeed. As soon as you remove the breakpoint, your code rushes through without waiting, and fails.

Check your code for cases like this, or post the code so others can check it.

matas
Associate II
Posted on November 02, 2015 at 08:03

Found the problem :) You were almost right, I forgot to reset one of the pointers in the program and the pointer went all through the memory changing data, so the program crashed :) 

Foo Bar