<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/when-the-debugger-lies-with-stale-cache-values-aedfpoaoy" -->

---
title: When The Debugger Lies With Stale Cache Values | daily.dev
description: A developer debugging Nordic's Cortex-M33-based nRF54LM20 found that GDB's standard memory read command returned stale cached values instead of current data,...
canonical: https://daily.dev/posts/when-the-debugger-lies-with-stale-cache-values-aedfpoaoy
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: When The Debugger Lies With Stale Cache Values | daily.dev
og:description: A developer debugging Nordic's Cortex-M33-based nRF54LM20 found that GDB's standard memory read command returned stale cached values instead of current data,...
og:url: https://daily.dev/posts/when-the-debugger-lies-with-stale-cache-values-aedfpoaoy
og:image: https://api.daily.dev/og/posts/AEdfPoaOY.png
og:image:alt: When The Debugger Lies With Stale Cache Values
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# When The Debugger Lies With Stale Cache Values

**[Hackaday](https://daily.dev/sources/hackaday)** · 2 min read · 0 upvotes · 0 comments

## Summary

A developer debugging Nordic's Cortex-M33-based nRF54LM20 found that GDB's standard memory read command returned stale cached values instead of current data, particularly when working with the chip's Key Management Unit. Using JLinkGDBServer's ReadMemAP command with explicit access port and address parameters bypassed the issue and returned correct values, pointing to caching inside the J-Link software itself rather than GDB or the AHB-AP access port. Disabling J-Link's caching also resolved the problem.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://hackaday.com/2026/09/27/when-the-debugger-lies-with-stale-cache-values>

## Questions this post answers

### Why does GDB return stale memory values when debugging a Nordic nRF54LM20 with J-Link?

The J-Link debug software's own caching layer can return outdated memory values even though the underlying hardware has been updated, particularly when inspecting Key Management Unit registers on the Cortex-M33-based nRF54LM20. Using JLinkGDBServer's ReadMemAP command with an explicit access port and memory address bypasses the cache and returns the correct value, and disabling J-Link caching entirely also fixes the problem.

_daily.dev surfaces debugging writeups like this for engineers chasing down mysterious stale-cache behavior in embedded toolchains._

## Similar posts on daily.dev

- [Playing with the STM32MP2](https://daily.dev/posts/playing-with-the-stm32mp2-jxyvhohip) · Hacker News · 0 upvotes · 0 comments
- [Using Tracealyzer for Embedded Systems Analysis](https://daily.dev/posts/using-tracealyzer-for-embedded-systems-analysis-sdtjm2ryk) · MCU on Eclipse · 1 upvotes · 0 comments
- [Why aren't my two Cortex-A9 cores cache coherent?](https://daily.dev/posts/why-aren-t-my-two-cortex-a9-cores-cache-coherent--flqanzfrj) · Lobsters · 2 upvotes · 0 comments

---

Tags: [#embedded](https://daily.dev/tags/embedded)

[View this post on daily.dev](https://daily.dev/posts/when-the-debugger-lies-with-stale-cache-values-aedfpoaoy)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"When The Debugger Lies With Stale Cache Values","url":"https://daily.dev/posts/when-the-debugger-lies-with-stale-cache-values-aedfpoaoy","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/when-the-debugger-lies-with-stale-cache-values-aedfpoaoy"},"datePublished":"2026-09-27T08:28:16.271Z","dateModified":"2026-09-27T08:28:35.312Z","description":"A developer debugging Nordic's Cortex-M33-based nRF54LM20 found that GDB's standard memory read command returned stale cached values instead of current data,...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/fbccd384a5293ed200794e8e4874c563?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/fbccd384a5293ed200794e8e4874c563?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Hackaday","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hackaday","logo":"https://media.daily.dev/image/upload/s--JhDfhy70--/f_auto,q_auto/v1767541814/logos/hackaday","url":"https://daily.dev/sources/hackaday"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/when-the-debugger-lies-with-stale-cache-values-aedfpoaoy","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"embedded","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hackaday","item":"https://daily.dev/sources/hackaday"},{"@type":"ListItem","position":3,"name":"When The Debugger Lies With Stale Cache Values"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/when-the-debugger-lies-with-stale-cache-values-aedfpoaoy#faq","mainEntity":[{"@type":"Question","name":"Why does GDB return stale memory values when debugging a Nordic nRF54LM20 with J-Link?","acceptedAnswer":{"@type":"Answer","text":"The J-Link debug software's own caching layer can return outdated memory values even though the underlying hardware has been updated, particularly when inspecting Key Management Unit registers on the Cortex-M33-based nRF54LM20. Using JLinkGDBServer's ReadMemAP command with an explicit access port and memory address bypasses the cache and returns the correct value, and disabling J-Link caching entirely also fixes the problem. daily.dev surfaces debugging writeups like this for engineers chasing down mysterious stale-cache behavior in embedded toolchains."}}]}
```

