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
    

Reply Children
  • Thanks for replying again.

    I upgraded the nrfjprog, then it works. But the provision programming was still failed.

    % nrfjprog -v
    nrfjprog version: 10.24.2 external
    JLinkARM.dll version: 7.94e
    % nrfjprog --recover
    Recovering device. This operation might take 30s.
    Erasing user code and UICR flash areas.
    % nrfjprog --memwr 0x00FFD080 --val 0x00000003
    Parsing parameters.
    Writing.
    % nrfjprog --program '/Users/sealinzhang/Downloads/provision_02J5_316-63-627.hex' --chiperase --verify -r --log
    [error] [ Client] - Encountered error -173: Command erase_file executed for 3101 milliseconds with result -173
    [error] [ Worker] - Address range [0x10001080 - 0x10001087] does not map to a known memory.
    ERROR: The file specified is not a valid hex file, has data outside valid areas
    ERROR: or does not have data in valid areas.

    The reason for the error should be that this provision.hex does not match NRF54l15.

    I will get the new one.

    Thank you!

Related