On a K20 Chip (MK20DN512VMD10) with MQX 4.1.
I am trying to run a UART with a RS485 transmitterdevice which I am controlling with the RTS (request to send).
My Problem now is that, as soon as I use higher baudrates (i.e. more than 9600) on the UART the timing of the RTS seems to be messed up (see image) or the
UART itself has interruptions while sending bytes.
The RTS goes down between some bytes which, in my case, deasserts the RTS and disables the transmission of the attached transmitter.
I don't think that this is actually wrong from the view of the RTS but either my RS485 Adapter or the Serial Console interprets the transmission interruption as a Stop.
So the question would be: How can i get my UART to run with high baudrates so that it doesn't have those interruptions in the transmission?
This never seemed to be a problem with the normal serial driver.
I am using the polled serial driver which i am opening/configuring accordingly:
#define BSP_DEFAULT_IO_OPEN_MODE (void *) ( IO_SERIAL_XON_XOFF | IO_SERIAL_TRANSLATION | IO_SERIAL_HW_485_FLOW_CONTROL /*| IO_SERIAL_ECHO*/)
Btw. I found - and correct me if I am wrong - that one cannot use the IO_SERIAL_ECHO for RS485 with half-duplex use, since the driver (serl_pol.c) is implemented to echo each character
on the serial line and therefore deasserts the RTS and data loss occures if more than one byte should be received.