when I use Jlink viewer for tracing, found a fatal error:
1 code:
static void lfclk_config(void)
{
uint32_t err_code;
NRF_LOG_INFO("enter lfclk_config");
err_code = nrf_drv_clock_init(); // will call to nrf_drv_clock.c (2)
APP_ERROR_CHECK(err_code);
nrf_drv_clock_lfclk_request(NULL);
}
main()
{ ...
lfclk_config(); ////(1)
..
}
2 in nrf_drv_clock.c:
ret_code_t nrf_drv_clock_init(void)
{
ret_code_t err_code = NRF_SUCCESS;
NRF_LOG_INFO("e nrf_drv_clock_init"); /// added this line (3)
if (m_clock_cb.module_initialized)
{
...
}
...
}
3 the log infor in jLInk viewer:
<info> app: log_init
<info> app_timer: RTC: initialized.
<info> app: power_management_init
<info> app: enter lfclk_config /// this output before call (2)
<error> app: Fatal error //// (4)
THE PROBLEM IS:
why there is a Fatal error in viewer line (4) ?
The procedure is : main () call (1) -- call (2) -- call (3),
Log means before call nrf_drv_clock_init(), there is a Fatal error, (3) not output. But can not find any issue in code, why this happen?
