UART over DMA, registers are missing in reference manual

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: UART over DMA, registers are missing in reference manual

Postby Ritesh » Mon Feb 26, 2018 5:05 pm

ESP_Sprite wrote:Well, unless I'm terribly mistaken, there is no UHCI driver in the current esp-idf, and the UART driver does not use any of the UHCI features, so no, there's nothing related to uhci just yet. I can't entirely tell when the driver is scheduled; my guess would be that it's going to go in 3.1.
Ok. Thanks for clarification.
Regards,
Ritesh Prajapati

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: UART over DMA, registers are missing in reference manual

Postby Ritesh » Tue Feb 27, 2018 9:29 pm

Hi Espressif Systems Developer,

Would you please let me know that UART DMA support with example will be included into ESP32 IDF 3.0 or 3.1 Stable Release?

Is there any tentative plan or schedule to include that support?

Because, We had checked that support initially into ESP32 IDF 2.1 and not found UART DMA related sample code and init sequence for that and we need it as high priority for our project requirement.

So, Please let me know if it will be delayed then we need to have backup plan to fill that DMA related Requirement gap.

Hope, you guys will understand my concern regarding UART DMA stuff.
Regards,
Ritesh Prajapati

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: UART over DMA, registers are missing in reference manual

Postby ESP_Sprite » Thu Mar 01, 2018 1:26 am

It will not be included in 3.0. It is scheduled for 3.1, but no guarantees there. What makes you so certain that you need DMA support and can't go with the normal, interrupt-based drivers, by the way?

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: UART over DMA, registers are missing in reference manual

Postby Ritesh » Thu Mar 01, 2018 1:37 am

ESP_Sprite wrote:It will not be included in 3.0. It is scheduled for 3.1, but no guarantees there. What makes you so certain that you need DMA support and can't go with the normal, interrupt-based drivers, by the way?
Hi,

Thanks for Update and Clarification.

Actually, We are using Interrupt based UART diver for UART communication into our product and it works fine till some point. We have few requirements like data will come every 50 or 100 msec from UART module which we need to parse and send it to cloud as well if external network connectivity into our gateway.

So, We sometimes found that we are not getting proper speed as per data coming from UART modules and some packets have been dropped.

Due to that reason, we need to move to DMA to achieve speed for that.

Hope you understood our requirement for that DMA.

Let me know if you need anything else from my side.
Regards,
Ritesh Prajapati

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: UART over DMA, registers are missing in reference manual

Postby ESP_Sprite » Thu Mar 01, 2018 7:32 am

'Every 50 to 100 msec' is an eternity for a chip like the ESP32, especially because the UART has pretty deep FIFOs and while an interrupt can take a while to kick in, it's usually in the order of microseconds. Are you absolutely 100% sure the issue is in the CPU being overloaded due to interrupts moving data from the UART FIFO to memory? Because that is the only thing that using DMA will solve.

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: UART over DMA, registers are missing in reference manual

Postby Ritesh » Fri Mar 02, 2018 2:55 am

ESP_Sprite wrote:'Every 50 to 100 msec' is an eternity for a chip like the ESP32, especially because the UART has pretty deep FIFOs and while an interrupt can take a while to kick in, it's usually in the order of microseconds. Are you absolutely 100% sure the issue is in the CPU being overloaded due to interrupts moving data from the UART FIFO to memory? Because that is the only thing that using DMA will solve.
Hi,

Actually, I dig into URT driver and found that there is internal UART FIFO and Ring Buffer has been used which we are generally passing while configuring UART driver.

On top of it, We are receiving data event on every Interrupt and filling that data into application ring buffer which I am going to parse into separate task.

So, when I was checking with 500 msec data coming from both UART that works fine without any issue but when I checked with 100 or 50 msec of data at that time we found that some packets have been dropped and not getting that much of speed as per baudrate like 115200 in which we are communicating over UART.
Regards,
Ritesh Prajapati

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: UART over DMA, registers are missing in reference manual

Postby ESP_Sprite » Sat Mar 03, 2018 4:16 am

So, you are receiving data at a speed of one packet per 50 or 100 msec, at 115200 baud? How did you configure your UART driver?

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: UART over DMA, registers are missing in reference manual

Postby Ritesh » Sat Mar 03, 2018 1:26 pm

ESP_Sprite wrote:So, you are receiving data at a speed of one packet per 50 or 100 msec, at 115200 baud? How did you configure your UART driver?
Yes. The opposite UART module is sending data every 50 to 100 msec in 115200 baudrate.

We have configured both UART driver except debug console UART with 2 KBytes TX buffer and 4 KBytes RX buffer without RTS/CTS and 115200 baudrate.

Then we had created task for that UART to receive data in queue and fill that data into Application Ring Buffer which is of 2 KBytes.
Regards,
Ritesh Prajapati

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 115 guests