本文へ移動
cccskills
無料GitHub で公開

stm32h750-weact

Firmware development for the WeAct Studio MiniSTM32H7xx core board (STM32H750VBT6) — its 0.96" ST7735 TFT, DVP camera, QSPI/SPI flash, MicroSD, USB, and the STM32Cube HAL + PlatformIO setup around them. Use when working on this board or any STM32H750/H743 WeAct core board: project setup, platformio.ini, clock/PLL configuration, pin mapping, peripheral bring-up, LCD performance, D-cache/DMA problems, DFU flashing, or debugging why something on the board does not work.

インストール方法を見る

含まれるファイル(44)

  • SKILL.md7.4 KB
  • assets/IMAGE.md447 B
  • reference/board-hardware.md68.2 KB
  • reference/recipes.md33.3 KB
  • template/.gitignore94 B
  • template/include/board.h1.3 KB
  • template/include/lcd.h2.3 KB
  • template/include/README1.2 KB
  • template/include/temp_sensor.h456 B
  • template/include/usb_device.h165 B
  • template/include/usbd_cdc_if.h201 B
  • template/include/usbd_conf.h1.6 KB
  • template/include/usbd_desc.h131 B
  • template/lib/README1.0 KB
  • template/lib/ST7735/font.h34.4 KB
  • template/lib/ST7735/library.json265 B
  • template/lib/ST7735/st7735_reg.c2.5 KB
  • template/lib/ST7735/st7735_reg.h7.9 KB
  • template/lib/ST7735/st7735.c29.8 KB
  • template/lib/ST7735/st7735.h7.7 KB
  • template/lib/USBDeviceCDC/library.json240 B
  • template/lib/USBDeviceCDC/usbd_cdc.c28.3 KB
  • template/lib/USBDeviceCDC/usbd_cdc.h5.3 KB
  • template/lib/USBDeviceCDC/usbd_core.c30.1 KB
  • template/lib/USBDeviceCDC/usbd_core.h5.7 KB
  • template/lib/USBDeviceCDC/usbd_ctlreq.c25.4 KB
  • template/lib/USBDeviceCDC/usbd_ctlreq.h2.1 KB
  • template/lib/USBDeviceCDC/usbd_def.h16.4 KB
  • template/lib/USBDeviceCDC/usbd_ioreq.c4.9 KB
  • template/lib/USBDeviceCDC/usbd_ioreq.h2.4 KB
  • template/platformio.ini1.5 KB
  • template/README.md3.9 KB
  • template/src/lcd.c9.9 KB
  • template/src/main.c14.2 KB
  • template/src/stm32h7xx_hal_msp.c3.2 KB
  • template/src/stm32h7xx_it.c663 B
  • template/src/temp_sensor.c3.7 KB
  • template/src/usb_device.c602 B
  • template/src/usbd_cdc_if.c2.6 KB
  • template/src/usbd_conf.c7.4 KB
  • template/src/usbd_desc.c4.6 KB
  • template/variants/minimal/main.c4.2 KB
  • template/variants/minimal/stm32h7xx_it.c544 B
  • template/variants/new-project.sh1.7 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

WeAct STM32H750VBT6 core board

Board-specific firmware knowledge. The two reference files hold the detail — read the one you need rather than guessing, because most of the failure modes below are silent (the board runs, just wrongly).

  • reference/board-hardware.md — complete hardware reference: schematic-level pin map, every connector, power tree, memory map, SDK/examples inventory, plus a full development guide (Part II: §12 PlatformIO, §13 clocks, §14 peripheral cookbook, §15 M7 gotchas, §16 flashing, §17 pitfall table).
  • reference/recipes.md — copy-paste-ready code: platformio.ini, clock config, LCD driver with the fast blit path, backlight PWM, ADC temperature sensor, USB CDC, DWT frame pacing.
  • template/ — a complete working project that builds and flashes, plus a scaffolding script. It is where every recipe was extracted from; see template/README.md.

Orientation

