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

Application with SoftDevice have to put at address 0x14000?

I put the boot loader at 0x3a800 and the application at 0x27400. the region from 0x14000 to 0x27400 is all blank (0xff). also

nrfjprog --memwr 0x10001014 --val 0x0003a800

The boot loader only does one thing, jump to the application at 0x27400 using sd_softdevice_forward_to_application();

I found the application at 0x27400 works but didn't do advertising, but if move the application to 0x14000, then it does advertising and everything works fine.

I am wondering do we have to put the application at 0x14000 if using SoftDevice? or SoftDeviice won't pass the interrupt to App. Or Did I miss some thing to enable SoftDevice pass interrupts to the application at 0x274000?

thanks,

  • The application must be put at the address specified in the CLENR0 register, that is, directly after the SoftDevice.

  • Thanks, but how can we set the register CLENR0 to other address, like 0x27400? looks UICR (from 0x10001000) page is written and erasing protected. I tried to change the value in CLENR0 (0x10001000), but even can't erase the page. We have to run two application with one boot loader to choose which one need work. Thanks,

  • As Asbjørn says, the application has to be located at 0x14000 when using the S110. I would not recommend you to ever erase UICR while in the field, since this may leave the device permanently unusable if power is lost at a bad time.

    However, this reply contains a little information that may be helpful for implementing a scenario similar to the one you request.

    Edit: Sorry, didn't notice that you were the one asking the other question. However, there isn't really any magic way to achieve exactly what you want. When the S110 is programmed it will set CLENR0 to 0x14000, and to change that you have to first erase UICR. As I mention above, this is dangerous to do in the field, since a power loss right after having erased it will brick your device.

    Edit 2: Another option could be to put your bootloader at 0x14000, and make it forward the interrupts manually to whatever application is running. This would increase the interrupt latency a little, but would avoid any flash write or erases while running. This bootloader implements this scheme, so it might be useful as inspiration.

  • Hi Ole,

    Thank you for the suggestions! Actually we used to put out bootloader at 0x14000, but failed to forward interrupts from SoftDevice to Apps. I am pretty interested in your "Edit 2". Could you give me an example how to manually interrupts to the application is running? This probably better solution. if we have to change UICR, could you please give me an example how to erase the page?

    thanks,

    zj

  • Hi Ole,

    Thank you for the suggestions! Actually we used to put out bootloader at 0x14000, but failed to forward interrupts from SoftDevice to Apps. I am pretty interested in your "Edit 2". Could you give me an example how to manually interrupts to the application is running? This probably better solution. if we have to change UICR, could you please give me an example how to erase the page?

    thanks,

    zj

Related