AnsweredAssumed Answered

Timer interrupt callback not being called

Question asked by Lite On on Jul 30, 2018
Latest reply on Dec 4, 2018 by Mario Ignacio Castaneda Lopez

I am using JN5168, JN-AN-1218-Zigbee-3-0-Light-Bulb as a baseline code for a lighting control application.


In my code, I have implemented a PWM using Timer 1 with interrupt. However, when I tried to run the code, the interrupt callback function is not being called. Here's my code for the PWM initialization:

PRIVATE void DriverBulb_vInit(void) {
    // Enable period interrupt generation and PWM output
    vAHI_TimerEnable(E_AHI_TIMER_1, 0, FALSE, TRUE, TRUE);

    // Register interrupt callback

    // Start Timer1 as single-shot mode
    vAHI_TimerStartSingleShot(E_AHI_TIMER_1, 11, 10);

void vISR_DriverBulbTimer(uint32 u32DeviceId, uint32 u32ItemBitmap) {
    if ((u32DeviceId == E_AHI_DEVICE_TIMER1) && (u32ItemBitmap & 0x01)) {
        DBG_vPrintf(TRUE, "ISR Called\n");

May I ask if there's anything else needs to be configured in order for the timer (or pwm) to work? Also, is there a need to edit the ISR file irq_JN516x.S?


Thank you in advance for your help!