µTasker Forum
µTasker Forum => µTasker general => Topic started by: Raffaele on May 26, 2020, 03:08:40 PM
-
Hi,
I setup a UART interface on a kinetis KL03 to Tx an Rx. The device can both receive and transmit. But I'm having a problem. Every time I receive a message, the device also sends back a sequence of 0x17 or 0x11 with some 0x19?
These seem to be control commands but I am not sure why, and if there is any way to remove them
Thank you
-
Hi
The command line interface will tend to echo input characters:
fnEchoInput(ucInputMessage, Length);
so if this is causing the transmission on each reception it could be that the baud rate is not matching and so multiple receive characters are detected and the 'strange' values detected are being echoed back (maybe at a different speed(?)).
Regards
Mark
-
thanks Mark.
I'll check that.
Since I define my own interface, which task or function could be echoing the characters? application.c does this but I don't call the task. Can I uncomment the fnEchoInput somewhere?
-
The task scheduled on each character reception is defined by tInterfaceParameters.Task_to_wake when the interface is opened.
How this task reacts to the input depends on its content.
Regards
Mark
-
Mark
is there a way to flush the Tx/Rx UART buffers?
-
As long as
SUPPORT_FLUSH
is enabled the TTY queues can be flushed with
fnFlush(serial_handle, FLUSH_RX);
fnFlush(serial_handle, FLUSH_TX);
The flush is only of SW queues and not the HW peripheral.
Regards
Mark