ask about TX power in ANT application

HI Nordic support team.

I have a question relate to TX power in ANT application:

- ANT Tx application using: ant_broadcast ->Tx

ANT Rx application using:  ant_continuous_scanning_controller

- SDK 17.1, segger embedded studio

We using ANT application connect to sensor. Each 6s sensor wakeup Ant appliction by external interupt and transmit data by call ant_message_send();

It mean we can see Tx power each 6s.

When we using power consumtion monitor i see that it seem ANT appliction transmit power each 1s instead 6s as my target.

You can see in PIC bellow:

Here is som configure and function in my code:

// ANT sTx configuration 
static void application_initialize()
{
    uint32_t err_code;
    /* Set library config to report RSSI and Device ID */
    //err_code = sd_ant_lib_config_set(ANT_LIB_CONFIG_MESG_OUT_INC_RSSI | ANT_LIB_CONFIG_MESG_OUT_INC_DEVICE_ID);
    //APP_ERROR_CHECK(err_code);

    const uint16_t dev_num = (uint16_t)NRF_FICR->DEVICEID[0];

    const ant_channel_config_t ms_channel_config =
    {
        .channel_number    = ANT_MS_CHANNEL_NUMBER,
        .channel_type      = CHANNEL_TYPE_MASTER,
        .ext_assign        = 0x00,
        .rf_freq           = RF_FREQ,            // channel 25
        .transmission_type = CHAN_ID_TRANS_TYPE,
        .device_type       = CHAN_ID_DEV_TYPE,
        .device_number     = dev_num,
        .channel_period    = CHAN_PERIOD,       // PERIOD   32767
        .network_number    = ANT_NETWORK_NUM,
    };

    err_code = ant_channel_init(&ms_channel_config);
    APP_ERROR_CHECK(err_code);

    // Fill tx buffer for the first frame
    ant_message_send();

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


//Callback function for external interupt
//each time interupt happened will send Tx messa, period is 6s 
static void in_pin_handler(nrf_drv_gpiote_pin_t pin, nrf_gpiote_polarity_t action)
{
    NRF_LOG_INFO("Int example0\n");
    Qflag = true;
    //nrf_drv_gpiote_out_toggle(PIN_OUT);
    ant_message_send();
    //NRF_LOG_INFO("Message sent %s", string);
    NRF_LOG_INFO("Index  %d", index);
    index++;
    
}

// <o> RF_FREQ - RF Frequency. 
#ifndef RF_FREQ
#define RF_FREQ 25
#endif

// <o> CHAN_PERIOD - Channel Period (in 32 kHz counts). 
#ifndef CHAN_PERIOD
#define CHAN_PERIOD   32767
#endif

Can you help me explain, why Tx power is transmited each 1s instead 6s.

I try to change period of sensor to 30s, i receive same result. Tx transmit power each 1s.

=> it take so much power, and our production cannot running in target time(2-3 year)

  • Hello again,

    Normally i did sleep function for ANT Tx application,

    But it seem ANT Tx make event after 2s, and then it automative wake up.

    Can we have any function to make ANT Tx only transmit data with customer pre-define time instead maximum 2s: #define CHAN_PERIOD 65536 (2seconds) ??

    thanks and regards,

  • Quangca said:
    Can we have any function to make ANT Tx only transmit data with customer pre-define time instead maximum 2s: #define CHAN_PERIOD 65536 (2seconds) ??

    I do not believe so no, then you would need to open, transmit, and close channel from a timer in your application. This timer can run at a interval you decide.

    If you want to discuss ANT directly with someone, then I suggest to reach out to www.thisisant.com, or I can put you in contact with someone there if you want. Let me know.

    Kenneth

  • Hi,

    can you share me the contact to someone of ANT orgnizration at right here? 

    I also contacted to ANT dupport forum but it seem dont have any feed back after more than 1 week.

  •  do you have any suggestion on this one?

    Kenneth

  • Dear all,

    You sugget me:
    -first: open Ant channel

    -second: transmit data

    -third: close Ant channel

    -4th: deep sleep MCU

    May be i dont know sequence to make close Ant Tx, so  Ant Tx cannot closed and i still can observe that Ant Tx transmit data each 2second like this:

    Can you guide me the sequence to force close ANT Tx? Or any function help Ant Tx application send data base on custom time define ex 30s, 60s,... instead maximum 2s?

    Bellow is my code in external interupt handler, can you review it?

    static void interupt_pin_handler(nrf_drv_gpiote_pin_t pin, nrf_gpiote_polarity_t action)
    {
        uint32_t err_code;
        Qflag = true;
        NRF_LOG_INFO("Int example0\n");
        err_code = sd_ant_channel_open(ANT_MS_CHANNEL_NUMBER);
        ant_message_send();
        err_code = sd_ant_channel_close(ANT_MS_CHANNEL_NUMBER);
        APP_ERROR_CHECK(err_code);
        
        index++;
        NRF_LOG_INFO("Index  %d", index);
    }
    interupt

Related