I am working with the ESP-IDF and am having a vast amount of difficulty accomplishing a task with the UART.
I am trying to speak the LIN protocol over my UART. To do this I have to sense a frame break on the UART RX. (I can do this fine). Once the frame break comes through the device needs to parse in the next available character (the frame header) and then respond to the header using the TX.
My problem is in configuring the UART to be able to be flushed and read within 100 us. After the flush the next characters I get are never correct. I am wondering if I am misunderstanding some of the finer points of the function:
int uart_read_bytes(uart_port_t uart_num, uint8_t* buf, uint32_t length, TickType_t ticks_to_wait);
The data in my buffer after my flush then read call never makes sense.
UART Response Issue
Re: UART Response Issue
I have solved this problem. If anyone is interested in a solution please DM me.
Re: UART Response Issue
Hello!Rx-365 wrote: ↑Wed Jan 17, 2018 12:14 amMy problem is in configuring the UART to be able to be flushed and read within 100 us. After the flush the next characters I get are never correct. I am wondering if I am misunderstanding some of the finer points of the function:
int uart_read_bytes(uart_port_t uart_num, uint8_t* buf, uint32_t length, TickType_t ticks_to_wait);
The data in my buffer after my flush then read call never makes sense.
I'm experiencing the same issue.. How were you able to solve this?
Thx and greetings!
Who is online
Users browsing this forum: Bing [Bot], Gaston1980, Google Adsense [Bot] and 79 guests