Page 1 of 1
Setting the uart buffer threshold but not working the way I think it works
Posted: Fri Nov 05, 2021 4:53 pm
by noweare
Hello,
I am setting the uart rx threshold value to 8 ( .rx_flow_ctrl_thresh = 8) I thought it would cause a UART_BUFFER_FULL event after sending 8 characters to the rx port but it seems not to. I do have .flow_ctrl = UART_HW_FLOWCTRL_DISABLE. Does that cause the threshold value to be ignored ?
Thank you
Re: Setting the uart buffer threshold but not working the way I think it works
Posted: Sat Nov 06, 2021 4:15 am
by WiFive
Try rxfifo_full_thresh
Re: Setting the uart buffer threshold but not working the way I think it works
Posted: Mon Nov 08, 2021 9:29 pm
by noweare
Having problems getting the uart interrupt working without panicking when I input a character.
I don't know if I am understanding the uart correctly but if I just install the driver and don't register an uart interrupt routine then
a state machine handles the details of getting input into the rxfifo then I can respond to uart events.
I could not find an example of using a uart interrupt on the expansive www and I've read the docs at least a few times but obviously doing something incorrectly.
~Joe
Re: Setting the uart buffer threshold but not working the way I think it works
Posted: Tue Nov 09, 2021 5:35 pm
by WiFive
The uart has a hardware state machine that receives bytes into the fifo. The uart driver has an isr that copies bytes into the rxbuffer on full or idle. Ideally you just use a high priority task which waits for data. If necessary you can decrease latency by using menuconfig option to place uart isr in iram. Unless you have very specific requirements it should not be necessary to use a custom isr.