Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nrf54l: Allow debug access from firmware side #3685

Merged
merged 1 commit into from
Dec 26, 2024

Conversation

Tiwalun
Copy link
Contributor

@Tiwalun Tiwalun commented Dec 25, 2024

This unlocks debugger access to the application core, if it is also unlocked in UICR.

// Unlock niden
//
// Reuse values from dbgen disable
p.protect()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is quite verbose. I see you did it this way to reuse the values across dbgen, niden, spiden but it ends up being more verbose and nothing enforces the bits for these are at the same position. i'd suggest using the plain old closure write instead:

use crate::pac::tampc::vals;

p.protect().domain(0).niden().ctrl().write(|w| {
    w.set_key(vals::DomainDbgenCtrlKey::KEY);
    w.set_writeprotection(vals::DomainDbgenCtrlWriteprotection::CLEAR);
});

@Tiwalun Tiwalun force-pushed the nrf54l-debug-unlock branch from c306d45 to 19203c7 Compare December 26, 2024 07:37
Copy link
Member

@Dirbaio Dirbaio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank!

@Dirbaio Dirbaio added this pull request to the merge queue Dec 26, 2024
Merged via the queue into embassy-rs:main with commit b71696c Dec 26, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants