Hi,
I have run the same sequence again, reading out more information (note this code is part of SysTick so has run millions of times before failing. This leads me to conclude the compiler output must be correct...)
J-Link>s
6001C9BA: 00 28 CMP R0, #0
J-Link>s
6001C9BC: 6B D1 BNE #+0xD6
J-Link>regs
PC = 6001C9BE, CycleCnt = F798A73B
R0 = 00000000, R1 = 6004A51C, R2 = 00000000, R3 = 00000000
R4 = 00000000, R5 = 00000000, R6 = 4039C000, R7 = 00000001
R8 = 00000008, R9 = 09090909, R10= 10101010, R11= 11111111
R12= 33EC8413
SP(R13)= 2000FFC0, MSP= 2000FFC0, PSP= 20206710, R14(LR) = 6002154B
XPSR = 6100000F: APSR = nZCvq, EPSR = 01000000, IPSR = 00F (INTISR0)
CFBP = 00002000, CONTROL = 00, FAULTMASK = 00, BASEPRI = 20, PRIMASK = 00
FPS0 = 00000000, FPS1 = 00000000, FPS2 = 00000000, FPS3 = 00000000
FPS4 = 00000000, FPS5 = 00000000, FPS6 = 00000000, FPS7 = 00000000
FPS8 = 00000000, FPS9 = 00000000, FPS10= 00000000, FPS11= 00000000
FPS12= 00000000, FPS13= 00000000, FPS14= 00000000, FPS15= FFFFFFFF
FPS16= 00000000, FPS17= 00000000, FPS18= 00000000, FPS19= 00000000
FPS20= 00000000, FPS21= 00000000, FPS22= 00000000, FPS23= 00000000
FPS24= 00000000, FPS25= 00000000, FPS26= 00000000, FPS27= 00000000
FPS28= 00000000, FPS29= 00000000, FPS30= 00000000, FPS31= FFFFFFFF
FPSCR= 02000000
J-Link>mem8 6001cd68 16
6001CD68 = 10 BD 00 00 30 C3 00 20 10 B5 04 00 00 2C 07 D1
6001CD78 = 20 20 80 F3 11 88
J-Link>s
6001C9BE: DF F8 AC 03 LDR R0, [PC, #+0x3AC]
****** Error: Communication timed out: Requested 4 bytes, received -2 bytes !
J-Link>
So, the LDR instruction is (if I understand it correctly), loading R0 with the contents of memory location 0x6001c9be + 0x3ac == 0x6001cd6a.
According to the mem8 command, that should be 0xc3300000 although I fully imagine the pipeline delay means the value it should read is 0x2000c330.
That is pretty innocuous, it shouldn't cause an issue.
kerryzhou - I can't reproduce the issue on an EVK. It takes 37 minutes of run time with FreeRTOS operating an RF stack and the TCP/IP stack before it gets into this state. If I removed enough code for it to operate on an EVK, it would not fail.
I believe something has gone wrong in the MPU somewhere that is causing the core to lock up, but it is hard to tell what it is...!
Thanks,
Chris.