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

Is it possible to invert the UART/UARTE logic in the nRF52832?

We have a need to invert the TTL logic for the serial interface. All our "Unique" SWI serial interfaces use an inverted logic e.g. idle state 0 instead of idle state 1.

This has a number of benefits for us in the systems our hardware is designed to run on. We have a number of existing products which use an AVR processor which supports this configuration, and it is easy to implement. We now want to implement this with an nRF52832 based module and would prefer not to add a hardware inverter, if possible.

However I cannot see in the configuration files an method to configure the onboard UART/UARTE device in a similar manner, but I am not confident with all the features and capabilities of the nRF52832 yet.

The other possibility is to use a software serial function instead (we only need to support 9600 or 19200 baud, and only send and receive 8-10 byte packets once or twice a day.) Has anyone successfully implemented this within the nRF52832?

Parents
  • Hi

    The method described by Dmitry is doable, but as he mentions it will affect current consumption quite a lot. 

    A while back there was a project in Nordic to implement an extra UART in the nRF52 using the PWM and SAADC modules. The PWM was used to generate the TX signal, by only using 0 or 100% duty cycle and matching the PWM update frequency to the baudrate. The SAADC was used to sample the RX. 

    Since both the PWM and SAADC use easyDMA they can run concurrently with the SoftDevice. 

    I will have to do some digging internally to see where the example was published and get back to you. If you only need to send data once in a while I think this driver should work fine. 

    Best regards
    Torbjørn

Reply
  • Hi

    The method described by Dmitry is doable, but as he mentions it will affect current consumption quite a lot. 

    A while back there was a project in Nordic to implement an extra UART in the nRF52 using the PWM and SAADC modules. The PWM was used to generate the TX signal, by only using 0 or 100% duty cycle and matching the PWM update frequency to the baudrate. The SAADC was used to sample the RX. 

    Since both the PWM and SAADC use easyDMA they can run concurrently with the SoftDevice. 

    I will have to do some digging internally to see where the example was published and get back to you. If you only need to send data once in a while I think this driver should work fine. 

    Best regards
    Torbjørn

Children
Related