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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

ソリューションへジャンプ
887件の閲覧回数
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 解決策
591件の閲覧回数
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 返答(返信)
591件の閲覧回数
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 件の賞賛
返信
591件の閲覧回数
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 件の賞賛
返信
591件の閲覧回数
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 件の賞賛
返信
592件の閲覧回数
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 件の賞賛
返信