Other Parts Discussed in Thread: HALCOGEN
Hi,
I have very little experience of using I2C, so there's a lot I don't know. So, I'm trying the get this working by starting with the example code in the HalCoGen directories. I have a slightly modified version of this loopback code, so that I can see what's going on.
I understand the BB flag is cleared when a STOP condition is set. On real communications between micros and looking on a logic analyser I don't ever see this happen. The code shown captures the state of the BB flag on the example code and it doesn't clear either. (see screenshot)
First question: am I right in saying that if the BB flag is set this will prevent other devices from sending messages to the master? If so this would be bad, because I'm looking to implement multi-master comms.
Second question: The datasheet states the ICCNT causes STOP to be generated when this is zero, but ICCNT doesn't appear to change. Calling i2cSetStop() HalCoGen function also doesn't set a STOP.
I have spent all week on this and it's driving me crazy. For the sake of my sanity, please help.
Andy