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

Turning on/off the ANT transmitting channel dynamically

Hi everyone,

I was wondering if there are any issues turning on and off the ANT transmitting channel during run-time of nRF51422 with this:

err_code = sd_ant_channel_close(ANT_MS_CHANNEL_NUMBER);
APP_ERROR_CHECK(err_code);

and re-opening it again later on with:

err_code = sd_ant_channel_open(ANT_MS_CHANNEL_NUMBER);
APP_ERROR_CHECK(err_code);

Is there a better way and/or am I missing anything? The initialization of the ANT channel is the same as the example in 'nrf_ant_background_scanning_demo' from SDK 10.

Thank you.

Parents Reply Children
  • Yes, but I do not think it was the open/close issue as I originally though it was. I have two devices with the 'nrf_ant_background_scanning_demo', where one device (we will call this 'device 0') is constantly transmitting 8 bytes of data at 16 Hz (same as the original demo example). The other device (we will call this 'device 1') is not transmitting and only listening while using TWI and PWM. The TWI portion of the code on device 1 takes approximately 5 seconds to complete and it seems it never does get completed when device 0 transmits at 16 Hz. I tried the same experiment with device 0 ANT transmitting disabled and device 1 is able to complete the TWI portion of the code without issues.

  • What do you mean by not getting completed? Could it be because you get interrupted by the SoftDevice when you receive a packet?

Related