Greetings!
I have a question regarding the InternalI2C component with the KDS processor expert. I am using the K22 FRDM board. I am trying to use this component for I2C communication, with not a completely standard protocol. I am required to send the device address to the sensor to wake it up. I am then to wait around 1ms before issuing the stop flag. However, I have noticed that after issuing sendblock method if I use a wait function or any other function the I2C lines issue a stop signal right away. For example I issue the sendblock it sends the data, I call a wait for 1ms, but right once it is called (before it waits 1ms) it issues the stop. I tried using dummy functions to check if it was just the wait function, but it appears to be whenever any function is called.
So my question is, is there anyway to get around this? Somehow set the function to be non-blocking of sorts?
Thanks!
Hello Christopher ,
Could you please share your code ?
The function of SendBlock() includes whether send stop signal :
Also there is typical usage about the I2C_LDD component , you can have a look :
Right click I2C component -> Help on component -> Typical Usage :
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
I am using the internalI2C component not the I2C_LDD. The code is shown below.
InternalI2C component below.
Hello Christopher,
Could you please check the Properties view , whether check the "Automatic stop condition" ?
If yes, please uncheck it :
Hope it helps
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
It is unchecked, image below.
Hi ,
Your code includes I2C1_SendStop() function , how about delete it ?
Well, I get an error that the bus is off when I issue that command. I need to delay a certain amount of time before I send the stop flag in I2C. Right when the Waitms(1) command happens the I2C lines are let to go high (Basically issuing a stop).