IIC Bus Busy always active - how do I clear it?

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

IIC Bus Busy always active - how do I clear it?

644件の閲覧回数
matthewreed
Contributor I

Whenever I enable the IIC module the Bus Busy bit is set.  I'm the only master on the line, the lines are pulled high.  No start signal has been generated.  Why is the bus busy?  How do I clear it?

 

Frustrated...

 

17474_17474.gifdestroy_iphone.gif

Ok, not always.  After a bit of messing with it the busy bit is not always set.

 

But - I can't set MST (master) bit.  This has always been true, I thought it was related to the busy bit.

 

Even in the debugger, I set the master bit and it immediately clears.

 

I don't get it?  Why would it not set?  I've set the pins to GPIO output and written to them, they work fine.  Why won't master work?

 

17476_17476.gifteemingcolddiplodocus.gif

 

-Matt

ラベル(1)
0 件の賞賛
1 返信

436件の閲覧回数
matthewreed
Contributor I

I figured it out!!!

the IIC bus was not biased properly, as a result the processor would determine that the bus was busy (sometimes showing it, sometimes not).  You can't enter master mode when the bus is busy, only slave mode.

the solution was to properly bias the SDA anc SCL lines.

-Matt

0 件の賞賛