Categories

{{ selectedCategory.name }}

{{ topic.Title }} {{ topic.Ddate | formatDate }}

{{ topic.Content }}

No topics found!

Troubleshooting the application using SFR dump

14-Jul-2023

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 OptionsMake sure all three options (Full, after; Group, after; Group if access error occurs) in the Abort refresh section are disabled.

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

3. In the Export dialog, make sure the Text (all) option in the Format field and the Selection option in the Scope section are selected.


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?

Sorry this article didn't answer your question, we'd love to hear how we can improve it.
Note: This form won't submit a case. We'll just use it to make this article better.

Similar topics

{{ topic.Title }} {{ topic.Ddate | formatDate }}

{{ topic.Content }}

No similar topics found!

Other topics in the same category

{{ topic.Title }} {{ topic.Ddate | formatDate }}

{{ topic.Content }}

No topics found!