My software about external serial port crashes non-deterministically. The last crash was after 2 hours.
F2812. CCS3.3 Bios 5.41.00.06. CGTs 5.2.15.
I must use four serical port , F2812 only have two serial port(SCIA、SCIB), so I extend two port(one is RS232, other is RS422) by using NXP SC16C554. I meet FXN_F_selfLoop() crash non-deterministically when I use RS232 and RS422 at the same time. If I only use RS232 or RS422, no FXN_F_selfLoop() happen.
User Aarti posted some good debugging tips for the FXN_F_selfLoop here:
With regards to Aarti's suggestions:
1) -c is used and not –cr
2) It doesn't seem to be a task stack overflow because the stack peak is never larger than the stack size for each TSK listed in the CCS IDE (TSK part of KOV).
3) The unplugged interrupts is interesting. All of the ISRs have been properly enabled/disabled in the IER or the PIEIER.
When FXN_F_selfLoop() crash,
IER 2000
4) This shouldn't be applicable. PIEs are enabled but none of the interrupts are using the dispatcher (dispatcher option isn't checked in HWI settings). Also, the system isn't using the NMI.
The error phenomenon is the same although the time is not deterministical(sometimes 20min, sometimes 41min, sometimes 2 hour), Here's some more details when FXN_F_selfLoop() crash:
3F8C1B IDL_F_busy:
3F8C1B 7608 PUSH ST1
3F8C1C 3B30 SETC INTM,DBGM
3F8C1D 767F89E5 LCR CLK_F_getshtime
3F8C1F 7600 POP ST1
3F8C20 8D0080BE MOVL XAR0,#0x0080BE
3F8C22 8AC0 MOVL XAR4,*+XAR0[0]
3F8C23 FF54 NEG ACC
3F8C24 767F8BBE LCR _STS_delta
3F8C26 0006 LRETR
3F8C27 IDL_F_init:
3F8C27 8D008024 MOVL XAR0,#0x008024
3F8C29 C5C0 MOVL XAR7,*+XAR0[0]
3F8C2A 3E67 LCR *XAR7
3F8C2B 8D0080BE MOVL XAR0,#0x0080BE
3F8C2D 8AC0 MOVL XAR4,*+XAR0[0]
3F8C2E 70A9 XOR AL,@AL
3F8C2F 71A8 XOR AH,@AH
3F8C30 767F8BD3 LCR _STS_set
3F8C32 767F8BD6 LCR _STS_reset
3F8C34 0006 LRETR
3F8C35 KNL_post:
3F8C35 B2BD MOVL *SP++,XAR1
3F8C36 761F0201 MOVW DP,#0x0201
3F8C38 8BA4 MOVL XAR1,@XAR4
3F8C39 9204 MOV AL,@4
3F8C3A 630C SB 12,GEQ
3F8C3B 9202 MOV AL,@2
3F8C3C 5201 CMPB AL,#1
3F8C3D 6609 SB 9,HI
3F8C3E 767F8AE8 LCR KNL_enter
3F8C40 C5F1 MOVL XAR7,*+XAR1[6]
3F8C41 8AA1 MOVL XAR4,@XAR1
3F8C42 3E67 LCR *XAR7
3F8C43 767F8ADC LCR KNL_exit
3F8C45 6F04 SB 4,UNC
3F8C46 8AA1 MOVL XAR4,@XAR1
3F8C47 767F8B7B LCR KNL_ipost
3F8C49 8BBE MOVL XAR1,*--SP
3F8C4A 0006 LRETR
3F8C4B RTA_F_andn:
3F8C4B FF5E NOT AL
3F8C4C 7608 PUSH ST1
3F8C4D 3B30 SETC INTM,DBGM
3F8C4E CEC4 AND AL,*+XAR4[0]
3F8C4F 96C4 MOV *+XAR4[0],AL
3F8C50 7600 POP ST1
3F8C51 0006 LRETR
3F8C52 RTA_F_or:
3F8C52 7608 PUSH ST1
3F8C53 3B30 SETC INTM,DBGM
3F8C54 CAC4 OR AL,*+XAR4[0]
3F8C55 96C4 MOV *+XAR4[0],AL
3F8C56 7600 POP ST1
3F8C57 0006 LRETR
3F8C58 iRTA_F_or:
3F8C58 92A5 MOV AL,@AR5
3F8C59 7608 PUSH ST1
3F8C5A 3B30 SETC INTM,DBGM
3F8C5B CAC4 OR AL,*+XAR4[0]
3F8C5C 96C4 MOV *+XAR4[0],AL
3F8C5D 7600 POP ST1
3F8C5E 0006 LRETR
3F8C5F FXN_F_nop:
3F8C5F 0006 LRETR
3F8C60 FXN_F_run:
3F8C60 C580 MOVL XAR7,*XAR0++
3F8C61 06A7 MOVL ACC,@XAR7
3F8C62 ED02 SBF 2,NEQ
3F8C63 0006 LRETR
3F8C64 FE02 ADDB SP,#2
3F8C65 3A42 MOVL *-SP[2],XAR0
3F8C66 93AD MOV AH,@SP
3F8C67 761B ASP
3F8C68 1EBD MOVL *SP++,ACC
3F8C69 3E67 LCR *XAR7
3F8C6A 2AAD POP @SP
3F8C6B 8E42 MOVL XAR0,*-SP[2]
3F8C6C FE82 SUBB SP,#2
3F8C6D 6FF3 SB FXN_F_run,UNC
3F8C6E FXN_F_zero:
3F8C6E 9A00 MOVB AL,#0
3F8C6F 0006 LRETR
3F8C70 FXN_F_selfLoop:
3F8C70 6F00 SB FXN_F_selfLoop,UNC
3F8C71 UTL_doAbort, SYS_ABORTFXN:
What kind of problem can cause this?
Please help me ASAP. The question bother me for a long time.