HDP Linux driver

Stable: 27.06.2022 - 08:00 / Revision: 02.06.2022 - 16:18

I am here to prevent the first-page-empty bug!

1 Article purpose

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-bit output can be observed. The article explains:

  • How to configure, use and debug the driver
  • The driver structure, and where the source code can be found.

2 Short description

  • 8 output signals
  • One of 16 internal signals with individual control
  • 8 software-programmable signals for pinout agnostic code debugging
  • Output disabling by security signal
Alternate text
HDP Block Diagram

3 Configuration

3.1 Kernel configuration

The HDP is enabled and ready to be used in all STM32MPU Embedded Software Distributions, via the Linux® kernel configuration CONFIG_STM32_HDP, set to disabled by default.

Symbol: STM32_HDP
Location:
  Device Drivers
  [*] SOC (System On Chip) specific Drivers
    [*] STMicroelectronics STM32MP157 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

Refer to the HDP device tree configuration article when configuring the HDP Linux kernel driver.

4 How to trace and debug

4.1 How to monitor

4.1.1 How to monitor with debugfs

sysfs entry can be used to browse HDP registers.

  /sys/kernel/debug/hdp# ls
  ctrl  gpoclr  gposet  gpoval  mux  val

See the HDP chapter in the reference manual [1] for further register details.

5 Source code location

The HDP Linux driver source code is composed of:

  • “<Linux kernel directory>/drivers/soc/st/stm32_hdp.c” to handle common resources: registers, clock.
Info white.png Information
Please note that the upstreaming of the HDP Linux driver source code is in progress

6 References


IMPORTANT NOTICE – READ CAREFULLY
STMicroelectronics NV and its subsidiaries ("ST") reserve the right to make changes, corrections, enhancements, modifications, and improvements to ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST products before placing orders. ST products are sold pursuant to ST’s terms and conditions of sale in place at the time of order acknowledgment.

Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the design of purchasers’ products.

No license, express or implied, to any intellectual property right is granted by ST herein.

Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product.

ST and the ST logo are trademarks of ST. For additional information about ST trademarks, refer to www.st.com/trademarks. All other product or service names are the property of their respective owners.

Information in this document supersedes and replaces information previously supplied in any prior versions of this document.