I am running an STM32F417.
When I start an I2C3 transfer using i2cMasterTransmitTimeout(), I encounter the following assertion error (chthreads.c:571), called by the _i2c_wakeup_isr from the I2C interrupt "i2c_lld_serve_event_interrupt" (I2Cv1/i2c_lld.c:322):
Code: Select all
chDbgAssert(tp->p_state == CH_STATE_SUSPENDED, "not THD_STATE_SUSPENDED");
The thread ChibiOS is trying to wake up is indeed the one that called the i2c transfer function. I am wondering if it's possible that the I2C transfer started and ended before osalThreadSuspendTimeoutS() was even called, but if that's the case I don't understand why would I be the only person to encounter this error.
Any idea?
Thanks!