Part Number: TMDSICE3359
Tool/software: Code Composer Studio
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.
Part Number: TMDSICE3359
Tool/software: Code Composer Studio
Hi Mehdi,
mehdi boukili said:For example the reponse time is 500µs with a simple ping (when the target received ten bits and respond ten bits at 921600 bps).
Does the response time get improved if you disable EDMA on UART4 (remove the dma properties in dts uart4 node)?
mehdi boukili said:When I send a lot of bytes (>1000) to the uart4 of evm there are the lost or crushing.
Did you enable hw flow control in this test?
Hi Bin Liu,
1. No with or without edma the response time is not better. I try without edma.
edma for uart4 is enable like this in .dts :
- -
- -
status = "disabled";
dmas = <&edma_xbar 34 0 9
&edma_xbar 35 0 10>;
dma-names = "tx", "rx";
2. No the hw flow control is disable. (tty.c_cflag &= ~CRTSCTS)
Hi Mehdi,
mehdi boukili said:1. No with or without edma the response time is not better. I try without edma.
Which tells the latency is not affected by EDMA. Please provide details how do you measure the response time.
mehdi boukili said:2. No the hw flow control is disable. (tty.c_cflag &= ~CRTSCTS)
Please check if the data loss still happens if HW flow control is enabled. Generally it is expected to have data loss if not use HW flow control.
Hi Bin Liu,
1. I deleted trace in driver uart (8250_omap.c) for control if the edma work and the response time is a few better. I measure the response time with logic analyzer.
I send a simple frame of eight bits and the am335x verify the CRC and respond ten bits.
2. I enable HW flow control and I have Always data loss (when i received over 200 bits).
Do you think than uart2 is faster uart4 because the dma is integrated ?
In other solution I think use the uart of a pru to be sure to have the expected performance.
Do you have a good documentation on the subject because I need transfert data at the processor ?
What do you think of solutions ?
Hi Mehdi,
mehdi boukili said:1. I deleted trace in driver uart (8250_omap.c) for control if the edma work and the response time is a few better.
Are you modifying the code in 8250_omap.c? Please provide the patch of your modification.
mehdi boukili said:I measure the response time with logic analyzer.
Please provide the details, pictures or anything showing the measurement.
mehdi boukili said:2. I enable HW flow control and I have Always data loss (when i received over 200 bits).
Please provide the details, the program you used, what data are send and what data are received.
Hi Bin Liu,
Sorry for late.
1. I not modified the code in 8250_omap.c, I just add a trace (printf) for verified the edma working. Now I deleted this trace.
2. The response time is now correct on uart4 with Edma x_bar (about 400µs).
3. My code is simple, I have a while(1) with read() on uart4. I analyse the frame received and return response. The speed is 921600 bps and I received about 2000 bytes each 50ms.
4. My last problem is that some bytes or frame its crushed. Maybe I should work out a buffering of the bytes to avoid microprocessor interruptions when receiving each byte (16550 instead 8250).
Or Maybe I should use thread with hight priority. What do you think ?
Hi Mehdi,
mehdi boukili said:1. I not modified the code in 8250_omap.c, I just add a trace (printf) for verified the edma working. Now I deleted this trace.
Ok, thanks for the clarification.
mehdi boukili said:2. The response time is now correct on uart4 with Edma x_bar (about 400µs).
Okay, improved, but it is not good enough for you, right?
mehdi boukili said:3. My code is simple, I have a while(1) with read() on uart4. I analyse the frame received and return response. The speed is 921600 bps and I received about 2000 bytes each 50ms.
Still not clear on what and how you did it. Do you calculate the response time in your code? You mentioned you used logic analyzer to measure the response time. So I am confused.
And who sends data to uart4, your code or a different program? What is the data pattern? how many bytes in each transfer? any delay in each transfer?
Please provide more details for me to understand what you are trying to do.
mehdi boukili said:4. My last problem is that some bytes or frame its crushed. Maybe I should work out a buffering of the bytes to avoid microprocessor interruptions when receiving each byte (16550 instead 8250).
Please provide the details, the program you used, what data are send and what data are received.
Hi Bin Liu,
2. The response time is now good for my application. This point is ok.
3. I measure the response time between evm TMDSICE3359 and my PC with logic analyser (Saleae). My PC send 20 frames of 100 bytes without delay to evm.
The evm analyse frame without treatment for the moment and respond. I test with speed 115200 bps (speed ref : 921600) and evm respond good at all demands.
4. At speed 921600 bps the evm don't respond at all request. There are 2/3 no response. I think than evm overwrite bytes.
Hi,
mehdi boukili said:2. The response time is now good for my application. This point is ok.
Ok. Thanks for clarifying.
mehdi boukili said:4. At speed 921600 bps the evm don't respond at all request. There are 2/3 no response. I think than evm overwrite bytes.
921600 baud rate is high, so please ensure you have hw flow control enabled in the test.
If you have already enabled hw flow control, please explain what '2/3 no response' is, does AM335x UART4 receive 100 bytes and it should send some data back but you don't observe the data on the logic analyzer?
Please explain your test and results in details, some pseudo code, diagram, or logs would help me understanding (otherwise, this thread could last forever but I still don't understand what you are doing...)
Hi,
Please, can you give me the exact procedure to activate the hw flow control of the uart4 (code and .dts if necessary).
Thanks.
Hi Mehdi,
To enable hw flow control, you typically set CRTSCTS flag in termios when opening the uart port. But I just checked the AM335x ICE board schematics, it seems the uart4 CTS/RTS pins are not available on any header, so basically you cannot use hw flow control for uart4 on the ICE board.
Hi Bin Liu,
Thanks a lot for response.
Do you have please a good manuel for implement uart PRU on evm ? If I use redundancy protocol PRP/HSR, I can easily use UART0 of PRU (PR1_UART0_TXD / PR1_UART0_RXD) ?
Best regard,
Mehdi
Hi Mehdi,
Your new PRU question is not relevant to the original uart4 question. Please open a new e2e thread for the new PRU question, so the query can be routed to the right personnel to provide you the best support.
Hi Bin Liu,
I have resolved my problem.
For the lost bytes i had a bug in my application. When I have a lot of bytes on uart, Read() api give me 48 bytes or more and sometimes the applicative cortex Don't have the time for process all bytes and my application don't keep old bytes.
Now all is good, I do read only when i have bytes (with select() api linux).
Thank a lot for helb Bin Liu