63. Hardware debug port (HDP)

The Hardware Debug Port allows the observation of internal signals. By using multiplexers, up to 16 signals for each of 8-bit output can be observed.

63.1 Features

63.2 Block diagram

Figure 782. Hardware debug port block diagram

Block diagram of the Hardware Debug Port (HDP) showing internal multiplexers, control signals, and output logic.

The diagram illustrates the Hardware Debug Port (HDP) block structure. It features a central multiplexer with 16 inputs (0-15) selecting from 'SoC internal signals'. The output of the multiplexer is an 8-bit bus. This bus is connected to an 8-bit output register labeled 'HDP[7:0]'. The multiplexer is controlled by several signals: 'hdp_val[7:0]' (input to the multiplexer), 'hdp_gposet[7:0]', 'hdp_gpoclr[7:0]', and 'hdp_gpoval[7:0]' (which provides 'gpoval[7:0]' to the multiplexer), 'hdp_mux[2:0][3:0]', and 'hdp_ctrl.en'. A security signal '(From BSEC) SEC_HDPEN' is connected to an AND gate that controls the output enable of the 'HDP[7:0]' register. The diagram is labeled 'HDP' and includes the reference 'MSv45021V1' in the bottom right corner.

Block diagram of the Hardware Debug Port (HDP) showing internal multiplexers, control signals, and output logic.

63.3 Functional description

The main multiplexer, allowing the selection of the 8-signal debug set to be output, is controlled through the HDP_CTRL register.

The HDP value at the output of the main multiplexer can be read by software through the HDP_VAL register.

During debug it is often useful to output some signals that are controlled by software; these can be used to observe a precise code sequence or to indicate the current executed task. Debug set #15 is reserved for this purpose; it provides on HDP outputs the value of the HDP_GPOVAL register. This register is associated with set and clear registers (HDP_GPOSET and HDP_GPOCLR) allowing the signals to be toggled without a read-modify-write sequence.

Some debug sets expose internal data that require protection; the SEC_HDPEN signal, when low, forces all the HDP block outputs low.

Note: The internal signals may toggle at a higher rate than the pads can support, in which case their observability may be compromised. The user should be aware of this limitation when using the HDP port.

ST logo
ST logo

Table 550. HDP signal multiplexing

HDP_MUXHDP7HDP6HDP5HDP4HDP3HDP2HDP1HDP0
MUX7[3:0]MUX6[3:0]MUX5[3:0]MUX4[3:0]MUX3[3:0]MUX2[3:0]MUX1[3:0]MUX0[3:0]
0CA7 STANDBYWFI0CA7 STANDBYWFI1CA7 STANDBYWFIL2PWR
(=PWR_MPUCR.
PDDS and
not(PWR_MPUC
R.CSTBYDIS) )
PWR
SEL_VTH_VDD
CORE
PWR
pwrwake_mpu
PWR
pwrwake_mcu
PWR
pwrwake_sys
1CA7 STANDBYWFE0CA7 STANDBYWFE1PWR
VTH_VDDCORE
_ACK
CM4 SLEEPINGCM4 TXEVCM4 RXEVCM4 HALTEDCM4
SLEEPDEEP
2-CA7 EVENTOCA7 nRESET0CA7 nRESET1CA7 nPMUIRQ0CA7 nPMUIRQ1CA7
nAXIERRIRQ
PWR
STDBY_WKUP
3CA7 DBGACK0CA7 DBGACK1CA7 nIRQOUT0CA7 nIRQOUT1CA7 nFIQOUT0CA7 nFIQOUT1PWR OKIN_MRPWR ENCOMP_
VDDCORE
4BSEC out
fuse_ok
-BSEC in pwrokBSEC out
sec_dften
BSEC out
sec_dftlock
BSEC in
rstcore_n
BSEC out
sec_dbgen
BSEC out
sec_niden
5BSEC out
sec_spiden
BSEC out
sec_spniden
BSEC out
sec_deviceen
BSEC out
sec_dbgswenable
EXTI
c1_wakeup
EXTI c2_wakeupEXTI
sys_wakeup
-
6ETH out
mac_speed_o0
ETH out
mac_speed_o1
ETH out
lpi_intr_o
ETH out
pmt_intr_o
RCC pwrds_sysRCC pwrds_mcuRCC pwrds_mpuRCC
CM4_SLEEPDE
EP
7--------
8DDRCTRL
csysreq_ddrc
DDRCTRL
csysack_ddrc
DDRCTRL
cactive_ddrc
DDRCTRL
stat_ddrc_reg_
selfref_type[1]
DDRCTRL
stat_ddrc_reg_
selfref_type[0]
DDRCTRL
dfi_init_complete
DDRCTRL
dfi_ctrlupd_req
DDRCTRL
lp_req

