2023-10-23 02:35 AM
Hello,I encountered a strange problem while using STM32H563.
I tried using TPIU to output trace information.When I access the TPIU register(address:0xE0040000) in debugging mode, it will cause debugging to disconnect.Connection cannot be restored through NRST reset,but power on reset can connect to the debugger and the application runs normally.Could you assist me in using TPIU normally on STM32H563?
Best Regards.
Solved! Go to Solution.
2023-10-26 08:47 PM
You should read RM0481 carefully.There is an enable bit DBGMCU_ CR.TRACE_ EN for trace port(TRACECK) in the register description of DBGMCU.Of course, bit DEMCR.TRCENA also needs to be set to 1.Then you can access the TPIU register normally.
2023-10-23 07:16 AM
Hello @兔兔 ,
I think you should check the arm documentation :
Enabling ITM trace on Serial Wire Viewer :
https://developer.arm.com/documentation/ka001424/1-0/?lang=en
Armv8-M processor system lockup due to TPIU (Trace Port Interface Unit) clock gating :
https://developer.arm.com/documentation/ka005320/1-0/?lang=en
Arm® Cortex®-M33 Processor Technical Reference Manual :
https://developer.arm.com/documentation/100230/0100/?lang=en
Foued
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.
2023-10-23 11:31 PM - edited 2023-10-23 11:46 PM
Hello @Foued_KH
Thank you very much for your answer.
I have quickly browsed through the documents you mentioned.I still don't know how ST to clock gate TRACECLKIN,and how to correctly access TPIU registers(Perhaps I need to first convert DEMCR.TRCENA to zero before accessing the TPIU register).Could you provide more specific documents? Looking forward to your reply.
Best regards.
2023-10-26 08:47 PM
You should read RM0481 carefully.There is an enable bit DBGMCU_ CR.TRACE_ EN for trace port(TRACECK) in the register description of DBGMCU.Of course, bit DEMCR.TRCENA also needs to be set to 1.Then you can access the TPIU register normally.