"chVTResetI(), #1" panic from i2c_lld_master_timeout
Posted: Sat May 26, 2012 3:57 pm
I have an STM32L-Discovery board that I'm prototyping an application on. I have USART1 and USART3 active, and I2C1 with an MMA8452Q accelerometer on the I2C bus. I have a thread running that at present polls the accelerometer at about 100Hz, and that can run for quite a long time with no issues.
If while all this is running, I either invoke the test suite from the shell process running on USART1, or I press the "user" button (the main application is derived from the demo), then I get a repeatable panic just after the "I/O Queues throughput" benchmark apparently starts (that's the last message printed).
gdb reveals:
Is the test suite supposed to be non-invasive? Looking at that test, it doesn't look like it ought to impact my i2c activity other than, perhaps, slowing it down?
Any thoughts on how to proceed would be appreciated. While ultimately I won't have the benchmark test in my application, I want to make sure this isn't a sign of some other issue that will cause me problems. Thanks in advance for any suggestions!
I'm running the 2.4.x stable branch head, fairly close to the 2.4.1 release when I diffed it a few days ago.
If while all this is running, I either invoke the test suite from the shell process running on USART1, or I press the "user" button (the main application is derived from the demo), then I get a repeatable panic just after the "I/O Queues throughput" benchmark apparently starts (that's the last message printed).
gdb reveals:
Code: Select all
(gdb) bt
#0 port_halt () at ../../chibios/stable_2.4.x/os/ports/GCC/ARMCMx/chcore.c:48
#1 0x08000d36 in chDbgPanic (msg=0x8012300 "chVTResetI(), #1")
at ../../chibios/stable_2.4.x/os/kernel/src/chdebug.c:274
#2 0x08000e70 in chVTResetI (vtp=0x200027b4) at ../../chibios/stable_2.4.x/os/kernel/src/chvt.c:111
#3 0x0800bf94 in i2c_lld_master_transmit_timeout (i2cp=0x20001c14, addr=29, txbuf=0x2000266c "\001=", txbytes=1,
rxbuf=0x20002660 ">@\303\000\000\000`\303\000\000\000\303\000\000\000", rxbytes=6, timeout=4)
at ../../chibios/stable_2.4.x/os/hal/platforms/STM32/i2c_lld.c:905
#4 0x0800a5ca in i2cMasterTransmitTimeout (i2cp=0x20001c14, addr=29, txbuf=0x2000266c "\001=", txbytes=1,
rxbuf=0x20002660 ">@\303\000\000\000`\303\000\000\000\303\000\000\000", rxbytes=6, timeout=4)
at ../../chibios/stable_2.4.x/os/hal/src/i2c.c:206
#5 0x0801108c in AccelThread (arg=0x20001c14) at accel.c:106
#6 0x08000742 in _port_thread_start () at ../../chibios/stable_2.4.x/os/ports/GCC/ARMCMx/chcore_v7m.c:262
#7 0x080010ee in chSchGoSleepS (newstate=0 '\000') at ../../chibios/stable_2.4.x/os/kernel/src/chschd.c:125
#8 0x200028ec in ?? ()
and
(gdb) frame 2
#2 0x08000e70 in chVTResetI (vtp=0x200027b4) at ../../chibios/stable_2.4.x/os/kernel/src/chvt.c:111
111 chDbgAssert(vtp->vt_func != NULL,
(gdb) list
106 */
107 void chVTResetI(VirtualTimer *vtp) {
108
109 chDbgCheckClassI();
110 chDbgCheck(vtp != NULL, "chVTResetI");
111 chDbgAssert(vtp->vt_func != NULL,
112 "chVTResetI(), #1",
113 "timer not set or already triggered");
114
115 if (vtp->vt_next != (void *)&vtlist)
(gdb) p *vtp
$14 = {vt_next = 0x20002934, vt_prev = 0x20001448, vt_time = 0, vt_func = 0, vt_par = 0x20001c14}
Is the test suite supposed to be non-invasive? Looking at that test, it doesn't look like it ought to impact my i2c activity other than, perhaps, slowing it down?
Any thoughts on how to proceed would be appreciated. While ultimately I won't have the benchmark test in my application, I want to make sure this isn't a sign of some other issue that will cause me problems. Thanks in advance for any suggestions!
I'm running the 2.4.x stable branch head, fairly close to the 2.4.1 release when I diffed it a few days ago.