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

SVCALL resets nRF51

Device: NRF51-DK

I'm using GDB+OpenOCD to step thru code and it appears that the nrf51 resets itself after calling:

SVCALL(SD_BLE_GAP_ADV_START, uint32_t, sd_ble_gap_adv_start(ble_gap_adv_params_t const *p_adv_params));

in file: ble_gap.h

I used nrfjprog to program the soft device and code.

I'm using the example code:

sdk/examples/ble_peripheral/ble_app_uart

Any ideas why ?

thanks,

Parents
  • int main(void) { uint32_t err_code; bool erase_bonds; uint8_t start_string[] = START_STRING;

    // Initialize.
    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_OP_QUEUE_SIZE, false);
    uart_init();
    buttons_leds_init(&erase_bonds);
    ble_stack_init();
    gap_params_init();
    services_init();
    advertising_init();
    conn_params_init();
    
    printf("%s",start_string);
    
    err_code = ble_advertising_start(BLE_ADV_MODE_FAST);
    APP_ERROR_CHECK(err_code);
    
    // Enter main loop.
    for (;;)
    {
        power_manage();
    }
    

    }

Reply
  • int main(void) { uint32_t err_code; bool erase_bonds; uint8_t start_string[] = START_STRING;

    // Initialize.
    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_OP_QUEUE_SIZE, false);
    uart_init();
    buttons_leds_init(&erase_bonds);
    ble_stack_init();
    gap_params_init();
    services_init();
    advertising_init();
    conn_params_init();
    
    printf("%s",start_string);
    
    err_code = ble_advertising_start(BLE_ADV_MODE_FAST);
    APP_ERROR_CHECK(err_code);
    
    // Enter main loop.
    for (;;)
    {
        power_manage();
    }
    

    }

Children
No Data
Related