UART Async and Interrupt on different peripherals

I have an nRF5340 and I need to run two different peripherals. One uses the Modbus driver, which requires CONFIG_UART_INTERRUPT_DRIVEN, and another I'm writing but would like to use CONFIG_UART_ASYNC_API.

The Zephyr UART library page has a large warning that these two should not be used at the same time, as they both require hardware interrupts and they would conflict. What's not clear, though, is whether they can't both be used on the same UART peripheral simultaneously, or if they can't be used simultaneously on two different UART peripherals (e.g. uart0 with interrupts, uart1 with async).

Is it safe to disable CONFIG_UART_EXCLUSIVE_API_CALLBACKS in order to enable both the interrupt and async APIs, to be used on different peripherals?

Parents Reply
  • Hi,

    Looking at the dts of the developer academy lesson 5, I see that only 1 instance of the UART peripheral has been enabled, namely UART0. Adding CONFIG_UART_INTERRUPT_DRIVEN=y while CONFIG_UART_ASYNC_API=y already being defined will violate the requirement of never using both for the same hw peripheral. 

    Did you enable another UART instance already?

    regards

    Jared 

Children
Related