MCUSTM32H750VBT6, Cortex-M7, 128 KB flash, 1 MB RAM, LQFP100
ClocksHSE 25 MHz (X1), LSE 32.768 kHz. Working tree: PLL1 M5/N96/P2 → SYSCLK 240, HCLK 120
DisplayST7735S 160×80 on SPI4 (PE12 SCK, PE14 MOSI, PE11 CS, PE13 D/C, PE10 backlight)
LED / buttonPE3 active-high / PC13 pressed = high
Storage8 MB QSPI flash @ 0x90000000 (XIP), 8 MB SPI flash on SPI1, MicroSD on SDMMC1
USBOTG_FS on PA11/PA12, crystal-less off HSI48; ROM DFU bootloader on the same Type-C
DebugSWD on header P3 (PA13/PA14)

Rules that prevent the expensive mistakes

Check these before writing code — each one produces a failure that looks like something else.

  1. -DHSE_VALUE=25000000 in build_flags. The stock framework-stm32cubeh7 CMSIS template already defaults HSE_VALUE to 25 MHz — matching this board's crystal by coincidence, the same way the F4 template does for the Black Pill — so this currently works without the flag. It stops working the moment a CubeMX-generated stm32h7xx_hal_conf.h from a different H7 board (most Nucleo/Eval H7 boards run their HSE from an 8 MHz ST-Link MCO) gets dropped in: the PLL still locks, but every derived timing is wrong by ~3×. Set it explicitly so the project doesn't depend on which hal_conf.h happens to be in play.
  2. PWR_LDO_SUPPLY — this board has no SMPS. Configuring one leaves the core under-supplied and unresponsive to SWD until a BOOT0 power cycle. The setting latches on first write after reset.
  3. Fix the board definition's swapped sizes in platformio.ini: board_upload.maximum_size = 131072 (flash), board_upload.maximum_ram_size = 524288 (RAM). Otherwise nothing warns you when an image exceeds the real 128 KB.
  4. board_build.stm32cube.disable_embedded_libs = yes if you vendor an ST7735 driver into lib/ — Cube's embedded BSP ships its own and they collide at link time.
  5. FLASH_LATENCY_1 at HCLK 120 MHz. Too few wait states → hard fault on the first flash read.
  6. Cache enable before HAL_Init(), clock config before any peripheral init.
  7. D-cache vs DMA: buffers __attribute__((aligned(32))), size a multiple of 32, clean before TX / invalidate after RX. And DMA1/DMA2 cannot reach DTCM or ITCM — a buffer there silently never updates. Default linker puts everything in RAM_D1 (AXI SRAM), which is fine.
  8. Backlight is TIM1_CH2N, a complementary output: HAL_TIMEx_PWMN_Start(), not HAL_TIM_PWM_Start(), and HAL_TIMEx_ConfigBreakDeadTime() + HAL_TIM_MspPostInit() are mandatory or the pin never drives.
  9. USB needs HAL_PWREx_EnableUSBVoltageDetector() plus HSI48State = RCC_HSI48_ON. Missing it means the host sees nothing at all. 9a. The AF macro is GPIO_AF10_OTG2_FS, not GPIO_AF10_OTG1_FS. This part has two USB_OTG controllers, so stm32h7xx_hal_gpio_ex.h defines USB2_OTG_FS and compiles out the OTG1_FS macro name entirely — code copied from an H7A3/H72x example (which has only one controller) fails to build with an undefined-identifier error that doesn't say why.
  10. LCD and camera reset lines are tied to the board reset net — no GPIO control, ever. A wedged panel needs a full MCU reset.

When the task is LCD performance

The stock ST7735 driver is ~200× slower than the bus allows: ST7735_FillRGBRect() calls SetCursor() per pixel row, and SetCursor() sends each address byte as its own CS-framed SPI transaction. A 13-character line costs ~1660 SPI transactions.

Fix by composing a full-width band in RAM (pixels pre-byte-swapped — the panel is big-endian RGB565) and pushing it with one SetCursor + one burst: 8 transactions, ~1.4 ms for 160×16 at 30 MHz. That is what makes a 120 Hz UI loop fit. reference/recipes.md has the working implementation.

Bus speed is secondary but real: SPI_BAUDRATEPRESCALER_4 = 30 MHz works on this board although the ST7735S spec implies 15 MHz; halve it the moment pixels come out garbled.

