Page 1 of 1

possible bug on chibios 3 I2C code

Posted: Wed Jul 23, 2014 2:40 am
by trunet
os/hal/ports/STM32/LLD/I2Cv1/i2c_lld.c line 800:

Code: Select all

#if defined(STM32F1XX_I2C)
  osalDbgCheck((rxbytes == 0) || ((rxbytes > 1) && (rxbuf != NULL)));
#endif


is this correct, or I can't transfer 1 byte from I2C?

Re: possible bug on chibios 3 I2C code

Posted: Wed Jul 23, 2014 8:02 am
by Giovanni
Hi,

It is a bug in STM32F1 devices, you cannot transfer just one byte using DMA.

Giovanni

Re: possible bug on chibios 3 I2C code

Posted: Thu Dec 14, 2017 4:30 pm
by aGuegu
Took me hours to debug my code ....

Re: possible bug on chibios 3 I2C code

Posted: Thu Dec 14, 2017 4:34 pm
by Giovanni
If you are debugging then you should enable assertions, checks and state checker, those kind of things are found immediately.

Giovanni