UART Response Issue

Rx-365
Posts: 10
Joined: Wed Jan 17, 2018 12:08 am

UART Response Issue

Postby Rx-365 » Wed Jan 17, 2018 12:14 am

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.

Rx-365
Posts: 10
Joined: Wed Jan 17, 2018 12:08 am

Re: UART Response Issue

Postby Rx-365 » Thu Jan 18, 2018 9:50 pm

I have solved this problem. If anyone is interested in a solution please DM me.

Gianlu
Posts: 1
Joined: Thu Jan 20, 2022 10:00 pm

Re: UART Response Issue

Postby Gianlu » Thu Jan 20, 2022 10:04 pm

Rx-365 wrote:
Wed Jan 17, 2018 12:14 am
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.
Hello!

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