UART: 1500 microsecond delay between receiving and transmitting. Why?

tschak909
Posts: 36
Joined: Mon Oct 26, 2020 8:17 pm

UART: 1500 microsecond delay between receiving and transmitting. Why?

Postby tschak909 » Sun Oct 17, 2021 4:49 pm

I am dealing with some time sensitive code where I need to respond to a status message from a 1 wire serial bus.

What can account for a 1500 microsecond delay between receiving data on the UART and transmitting a response to the same UART?

-Thom

mikemoy
Posts: 604
Joined: Fri Jan 12, 2018 9:10 pm

Re: UART: 1500 microsecond delay between receiving and transmitting. Why?

Postby mikemoy » Sun Oct 17, 2021 6:14 pm

So your getting 1.5ms delay. How much faster were you expecting ?

tschak909
Posts: 36
Joined: Mon Oct 26, 2020 8:17 pm

Re: UART: 1500 microsecond delay between receiving and transmitting. Why?

Postby tschak909 » Sun Oct 17, 2021 6:23 pm

I need to be able to respond to a status request within 200 microsecconds.

-Thom

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

Re: UART: 1500 microsecond delay between receiving and transmitting. Why?

Postby ESP_Sprite » Mon Oct 18, 2021 12:57 am

The UART normally tries to collect as many bytes as possible to hand over to the software in one single interrupt; as such it has a timeout time in which it waits to see if there's any more data coming in before firing off an interrupt. You may want to modify rx_timeout_tresh to change this.

Who is online

Users browsing this forum: pankaj8at and 155 guests