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

Two ant+ profiles

I've been trying to get two ant+ sensor profiles working at the same time.

I'm working with the nrf52 DK, I'm on sdk version 15.3.0_59ac354.

Reproducible example here: https://github.com/tomeinc/nordic-ant-two-profile-issue-demo

I think it's an issue with channel configuration, and I suspect the fact that channel number is the same in both things I'm trying, but changing channel number even with only one profile enabled causes issues.

I'm not quite clear on what channel number even is, in sdk_config.h the text says "BSC_CHANNEL_NUM - Channel number assigned to BSC profile", but there is no channel number in the specification PDFs from thisisant.com

So I'm thinking it's something internal to how the ANT/ANT+ libraries handle it?

Where can I find documentation on that?

https://devzone.nordicsemi.com/f/nordic-q-a/8812/ant-multiple-channels/32340#32340

That seems to say that multiple ant+ profiles should just work?

The other issue I'm having is I can't figure out the syntax for how to call NRF_SDH_ANT_OBSERVERS. I can't figure out how to pass an array to a preprocessor macro.

I think I figured out what it *should* turn into, but I can't test it because of the issue with sd_ant_channel_assign.

Cheers,

Mark

Parents
  • Hi,

    The softdevice may configure a range of ANT channels, so this number (e.g. BSC_CHANNEL_NUM) is just a way for the application firmware to know which channel have which configuration. This number is not exposed to the world or otherwise specified, you may change it as you see fit. Typically you assign it incremental from 0...n. However have in mind that the softdevice will allocate memory based on the total number of ANT channels that you want to support, so there is another define that you may need to increment if you want to support more than one ANT channel: NRF_SDH_ANT_TOTAL_CHANNELS_ALLOCATED

    Best regards,
    Kenneth

  • Changing NRF_SDH_ANT_TOTAL_CHANNELS_ALLOCATED made it work, thank you!

    I saw examples in the bluetooth stuff of having multiple observers of the same thing each registered with NRF_SDH_ANT_OBSERVER, so calling NRF_SDH_ANT_OBSERVERS is unnecessary.

Reply Children
No Data
Related