Using 4 uarts of NRF5340 at the same time

Hi

I am using NRF5340 chip in my custom designed board and I want to use all the 4 UARTs available in this chip at the same time.

The interesting problem which I am confronting is that three of these UARTs work properly and answer to their interrupts. The forth

UART can send data but it doesn't response to its receiving data. It's call back routine doesn't work. Another interesting matter is 

that when I change the initializing sequence of these UARTs the non responding UART is also changes. For example when I 

initialize the UARTs in my main as: uart0,uart1,uart2,uart3 the non responding uart is the last one ie. uart3. When I change the 

initializing sequence for example as: uart0,uart1,uart3,uart2 the non responding uart is uart2 . Always the last initialized uart 

doesn't respond. It seems that only three receiving interrupts are active.

I would be very thankful if you could guide me to solve this problem, because I need all 4 UARTs in my project.

Best regards

 

    

Parents Reply Children
  • Hi Sigurd

    This is my prl.conf

    I

    #
    # Copyright (c) 2018 Nordic Semiconductor
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    
    # CONFIG_PM_DEVICE=y
    
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
    CONFIG_BT_SMP=y
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y
    
    # Enable the UART driver
    CONFIG_SERIAL=y
    CONFIG_UART_ASYNC_API=y
    
    CONFIG_GPIO=y
    
    # Make sure printk is not printing to the UART console
    CONFIG_CONSOLE=n
    CONFIG_UART_CONSOLE=n
    
    CONFIG_HEAP_MEM_POOL_SIZE=2048
    CONFIG_BT=y
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_DEVICE_NAME="KMS"
    CONFIG_BT_DEVICE_APPEARANCE=833
    CONFIG_BT_MAX_CONN=1
    CONFIG_BT_MAX_PAIRED=1
    CONFIG_BT_NUS_UART_BUFFER_SIZE=512
    # Enable the NUS service
    CONFIG_BT_NUS=y
    
    # Enable bonding
    # CONFIG_BT_SETTINGS=y
    # CONFIG_FLASH=y
    # CONFIG_FLASH_PAGE_LAYOUT=y
    # CONFIG_FLASH_MAP=y
    # CONFIG_NVS=y
    # CONFIG_SETTINGS=y
    
    # Enable DK LED and Buttons library
    CONFIG_DK_LIBRARY=y
    
    # This example requires more workqueue stack
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
    
    # Config logger
    CONFIG_LOG=n
    CONFIG_USE_SEGGER_RTT=y
    CONFIG_LOG_BACKEND_RTT=y
    CONFIG_LOG_BACKEND_UART=y
    CONFIG_ASSERT=y
    
    CONFIG_ADC=y
    # CONFIG_CBPRINTF_FP_SUPPORT=y

Related