Hi all,
I have problems some I2c_stat problems. I use Master/ polling method/ Fast mode for transmission. Only one master device exist in the system.
PRCM clocks are enabled and Padconf reg is configured as:
/*i2c1_scl_padconf*/
*CONTROL_PADCONF_HSUSB0_DATA7 |= 0x01180000 ;/*INPUTENABLE0=0b1, PU=selected and enabled*/
/*i2c1_sda_padconf*/
*CONTROL_PADCONF_I2C1_SDA |= 0x00000018 ;/*INPUTENABLE0=0b1, PU=selected and enabled*/
1- At the end of initialization of I2C1 module when i set EN bit at I2C_CON register, BB bit at I2C_STAT reg is always set. So, when i try to use I2C1 to trasmit data, because of BB state is always set, error occurs. I have searched that and i ve found BB recover codes. But after recovering when i try to set EN bit again, same error occurs again.(Always bus is busy)
2- I tried that EN bit setting at the transmit function. I configure I2C_SA = slave_addr , I2C_CNT=data_len, and at the end I2C_CON= 0x8601. After that I2C_STAT reg show that BB, AL, and XRDY. I cant understand why arbitration lost occur when only one master device exist in a system.
3- If AL occur, i reset AL bit and, configure again I2C_SA = slave_addr , I2C_CNT=data_len, and I2C_CON= 0x8601 and at this time BB and XRDY is occured. But although i put data to I2C_DATA and reset XRDY bit, then only BB occur and never ARDY bit is occur so i cant finish transfer. And when i look for SDA and SCL pin of procceser by scope, there is no signal output. (SDA is always LOW, SCL is always HIGH).