CLRC663 locks I2C

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

CLRC663 locks I2C

123 Views
dcarro
Contributor I
Hello:
 
I have a code implementation for reading UID and write/read data for MIFARE CLASSIC tags that works fine using CLRC663 and SPI communication. 
 
I am trying to use it with I2C communication but i have problems with the CLRC663. It is locking the bus after readings .
 
I can write data to CLRC663's registers and i receive I2C AKCs ( even i can perform NFC TX transmissions), but the CLRC663 breaks the bus after reading operations. CLRC663 sends a byte of data, but then it indefinitely holds SDA Low (SCL keeps high) and the only way i have to unlock the bus is manually sending pulses through SCL (revive_I2C() function provided or with a writing call).
 
I am following the information about the protocol provided in the datasheet of CLRC663 (8.4.4.8 I2C-register read access part).
 
I have checked the data with the osciloscope and I cut off microcontroler'SDA line in order to check which system is locking the bus. I also have tested the I2C communicaton with another devices and the bus work fine.
 
Could you help me? What could the error be?
 
CODE EXAMPLE
********************************************************
void revive_I2C()
{
if (input(I2C_SCL) && !input(I2C_SDA)) //IF I2C LOCKED
    {                                      
    for (int i = 0; i < 9; i++)
    {
      output_low(I2C_SCL);
      delay_us(10);
      output_float(I2C_SCL);
      delay_us(10);
    }
    i2c_stop();
}
}
 
void main()
{
int value;
#define I2C_CLR663_DIR_R 0b01010001
#define I2C_CLR663_DIR_W 0b01010000
    
      i2c_start();
      i2c_write(I2C_CLR663_DIR_W);
      i2c_write(CLRC663_REG_STATUS);
      i2c_stop();
 
      i2c_start();
      i2c_write(I2C_CLR663_DIR_R);
      value = i2c_read();
      i2c_stop();
 
      printf("\n Readed: %x", value);
      while(1)
      {;}
}
***************************************************
 
The hardware i am using is a PIC microcontroler (with CCS) connected to a custom PCB with a CLRC66303 IC and an antenna. The I2C pullups are 1K resistors. IFx and IFSELx pin connections configured for I2C according with the CLRC663 datasheet. I tried severeal CLRC663 from several providers.
 
The IF/IFSEL connections are the following:
IF0 - GND IFSEL0 - 3.3V
IF1 - SCL IFSEL1 - GND
IF2 - GND
IF3 - SDA

 

0 Kudos
1 Reply

64 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi

 

would suggest our customer use NFC reader library to develop their application,  it is easier to use.
If you use the RC663 without library, please refer to AN12657.
 
For CLRC663 connects to host MCU through I2C, we need to check  CLRC663 pins 23 and 24 are for I2C ,  pins 28 to 31 can be used either by a secondary I2C, SPI, or UART.  Please keep in mind that pins 26 and 27.  If you are using our evaluation board and trying to communicate with an external MCU, it is required to modify some resistor configuration.
 
 
If you can read and write CLRC663 registers through i2c then i2c interface is working.   If not working well, I would suggest you check the bus frequency.  

 

 

0 Kudos