The data logger and trace (DLT) peripheral is a key element for non-intrusive data logging with tracing support in application code. This peripheral can be leveraged for both industrial and automotive applications. C29x real-time microcontrollers offer a non-intrusive way to data log critical CPU run time content and provide trace capabilities without additional CPU overhead. This application note focuses on an application use-case described within the introduction, demonstrating each of the features of the DLT along with how to use the SysConfig system configuration tool to set-up and program the DLT. There is additional material on how to setup the DLT visualization tool needed to interpret the data logging and trace contents without the use of external hardware. SysConfig is a tool that exists integrated in Code Composer Studio or as a stand alone program that allows users to generate C header and code files using a graphical user interface (GUI). This application note was done using the F29H859TU8ZEXQL device. However, the content in this application note is applicable to all devices with the DLT peripheral.
All trademarks are the property of their respective owners.
Why is data logging and trace important in real time control systems?
There are many applications that require different uses of using data log or trace features on a device. The DLT provides a way to log critical run time content, and then export out by JTAG, UART, or FSI. If there is no JTAG connection available, the DLT can still be used if there is a UART or FSI implementation to export the data. The lines of code controlling what is being logged can be kept in the application code without impact on CPU performance.
The DLT provides data logging and code flow execution through dedicated instructions provided in the C29x user guide. When using the DLT for data logging variables or adding code flow markers in the application there is additional information attached to each log. The additional information is dependent on what mode the DLT is capturing the logs. The two modes for the additional information added to each log are time stamping or program counter information. In time stamping mode, the DLT provides information of when variables or code markers are being logged. In program counter mode, the DLT provides information to know where these logs are happening.
There are dedicated instructions used to log information. The instructions have the following names DLTAG and DLREG. DLTAGs are used as the code flow markers. DLREGs are the instructions that allow users to data log variables. With the leverage of multiple instructions running in parallel using the C29x processor these instructions can run in parallel and provide non-intrusive behavior when data logging or adding code flow markers to the application code. The co-processor interface (CPI) looks for these dedicated instructions from the CPU and provides the packet information to the DLT which gets logged to a dedicated memory address region for each CPU. The CPU or DMA can read out the logs from the DLT internal memory and move the logged information as needed.
Here is a high level view from going to application code to visualizing the data being logged by the DLT on a PC.
This application note explains the steps needed to configure the DLT, data log, and add code markers using the built in compiler intrinsic. The DLT leverages the compiler and SysConfig to provide the fastest way to get started with using this peripheral.
The use-case that is discussed throughout this application report is using the DLT to record a temperature sensor sample and ADC results within ISR.