Page 1 of 1

UART rpi4 braud rate?

Posted: Sat Jul 06, 2019 8:02 am
by Notupus
I'm trying 115200 but it fails with corrupted data, here's m config
.

Code: Select all

# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2


#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800
arm_freq=2150
gpu_freq=620
over_voltage=4
hdmi_ignore_edid=0xa5000080


# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2
#hdmi_enable_4k=1


[all]
#dtoverlay=vc4-fkms-v3d
enable_uart=1

Re: UART rpi4 braud rate?

Posted: Sat Jul 06, 2019 8:06 am
by joan
What is arm_freq=2150 meant to do?

Re: UART rpi4 braud rate?

Posted: Sat Jul 06, 2019 8:12 am
by Notupus
Overclock the CPU to 2.15Ghz

Re: UART rpi4 braud rate?

Posted: Sat Jul 06, 2019 3:07 pm
by trejan
The UART on GPIO 14 & 15 is still the old mini UART that is linked to the core clock which varies.

Your choices are:
  • Disable Bluetooth by adding "dtoverlay=pi3-disable-bt" to config.txt so you get the full featured PL011 UART on GPIO 14 & 15.
  • Force the core frequency by adding "core_freq_min=500" but it'll increase power consumption when idle.
  • Use one of the additional PL011 UARTs that appeared in the RPi 4. They're not on the GPIO 14 & 15 though.

Re: UART rpi4 braud rate?

Posted: Sat Jul 06, 2019 3:59 pm
by Notupus
I tried using Use one of the additional PL011 UART near the 5volt pin like in the old pies.

Re: UART rpi4 braud rate?

Posted: Sat Jul 06, 2019 4:56 pm
by trejan
Notupus wrote:
Sat Jul 06, 2019 3:59 pm
I tried using Use one of the additional PL011 UART near the 5volt pin like in the old pies.
That is GPIO 14 & 15. If you don't disable Bluetooth then you only get the mini UART on those pins.

Re: UART rpi4 braud rate?

Posted: Sat Jul 06, 2019 6:02 pm
by Nifnat
Notupus wrote:
Sat Jul 06, 2019 8:12 am
Overclock the CPU to 2.15Ghz
The ARM frequency limit on the stable firmware is 1.75GHz. I found that if you set it above that value you end up actually under-clocking the CPU by a large factor. Might not be related to your problem but it couldn't hurt to try.

Re: UART rpi4 braud rate?

Posted: Sat Jul 06, 2019 6:04 pm
by Notupus
No. it managed 2.15ghz stable with sysbench and everything. Maybe I've got a golden chip

Re: UART rpi4 braud rate?

Posted: Sat Jul 06, 2019 6:04 pm
by Notupus
trejan wrote:
Sat Jul 06, 2019 4:56 pm
Notupus wrote:
Sat Jul 06, 2019 3:59 pm
I tried using Use one of the additional PL011 UART near the 5volt pin like in the old pies.
That is GPIO 14 & 15. If you don't disable Bluetooth then you only get the mini UART on those pins.
Yes, those are the pins qwith the corrupted data.

Re: UART rpi4 braud rate?

Posted: Sat Jul 06, 2019 6:08 pm
by trejan
The bleeding edge firmware on github/rpi-update removes that limit.
Ignore this. I'm wrong. It looks like it does cap now at 2GHz instead of 1.75GHz because it halves the 4GHz VCO clock.

Re: UART rpi4 braud rate?

Posted: Sat Jul 06, 2019 6:09 pm
by Nifnat
Did you confirm using vcgencmd measure_clock arm that it's actually running at that frequency? On this post here I was told that on the unstable firmware the max is 2GHz. Could be they have made a firmware change since I last tested it.

Re: UART rpi4 braud rate?

Posted: Sat Jul 06, 2019 6:11 pm
by trejan
Notupus wrote:
Sat Jul 06, 2019 6:04 pm
Yes, those are the pins qwith the corrupted data.
You'll have to pick one of the options I mentioned above then. Disable Bluetooth, force the core clock or use one of the new UARTs that are on different pins.

Re: UART rpi4 braud rate?

Posted: Sat Jul 06, 2019 6:20 pm
by Notupus
Ok. I want to use the build in new uarts, how would I do that?

Re: UART rpi4 braud rate?

Posted: Sat Jul 06, 2019 6:25 pm
by trejan
Notupus wrote:
Sat Jul 06, 2019 6:20 pm
Ok. I want to use the build in new uarts, how would I do that?
Read https://www.raspberrypi.org/forums/view ... &p=1493756

Re: UART rpi4 braud rate?

Posted: Sat Jul 06, 2019 7:52 pm
by Notupus
It doesn't specify how to run a console on the uarts