Associate III
September 6, 2011
Question
I2c problem
- September 6, 2011
- 5 replies
- 1171 views
Posted on September 06, 2011 at 20:51
Hi
I have a small problem that I hope you can help me with. My problem I that the I2C communication stops after some time.I have 2 IRQ, one I2C and one timer 3 update with highest priority, TIM3 interrupt with 20kHz.The I2C works fine if I disable the TIM3 IRQ.I am controlling a digital Potentiometer with the I2C.sending address and 2 data byte.When the I2C works, the event comes as:I2C_EVENT_MASTER_MODE_SELECTI2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTEDI2C_EVENT_MASTER_BYTE_TRANSMITTINGI2C_EVENT_MASTER_BYTE_TRANSMITTINGI2C_EVENT_MASTER_BYTE_TRANSMITTEDbut if I enable Timer 3, The I2C stops after: (after some times) I2C_EVENT_MASTER_MODE_SELECTif I look at the signal with a scoop the address is never transmitted to the slave.Hope you can help me with an idea.. thanksIhave attached the code if it will help solving the problem.
#i2c