Hello Guys, I am new to STM32f4xx series controllers, so i am facing a problem while debugging the code . I am using Serial wire debugging using ST-LINK v2 debugger.
My Project is like that I am receiving commands from a PC application via USB(CDC mode). Depending upon that command in firmware side we call some function.
Problem is that when i try to step in in that function .The execution control go to OTG_FS_IRQHandler after completing handler routine instead of going back to that function in which i want to step in it goes to some other function which is called in while(1) loop. I didn,t set any breakpoint in OTG_FS_IRQHandler. How it is going into OTG_FS_IRQHandler. Is it because USB interrupt is continuously coming after a periodic interval.
Are you sure USB, with hard timing expectations, will tolerate this type of debugging.
It could be that the routine you're trying to step into is a background function, the while() loop is in the foreground.
Having used a number of different debuggers, I find that breakpoints are more reliable than single-stepping. And it seems only natural since breakpoints are normally directly supported by hardware, whereas single-stepping usually involves some trickery that relies on questionable assumptions.