Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4481

Troubleshooting • Using gpio-shutdown does not force file-system to sync when powering off

$
0
0
Hi experts,
We have a consumer product that uses a CM4 as it's main processor. To make the product as robust as possible, we needed to address the issue of having the power cut while it's running. Our solution was to design our carrier board with a super capacitor. When the power is cut, GPIO 9 is pulled high, and the super capacitor supplies the pi with enough power to shutdown.

In our config.txt, we use gpio-shutdown to toggle the shutdown of the system. Attached is the configuration:

Code:

arm_freq=2000arm_freq_min=1500gpu_freq=700over_voltage=6dtparam=i2c_arm=offdtparam=spi=offdtparam=audio=off# Enable DRM VC4 V3D driverdtoverlay=vc4-kms-v3dmax_framebuffers=2# Run in 64-bit modearm_64bit=1# Disable compensation for displays with overscandisable_overscan=1# dtoverlay=dwc2,dr_mode=hostarm_boost=1#enable Antenna externaldtparam=ant2dtoverlay=vc4-kms-dpi-generic,rgb565-padhidtparam=hactive=856,hfp=8,hsync=8,hbp=8dtparam=vactive=480,vfp=4,vsync=4,vbp=4dtparam=clock-frequency=50000000display_auto_detect=1# Add support for software i2c on gpio pinsdtoverlay=i2c5,pins_10_11overscan_left=0overscan_right=0overscan_top=0overscan_bottom=0framebuffer_width=856framebuffer_height=480dpi_group=2dpi_mode=87enable_dpi_lcd=1display_default_lcd=1#add gpu memory for image processinggpu_mem=256#add the camera overlaydtoverlay=imx258_Modified,rotation=180#shutdown button setupdtoverlay=gpio-shutdown,gpio_pin=9,gpio_pull=down,active_low=0#LEDs and buttonsgpio=19=op,np,dhgpio=18=ip,np#disable bluetoothdtoverlay=disable-bt
This is all set up and working as designed except for one issue. I had assumed gpio-shutdown would trigger a safe shutdown.
However in our tests, when we write a file to the system, wait a few seconds, and cut the power, in some cases the system doesn't perform a sync, and on reboot that file exists but has 0 bytes.

Can anyone confirm that gpio-shutdown is actually safe?
Does anyone have an alternative solution if it's not safe?

Statistics: Posted by drewsipher — Wed Jun 05, 2024 8:25 pm — Replies 0 — Views 42



Viewing all articles
Browse latest Browse all 4481

Trending Articles