Panel refresh itself is programmable via FRMCTR1 (f = f_osc / ((RTNA*2+40) * (LINE+FPA+BPA)), f_osc ≈ 850 kHz, LINE = 160): stock ≈ 80 Hz, (0, 2, 2) ≈ 130 Hz. Worth setting an expectation though — pixel response on this panel is ~100 ms, so an fps readout is more convincing than the animation.

Starting a new project

Do not hand-assemble one. template/ is a verified-working project — scaffold from it:

~/.claude/skills/stm32h750-weact/template/variants/new-project.sh <target-dir> [--full|--minimal]
cd <target-dir> && pio run
  • --full (default) — ST7735 UI, USB CDC console, ADC temperature sensor. 40.9 KB of 128 KB flash.
  • --minimal — LED + K1 only, same clock tree and startup order. 5.7 KB. Use it to prove the toolchain and the flashing route before adding anything.

Both variants build as-is (verified). Nothing is generated and no paths are embedded, so copying the tree by hand works equally well. template/README.md lists which files belong to which subsystem, so a --full scaffold can be stripped back cleanly.

When the user already has a project, prefer bringing it in line with the template's platformio.ini and board.h over rewriting their code.

Flashing

DFU over the Type-C cable, no probe: hold BOOT0, tap NRST, release after ~0.5 s → the board enumerates as 0483:DF11 → pio run -t upload. The board never resets itself into DFU; the sequence is manual every time. SWD via header P3 when you need breakpoints.

When 128 KB of flash runs out, the board's answer is QSPI XIP at 0x90000000 with a small loader in internal flash — a decision to make early, since the linker script and flashing procedure both change. See reference/board-hardware.md §6, §7.3, §15.3.

Reporting

State honestly what was verified on hardware versus derived from the datasheet. Several settings here (30 MHz SPI, raised FRMCTR1) are deliberately outside published specs and work on this specific board — say so rather than presenting them as safe defaults.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Firmware development for the Arduino Nano (A000005, ATmega328P @ 16 MHz, 5 V) — its 30 KB usable flash, 2 KB SRAM, 1 KB EEPROM, 8-channel 10-bit ADC, six 8-bit PWM pins across three timers, UART shared with the USB-serial chip, I2C on A4/A5, SPI on D10–D13, sleep modes, and the Arduino AVR core + PlatformIO setup around them. Use when working on this board or any ATmega328P Nano clone (FTDI or CH340 USB): project setup, platformio.ini, old-vs-new bootloader uploads, pin mapping, A6/A7 restrictions, timer/Servo/tone conflicts, the 2 KB SRAM budget, analog references, powering from VIN, ICSP recovery, or debugging why something on the board does not work.

日本語の概要は準備中です。原文の説明を表示しています。

alexex1993/mcu-skills182026年9月25日 更新

Firmware development for the Beetle — the CJMCU / DFRobot "Mini Arduino Leonardo" USB board (ATmega32U4 @ 16 MHz, 5 V, 21×28 mm, castellated pads) — its native USB (CDC serial + HID keyboard/mouse/joystick), Caterina bootloader and 1200 bps touch upload, ten exposed I/O pads, four PWM pins across Timer0/Timer1, five ADC channels, I2C on D2/D3, SPI on the back-side ICSP pads, 28 KB usable flash and 2.5 KB SRAM, and the PlatformIO + Arduino AVR core (`board = leonardo`) setup around them. Use when working on this board or any ATmega32U4 Leonardo/Micro/Pro-Micro-class clone: project setup, platformio.ini, why the board shows up as two different serial ports, uploads that fail or hang, recovering a bricked or HID-spamming board by shorting the ICSP reset pads, pin mapping and which pads are missing, PWM/timer conflicts, Servo and tone, USB HID keyboard projects, the SRAM budget, powering from the + pad, or debugging why something on the board does not work.

日本語の概要は準備中です。原文の説明を表示しています。

alexex1993/mcu-skills182026年9月25日 更新

