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

nrf52810 dfu can't work

Hi,


I have met problem when apply dfu of nrf52810.


I used dfu sample of 52810 from devzone link: https://devzone.nordicsemi.com/f/nordic-q-a/28471/about-ota-for-nrf52810-on-sdk-v14-1/112571#112571, but I changed sdk to 14.2

the app is modified from project of ble_app_buttonless_dfu,


the memory address set as below:


IROM1 start 0x18000, size 0x1000, IRAM1 start 0x200024F8,size 0x3B08.


the app package generate by command: nrfutil pkg generate --hw-version 52 --application-version 4 --application nrf52810_xxaa.hex --sd-req  0xA6  --key-file private.key dfu52810.zip


the dfu process never started, what is the issue? or can you share a project of dfu app which is well validated?


thanks!

Brian Qin.

Parents
  • Hi Brian,

    Can you check if you have enough ROM for all the components and layout is correct?

    Have you set the correct bootloader settings address (BOOTLOADER_SETTINGS_ADDRESS) and MBR params page address (NRF_MBR_PARAMS_PAGE_ADDRESS)? Note that there is not enough FLASH memory on nRF52810 to update SoftDevice and MBR region is not really needed.

    Kind regards,

    Pawel

  • Hi, Pawel:

    I check the BOOTLOADER_SETTINGS_ADDRESS and NRF_MBR_PARAMS_PAGE_ADDRESS are set right, 0x2F0000 and 0x2E0000,

    I tested pa100040_debug on my 52810 board, with a reduced size of  app, it can finish dfu process, the test procedure is as below:

    1. erase all of 52810

    2. burn softdevice  s112_nrf52810_5.1.0_softdevice.hex

    3. burn bootloader

    4. proceed dfu

    but if i test it again with only set NRF_LOG_ENABLED = 0 and compiled again, when I loaded app package and start dfu, the nRFconnect shown "Startin DFU.." "disconnecting" the connected again and stopped.

    I really dont known how to explain this.....

    this project is an updated form an old project which is designed with 51802 due to requirement of pwm feature, the develop time is realy short,  so I really need your help,  better to share me a workable project of 52810 dfu.

    Thanks!

    Brian Qin

Reply
  • Hi, Pawel:

    I check the BOOTLOADER_SETTINGS_ADDRESS and NRF_MBR_PARAMS_PAGE_ADDRESS are set right, 0x2F0000 and 0x2E0000,

    I tested pa100040_debug on my 52810 board, with a reduced size of  app, it can finish dfu process, the test procedure is as below:

    1. erase all of 52810

    2. burn softdevice  s112_nrf52810_5.1.0_softdevice.hex

    3. burn bootloader

    4. proceed dfu

    but if i test it again with only set NRF_LOG_ENABLED = 0 and compiled again, when I loaded app package and start dfu, the nRFconnect shown "Startin DFU.." "disconnecting" the connected again and stopped.

    I really dont known how to explain this.....

    this project is an updated form an old project which is designed with 51802 due to requirement of pwm feature, the develop time is realy short,  so I really need your help,  better to share me a workable project of 52810 dfu.

    Thanks!

    Brian Qin

Children
  • Hi Brian,

    Just to confirm. When you try to start DFU the second time you:
    - build the bootloader with the same configuration but NRF_LOG_ENABLED set to 0,
    - flash it using the same steps as mentioned above (i.e. erase, load SD, load BL)?

    In both cases you don't have any application flash on SoC when you start the DFU? You have not mention application flashing above.

    In both cases do you see device advertising (probably as DfuTarg)?

    Thanks,
    Pawel

  • Hi, Pawel:

    yes, I start dfu from DfuTarg, it is just burnt same SD and BL with same confirguration but NRF_LOG_ENALBED set to 0,

    also I test more with an app just has dfu service, it also can dfu with BL with NRF_LOG_ENABLED set to 1, but fail with set NRF_LOG_ENABLED set to 0,

    Thanks!

    Brian

  • Hi Brian,

    Let's set aside DFU service in application for now and focus on the simple bootloader only example as it should work regardless of logger settings.

    You say that you have two system configurations:

    - both without the application, with SD and BL only,
    - in both cases you flash them on clean SoC (memory is erased),
    - in both cases the device is advertising as DfuTarg and you can connect to it,
    - in both cases you use exactly the same DFU package.

    Could you confirm above?

    Now, if you set NRF_LOG_ENABLED to 0 the DFU is not working. This would be indeed strange and I cannot help you here. Below are just some hints.

    As Rune suggested above, can you check if there are any information provided by nRFConnect. If device has not crashed there should be information (more or less useful) about the cause of breaking the DFU process.

    Can you check if in your code there is any code that is compiled if NRF_LOG_ENABLED is set to 1 (apart from log messages)?

    Do you have the same behavior if you enabled log but do not connect any back-end? Which back-end are you using btw?

    Check what is the size of the BL in both cases. Maybe part of your bootloader is placed on a page erased during BL settings update.

    Thanks,
    Pawel

  • Hi Pawel:

    actually I just modified code related s112. and I modified setting of NRF_SDH_CLOCK_LF_SRC, for I dnt use external 32768 and I used p0.00, and p0.01 as normal gpio,

    I found if I run the BL(NRF_LOG_ENABLED = 0) at jlink debug mode, the dfu works fine, if run it at normal power on, Dfu always fail, I found the Dfutarg will take long time to be discovered or never to be discovered.

    however if I run the BL(NRF_LOG_ENALBED ==1), it works fine whenever normal power on or at jlink debug mode.

    are there some hints about this?

    Thanks

    Brian Qin

  • Hi Brian,

    Can you try adding a 1ms delay before calling nrf_bootloader_init?

    Thanks,
    Pawel

Related