2026-05-30 2:56 AM
Hello ST Community,
I am working on STM32MP257F-EV1 with OpenSTLinux:
Kernel: 6.6.116 Board: STM32MP257F-EV1 CA35TDCID OSTL Evaluation Board Default M33 firmware: USBPD_DRP_UCSI_CM33_NonSecure_sign.bin
My goal is to run SPI3 from CM33/M33 for an external ADC. I need:
PB7 = SPI3_SCK PB8 = SPI3_MOSI PB10 = SPI3_MISO PJ11 = DRL/GPIO input PB11 = TIM12_CH2 PWM from A35/Linux for ADC MCLK
What I have already verified:
1. SPI3 works correctly from Linux/A35. 2. PB11 PWM/MCLK works from Linux: PB11 is claimed by 40060000.timer function af9. 3. Linux device tree has SPI3 disabled when trying to assign SPI3 to M33: /sys/firmware/devicetree/base/.../spi@400c0000/status = disabled 4. TIM12/PWM stays enabled: /sys/firmware/devicetree/base/.../timer@40060000/status = okay 5. OP-TEE RIF was updated for M33/CID2: SPI3 -> CID2 PB7/PB8/PB10 -> CID2 PJ11 -> CID2 PB11 remains CID1/A35 for PWM
Runtime status after normal boot:
remoteproc0 = m0 offline remoteproc1 = m33 running USBPD_DRP_UCSI_CM33_NonSecure_sign.bin
Linux pinmux state:
pin 23 (PB7): UNCLAIMED pin 24 (PB8): UNCLAIMED pin 26 (PB10): UNCLAIMED pin 27 (PB11): device 40060000.timer function af9 group PB11 pin 155 (PJ11): UNCLAIMED
Problem:
When I try to replace the M33 firmware with my custom OpenAMP/SPI/GPIO test firmware, the board becomes unstable/reboots. I also observed that manually doing remoteproc stop/start for the M33 USBPD firmware can immediately reboot the board:
echo stop > /sys/class/remoteproc/remoteprocX/state echo start > /sys/class/remoteproc/remoteprocX/state
If I keep the default firmware running:
USBPD_DRP_UCSI_CM33_NonSecure_sign.bin
the board stays stable.
So it looks like on the default EV1 image, CM33 is used for USBPD/UCSI board-management firmware, and replacing it with my own firmware is not safe.
My questions:
What is the recommended way to run a custom CM33 firmware on STM32MP257F-EV1 when the default image uses CM33 for USBPD_DRP_UCSI_CM33_NonSecure_sign.bin?
Is there an official M33 examples / OpenAMP image or flash layout for STM32MP257F-EV1 where CM33 is free for user firmware instead of USBPD?
If I need to use SPI3 from CM33, should I:
use a different device-tree / OP-TEE profile,
disable USBPD/UCSI CM33 firmware,
or integrate my SPI code into the USBPD_DRP_UCSI CM33 firmware as a FreeRTOS task?
What is the correct way to assign SPI3 and GPIO pins PB7/PB8/PB10/PJ11 to CM33 using RIF without breaking USBPD/UCSI or board power behavior?
Any guidance on the correct ST-supported architecture for CM33 user firmware + SPI3 on STM32MP257F-EV1 would be very helpful.
Thank you.