bigtreetech / bigtreetech/CB1

BTT Pi 1.2 OS image 3.0.0 -> GPIO reset (LOW) after shutdown?

Open
#200 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
496
Forks
86
PR merge metrics
No merged PRs in 30d

Description

Hi,

I have a 3d printer with BTT Pi 1.2 and recently updated from 2.3.4 to 3.0.0. I use a GPIO (PI14, GPIO270, pin 33) for remote shutdown with BTT Relay v1.2 (PI14 connected to the shutdown pin at the relay). I use a Klipper shutdown configuration with PI14(LOW) = normal operation, PI14(HIGH) = shutdown. If I turn PI14 to HIGH, the relay properly shuts down the machine. However, if I shutdown the BTT Pi 1.2 via the 'shutdown' command in klipper, the relay is activated (PI14 set HIGH by the klipper configuration) but then the audible switch in the relay demonstrates that the relay is deactivated (PI14 set LOW?).

I can easily force this by creating two Klipper commands, one sets the GPIO LOW and the second one sets the GPIO HIGH. With the command:

> SET_PIN PIN=power_detect VALUE=1

the system shuts down after some seconds; if I run two commands within the shutdown delay:

> SET_PIN PIN=power_detect VALUE=1
>
> SET_PIN PIN=power_detect VALUE=0

the audible noise of the relay is heard twice and the shutdown is cancelled.

This behaviour was not the same in v2.3.4 OS image. Is it possible that GPIO are reset (PI14 set LOW) during shutdown?

BR

EDIT: it looks like I missed information, although it was by purpose, it could be important to understand this situation. I already know that BTT relay shutdown is triggered with logical LOW state in the input and normal operation with logical HIGH. I change the logic of the input becauuse the GPIO in the BTTPi can't be set to HIGH (normal operation) during bootup, like in a MCU with klipper.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the shutdown behavior on a BTT Pi 1.2 using OS image 3.0.0, PI14/GPIO270/pin 33, and the Klipper SET_PIN commands described in the report. Compare the GPIO state and relay behavior during shutdown with OS image 2.3.4; done means identifying whether shutdown resets the GPIO and documenting the relevant cause or subsystem.

Written by the indexing model from the issue text.

Assessment

Domain
embedded-iot, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.