I am experiencing an issue with LPUART0. When transmitting data from LPUART0 to a PC, the received data appears bit-reversed.
For example:
When I transmit 0x01, the PC receives 0x80.
When I transmit 0x55, the PC receives 0xAA.
To work around this, I implemented a software bit-reversal, but this is obviously not the correct solution.
This behavior suggests that the bit order may be configured incorrectly (possibly MSB/LSB first or a shift/misalignment issue). I would like to confirm whether my LPUART0 configuration is wrong or if there is a specific register or setting that controls bit order or data shifting.
Any guidance on proper LPUART0 configuration would be appreciated , or example.
Hi
Is your project based on baremetal, SDK, or RTD? I tested the SDK and RTD examples and didn't encounter this problem.
Please check the MSBF bit configuration of "53.3.1.7 LPUART Status Register (STAT)" in your project. The default configuration is LSB.
Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "ACCEPT AS SOLUTION" 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.
-------------------------------------------------------------------------------