Other Parts Discussed in Thread: SYSBIOS
Tool/software: TI-RTOS
Platform: ek-tm4c1294xl using TI-RTOS 2.16.1.14 and XDCtools 3.32.00.06
CCS version: 7.3
Using the GUI, I added a one-shot timer that I want to start manually in a function when a hardware interrupt fires. When I wrote a call to Timer_start() and then built the project, CCS claimed the identifier was undefined even though the timer's handle appears both in the .cfg script and when I "Open declaration" on the handle in the main .c file. The one-shot timer should run for 5 seconds and then call sigWatchTimerISR. Here is the code. If you need more, let me know and thank you for your help.
.cfg script code autocreated because of GUI config:
timer0Params.instance.name = "sigWatchTimer";
timer0Params.period = 5000000;
timer0Params.startMode = xdc.module("ti.sysbios.interfaces.ITimer").StartMode_USER;
timer0Params.runMode = xdc.module("ti.sysbios.interfaces.ITimer").RunMode_ONESHOT;
Program.global.sigWatchTimer = Timer.create(-1, "&sigWatchTimerISR", timer0Params);
main.c code where error is thrown:
Timer_start(sigWatchTimer);
error:
Description Resource Path Location Type
#20 identifier "sigWatchTimer" is undefined empty.c /gpioSigWatch line 82 C/C++ Problem
To the best of my understanding (I'm new to RTOS), i followed the instructions listed for the Timer_start() function found in the help section shown below. NOTE: I haven't added the thread protection yet.
Timer_start() // instance | ![]() |
Reload and start the timer
C synopsis | target-domain |
// disable interrupts if an interrupt could lead to // another call to Timer_start(). key = Hwi_disable(); Timer_stop(); ... Timer_start(); Hwi_restore(key);