This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Power Down not working as it should
#1
Running a MacArthur Hat, latest version, Openplotter ...

I have the power down enabled through OpenPlotter settings,  GPIO 21 and 26, just as they should be, its made the correct entries in firmware/config.txt

I have a second pi configured the same way for guages/kiosk

When I remove the switched 12V the kiosk takes 3 or 4 seconds to shut down, as it should .. the plotter shuts down in around 1 second ...

Every time a boot, OpenCPN complains it was not shutdown correctly. This frequently cause issues, as OpenCPN like to run with its config file open for writes, which leads to corruption.

I added added a 10 second delay to shutdown.py after the pkil and before the halt ... and it still shuts down in 1 second or so ...  I'm now stumped.  The only way it can know it is supposed to be shutting down is presumably if shutdown.py spots the pin going low and begins the shutdown process .. but that shoud hit the sleep(10) .. which it isnt.

Clues? Ideas?  This is doing my head in ...  to save anyone asking if I have the pins configured correctly:     
Reply
#2
Solved, it was and is an OpenPlotter issue on the Pi5 ... solved it manually on mine.  On a Pi5 there is no pullup on GPIO with the standard OpenPLotter overly line added to config.txt and no hardware pullup on the MacArthur hat ... as a result, when the switched  power was removedthere was no "keep the power alive intil I am done" signal coming out of the Pi and the system shut down instantly.

Sticking a scope on GPIO 26 showed it low at all times.

For anyone that cares you need to add this line on a Pi5 to make your shutdown work as intended, otherwise it will shut down, just a lot faster than it should and not in a nice way!    
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)