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

NRF52832 bit band uart problem 19200 baudrate

Dear all,

We are using nrf52832 as our main MCU. In our development we need two uart. Among them first is Hardware uart which is working perfectly and second is software uart for which we need some help.

In our application we are using software uart with soft device. Actually we are using software uart for rf transmission in which we transmitted data using two baudrates 4800 and 19200.

In 4800 bd it's working fine but for 19200 bd frame is not received correctly. We have tried bit banging using two methods. In first method we have given the delay using timer and in second method we have given the delay using nrf_delay_us() API. In both methods we received the data on 4800 baud rate and data has changed on 19200 baudrate. For 4800 bd the frame length is 7 byte. For 19200 bd the min frame length 23 bytes and the max frame length is 43 bytes.

We have used the external crystal and the frequency is 16 Mhz.

Please guide us on that as early as possible.Your quick reply would be highly appreciated.

Thank you.  

  • Can you mention the SDK being used and the softdevice version in use.

    What kind of radio activity are you doing when running the UART ?

    19200 is about the max possible with a bit banged UART when the RADIO is running, a better way could be to use the SAADC for UART RX and PWM for UART TX.

    Using the SAADC and PWM with ezDMA will reduce real time needs on the CPU.

  • Thank you for your quick reply,

    Our SDK version is 15.0 and soft device version is s132_nrf52_6.0.0 .

    Our BLE is connected to mobile application and we are sending and receiving the data continuously.

    In our application we just need to send the the data using software uart.

    Can you tell me how to use PWM with ezDMA for UART transmission?

  • We can provide a basic example to use the PWM for UART TX (no hardware flow control), is that sufficient ? 

    Can you mention the advertising interval that you are using and the connection interval you are using ?

  • Thanks again,

    Our connection interval is from 0.5 sec(min) to 1 sec(max) . Our advertising interval is 40 msec.

    Yes its sufficient for example without hardware flow control. It would be nice if you can send the basic example with 19200 baudrate.

  • We are in the process of documenting and getting this out to you. We are hoping it should be out this week. We will keep you informed.

    Edit: Added the first release with basic test data for 19200 baud , appears to be stable after a 14 hour loopback test

    Edit: Deleted v0_1.1 and added v0_2.1, v0_2.1 has additional documentation and test reports

    nrf_vt_0.2.1.zip

1 2