This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Space Parity

Hi,

I am trying to send data over UART to a dispensing unit using Space Parity but am unable to do so since NRF51 only supports Even Parity. Is there any work around through which I could send my data over UART using Space Parity?

Regards,

Rahul.

Parents Reply Children
  • Unfortunately, there is no way to do this straight forward. The parity bit is created and sent by the UART, which is a HW component, so it is not a buffer containing 9 bits. I guess you can try and manipulate the driver to put the TX pin in a low state for x ms (x depending on your baudrate), but this is a dirty workaround, and may cause other issues e.g. with the softdevice. 

    In that case, look into nrfx_uarte_tx() and see whether you can find where the byte has been transferred, and try setting the pin manually. I actually doubt that this will work, because it is also not possible to manipulate the UART to change from even to odd parity.

    Since the parity bit comes before the stop bit, I believe you will have a hard time finding the spot where the data has been sent, but not the stop bit. It looks like what you are trying to do will not work with the nRF52 series.

    I am sorry, it is probably not what you want to hear, but it is the case.

    Best regards,

    Edvin

  • Oh ok I will try somewhat manually setting the pin. Anyways thankyou so much for your time and assistance ,appreciate the help! 

    Regards,

    Rahul Shewani.

Related