Score:-1

Baud Rate instable on RPI4

jp flag

I have a strange problem. I'm running a TCP to Serial server I wrote in Python3. It uses the UART of the RPI4 at 500000 baud. Initially I wrote it for a NanoPi and runs fine, but when switching to the RPI4 I had comm errors. I attached a oscilloscope to the TX and saw that when commands failed the baud rate was lower. While investigating I could relate it to the clock speed on the RPI4. watchcat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq shows 600000 when it works fine on the first command then the CPU freq goes to 1500000. Then I see the baud rate change. When switching back it works again. I fixed the CPU speed now to the low freq with echo "powersave" |sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor. Then it keeps running. But the RPI runs half speed of course. When I fix the CPU freq to "performance" I keep having the same problem with changing baud rates even though the CPU freq stays at 1500000. I'm very puzzled about all this. Anyone any suggestions?

24601 avatar
in flag
how does this relate to ask ubuntu?
Sioux avatar
jp flag
I tough it was stable, but when I use another USB Serial it also switches baud rate??
Sioux avatar
jp flag
Because I forget to say I'm running Ubuntu 20.04 on it
Score:1
jp flag

I actually fixed it myself. Disabling bluetooth fixed the problem. Not it is stable and it doesn't matter which governance mode I run. Here is what I did:

I added dtoverlay=disable-bt in /boot/firmware/config.txt

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.