This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP432E401Y: ti_sysbios_family_arm_m3_Hwi_excHandlerAsm__I, RTOS Object View and the watchdog

Part Number: MSP432E401Y
Other Parts Discussed in Thread: SYSBIOS

Hello forum,

my application ends in an endless loop inside the exception handler (Hwi_asm.sv7M). The Watchdog is enabled, but does not restart the application. When WDT_VALUE reaches zero this register is reloaded with the value stored in the WDT_LOAD register. Here is the code of the exeption handler:

ti_sysbios_family_arm_m3_Hwi_excHandlerAsm__I:
        .asmfunc
        tst     lr, #4          ; context on PSP?
        ite     NE
        mrsne   r0, psp         ; if yes, then use PSP
        moveq   r0, sp          ; else use MSP

        mov     sp, r0          ; use this stack
        stmfd   sp!, {r4-r11}   ; save r4-r11 while we're at it
        mov     r0, sp          ; pass sp to exception handler
        mov     r1, lr          ; pass lr too
        mov     r4, lr          ; preserve LR in r4

        ldr     r2, excHandlerAddr
        blx     r2

        mov     r0, sp          ; for ROV
        mov     r1, r4          ; for ROV
$1
        b       $1              ; spin here indefinitely

My questions:

How can I find out, which exception has happened?

Can the RTOS Object View tell me that?

Why doesn't the Watchdog cause a restart?

The loop in the disassembly:

309               tst     lr, #4          ; context on PSP?
          ti_sysbios_family_arm_m3_Hwi_excHandlerAsm__I():
0005ad50:   F01E0F04            tst.w      r14, #4
310               ite     NE
0005ad54:   BF14                ite        ne
311               mrsne   r0, psp         ; if yes, then use PSP
0005ad56:   F3EF8009            mrsne      r0, psp
312               moveq   r0, sp          ; else use MSP
0005ad5a:   4668                moveq      r0, r13
314               mov     sp, r0          ; use this stack
0005ad5c:   4685                mov        r13, r0
315               stmfd   sp!, {r4-r11}   ; save r4-r11 while we're at it
0005ad5e:   E92D0FF0            push.w     {r4, r5, r6, r7, r8, r9, r10, r11}
316               mov     r0, sp          ; pass sp to exception handler
0005ad62:   4668                mov        r0, r13
317               mov     r1, lr          ; pass lr too
0005ad64:   4671                mov        r1, r14
318               mov     r4, lr          ; preserve LR in r4
0005ad66:   4674                mov        r4, r14
320               ldr     r2, excHandlerAddr
0005ad68:   4A02                ldr        r2, [pc, #8]
321               blx     r2
0005ad6a:   4790                blx        r2
323               mov     r0, sp          ; for ROV
0005ad6c:   4668                mov        r0, r13
324               mov     r1, r4          ; for ROV
0005ad6e:   4621                mov        r1, r4
326               b       $1              ; spin here indefinitely
          $1_$6:
0005ad70:   E7FE                b          $1_$6

The content of the stackpointer is 0x20000B48, here is the region (0x20000B18 to 0x20000BA8) of the memory browser:

BEBEBEBE    BEBEBEBE    BEBEBEBE    BEBEBEBE    BEBEBEBE    BEBEBEBE    BEBEBEBE    BEBEBEBE    BEBEBEBE    BEBEBEBE    FFFFFFFD    0005AD6D
FFFFFFFF    FFFFFFFF    FFFFFFFF    FFFFFFFF    FFFFFFFF    FFFFFFFF    FFFFFFFF    FFFFFFFF    00000000    00000000    0000EB49    00000002
2002FFF0    00045D51    0000EB4E    41000000    FFFFFFFF    FFFFFFFF    FFFFFFFF    FFFFFFFF    FFFFFFFF    FFFFFFFF    FFFFFFFF    FFFFFFFF
FFFFFFFF

The content of 0x20000B48 (italic and bold) is 0xFFFFFFFF.

But the value at the address 0x20000B40 (italic) is 0xFFFFFFFD, the content of register R4.

And the content at address 0x20000B44 (bold) is 0x0005AD6D.

The content of LR is also 0x0005AD6D.

Can anybody halp me?

I will have a closer look in the assembly code to find out more.

Thanks in advance.

BR Guenther

  • Hello Guenther,

    Unfortunately, it seems your question is beyond the scope of support that TI can provide at this time. Community members in this forum maybe able to give you further insight on how to debug this.