I use ccs Version: 6.1.0.00104 and install TI-RTOS for Simplelink (tirtos_simplelink_2_14_01_19) from App Center,
and then use the example of pinInterrupt.
Hwi instance is added through the GUI of cfg.
The followings are then appended to pinInterrupt.cfg
var halHwi0Params = new halHwi.Params();
halHwi0Params.instance.name = "halHwi0";
halHwi0Params.priority = 1;
halHwi0Params.maskSetting = xdc.module("ti.sysbios.interfaces.IHwi").MaskingOption_ALL;
halHwi0Params.enableInt = true;
Program.global.halHwi0 = halHwi.create(16, "&hwi_isr", halHwi0Params);
In the pinInterrupt.c , the callback function is disabled by remarking it.
/* Setup callback for button pins */
// if (PIN_registerIntCb(buttonPinHandle, &buttonCallbackFxn) != 0) {
// System_abort("Error registering button callback function");
// }
the following function is added into the pinInterrupt.c for an interrupt call.
void hwi_isr (void)
{....}
When compiling the code, there are 73 warnings which are all about the Hwi. the followings are two of them.
#48-D incompatible redefinition of macro "Hwi_clearInterrupt" (declared at line 652 of "C:/ti/tirtos_simplelink_2_14_01_19/products/bios_6_42_02_29/packages/ti/sysbios/hal/Hwi.h") .ccsproject /pinInterrupt_CC2650DK_TI_CC2650F128 line 1289, external location: C:\ti\tirtos_simplelink_2_14_01_19\products\bios_6_42_02_29\packages\ti\sysbios\family\arm\m3\Hwi.h C/C++ Problem
#48-D incompatible redefinition of macro "Hwi_construct" (declared at line 670 of "C:/ti/tirtos_simplelink_2_14_01_19/products/bios_6_42_02_29/packages/ti/sysbios/hal/Hwi.h") .ccsproject /pinInterrupt_CC2650DK_TI_CC2650F128 line 1318, external location: C:\ti\tirtos_simplelink_2_14_01_19\products\bios_6_42_02_29\packages\ti\sysbios\family\arm\m3\Hwi.h C/C++ Problem
When entering the debug mode, I set breakpoint to "ledPinHandle = PIN_open(&ledPinState, ledPinTable);"
and the first code of hwi_isr. Both codes have never been reached.
Have I missed out anything to set the Hwi?
Regards, Thomas