I2C as a slave at JN516x

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

I2C as a slave at JN516x

941 Views
ashida
Contributor I

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.

Tags (3)
0 Kudos
Reply
2 Replies

870 Views
constantinrazva
NXP Employee
NXP Employee

Hello ashida@nagano-nct.ac.jp‌,

Unfortunately in this community we handle questions regarding MATLAB/Simulink and our toolbox; we do not have experience with JN516x devices. I would recommend you try and ask this on the https://community.nxp.com/community/wireless-connectivity  community.

Hope this helps,

Razvan.

0 Kudos
Reply

870 Views
ashida
Contributor I

Hi Razvan,

Thank you for giving me the advice.  I will repost my question to wireless connectivity community.

Thank you,

Kazuki Ashida

0 Kudos
Reply