I'm trying to enable UART in a mesh application with SDK 15.1.0 and mesh SDK 3.3.0. This seems to be a real nightmare and I'm not sure why Nordic has so many different HAL libraries to drive the same peripheral. As an example, for a UART application you can use:
These seem to be accomplishing the same thing with different variability of functionality, backwards compatibility, etc. The problem is in integration\nrfx\legacy\nrf_drv_uart.c which has a function that depends on the inclusion of bot nrfx_uarte_init and nrfx_uart_init.
ret_code_t nrf_drv_uart_init(nrf_drv_uart_t const * p_instance,
nrf_drv_uart_config_t const * p_config,
uint32_t inst_idx = p_instance->inst_idx;
m_handlers[inst_idx] = event_handler;
m_contexts[inst_idx] = p_config->p_context;
#if defined(NRF_DRV_UART_WITH_UARTE) && defined(NRF_DRV_UART_WITH_UART)
if (inst_idx == 1)
nrf_drv_uart_use_easy_dma[inst_idx] = p_config->use_easy_dma;
nrf_drv_uart_config_t config = *p_config;
config.p_context = (void *)inst_idx;
ret_code_t result = 0;
result = nrfx_uarte_init(&p_instance->uarte,
(nrfx_uarte_config_t const *)&config,
event_handler ? uarte_evt_handler : NULL);
else if (NRF_DRV_UART_USE_UART)
result = nrfx_uart_init(&p_instance->uart,
(nrfx_uart_config_t const *)&config,
event_handler ? uart_evt_handler : NULL);
If you include both those files you have a " multiple definition of `UARTE0_UART0_IRQHandler'" error between nrfx_uarte and nrfx_uart, but you can't build nrf_drv_uart in the first place without both of these.
I suggest that you take a look at this thread and the answers from my colleague, Hung Bui.
Best regards, Joakim Jakobsen
Resolved through sdk_config settings + solder bridges for pins that were used by the flash.
Thanks for sharing the solution.
Hi! spet. I want to ask you what sdk_config settings and something else do you modified that you can send data successfully with uart in mesh. please give me some advice when you are free. Thank you!!
Nordic It's a piece of garbage. It's as hard to develop as a moon landing.