cancel
Showing results for 
Search instead for 
Did you mean: 

SWV ITM Data Console on Dual Core M7 & M4 of STM32H755

Domy_ST
Associate III

I'm working on my first development projects on the STM32H755, which has two M7 and M4 cores. I need to display the printout on the ITM console while debugging. For example:

The main.c file of M7 has the following code:

.....
while(1) {
printf("Welcome Cortex-M7\n");
HAL_Delay(2000); }
.....

The same is true in the main.c file of M4 with the following code:

.....
while(1) {
printf("Welcome Cortex-M4\n");
HAL_Delay(1000);}
.....

Before debugging, I configured the ITM console with SWV on the STM32CubeIDE environment, following the YouTube video:

https://www.youtube.com/watch?v=Zwylu6ma9gU 

https://www.youtube.com/watch?v=k3mXhPZSasw 

Then I enabled SWD to both the M7 and M4 cores in the Debugger option with the same clock frequency (64.0 MHz), port 0 for the M7 and port 3 for the M4.

Based on this configuration, during debugging, I see the "Welcome Cortex-M7" character printed, so debugging for the M7 is working correctly. However, I don't see the "Welcome Cortex-M4" character printed on either port 0 or port 4. The SWD of M4 has the same configuration as the M7.

What's wrong?

Thanks for your support.

5 REPLIES 5
Domy_ST
Associate III

Hello ST Community,

Has anyone had a similar problem? How did you solve it, if any of you have?

Thanks.


@Domy_ST wrote:

Then I enabled SWD to both the M7 and M4 cores in the Debugger option with the same clock frequency (64.0 MHz), port 0 for the M7 and port 3 for the M4.

 

 I don't see the "Welcome Cortex-M4" character printed on either port 0 or port 4. 


Could you please ensure your configuration, which port did you enabled for M4 port3 or port4?

KR, Souhaib

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.

Hi @Souhaib MAZHOUD ,
Here are the screenshots of the configuration I set up for STM32CubeIDE 2.0.0.

for the M7 debugger:

M7 DebuggerM7 Debugger

for the M4 debugger:

M4 DebuggerM4 Debugger

as you can see for M7 it is set to port 0, and the m4 to port 3.

On the ITM console I see only port 0 of the M7 printing while port 3 on the M4 does not print anything, as shown in the screenshot below:

Port 0 on M7 and Port 3 on M7 is empty

ITM Data Console Port0 and Port3ITM Data Console Port0 and Port3

what's wrong?

Thanks.

Domy_ST
Associate III

Hello ST Community,

is there any idea to fix the problem?

Thanks.

 

Hello @Domy_ST 

Actually, there is a limitation when using SWO in CM4 for STM32H755. Only one core's trace output can be connected to the physical SWO pin. 

You can refer to this post Solved: Best practices for instrumentation logging with du... - STMicroelectronics Community, which provides a detailed explanation.

BR, Souhaib

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.