Hi!
I'm developing serial communication programming on nRF52840 DK to get the UARTE1 communication on SDK 12.0.2.
I want to use app_uart_put or NRF_LOG_INFO function via (TX_PIN_NUMBER, RX_PIN_NUMBER) with UART0 and do libuarte via (PIN(0,1), PIN(0,2)) with UARTE1.
There is no problem to make it compiled for this.
But, I got the error at initializing libuarte with :
#define NRF_LIBUARTE_ASYNC_WITH_APP_TIMER 1
#define NRF_LIBUARTE_DRV_UARTE1 1
#define NRFX_RTC_ENABLED 1
#define NRFX_RTC0_ENABLED 1
#define NRFX_RTC1_ENABLED 0
#define NRFX_RTC2_ENABLED 1
#define NRFX_TIMER_ENABLED 1
#define NRFX_TIMER0_ENABLED 1
#define NRFX_TIMER1_ENABLED 1
#define NRFX_TIMER2_ENABLED 1
#define NRFX_TIMER3_ENABLED 1
#define NRFX_TIMER4_ENABLED 0
NRF_LIBUARTE_ASYNC_DEFINE(uarte1, 1, 2, 2, NRF_LIBUARTE_PERIPHERAL_NOT_USED, 512, 3);
int main(void)
{
ret_code_t err_code;
APP_ERROR_CHECK(NRF_LOG_INIT(NULL));
NRF_LOG_DEFAULT_BACKENDS_INIT();
nrf_libuarte_async_config_t nrf_libuarte_async_config = {
. tx_pin = 1,
.rx_pin = 2,
. baudrate = NRF_UARTE_BAUDRATE_115200,
. parity = NRF_UARTE_PARITY_EXCLUDED,
. hwfc = NRF_UARTE_HWFC_DISABLED,
. timeout_us = 100,
. int_prio = APP_IRQ_PRIORITY_LOW
};
err_code = nrf_libuarte_async_init(&libuarte, &nrf_libuarte_async_config, uart_event_handler, (void *)&libuarte);
NRF_LOG_INFO("FATAL ERROR %d", err_code);
APP_ERROR_CHECK(err_code);
nrf_libuarte_async_enable(&libuarte);
}
I got the Fatal error. err_code is 7 which means invalid parameter like follwoing
<info> app: FATAL ERROR 7
<error> app: Fatal error
I'm wondering whether there are ways to use UARTE1 communication method with libuarte function to other peripheral device while debugging NRF_LOG_INFO with UART0 together?