Hello, guys.
We want to use libuarte - advanced UARTE driver in our current application developed for nRF52840 with SDK 17.0.2.
We can successfully run libuarte example located under \examples\peripheral\libuarte
. However, the trouble comes when we want to merge this example in an environment that uses SoftDevice and app_timer modules.
I noticed that other people faced similar issues as well (thread).
What would be the best way to merge libuarte into environment that uses SoftDevice and app_timer?
I noticed that libuarte example uses the following drivers:
<file file_name="../../../../../../components/drivers_nrf/nrf_soc_nosd/nrf_nvic.c" /> <file file_name="../../../../../../components/drivers_nrf/nrf_soc_nosd/nrf_soc.c" />
Those drivers are for the case when SoftDevice is not present. In the presence of SoftDevice, what should we use?
I used
<file file_name="../../../../../../components/softdevice/common/nrf_sdh_soc.c" />as a replacement for nrf_soc.c but I am not sure what should I put for the nrf_nvic.c replacement. Can you help me with this?
When I merge libuarte example into my environment that contains SoftDevice and app_timer modules, and use Timer 2 and RTC 2 for NRF_LIBUARTE_ASYNC_DEFINE:
NRF_LIBUARTE_ASYNC_DEFINE(libuarte, 0, 2, 2, NRF_LIBUARTE_PERIPHERAL_NOT_USED, 255, 3);
nrf_libuarte_async_init() function returns error code 7 which should be NRF_ERROR_INVALID_PARAM according to nrf_error.h file.
Do you have any idea what I am doing wrong?
In this thread, there is a mention that NRFX_PRS_BOX_4 should be set to disabled. Does that impliy the following content into sdk_config.h file:
#ifndef NRFX_PRS_BOX_4_ENABLED #define NRFX_PRS_BOX_4_ENABLED 0 #endif
Thanks in advance for your time and efforts.
Cheers,
Bojan.