2025-07-25 2:12 AM
Hi,
I have configured my STM32H563AI CubeMX-project to use "JTAG with Trace Synchro(4bits)" and assigned the corresponding pins. Also, I explicitly activated the corresponding registers in DBGMCU and DCB by adding:
SET_BIT(DBGMCU->CR, DBGMCU_CR_TRACE_IOEN);
SET_BIT(DBGMCU->CR, DBGMCU_CR_TRACE_CLKEN);
SET_BIT(DCB->DEMCR, DCB_DEMCR_TRCENA_Msk);
to MX_GPIO_Init.
However, when I try to trace using Ozone V3.38g I always get a "No trace clock present, trace may not work correctly."-warning and nothing is read out from the instruction cache.
My trace settings in Ozone are:
Trace Source: Trace Pins
CPU Frequency: 250 MHz
Trace Port width: 4 bit
Maximum Instruction Count: 100M
I used an oscilloscope to look at the TRACECK-signal but found nothing there, it only ever has 0V.
Also, I verified my tracing setup, using a SEGGER Cortex M-Trace Reference Board and with this it was just working fine.
Also, I verified, that the corresponding registers get set in MX_GPIO_Init using ozone and just debugging via JTAG.
Any ideas how to solve this?
-Best regards
Solved! Go to Solution.
2025-07-28 6:26 AM - edited 2025-07-28 6:27 AM
I now have solved this issue:
The MCU-registers that I tried to set in the application code have to be written by the probe over the debug-interface. This has to be done in a JLinkScript-file by using the hook OnTraceStart().
I have attached a corresponding script for the STM32H563.
2025-07-25 4:56 PM - edited 2025-07-25 5:02 PM
Have you asked on the Segger forum? IIRC they do not have trace eval boards based on Cortex-M33.
2025-07-28 12:22 AM
Although the reference board is M4 (STM32F407), Segger states that Cortex-M33, and in fact the particular device I am using is supported and tested: Tested Devices - J-Trace PRO
A sample project for the corresponding NUCLEO board is provided: NUCLEO-H563ZI - SEGGER Knowledge Base
This is what I am looking into at the moment for further clues.
2025-07-28 6:26 AM - edited 2025-07-28 6:27 AM