SWO ITM Debug on MCUXpresso and J-Link does not seem to work

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SWO ITM Debug on MCUXpresso and J-Link does not seem to work

Jump to solution
1,356 Views
Hat
Contributor II

Could you point me to some documentation that describes what needs to be done to get the SWO debug "printf" to work over ITM. 

I've been trying to get his working and have tried to follow these but to no success.

 

Guides already looked at.

https://mcuxpresso.nxp.com/api_doc/dev/766/group__SWO.html

https://community.nxp.com/t5/MCUXpresso-Community-Articles/Overview-of-using-the-MIMXRT1060-4-EVK-wi...

0 Kudos
1 Solution
1,298 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi,

I set the Trace clock just like you. It can work. After update code in configure tool, don't forget to enable the Trace clock. When debug, user should set clock speed to 24M manually.

jingpan_0-1617957342254.png

 

Regards,

Jing

 

 

View solution in original post

0 Kudos
3 Replies
1,352 Views
ErichStyger
Senior Contributor V

Is it for the i.MX RT1064?

Maybe this one helps:

https://mcuoneclipse.com/2019/06/03/swo-with-nxp-i-mx-rt1064-evk-board/

 

Erich

0 Kudos
1,334 Views
Hat
Contributor II

Sorry, yeah it is for an i.MX RT1064.

During my workflow I would prefer to be able to use the SDK Config Tools so that I can generate the peripherals as needed, and overwriting the custom changes does break the SWO. 

Having these settings seem to produce the same divider and mux values as in the blogpost. I did have to choose PLL2 Bypass clock selector. This produces a 24Mhz Clock. 

Hat_0-1617274192364.png

which is confirmed by the RM.

Hat_1-1617274710772.png  Hat_2-1617274765218.png

 

However the PLL2 Bypass is breaking the SWO functionality.

Commenting out the 

```CLOCK_SetPllBypass(CCM_ANALOG, kCLOCK_PllSys, 1);``` line makes the SWO work again.

 

Choosing the "PLL2 PFD1 output" instead of "PLL2 Bypass clock selector output" produces an error in the config tools as the final clock frequency is at 528 Mhz and is over the 132Mhz limit for the TRACE_CLK_ROOT.

Hat_0-1617705163261.png

 

Hat_1-1617705193306.png

 

 

Is there a way to make the SWO setup compatible with the Config Tools? Or any settings in the Config Tools?

Tags (1)
0 Kudos
1,299 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi,

I set the Trace clock just like you. It can work. After update code in configure tool, don't forget to enable the Trace clock. When debug, user should set clock speed to 24M manually.

jingpan_0-1617957342254.png

 

Regards,

Jing

 

 

0 Kudos