2015-10-21 12:24 AM
Hi,
I am using Keil to debug STM32F103 using trace. The trace works fine up till the controller enters the stop mode. After this, Keil gives the warning no synchronization even after the controller has woken up. Should the trace be reconfigured after leaving the stop mode?2015-10-21 09:21 AM
Hi abid.hassan,
In , section 38.16.1, it is mentioned that:''In Stop mode, the bit DBG_STOP must be previously set by the debugger. This willenable the internal RC oscillator clock to feed FCLK and HCLK in STOP mode''
So, set the bit and the trace will work fine.-Shahrzad-
2015-10-21 10:10 AM
Support for trace/debug across low power modes is likely to be lackluster, or invasive.
It's important to be able to understand what your code is doing without the assistance of external tools. First be having a clear idea what it will do from static analysis, and second by providing enough diagnostic output to understand the paths it takes dynamically.2015-10-23 02:10 AM
I forgot to mention but i am already setting the DBG_STOP bit.
2015-10-23 02:15 AM
I am actually debugging a freeRTOS project, which can be difficult to debug without trace. Static analysis on RTOS can't really provide much useful information. I was also using UART for debugging but trace seemed like a more cleaner path.
2015-10-23 08:11 AM
Well, you should probably talk through your problem with Keil's support engineers. They will have the most practical insight.
My insight would be that Cortex trace isn't like old school ICE/LA implementations where all the bus data is available for review. Here you get some insight into the flow, and the software tools have to recreate the system conditions based on the stream coming from the trace hardware. It's not clear if your underlying issue is from exiting STOP. Can you just avoid actually STOPing, where you go through the motions, but don't STOP and dump the debug connection. ie use a WFI that doesn't trigger a STOP vs one that does.