Using CodeWarrior 10.5, Kinetis MK12DX and Processor Expert. For AsynchroSerial component, is there a way to change the parity, width and stop bits at runtime?
Hi Steve Erickson o,
In my own opinion, you can modify the register directly, don't need to use the API.
Please note, if you want to enable the parity, then you need to modify data bit to 9bits to keep the data still be 8 data.
Just
1. UARTx_C1[M]=1 Use—start + 9 data bits (MSB/LSB first as determined by MSBF) + stop.
9 data bits is 8 bit data+1 bit parity.
2. UARTx_C1[PE] =1 Parity Enable
3. UARTx_C1[PT] =0 even parity, 1 odd parity.
Wish it helps you!
Have a great day,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------