UART Async API Issue When Integrating with Matter on nRF54L15

Hello Nordic Team,

I am currently working with the nRF54L15 DK and interfacing an occupancy sensor over UART. In my standalone application (non-Matter), the UART communication works correctly in asynchronous mode, and I'm able to receive sensor data on the UART terminal.

In my prj.conf, I have enabled:

In the Matter prj.conf, I have enabled:

CONFIG_SERIAL=y  
CONFIG_UART_ASYNC_API=y

However, when I integrate the same UART-based sensor code into the Matter template application, I face an issue. I receive error code -88 (-ENOSYS) when calling uart_callback_set().

To fix this, I explicitly enable async mode for UART20 and UART22 using the following options in prj.conf

In the  prj.conf, I have enabled:

# Enable the use of UART22 for sensor

CONFIG_SERIAL=y
CONFIG_UART_ASYNC_API=y
CONFIG_LOG=y
CONFIG_LOG_BUFFER_SIZE=2048
CONFIG_UART_22_ASYNC=y
CONFIG_UART_22_NRF_ASYNC_LOW_POWER=y
CONFIG_UART_22_INTERRUPT_DRIVEN=n


# to fix issue to use UART in asynchronous modd
CONFIG_UART_20_ASYNC=y
CONFIG_UART_20_NRF_ASYNC_LOW_POWER=y
CONFIG_UART_20_INTERRUPT_DRIVEN=n

If I don’t enable these options, the UART does not work and I can't receive sensor data. But when I enable them, I can receive the sensor data over UART — however, the UART console (e.g. CHIP shell input) stops working.

Please suggest a solution that allows both:

  1. Receiving sensor data over UART using async mode

  2. Keeping the Matter UART console functional

Looking forward to your support.

Regards,
Rahul Chauhan

Parents
  • Hi  Rahul Chauhan, 

    You can specify one instance to be interrupt driven while the other is asynchronous. By default the console UART is interrupt driven, so it is expected that this does not work when configuring it as asynchronous. 

    If you have configured the console UART to uart20, please modify these three Kconfigs to the following:  

    CONFIG_UART_20_ASYNC=n
    CONFIG_UART_20_NRF_ASYNC_LOW_POWER=n # or remove
    CONFIG_UART_20_INTERRUPT_DRIVEN=y

    Best regards,

    Maria

Reply
  • Hi  Rahul Chauhan, 

    You can specify one instance to be interrupt driven while the other is asynchronous. By default the console UART is interrupt driven, so it is expected that this does not work when configuring it as asynchronous. 

    If you have configured the console UART to uart20, please modify these three Kconfigs to the following:  

    CONFIG_UART_20_ASYNC=n
    CONFIG_UART_20_NRF_ASYNC_LOW_POWER=n # or remove
    CONFIG_UART_20_INTERRUPT_DRIVEN=y

    Best regards,

    Maria

Children
No Data
Related