It looks like the nRF52840 only supports:
- 8 data bits
- 1/2 stop bits
- even/no parity
So 7E1 is not a supportable mode...is this true? is there a possible work around?
It looks like the nRF52840 only supports:
So 7E1 is not a supportable mode...is this true? is there a possible work around?
Hi,
I'm not sure I understand the issue 100% correct, but couldn't you just pad the data bits so that it becomes 8 bits?
regards
Jared
Hi,
Sorry if I wasn't very clear, we developed a modem and we are using the nRF52840 as our processor...so you suggesting when we set 7E1 we should just pad the data bits to make it 8 data bits format and then it will work?
Does that mean that the config 7E1 by itself doesn't work on the nRF52840 chip?
(sorry if my question seems rudimentary, Iam not a experienced programmer yet)
KR,
Keegan
This is when using the built in UART so I don't think it will be possible to do padding since we don't have control over it.
Padding would be possible if we were processing the raw serial input ourselves....correct?
The data buffer should be padded auto if the data buffer isn't 8 bits since the UART peripheral sends a byte at a time.
Sorry about the delay, I was away for a bit.
Then using this current chip and its built in UART you should be able to take a incoming 7E1 and it will auto configure it to 8E1? Iam I correct? Then my implementation must be incorrect.
Hi Keegan,
Jared is on vacation so I will take over the case.
nRF52840 only support 8 data bits and with even or no parity bit (8E1 or 8N1 we will ignore the 2 stop bit scenario as it's not relevant).
So it won't be compatible out of the box with 7E1.
If you use 8E1 then the number of bit transmitted or received will not match and it won't work.
The only option is to use 8N1 making it's the same number of bit on every frame (8 bit per frame)
But still this doesn't mean you can use 8N1 to communicate 7E1. You will need to add a workaround to translate from 7E1 to 8N1 when receiving the data from the modem. It is to ignore the last bit (the parity bit) and shift the data one bit to the left.
When transmitting you need to do the opposite, shift one bit to the right and then calculate the parity bit to add that in. 
Hi Keegan,
Jared is on vacation so I will take over the case.
nRF52840 only support 8 data bits and with even or no parity bit (8E1 or 8N1 we will ignore the 2 stop bit scenario as it's not relevant).
So it won't be compatible out of the box with 7E1.
If you use 8E1 then the number of bit transmitted or received will not match and it won't work.
The only option is to use 8N1 making it's the same number of bit on every frame (8 bit per frame)
But still this doesn't mean you can use 8N1 to communicate 7E1. You will need to add a workaround to translate from 7E1 to 8N1 when receiving the data from the modem. It is to ignore the last bit (the parity bit) and shift the data one bit to the left.
When transmitting you need to do the opposite, shift one bit to the right and then calculate the parity bit to add that in. 