HAL DBGMCU Overview

Introducing DBGMCU

group DBGMCU_Introduction

The DBGMCU hardware abstraction layer provides a set of APIs to configure and control the DBGMCU (Debug MCU) peripheral on STM32 microcontrollers.

This driver facilitates access to debugging features by enabling easy management of peripheral and clock behavior during debug sessions.

The DBGMCU includes the following features:

  • Retrieve the revision identification and the device identification.

    • Maintain the clock and power for the system debug component during low power modes (such as Sleep, Stop and Standby modes).

  • Freeze and unfreeze the clock for specific peripherals when the CPU is halted in debug mode.

Module and files

The following diagram illustrates the DBGMCU module and its associated files.

Module and files diagram

Component diagram

The following diagram illustrates the software components involved in the DBGMCU module. It shows the interactions between the user application, HAL drivers, low-level drivers, and the hardware components.


@startuml
<style>
componentDiagram {
   arrow {
      FontSize 8
   }
}
</style>

title DBGMCU Software Component Diagram

package "HAL" {

    [HAL_DBGMCU]
}

package "Low Layer" {
    [LL_DBGMCU]
    [CMSIS]
}

package "HW" {
    [STM32_HW]
}

[Appli] ..> [HAL_DBGMCU] : HAL DBGMCU API
[HAL_DBGMCU] ..> [LL_DBGMCU] : LL DBGMCU API
[LL_DBGMCU] ..> [CMSIS] : DBGMCU register def
[LL_DBGMCU] ..> [STM32_HW]: DBGMCU registers R/W
@enduml

Configuration table

The following table lists the configuration defines for the HAL DBGMCU module, specifying their locations, default values, and descriptions:

group DBGMCU_Configuration_Table

Configuration inside the DBGMCU driver

Config defines

Description

Default value

Note

USE_HAL_DBGMCU_MODULE

from hal_conf.h

1U

When set, HAL DBGMCU module is enabled.

USE_ASSERT_DBG_PARAM

from IDE

None

When defined, enable the params assert.