possible bug on chibios 3 I2C code

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome. This forum is NOT for support.
trunet
Posts: 54
Joined: Fri Apr 06, 2012 7:18 pm

possible bug on chibios 3 I2C code

Postby trunet » Wed Jul 23, 2014 2:40 am

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?

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: possible bug on chibios 3 I2C code

Postby Giovanni » Wed Jul 23, 2014 8:02 am

Hi,

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

Giovanni

User avatar
aGuegu
Posts: 29
Joined: Thu Dec 07, 2017 4:15 am
Has thanked: 1 time
Been thanked: 5 times

Re: possible bug on chibios 3 I2C code

Postby aGuegu » Thu Dec 14, 2017 4:30 pm

Took me hours to debug my code ....

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: possible bug on chibios 3 I2C code

Postby Giovanni » Thu Dec 14, 2017 4:34 pm

If you are debugging then you should enable assertions, checks and state checker, those kind of things are found immediately.

Giovanni


Return to “Development and Feedback”

Who is online

Users browsing this forum: No registered users and 18 guests