This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Possible to bitbang a 9600baud UART on nRF51822?

Is it possible to bit bang a 9600 baud UART on the nRF51822 while the BLE softdevice is running?

The reciprocal of 9600 baud is around 100 µs, so the interrupt handler will need to run about that often for the UART to work reliably. However, the S110 SDS specifies that the processor could be taken up by the highest-priority soft device interrupt for up to 400-500 µs.

It seems to me that would prevent the bit-bang timer interrupt from running, and would cause bits to be lost. Is this correct?

I need to communicate with two different devices (so 2 UARTs) using a protocol with 2 stop bits, so I cannot use the chip's hardware UART

  • Now I'm advertising @40ms. I've not yet tested bit banging in connection. Now I'm trying to solve some issues. @9600bps, timeslot duration is 1240µs, I've just discovered duration between two bytes was ~2ms due to timeslot extension failure. Now I'm checking all runs fine and after I will test with with small connection intervals.

Related