Skip to content

Cannot unlock nrf52833 MCU #217

@KWolfe81

Description

@KWolfe81

New nrf52833 rev B MCUs feature enhanced flash protections. I cannot connect to these devices, getting the following error when I attempt to use jlink.connect(...)

Traceback (most recent call last):
File "C:\Code\workspace\v2\test\mfg\test_controller.py", line 5, in
import rtt as lib
File "C:\Code\workspace\v2\test\mfg\rtt.py", line 717, in
program_firmware('C:\Code\workspace\v2\controller\build\zephyr\merged.hex')
File "C:\Code\workspace\v2\test\mfg\rtt.py", line 40, in program_firmware
jlink.connect("NRF52833_xxAA", speed="auto", verbose=True)
File "C:\Python\Python312\Lib\site-packages\pylink\jlink.py", line 142, in wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python\Python312\Lib\site-packages\pylink\jlink.py", line 1138, in connect
raise errors.JLinkException(result)
pylink.errors.JLinkException: Unspecified error.

If I connect using JLink.exe, I am prompted to run a flash recovery on the device, which works fine. After that, I can connect using pylink fine up until I perform a flash erase.

Note: the nordic pynrfjprog library features a 'recover()' function which performs the same recovery as above (https://github.com/NordicSemiconductor/pynrfjprog/blob/master/pynrfjprog/HighLevel.py)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions