I don't have much Linux or Pi experience. I may have overlooked some solution but did to a lot of searching and a LOT of experimenting.
I use the Pi as a bridge between my Ethernet and a PIC controller that does HomeAutomation. The communication via UART suits the problem. It all works with a Pi4 (UART3) or on the Pi3B with an USB - RS232 device. But both solutions use too much power (and the converters take too much room). Power is an issue as a battery is used for backup. Cost is an issue as this is not a one-off.
When I get access to UART1 on the 3B, it fails in two ways:
1. When my bridge service starts, usually /dev/ttyAMA0 is busy. I could fix that with a delay, but
2. At startup and shutdown, a bunch of activity is seen by my 'scope and my logic analyzer.
The activity seems like it's at 115,200 baud on startup. On shutdown it will be at 57,600 IFF my code has run, otherwise at 115,200.
The activity has the potential for confusing the PIC HomeAutomation system and certainly causes synchronization issues.
The data sent by ??? seems like it's standard 115,200 UART activity except that the logic analyzer sees (and I agree) framing errors.
Is there any way to prevent the OS (console maybe) from sending stuff on UART1 totally?
Some details follow.
config.txt has these lines added at the end under the last [all]:I either didn't have or removed the console phrase from cmdline.txt
Environment:
1. Raspberry Pi 3B, 1GB Ram, Boot from USB (Samsung FIT, 256GB)
2. UART to PIC Controller (currently two Converters, USB : RS232 and 3.3v UART : RS232.
3. Mains Powered, but Battery Backup (for a week if possible).
4. Ethernet Networking. No Wireless, No Bluetooth, No Audio, No Monitor.
5. 2024 Nov Release (Debian Bookworm), “Lite” version.
6. User Code is .NET (9.0.2), C# (13). That works fine with USB – RS232 “UART”.
7. CPU load is minimal. Memory load is modest (1 GB is fine).
Goals:
1. Use the PL011 directly to the PIC Controller’s UART Lines (0.0 – 3.3v both sides).
Eliminates Complexity, Bulk, Cost, and Power.
2. Minimal Power Use (Battery Backup Endurance).
3. Size and Cost are issues. Not a “One Off” project.
Issues:
1. “Junk” on the UART during Startup / Shutdown. Maybe “Console” but Framing Errors. ???
This could be catastrophic if valid-looking data caused the PIC to mis-behave.
2. When my code (a service) starts early, it fails due to /dev/ttyAMA0 unavailable.
When my code is run later, it gets the UART1 (PL011 / ttyAMA0).
Two other services started before and after run fine but don’t use the UART.
I use the Pi as a bridge between my Ethernet and a PIC controller that does HomeAutomation. The communication via UART suits the problem. It all works with a Pi4 (UART3) or on the Pi3B with an USB - RS232 device. But both solutions use too much power (and the converters take too much room). Power is an issue as a battery is used for backup. Cost is an issue as this is not a one-off.
When I get access to UART1 on the 3B, it fails in two ways:
1. When my bridge service starts, usually /dev/ttyAMA0 is busy. I could fix that with a delay, but
2. At startup and shutdown, a bunch of activity is seen by my 'scope and my logic analyzer.
The activity seems like it's at 115,200 baud on startup. On shutdown it will be at 57,600 IFF my code has run, otherwise at 115,200.
The activity has the potential for confusing the PIC HomeAutomation system and certainly causes synchronization issues.
The data sent by ??? seems like it's standard 115,200 UART activity except that the logic analyzer sees (and I agree) framing errors.
Is there any way to prevent the OS (console maybe) from sending stuff on UART1 totally?
Some details follow.
config.txt has these lines added at the end under the last [all]:
Code:
# Disabling Bluetooth so PL011 UART is Availabledtoverlay=disable-bt"# Disabling Wireless to Save Power.dtoverlay=disable-wifi# Disabling Console on UART."enable_uart=1
Environment:
1. Raspberry Pi 3B, 1GB Ram, Boot from USB (Samsung FIT, 256GB)
2. UART to PIC Controller (currently two Converters, USB : RS232 and 3.3v UART : RS232.
3. Mains Powered, but Battery Backup (for a week if possible).
4. Ethernet Networking. No Wireless, No Bluetooth, No Audio, No Monitor.
5. 2024 Nov Release (Debian Bookworm), “Lite” version.
6. User Code is .NET (9.0.2), C# (13). That works fine with USB – RS232 “UART”.
7. CPU load is minimal. Memory load is modest (1 GB is fine).
Goals:
1. Use the PL011 directly to the PIC Controller’s UART Lines (0.0 – 3.3v both sides).
Eliminates Complexity, Bulk, Cost, and Power.
2. Minimal Power Use (Battery Backup Endurance).
3. Size and Cost are issues. Not a “One Off” project.
Issues:
1. “Junk” on the UART during Startup / Shutdown. Maybe “Console” but Framing Errors. ???
This could be catastrophic if valid-looking data caused the PIC to mis-behave.
2. When my code (a service) starts early, it fails due to /dev/ttyAMA0 unavailable.
When my code is run later, it gets the UART1 (PL011 / ttyAMA0).
Two other services started before and after run fine but don’t use the UART.
Statistics: Posted by MIT70 — Fri Feb 21, 2025 7:47 pm — Replies 0 — Views 18