Other Parts Discussed in Thread: TM4C129ENCPDT
Hi all!
I am working on a project based on the uDMA ping-pong example of the Tivaware library, where the Data is then sent via TCP to a remote server [Compilled using gnu linaro v9.2.1 on the EK-TM4C129EXL]. Currently, I face a faultISR() after a couple of thousands of execution of the main loop (the server receives about 10k packets before the faultISR()).
I read the `Diagnosing Software Faults in Stellaris® Microcontrollers` (spma043.pdf) and checked the NVIC_FAULT_STAT where (NVIC_FAULT_STAT_IMPRE=1 and other bits to 0). Checking the value of the stack pointer at MSP=0x200022324, the xPSR=0x0000CFCF points to this section of the disassembly of my code:
sys_now(): 0000cf80: B480 push {r7} 0000cf82: AF00 add r7, r13, #0 69 return(g_ui32LocalTimer); 0000cf84: 4B03 ldr r3, [pc, #0xc] 0000cf86: 681B ldr r3, [r3] 70 } 0000cf88: 4618 mov r0, r3 0000cf8a: 46BD mov r13, r7 0000cf8c: F85D7B04 ldr r7, [r13], #4 0000cf90: 4770 bx r14 0000cf92: BF00 nop 0000cf94: 9E10 ldr r6, [r13, #0x40] 0000cf96: 2000 movs r0, #0 83 { sys_arch_protect(): 0000cf98: B580 push {r7, r14} 0000cf9a: AF00 add r7, r13, #0 84 return((sys_prot_t)MAP_IntMasterDisable()); 0000cf9c: 4B03 ldr r3, [pc, #0xc] 0000cf9e: 681B ldr r3, [r3] 0000cfa0: 3308 adds r3, #8 0000cfa2: 681B ldr r3, [r3] 0000cfa4: 4798 blx r3 0000cfa6: 4603 mov r3, r0 85 } 0000cfa8: 4618 mov r0, r3 0000cfaa: BD80 pop {r7, pc} 0000cfac: 0048 lsls r0, r1, #1 0000cfae: 0100 lsls r0, r0, #4 98 { sys_arch_unprotect(): 0000cfb0: B580 push {r7, r14} 0000cfb2: B082 sub r13, #8 0000cfb4: AF00 add r7, r13, #0 0000cfb6: 4603 mov r3, r0 0000cfb8: 71FB strb r3, [r7, #7] 101 if(!(lev & 1)) { 0000cfba: 79FB ldrb r3, [r7, #7] 0000cfbc: F0030301 and r3, r3, #1 0000cfc0: 2B00 cmp r3, #0 0000cfc2: D104 bne #0xcfce 102 MAP_IntMasterEnable(); 0000cfc4: 4B04 ldr r3, [pc, #0x10] 0000cfc6: 681B ldr r3, [r3] 0000cfc8: 3304 adds r3, #4 0000cfca: 681B ldr r3, [r3] 0000cfcc: 4798 blx r3 104 } 0000cfce: BF00 nop // <--------HERE 0000cfd0: 3708 adds r7, #8 0000cfd2: 46BD mov r13, r7 0000cfd4: BD80 pop {r7, pc} 0000cfd6: BF00 nop 0000cfd8: 0048 lsls r0, r1, #1 0000cfda: 0100 lsls r0, r0, #4 240 { InitDMADescriptors(): 0000cfdc: B580 push {r7, r14} 0000cfde: B082 sub r13, #8 0000cfe0: AF00 add r7, r13, #0 244 for(ui32Loop = 0; ui32Loop < NUM_TX_DESCRIPTORS; ui32Loop++) 0000cfe2: 2300 movs r3, #0 0000cfe4: 607B str r3, [r7, #4] 0000cfe6: E03F b #0xd068 246 g_pTxDescriptors[ui32Loop].pBuf = (struct pbuf *)0; 0000cfe8: 4977 ldr r1, [pc, #0x1dc] 0000cfea: 687A ldr r2, [r7, #4] 0000cfec: 4613 mov r3, r2 0000cfee: 00DB lsls r3, r3, #3 0000cff0: 4413 add r3, r2 0000cff2: 009B lsls r3, r3, #2 0000cff4: 440B add r3, r1 0000cff6: 3320 adds r3, #0x20 0000cff8: 2200 movs r2, #0 0000cffa: 601A str r2, [r3] 247 g_pTxDescriptors[ui32Loop].Desc.ui32Count = 0; 0000cffc: 4972 ldr r1, [pc, #0x1c8] 0000cffe: 687A ldr r2, [r7, #4] 0000d000: 4613 mov r3, r2 0000d002: 00DB lsls r3, r3, #3 0000d004: 4413 add r3, r2 0000d006: 009B lsls r3, r3, #2 0000d008: 440B add r3, r1 0000d00a: 3304 adds r3, #4 0000d00c: 2200 movs r2, #0 0000d00e: 601A str r2, [r3] 248 g_pTxDescriptors[ui32Loop].Desc.pvBuffer1 = 0;
But I am out of luck when it comes to identifying the issue in the assembly.
If anyone can give me some input about how to find the cause of the fault ISRR, I would greatly appreciate it.
Thanks,
Pierrick.