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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
884 次查看
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?

标签 (1)
0 项奖励
回复
1 解答
588 次查看
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 项奖励
回复
4 回复数
588 次查看
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 项奖励
回复
588 次查看
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 项奖励
回复
588 次查看
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 项奖励
回复
589 次查看
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 项奖励
回复