No traceswo output on stm32H7xx
Hi Forum. I am new to the H7 line of processors and the first thing I tried is getting printf() output on the traceswo pin of my nucleo-H743ZI. What I have tried:
1. The 'Everything out of the box' way:
Use cubeMX to configure sys to async trace, configure clocks, enable master clock out (to verify clock speed with a logic analyser).
Import the project to atollic truestudio and configure debugging to use the SWV, with the specific baudrate and core clock.
Write simples mainloop:
while(1) {
ITM_Sendchar('T');
delay(xxx);
}
Start a debugging session, configure trace port 0 and start tracing -> no output in atollic truestudio, no output on PB3 (verified with logic analyser)
2. The 'Do some manual work and hope the rest will resolve' way:
Same as above, with the exception of enabling the ITM unit manually:
CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk;
CoreDebug->DEMCR |= CoreDebug_DEMCR_VC_CORERESET_Msk;
ITM->LAR = 0xC5ACCE55; // Unlock Lock Access Registers
ITM->TCR |= ITM_TCR_DWTENA_Msk;ITM->TCR |= ITM_TCR_SYNCENA_Msk;ITM->TER |= 0x01; // Port 0ITM->TCR |= ITM_TCR_ITMENA_Msk;
Start debug session, enable tracing in atollic studio, THEN call my own init function - since the debugger overwrites the register values -> No traceswo output
3. The 'Do another variation of the non-working example' way:
Same as above, but I let the debugger handle the initialization and have the processor my init code before tracing is enabled through atollic stuido
-> Same result
4. The 'Try to do it by the book' way:
Here I really failed. What I tried:
Configure ITM manually, configure the SWO and SWTF unit manually.
Here my problem is that I do not know where SWO and SWTF are found in memory. The reference manual tells me that I can look up these adresses through the System ROM tables at adress 0xE00E0000.
However acessing these yields a fault -- Have not implemented the different faults, so i can not tell which is the one thats biting my ***! So I thought: Maybe I need to access these in priviledged mode.. same error.
(Atollic truestudio version - if that matters):
Atollic TrueSTUDIO� for STM32, Built on Eclipse Neon.1a.
Version: 9.0.0
Build id: 20180117-1023
Has someone a working example for trace output on the traceswo line on the nucleo-h743zi using atollic truestudio?
Any help or suggestions are apprechiated!
Florian
Addendum:
I received a response from Atollic.
XXXXX XXXXXXX
(Atollic Support)
Mar 16, 09:17 CET
Dear Florian,
There is a known problem with the STM32H7 which we have a ticket for at the moment. We hope to have this fixed until the next release. However, we haven't had a response from the correct ST department just yet if there's a problem with the MCU itself or if we've made a faulty configuration in the software somewhere. We're going to try to reach out again for a response.Best regards
XXXXXX, Atollic Support Team#atollic-truestudio #itm-swo-trace #nucleo-h743zi