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.

eZ dsp TMS320F2812 input interrupt

Other Parts Discussed in Thread: TMS320F2812, SPRC097

Hi Ti guys,

We are two guys using the eZ dsp TMS320F2812 for a University project, and We are using Code Composer Studio v.4.1. And right now we are running a few tests, but facing few troubles regarding the tasks we want the DSP to do for us.

- Give an input to GPIOE0 and constantly see if the pin goes high or low (depending on what input we are giving it (High[1] / Low[0]) by monitoring GPIOA1, with real time silicon refresh.

We are using the example Example_281xIdleWake.c from the TI example files SPRC097 (C281x C/C++ Header Files and Peripheral Examples). The program causes an interrupt to occur when a qudrature (or DC) signal goes from high[1] to low[0].

What we wish to do, is resetting the interrupt register, so we can run the example again a observe the changes we make with real time silicon refresh, without resetting the DSP program, but we don't not know which register we need to reset.

Best regards
Dado and Jonas

  • No one who can help us ?

  • Hello Guys,

    You posted this to the ARM group.  This would need to go to a DSP group that supports the device you are looking at. 

  • Hello Jeff,

    Since this forum is very  confused, we didn't know where to put this thread! We searched for similar problems, and found some of the threads in this category. Since you are TI Employee, could you please move it to the right category or give me a link to it.?

  • The code we have added in the example, under LPM code value is seen below. Please don't hesitate if necessary. Feel free to ask. This is our first time, working with a DSP.

    // Write the LPM code value

      EALLOW;
      SysCtrlRegs.LPMCR0.bit.LPM = 0x0000;   // LPM mode = Idle
      EDIS;
      asm(" IDLE");                      // Device waits in IDLE until XINT1 interrupts
      while(1){

    if (GpioDataRegs.GPADAT.bit.GPIOA1 == 1)

    {
    XIntruptRegs.XINT1CR.bit.ENABLE = 0; // Dissables interrupts
    GpioDataRegs.GPACLEAR.bit.GPIOA1= 0; // AND the pin is an output, then pull the pin low  | 1 = Pull the pin to low | 0 = Pull the pin to high GpioDataRegs.GPASET.bit.GPIOA1 = 1;
    XIntruptRegs.XINT1CR.bit.POLARITY = 0;  // high-to-low mode
    XIntruptRegs.XINT1CR.bit.ENABLE = 1; // Enables interrupts

    }

    else if (GpioDataRegs.GPADAT.bit.GPIOA1 == 0)

    {
    XIntruptRegs.XINT1CR.bit.ENABLE = 0; // Dissables interrupts
    GpioDataRegs.GPACLEAR.bit.GPIOA1= 1; // AND the pin is an output, then pull the pin low  | 1 = Pull the pin to low | 0 = Pull the pin to high
    GpioDataRegs.GPASET.bit.GPIOA1 = 0;
    XIntruptRegs.XINT1CR.bit.POLARITY = 1;  // low-to-high mode
    XIntruptRegs.XINT1CR.bit.ENABLE = 1; // Enables interrupts
    }

    }