Hackaday · Creativity & design
Debugger Cache Issue on nRF54LM20
A debugging issue was observed on the Cortex-M33-based nRF54LM20 where the GDB debugger returned stale cached values, leading to incorrect readings during operations.

The problem occurred despite initial operations appearing successful. The debugger would report values suggesting previous operations failed, but this was due to cached data, not actual operation failures.
The article delves into the low-level functioning of the MCU, including its cryptographic features and Key Management Unit, which handles sensitive information storage.
A workaround involves bypassing the cache by explicitly specifying the access port, memory address, and other parameters using the ReadMemAP command.
This command, supported by JLinkGDBServer, successfully retrieved the correct value, unlike the standard GDB 'x' command which continued to return cached data.
The investigation suggests the issue stems from J-Link software's own caching mechanism, as direct reads from the AHB-AP access port worked correctly.
Running without J-Link caching also resolved the problem, indicating a software bug within the J-Link debugger.
While the issue was identified and a bypass found, it highlights a potentially time-consuming bug for developers during debugging sessions.
AI-samenvatting op basis van de bron.
Hackaday