Hello every one,
I have a problem using the I2C Bios driver on the C6747 in a periodic task.
If I use the my funktion i2cWriteMCP(I2C_SLAVE_ADDR_MCP_000,0xFFFF); out of a normal task, everything works fine.
If I use the same statement in a periodic task generated with the graphical DSP/BIOS config tool I get stuck in the function Void I2c_localEnsureIsReadyforNext(I2c_Object *instHandle) in the I2C driver in a while loop
while ((((instHandle->deviceInfo.baseAddress)->ICSTR
& CSL_I2C_ICSTR_ARDY_MASK) == 0)
&& (delay != 0))
{
delay--;
}
until the variable delay is counted down to 0 (that takes around 1 second). This even happens, when I set the periodic task to for example to 2 seconds.
This seams to happen because the STOP bit in the dataParam->flags is not set anymore and therefore the if statement
if (FALSE != (dataParam->flags & I2c_STOP))
is false. I found this by comparing the two methods using my function.
If I use i2cWriteMCP(I2C_SLAVE_ADDR_MCP_000,0xFFFF); out of the periodic task, the STOP flag in dataParam->flags is always set correct.
Can anyone tell my what I am doing wrong? I am not yet very familar with all the driver and DSP/BIOS stuff.
Thanks in advance!
Jens