Skip to main content
Associate
April 17, 2026
Question

STM32MP15 SWD Issues

  • April 17, 2026
  • 1 reply
  • 97 views

Hi,

I recently just finished the Yocto Bringup of a custom STM32MP15FAA1. Everything seems to be working in my application. I am now looking to begin development of the M4 in which I need access to either SWD or JTAG to do lower-level development. Unfortunately, I am having trouble connecting to either interfaces through both CubeIDE and also manually inputting OpenOCD in an IDF Powershell instance.

I presume the easiest way to get to my goal is to setup SWD which on the MP15 maps to TMS (SWDIO) and TCLK (SWCLK) and I connected GND and VCC. My STLinkV3-MIME detects 3.3V on the reference line but can never connect to target. This is my first time working with a SOM as most of my development is on base Cortex M microcontrollers so I have a few questions.

1. Is there anything in the M4 device tree that can be preventing JTAG from operating like the STPMIC? I do have M4 RPROC enabled in my device tree and the file descriptor is available for me to access.

2. Does the boot mode matter? My end application Linux will manage initialization of the clocks and such but I saw that the best way to develop on M4 is to leave it in Engg Boot so I can verify that my MX project clocks, power, etc is setup correctly. Is this the way to go?

3. SWD uses the NRST as a reset source and not NRTJST? Is there a way to configure this in the project debug configuration?

I posted my JTAG Tag Connect connections below

Thank you for the assistance in advance.

 

Ayden

 

1 reply

PatrickF
Technical Moderator
April 20, 2026

Hi @Ayden1717 

did you confirm the processor is correctly powered and out of reset ? I assume you use STPMIC1.

Is your custom board board OK or your just started an early bring up and there is still potentially HW issues ?

 

For JTAG/SWD connection for an early Cortex-M4 debug without Linux, Engineering Boot (aka Development Boot) is the easiest way.


In UART/USB Boot mode, is the platform able to connect to the PC with USB DFU mode ?

Maybe look to PA13 (See AN5031 for details).

 

Regards

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.NEW ! Sidekick STM32 AI agent, see here
Ayden1717Author
Associate
April 20, 2026

Hi Patrick,

Thanks for the reply. This is the third revision of our custom board, currently running our application on Linux, so no hardware issues are outstanding to my knowledge.

Unfortunately, I don't have a TTL adapter right now to check the USB DFU (our hardware engineers connected an FTDI to this port). So I will check when I receive one.

In the meantime yes, we are using STPMIC1 can you confirm which node supplies the M4 with Power? I am beginning to believe this may be a device tree configuration as multiple debuggers and setups do not seem to be working and the pinout is consistent with the AN5031. Can you also confirm that I don't need to make any Security Module / Secure Access patches to my image by default in order to connect into the M4 device through SWD (TF-M)?

Because I have a working Linux image, would you recommend moving to Production Boot? Can this give me any additional information regarding issues the M4 configuration could potentially have for connecting to SWD?

Thanks again,

Ayden

PatrickF
Technical Moderator
April 20, 2026

Hi,

So no HW no power supply issues. Maybe some misunderstanding as likely the USB DFU exist on your board as this is the port used to Flash the board image with CubeProgrammer.

 

If Linux is running, you can use the same approach as in our example here (Linux running with remoteproc/openAMP is named "production mode" ).

https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-EV1/Develop_on_Arm%C2%AE_Cortex%C2%AE-M4/Modify,_rebuild_and_reload_a_firmware

But you need Linux Ethernet connection as the Cortex-M4 code is sent using SSH (could be an share Ethernet, a point2point ethernet to the PC or even an EthernetOverUSB).

At least to debug it, the Cortex-M4 should be running some code (as it is kept in reset until started by Linux).

 

CubeIDE also work in "Engineering Boot", but then, as Linux is not running, some system and clock initialization should be done by your FW.

https://wiki.st.com/stm32mpu/wiki/How_to_use_developer_and_production_modes#Arm-C2-AE_Cortex-C2-AE-M4_startup_in_developer_mode_-28-E2-80-9CMCU_Single_Core_like-E2-80-9D-29 

 

Regards.

 

 

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.NEW ! Sidekick STM32 AI agent, see here