JN5169:slave 2-wire serial interface

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

JN5169:slave 2-wire serial interface

945 Views
zherlei
Contributor II

The function  vAHI_SiRegisterCallback(PR_HWINT_APPCALLBACK prSiCallback)  in  "JN516x Integrated Peripherals API User Guide Revision 1.5" registers a user-defined callback function that will be called when a Serial Interface interrupt is triggered on an SI master or on an SI slave.

If RAM is powered off during sleep and interrupts are required, the callback function must be re-registered before calling u32AHI_Init() on waking.

In sample JN-AN-1216,the u32AHI_Init() is not called.

PUBLIC void APP_vSetUpHardware(void)
{
#if (JENNIC_CHIP_FAMILY == JN517x)
vAHI_Uart0RegisterCallback(APP_isrUart);
u32AHI_Init();
vAHI_InterruptSetPriority(MICRO_ISR_MASK_BBC, NVIC_INT_PRIO_LEVEL_BBC);
vAHI_InterruptSetPriority(MICRO_ISR_MASK_UART0, NVIC_INT_PRIO_LEVEL_UART0);
#else
TARGET_INITIALISE();
/* clear interrupt priority level */
SET_IPL(0);
portENABLE_INTERRUPTS();
#endif
}

My device is JN5169.JENNIC_CHIP_FAMILY=JN516X

I register the serial interface isr callback function APP_isrIIC like the APP_isrUart in the irq_JN516x.S file.

void APP_isrIIC(void)

{

      The type of slave serial interface interrupt????

}

question:

1. How can I get the interrupt type of the serial interface???

2. How to clear interrupt source???

3. Is there the sample about the slave interface interrupt of JN5169???

Tags (2)
0 Kudos
2 Replies

668 Views
witoldsowa
Contributor II

Hi Mario,

I have the same problem and I find your answers a bit confusing.

1. Chapter 29.3 specifies how to register a callback but the question is about how to find out interrupt type on JN5169 on which interrupt handlers are declared in irq_JN516x.S rather than by registering a callback. Please advice how to indentify interrput type (e.g. E_AHI_SIM_RXACK_MASK or E_AHI_SIM_BUSY_MASK) on JN5169.

2. This function clears System Controller interrupts. The question is about clearing 2-wire serial interrupts. Please advice how to exactly clear Serial Interface interrupt

3. I can't find any 2-wire example in JN-AN-1220 Sensor. Please indicate file and line number.

0 Kudos

668 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Zhou,

1. How can I get the interrupt type of the serial interface???

JN516x Integrated Peripherals API User Guide

29.3 General SI Functions

2. How to clear interrupt source???

vAHI_ClearSystemEventStatus

3. Is there the sample about the slave interface interrupt of JN5169???

We provide a simple example for master interface JN-AN-1220 Sensor.

Regards,

Mario

0 Kudos