2022-11-25 02:22 AM
Hi
We are using SEEED studio 102110318 module which uses STM32MP157CAC3 processor. We want to know if there is any way we can keep processor pin PD13 pin to low state in suspend state. We want the pin to maintain low state while in sleep mode. We have added pullup on this pin in Hardware which is affecting one of our peripheral operation in sleep mode. For this reason we want this pin to be set low which will solve the issue. We do not have any other option to remove pullup in hardware as our device production is completed
PD13 is used as PWM to control LCD backlight, Is there any possibility to maintain PD13 as its runtime state during suspend mode, basically i dont want to control this pin during suspend mode
I tried in sysfs, to control autosuspend_delay_ms but im getting IO error please find below image
is there any way to control it from suspend mode?
Is there any other drivers that will support this feature?
Regards
Srini
2022-11-25 03:40 AM
As a complement to the post:
In openStLinux the PWR mode is selected based on the active wakeup source.
So when activating under Linux the 'suspend' state, the actual HW power mode in the chip will depend on which wakeup source is active.
In your case, I understand that the HW mode is 'standby'. hence the PD13 pin is in high impedance mode
In order to have this GPIO in another state you could change this by setting your product in LPLV-Stop mode (at the expense of consumption since VDDCORE would not be Off but at a reduced voltage level only). Your design (SEEED Studio) is using STPMIC that is able to deliver reduced VDDCORE voltage..
To do this you should use a wakeup source in Group2: PVD, AVD, IWDG, GPIO, LPTIM, DTS
(see AN5109: Table 12. Deepest power mode per wakeup source group and equivalence between Linux and STM32MP15x lines)
JM
2022-11-25 06:46 AM
Hi JM,
Thanks for your response,
In our product we are using "systemctl suspend" command to put the device in Sleep mode (deep sleep mode)
We are waking up the device by interrupts and POWER_ON_KEY in SOM's PMIC wake up
How to configure LPLV- Stop mode in Linux?
what is the impact if we are configuring LPLV stop mode instead of deep sleep mode?
Thanks
Srini
2022-11-25 09:25 AM
Hello Srini,
You
could replace the lower power mode "Standby" by "LPLV-Stop"
This
is done in the DT of OPTEE or TFA
example
on an eval board: stm32mp15xx-edx.dtsi
indicate
that the lowest low power mode is LPLV-Stop
&pwr_regulators {
system_suspend_supported_soc_modes = <
STM32_PM_CSLEEP_RUN
STM32_PM_CSTOP_ALLOW_LP_STOP
STM32_PM_CSTOP_ALLOW_LPLV_STOP
/*STM32_PM_CSTOP_ALLOW_STANDBY_DDR_SR*/
>;
system_off_soc_mode = <STM32_PM_CSTOP_ALLOW_STANDBY_DDR_OFF>;
vdd-supply = <&vdd>;
vdd_3v3_usbfs-supply = <&vdd_usb>;
};
warning
.. you also need to describe the power supply level for the power mode (not
always done)
&vddcore {
lp-stop {
regulator-on-in-suspend;
regulator-suspend-microvolt = <1200000>;
};
lplv-stop {
regulator-on-in-suspend;
regulator-suspend-microvolt = <900000>;
};
standby-ddr-sr {
regulator-off-in-suspend;
};
standby-ddr-off {
regulator-off-in-suspend;
};
};
Impact
on consumption could be important since the VDDCORE will always be ON (at
reduced voltage level 0.9V)
you
can check datasheet p143 and p144
https://www.st.com/resource/en/datasheet/stm32mp157c.pdf
LPLV-Stop
--> upto 25mA for worst case parts at 25deg
Standby
--> 4 to 130 uA on worst case part at 25deg
so depending on your power budget this proposal may not be possible ?
JM
2022-11-28 06:47 AM
Thanks JM