I2C with GT8/QG8 - IIC_MST does not switch to 1

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I2C with GT8/QG8 - IIC_MST does not switch to 1

Jump to solution
887 Views
icarus31
Contributor III

I read the AN3291.pdf document.

 

There is a line saying:

 

IIC1C |= 0x30; // And generate START condition;

 

In my case, I used IICC instead, but it does not matter for my problem. When executing that line, my debugger says that IICC_MST still equals to 0 AND my scope does not show any START signal (SCL to low). IICC_TX is set to 1 with that line.

 

This is a big problem, because the rest of my code assumes that my chip is a master, not a slave!

 

Anyone has a clue?

Labels (1)
0 Kudos
Reply
1 Solution
591 Views
icarus31
Contributor III

Ok, I disabled the two pins that were tapped on the SCL and SDA pins and succeeded to transmit data!

 

**bleep**! Why I did not see this before! :smileyhappy:

 

Thanks for your help.

View solution in original post

0 Kudos
Reply
4 Replies
591 Views
admin
Specialist II

Hello, im having the same problem you had, and i read your post but what do you exactlly mean by dissabling the pins that were taped to the sda and scl pins? I would like to know more about this, thanks.

0 Kudos
Reply
591 Views
kef
Specialist I

You can't assume MST bit is always set or set when you set it. Your master can loose arbitration with other masters and turn into the slave. Do you have pull up resistors on IIC pins? Isn't your slave node pulling IIC pins low? To win arbitration both IIC pins must idle high before attempt to set MST bit.

0 Kudos
Reply
591 Views
icarus31
Contributor III

I should have write more details about my setup.

 

I have only one master and only one slave.

 

My slave has the pull-up resistors on SCL and SDA lines.

 

I noticed though that I forgot that I have 2 pins that are tapped to the I2C SCL and SDA pins in input mode. I noticed with the scope that it drops the SCL and SDA lins to half of the signal (3.3V -> 1.65V). Let me disable those pins and I will come back with the result.

 

More to come...

0 Kudos
Reply
592 Views
icarus31
Contributor III

Ok, I disabled the two pins that were tapped on the SCL and SDA pins and succeeded to transmit data!

 

**bleep**! Why I did not see this before! :smileyhappy:

 

Thanks for your help.

0 Kudos
Reply