UARTE Shell and Log compatibility

Hello,

We were developing on an nRF52840 board with the NCS 2.6.1 SDK and had configured logging and shell capabilities via UART. Once we moved to the 2.8.0 version, we found that these were no longer working. We have found that if the shell configurations are disabled, then the UART logging works as expected. Also, if we change our board devicetree to specify UART interface compatibility with the 'nrf-uart' module instead of the 'nrf-uarte' module, then the shell and logging both work.

We are seeing the same behavior on the nRF54L15 DK on v2.8.0, with logging working by itself, but no UART output seen when shell is enabled.

Using 'uart' is a workaround for us, but we expect that shell and logging are expected to work even with 'uarte' as they did on the previous SDK version. Are there any configuration changes that we are expected to make with the new SDK version to make these things work together?

Thank you

Here are some excerpts from our project configs

CONFIG_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_LOG_BACKEND_UART=y
CONFIG_UART_CONSOLE=y
CONFIG_UART_INTERRUPT_DRIVEN=y
...
CONFIG_LOG=y
...
CONFIG_SHELL=y
CONFIG_SHELL_BACKENDS=y
CONFIG_SHELL_BACKEND_SERIAL=y

Parents
  • Hi Ben,

    As you can see from UARTE — Universal asynchronous receiver/transmitter with EasyDMA and UART — Universal asynchronous receiver/transmitter, UART0/UARTE0 are same pheripherical using same register address, and it is enable as "nrf-uarte" compitable by default.

    I did a quick check with ncs\v2.8.0\zephyr\samples\subsys\shell\shell_module sample, both shell and log modules work as expected.

    *** Booting nRF Connect SDK v2.8.0-a2386bfc8401 ***
    *** Using Zephyr OS v3.7.99-0bc3393fb112 ***
    [00:00:00.373,443] <inf> app: Sample start to run
    
    uart:~$ 
    uart:~$ help
    Please press the <Tab> button to see all available commands.
    You can also use the <Tab> button to prompt or auto-complete all commands or its subcommands.
    You can try to call commands with <-h> or <--help> parameter for more information.
    
    Shell supports following meta-keys:
      Ctrl + (a key from: abcdefklnpuw)
      Alt  + (a key from: bf)
    Please refer to shell documentation for more details.
    
    Available commands:
      bypass              : Bypass shell
      clear               : Clear screen.
      date                : Date commands
      demo                : Demo commands
      device              : Device commands
      devmem              : Read/write physical memory
                            Usage:
                            Read memory at address with optional width:
                            devmem <address> [<width>]
                            Write memory at address with mandatory width and value:
                            devmem <address> <width> <value>
      dynamic             : Demonstrate dynamic command usage.
      help                : Prints the help message.
      history             : Command history.
      kernel              : Kernel commands
      log                 : Commands for controlling logger
      log_test            : Log test
      rem                 : Ignore lines beginning with 'rem '
      resize              : Console gets terminal screen size or assumes default in
                            case the readout fails. It must be executed after each
                            terminal width change to ensure correct text display.
      retval              : Print return value of most recent command
      section_cmd         : Demo command using section for subcommand registration
      shell               : Useful, not Unix-like shell commands.
      shell_uart_release  : Uninitialize shell instance and release uart, start
                            loopback on uart. Shell instance is reinitialized when
                            'x' is pressed
      stats               : Stats commands
      version             : Show kernel version
    uart:~$ 

    You can find the following modification I made for testing. You can refer to this sample to check your application codes.

    ncs280_shell_module.patch

    Best regards,

    Charlie

Reply
  • Hi Ben,

    As you can see from UARTE — Universal asynchronous receiver/transmitter with EasyDMA and UART — Universal asynchronous receiver/transmitter, UART0/UARTE0 are same pheripherical using same register address, and it is enable as "nrf-uarte" compitable by default.

    I did a quick check with ncs\v2.8.0\zephyr\samples\subsys\shell\shell_module sample, both shell and log modules work as expected.

    *** Booting nRF Connect SDK v2.8.0-a2386bfc8401 ***
    *** Using Zephyr OS v3.7.99-0bc3393fb112 ***
    [00:00:00.373,443] <inf> app: Sample start to run
    
    uart:~$ 
    uart:~$ help
    Please press the <Tab> button to see all available commands.
    You can also use the <Tab> button to prompt or auto-complete all commands or its subcommands.
    You can try to call commands with <-h> or <--help> parameter for more information.
    
    Shell supports following meta-keys:
      Ctrl + (a key from: abcdefklnpuw)
      Alt  + (a key from: bf)
    Please refer to shell documentation for more details.
    
    Available commands:
      bypass              : Bypass shell
      clear               : Clear screen.
      date                : Date commands
      demo                : Demo commands
      device              : Device commands
      devmem              : Read/write physical memory
                            Usage:
                            Read memory at address with optional width:
                            devmem <address> [<width>]
                            Write memory at address with mandatory width and value:
                            devmem <address> <width> <value>
      dynamic             : Demonstrate dynamic command usage.
      help                : Prints the help message.
      history             : Command history.
      kernel              : Kernel commands
      log                 : Commands for controlling logger
      log_test            : Log test
      rem                 : Ignore lines beginning with 'rem '
      resize              : Console gets terminal screen size or assumes default in
                            case the readout fails. It must be executed after each
                            terminal width change to ensure correct text display.
      retval              : Print return value of most recent command
      section_cmd         : Demo command using section for subcommand registration
      shell               : Useful, not Unix-like shell commands.
      shell_uart_release  : Uninitialize shell instance and release uart, start
                            loopback on uart. Shell instance is reinitialized when
                            'x' is pressed
      stats               : Stats commands
      version             : Show kernel version
    uart:~$ 

    You can find the following modification I made for testing. You can refer to this sample to check your application codes.

    ncs280_shell_module.patch

    Best regards,

    Charlie

Children
  • Hi Charlie,

    Thank you for your response. I have also been able to get the shell and logging working in the example application, but have still not been able to get any UART activity while using the shell and UARTE in our custom application. I've combed through the generated config files for our application and the sample code, but have not seen anything missing from our file.

    Since our configuration was working without issue on v2.6.1, I was trying to understand if there are any known changes from v2.6.1 to v2.8.0 relating to UART that might be the cause of our breakage.

    Since my original post I have also been running into I2C issues with the nrf-twim module on the nRF54L15, whereas we were previously using nrf-twi on the nRF52840. My understanding is that nrf-twim and nrf-uarte are both the DMA driver version for their respective protocols, so maybe there is some connection there? But it might be a completely unrelated issue.

    Thanks again,

    Ben

  • Hi Ben,

    Happy New Year! I hope you’ve made some progress since our last communication.

    Based on the information you’ve shared, here are some debugging thoughts:

    1. Example Application as a Baseline
      If the example application works as expected, that’s a good sign. I recommend modifying the sample application step by step to incorporate your custom application. This approach is typical for development and even for updating to a new NCS version(when big system level changes make upgrading complicated).

    2. Changes in NCS Versions
      Moving from v2.6.1 to v2.8.0 introduces sysbuild support (starting with v2.7.0). While sysbuild includes some Sysbuild forced options, I don’t believe any of them are directly related to the issue at hand. However, you should review the build\zephyr\.config file for any potentially suspicious configurations used by all images. Keep in mind that build\app\zephyr\.config is the configuration file specifically used for your application image.

    3. Addressing the I2C Issue
      I suggest disabling the I2C feature for now to focus on resolving the primary issue. Once the main problem is addressed, you can test and verify the I2C functionality separately. If necessary, feel free to open another ticket to get dedicated support for the I2C issue.

    Let me know if you need further assistance!

    Best regards,

    Charlie

Related