2026-04-17 2:00 PM
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
2026-04-20 3:08 AM
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
2026-04-20 6:44 AM
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
2026-04-20 7:39 AM
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" ).
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.
Regards.
2026-04-23 12:08 PM
Hi Patrick,
I recieved my TTL serial adapter and still no luck connecting to M4. Will keep you posted if I find anything. If you have any advice moving forward, that would be helpful.
I have been trying to get into the M4 in Production Mode as I know the clocking and Power schemes should be sufficient to run the M4 as its from the STM32MP157-DK2 image.
When I load I am met with this error
Error message from debugger back end:
could not connect (error 138): The system tried to join a drive to a directory on a joined drive.
could not connect (error 138): The system tried to join a drive to a directory on a joined drive.
I pulled a seperate STLink V2 off one of my old Nucleos to try (instead of the V3MINIE) and installed STM Cube Programmer (as people were saying errors similar to these involved drivers and installing should fix).
Thanks