This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Changing default UART0 pins makes console print gibberish

I would like to print debug messages to a PuTTY console. With the evaluation kit, this is very easy. It is connected to my PC via a USB cable, and I listen to one of the virtual com ports that is intended for the UART communication. It works.

Now for my custom board, I have changed the pins in the common.dts file. I see characters being printed to the PuTTY console, but they are not the correct ones. I print every 5 seconds, and every 5 seconds I see gibberish being printed.

Am I missing a part of the configuration, or is my hardware faulty?
I did not change the baudrate settings.

Thank you!

Parents Reply Children
  • Hi again Håkon,

    Which UARTx interface are you using? I assume UARTE0, but have to ask.

    Yes, I am using UART0. I did not change the configurations in this regard. In short:
    - I copied the board folder of the nRF9160DK
    - Changed the file names and references
    - Changed the UART0 TX and RX pins in the common.dts file
    - Remapped some GPIO pins

    So for example, I did not change the console to UART0 mapping.

    Which pins are being used, and have you checked if anything else in your system is trying to use the same pins?

    I am using TX pin 27. I have done a in-file search through the whole board folder and my .c file, and I did not find any other hits for this pin.

    Is it printing only jibberish, or is it "a bit off"?

    It is truely jibberish. The actual output is "▒▒▒Q▒▒57▒▒", but I would expect "Button pressed".

Related