I am having an issue implementing a WS2812b driver for the nrf51422 using the 210 softdevice. We currently have ANT enabled with a tx master only channel setup. The WS2812b driver uses bit-banging to transmit the bit pattern to a strand of LEDs. Due to the nature of the one wire WS2812b protocol, this bit banging has very sensitive timing tolerances. By adding this bit pattern transmission to the tx event handler (ran in main context off of ant_event_process), the bit stream is interrupted mid-transmission by an ISR exceeding 50us causing the bit stream to be corrupted.
Doing some digging it seems that this issue only occurs with ant enabled and a channel opened. By disabling ANT and putting the LED code on a separate, periodic signal, the issue goes away. It appears that there is an ANT related interrupt that causes the bit transmission to be corrupted. If I add a delay in my driver code the LED pattern is not corrupted as the interrupt occurs during the delay. That being said, the delay is not ideal as it holds up all main context events.
Does anyone have an idea of what is causing this issue? What is it about ANT that I get this periodic interrupt (following the tx event) that holds up the processor for more than 50 us? If anyone has suggestions on how to get around this issue I would greatly appreciate it.
Cheers,
Braden