Console app using ttyAMA0 appears to cause a spontaneous shutdown on RPI4

Hello all,

I just completed a new uSD card with the latest Buster image; all of the updates and the changes necessary to run my apps. All of the apps work fine, except for a Console app that continiously polls remote device through the UART, ttyAMA0 (hardware serial port on GPIO 14 and 15).

On a RPi3, everything runs perfectly without any issue.

However when the same uSD card is used on an RPi4(either 2 or 4gig) when this app is started, a few seconds later the Pi shuts down. There are no logs either - unless I am looking in the wrong place.

Any idea why it would work in a Pi3 and not a Pi4?

Found the cause of this - WiringPi depreciated for Raspberry Pi 4, not on RPi3. So the code would work perfectly when using and PRi3, but would cause a crash on RPi4.

Fixed by using PIGPIO.

1 Like
Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.