Raspberry Pi Asked by aryndin on November 13, 2021
I’m experimenting with upstream kernel and now I try to get serial console working. I’m getting only garbage symbols when I try to communicate:
I think it is important to notice that I only get garbage when I send something or when RPi send something back, not constantly.
It is also not a baud rate problem because same baud rate is valid when I use default RPi kernel. Therefore it is also not a cable problem, because serial console works well using default kernel or Raspbian OS.
I found out that different parameters like core_freq or enable_uart could help, so I tried them with no success.
Here is my config.txt:
# gpu_mem=64
kernel=Image
core_freq=250
enable_uart=1
arm_64bit=1
initramfs initramfs-linux.img followkernel
and cmdline.txt:
root=UUID=[deleted] rw rootwait console=ttyS1,115200 console=tty1 plymouth.enable=0
Kernel version 5.7
This is a baud rate problem. You're getting a lot of x
and f
characters which have ASCII codes of 01111000
and 01100110
- note all bits inside those are repeated twice. The effective baud rate of your Pi should be twice as low as what you think: if your terminal is set to 115200, try setting it to 57600.
Perhaps reading the messages you're receiving (using the right baud rate) will give you a clue about the root cause.
Answered by Dmitry Grigoryev on November 13, 2021
If hardware loopback works, then it could be clock issue. When using the analog tv out via the 3.5 mm jack on the RasPi4, then the clock gets reduced (see the RasPi documentation about overclocking). The UART seems to work properly only with HDMI output.
Answered by StefanProb on November 13, 2021
Only for the completeness: first check your connection as shown at What is the correct way to connect serial console on RPi4 Model B?. But I believe you are right.
As I see you are experimenting with the 64 bit version of the Raspberry Pi OS in addition with an init ramdisk. First you should verify that your serial console is working as expected. Download the Raspberry Pi OS beta test version and configure it as shown at Run 64-bit Raspberry Pi OS beta test version. In addition to that settings add the option enable_uart=1
to /boot/config.txt
before starting it in a RasPi that is able to run 64 bit.
You don't tell us what serial terminal program you are using. I have made very good experience with tio, a tiny, but very stable Terminal IO program, just exactly made for a serial console. I suggest to also use it.
I can confirm that this works on my Raspberry Pi 4B. If it also works on your RasPi then you can be sure that your custom kernel or your initramfs does not work with the serial console.
Answered by Ingo on November 13, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP