Hi.
I have received down the source of the example of experimental_ble_app_uart in my keil.
I use register.(NRF_CLOCK->EVENTS_HFCLKSTARTED = 0;)
but, Hardfault occurs.
For example,
main.c
/**@brief Application main function.
*/
int main(void)
{
uint8_t start_string[] = START_STRING;
uint32_t err_code;
// Initialize
APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, false);
APP_GPIOTE_INIT(APP_GPIOTE_MAX_USERS);
ble_stack_init();
uart_init();
err_code = bsp_init(BSP_INIT_LED | BSP_INIT_BUTTONS, APP_TIMER_TICKS(100, APP_TIMER_PRESCALER), NULL);
APP_ERROR_CHECK(err_code);
err_code = bsp_buttons_enable(1 << WAKEUP_BUTTON_ID);
APP_ERROR_CHECK(err_code);
gap_params_init();
services_init();
advertising_init();
conn_params_init();
sec_params_init();
simple_uart_putstring(start_string);
advertising_start();
**NRF_CLOCK->EVENTS_HFCLKSTARTED = 0;
NRF_CLOCK->TASKS_HFCLKSTART = 1;
// Wait for the external oscillator to start up.
while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0)
{
// Do nothing.
}**
// Enter main loop
for (;;)
{
power_manage();
}
}