AnsweredAssumed Answered

Questions about JN5168's TIMER callback function

Question asked by Li siyu on Apr 2, 2018

All of the statements in the callback function registered by JN5168's TIMER are not executed, only the last sentence in the callback function is executed.Here is the Timer 3 callback function:

PRIVATE void vCbTimer3 (uint32 u32Device, uint32 u32ItemBitmap)
{
vAHI_DioSetDirection(0,0x400);//将DIO10设置为输出   Set DIO10 as output
vAHI_DioSetOutput(0,0x400);//与DIO10相连接的LED2亮   LED2 connected to DIO10 is on
vAHI_DioSetOutput(0x400,0);//与DIO10相连接的LED2灭   LED2 connected to DIO10 is off
vAHI_DioSetDirection(0,0x200);//将DIO9设置为输出    Set DIO9 as output
vAHI_DioSetOutput(0,0x200);//与DIO9相连接的LED1亮   LED1 connected to DIO9 is on
}

The phenomenon should be LED2 light and then off, and finally LED1 light. However, the actual phenomenon is that only the DIO9 is on and it is always on. Shouldn't it exit after executing the Timer 3 callback function, why would it just execute the last statement in the callback function and not exit the callback function after execution? So I would like to ask you why this happens and how to solve it

Outcomes