Hi there,
I'm using MCUXpresso IDE 11.4.1 and I'm trying to use SWO trace with LPC55xx boards. So far I've tried my custom board with LPC5526 and also LPCXpresso55S28 evaluation board. My debug probe is LPC-Link2 running firmware V5.361.
The issue:
I can use the SWO views only in the first debug session after starting MCUXpresso IDE.
How to reproduce:
I compiled the demo app "hello_world_swo" from the SDK of the evaluation board and started a debug session. When the debugger halts execution at the default breakpoint at the beginning of main(), I press F8 to resume execution. (NB: SWO clock speed has been set correctly from prior runs.)
Then in SWO Profile I press "Resume data display". I have to wait about 15 seconds then tracing starts:
According to the statistics, SWO connection is ok:
Then I stop the debug session and start a new one. I follow the steps described above and get this error message:
Data communication error
Error encountered during data processing.
To get SWO Trace working again, I have to close MCUXpresso IDE and restart it.
Please help. Thanks.
When debugging in "all-stop" mode (instead of "non-stop" mode that I used before)
SWO does not work at all for me.
Symptoms:
I get an error when detecting clock speed (in SWO Trace Config view):
If I enter the clock speed manually and start an SWO Trace, I get the following error message window:
"Failed to initialize SWO trace.
Reason:
Failed to configure the probe for SWO. Unable to set DEMCR core registers. Please make sure that the clock has been properly configured in the application."
Searched for this error message but resulted in no exact hits. Am I the first one to observe this error message? That's very odd.
Any help is appreciated!
Best regards,
Dan
I would like to apologize for the delay. I got sick suddenly and couldn't write a response to you.
Regarding your concern, at the end I got confused, so are not you able anymore to init the SWO Trace inclusive if you restart MCUXpresso? Sometimes, before running again your code in your mcu, it is necessary to unplug and then plug it again or as you mentioned, closing MCUXpresso and re-opening it again. Just to be sure, your debugging interface is by using a LPC-Link2 with CMSIS-DAP, right?
In order to get the SWO working well, please follow the advices and steps posted on these couple of links that might be helpful to you to solve or avoid the errors:
https://mcuoneclipse.com/2017/06/01/mcuxpresso-ide-swo-performance-counters/
If the problem persist, Please let me know, so I can help you with.
Thank you so much.
Sincerely,
Pablo Avalos.
Hi @PabloAvalos ,
Thank you for getting back to me.
According to my observations, operation of SWO depends on the setting of "IDE Debug Mode":
When using "non-stop" mode, SWO works in the first debug session. In all further debug session, an error window pops up (as described before). To use SWO again, I need to close MCUXpresso and re-open it again.
When using "all-stop" mode, SWO does not work at all. Not even if I also unplug and then plug in the LPCXpresso55S28 board again.
Best regards,
Daniel
Updated to MCUXpresso 11.5.0. These are my observations.
SWO has improved a lot:
- Sluggish behaviour after confirguration is gone.
- SWO works in consecutive debug sessions.
The following issues still exist with SWO:
- Does not work when debugging in "all-stop" mode.
- Does not work with J-Link firmware.
The following issues still exist with SWO ITM Console:
- Duplicate SWO output.
- When clearing data display (button with red cross symbol), subsequent outputs do not appear until the number of lines that had been printed prior to clearing display is exceeded.
Tested with LPCXpresso55S28 and integrated LPC-Link2 V5.361
Hi,
Regarding SWO with all-stop: we tried with 11.5.0 & LPC55s28 & LPC-LINK2 v5.361 and seems it works with no issue:
Can you please check if:
1. you executed board initialization before going to SWO configuration
2. still reproducible if you switch to another USB cable
Regarding the ITM Console issues we confirm that are reproducible on our side too.
Regards,
MCUXpresso IDE Support
Thanks for trying to reproduce this issue.
Tried a different USB cable. Let the code run past (clock) initialization. SWO still does not work for me in all-stop mode.
- no automatic clock detection
- same error message as before "Failed to initialize SWO trace Reason: .... DEMCR core registers..."
Tested with MCUX Ide V11.5.0, LPXCpresso55S28, integrated LPC-Link2 and test project from SDK LPC5526 V2.10.1