Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[system] power: add method to specify the PMIC/FuelGauge interrupt pin. #2777

Open
wants to merge 1 commit into
base: feature/auxiliary-power-control
Choose a base branch
from

Conversation

XuGuohui
Copy link
Member

@XuGuohui XuGuohui commented May 29, 2024

NOTE: this PR is targeting the feature/auxiliary-power-control branch

Problem

  1. Currently the pin for PMIC interrupt is pre-defined per platform in DVOS and customer has to designed their own board according to the pin number for the PMIC interrupt.

  2. We have allocated the A6 pin for the PMIC interrupt on the MSoM. For Muon, we'd like to make PMIC be capable of waking up device from hibernate mode, however the A6 pin doesn't not have this ability. Thus, for Muon we connect the PMIC interrupt pin to A7, which is capable of doing what we want. But DVOS doesn't has a method to change the default pin for PMIC interrupt.

Solution

Introduce a new method SystemPowerConfiguration::intPin(pin) to specify another pin for PMIC/FuelGauge interrupt.

Steps to Test

Hardware: SoM Eval board + MSoM

  1. Flash the attached test app
  2. Remove the PM_INT jumper on the SoM EVAL board
  3. Fly wire the A7 with the PM_INT pin
  4. See if the system power manager behaves as expected

Example App

#include "application.h"
 
STARTUP(  
    System.setPowerConfiguration(SystemPowerConfiguration().feature(SystemPowerFeature::PMIC_DETECTION).intPin(A7));
);

SYSTEM_MODE(MANUAL);
Serial1LogHandler logHandler(115200, LOG_LEVEL_ALL);

void setup() {
}

void loop() {
}

References

N/A


Completeness

  • User is totes amazing for contributing!
  • Contributor has signed CLA (Info here)
  • Problem and Solution clearly stated
  • Run unit/integration/application tests on device
  • Added documentation
  • Added to CHANGELOG.md after merging (add links to docs and issues)

@XuGuohui XuGuohui added the 6.x label May 29, 2024
@XuGuohui XuGuohui force-pushed the feature/auxiliary-power-control branch from c40accc to ab943f2 Compare June 25, 2024 13:46
@XuGuohui XuGuohui force-pushed the feature/sc128234/configurable-pmic-int-pin branch from cc5c2ed to 7b68f2d Compare June 25, 2024 15:01
@XuGuohui XuGuohui changed the base branch from feature/auxiliary-power-control to feature/muon-som-evb June 25, 2024 15:02
@XuGuohui XuGuohui force-pushed the feature/sc128234/configurable-pmic-int-pin branch from 7b68f2d to 9fbd860 Compare June 28, 2024 16:25
@XuGuohui XuGuohui changed the base branch from feature/muon-som-evb to feature/auxiliary-power-control June 28, 2024 16:26
@XuGuohui XuGuohui force-pushed the feature/sc128234/configurable-pmic-int-pin branch from 9fbd860 to aad615e Compare July 4, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant