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.

Interrupts not firing - what am I missing?

Other Parts Discussed in Thread: TMS320F28335

In a previous life I developed a C2000 app using  DSPBIOS. Now I'm back in the TI domain and am trying to setup TI-RTOS. Starting from known working non-RTOS code that uses interrupts, I'm trying to port this code to a TI-RTOS application. I've tried this with both an ADC interrupt and a UART interrupt and get the same results. I set it up as an HWI interrupt and also tried it outside of HWI. Same result - no interrupt triggers. It is odd that none of the examples use interrupts.

The OS is running fine. It runs my initialization routines, starts a couple monitoring tasks, sends messages to the console, blinks LEDs, etc. That tells me that global interrupts must be enabled for the task-switching to work. My own peripheral interrupts do not trigger.

I'm using CCSv6 on Linux, the TMS320F28335 processor and a Peripheral Explorer to build this application. My client's board will be ready in a couple of weeks. I'd like to have most of the code built and running before the board arrives.

Please point me to working TI-RTOS source that successfully triggers an interrupt through the PIE table and HWI.

  • I know the source of the problem and may soon have the answer. My functions are unable to modify the registers. I wonder if this is a linker command file problem that declares an area unwritable.

    The following line does not modify AdcRegs as anyone would expect it to.

    AdcRegs.ADCTRL1.bit.ACQ_PS = ADC_SHCLK;
  • I'll admit that I'm missing a major piece of this TI-RTOS puzzle. I put this line in my source to step through it. The DMA registers are not changed.

    DmaRegs.CH1.MODE.all = 0xffff;
    DmaRegs.DMACTRL.all = 0xffff;

    That explains why calling DMAInitialize() does nothing. It steps through and writes as expected in the non-RTOS version of this function.
  • I figured out the problem. The clock for each peripheral must be enabled. All is well and I'm on my way towards success.

    SysCtrlRegs.PCLKCR0.bit.ADCENCLK = 1; // ADC
    SysCtrlRegs.PCLKCR3.bit.DMAENCLK = 1; // DMA Clock
  • David,

    Welcome back to the world of BIOS. Glad you were able to get past this.

    Cheers,

    Steve