This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

HRM_RX exeample on NRF51422

Hi

I'm trying to run the HRM_RX exemple on the nordic NRF51422. This is my configuration:

-Eclipse IDE -ARM GCC 4.8.3 -NRF51422_AAC0 so I'm using the lasest SDK 4.2.2 for this chip

I can compile and debug the code but in hrm_rx.c

when I call sd_ant_channel_assign

" err_code = sd_ant_channel_assign(HRMRX_ANT_CHANNEL, HRMRX_CHANNEL_TYPE, ANTPLUS_NETWORK_NUMBER, HRMRX_EXT_ASSIGN); APP_ERROR_CHECK(err_code); "

It's always returning with the following errors:

NRF_ANT_ERROR_CHANNEL_IN_WRONG_STATE ( 0x4015).

Of course I've entered the ant+ key as I'm ANT adopter.

For test, I'm using my ant+ garmin belt.

I don't know why I'm getting this error all the previous call to the softdevice are returning NRF_SUCCES.

Thanks

  • Hi Nordic Team,

    just an 'up'. I would like to know what are the reason why the assign function return an "NRF_ANT_ERROR_CHANNEL_IN_WRONG_STATE "

    What the root cause? What's I'm doing wrong?

    Regards, Bubune

  • I haven't gotten around to test this with the ANT softdevice, but have you tried to either flash your program using nrjfprog, or to run it from command line gdb? It's known that Eclipse has a problem in that it doesn't run the softdevice's reset handler when you start debugging, and this could potentially cause some internal states to not be cleared, again leading to such unexpected return values.

    If this is the case, you can try the workaround described here. You will also not see this problem if you run your project with the command line gdb instead of from Eclipse, since that one behaves properly.

  • Hi Olen,

    I was quite busy these past month but you are right. Problems coming from Eclipse. If I'm running directly my heart belt is detected. Thanks, Bruno

Related