commx93 wrote:I need to transfer frames of 9bits over UART (9 data bits + no parity + 1 stop bit). Having already checked, I see there is no native support for 9bit data frames on ESP32. However, I'd like to ask if the following is possible?
1. Construct the 9 bits that need to be transferred.
2. Observe the 9th bit, depending on its value, set the parity to either odd or even so that the parity bit would be equal to the 9bit.
3. Transmit the 8bit frame (and automatically the parity bit that represents the 9th bit).
1. Get the received 8bit frame. Get the parity check result.
2. Depending on the currently set parity, calculate what would be considered the "valid" bit for the selected parity. Then, based on whether there was a parity success/error, find out what the 9th bit is.
I need to know:
- Would this approach work on ESP32?
- Does the chip retain the 8 bits received over RX even in the case of parity check error (or does it empty the register in such case automatically)?
1 post • Page 1 of 1
Who is online
Users browsing this forum: Bing [Bot], Ritesh and 12 guests