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 Universal Paralell Port (UPP) transmission and reception blocks

Other Parts Discussed in Thread: OMAP-L138

Hello,

I was using OMAP-L138 DSP UPP for data transmission and reception with a single OMAP Kit using channel Q for TX and channel I for RX. I configured UPP to transmit and receive dividing the signal into blocks and I did it in a loop, like this (it's not the whole loop, just the lines related to UPP):

while(1){
    // DMA TX polling
      UPP->UPQD0 = dma_tx_data + (uint32_t)(i*DMA_LINE_SIZE);
      UPP->UPQD1 = ((DMA_WINDOW_SIZE&0xffff)<<16) | (DMA_LINE_SIZE&0xffff);
      UPP->UPQD2 = (DMA_LINE_SIZE&0xffff);
      i++;
    // DMA RX polling
      UPP->UPID0 = ((uint32_t)dma_rx_buffer) + ((uint32_t)(i*DMA_LINE_SIZE));
      UPP->UPID1 = ((DMA_WINDOW_SIZE&0xffff)<<16) | (DMA_LINE_SIZE&0xffff);
      UPP->UPID2 = (DMA_LINE_SIZE&0xffff);
      j++;
}

where DMA_LINE_SIZE is 32768 and DMA_WINDOW_SIZE is 1.

Now I wanted to do it with 2 OMAP Kits, independing TX and RX. And I would like to transmit the whole signal in a time and then receive it. To make it transmit the whole signal I configured the UPP of the TX Kit like this:

UPP->UPQD0 = dma_tx_data;
UPP->UPQD1 = ((DMA_WINDOW_SIZE_NEW&0xffff)<<16) | (DMA_LINE_SIZE&0xffff);
UPP->UPQD2 = (DMA_LINE_SIZE&0xffff);

where DMA_LINE_SIZE is 32768 and DMA_WINDOW_SIZE_NEW is 32 (to complete the size of the signal, which is 1048576)

And to make it recieve the whole signal I configured the UPP of the RX Kit like this:

UPP->UPID0 = ((uint32_t)dma_rx_buffer);
UPP->UPID1 = ((DMA_WINDOW_SIZE_NEW&0xffff)<<16) | (DMA_LINE_SIZE&0xffff);
UPP->UPID2 = (DMA_LINE_SIZE&0xffff);

where DMA_LINE_SIZE is 32768 and DMA_WINDOW_SIZE_NEW is 32 (to complete the size of the signal, which is 1048576)

I don't know if it is enough to configure more lines per window (32 instead of 1) and doing it without a loop, or I have to configure some fields else of the UPP... but it doesn't work like this. Maybe some of you can help me. It would be great if you answer me, thank you very much!

Pablo

  • Pablo,

    Your parameters and general thought process seem correct.  When you say that it doesn't work, do you mean that both sides (transmit and receive) fail to complete?  If so, do you receive any data at all?

    It's also possible that the problem is not software-related, but that there is some issue with how you are connecting your EVMs together.  I recommend taking a look at the following wiki page (describing a TI PSP driver-based example application) to see how your connections compare.

    It could also be that your two applications are not synchronized properly, especially if both applications are attempting to transmit and receive simultaneously.

    Hope this helps.

  • Thanks a bunch for you answer Joe!

    In fact I still don't have 2 EVM, I'm trying that way with only one EVM first, but using independent functions just to see it works, and then I'll try with 2 EVM.

    What I meant was that the TX fail because it transmits a signal that is not what i want to transmit, maybe it is always the same block repeated. And also in RX, I only receive the first block of 16384 samples, despite I configured it to receive 32 lines of 32768 samples. I don't know if the problem is that I'm not configuring that mode of TX/RX "everything in a block" properly.

    I will have a look to that site anyway! Thanks!

    Thanks again and I hope you can help me again!

    Pablo

  • I mean, ¿is there a mode that allows me to trasmit and receive (sequentially, first the whole transmit and then the whole receive) such a big block (1048576 samples)? As I'm doing it right now it seems that it only transmits and receives 16384 samples each time, and logically it only receives the last little block that was transmitted.

    I don't know if I explained it properly, sorry.

    Pablo

  • Pablo,

    If you see the first "line" of data repeated by the transmitter, that could imply that your DMA line offset is being incorrectly set to 0.  That would mean that each line is actually being sent from the beginning of the overall transmit buffer.  Similarly, if your receive buffer seems to only contain a single line of data, that could also be caused by the line offset being set to 0.  From your code in the original post I would not expect that to happen, but I still recommend double checking to make sure that the correct values are being applied to the DMA descriptor registers.  Also, check to make sure that your register access is "volatile" to ensure that the compiler is not optimizing out register reads/writes.

    Do you have end of line (EOL) interrupts enabled?  If so, do you see more than one EOL event, or do you only see one?  Do you also see an end of window (EOW) event?