Table 550. HDP signal multiplexing (continued)

HDP_MUXHDP7HDP6HDP5HDP4HDP3HDP2HDP1HDP0
MUX7[3:0]MUX6[3:0]MUX5[3:0]MUX4[3:0]MUX3[3:0]MUX2[3:0]MUX1[3:0]MUX0[3:0]
9DDRCTRL
hpr_credit_cnt
[4:0]==0
DDRCTRL
lpr_credit_cnt[4:0
]==0
DDRCTRL
wr_credit_cnt
[4:0]==0
DDRCTRL
cactive_0
DDRCTRL
cactive_1
DDRCTRL
perf_op_is_
refresh
DDRCTRL
cactive_ddrc_asr
PWR
DDR_RET_
ENABLE_N
10DTS valobus1_4DTS valobus1_3DTS valobus1_2DTS valobus1_1DTS valobus1_0DDRCTRL
gskp_dfi_lp_req
-DTS CLK_PTAT
11DTS valobus2_4DTS valobus2_3DTS valobus2_2DTS valobus2_1DTS valobus2_0---
12--------
13--------
14--------
15gpoval[7]gpoval[6]gpoval[5]gpoval[4]gpoval[3]gpoval[2]gpoval[1]gpoval[0]
ST logo
ST logo

63.4 HDP registers

63.4.1 HDP control register (HDP_CTRL)

Address offset: 0x000

Reset value: 0x0000 0000

HDP Control

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.EN
rw

Bits 31:1 Reserved, must be kept at reset value.

Bit 0 EN: Enable HDP

Valid if enabled in BSEC.

63.4.2 HDP multiplexers control register (HDP_MUX)

Address offset: 0x004

Reset value: 0x0000 0000

HDP multiplexing

