Tracing on EFM32
This article describes how to get started with trace on the Silicon Labs EFM32 MCUs. This article assumes that there is already a basic knowledge about trace in general (what is trace, what different implementations of trace are there, etc.). If this is not the case, we recommend to read Trace chapter in the J-Link User Manual (UM08001).
SWO
Auto SWO speed calculation of J-Link does not work for the Silicon Labs EFM32 series devices.
- Normal SWO Speed calculation: <CPUFreq> / n
- EFM32 specific:Chip-internally wired to a fixed 14 MHz clock (AUXHFRCO)
For utilities like J-Link SWOViewer or similar:
- Select 14 MHz as CPU speed (no matter what the CPU is really running at) to make the normal calculation working
Tracing on EFM32TG11
The Silicon Labs EFM32TG11 MCUs implement tracing via on-chip trace buffer (MTB), so a J-Link can be used for tracing. This feature is supported out-of-the-box from V6.64 and later. Tracing over pins is not supported by this target device.
Tested Hardware
Minimum requirements
In order to use trace on the Silicon Labs EFM32TG11, the following minimum requirements have to be met:
- J-Link software version V6.64 or later
- Ozone V3.10c or later (if trace and / or the sample project from below shall be used)
- J-Link Plus V10 or higher
To rebuild the project our IDE Embedded Studio can be used. The recommended version to rebuild the projects is V6.30. But the examples are all prebuild and work out-of-the box with Ozone, so rebuilding is not necessary.
Sample project
The following sample project is designed to be used with J-Link Plus and Ozone to demonstrate MTB trace. The project has been tested with the minimum requirements mentioned above and a Silicon Labs EFM32 Tiny Gecko evaluation board. The sample project comes with a pre-configured project file for Ozone that runs out-of-the-box. In order to rebuild the sample project, SEGGER Embedded Studio can be used.
SiLabs_EFM32TG11_TraceBuffer.zip
The MTB does not support stream tracing.
Streaming trace
Streaming trace is not supported on this particular target device.
Tracing on EFM32PG26
Off-chip trace
This device supports so-called off-chip tracing via trace pins. A J-Trace is required for tracing. This feature is supported out-of-the-box from J-Link V9.56 and later, using following fixed trace pins:
| Pin | Signal | Description |
|---|---|---|
| PA04 | TCLK | Trace clock |
| PA03 | TD0 | Trace data 0 |
| PA05 | TD1 | Trace data 1 |
| PA06 | TD2 | Trace data 2 |
| PA07 | TD3 | Trace data 3 |
Simply select trace pins as the trace source in your IDE or debug software and you should see trace data recordings when running and halting your application.
Tested Hardware
- Note that the trace signals are not connected to the ARM Cortex-M debug connector, and overlap with the LCD signals. For tracing capabilities, the LCD needs to be disabled.
Minimum requirements
In order to use trace on the Silicon Labs EFM32PG26, the following minimum requirements have to be met:
- J-Link software version V9.56 or later
- Ozone
- J-Trace ARM/Pro V3 or higher