Skip to main content
Dan4
Associate II
September 17, 2018
Solved

STM32H743XI silicon Y - DBGMCU dead ?

  • September 17, 2018
  • 22 replies
  • 5386 views

Curious if anyone else encountered this: I work on a design using STM32H743XI silicon Y and DBGMCU seems to be completely dead. Reading any register returns 0 (so no REV_ID/DEV_ID). Writing to get 'timer freeze on debug' does not work either and reading back the written registers returns 0's.

The Errata does not mention anything like that.

I am aware that the Debugger is supposed to see DBGMCU at 0xE00E1000 and the CPU at 0x5C001000, but neither works.

Am I missing something ? - there is no RCC clock enabling for this class of MCUs... ; the ref manual lists DBGMCU->CR bits D1DBGCKEN and D3DBGCKEN, which are not dealt with in the standard HAL, but again trying to set them and re-read, I get back 0's...

Thanks.

This topic has been closed for replies.
Best answer by Simon V.

Hello,

When the debugger is not connected and the clock gating feature is enable, the JTAG clock is automatically stop.

You must configure RCC_CKGAENR register to JTAGCKG clock gating disabled : the clock is always enabled then you can dump correctly REV_ID/DEV_ID @ 0x5C00100 address.

Regards,

Simon

22 replies

ms1802
Associate
January 4, 2020

I'm using Crossworks and a Nucleo-H743ZI2. With a Rev V Part.

I'm sending out the rev id  HAL_GetREVID() via a webserver so I can see the version ID 'real time'

I've just played around with this again and it is related to the NRST as clive suggests.

It seems no matter how many NRST's you issue, the DBGMCU is going to read 0's once its had a debugger attached. (so starting up with a debugger its never going to read anything but 0's - ie normal development!)

It works after a hard power cycle without a debugger attached - my webserver reports the right REVID.

As soon as you attach a debugger (even when running), the DBGMCU all comes back as zeros, therefore REVID changes to 0 too.

This causes real problems when running the device in debug mode as the REVId is invalid in the HAL startup code where its used,

Also, as in my original post, trying to stop the clocks when debugging ( eg the IWDG when in a debug break!) is not going to work as the flags for all this are in the DBGMCU and not writable. Oh the irony!

Mark

jeremi
Associate
January 6, 2020

The problem seems to be connected to STLINK and Rev V. You could try to update the STLINK per STSW-LINK007, file a bug report with Crossworks, use a different debug adapter or consider another IDE. IAR, Keil and Segger Ozone all work for me now.

Gpeti
Senior
July 6, 2020

What is the status of this issue ? I'm trying to write DBGMCU_APB1LFZ1 in order to make my timer freeze during stepping, and I've found out that I can't. I thought there was an enable bit somewhere in RCC for the DBGMCU peripheral but I didn't find one.

Is it possible to use the timer freeze functionality on STM32H743 (Nucleo, rev Y, Keil) ?

EDIT: I tried to access this register through both adresses

jeremi
Associate
July 7, 2020

As I mentioned above, this issue has been fixed in Keil 5.29. LL_DBGMCU_APB1_GRP1_FreezePeriph works for me.

Gpeti
Senior
July 7, 2020

Sorry, I missed your post on the topic. I'm gonna try the latest MDK version.

Simon V.
Simon V.Best answer
ST Employee
July 5, 2023

Hello,

When the debugger is not connected and the clock gating feature is enable, the JTAG clock is automatically stop.

You must configure RCC_CKGAENR register to JTAGCKG clock gating disabled : the clock is always enabled then you can dump correctly REV_ID/DEV_ID @ 0x5C00100 address.

Regards,

Simon

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.