JN5169 - i2c Communication - Raspberry Pi.

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

JN5169 - i2c Communication - Raspberry Pi.

1,260 Views
matthew3
Contributor III

Hello Community,

   I have a PCB Board which  as on it the JN5169 microcontroller (Slave). I have a Sesnor attached to this through an amplifier board . I am reading this through one of the 6 ADC channels but i want to send this to a Raspberry Pi (Master) using i2c communication.

What i am asking the community is there any examples out there or could i be pointed to an application note where i2c is used. I have searched on NXP or the internet but not succesful in finding exactly what i am looking for.

Regards

Matthew

Labels (1)
Tags (2)
0 Kudos
5 Replies

1,041 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Matthew,

Please look at 13. Serial Interface (SI).

JN516x Integrated Peripherals API User Guide

If you will work with interrupt service routine.

OS_ISR(vI2C_SlaveIsr)
{
    /* Read interrupt status */
    uint32 u32SiStat = u32REG_SiSlaveRead(REG_SI_STAT);
    /* Clear interrupt status (for ALL interrupts that just occurred) */
    vREG_SiSlaveWrite(REG_SI_STAT, u32SiStat);
    /* Handle interrupt */
    if (u32SiStat & E_AHI_SIS_DATA_RR_MASK)
    {
    }
    else if (/* Other masks */)
    {
    }
}

Hope it helps.

Regards,

Mario

0 Kudos

1,041 Views
matthew3
Contributor III

Hi Mario,

   Thank you for the reply.

Just another question. The code above that you replied with. Is that from an application note or is it direclty what you have typed out to show me?

Regards

Matthew

0 Kudos

1,041 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Matthew,

The User Guide provides the information to how enabled the SI.

The code is an implementation for the ISR cleaning the SI flag.

Regards,

Mario

0 Kudos

1,041 Views
matthew3
Contributor III

Hi Mario,

   Thank you for the help. Will look at the User Guide and figure out how to write complete code for my application.

Regards

Matthew

0 Kudos

1,041 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Matthew Wood,

Please let me know if you have issues with your implementation and I could provide some advice.

Regards,

Mario

0 Kudos