cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP257F-EV1 PCIE systemctl suspend problem

rossU
Associate III

I started a fresh CubeMX project with board selector "STM32MP257F-EV1 board", chose A35 as master, and initialized all peripherals to their defaults.

Now, I'm trying to kill PCIE entirely from the board. I removed it from both U-boot and Linux contexts (where it's present by default), and I also reset its corresponding GPIO pins to reset state (PCIE_NRST and PCIe_NWAKE_WKUP2). When I try to put system into low power mode, it does go to sleep as normal:

root@stm32mp2-e3-d8-80unknownunknown:~# systemctl suspend
root@stm32mp2-e3-d8-80unknownunknown:~#
[  615.683459] PM: suspend entry (deep)
[  615.687390] Filesystems sync: 0.003 seconds
[  615.693558] Freezing user space processes
[  615.695767] Freezing user space processes completed (elapsed 0.002 seconds)
[  615.699929] OOM killer disabled.
[  615.702971] Freezing remaining freezable tasks
[  615.708837] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
[  615.714911] printk: Suspending console(s) (use no_console_suspend to debug)

 

However, when I wake it up with WAKE_UP button, I see this output after which the board stalls:

NOTICE:  CPU: STM32MP257FAI Rev.Y
NOTICE:  Model: STMicroelectronics STM32MP257F-EV1 STM32CubeMX board - openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11
NOTICE:  Board: MB1936 Var1.0 Rev.D-01
NOTICE:  Reset reason: System exits from Standby for CA35 (0xd02030)
INFO:    PMIC2 version = 0x11
INFO:    PMIC2 product ID = 0x20
INFO:    FCONF: Reading TB_FW firmware configuration file from: 0xe011000
INFO:    FCONF: Reading firmware configuration information for: stm32mp_fuse
INFO:    FCONF: Reading firmware configuration information for: stm32mp_io
INFO:    Using EMMC
INFO:      Instance 2
INFO:    Boot used partition fsbl1
NOTICE:  BL2: v2.10-stm32mp2-r2.0(debug):()
NOTICE:  BL2: Built : 20:06:37, Jul 10 2025
INFO:    BL2: Skip loading image id 26
INFO:    BL2: Doing platform setup
INFO:    RAM: DDR4 32bits 1200000kHz
INFO:    BL2: Loading image id 1
INFO:    Loading image id=1 at address 0xe000000
INFO:    Image id=1 loaded: 0xe000000 - 0xe000326
INFO:    FCONF: Reading FW_CONFIG firmware configuration file from: 0xe000000
INFO:    FCONF: Reading firmware configuration information for: risaf_config
INFO:    RISAF2: No configuration in DT, use default
INFO:    FCONF: Reading firmware configuration information for: dyn_cfg
INFO:    BL31 max size = 0x17000 (94208B)
INFO:    BL2: Loading image id 3
INFO:    Loading image id=3 at address 0xe000000
INFO:    Image id=3 loaded: 0xe000000 - 0xe0144c5
INFO:    BL2: Skip loading image id 19
INFO:    BL2: Skip loading image id 4
INFO:    BL2: Skip loading image id 8
INFO:    BL2: Skip loading image id 2
INFO:    BL2: Skip loading image id 5
NOTICE:  BL2: Booting BL31
INFO:    Entry point address = 0xe000000
INFO:    SPSR = 0x3cd
INFO:    ARM GICv2 driver initialized

 

Then, it reboots with this reset reason:

NOTICE:  Reset reason: IWDG system reset (iwdgX_out_rst) (0x802134)

 

Any help would be much appreciated.

7 REPLIES 7
GatienC
ST Employee

Hello,

Was this sequence functional before removing the PCIE device? If so, maybe there's a clock management issue for the RISAF that shares its clock with the PCIE device. You can try setting this clock as critical in core/drivers/clk/clk-stm32mp25.c (OP-TEE).

There's an array  clk_stm32_clock_is_critical where you can add ck_icn_p_pcie.

Are there still RISAF5 RIF configuration present in the RIF configuration board file in OP-TEE?

I hope this helps,

Gatien

GatienC
ST Employee

If the RISAF5 is still enabled in OP-TEE device tree, please disable it as it's of no use. That might even be better.

Turns out PCIE was not the issue after all. The actual reason for such behavior was caused by M33 firmware not running. Any clue why non-running M33 would prevent the board from going into suspend mode?

Christophe Guibout
ST Employee

Hello @rossU,

 

For this kind of problem, there is no magic recipe, so I would suggest to:

- Enable logs in TF-A before going into low power to check if something wrong happended : echo N > /sys/module/printk/parameters/console_suspend

- Debug with with GDB : if a watchdog occured, the system is frozen somewhere, so GDB would help to know where.

- Check some PWR registers : PWR_CPU1CR, PWR_CPU2CR, PWR_CPU1D1SR, PWR_CPU2D2SR (Feel free to look into the Reference Manual).

 

BR,

Christophe

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

I executed this:

echo N > /sys/module/printk/parameters/console_suspend

before systemctl suspend, I enter suspend, board wakes up right away on its own with this output (after which watchdog resets the board):

E/TC:0   stm32_iac_itr:192 IAC exceptions [159:128]: 0x10000000
E/TC:0   stm32_iac_itr:197 IAC exception ID: 156
E/TC:0   Panic at core/drivers/firewall/stm32_iac.c:212 <stm32_iac_itr>
E/TC:0   TEE load address @ 0x82000000
E/TC:0   Call stack:
E/TC:0    0x82007ed8
E/TC:0    0x82041b3c
E/TC:0    0x8202c2b8
E/TC:0    0x8203f670
E/TC:0    0x82013cec
E/TC:0    0x820017dc

 

Now, I looked into Reference Manual and found that IAC exception ID: 156 corresponds to RCC. I also did stop M33 firmware manually to recreate the problem I was talking about, here's the output:

root@stm32mp2:~# ./fw_cortex_m33.sh stop
[ 1604.824546] ucsi-stm32g0-i2c 2-0035: i2c write 35, 08 error: -110
E/TC:1   stm32_serc_handle_ilac:133 SERC exceptions [63:32]: 0x8
E/TC:1   stm32_serc_handle_ilac:139 SERC exception ID: 35
[ 1605.348551] remoteproc remoteproc0: warning: remote FW shutdown without ack
[ 1605.437813] remoteproc remoteproc0: stopped remote processor m33

 

Now, I've dug into Reference Manual again and found that SERC exception ID: 35 corresponds to UART5, which I removed from M33 completely (removed alias in device tree as well) and moved to Linux.

 

I believe there's something wrong with RIF configuration, but I have no clue what. The story behind this is that I created CubeMX project selecting STM32MP257F-EV1 board and initialized all peripherals to their defaults, and started moving and removing unneeded peripherals one by one (my custom board is very similar to EV1, hence the decision to select EV1 board as starting point).

 

When I click Generate Code in CubeMX for this project I do get RCC warning:

rcc_warning.png

Here are all the RCC settings:

rcc-param.png

rcc-nvic.png

rcc-features-1.png

rcc-features-2.png

rcc-features-3.png

 

Is it even possible to only run A35 without M33 at all?

Christophe Guibout
ST Employee

Hello @rossU,

 

Yes, it's posible to only run A35 without M33 at all : feel free to compare the Op-tee DT configuration generated by CubeMx and the default one coming with STM32MP257F-EV board: be sure that the differences are relevant with what you modified in CubeMx.

Did have a look into our wiki : How to analyze IAC & SERC errors ?

 

Another way could be to remove some pieces of code in your firmware to check if the IAC comes from the M33 or from A35.

 

BR,

Christophe

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

How do I disable M33 core in CubeMX project? I'm trying to untick it but the tickmark keeps going back to "Avtivated". Also I can not remove it from OP-TEE and Linux contexts, it says this peripheral is forced. When I started the project I used board selector to select EV1 board.

m33.png

I did have a look into IAC and SERC errors on your wiki, I could not figure out what's going on. As I mentioned my IAC exception ID is 156 which corresponds to RCC block, and SERC exception ID is 35 which corresponds to UART5 which I removed from M33 context and added to Linux for my own needs.