Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UART: documentation #156

Open
manio opened this issue Sep 4, 2024 · 1 comment
Open

UART: documentation #156

manio opened this issue Sep 4, 2024 · 1 comment
Assignees

Comments

@manio
Copy link

manio commented Sep 4, 2024

Hi,
Thank you very much for your project. It's really great!

I have to admit that the documentation in src/uart.rs (https://docs.rs/rppal/latest/rppal/uart/index.html) is much more clear than the official one!
btw: the link it points to: https://www.raspberrypi.org/documentation/configuration/uart.md no longer exists and it automatically redirects to https://www.raspberrypi.com/documentation/computers/configuration.html.

There was also a change to overlay name from pi3-miniuart-bt to miniuart-bt (similar for pi3-disable-bt).

Besides above I want to ask one thing regarding the UART. I have a LoRa device connected to my Raspberry Pi Zero 2 W serial port. I am using this rpi also as android auto wireless dongle (https://github.com/nisargjhaveri/WirelessAndroidAutoDongle), so I cannot disable bluetooth completely (I assume I cannot use dtoverlay=disable-bt as it will probably disable the whole bluetooth). I decided that I choose this method:
"... move the Bluetooth module to /dev/ttyS0, instead of disabling it with the above-mentioned steps, add dtoverlay=pi3-miniuart-bt and core_freq=250 to /boot/firmware/config.txt."

I did like this and it works OK but I really don't need bluetooth serial at all so I thought, that maybe I would be able to remove the core_freq so it will run with standard frequency.
I took out another raspberry pi zero 2 w for testing and here are my results:

  • disabled console=serial0 in cmdline.txt, added dtoverlay=miniuart-bt and core_freq=250 to config.txt:
    vcgencmd measure_clock core
    frequency(1)=250000000
  • same as above but commented out core_freq=250 in config.txt:
    vcgencmd measure_clock core
    frequency(1)=400000000
  • reverted serial0... in cmdline.txt and default settings in config.txt:
    vcgencmd measure_clock core
    frequency(1)=250000000

This leads me to the following conclusions:

  • There is a possibility to leave higher frequency core (400MHz) even when bluetooth is enabled (no idea if there are some downsides of this)
  • The 250MHz core speed in default settings are probably because of serial0 in cmdline.txt

Can you confirm this conclusions?

@golemparts
Copy link
Owner

Thank you for looking into this! I'll have to update the documentation per your suggestions.

As for the core frequency conclusions, It has been several years since I've done anything with the uart module, so the technical details escape me at the moment. It's also possible things have changed in more recent releases of Raspberry Pi OS. I'll have to take some time to dive into this again. If you want a quick answer, your best bet is to find another more recent documentation source that discusses the issue, but if you're getting stable results without the lower clock frequency, it sounds like you found an acceptable solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants