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 and the UART with SYS/BIOS GIO interface...

I have the UART2 setup in loopback mode and trying to test out a GIO driver for the UART on an expOMAP-L138 card.

I ported the PSPBIOS driver to work on the ARM and I am seeing some unexpected behavior.  I suspect part of the strangeness might be coming from the emulator and reading some other threads on UART issues it looks like that might be part of the problem.

So in the submit function I see the UART RX interrupts being enabled on the first call to the issue for the RX side.  The HWI then runs but the IIR NO Pending bit is set so the routine does nothing. 

The next operation is the issue to the TX side and the origonal code for the submit function basically setup the active packet and then enabled the UART TX interrupt.  It looks like the code was expecting the ISR to go off right away indicating that the TX is empty.  I don't get that.

So I modified the submit so that after enabeling the UART TX interrupt I called the TX swi function so that the first character would get loaded.  Now the HWI code gets called but again the IIR NO Pending bit is set.

I understand that if a memory window is open and the IIR is being read by the emulator it could be cleared.  Very bad.  My question has to do with if the register window is open but the UART2 is minimized, does that count?  I also have a variable that points to the UART registers so I could see that if that is open it could cause the same issue.  But what if it is minimized?  Will that cause the issue also?

I am putting a break point on the while instruction inside the HWI.  The IIR gets read just before and saved off in a status register and that status register is what I am using to see what the IIR is and seeing the NO PEND bit being set.

Thanks in advance for your help...

  • Hi Mike,

    Could you please mention, which version of the UART BIOSPSP driver you have ported?

    Mike Geppert said:
    I understand that if a memory window is open and the IIR is being read by the emulator it could be cleared. 

    Very true!

    Mike Geppert said:
    My question has to do with if the register window is open but the UART2 is minimized, does that count?

    No. This will not be a problem.

    Mike Geppert said:
    I also have a variable that points to the UART registers so I could see that if that is open it could cause the same issue.

    Yes, Thats's true

    Mike Geppert said:
    But what if it is minimized?  Will that cause the issue also?

    If the variable that points to the UART registers is not expanded(i.e, if minimized), then there will not be any issue.

    Mike Geppert said:
    The IIR gets read just before and saved off in a status register and that status register is what I am using to see what the IIR is and seeing the NO PEND bit being set.

    Ok. For easier debugging, start with a write. Place a break point in the ISR (uartIsr), Issue a write request from the application. As soon as it hits the breakpoint, open the memory window and read the IIR register. What is its value?. Hitting the breakpoint itself, ensures that there is an UART interrupt. If your memory window is closed, and the register is not accessed in any other window before reading it in the ISR, you should be able to get the appropriate status. 

    Knowing that you have ported the UART driver to run on ARM, first try to run the UART application in polled mode. Once this works on ARM, you can confirm that the basic functionalities and settings are appropriate. Next we can proceed to interrupt mode of operation. While porting to ARM, you will have to take care of the interrupt registration which is quite different from that of DSP. 

    Best Regards,

    Raghavendra

  • BIOSPSP version 3.00.01.00

    Thanks for all the comments...

    I am actually working on an SD driver now and will get back to the UART in a bit.

    Seems like anything I do, I can't get the PEND bit cleared while in Loop Back.  I think that if I just RX characters the ISR works fine.  I need to test it again but this was working.

    Thanks,