JN5179 using DIO12 as input and output handshake line

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

JN5179 using DIO12 as input and output handshake line

626 次查看
jurijhuebner
Contributor I

Hello all,

I am using DIO12  as handshake line. If Host controller trigger DIO12, JN5179 will wake up. If JN5179 trigger DIO12 Host controller, it will wake up. 

DIO12 is configured as PULL DOWN and if trigger it will generate an HIGH SIGNAL for a couple of ms.

My issue I am trying to solve is, if JN5179 is trigger the DIO12 it will generate an interrupt by it self, but  interrupts were disabled for this time. How could it be that interrupts are detected if they are disabled.

Here is my source snippet:

PUBLIC void APP_setHANDSHAKE(void){
vAHI_DioWakeEnable(0, APP_HANDSHAKE_DIO_MASK);
/* Turn on pull-ups for DIO lines with buttons connected */
DBG_vPrintf(TRACE_APP_BUTTON, "\nAPP Button: Start HANDSHAKE");
/* Disable HANDSHAKE interrupt*/
DBG_vPrintf(TRACE_APP_BUTTON, "\nAPP Button: Disable HANDSHAKE interrupt");
/* Enable HANDSHAKE as output*/
vAHI_DioSetDirection(0, APP_HANDSHAKE_DIO_MASK);
/* Enable HANDSHAKE output = on*/
vAHI_DioSetOutput(APP_HANDSHAKE_DIO_MASK, 0);
/* Set start HANDSHAKE Timer*/
DBG_vPrintf(TRACE_APP_BUTTON, "\nAPP Button: Start Timer");
ZTIMER_eStart(u8TimerHANDSHAKE, ZTIMER_TIME_MSEC(2));
}
PUBLIC void APP_cbTimerHANDSHAKE(void * pvParam) {
/* Enable HANDSHAKE output = 0ff*/
vAHI_DioSetOutput(0, APP_HANDSHAKE_DIO_MASK);
/* Enable HANDSHAKE as input*/
vAHI_DioSetDirection(APP_HANDSHAKE_DIO_MASK, 0);
/* Enable HANDSHAKE interrupt*/
vAHI_DioWakeEnable(APP_HANDSHAKE_DIO_MASK, 0);
DBG_vPrintf(TRACE_APP_BUTTON, "\nAPP Button: Stop HANDSHAKE");
}

0 项奖励
1 回复

481 次查看
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Jurij,

I was checking the implementation that you are doing,

Just confirm, You are waiting an external wake up from the host controller, and the JN5179 has an internal counter and it will generate an HIGH SIGNAL for a couple of ms

I recommended, do not disable the interrupt and wait for the host controller trigger. If the JN5179 will wake up the host controller disable the interrupt, and generate the signal and return to the input line.

Best Regards,

Mario

0 项奖励