In the below code, The myIsr5(), myIsr6(), myIdleFunc() doesn't work..
I am able to set breakpoints on all of the above function but the program flow doesn't go into these function,
the messages inside those functions are not printed on the console window.
/* XDCtools Header files */ #include<xdc/std.h> #include<xdc/runtime/System.h> #include<xdc/runtime/Error.h> #include<xdc/sysbios/hal/Hwi.h> /* TI-RTOS Header files */ #include<ti/sysbios/BIOS.h> #include<ti/sysbios/knl/Task.h> #include<ti/drivers/GPIO.h> /* Board Header file */ #include "Board.h" Bool Hwi5 = FALSE; Bool Hwi6 = FALSE; /* Runs when interrupt 5 occurs */ Void myIsr5(UArg arg) { if (arg == 10) { Hwi5 = TRUE; System_printf("In Hwi 5!!!!"); /* Able to set breakpoint here but the message is not printed in the console*/ } } /* Runs when interrupt 6 occurs */ Void myIsr6(UArg arg) { if (arg == 12) { Hwi6 = TRUE System_printf("In Hwi 6!!!!"); /* Able to set breakpoint here but the message is not printed in the console*/ } } /* The Idle thread checks for completion of interrupts 5 & 6 and exits when they have both completed. */ Void myIdleFunc() { if (Hwi5&&Hwi6) { System_printf("Both interrupts have occurred!"); /* Able to set breakpoint here but the message is not printed in the console*/ System_exit(0); } } int main(void) { /* Call board init functions */ Board_initGeneral(); Board_initGPIO(); Hwi_Params hwiParams; Hwi_Handle myHwi; Hwi_Params_init(&hwiParams); /* Set myIsr6 parameters */ hwiParams.arg = 12; hwiParams.enableInt = FALSE; /* Create a Hwi object for interrupt number 6 that invokes myIsr6() with argument 12 */ myHwi = Hwi_create(16, myIsr6, &hwiParams, NULL); System_printf("Entering into Hwi"); /* Able to set breakpoint here but the message is not printed in the console*/ if (myHwi == NULL) { System_abort("Hwi create failed"); } Hwi_Params hwiParams_1; Hwi_Handle myHwi_1; Hwi_Params_init(&hwiParams_1); hwiParams_1.arg = 10; hwiParams_1.enableInt = FALSE; /* Create a Hwi object for interrupt number 18 that invokes myIsr5() with argument 10 */ myHwi_1 = Hwi_create(18, myIsr5, &hwiParams_1, NULL); if (myHwi_1 == NULL) { System_abort("Hwi create failed"); /* Able to set breakpoint here but the message is not printed in the console*/ } Hwi_enableInterrupt(16); Hwi_enableInterrupt(18); System_printf("Entering into Hwi"); /* Turn on user LED */ GPIO_write(Board_LED0, Board_LED_ON); /* Start BIOS */ BIOS_start(); return (0); }