Разработка прошивок для BE-U1000 (Baikal Electronics / Байкал Электроникс, три ядра RISC-V: BR-350 и BM-310) на отладочных платах EVU-BA-2.1, EVU-BA-2.0 и EVU-BA-1.2 — её eFlash и QSPI flash, UART0/BootROM CLI, PWMA (захват и импульсы), АЦП с DMA, CAN FD, SPI, WDT, CLIC, а также SDK Байкала и его система сборки на make. Use when working on this board or any BE-U1000 / BMCU_U project (SDK 2.1/2.3, riscv32-none-elf, dfu-util, OpenOCD): настройка проекта, Makefile и MEM_REG_ROM, карта выводов и разъёмы XP1/XP8/XP9/XP10, режимы начальной загрузки и страповые выводы, прошивка по UART XMODEM либо USB DFU, работа с eFlash и TCM, прерывания и CLIC, отладка по JTAG — и разбор, почему плата молчит, не стартует, зависает или почему периферия «настроилась», а обмена нет.

日本語の概要は準備中です。原文の説明を表示しています。

alexex1993/mcu-skills182026年9月25日 更新

Firmware development for the 30-pin ESP32-WROOM-32 development board — the DOIT ESP32 DevKit V1 / ESP32 CH340 Type-C / NodeMCU-ESP32 30-pin form factor, 15 pins per side, CH340G or CP2102 USB-UART bridge, AMS1117 LDO, user LED on GPIO2. Use when working on a 30-pin ESP32 devkit (ESP32-D0WDQ6 / ESP32-D0WD-V3, ESP-WROOM-32 module): project setup, platformio.ini and sdkconfig for ESP-IDF or Arduino, pin mapping and which GPIOs are safe, strapping pins, ADC1 vs ADC2 with Wi-Fi, SPI speed and IO_MUX pins, I2C, deep sleep and RTC wake pins, flashing over the CH340 bridge, BOOT/EN recovery, brownouts, or debugging why something on the board does not work.

日本語の概要は準備中です。原文の説明を表示しています。

alexex1993/mcu-skills182026年9月25日 更新

Firmware development for the 36-pin ESP32-WROOM-32 development board — the original DOIT ESP32 DevKit V1 with 18 pins per side, i.e. the 30-pin layout plus the six in-package flash pins (SD0 SD1 SD2 SD3 CMD CLK = GPIO6-11) broken out at the USB end, CH340G or CP2102 bridge, AMS1117 LDO, user LED on GPIO2, GPIO0 not on the header. Use when working on a 36-pin ESP32 devkit (ESP32-D0WDQ6 / ESP32-D0WD-V3, ESP-WROOM-32 module), or when identifying which ESP32 board size you have: project setup, platformio.ini and sdkconfig for ESP-IDF or Arduino, pin mapping and which GPIOs are safe, the flash-pin trap, strapping pins, ADC1 vs ADC2 with Wi-Fi, SPI speed and IO_MUX pins, deep sleep and RTC wake pins, flashing, BOOT/EN recovery, brownouts, or debugging why something on the board does not work.

日本語の概要は準備中です。原文の説明を表示しています。

alexex1993/mcu-skills182026年9月25日 更新

Firmware development for the 38-pin ESP32-WROOM-32 development board — Espressif ESP32-DevKitC V4, Ai-Thinker NodeMCU-32S, DOIT ESP32 DevKit V1 38-pin and their CH340/CP2102 clones, 19 pins per side, with GPIO0 and the six in-package flash pins (GPIO6-11, labelled D0 D1 D2 D3 CMD CLK or SD0-SD3) broken out. Use when working on a 38-pin ESP32 devkit (ESP32-D0WDQ6 / ESP32-D0WD-V3, ESP-WROOM-32 or ESP32-WROVER module): project setup, platformio.ini and sdkconfig for ESP-IDF or Arduino, pin mapping and which GPIOs are safe, the flash-pin and IO0 traps, WROVER GPIO16/17 PSRAM conflict, strapping pins, ADC1 vs ADC2 with Wi-Fi, SPI speed and IO_MUX pins, deep sleep and RTC wake pins, flashing, BOOT/EN recovery, brownouts, or debugging why something on the board does not work.

日本語の概要は準備中です。原文の説明を表示しています。

alexex1993/mcu-skills182026年9月25日 更新

alexex1993 のスキルをすべて見る

このスキルの問題を報告する