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

ERROR 13 [NRF_ERROR_TIMEOUT] - Replicating ble_app_blinky Application

Hello,

I wanted to replicate and build the LED Button Service using my own custom service. I used the template BLE project as a starting point.

I'm working on a characteristic and I want to have notifications on the nRF Connect app and show that the button is pressed/released just like how the lbs service works.

I am using nRF52 DK, and SDK v15.0.

When I build and run my application, I get the following error messages:

<info> app: Erase bonds!
<info> app: Fast advertising.
<info> app: Connected.
<info> app: Sending button change...
<error> app: ERROR 13 [NRF_ERROR_TIMEOUT] at C:\BLE Projects\nRF52\nRF5_SDK_15.0.0_a53641a\examples\ble_peripheral\ble_app_jade_test\main.c:712
PC at: 0x00030ED7
<error> app: End of error report

To get my setup up and running:

1. Please copy the ble_jade.zip.zip folder to SDK/components/ble/ble_services/

2. Please copy the ble_app_jade_test.zip.zip to SDK/examples/ble_peripheral/

3. On the Preprocessor, please also add the SDK/components/ble/ble_services/ble_jade

Thank you very much

Parents
  • Hi,

    Did you have a look at what happens at the line that the log reports an error on?

    As far as I can see, you are passing a variable err_code to APP_ERROR_CHECK without ever assigning a value to the variable. Most likely the variable contains garbage from RAM:

    static void in_button_handler(nrfx_gpiote_pin_t pin, nrf_gpiote_polarity_t action)
    {
        ret_code_t  err_code;
    
        switch(pin)
        {
            case PUSH_BUTTON:
                NRF_LOG_INFO("Sending button change...");
                if (err_code != NRF_SUCCESS &&
                    err_code != BLE_ERROR_INVALID_CONN_HANDLE &&
                    err_code != NRF_ERROR_INVALID_STATE &&
                    err_code != BLE_ERROR_GATTS_SYS_ATTR_MISSING)
                {
                    APP_ERROR_CHECK(err_code);
                }
                break;
    
            default:
                APP_ERROR_HANDLER(pin);
                break;
        }
    }

    Best regards,
    Jørgen

Reply
  • Hi,

    Did you have a look at what happens at the line that the log reports an error on?

    As far as I can see, you are passing a variable err_code to APP_ERROR_CHECK without ever assigning a value to the variable. Most likely the variable contains garbage from RAM:

    static void in_button_handler(nrfx_gpiote_pin_t pin, nrf_gpiote_polarity_t action)
    {
        ret_code_t  err_code;
    
        switch(pin)
        {
            case PUSH_BUTTON:
                NRF_LOG_INFO("Sending button change...");
                if (err_code != NRF_SUCCESS &&
                    err_code != BLE_ERROR_INVALID_CONN_HANDLE &&
                    err_code != NRF_ERROR_INVALID_STATE &&
                    err_code != BLE_ERROR_GATTS_SYS_ATTR_MISSING)
                {
                    APP_ERROR_CHECK(err_code);
                }
                break;
    
            default:
                APP_ERROR_HANDLER(pin);
                break;
        }
    }

    Best regards,
    Jørgen

Children
No Data
Related