example: peripheral nus
device: nrf52832(Self-developed board)
hi
i run the example peripheral_nus , but it cannot work. Though i had set the RC clock.
But when i run the debugging, the ble can work normal.
prj.conf
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_ZEPHYR_NUS=y
CONFIG_GPIO=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC_CALIBRATION=y
int main(void)
{
int err;
int ret;
//printk("Sample - Bluetooth Peripheral NUS\n");
k_sleep(K_MSEC(1000));
err = bt_nus_cb_register(&nus_listener, NULL);
if (err) {
//printk("Failed to register NUS callback: %d\n", err);
return err;
}
err = bt_enable(NULL);
if (err) {
//printk("Failed to enable bluetooth: %d\n", err);
return err;
}
err = bt_le_adv_start(BT_LE_ADV_CONN_FAST_1, ad, ARRAY_SIZE(ad), sd, ARRAY_SIZE(sd));
if (err) {
//printk("Failed to start advertising: %d\n", err);
return err;
}
while (true) {
k_sleep(K_SECONDS(3));
}what is the reason for this?
best regard.