Dear Members,
I want to use libuarte with ANT and softdevice,
When I initialize libuarte,
The app keeps restarting by itself.
/**********init from libuarte*****/
//err_code=nrf_drv_clock_init();
//APP_ERROR_CHECK(err_code);
// NRF_LOG_INFO("Err_code nrf_drv_clk %u",err_code);
//nrf_drv_clock_lfclk_request(NULL);
nrf_libuarte_async_config_t nrf_libuarte_async_config1 = {
.tx_pin = SER_APP_TX_PIN,
.rx_pin = SER_APP_RX_PIN,
.baudrate = NRF_UARTE_BAUDRATE_9600,
.parity = NRF_UARTE_PARITY_EXCLUDED,
.hwfc = NRF_UARTE_HWFC_DISABLED,
.timeout_us = 1000,
.int_prio = APP_IRQ_PRIORITY_LOW
};
err_code=nrf_libuarte_async_init(&libuarte1, &nrf_libuarte_async_config1, uart_event_handler1, (void *)&libuarte1);
APP_ERROR_CHECK(err_code);
NRF_LOG_INFO("Err_code libuarte_init libuarte1 %u",err_code);
nrf_libuarte_async_enable(&libuarte1);
GPS_Init();
/**********init from libuarte*****/
I commented out
//err_code=nrf_drv_clock_init();
//nrf_drv_clock_lfclk_request(NULL);
//nrf_libuarte_async_enable(&libuarte1);
to stabilize the application,
libuarte setting :
NRF_LIBUARTE_ASYNC_DEFINE(libuarte1, 1, 2, 2, NRF_LIBUARTE_PERIPHERAL_NOT_USED, 255, 3); //timer0 id =2, rtc1 id =2
what do I miss here ? is it related with my app timer conflicting with libuarte timer ?
I get this in my log :
<error> hardfault: HARD FAULT at 0x00017FB8 <error> hardfault: R0: 0x20001064 R1: 0x39000000 R2: 0x00000010 R3: 0x0000000F <error> hardfault: R12: 0x20000E08 LR: 0x0001E39F PSR: 0x21000029 <error> hardfault: Cause: Data bus error (PC value stacked for the exception return points to the instruction that caused the fault). <error> hardfault: Bus Fault Address: 0x39000000
Is
NRF_LIBUARTE_ASYNC_DEFINE(libuarte, 0, 0, 0, NRF_LIBUARTE_PERIPHERAL_NOT_USED, 255, 3);
conflicting with my current UART setting for NRF_LOG in softdevice ? it's using the same port UART0
Thanks