Notupus
Posts: 30
Joined: Tue Jun 19, 2018 9:57 am

UART rpi4 braud rate?

Sat Jul 06, 2019 8:02 am

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

User avatar
joan
Posts: 14097
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: UART rpi4 braud rate?

Sat Jul 06, 2019 8:06 am

What is arm_freq=2150 meant to do?

Notupus
Posts: 30
Joined: Tue Jun 19, 2018 9:57 am

Re: UART rpi4 braud rate?

Sat Jul 06, 2019 8:12 am

Overclock the CPU to 2.15Ghz

trejan
Posts: 428
Joined: Tue Jul 02, 2019 2:28 pm

Re: UART rpi4 braud rate?

Sat Jul 06, 2019 3:07 pm

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.

Notupus
Posts: 30
Joined: Tue Jun 19, 2018 9:57 am

Re: UART rpi4 braud rate?

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.

trejan
Posts: 428
Joined: Tue Jul 02, 2019 2:28 pm

Re: UART rpi4 braud rate?

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.

Nifnat
Posts: 14
Joined: Fri Nov 28, 2014 9:18 pm

Re: UART rpi4 braud rate?

Sat Jul 06, 2019 6:02 pm

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.

Notupus
Posts: 30
Joined: Tue Jun 19, 2018 9:57 am

Re: UART rpi4 braud rate?

Sat Jul 06, 2019 6:04 pm

No. it managed 2.15ghz stable with sysbench and everything. Maybe I've got a golden chip

Notupus
Posts: 30
Joined: Tue Jun 19, 2018 9:57 am

Re: UART rpi4 braud rate?

Sat Jul 06, 2019 6:04 pm

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.

trejan
Posts: 428
Joined: Tue Jul 02, 2019 2:28 pm

Re: UART rpi4 braud rate?

Sat Jul 06, 2019 6:08 pm

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.
Last edited by trejan on Sat Jul 06, 2019 6:15 pm, edited 2 times in total.

Nifnat
Posts: 14
Joined: Fri Nov 28, 2014 9:18 pm

Re: UART rpi4 braud rate?

Sat Jul 06, 2019 6:09 pm

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.

trejan
Posts: 428
Joined: Tue Jul 02, 2019 2:28 pm

Re: UART rpi4 braud rate?

Sat Jul 06, 2019 6:11 pm

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.

Notupus
Posts: 30
Joined: Tue Jun 19, 2018 9:57 am

Re: UART rpi4 braud rate?

Sat Jul 06, 2019 6:20 pm

Ok. I want to use the build in new uarts, how would I do that?

trejan
Posts: 428
Joined: Tue Jul 02, 2019 2:28 pm

Re: UART rpi4 braud rate?

Sat Jul 06, 2019 6:25 pm

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

Notupus
Posts: 30
Joined: Tue Jun 19, 2018 9:57 am

Re: UART rpi4 braud rate?

Sat Jul 06, 2019 7:52 pm

It doesn't specify how to run a console on the uarts

Return to “Troubleshooting”