Getting started using data logging
To set up for data logging, choose Driver>Configuration. In the dialog box, set up the serial-wire output communication channel for trace data. Note specifically the CPU clock option. You can set a default value for the CPU clock on the Project>Options>C-SPY driver page. In the SWO Configuration dialog box, you can override the default value.
If you are using the C-SPY simulator you can ignore this step.
To set a data log breakpoint, use one of these methods:
In the Breakpoints window, right-click and choose New Breakpoint>Data Log to open the breakpoints dialog box. Set a breakpoint on the memory location that you want to collect log information for. This can be specified either as a variable or as an address.
In the Memory window, select a memory area, right-click and choose Set Data Log Breakpoint from the context menu. A breakpoint is set on the start address of the selection.
In the editor window, select a variable, right-click and choose Set Data Log Breakpoint from the context menu. The breakpoint will be set on the part of the variable that the microcontroller can access using one instruction.
You can set up to four data log breakpoints. For more information, see Data Log breakpoints.
Choose Driver>Data Log to open the Data Log window. Optionally, you can also choose:
Driver>Data Log Summary to open the Data Log Summary window
Driver>Timeline to open the Timeline window to view the Data Log graph.
From the context menu, available in the Data Log window, choose Enable to enable the logging.
In the SWO Configuration dialog box, you can notice in the Data Log Events area that Data Logs are enabled. Choose which level of logging you want:
PC only
PC + data value + base address
Data value + exact address
If you are using the C-SPY simulator you can ignore this step.
Start executing your application program to collect the log information.
To view the data log information, look in the Data Log window, the Data Log Summary window, or the Data Log graph in the Timeline window.
If you want to save the log or summary to a file, choose Save to log file from the context menu in the window in question.
To disable data logging, choose Disable from the context menu in each window where you have enabled it.