pynrfjprog: FICR and UICR register offsets

As far as I can tell, it is not currently possible to implement the following functionality in a simple way with pynrfjprog across the various device families.

* What is the connected device hardware ID?
* What is the memory address of the UICR CUSTOMER/OTP region?

With the upcoming deprecation of the HighLevel API (https://github.com/NordicSemiconductor/pynrfjprog/blob/master/pynrfjprog/HighLevel.py#L4), the functionality goes backwards in some respects, mostly due to the removal of `get_device_info`, which contained the base offsets of the FICR and UICR regions.

To answer these two simple questions I now need to iterate through the `read_memory_descriptors()` array to find the base addresses, and then create my own device_family->register_offset mapping, populated by reading through a number of datasheets.

Have I missed some simple method to answer these questions?

Parents Reply
  • For pynrfjprog, I think you just need to do something like this as of now:

    pseudo code snippet:

    FICR_ADDR_DEVICEID = {"NRF91": 0xFF0204, "NRF53": 0xFF0204, "NRF52": 0x10000060}
    
    def read_ficr(self, snr):
        with LowLevel.API() as api:
            api.connect_to_emu_with_snr(snr)
            device_family = api.read_device_family()
            device_id_addr = FICR_ADDR_DEVICEID[device_family]
            device_id = api.read(device_id_addr, 4)

    For nrfutil we can look into adding a built-in function for this.

Children
Related