For a Cpu:MKL26Z128VFT4 part, I'm looking to use UART0 as HalfDuplex RS485.
In the registers I think this means setting
Uart0_S2: set LOOPS=RSRC=1
and then managing the single pin with
Uart0_C3:TXDIR 1 Tx Output else 0 Rx Input
I'm using KDS300 so in PEgenerate code for LoopMode - but now I get
| Description | Resource | Path | Location | Type |
| Generator: FAILURE: at line 1769: Error in including "Drivers\Common\AsynchroMasterLoopMode.inc" from directory C:\n\bin\Freescale\KDS_3.0.0\eclipse\ProcessorExpert\Repositories\Kinetis_Repository (file: Drivers\Kinetis\AsynchroSerial.drv) | Test2 | | AScust | Processor Expert Problem |
So to make it work, I turn off PEgeneratr code for LoopMode - and then update the registers directly.
UART0_PDD_SetLoopMode(PeripheralBase, UART0_PDD_LOOP_MODE_RX_TO_TX_PIN)
UART0_PDD_SetTxPinDataDirection(PeripheralBase, UART0_C3_TXDIR_MASK)
I can't see how to disable the assignment of the UART0:Rx to a hardware pin.
Is there a more defined way of doing it. Thanks