I have a question about handling clock stretching for IIC00 on RL78/G14.
Basic information:After initialization, the application will just read every sensor through IIC00 every 5ms.The IIC00 baud rate is set to 400k and all the sensor are on the same bus.Thoes sensors include a GPS, some thermometer, some accelerometer, etc.
I have confirmed that all sensors works properly if we do not communicate with the GPS module.However, if I try to read the GPS, a clock stretch may happened and the SCL is being pulled LOW which caused the next IIC00 clock goes wrong.
According to the manual, the following handling is done when MD_STATUS == 2 (IIC no ACK). SIR00 = SSR00; ST0 = 0x80; R_IIC00_StopCondition(); R_IIC00_Stop(); R_IIC00_StartCondition(); SS0 = 0x1;
I found on Hardware manual that we can change the transfer clock frequency by setting the SDR00.I have tried to adjust the rate in between the but seems do not work.
I would like to ask:1. How to deal with clock stretching?How long should I wait or I could do something else to reset it?2. Is there any problem if I change the SDR00 inbetween the transmission of IIC00?
In reply to JoeL:
How's this issue? Any progress on this?
JBRenesasRulz Forum Moderator