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

How to expand the "ANT_CONFIG_TOTAL_CHANNELS_ALLOCATED" number?

Hi,
    I have met an issue that the "ANT_CONFIG_TOTAL_CHANNELS_ALLOCATED" can't set more than 15 in ant_multi_channels example. Now I have a project that it need receive 100 devices in ANT+.
    Please advise how to expand the "ANT_CONFIG_TOTAL_CHANNELS_ALLOCATED" number? Thank You.

Yong

Parents
  •  The enviorement is SDK_12.3\examples\ant\ant_multi_channels\rx. If change ANT_CONFIG_TOTAL_CHANNELS_ALLOCATED and MAX_ANT_CHANNELS value more than 15.    err_code = ant_stack_static_config() will occur NRF_ERROR_INVALID_PARAM error messgae.

  • Hi, 
    In SDK_12.3\examples\ant\ant_multi_channels\rx example code, MCU is 52832, the MAX_ANT_CHANNELS and ANT_CONFIG_TOTAL_CHANNELS_ALLOCATED parameter are all defined 15.
    If change the two parameters to 60, the sd_ant_enable() will return NRF_ERROR_INVALID_PARAM error. Why??

    uint32_t ant_stack_static_config(void)
    {
        ASSERT(ANT_CONFIG_TOTAL_CHANNELS_ALLOCATED <= MAX_ANT_CHANNELS);
        ASSERT(ANT_CONFIG_ENCRYPTED_CHANNELS <= ANT_CONFIG_TOTAL_CHANNELS_ALLOCATED);

        ANT_ENABLE m_ant_enable_cfg =
        {
            .ucTotalNumberOfChannels        = ANT_CONFIG_TOTAL_CHANNELS_ALLOCATED,
            .ucNumberOfEncryptedChannels    = ANT_CONFIG_ENCRYPTED_CHANNELS,
            .pucMemoryBlockStartLocation    = ant_stack_buffer.u8,
            .usMemoryBlockByteSize          = ANT_BUFFER_SIZE_FOR_SD
        };

        return sd_ant_enable(&m_ant_enable_cfg);
    }

    Please advise. Thank You. The project is urgent!!

    Yong

Reply
  • Hi, 
    In SDK_12.3\examples\ant\ant_multi_channels\rx example code, MCU is 52832, the MAX_ANT_CHANNELS and ANT_CONFIG_TOTAL_CHANNELS_ALLOCATED parameter are all defined 15.
    If change the two parameters to 60, the sd_ant_enable() will return NRF_ERROR_INVALID_PARAM error. Why??

    uint32_t ant_stack_static_config(void)
    {
        ASSERT(ANT_CONFIG_TOTAL_CHANNELS_ALLOCATED <= MAX_ANT_CHANNELS);
        ASSERT(ANT_CONFIG_ENCRYPTED_CHANNELS <= ANT_CONFIG_TOTAL_CHANNELS_ALLOCATED);

        ANT_ENABLE m_ant_enable_cfg =
        {
            .ucTotalNumberOfChannels        = ANT_CONFIG_TOTAL_CHANNELS_ALLOCATED,
            .ucNumberOfEncryptedChannels    = ANT_CONFIG_ENCRYPTED_CHANNELS,
            .pucMemoryBlockStartLocation    = ant_stack_buffer.u8,
            .usMemoryBlockByteSize          = ANT_BUFFER_SIZE_FOR_SD
        };

        return sd_ant_enable(&m_ant_enable_cfg);
    }

    Please advise. Thank You. The project is urgent!!

    Yong

Children
No Data
Related