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.

Issue with simultaneous Transmit and receive through UART on 5535 ezdsp

Hi All...


I have a requirement to get the audio samples from the audio jacks through I2C and I2S and DMA and process the samples and send out the packets to host through UART. At the same time the host will transmit similar packets that it receives from other card to my evm through UART.

UART is configured in interrupt mode.

Now if I only transmit to host and don't transmit from host then the code will run smoothly for ever.

But if I enable transmit on the host also so that the UART has a bidirectional data transfer then after some short duration, the UART hangs...There will be always some UART interrupt pending in IIR regsiter. Some times it will be just RDA interrupt or sometimes it will be RLS interrupt caused by Over run error.

I'm using all CSL library functions to configure the UART but the UART isr is configured using TCF file and HWI dispatcher.

I have tried FIFO enabled/ disabled. Changed the trigger levels. etc but still no use.

In the UART ISR, I just dump the data received to a queue and post an SWI and return. In the SWI I do the processing function.

Similarly for writing to UART, my audio sample process function will dump the packets to a write Queue and the uart tx function will take data from this queue and output on UART. This writing function is semaphore controlled task which waits for buffer ready semaphore.

I have gone through lot of already available discussions in the forum and found couple of cases which had the same issue. like the UART freeze after some time but the discussion did not help my case.

http://e2e.ti.com/support/dsp/c5000/f/109/t/91219.aspx

http://e2e.ti.com/support/dsp/c5000/f/109/t/116276.aspx

Please let me know what could be the issue here.

Thanks & Regards,

Ashok

  • Hi,

    Team will work on this and will provide an update on this request.

    Thanks & regards,

    Sivaraj K

  • Thanks for the response...


    I did some more experiments.

    When I just dump the received UART bytes to a circular buffer of some length, there is no issue and it runs freely. But when i try to consume the data in that circular buffer either in a TASK enabled with semaphore or an SWI, then I see this problem.

    Regards,

    Ashok

  • Ashok,

    Are you able to provide CCS test project that contains the source that uses a TASK or SWI that causes the issue?

    Regards,

    -Jon

  • Hi Jon,

    Thanks for the mail and sorry for not updating.

    I have solved the issue. I was using the UART interrupts only for reception and not for transmission. For transmission I was using the regular CSL library (UART_fputc). But I had enabled the UART Tx interrupt also. And this was the cause for my problem. Once I disabled the UART Tx interrupt, it started working smoothly.

    Thanks a lot again for all the time and efforts by you and your team.

    Regards,

    Ashok