2007-12-27 7:11 AM
2007-08-27 8:31 PM
Hi
I have a problem. I cannot get stop event trigger when I2C slave is transmitter. But ok if I2C slave is receiver. After ''I2C_EVENT_SLAVE_ACK_FAILURE'' trigger, and I send ''I2C_SendData(0xFF);'' I get a event trigger said I2C_SR1 = 0xB8 and I2C_SR2 = 0. And I found SDA line cannot be controlled when master send STOP. Below is a part of my code in 75x_it.c. Almost same as sample code. void I2C_IRQHandler(void) { switch (I2C_GetLastEvent()) { case I2C_EVENT_SLAVE_ADDRESS_MATCHED: RX_ptr = 0; break; case I2C_EVENT_SLAVE_BYTE_RECEIVED: RX_rbuf[RX_ptr++] = I2C_ReceiveData(); break; case I2C_EVENT_SLAVE_BYTE_TRANSMITTED: I2C_SendData(RX_wbuf[RX_ptr++]); break; case I2C_EVENT_SLAVE_ACK_FAILURE: I2C_SendData(0xFF); break; case I2C_EVENT_SLAVE_STOP_DETECTED: break; default: break; } } Appreciate any comment. An2007-08-28 3:03 PM
Hi
Now it work well!! I changed master. Before... All my event responses is same as below from somebody using ARM9 http://mcu.st.com/mcu/modules.php?mop=modload&name=Splatt_Forums&file=viewtopic&topic=5061&forum=21 I cannot get STOP event trigger. I used two GPIO pin as sw I2C master. And set hw I2C as slave. In the face it work well when master send data (hw I2C (slave) as receiver). I can get all event trigger include addr, byte RX and stop. When master get data from slave, only STOP event cannot trigger. Then I changed another external master device, it work well. An2007-12-27 7:11 AM
Hello,
I have a problem with STR752 slave operation. Your and my interrupt routines are same. But I think my code doesn't occur I2C interrupt. Can you please send me I2C configuration (main) code. Thank you in advance. Happy new year 2008. Best regards. UgurWe’re moving the ST Community to a new platform to give you a better and more reliable community experience.