🛠 HPM5100: First Connection and Startup

HPMicro HPM5100: 400 MHz RISC-V MCU with Integrated Analog Peripherals · intermediaire · Guide étape par étape pour alimenter, connecter et initialiser la carte HPM5100 via le SDK.

Objectives

This tutorial aims to establish the first communication with the HPM5100 microcontroller, verify power supply, and launch a simple test program. You will learn to handle power supply specifics to reach high frequencies (480 MHz) and configure the development environment.

Required Hardware

Steps

  1. Environment Setup: Download the HPMicro SDK from the official repository. Ensure the HPM_SDK_BASE environment variable is correctly defined pointing to the SDK root folder.
  1. Physical Wiring: Connect the board to the PC via the USB OTG port. The integrated USB PHY enables serial communication and debugging. If you wish to test high-performance mode (480 MHz), connect a stable external power supply to the dedicated VDD_CORE/VDD_IO pins, strictly respecting recommended voltages. For beginners, 400 MHz via USB is sufficient.
  1. Compile Test Project: Open a terminal in the examples/hello_world folder. Start compilation with the following command:
cmake -B build -DBOARD=hpm5100-evk
cmake --build build

This command generates binary files compatible with the single RISC-V core.

  1. Programming (Flash): Use the programming tool provided in the SDK to write the firmware into the 1 MB SiP Flash memory. The typical command is:
python3 tools/hpm_uf2.py -p /dev/ttyACM0 -b build/hpm5100/hello_world.bin

Replace /dev/ttyACM0 with the serial port detected on your system.

  1. Launch: Unplug and replug the board. The microcontroller automatically starts from Flash. Open a serial monitor (e.g., minicom or PuTTY) at 115200 baud to observe the output.

Verification

You should see the "Hello World" message or an incrementing counter displayed in the serial terminal. Check if the status LED blinks if the example includes it. If the board does not respond, check USB drivers and power supply.

Further Reading

Explore the integrated analog peripherals (16-bit ADC, PGA) for motor control applications. Enable the CAN FD module to test industrial communication at 8 Mbps.

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials