2023-12-21 09:35 AM
Hi all,
We have a custom board based on stm32mp157f-dk2, with small changes. But we have an issue that the board will not wakeup after remoteproc0(m4) is turned off (cmd: echo stop > /sys/class/remoteproc/remoteproc0/state). When m4 firmware is running, wakeup source works. The dk2 board is ok, no such issue. What may be the cause? We have spent much time on it but no finding. Please give some advice...
Attatch my devicetree as follow.
2023-12-22 08:50 AM
Hi @edwin007
Could you describe a bit more the setup ?
Which low power modes are you using on Linux ?
Which wakeup source is used ?
Any messages when going to low power ?
Does it work when remoteproc was never started ?
Maybe first focus on differences between your custom board and DK2 (wakeup external circuitry, HSE oscillator or crystal, etc...).
I'm not expert, but maybe Linux start and stop some clocks together with remoteproc (clocks linked to devices defined in DT as &m4_xxx ).
https://wiki.st.com/stm32mpu/wiki/How_to_configure_system_resources#Configuring_clock_and_regulator_system_resources
some additional useful links
https://wiki.st.com/stm32mpu/wiki/Power_overview
https://wiki.st.com/stm32mpu/wiki/How_to_configure_PWR_Wake-up_pins
https://wiki.st.com/stm32mpu/wiki/Trace_and_debug_scenario_-_UART_issue
Regards.
2023-12-25 01:49 AM
Hi @PatrickF , thanks for your reply.
1. I have adc running on m4 in DMA mode, which transfers data to a7 through rpmsg channel.
2. I use "echo mem > /sys/power/state" to enter lowpower mode. I am not clear which low-power mode Linux is actually in. It will chose the most deep low-power mode based on the wakeup sources enabled, isn't it?
3. I use console ttySTM0 as wakeup source:
echo enabled > /sys/devices/platform/soc/40010000.serial/tty/ttySTM0/power/wakeup
echo enabled > /sys/devices/platform/soc/40010000.serial/power/wakeup
4. No special when enterring low-power mode. It just won't wake up since then no matter how many times you type until iwdg2 resets the system, the same reason I think as iwdg2 cannot wake up a7 to refresh its countdown timer.
5. No. I have never started m4 from boot, wakeup sources doesn't work either.
Thanls for your tip. I have reviewed m4_system_sources node found that m4_adc is not enabled. But after dtb change, the issue is still there.
Any idea?
I will continue to study your materials, many thanks