RS485 works on Pi 1 but not Pi 3?

The Raspberry Pi is a series of credit card-sized single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote the teaching of basic computer science in schools and developing countries.

Post Reply
User avatar
/RaspberryPi
Corporate
Posts: 2449
Joined: Wed Jun 05, 2019 1:29 am

RS485 works on Pi 1 but not Pi 3?

Post by /RaspberryPi »


Hello everyone,

I am experiencing trouble with my Waveshare RS485 HAT on the Pi 3 when connecting to a bus.

Somehow, this setup works perfectly fine connected to my Raspberry Pi 1 Model B+, but if I move the HAT to my Pi 3 Model A+, it completely locks up the RS485 bus.

I have performed the necessary modifications to /boot/config.txt (added dtoverlay=disable-bt) on the Pi 3 since I understand I need to turn off Bluetooth to free up the PL011, enabled UART, disabled shell login over serial. I even tried booting with either dtoverlay=gpio,4=op,dh or dtoverlay=gpio,4=op,dl to see if the RSE pin had anything to do with it, but nothing.

When it's working on the Pi 1, the UART is accessible via /dev/ttyAMA0 and I can use the command "screen /dev/ttyAMA0 9600" to directly read the RS845 bus, and all information on the bus is clearly seen on the terminal (it's all ASCII). I can repeat this ad infinitum from a fresh install of Rasperry Pi OS with minimal configuration (just raspi-config serial settings) and it always works.

Then, when I repeat the same setup process on the Pi 3, making sure to correctly configure everything, when I attempt to connect to the RS485 bus that I was just successfully reading onto the Pi 1, it completely locks up the bus. I get all sorts of communication failure, and "screen /dev/ttyAMA0 9600" shows nothing.

"sudo lsof /dev/ttyAMA0" returns nothing on the Pi 3 as well as the Pi 1, indicating that nothing on the system is attempting to use the UART.

I could plug my logic analyzer in to the bus but I'm not sure it would be helpful, since I wouldn't be able to tell if the HAT is generating interference, I would just be seeing the data as it comes normally from the devices communicating on the RS485 bus, no? I'm not sure it would reveal anything.

Seems like this should "just work" considering that it works flawlessly on the Pi 1 but not the Pi 3.

If you've made it this far thanks for reading. I am at a loss. I have exhausted all avenues on my own. Hoping that I'm just plainly missing something simple or do not understand hardware/GPIO differences between the Pi Model B+ and Pi 3 Model A+.

Thanks for any input/advice.
submitted by /u/CalHoward
[link] [comments]

Source: https://www.reddit.com/r/raspberry_pi/c ... _not_pi_3/
/RaspberryPi
Post Reply

Return to “Raspberry Pi Forum”