Other Parts Discussed in Thread: SYSBIOS
I have a ProjectZero based project that I have implemented an I2C bus using TI's I2C.h functions.
I have had it working well for years now but it has come time to create a function that tries to deal with a slave device which is holding the SDA line low without doing a full reset of all devices on the bus.
I believe that by sending 10 clock pulses on the I2C clock line at the same frequency that the I2C bus is set to should get 'most' slaves that might hold the SDA line low to release the SDA line.
I do not see a function in the I2C.h implementation that could be used to do these 10 clock cycles.
It looks like I might have to redefine the clock line as a GPIO and do these cycles myself.
I use IOID_3 as the SCL line using: #define Board_I2C0_SCL0 IOID_3
In my boards .c file I find this code that seems to further setup the SDA and SCL lines:
/* I2C configuration structure, describing which pins are to be used */ const I2CCC26XX_HWAttrsV1 i2cCC26xxHWAttrs[CC2650_LAUNCHXL_I2CCOUNT] = { { .baseAddr = I2C0_BASE, .powerMngrId = PowerCC26XX_PERIPH_I2C0, .intNum = INT_I2C_IRQ, .intPriority = ~0, .swiPriority = 0, .sdaPin = Board_I2C0_SDA0, .sclPin = Board_I2C0_SCL0, } };
How do I redefine my IOID_3 on the fly as a GPIO so I can do my cycles?
After I do my cycles, how do I redefine my IOID_3 on the fly so that the I2C.h functions can use them immediately again?
Thanks,
Dale