Other Parts Discussed in Thread: EK-TM4C129EXL
Hi,
I am working off of the example code for the I2C peripheral provided in TivaWare_C_Series-2.2.0.295 with a EK-TM4C129EXL Rev A development board. I have copied the code into a project and have ran it successfully without modification to completion. I was even able to use the terminal to inspect the UARTPrint commands. I then modified the code in a way where it would continuously be sending the repeated "I2C" characters to itself. To do this I simply put it in a while(1) loop and moved the part of the code that defines the I2CMasterSlaveAddrSet within the loop so that the loop back would not print multiple times and the init console can remain the same. The first pass works perfectly fine but when the loop happens and we return the master to write mode it gets stuck trying to acknowledge the RREQ at the slave status.
During debugging I noticed that the state of MCS is not idle when returning to the start of the while loop. The busy and run bits are stile active unlike my first pass of the loop that I noticed. I tried reviewing the procedure in the documentation for Master Single Receive but am puzzled given the interaction of the loop back. I also noticed that the TREQ and TXFIFO are still enabled.
Can I please get some clarification on these issues. I would like to go between reading and writing seamlessly using this single read and write procedure.
Best regards,
Stephen G.