IIC Bus Busy is not cleared after stop condition

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

IIC Bus Busy is not cleared after stop condition

710 Views
santhoshsl
Contributor III

I am using IIC of S12X DP512 to communicate with ST micro's RTC.

After all the debugging I have finalised Read and Write procedures for this communication.

But for the read part I am seeing some problem that IBB of IBSR is not getting cleared even after I make IBCR_ML_SL = 0 (Stop condition.)

When i run it continuosly it if getting stuck at IIC_WAIT macro(to wait for IBIF bit set) but when i put breakpoint here and do single step it is continue execution (no stuck condition). Because of this if I do read continuously for different registers, it is getting stuck and not seeing any response.

Can you please let me know IBCR_ML_SL = 0 is the actual Stop condition and after this IBB will get cleared or do i need to do some thing else.

 

 

Attached is the complete project for this IIC access commands.

Original Attachment has been moved to: IIC-Access.rar

Labels (1)
Tags (5)
0 Kudos
1 Reply

392 Views
santhoshsl
Contributor III

I tried to do a dummy read and cleared IBIF, IBB flags before sending Stop condition. Even then IBB flag is getting set and this is causing Arbitration loss for next transaction.

Can some one help me in this. Thanks in advance.

0 Kudos