🛠 HPM5100: Advanced Power-up and Secure Boot

HPMicro HPM5100: 400 MHz RISC-V MCU for Motor Control and Analog Sensing · avance · Guide avancé pour initialiser le HPM5100, configurer le démarrage sécurisé et valider les interfaces critiques.

Objectifs

This tutorial covers advanced initialization of the HPM5100 microcontroller via its SDK. We will configure Secure Boot, enable high-frequency clocks, and verify critical peripherals (ADC, PWM). Unlike beginner guides, we address thermal constraints for 480 MHz mode.

Matériel nécessaire

Étapes

Ensure RISC-V compilation tools are installed. Clone SDK v1.13.0 and set environment variables. ``bash source hpm_sdk_env.sh ``

  1. Environment Setup

The HPM5100 supports hardware secure boot. Enable it in the bootloader config to ensure only signed firmware runs. ``c // Configuration example in main.c hpm_sysctl_t *sysctl = hpm_sysctl; hpm_sysctl_secure_boot_enable(sysctl, true); ``

  1. Secure Boot Configuration

The RISC-V core can reach 480 MHz. Warning: This requires strict thermal management. Configure the main PLL. ``c // PLL configuration for 480 MHz hpm_sysctl_clock_config_t clock_config = { .cpu_clock = hpm_sysctl_clock_cpu_480mhz, .bus_clock = hpm_sysctl_clock_bus_120mhz, }; hpm_sysctl_clock_setup(sysctl, &clock_config); ``

  1. 480 MHz Clock Initialization

Initialize the 16-bit SAR ADC and check UART communication to confirm bus functionality. ``c // UART initialization for logs hpm_uart_init(hpm_uart0, 115200); printf("HPM5100 Secure Boot Active. CPU: %d MHz\n", 480); ``

  1. Critical Peripheral Verification

Compile for HPM5151 target and flash via USB OTG interface. ``bash make -j4 hpm_flash_programmer -p /dev/ttyUSB0 -f build/output.elf ``

  1. Compilation and Flashing

Vérification

Pour aller plus loin

Explore the XPI interface for external memory connection. Study AES-128 encryption for data protection. Compare CoreMark performance at 400 MHz vs 480 MHz to optimize power/performance trade-offs.

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials