Hello,
I am not seeing the clock call back getting called.. I don't see the debug prints that I have added. THe code compiles fine, however I don't see the msgs that I have added every 100ms (periodic timer).. I have included the clock.h in the header file.. Also I ensure that in the .cfg file the clock module has been selected.
Can you please suggest where the problem might be?
Void pa_bcs_invoke_controller_interrupt(UArg arg0)
{
Bool exit_api = FALSE;
Display_Params params;
Display_Params_init(¶ms);
params.lineClearMode = DISPLAY_CLEAR_BOTH;
Display_Handle lcdDisplayHandle1 = Display_open(Display_Type_LCD, ¶ms);
if (++display_line_num > 5)
{
display_line_num = 0;
}
Display_print0(lcdDisplayHandle1, ++display_line_num, 0, "PA_BCS: Invoke Controller \n");
Semaphore_pend(semHandle1, BIOS_WAIT_FOREVER);
while (1)
..........
* ======== main ========
*/
int main(void)
{
Semaphore_Params semParams;
Semaphore_Params semParams1;
/* Call board init functions. */
Board_initGeneral();
/* Open LED pins */
ledPinHandle = PIN_open(&ledPinState, pinTable);
if(!ledPinHandle)
{
System_abort("Error initializing board LED pins\n");
}
/* Construct a Semaphore object to be use as a resource lock, inital count 1 */
Semaphore_Params_init(&semParams);
Semaphore_construct(&semStruct, 1, &semParams);
/* Obtain instance handle */
semHandle = Semaphore_handle(&semStruct);
Semaphore_Params_init(&semParams1);
Semaphore_construct(&semStruct1, 1, &semParams1);
/* Obtain instance handle */
semHandle1 = Semaphore_handle(&semStruct1);
/* Construct BIOS Objects */
/*Setup clock for every 100ms*/
Clock_Params clkParams;
Clock_Params_init(&clkParams);
clkParams.period = 100000/Clock_tickPeriod;
clkParams.startFlag = TRUE;
/* Construct a periodic Clock Instance */
Clock_construct(&clk0Struct, (Clock_FuncPtr)pa_bcs_invoke_controller_interrupt,
100000/Clock_tickPeriod, &clkParams);
/* Initialize task */
TaskInit();
/* Start BIOS */
BIOS_start();
return (0);
}
Thanks,
krishna