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.

OMAP-L138's UART2 interrupt does not work in my example

Hi, I'm using example from quickStartOMAP package called UART_hyperteminal. I menage to send some strings in loop but I have problems receiving using interrupt. This is the code responsible for settings :

 

static void setup_DSP_INTC (void){

// Map UART2 system interrupts to DSP INT4

CSL_FINS(dspintcRegs->INTMUX1, DSPINTC_INTMUX1_INTSEL4,

CSL_INTC_EVENTID_UARTINT2);

// Assign the address of the IST to the IST pointer

ISTP = (unsigned int)intcVectorTable;

// Clear all CPU maskable interrupts

ICR = DSPINTC_IST_ALL_MASK_INT;

// Enable INT4 interrupts

IER = DSPINTC_IST_NMI | DSPINTC_IST_INT4;

}/* setup_DSP_INTC */

 

 

I also added source file 'intvecs.asm' like in mentioned example. Then activated interrupts on UART2 and tried to handle event in function: 

CSL_FINST(uart2Regs->IER, UART_IER_ERBI, ENABLE);

CSL_FINST(uart2Regs->IER, UART_IER_ETBEI, ENABLE);

interrupt void UART2_isr (void){   while(1);   }

while(1) because I want to stop main loop in which I'm sending some ASCII codes using UART just to check if HWI is working.

 

 

Can you help me?

 

PS: Sorry for code in normal text but I cant'find any useful options to include code in this forum. Is there any?

intvecs.asm
  • Have you confirmed that the CPU is actually receiving the interrupts as generated by the UART peripheral?

     

    You should be able to simply set a break point at the beginning of the ISR to check this.

  • How do I do that? I have to set  breakpoint in function 'interrupt void UART2_isr (void)' ? If that is correct then CPU does not receive request to handle INT. I changed beggining of ISR table and I think CPU should go there, unless you mean diffrent place. If you do, please say where.

     

    Is it possible I missed something in linking file? I converted my project to ccs4 and it result with waning that .vecs was created without section... I added section ".vecs > shared_ram" like rest of sections but it didn't help. 

     

    So, to sum up it's probably not even problem with soures files ( I showed them because I thought it is ) but  with addition project files for ccs4. When I was converting project to ccs3 I missed something related to covering interrupts. 

    Someone have an idea what is it? 

  • Pawel,

      You'll need to configure both the DSP Interrupt Service Table as well as the DSP Interrupt Controller. Please refer to the system reference guide for details on the DSP Interrupt controller, and the C674x DSP Instruction Set & Reference Guide for details on the DSP Interrupt Service Table Pointer.

  • I think I did that - I copy every variables and functions from example which was working in ccs4 and tried to run it on ccs3. Project was built successfully but I don't know what to change with .cmd file to make it work. I just added line: ".vecs  > shared_ram " in sections to add section with IST. Should I change more thinks?

  • Hi Pawel,

    If you still wish to develop using CCSv3, it may be a good idea to try converting the CCSv4 example (as is) and verify that the example still works (if you haven't already). If you are comfortable using CCSv4, it may be easiest to slowly start making changes to the example to narrow the scope as to why you are unable to receive interrupts.

    Also, be sure to enable the UART transmitter/receiver in the power management register and also to call the intrinsic function "_enable_interrupts".

    Hope this helps!

    Regards,
    Kevin

  • I handled situation. I was trying to convert project from ccs4 to ccs3 but I didn't know how.  

    I had problem with burning program for DSP which was working in ccs4 on(to) target  with aid of AISgen in package with ARM+DSP. I had working example from wiki so i tried to add code from UART example but interrupts didn't work. I still don't know why.

    What I did is change working in ccs4 DSP side example by adding so called entry_point(_cint_00) or something like that.

    Why my interrupts didn't work? I created 1 KB space awith ISRs and assigned begin of this section to ISTP then added this 1 KB section in .cmd file. Did I missed something?