Uart driver with transmit buffer & interrupt

tve
Posts: 123
Joined: Sun Feb 15, 2015 4:33 pm

Uart driver with transmit buffer & interrupt

Postby tve » Tue Feb 17, 2015 4:25 pm

Does anyone have some code to buffer uart output (TX) and send characters to the uart using an interrupt? The driver in the AT demo only uses interrupt for RX. Thanks!

BTW: does anyone know how deep the uart TX fifo is?

costaud
Posts: 138
Joined: Fri Oct 24, 2014 7:40 pm

Re: Uart driver with transmit buffer & interrupt

Postby costaud » Wed Feb 25, 2015 10:04 pm

tve wrote:Does anyone have some code to buffer uart output (TX) and send characters to the uart using an interrupt? The driver in the AT demo only uses interrupt for RX. Thanks!

BTW: does anyone know how deep the uart TX fifo is?


I will update a uart buffer and interrupt instruction.
The UART tx/rx FIFO depth is 128 bytes.

tve
Posts: 123
Joined: Sun Feb 15, 2015 4:33 pm

Re: Uart driver with transmit buffer & interrupt

Postby tve » Wed Feb 25, 2015 11:50 pm

Cool, thanks, looking forward to it! I fixed-up the uart.c that comes with the FreeRTOS SDK (https://github.com/jeelabs/esp8266-brid ... ver/uart.c if anyone cares) but stopped short of adding TX interrupt support. I'm using 115200baud and I realized that with a 128 char buffer I can simply delay for a tick (~10ms) if the HW buffer is full 'cause the buffer holds ~11ms worth of data.

costaud
Posts: 138
Joined: Fri Oct 24, 2014 7:40 pm

Re: Uart driver with transmit buffer & interrupt

Postby costaud » Sat Apr 18, 2015 1:08 am

tve wrote:Does anyone have some code to buffer uart output (TX) and send characters to the uart using an interrupt? The driver in the AT demo only uses interrupt for RX. Thanks!

BTW: does anyone know how deep the uart TX fifo is?


Demo here:
viewtopic.php?f=7&t=48&p=173#p173

tve
Posts: 123
Joined: Sun Feb 15, 2015 4:33 pm

Re: Uart driver with transmit buffer & interrupt

Postby tve » Sat Apr 18, 2015 1:48 pm

Nice, thanks!

Who is online

Users browsing this forum: No registered users and 23 guests