LdB-ECM / Raspberry-Pi

My public Baremetal Raspberry Pi code
MIT License
309 stars 58 forks source link

Possible to enable/disable UART without reboot? #20

Closed theronic closed 5 years ago

theronic commented 5 years ago

I see there is a UARTEN memory register reference in rpi-SmartStart.c as per page 187 of the BCM2835 Peripheral manual. I assume that flag corresponds to the enable_uart=1 setting in /boot/config.txt.

Is it possible to enable/disable UART by twiddling those bits without rebooting, even from Raspbian?

Any help is much appreciated.

LdB-ECM commented 5 years ago

It does a little more than that it stops raspbian attaching a console to it for kernel messages it is documented https://www.raspberrypi.org/documentation/configuration/uart.md

Disabling the register would leave the console bound but the data going into hyperspace and not appearing anywhere but it would also just waste CPU time still moving characters to the UART whcih would never send them.