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.

TMS320F28055: Unable to call Timer 2 interrupt

Part Number: TMS320F28055
Other Parts Discussed in Thread: C2000WARE

Hi,

 

I am using the TMS320F28055 chip and I am working off of proj_lab01.c from the SpinTAC Labs Library. I am having trouble triggering a Timer 2 ISR. I can see that Timer 2 is working and I can control Timer 2 with the following library functions: TIMER_reload(obj->timerHandle[2]) , TIMER_start(obj->timerHandle[2]) and TIMER_stop(obj->timerHandle[2]). However, when I try to add my own Timer 2 ISR function, it never gets called. Below is the Timer 2 ISR function: 

interrupt void timer2_ISR(void)
{
    timerisr_count++;
    HAL_Obj *obj = (HAL_Obj *)halHandle;
    HAL_toggleGpio(halHandle, HAL_Gpio_LED2)

}

Also, this is how I add the Timer 2 ISR to the PIE Vector Table in hal.h:

static inline void HAL_initIntVectorTable(HAL_Handle handle)
 {
  HAL_Obj *obj = (HAL_Obj *)handle;
  PIE_Obj *pie = (PIE_Obj *)obj->pieHandle;

  ENABLE_PROTECTED_REGISTER_WRITE_MODE;

  pie->Reset = (PIE_IntVec_t)0x0b55aa;
  pie->INT1 = NULL;
  pie->INT2 = (PIE_IntVec_t)0xbfff04;

  pie->XINT3 = &ChipSelectISR;
  pie->XINT1 = &IBFsignalISR;
  pie->XINT2 = &OBFsignalISR;

  pie->I2CINT1A = &i2caIntISR;

  pie->SCIRXINTA = &sciarxISR;
  pie->SCIRXINTB = &scibrxISR;
  pie->SCIRXINTC = &scicrxISR;
  pie->TINT2 = &timer2_ISR;

  DISABLE_PROTECTED_REGISTER_WRITE_MODE;

  return;
 }

 

Attached is a screenshot of the timer registers at runtime:

Is there something I'm missing or could someone send an example outlining the way to add a timer ISR to proj_lab01 of the InstantSpin Motion Labs Project?

 

Thanks,

Gb