MacArthur hat with power module powerdown issue? - Printable Version +- OpenMarine (https://forum.openmarine.net) +-- Forum: MacArthur HAT (https://forum.openmarine.net/forumdisplay.php?fid=29) +--- Forum: How do I...? (https://forum.openmarine.net/forumdisplay.php?fid=31) +--- Thread: MacArthur hat with power module powerdown issue? (/showthread.php?tid=5188) |
MacArthur hat with power module powerdown issue? - EricGesner - 2024-02-16 I've installed my new MacArthur hat with the new power module and believe it is configured according to the Power Management section on page 8 & 9 of the documentation. The system is functioning and communicating correctly with my IMU, DB18b20 1 wire sensors, etc. I did reboot after configuring the Shutdown management. However, when I power-off with my external switch, it appears to shutdown instantly, meaning all the lights on the MacArthur hat and Raspberry pi turn off instantly. Is this to be expected? I belive the "last -x" command confirms that a gracefull shutdown has not occured! pi@openplotter:~ $ last -x runlevel (to lvl 5) 6.1.21-v8+ Fri Feb 16 14:43 still running pi tty7 :0 Fri Feb 16 14:43 gone - no logout pi tty1 Fri Feb 16 14:43 gone - no logout reboot system boot 6.1.21-v8+ Wed Dec 31 19:00 still running runlevel (to lvl 5) 6.1.21-v8+ Fri Feb 16 14:43 - 14:43 (00:00) pi tty7 :0 Fri Feb 16 14:43 - crash (-19769+19:43) pi tty1 Fri Feb 16 14:43 - crash (-19769+19:43) reboot system boot 6.1.21-v8+ Wed Dec 31 19:00 still running This is from the [GENERAL] section of the ~/.opneplotter/openplotter.conf file: shutdown = {'gpio': '21', 'transition': 0, 'pull': 0} poweroff = {'gpio': '26', 'transition': 1} How should I troubleshoot and resolve this issue? RE: MacArthur hat with power module powerdown issue? - Sailoog - 2024-02-17 Attention, shutdown setting should be 'transition': 1 shutdown = {'gpio': '21', 'transition': 1, 'pull': 0} poweroff = {'gpio': '26', 'transition': 1} But you could also have a wiring mistake. I think your switch could be connected to "12V" instead of "12V SW" or connected to both at the same time: RE: MacArthur hat with power module powerdown issue? - EricGesner - 2024-02-17 (2024-02-17, 10:42 AM)Sailoog Wrote: Attention, shutdown setting should be 'transition': 1 Thank you for the response! My switch is definitely connected to 12V SW. Additionally, I measure 12V across the 12V and GND terminal at he MacArthur hat when switch is off and system is off. When I checked this morning I found GPIO 21 was set to low-high in the systems dialog. However, I believe it was high-low when I configured it yesterday. However setting/resetting it correctly today did not resolve the issue! Current state after resetting Shutdown management and rebooting raspberry pi and then using the switch to turn off and then back on is: See attatched image capture of settings dialog: [GENERAL] section of the ~/.opneplotter/openplotter.conf file: [GENERAL] section of the ~/.opneplotter/openplotter.conf file: shutdown = {'gpio': '21', 'transition': 1, 'pull': 0} poweroff = {'gpio': '26', 'transition': 1} And it appears the switch is still causing a crash rather than a controlled shutdown sequence as shown here. pi@openplotter:~ $ last -x runlevel (to lvl 5) 6.1.21-v8+ Sat Feb 17 09:28 still running pi tty7 :0 Sat Feb 17 09:28 gone - no logout pi tty1 Sat Feb 17 09:28 gone - no logout reboot system boot 6.1.21-v8+ Wed Dec 31 19:00 still running runlevel (to lvl 5) 6.1.21-v8+ Sat Feb 17 09:28 - 09:28 (00:00) pi tty7 :0 Sat Feb 17 09:28 - crash (-19770+14:28) pi tty1 Sat Feb 17 09:28 - crash (-19770+14:28) reboot system boot 6.1.21-v8+ Wed Dec 31 19:00 still running shutdown system down 6.1.21-v8+ Sat Feb 17 09:28 - 19:00 (-19770+14:28) runlevel (to lvl 5) 6.1.21-v8+ Fri Feb 16 21:05 - 09:28 (12:22) So I’m still having the shutdown problem. Please suggest additional troubleshooting steps that I should try. ALos here is the state of gpio's using pi@openplotter:~ $ raspi-gpio get 21 GPIO 21: level=1 fsel=0 func=INPUT pull=UP pi@openplotter:~ $ raspi-gpio get 26 GPIO 26: level=1 fsel=1 func=OUTPUT pull=DOWN So I’m still having the shutdown problem. Please suggest additional troubleshooting steps that I should try. RE: MacArthur hat with power module powerdown issue? - Adrian - 2024-02-18 Can you measure the voltage on GPIO26 (pin 37)? It should be close to 3.3V after the Pi booted up. This is the pin, that the shutdown logic sets to high after boot, and then to low once Pi OS completed shutdown. Also, can you state the model of your Raspberry Pi, and the version of OpenPlotter you are running. RE: MacArthur hat with power module powerdown issue? - EricGesner - 2024-02-18 Rasberry pi 4 model B Openplotter version: 3.6.6 After power up GPIO21 has 3.04V and GPIO26 has only 0.40V What could be causing the low voltage on GPIO26? Is GPIO21 lower than expected? Thanks, and please advise next steps in diagnosing the issue. RE: MacArthur hat with power module powerdown issue? - Sailoog - 2024-02-18 Raspberry OS version? Could you post here the content of file /boot/config.txt? RE: MacArthur hat with power module powerdown issue? - EricGesner - 2024-02-18 Raspberry pi OS version: VERSION="11 (bullseye)" boot/config.txt: # For more options and information see # http://rpf.io/configtxt # Some settings may impact device functionality. See link above for details # uncomment if you get no picture on HDMI for a default "safe" mode #hdmi_safe=1 # uncomment the following to adjust overscan. Use positive numbers if console # goes off screen, and negative if there is too much border #overscan_left=16 #overscan_right=16 #overscan_top=16 #overscan_bottom=16 # uncomment to force a console size. By default it will be display's size minus # overscan. #framebuffer_width=1280 #framebuffer_height=720 # uncomment if hdmi display is not detected and composite is being output #hdmi_force_hotplug=1 # uncomment to force a specific HDMI mode (this will force VGA) #hdmi_group=1 #hdmi_mode=1 # uncomment to force a HDMI mode rather than DVI. This can make audio work in # DMT (computer monitor) modes #hdmi_drive=2 # uncomment to increase signal to HDMI, if you have interference, blanking, or # no display #config_hdmi_boost=4 # uncomment for composite PAL #sdtv_mode=2 #uncomment to overclock the arm. 700 MHz is the default. #arm_freq=800 # Uncomment some or all of these to enable the optional hardware interfaces dtparam=i2c_arm=on #dtparam=i2s=on #dtparam=spi=on # Uncomment this to enable infrared communication. #dtoverlay=gpio-ir,gpio_pin=17 #dtoverlay=gpio-ir-tx,gpio_pin=18 # Additional overlays and parameters are documented /boot/overlays/README # Enable audio (loads snd_bcm2835) dtparam=audio=on # Automatically load overlays for detected cameras camera_auto_detect=1 # Automatically load overlays for detected DSI displays display_auto_detect=1 # Enable DRM VC4 V3D driver dtoverlay=vc4-kms-v3d max_framebuffers=2 # Run in 64-bit mode arm_64bit=1 # Disable compensation for displays with overscan disable_overscan=1 [cm4] # Enable host mode on the 2711 built-in XHCI USB controller. # This line should be removed if the legacy DWC2 controller is required # (e.g. for USB device mode) or if USB support is not required. otg_mode=1 [all] [pi4] # Run as fast as firmware / board allows arm_boost=1 [all] enable_uart=0 dtoverlay=w1-gpio,gpiopin=19 dtoverlay=gpio-shutdown,gpio_pin=21,active_low=1,gpio_pull=up dtoverlay=gpio-poweroff,gpiopin=26,active_low=1 RE: MacArthur hat with power module powerdown issue? - Sailoog - 2024-02-18 Everything seems correct, can you check if a /boot/firmware/config.txt file exists and post the content here if it exists? RE: MacArthur hat with power module powerdown issue? - EricGesner - 2024-02-18 that file does not exist... pi@openplotter:~ $ cat /boot/firmware/config.txt cat: /boot/firmware/config.txt: No such file or directory Also /boot/firmware directory does not exist... Could there be an issue with the power module? I soldered it, but think I have good solder joints. RE: MacArthur hat with power module powerdown issue? - Sailoog - 2024-02-18 Good. /boot/firmware/config.txt should not exist in your system. Next test, type this in a terminal to see the state of all GPIOs: raspi-gpio get You should get: GPIO 21: level=1 fsel=0 func=INPUT pull=UP GPIO 26: level=1 fsel=1 func=OUTPUT pull=DOWN |