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

Events triggered in slave while not paired

Hi Nordic, I come from this question: devzone.nordicsemi.com/.../

So, my doubt is: what events are triggered in a slave channel while it is not communicating to a master?

I am having problems triggering EVENT_CHANNEL_CLOSED (the function sd_ant_channel_closed returns 0x00000, SUCESS, but the EVENT_CHANNEL_CLOSED never triggers) when an ANT channel is configured as slave and it is not communicating with any master (it didn't find any). I have also tried to get EVENT_RX_SEARCH_TIMEOUT and EVENT_RX_FAIL_GO_TO_SEARCH but they dont trigger either.

EDIT: I also realised that events related to sd_flash_write and sd_flash_erase (NRF_EVT_FLASH_OPERATION_SUCCESS or NRF_EVT_FLASH_OPERATION_ERROR, from sys evt dispatch function) don't trigger either when the slave has not found a master. Is this behaviour normal?

Parents
  • Now I'm actually suspecting it has something to do with your debug config, but I'm not sure. I revisited your project, and I noticed that after I get the EVENT_TRANSFER_TX_FAILED event, the device is reset. This is because sd_ant_acknowledge_message_tx() in ant_message_send() returns an error. I commented out ant_message_send() from the EVENT_TRANSFER_TX_FAILED case. Instead I'm setting LED3, and I'm setting LED4 if the EVENT_RX_SEARCH_TIMEOUT is received.

    Could you try to flash this SoftDevice and this application hex? Does LED3 and LED4 lit up?

Reply
  • Now I'm actually suspecting it has something to do with your debug config, but I'm not sure. I revisited your project, and I noticed that after I get the EVENT_TRANSFER_TX_FAILED event, the device is reset. This is because sd_ant_acknowledge_message_tx() in ant_message_send() returns an error. I commented out ant_message_send() from the EVENT_TRANSFER_TX_FAILED case. Instead I'm setting LED3, and I'm setting LED4 if the EVENT_RX_SEARCH_TIMEOUT is received.

    Could you try to flash this SoftDevice and this application hex? Does LED3 and LED4 lit up?

Children
No Data
Related