Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

SD340 sd_ant_channel_close not generating EVENT_CHANNEL_CLOSED

Rank

Total Posts: 3

Joined 2015-10-05

PM

Has there been a change in the behaviour of sd_ant_channel_close? Since updating to SDK15 and SD340 (on an NRF52840) I no longer receive an EVENT_CHANNEL_CLOSED when closing any channel... if fact, I cease to receive any ANT events as soon as the function is called.

bool pwrSensorOpen true;

void ant_evt_handler(ant_evt_t p_ant_evtvoid p_context)
{
    printf
("%i\n",p_ant_evt->event);
    if (
p_ant_evt->event == EVENT_CHANNEL_CLOSED{
        pwrSensorOpen 
false;
    
}
}

void changePowermeter
(uint16_t powerId)
{
    uint32_t err_code 
0;
    
printf("closing channel\n");
    
err_code sd_ant_channel_close(POWER_CHANNEL_NUMBER);
    
printf("sdacc X\n",err_code);

    while (
pwrSensorOpen{
        sd_app_evt_wait
();
    
}
    printf
("closed\n");


I'd expect this code to return, and indeed it did on previous SDK/SD combinations, but i'm hanging in the evt_wait loop now, and I stop seeing messages printed from the ANT event handler.

Any clues?!