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

Support for Errata 249 on revision 3 nrf52840 chips #325

Open
jeffc opened this issue Apr 7, 2024 · 0 comments
Open

Support for Errata 249 on revision 3 nrf52840 chips #325

jeffc opened this issue Apr 7, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@jeffc
Copy link

jeffc commented Apr 7, 2024

Is your feature request related to a problem? Please describe.

Revision 3 of the nrf52 line (revision 2 for the 52833, 52811, and 52805) are subject to errata 249, which changes the behavior of the debug port. This makes it impossible to use a SWD or JTAG debugger on these boards, even if the UICR->APPROTECT register is set properly (to 0x5A, where older boards required 0xFF), without a change in the firmware or bootloader to also set APPROTECT->DISABLE.

This affects at least the nrf52840 dongles (pca10059) being sold right now, and will likely affect more and more boards as the revision 3 chips become more widespread.

Describe the solution you'd like

The lastest version of the nrf5 SDK, v17.1.0, includes system_nrf52_approtect.h and a relevant entry in the nrf52_erratas.h. Even though this bootloader is based on the older SDK11, this function seems pretty self-contained and straightforward to backport.

It would also be great to add a Makefile flag that caused the generated .hex file to automatically set the UICR register appropriately if the bootloader is flashed via debug after a full-flash erase (the only time the UICR register can be set), but that is more of a wishlist/quality-of-life feature that might be difficult to implement in any sort of intuitive way.

Describe alternatives you've considered

It would be possible to just tell users to include the errata information in their application and not make the bootloader responsible for setting the APPROTECT->DISABLE register. This would mean that the bootloader can never be debugged on newer chips, though, even if the userspace application can (though it might be possible for an application to set the register and then soft-reset into the bootloader without clearing it; I'm not positive if that works).

Additional context

This request stems from a thread I started in the nordic devzone here

@jeffc jeffc added the enhancement New feature or request label Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant