Trying to use UART1 on the nRF52840 SoC in the zephyr UART sample application 'echo_bot'

I've been trying for several days now to get the zephyr sample UART application 'echo_bot' to run using UART1 instead of the default shell UART (UART0).  I can get data output from the TX pin (displaying on a terminal on my PC), but I can never get any data input through the RX pin.  If I build the application using the shell UART (UART0), everything works fine.  I have checked my .DTS and overlay files and both UARTs are compatible with the nrfx-uarte peripheral.  I am using the nRF Connect SDK v2.2.0 for my development, with my target being the nRF52840 Soc.  I've attached my zipped application (echo_bot_JL).  I have made a couple of observations that I find rather confusing : 1)  I have the shell UART (UART0) running at 115.2 Kbaud and everything works 'as advertised'.  When I use UART1 (running at 9.6 Kbaud), I get data output from the TX pin, but I can't get any data in through the RX pin.  Also, when I step through the application using the debugger, both UART instances show as 'ready', yet I get no input from the UART1 instance.

I'm curious if anyone else has run into the same issues, and if so, how did you resolve them ??  I appreciate any suggestions, comments, etc.  Thanks !!echo_bot_JL.zip

Parents Reply Children
  • Susheel,

    Thanks for the reply, but I am having issues with P1.01 when it is configured as an RX input for a UART.    Another test that I performed on this port/pin combination is to set up a polling 'READ' of the UART port, but again, there was never any input detected from P1.01 when configured as an RX input.  I will continue my investigation and let you know if I come up with anything relevant or unusual.  Thanks for your assistance!!

    Jeff

  • Sorry Jeff, I thought I read P0.01 but thanks for correcting that you are using P1.01.

    P1.01 is free to use for the application. Can you check your device tree visual editor in visual studio code if P1.01 is assigned to something other than UART or UART instance is using something else after the final build.

    I am just taking a snapshot here from peripheral_uart sample to show that P1.01 in my case is unused.

Related