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

Timeslot API

I use SDK 15.3, nrf52840.

https://devzone.nordicsemi.com/nordic/short-range-guides/b/software-development-kit/posts/setting-up-the-timeslot-api

Normal use most of the time, after transmitting for a period of time, NRF_RADIO_CALLBACK_SIGNAL_TYPE_RADIO cannot be received.

NRF_RADIO_CALLBACK_SIGNAL_TYPE_START, NRF_RADIO_CALLBACK_SIGNAL_TYPE_TIMER0 can be received,What is the problem?

Parents Reply Children
  • Hi,

    The error code, line number and file name is only relevant for SDK errors. When there is a SoftDevice assert you need to look at the PC. If you are using the default app_error_fault_handler() in SDK 15.3 it looks like this:

    __WEAK void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info)
    {
        __disable_irq();
        NRF_LOG_FINAL_FLUSH();
    
    #ifndef DEBUG
        NRF_LOG_ERROR("Fatal error");
    #else
        switch (id)
        {
    #if defined(SOFTDEVICE_PRESENT) && SOFTDEVICE_PRESENT
            case NRF_FAULT_ID_SD_ASSERT:
                NRF_LOG_ERROR("SOFTDEVICE: ASSERTION FAILED");
                break;
            case NRF_FAULT_ID_APP_MEMACC:
                NRF_LOG_ERROR("SOFTDEVICE: INVALID MEMORY ACCESS");
                break;
    #endif
            case NRF_FAULT_ID_SDK_ASSERT:
            {
                assert_info_t * p_info = (assert_info_t *)info;
                NRF_LOG_ERROR("ASSERTION FAILED at %s:%u",
                              p_info->p_file_name,
                              p_info->line_num);
                break;
            }
            case NRF_FAULT_ID_SDK_ERROR:
            {
                error_info_t * p_info = (error_info_t *)info;
                NRF_LOG_ERROR("ERROR %u [%s] at %s:%u\r\nPC at: 0x%08x",
                              p_info->err_code,
                              nrf_strerror_get(p_info->err_code),
                              p_info->p_file_name,
                              p_info->line_num,
                              pc);
                 NRF_LOG_ERROR("End of error report");
                break;
            }
            default:
                NRF_LOG_ERROR("UNKNOWN FAULT at 0x%08X", pc);
                break;
        }
    #endif
    
        NRF_BREAKPOINT_COND;
        // On assert, the system can only recover with a reset.
    
    #ifndef DEBUG
        NRF_LOG_WARNING("System reset");
        NVIC_SystemReset();
    #else
        app_error_save_and_stop(id, pc, info);
    #endif // DEBUG
    }

    When you get a NRF_FAULT_ID_SD_ASSERT, the relevant here is the value of the pc parameter. I you can tell me what it is, and the exact SoftDevice version you use I can check which assert failed. Without it, I can only make assumptions like in my previous post.

Related