Please do not post a support request without first reading and following the advice in

Safe shutdown script - UART

  • I have installed the safe shutdown script (from @CYPERGHOST) for the Nespi Case+.
    This enables UART (standard RetroFlag script does the same) which clocks the core_freq down from 400 to 250 MHz.

    Can someone explain why UART needs to be enabled? Why do I need it?
    I have removed the line in /boot/config.txt and the script kept working...

  • @panja At first it is not my script it is an addition to the one of retro-flag. I do not like the way they are using the python sensor libary for just monitoring state of two buttons and I do not understand that they use buttons just for reboot and shutdown ;) Therefore I wrote the multi switch shutdown script. This will not need such tricks but needs a bit more bash knowledge. So I think many people prefer ready installer setups ;) The modified python was a proof of concept coding.

    About the UART enabling... It is just there to lid the power on LED on beginning. That is all - overrated

  • Thanks for your prompt reply, appreciated.
    I know it's not your script, you forked and made it better. :-)

    So UART is only used for the front LED on the case?
    I must admit, it's not necessary but I do like it. ;-)

    Is there any other way to get the LED working?
    Or any way UART can be enabled but without the change of core_freq and maybe other changes?

  • @panja Yes you can set Gpio Pin to high. But they will power on if the script is called. Not at boot strap! Another solution is to use the 3,3 power rail physical pin 1

  • @cyperghost
    Ohhh so the LED is on after boot?
    Well that's absolutely fine!

    It's nice to have an indicator that the Rpi is powered on.
    Doesn't really matter if that's right from the beginning or after boot.
    It's just that my little girl sometimes "accidentally" puts her finger on buttons she doesn't need to put them on. You know what I mean. ;-)

    If I do decide to use physical pin 1 (3.3v).
    Which wire do I attach to that pin?

  • @panja Yes move GPio14 - that's Pin 8 to Pin 1

    That should do the trick

  • Awesome! Gonna give it a go.
    Many thanks for your help, really appreciated!

  • @cyperghost
    I switched pin 8 to pin 1.
    Front LED goes on directly now.

    Thanks for your expertise and time! :)

  • @panja as I said... The cases produced by retroflag are SO COOL!!! Now they produce SNES cases, too ;)
    But the software to make the switches work is so awful. I really have no idea why they use UART. I know that this was done if you send the Pie to deep sleep mode then the LED switches off. As the NESPi+ case can really cut power the 3,3v powerrail will also shut off on successful power down.

  • I did notice the SNES one as well. Awesome!


Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.