AnsweredAssumed Answered

I2C as a slave at JN516x

Question asked by Kazuki Ashida on Mar 4, 2019
Latest reply on Mar 9, 2019 by Mario Ignacio Castaneda Lopez

Hello everyone,

 

I am trying to connect I2C as a slave at JN5164.  I describe the code shown below.  Note that an address of slave is 0x05.

 

void initialFunction(){

   vAHI_SiSlaveConfigure(0x05, FALSE, FALSE,
      E_AHI_SIS_DATA_RR_MASK |
      E_AHI_SIS_DATA_RTKN_MASK |
      E_AHI_SIS_DATA_RR_MASK |
      E_AHI_SIS_LAST_DATA_MASK |
      E_AHI_SIS_ERROR_MASK,
      FALSE);

   vAHI_SiSetLocation(FALSE);

   vAHI_SiRegisterCallback(_callbackForI2C);

   vAHI_SiSlaveWriteData8(0x30);

}

static void _callbackForI2C(uint32 u32Device, uint32 u32ItemBitmap){
   vfPrintf(&sSerStream, "Interrupted\n\r");
   vAHI_SiSlaveWriteData8(0x30);

}

 

On the other hand, a master device works well.  It can output the slave address from SDA and output clocks from SCL.  I have already checked them using an oscilloscope.  In spite of it, a bit of ACK/NACK remains high state.  It means that the slave device is not responding.

 

Does anyone has ever made a program for I2C communication in the same environment?

Thank you,

Kazuki Ashida

Outcomes