This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/EK-TM4C1294XL: CCS claims undefined identifier for a timer handle that WAS statically configured in .cfg script

Part Number: EK-TM4C1294XL
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
Void Timer_start(Timer_Handle handle);
 

ARGUMENTS
handle — handle of a previously-created Timer instance object

DETAILS
Thread safety must be observed when using the start and stop APIs to avoid possible miss- configuration of the timers and unintended behaviors. To protect against re-entrancy, surround the start/stop invocations with Hwi_disable() andHwi_restore() calls:
  // disable interrupts if an interrupt could lead to
  // another call to Timer_start().
  key = Hwi_disable();
  Timer_stop();
  ...
  Timer_start();
  Hwi_restore(key);

SIDE EFFECTS
Enables the timer's interrupt.