ANT on PCA10056 and custom board ?

Dear Members,

I want to run ANT+ code in my custom board,

It works well on PCA10056, I can upload softdevice and the code to custom board board,

but I didn't get any responses,

I have tried with code without softdevice, the custom board works well

Any ideas ?

Thanks

Parents
  • Hello,

    Does your custom board have a 32KHz crystal mounted? If not, you have to make sure you select the internal RC oscillator when you enable the Softdevice. Otherwise, the Softdevice will enter an infinite loop waiting for the crystal to start.

    The memory layout should be left as is.

    Best regards,

    Vidar

  • Does softdevice require VDD HV? I connected VDD HV to 3.3V .

  • The app is stop in this function :

    static void softdevice_setup(void)
    {
        ret_code_t err_code = nrf_sdh_enable_request();
        APP_ERROR_CHECK(err_code);
        NRF_LOG_INFO("softdevice_setup\r\n");
        ASSERT(nrf_sdh_is_enabled());
    
    #ifdef BLE_STACK_SUPPORT_REQD
        ble_stack_init();
    #endif
    
        err_code = nrf_sdh_ant_enable();
        APP_ERROR_CHECK(err_code);
    
        // Register a handler for ANT events.
        NRF_SDH_ANT_OBSERVER(m_ant_observer, APP_ANT_OBSERVER_PRIO, ant_evt_handler, NULL);
    	
    	  
    }
    

    Could it be 32KHz External Crystal Issue ? thanks

  • I have tried every option for softdevice clock, and no avail yet

  • Did you add the ble_stack_init(); yourself? I don't see ble_stack_init() being called from softdevice_setup() in the SDK example.

  • there are two softdevice_setup function I can see,

    one in the main

    /**@brief Function for ANT stack initialization.
     *
     * @details Initializes the SoftDevice and the ANT event interrupt.
     */
    static void softdevice_setup(void)
    {
          NRF_LOG_INFO("softdevice_setup\r\n");
        ret_code_t err_code = nrf_sdh_enable_request();
        APP_ERROR_CHECK(err_code);

        ASSERT(nrf_sdh_is_enabled());

        err_code = nrf_sdh_ant_enable();
        APP_ERROR_CHECK(err_code);

        err_code = ant_plus_key_set(ANTPLUS_NETWORK_NUM);
        APP_ERROR_CHECK(err_code);
    }

    and one in asc_coordinator.c

    /**@brief BLE + ANT stack initialization.
     *
     * @details Initializes the SoftDevice and the stack event interrupt.
     */
    static void softdevice_setup(void)
    {
        ret_code_t err_code = nrf_sdh_enable_request();
        APP_ERROR_CHECK(err_code);
        NRF_LOG_INFO("softdevice_setup\r\n");
        ASSERT(nrf_sdh_is_enabled());

    #ifdef BLE_STACK_SUPPORT_REQD
        ble_stack_init();
    #endif

        err_code = nrf_sdh_ant_enable();
        APP_ERROR_CHECK(err_code);

        // Register a handler for ANT events.
        NRF_SDH_ANT_OBSERVER(m_ant_observer, APP_ANT_OBSERVER_PRIO, ant_evt_handler, NULL);
        
          
    }

    I got these error on debug


    nfo> app_timer: RTC: initialized.
                                                


                                   


                                                                                 

    nfo> app: utils_setup
                                                            


                                                                                 

    rror> app: Fatal error
                                                           

    arning> app: System reset
                                                        

    nfo> app: log_init.

    in the main()

    ....

    log_init();
        utils_setup();
          APP_ERROR_CHECK(err_code);
        softdevice_setup();
          APP_ERROR_CHECK(err_code);

    ....
                                                              


                           

Reply
  • there are two softdevice_setup function I can see,

    one in the main

    /**@brief Function for ANT stack initialization.
     *
     * @details Initializes the SoftDevice and the ANT event interrupt.
     */
    static void softdevice_setup(void)
    {
          NRF_LOG_INFO("softdevice_setup\r\n");
        ret_code_t err_code = nrf_sdh_enable_request();
        APP_ERROR_CHECK(err_code);

        ASSERT(nrf_sdh_is_enabled());

        err_code = nrf_sdh_ant_enable();
        APP_ERROR_CHECK(err_code);

        err_code = ant_plus_key_set(ANTPLUS_NETWORK_NUM);
        APP_ERROR_CHECK(err_code);
    }

    and one in asc_coordinator.c

    /**@brief BLE + ANT stack initialization.
     *
     * @details Initializes the SoftDevice and the stack event interrupt.
     */
    static void softdevice_setup(void)
    {
        ret_code_t err_code = nrf_sdh_enable_request();
        APP_ERROR_CHECK(err_code);
        NRF_LOG_INFO("softdevice_setup\r\n");
        ASSERT(nrf_sdh_is_enabled());

    #ifdef BLE_STACK_SUPPORT_REQD
        ble_stack_init();
    #endif

        err_code = nrf_sdh_ant_enable();
        APP_ERROR_CHECK(err_code);

        // Register a handler for ANT events.
        NRF_SDH_ANT_OBSERVER(m_ant_observer, APP_ANT_OBSERVER_PRIO, ant_evt_handler, NULL);
        
          
    }

    I got these error on debug


    nfo> app_timer: RTC: initialized.
                                                


                                   


                                                                                 

    nfo> app: utils_setup
                                                            


                                                                                 

    rror> app: Fatal error
                                                           

    arning> app: System reset
                                                        

    nfo> app: log_init.

    in the main()

    ....

    log_init();
        utils_setup();
          APP_ERROR_CHECK(err_code);
        softdevice_setup();
          APP_ERROR_CHECK(err_code);

    ....
                                                              


                           

Children
No Data
Related