Tool/software: TI-RTOS
Hello;
In TI-RTOS concept hardware interrupt in workshop series , the first lab about usage of hardware interrup by blinking a led.While I am trying this lab I faced with some problem. In code , the hwi will occur based on Tiva TM4c1294xl Timer 2A.But when I set the properties of hwi with dynamically nothing happens.The all code is below;
#include <xdc/std.h> #include <xdc/runtime/System.h> /* BIOS Header files */ #include <ti/sysbios/BIOS.h> #include <ti/sysbios/knl/Task.h> #include <ti/sysbios/knl/Clock.h> #include <ti/sysbios/hal/Hwi.h> #include <ti/sysbios/hal/Timer.h> /* TI-RTOS Header files */ // #include <ti/drivers/EMAC.h> #include <ti/drivers/GPIO.h> // #include <ti/drivers/I2C.h> // #include <ti/drivers/SDSPI.h> // #include <ti/drivers/SPI.h> // #include <ti/drivers/UART.h> // #include <ti/drivers/USBMSCHFatFs.h> // #include <ti/drivers/Watchdog.h> // #include <ti/drivers/WiFi.h> /* Board Header file */ #include "Board.h" #define TASKSTACKSIZE 512 Hwi_Handle hwi1; Void hwiFxn(){ GPIO_write(Board_LED1,Board_LED_ON); } int main(void) { Hwi_Params hwiP; Task_Params taskParams; /* Call board init functions */ Board_initGeneral(); // Board_initEMAC(); Board_initGPIO(); // Board_initI2C(); // Board_initSDSPI(); // Board_initSPI(); // Board_initUART(); // Board_initUSB(Board_USBDEVICE); // Board_initUSBMSCHFatFs(); // Board_initWatchdog(); // Board_initWiFi(); /* Construct heartBeat Task thread */ Task_Params_init(&taskParams); taskParams.arg0 = 1000; taskParams.stackSize = TASKSTACKSIZE; taskParams.stack = &task0Stack; Task_construct(&task0Struct, (Task_FuncPtr)heartBeatFxn, &taskParams, NULL); Hwi_Params_init(&hwiP); hwiP.arg=0; hwiP.eventId=39; hwiP.priority=0; hwi1=Hwi_create(39,hwiFxn,&hwiP,NULL); /* Turn on user LED */ GPIO_write(Board_LED0, Board_LED_ON); GPIO_write(Board_LED1, Board_LED_OFF); System_printf("Starting the example\nSystem provider is set to SysMin. " "Halt the target to view any SysMin contents in ROV.\n"); /* SysMin will only print to the console when you call flush or exit */ System_flush(); /* Start BIOS */ BIOS_start(); return (0); }
Also, in the workshop it says about Event id like for Tiva C Series;
I wonder that I am missing some point while setting Hardware Interrup? It would be very helpful to understand usage and settings for further use.
Best Regards,