i have used a example of ble_app_template in ble_peripheral of SDK15.0,when code run in ble_advertising_start,return errcode 8.
i have checked low speed Crystals,it's ok。 i don not no what's happen .please give some advice,thank you.
i have used a example of ble_app_template in ble_peripheral of SDK15.0,when code run in ble_advertising_start,return errcode 8.
i have checked low speed Crystals,it's ok。 i don not no what's happen .please give some advice,thank you.
If you check the ble_advertising_start() description in ble_advertising.h you will find that error core 8 equal NRF_ERROR_INVALID_STATE. This happens when you call ble_advertising_start() before the library initialized using ble_advertising_init().
it is my code:
int main(void)
{
bool erase_bonds;
// Initialize.
log_init();
timers_init();
// buttons_leds_init(&erase_bonds);
power_management_init();
ble_stack_init();
gap_params_init();
gatt_init();
advertising_init();
services_init();
conn_params_init();
peer_manager_init();
nrf_delay_ms(2000);
// Start execution.
NRF_LOG_INFO("Template example started.");
application_timers_start();
advertising_start(erase_bonds);
// Enter main loop.
for (;;)
{
idle_state_handle();
}
}
i download this code in DK ,it runs ok.but i download in my board,it has this problem.
i am not sure if it's due to a board problem. my board can run spi peripherals without ble function.
Please check if your board has the 32kHz crystal or not.
The 32K crystal waveform is normal,
The circuit is the same as the official circuit,
the code is in nRF5_SDK_15.0.0_a53641a\examples\ble_peripheral\ble_app_template\pca10040\s132\arm5_no_packs
Can you determine if it's a board problem or a code problem
my PCB info:4 layer board(TOP layer 、 singal1 layer、singal2 layer、bottom layer),PCB thickness is 1.6,Copper thick is 0.5 OZ,