🎉 We're happy to announce new public releases 🎉

  • SmartCode v10.4r1 - Take advantage of all the benefits our tools have to offer and build your applications with the latest version
  • TriCore v6.3r1 Inspector v1.0r8 - Save time and detect known issues before they get into your application
Contact us to get access

Troubleshooting the application using SFR dump

17-Sep-2024

With the SFR dump method, you can determine what CPU registers were changed between two points (e.g. between reset and some function, function entry and exit, CPU reset, and CPU initialization, etc.) and find issues via low-level debugging by revealing and comparing the content of two CPU registers.

Note that you must be familiar with which changes are relevant to the issue at hand.


Solution

1. Right-click in the SFR window and select Options. Disable in the Abort refresh section:

  • Full, after
  • Group, after
  • Group if access error occurs

2. Right-click on the specific register in the SFR window and select Save.

3. In the Export dialog select:

  • Text (all) in the Format field
  • Selection in the Scope section

Example

CPU runs correctly only when the debugger is physically detached, otherwise, it misbehaves. Using Hot Attach, it is possible to connect to a running CPU.

1. Generate an SFR dump when the CPU is stopped on a specific breakpoint.

2. Disable Hot Attach.

3. Start the debug session and run the CPU until it hits the same breakpoint.

4. Generate another SFR dump and compare it to the first one.

Was this answer helpful?