RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Safe shutdown script - UART

    Scheduled Pinned Locked Moved Help and Support
    nespi case +nespi case plussafe shutdown
    10 Posts 2 Posters 1.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      Panja
      last edited by

      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...

      cyperghostC 1 Reply Last reply Reply Quote 1
      • cyperghostC
        cyperghost @Panja
        last edited by cyperghost

        @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

        1 Reply Last reply Reply Quote 1
        • P
          Panja
          last edited by

          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?

          cyperghostC 1 Reply Last reply Reply Quote 0
          • cyperghostC
            cyperghost @Panja
            last edited by

            @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

            1 Reply Last reply Reply Quote 1
            • P
              Panja
              last edited by

              @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?

              cyperghostC 1 Reply Last reply Reply Quote 0
              • cyperghostC
                cyperghost @Panja
                last edited by

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

                That should do the trick

                1 Reply Last reply Reply Quote 0
                • P
                  Panja
                  last edited by

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

                  1 Reply Last reply Reply Quote 0
                  • P
                    Panja
                    last edited by

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

                    Thanks for your expertise and time! :)

                    cyperghostC 1 Reply Last reply Reply Quote 0
                    • cyperghostC
                      cyperghost @Panja
                      last edited by

                      @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.

                      1 Reply Last reply Reply Quote 0
                      • P
                        Panja
                        last edited by

                        I did notice the SNES one as well. Awesome!

                        Cheers

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post

                        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.