bootloader doesnt start application

there is some weird behavior on my XIAO nrf52840. Im developing omn skd 15.3 am using a secure bootloader.

all of my dfu OTA processes work well but I noticed that some of my chips wont start the application from the bootloader. to be precise I can debug the bootloader up to this pont: 

ASSERT((dst_addr % CODE_PAGE_SIZE) == 0);

in the nrf_bootloader_fw_activation.c file (line 81)

after this line the bootloader goes back to its start. this doesnt happen on every chip though so I dont know whats happening at all.

The flash readings of a chip that works and one that doesnt are identical for my firmware.
Parents Reply Children
  • Depending upon the nature of the code, and other configurations & tools, there could be differences in the hex file output of different builds. However, I am assuming that you are flashing the same hex file (no rebuilding) to all of your boards, and also using the same procedure and platform (e.g. from the same PC and using the same method etc.).

    And then after flashing you have some good boards and some not working good.

    Good working boards have identical firmware when read-back

    Not working boards have some discrepancies when firmware read-back

    This would typically be the case that there are some issues with the boards, not with the software and tools, but with the hardware.

    Can you test your "not good" boards with other samples, starting from basic ones that does not include DFU and then see whether the firmware read-back is same or not.

  • yeah exactly its the same hex file, same pc, only difference in the DFU is android vs iOS, this might actually output a difference so I will try both and compare the hex files afterwards.

    so no general issues with the XIAO are known to you until now - I thought it might be that this board in particular has an issue.

    though it never had any issues after a normal flash just after at least one DFU process, something might be up there.

    now I at least need to consider to work with this assert, how would you go and use the line of code that I presented in the beginning to kickstart the application while ignoring this assert?

  • no differences after OTA with ios and android but for now both work also (as I said in the beginning it doesnt happen every time but rather in 10 percent of all cases)

  • can you send me:

    1) actual hex file that you programmed

    2) good firmware readback hex file

    3) not good firmware readback hex file

    to look more into it.

  • I will send this to you today.

    question is, is there a way to recover from such a situation? I cant seem to find the source of the problem so what I need to do is use the assert to jump into dfu-target mode or something. Do you have a recommendation for this?

Related