cancel
Showing results for 
Search instead for 
Did you mean: 

swv itm data console stop printing after few lines

GaneshKGrg
Associate II

Hi There,

I am using a SWV ITM to print the messages but it always stoped printing after 221 counter number as below image. Could any tell us what needs to be set to see continues printing. 

Screenshot from 2024-01-07 10-10-54.png

16 REPLIES 16

If the clocking rate on the core and the clocking rate on the debugger are not the same it can potentially desynchronize over time. Because if you tell the baud rate for the manchester encoder is one thing, and the core's doing another thing they are going to diverge at some point.

If this is using an ST-LINK/V3 the HSE_VALUE is closer to 8333333 than 8000000

Would suggest reading the SWV baud rate divider value and back computing that the actual rate is. And printing out the Core speed based on the clock sources, and PLL settings.

Did you check with STM32 Cube Programmer, and it's SWV Viewer?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Here we do this so we can quick establish wtf a particular board is doing

void SystemDiagnostic(void)
{
  printf("\n\nCore=%d, %d MHz\n", SystemCoreClock, SystemCoreClock / 1000000);
  CORECheck();
  IDCODECheck();
  FPUCheck();
  printf("APB1=%d\n", HAL_RCC_GetPCLK1Freq());
  printf("APB2=%d\n", HAL_RCC_GetPCLK2Freq());
}
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
GaneshKGrg
Associate II

Hi Tesla,

Thanks i used above code and PCLK1 and PCLK2 frequency are same 170MHz.

I think this is the issue in STM cube ID software.

 

I tested the same code in STM cube programmer, I did not find any issue at all.

Screenshot from 2024-01-11 14-24-42.png

I tested just prinf ... in IDE (1.13.1) :

AScha3_1-1704984870719.png

26242 lines text ..then error.

 

this might be the problem:

AScha3_0-1704984830909.png

(But my buffer is already at 2000000; try to increase yours.)

AScha3_2-1704985060416.png

 

If you feel a post has answered your question, please click "Accept as Solution".

Hi AScha,

I am using FreeRTOS and I am using UBUNTU and STM cube ID is 1.14.0.

Im my case i have not seen above messages as my trace buffer size is 2000000.

 

Hi @Tesla DeLorean ,

btw

HSE_VALUE on (new) H563-nucleo is 8M , from ST-LINK/V3 onboard,

i tested mco , makes 10,000xx Mhz on DSO counter.

 

AScha3_0-1704988417112.png

"NEW" : stlink has 24M clk on H563-nucleo 144 here ...

AScha3_1-1704988929764.png

NOT the (older) 25M oszillator , giving 25/3 = 8,3333 M ; (silly idea) on H7B3-disco here:

AScha3_2-1704989001087.png

 

ps : But somewhere in the big company the guy with the "25MHz" reference idea still working,

because there is a crystal onbord the new  H563-nucleo 144 , and guess which frequ.:

AScha3_3-1704989454692.png

 

If you feel a post has answered your question, please click "Accept as Solution".

https://community.st.com/t5/stm32cubeide-mcus/swv-itm-data-console-is-empty/m-p/599578

Need to determine the SWO->CODR address for the G4, and the wire rate of the SWCLK

https://developer.arm.com/documentation/ddi0314/h/Chdgfafd

 

Probably 0xE0003010

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..