31302928272625242322212019181716
MUX7[3:0]MUX6[3:0]MUX5[3:0]MUX4[3:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
MUX3[3:0]MUX2[3:0]MUX1[3:0]MUX0[3:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:28 MUX7[3:0]: Select the HDP7 output among the 16 available signals

Bits 27:24 MUX6[3:0]: Select the HDP6 output among the 16 available signals

Bits 23:20 MUX5[3:0]: Select the HDP5 output among the 16 available signals

Bits 19:16 MUX4[3:0]: Select the HDP4 output among the 16 available signals

Bits 15:12 MUX3[3:0]: Select the HDP3 output among the 16 available signals

Bits 11:8 MUX2[3:0]: Select the HDP2 output among the 16 available signals

Bits 7:4 MUX1[3:0]: Select the HDP1 output among the 16 available signals

Bits 3:0 MUX0[3:0]: Select the HDP0 output among the 16 available signals

63.4.3 HDP read back value register (HDP_VAL)

Address offset: 0x010

Reset value: 0x0000 0000

HDP value

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.HDPVAL[7:0]
rrrrrrrr

Bits 31:8 Reserved, must be kept at reset value.

Bits 7:0 HDPVAL[7:0]: HDP read back value
Provides the value of the HDP signals.

ST logo
ST logo

63.4.4 HDP general purpose output set register (HDP_GPOSET)

Address offset: 0x014

Reset value: 0xXXXX XXXX

HDP GPO set

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.HDPGPOSET[7:0]
wwwwwwww

Bits 31:8 Reserved, must be kept at reset value.

Bits 7:0 HDPGPOSET[7:0]: HDP general purpose output set

When a bit is written to 1, the corresponding HDP GPO is set. Writing a bit to 0 has no effect.

63.4.5 HDP general purpose output clear register (HDP_GPOCLR)

Address offset: 0x018

Reset value: 0xXXXX XXXX

HDP GPO clear

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.HDPGPOCLR[7:0]
wwwwwwww

Bits 31:8 Reserved, must be kept at reset value.

Bits 7:0 HDPGPOCLR[7:0]: HDP general purpose output clear

When a bit is written to 1, the corresponding HDP GPO is cleared. Writing a bit to 0 has no effect.

63.4.6 HDP general purpose output value register (HDP_GPOVAL)

Address offset: 0x01C
Reset value: 0x0000 0000
HDP GPO value

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.HDPGPOVAL[7:0]
rwrwrwrwrwrwrwrw

Bits 31:8 Reserved, must be kept at reset value.
Bits 7:0 HDPGPOVAL[7:0]: HDP general purpose output value
When written, defines the value of the HDP GPO. When read, provides the current GPO value.

63.4.7 HDP version register (HDP_VERR)

Address offset: 0x3F4
Reset value: 0x0000 0010

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.MAJREV[3:0]MINREV[3:0]
rrrrrrrr

Bits 31:8 Reserved, must be kept at reset value.
Bits 7:4 MAJREV[3:0]: Major revision of the IP
Bits 3:0 MINREV[3:0]: Minor revision of the IP

ST logo
ST logo

63.4.8 HDP IP identification register (HDP_IPIDR)

Address offset: 0x3F8

Reset value: 0x0003 0002

31302928272625242322212019181716
ID[31:16]
rrrrrrrrrrrrrrrr
1514131211109876543210
ID[15:0]
rrrrrrrrrrrrrrrr

Bits 31:0 ID[31:0]: IP Identifier

63.4.9 HDP size identification register (HDP_SIDR)

Address offset: 0x3FC

Reset value: 0xA3C5 DD01

31302928272625242322212019181716
SID[31:16]
rrrrrrrrrrrrrrrr
1514131211109876543210
SID[15:0]
rrrrrrrrrrrrrrrr

Bits 31:0 SID[31:0]: Size identifier

63.4.10 HDP register map

Table 551. HDP register map and reset values

OffsetRegister Name313029282726252423222120191817161514131211109876543210
0x000HDP_CTRLResResResResResResResResResResResResResResResResResResResResResResResResResResResResResResResEN
Reset value0
0x004HDP_MUXMUX7[3:0]MUX6[3:0]MUX5[3:0]MUX4[3:0]MUX3[3:0]MUX2[3:0]MUX1[3:0]MUX0[3:0]
Reset value00000000000000000000000000000000
0x008 - 0x00CReserved
0x010HDP_VALResResResResResResResResResResResResResResResResResResResResResResResResHDPVAL[7:0]
Reset value00000000
0x014HDP_GPOSETResResResResResResResResResResResResResResResResResResResResResResResHDPGPOSET[7:0]
Reset valueXXXXXXXXX
0x018HDP_GPOCLRResResResResResResResResResResResResResResResResResResResResResResResHDPGPOCLR[7:0]
Reset valueXXXXXXXXX

Table 551. HDP register map and reset values (continued)

OffsetRegister Name313029282726252423222120191817161514131211109876543210
0x01CHDP_GPOVALRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.HDPGPOVAL[7:0]
Reset value00000000
0x020 - 0x3F0Reserved
0x3F4HDP_VERRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.MAJREV [3:0]MINREV [3:0]
Reset value00010000
0x3F8HDP_IPIDRID[31:0]
Reset value00000000000000110000000000000010
0x3FCHDP_SIDRSID[31:0]
Reset value10100011110001011101110100000001

Refer to Section 2.5 on page 153 for the register boundary addresses.