ESK32 (HT32F49163)
The ESK32 is a development board based on the Holtek HT32F49163 MCU. The current NuttX port targets the HT32F49163 device used on the HT32F49163 development kit and focuses on a working serial-console NSH configuration with basic board bring-up.
For additional hardware details, refer to Holtek’s HT32F491x3 Starter Kit User Guide.
HT32F491x3 Starter Kit board photo
Features
The current port provides:
Holtek HT32F49163 MCU from the HT32F491x3 family
ARM Cortex-M4 core with FPU support
Boot and clock initialization for the ESK32 8 MHz external crystal
System clock configured to 150 MHz
USART1 serial console at 115200 8N1
/binmounted throughbinfs/procmounted throughprocfsUser LED registration through
/dev/userledsBasic internal GPIO helpers used by the console and LED support
The default esk32:nsh configuration also enables these built-in
applications:
helloostestdumpstackleds
Pin Mapping
The current port uses the following MCU pins:
Pin |
Signal |
Notes |
|---|---|---|
PA9 |
USART1_TX |
Default serial console TX |
PA10 |
USART1_RX |
Default serial console RX |
PD13 |
LED2 |
User LED, active-low |
PD14 |
LED3 |
User LED, active-low |
PD15 |
LED4 |
User LED, active-low |
Flashing
The board directory includes a helper script for flashing through Holtek’s Windows OpenOCD package from a WSL-based development environment:
$ ./boards/arm/ht32f491x3/esk32/tools/flash.sh
The script expects:
nuttx.binalready generated in thenuttxdirectoryHoltek xPack OpenOCD installed under
C:\Program Files (x86)\Holtek HT32 Series\HT32-IDE\xPack\xpack-openocd-0.11.0-4an HT32-Link compatible debug connection
Holtek xPack OpenOCD can be installed together with the HT32 IDE, available from Holtek’s website: Holtek Downloads
Useful options:
$ ./boards/arm/ht32f491x3/esk32/tools/flash.sh --dry-run
$ ./boards/arm/ht32f491x3/esk32/tools/flash.sh --device HT32F49163_100LQFP
$ ./boards/arm/ht32f491x3/esk32/tools/flash.sh --openocd-root /mnt/c/path/to/openocd
Testing Notes
The following commands are useful for validating the current port:
nsh> hello
nsh> ostest
nsh> dumpstack
nsh> leds
When leds is executed, the example opens /dev/userleds and cycles
through the LED bitmasks supported by the board.
Current Limitations
The current port is still intentionally small. In particular:
only the
nshboard configuration is maintainedonly USART1 routing is described by the board port
LEDs are supported, but board buttons are not yet implemented
internal GPIO helpers exist, but there is not yet a board-level
/dev/gpiotest interface in this port
Configurations
nsh
This is the currently maintained configuration for the board. It provides a
serial console with the NuttShell and mounts /bin and /proc during
board bring-up.
Configure and build it from the nuttx directory:
$ ./tools/configure.sh -l esk32:nsh
$ make -j
After boot, a typical prompt looks like:
NuttShell (NSH) NuttX-12.x.x
nsh> ls /
/:
bin/
dev/
proc/
And the built-in applications can be listed with:
nsh> ls /bin
dd
dumpstack
hello
leds
nsh
ostest
sh