stm32f103C and chibios 2.5.0: i2cd1 driver hangs!
Posted: Tue Oct 02, 2012 5:59 pm
Hello, this time I am facing a problem with I2CD1 driver of ChibiOS 2.5.0.
After initialization, I do:
i2cAcquireBus(i2cp);
i2c_ret = i2cMasterTransmitTimeout(i2cp, I2C_ADDR, txbuf, 3, rxbuf, 0, MS2ST(6));
i2cReleaseBus(i2cp);
i2cAcquireBus(i2cp);
i2c_ret = i2cMasterTransmitTimeout(i2cp, I2C_ADDR, txbuf, 8, rxbuf, 0, MS2ST(6));
i2cReleaseBus(i2cp);
The second writing sequence hangs!
I tried in the following manners:
1) just the second writing sequence;
2) with no other peripherals enabled (uart, spi, ecc...)
3) double checked board.h configuration, and it's fine, PB6 and PB7 configured as alternate open drain.
I have 2k pullup resistor on each lines.
Could you please help me?
-g
After initialization, I do:
i2cAcquireBus(i2cp);
i2c_ret = i2cMasterTransmitTimeout(i2cp, I2C_ADDR, txbuf, 3, rxbuf, 0, MS2ST(6));
i2cReleaseBus(i2cp);
i2cAcquireBus(i2cp);
i2c_ret = i2cMasterTransmitTimeout(i2cp, I2C_ADDR, txbuf, 8, rxbuf, 0, MS2ST(6));
i2cReleaseBus(i2cp);
The second writing sequence hangs!
I tried in the following manners:
1) just the second writing sequence;
2) with no other peripherals enabled (uart, spi, ecc...)
3) double checked board.h configuration, and it's fine, PB6 and PB7 configured as alternate open drain.
I have 2k pullup resistor on each lines.
Could you please help me?
-g