Programming provision.hex of HomeKit on NRF54L15

On NRF52840,  programming provision.hex with the command as follow:

%nrfjprog -f nrf52 --sectorerase --program  provision.hex --reset --verify

On NRF54l15, the nrfutil should be used. I tried with nrfutil, but it failed:

 % nrfutil device erase
Heavy check mark Erased 150710859


% nrfutil device program --firmware merged.hex --options chip_erase_mode=ERASE_NONE
[00:00:04] ###### 100% [1/1 150710859] Programmed


% nrfutil device program --firmware provision.hex --options chip_erase_mode=ERASE_NONE
[00:00:00] ####-- 50% [1/1 150710859] Failed, [Probe] Device error: Missing programmer for memory=xip in Application
Error: One or more program tasks failed:
* 150710859: [Probe] Device error: Missing programmer for memory=xip in Application (Generic)

 

What should I do?

Thanks in advance!

Parents
  • Hi, 

    Which NCS version are you using?

    How do you get/generate the provision.hex? 

    Are you programming the provision.hex to external memory for nRF54L?

    Regards,
    Amanda H.

  • Hi,

    Thanks for replying.

    I'm using NCS V2.9.0.

    The provision.hex is got from Apple Server. It includes Setup Code and an initial token.

    Homekit uses the follow code to get the data :

    err = settings_subsys_init();
    ..
    // Register event handler with FDS.
    err = settings_register(&HAPPlatform_settings);
    ...
    err = settings_load();
    So, should I program it to the settings_storage ?

    The settings_storage is set in pm_static.yml as follow:

    settings_storage:
    address: 0x179000
    region: flash_primary
    size: 0x4000
    BR.
  • Is this any help? IAR v9.40 doesn't program the nrf54L15, so I use this sequence:

    // nrf54L15 UICR Arm Cortex-M33
    // ============================
    // To program a hex file:
    // In .\nRF5_SDK_17.1.0_ddde560\examples\peripheral\blinky\pca10156\blank\iar\_build
    //  nrfjprog -v
    //    nrfjprog version: 10.24.2 external
    //    JLinkARM.dll version: 7.94e
    //  nrfjprog --recover
    //  nrfjprog --memwr 0x00FFD080 --val 0x00000003
    //  nrfjprog --program blinky_pca10156.hex --chiperase --verify -r --log
    

  • Thanks for replying. I tried the sequence. 

    % nrfjprog --recover
    Recovering device. This operation might take 30s.
    Erasing user code and UICR flash areas.
    % nrfjprog --memwr 0x00FFD080 --val 0x00000003
    [error] [ Client] - Encountered error -90: Command read_memory_descriptors executed for 12 milliseconds with result -90
    [error] [ Worker] - Can't read memory descriptors, ap-protection is enabled.
    ERROR: The operation attempted is unavailable due to readback protection in
    ERROR: your device. Please use --recover to unlock the device.
    NOTE: For additional output, try running again with logging enabled (--log).
    NOTE: Any generated log error messages will be displayed.

    Maybe I should use nrfutil. nrfutil is the programming solution for nRF54l15.  nrfjprog is no longer used for programming on it. 

    But I didn't find the similar command of nrfutil as  "nrfjprog --memwr".

    BR.

  • Works for me; the nrfjprog version matters, needs a newer version see current version with "nrfjprog -v":

    nrfjprog -v
       nrfjprog version: 10.24.2 external
       jLinkARM.dll version: 7.94e
    

  • Please try to update the nRF Command line tool to the latest version and use the Programmer app in nRF Connect for Desktop  

  • Thanks for your help.

    I upgraded the nrfjprog, then it works when I use "nrfjprog --memwr".

    But the provision.hex I get from Apple Server is not matched with NRF54l15.

    I got it before for the NRF52840 with follow configuration:

    "NRF52840": {
    "family": "NRF52",
    "flash_size": "0x100000",
    "settings_base": "0xfe000",
    "settings_size": "0x2000",
    "device_id_reg": "0x10000060",
    "uicr_eui_reg": "0x10001080"
    }
    0x10001080 is the CUSTOMER[0] of NRF52840's UICR. 
    But thers is no CUSTOMER[] in NRF54l15's UICR.
    What should I set the uicr_eui_reg for NRF54l15?
    "NRF54L15": {
    "family": "NRF54L",
    "flash_size": "0x17d000",
    "settings_base": "0x179000",
    "settings_size": "0x4000",
    "device_id_reg": "0x00FFC304",
    "uicr_eui_reg": "?"
    }
    BR.

Reply
  • Thanks for your help.

    I upgraded the nrfjprog, then it works when I use "nrfjprog --memwr".

    But the provision.hex I get from Apple Server is not matched with NRF54l15.

    I got it before for the NRF52840 with follow configuration:

    "NRF52840": {
    "family": "NRF52",
    "flash_size": "0x100000",
    "settings_base": "0xfe000",
    "settings_size": "0x2000",
    "device_id_reg": "0x10000060",
    "uicr_eui_reg": "0x10001080"
    }
    0x10001080 is the CUSTOMER[0] of NRF52840's UICR. 
    But thers is no CUSTOMER[] in NRF54l15's UICR.
    What should I set the uicr_eui_reg for NRF54l15?
    "NRF54L15": {
    "family": "NRF54L",
    "flash_size": "0x17d000",
    "settings_base": "0x179000",
    "settings_size": "0x4000",
    "device_id_reg": "0x00FFC304",
    "uicr_eui_reg": "?"
    }
    BR.

Children
Related