Does the nRF52840 only supports 8N1

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?

Parents Reply Children
  • 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. 

Related