Skip to main content
matas
Associate III
Oct 30, 2015 9:59 AM UTC
Question

STM32F0 interesting malfunction

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 :)

    This topic has been closed for replies.

    2 replies

    mckenney
    Associate
    Oct 30, 2015 12:01 PM UTC
    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
    matasAuthor
    Associate III
    Nov 2, 2015 7:03 AM UTC
    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