🛠 HPM5100: First Connection and Startup
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
- HPM5100 development board (QFN or LQFP package).
- USB-C or micro-USB cable (depending on board connector).
- PC running Linux, Windows, or macOS.
- External 3.3V/5V power supply (optional, required for 480 MHz mode).
- Software: HPMicro SDK v1.13.0+, RISC-V compiler, IDE or text editor.
Steps
- Environment Setup: Download the HPMicro SDK from the official repository. Ensure the
HPM_SDK_BASEenvironment variable is correctly defined pointing to the SDK root folder.
- 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.
- Compile Test Project: Open a terminal in the
examples/hello_worldfolder. 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.
- 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.
- Launch: Unplug and replug the board. The microcontroller automatically starts from Flash. Open a serial monitor (e.g.,
minicomorPuTTY) 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.