IIC not working

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User10696
Level 4
Level 4
First solution authored
I am trying to use a USIC as IIC master.
The module is enabled, the baudrate set and IIC mode selected (CCR.MODE = 4). When I write the MasterStart byte (using the XMC_I2C_CH_MasterStart() function) the data is written to the FIFO (0x4AE) but nothing happens on the bus.
The TCSR (Transmit Control/Status Register) has the value 0x10000580. As far as I can see the important bits are as expected: TE = 1 (The trigger event has been detected, TDV = 1 (Tha data word in TBUF is valid), TDEN = 1 (A Transmission of the data word in TBUF can be started if TDV=1).

Why is the byte not transmitted? What is the USIC waiting for?
0 Likes
2 Replies
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

Did you configured the SDA and SCL inputs?
Did you look at the examples in XMCLib?

Regards,
Jesus
0 Likes
User10696
Level 4
Level 4
First solution authored
I have solved the problem.
It was a hardware problem. Due to a hardware fault (badly soldered wire) the SDA line was short circuited to ground. As the data line was always low, the I2C start could not be applied.
0 Likes