[nRF Connect SDK](Urgent)Assert after DFU via OTA

Target nRF52832(nrf52dk_nrf52832)
SDK NCS v1.9.1

Normally OTA works well.
I found unexpected assert after OTA is done.
Can you please review my assert code with my elf.


00> I: SoftDevice Controller build revision:
00> I: 0e e7 c5 66 67 18 3c ac |...fg.<.
00> I: b3 d2 cc 81 a3 dc f1 c0 |........
00> I: c0 36 02 22 |.6."
00> I: No ID address. App must call settings_load()
00> E: ***** MPU FAULT *****
00> E: Stacking error (context area might be not valid)
00> E: Data Access Violation
00> E: MMFAR Address: 0x20006190
00> E: r0/a1: 0x00000000 r1/a2: 0x000347f9 r2/a3: 0x00000000
00> E: r3/a4: 0x000347f9 r12/ip: 0xec7ff16f r14/lr: 0x29302810
00> E: xpsr: 0x38132000
00> E: Faulting instruction address (r15/pc): 0xf2e63a6d
00> E: >>> ZEPHYR FATAL ERROR 2: Stack overflow on CPU 0
00> E: Current thread: 0x20002350 (unknown)
00> E: Resetting system

6165.build.7z

Parents
  • It seems like a stack overflow happens. Could you set CONFIG_THREAD_NAME=y, so we can see what thread that caused the overflow. As you can see now the thread is unknown:

    00> E: Current thread: 0x20002350 (unknown)

    Then rebuild, trigger the fault again and upload the new log. Then I will tell you how to increase the stack size of that thread.

    Also the uploaded .elf file is corrupted. Could you upload it again?

    Best regards,

    Simon

  • Thanks for updating.
    Please find attached.

    1) I found z_main_thread is located 0x20002350 

    zephyr.map
    .bss.z_main_thread
    0x20002350 0x80 zephyr/kernel/libkernel.a(init.c.obj)
    0x20002350 z_main_thread

    2) According to other case, I call boot_write_img_confirmed() every time. Is this normal?

    (+) [nRF Connect SDK]Sometimes DFU failed to update binary without confirm. - Nordic Q&A - Nordic DevZone - Nordic DevZone (nordicsemi.com)
    void main(void)
    {
    boot_write_img_confirmed();
    ...
    }

    3) CONFIG_THREAD_NAME=y
    I'll chage it then test it again.

    Once this situation happened, I have to flash via jtag again. it is real problem.
    We have no choice but to open product's cover and flash firmware via flash.



Reply
  • Thanks for updating.
    Please find attached.

    1) I found z_main_thread is located 0x20002350 

    zephyr.map
    .bss.z_main_thread
    0x20002350 0x80 zephyr/kernel/libkernel.a(init.c.obj)
    0x20002350 z_main_thread

    2) According to other case, I call boot_write_img_confirmed() every time. Is this normal?

    (+) [nRF Connect SDK]Sometimes DFU failed to update binary without confirm. - Nordic Q&A - Nordic DevZone - Nordic DevZone (nordicsemi.com)
    void main(void)
    {
    boot_write_img_confirmed();
    ...
    }

    3) CONFIG_THREAD_NAME=y
    I'll chage it then test it again.

    Once this situation happened, I have to flash via jtag again. it is real problem.
    We have no choice but to open product's cover and flash firmware via flash.



Children
Related