After close to a day of struggling, I've finally managed to bully the fsl_uart driver to work with my RS485 direction control line. I've used the following...
| UART_Type * base = g_uartBase[ FSL_UARTCOM3 ]; |
| UART_HAL_SetTransmitterRtsCmd( base, true ); |
| UART_HAL_SetTransmitterRtsPolarityMode( base, true ); |
to force the K10 hardware to use the RTS line as RS485 direction control. This is standard practice as far as I can tell, and just replicates IO_SERIAL_HW_485_FLOW_CONTROL in the old MQX drivers.
Couple of questions...
1. Does the fsl_uart driver not support this concept in any way?
2. Assuming the answer to 1 is no, then is this the most elegant way of achieving the end goal with KSDK? I'm a noob to KSDK, having been using raw MQX/drivers up to now. It seems like an incredibly clunky way to do things.
Cheers in advance,
NDBill