1. Article purpose[edit | edit source]
This article introduces the Hardware Debug Port which allows the observation of internal signals. By using multiplexers, up to 16 signals of each of 8 output can be observed. The article explains:
- How to configure, use and debug the driver
- Where the source code can be found.
2. Short description[edit | edit source]
- 8 ports that emit a signal simultaneously
- One of 16 signals selectable per port (including one software-programmable signal)
- Disabling outputs via safety signal
3. Configuration[edit | edit source]
3.1. Kernel configuration[edit | edit source]
The HDP is enabled and ready to be used in all STM32MPU Embedded Software Distributions, via the Linux® kernel configuration CONFIG_PINCTRL_STM32_HDP, set to disabled by default.
Symbol: PINCTRL_STM32_HDP Location: Device Drivers Pin controllers STMicroelectronics STM32 Hardware Debug Port (HDP) pin control
Please refer to the Menuconfig or how to configure kernel article for instructions on modifying the configuration, and recompiling the Linux kernel image in the Distribution Package context.
3.2. Device tree[edit | edit source]
Refer to the HDP device tree configuration article when configuring the HDP Linux kernel driver.
4. How to monitor signals[edit | edit source]
The HDP signals can be observed with an oscilloscope or any other tools that allow for the observation of signal variations. It is also possible to use the gpioget and gpiomon tools.
Refer to the device tree section to select your signals.
See the HDP chapter in the reference manual [1] for further register details.
5. Source code location[edit | edit source]
The HDP Linux driver source code is composed of:
- drivers/pinctrl/stm32/pinctrl-stm32-hdp.c : handle common resources: registers, clock.
5.1. Debug the driver[edit | edit source]
Refer to the How_to_use_the_kernel_dynamic_debug article when debuging the HDP Linux kernel driver.
6. References[edit | edit source]