This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Access to UICR

I want to use the CUSTOMER[] fields for their apparent intended purpose of storing calibration data in nonvolatile memory. I find it quite absurd that the softdevice would be written to preclude access. I have found reference to two different sets of enable / disable functions for the softdevice - but neither seem to be supported at all. My application can accept that the radio will not be working while I write the UICR registers - but how do I accomplish that?

FWIW, some readable example code to access each of the various peripherals, with the softdevice present, would be extremely helpful.

Parents Reply
  • Okay, that's the best tip I've had so far. Too bad the documentation doesn't mention what header file is needed for each function.

    Now I need to figure out what to pass to the enable function. It appears I can get away with a null for the first parameter. I just want to temporarily disable and re-enable the softdevice, obviously, for this use. But what's the standard error function I should be passing as the second parameter?

Children
  • Hi,

     

    SteveHx said:
    It appears I can get away with a null for the first parameter.

     The first parameter is the LFCLOCK source information, I suppose you mean the second one? I suggest you use the same call or function to enable it, as when it was enabled before you disable it. It should be something like sd_softdevice_enable(&clock_lf_cfg, app_error_fault_handler);

     

    Best regards,

    Andreas

Related