Skip to content

cpu/nrf52: Update nRF52* Vendor Header Files#21739

Merged
crasbe merged 1 commit intoRIOT-OS:masterfrom
crasbe:pr/update_nrf52840_vendor
Oct 1, 2025
Merged

cpu/nrf52: Update nRF52* Vendor Header Files#21739
crasbe merged 1 commit intoRIOT-OS:masterfrom
crasbe:pr/update_nrf52840_vendor

Conversation

@crasbe
Copy link
Copy Markdown
Contributor

@crasbe crasbe commented Sep 22, 2025

Contribution description

For a project we want to access some registers of the nRF52840, that are not yet specified in the current vendor files.

Nordic changed some stuff, but it appears as if most of the registers are unchanged.
Included in that "changing stuff" is a bunch of renames that actually have an effect, which is why the nrf52840_name_change.h
file was added.

I changed the nrf52840.h header to not include the system_nrf52840.h file (commented that line out) and added the Name Change header.
The System header was not included previously either, so it shouldn't matter. Also, the System header provided by the nrfx repo was quite bare.

The nrfx version that these files come from is 3.14.0.

Testing procedure

All your favorite nRF52840 applications should still work.

Issues/PRs references

None.

@crasbe crasbe added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Sep 22, 2025
@github-actions github-actions bot added Platform: ARM Platform: This PR/issue effects ARM-based platforms Area: cpu Area: CPU/MCU ports labels Sep 22, 2025
@riot-ci
Copy link
Copy Markdown

riot-ci commented Sep 22, 2025

Murdock results

✔️ PASSED

5b3e608 cpu/nrf52: update nRF52* vendor header files

Success Failures Total Runtime
10516 0 10516 13m:32s

Artifacts

@crasbe crasbe removed the State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet label Sep 23, 2025
@crasbe crasbe marked this pull request as ready for review September 23, 2025 15:05
@crasbe crasbe requested a review from aabadie as a code owner September 23, 2025 15:05
@crasbe crasbe requested a review from benpicco September 23, 2025 15:05
@mguetschow
Copy link
Copy Markdown
Contributor

Thanks, that has been on my backlog for quite some time :)

Would you mind updating the other nrf52 vendor files as well, while you are at it? Did you encounter any problems you had to fix manually?

@crasbe
Copy link
Copy Markdown
Contributor Author

crasbe commented Sep 26, 2025

Sure, can do. However I only have the nRF52832 and nRF52840 for actual hardware testing.

The only manual fixes were including the "name change" header and commenting out the "System" header, so it's a reasonable amount of work to do for the other microcontrollers too.

@crasbe
Copy link
Copy Markdown
Contributor Author

crasbe commented Sep 30, 2025

I would like to postpone updating the nRF51 and nRF53 vendor files until it is actually necessary 🤔

What's your opinion?

Edit: and nRF9160.

Copy link
Copy Markdown
Contributor

@mguetschow mguetschow left a comment

Choose a reason for hiding this comment

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

Thanks, just had a quick glance at the changes and they look sensible. Trusting CI that things still build with this.

You may squash, but please update the commit and PR name to reflect that all nrf52* vendor header files have been updated.

nrf51 and nrf53 are indeed out of scope I'd say.

@crasbe crasbe force-pushed the pr/update_nrf52840_vendor branch from a05ff62 to 9b22d33 Compare September 30, 2025 17:17
@crasbe crasbe changed the title cpu/nrf52: Update nRF52840 Vendor Header Files cpu/nrf52: Update nRF52* Vendor Header Files Sep 30, 2025
@crasbe
Copy link
Copy Markdown
Contributor Author

crasbe commented Sep 30, 2025

Thanks for approving :)

@crasbe crasbe enabled auto-merge September 30, 2025 17:20
@crasbe crasbe added this pull request to the merge queue Sep 30, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 1, 2025
Comment on lines +89 to +93
#if defined(NRF52832_XXAA)
#define BPROT_REGIONS_NUM 128
#elif defined(NRF52832_XXAB)
#define BPROT_REGIONS_NUM 64
#endif
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

NRF52832_XXAA is only defined when using nrfx. In RIOT, we use CPU_MODEL_NRF52832XXAA from the make-system.

@crasbe crasbe force-pushed the pr/update_nrf52840_vendor branch from 9b22d33 to 5b3e608 Compare October 1, 2025 09:09
@crasbe crasbe enabled auto-merge October 1, 2025 09:09
@crasbe
Copy link
Copy Markdown
Contributor Author

crasbe commented Oct 1, 2025

It would be nice if we could fetch and patch the vendor files from the Nordic repository in the future. But that's not a project I want to tackle right now 😅

@mguetschow
Copy link
Copy Markdown
Contributor

It would be nice if we could fetch and patch the vendor files from the Nordic repository in the future. But that's not a project I want to tackle right now 😅

Sounds like a pkg solution would be the way to go. Not sure why this was not done before?

@crasbe
Copy link
Copy Markdown
Contributor Author

crasbe commented Oct 1, 2025

It would be nice if we could fetch and patch the vendor files from the Nordic repository in the future. But that's not a project I want to tackle right now 😅

Sounds like a pkg solution would be the way to go. Not sure why this was not done before?

The full nrfx package is 230MB and RIOT currently does not have provisions to only download a certain folder of a package. So perhaps because of that?

Also Nordic repackaged their stuff a lot in the last years with SDKs being discontinued etc.

@crasbe crasbe added this pull request to the merge queue Oct 1, 2025
Merged via the queue into RIOT-OS:master with commit c7d44ca Oct 1, 2025
25 checks passed
@crasbe crasbe deleted the pr/update_nrf52840_vendor branch October 7, 2025 14:56
@benpicco benpicco added this to the Release 2025.10 milestone Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: cpu Area: CPU/MCU ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants