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.
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.
Hi Razvan,
Thank you for giving me the advice. I will repost my question to wireless connectivity community.
Thank you,
Kazuki Ashida