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

nRF52 DK - radio not functional

I am using nrfgo studio ver 1.20.0.2 s132_nrf52_1.0.0-3.alpha_softdevice.hex nrf52832_xx_aa_s132.hex supplied by Nordic (ble_app_template) emIDE 2.20

The firmware runs with the LED flashing every second but no blue tooth at all. I have tried more than one cell phone. I have other bluetooth devices with which to verify.

When I compile the ble_app_template and test I get the same results.

Trapping through the program I find that when the routine "sd_softdevice_enable" is called, the program ends at "app_error_handler". The former routine is where the Supervisor Call (SVC) with value #16 is executed.

What am I doing wrong?. I am quite sure the softdevice and application are programmed correctly. I can change the blink time of the LED, compile and load successfully. What are the chances of hardware failure? Please help

Have traced the problem to routine "sd_nvic_EnableIRQ" returns error code 0x08 NRF_ERROR_INVALID_STATE.

What do I need to do? Regards

Ian

  • After executing sd_softdevice_enable ending up in app_error_handler means that the call has failed returning an error code (not NRF_SUCCESS). The next line checks the error code APP_ERROR_CHECK and executes app_error_handler if the error code is not NRF_SUCCESS.

    the documentation says what can go wrong, copy paste from header file is below

     * @retval ::NRF_SUCCESS
     * @retval ::NRF_ERROR_INVALID_STATE SoftDevice is already enabled, and the clock source and assertion handler cannot be updated.
     * @retval ::NRF_ERROR_SDM_INCORRECT_INTERRUPT_CONFIGURATION SoftDeviceinterrupt is already enabled, or an enabled interrupt has an illegal priority level.
     * @retval ::NRF_ERROR_SDM_LFCLK_SOURCE_UNKNOWN Unknown low frequency clock source selected.
    
  • That cannot be possible, only error codes that this function can return errors starting from 0X2000 or NRF_SUCCESS

    Can you please check the place where this error code is returned, have you compiled your code with "Level 0" optimizations to enable proper debugging?

Related