mirror of
https://github.com/randybb/esphome-configs.git
synced 2026-12-06 01:06:52 +01:00
35 lines
941 B
YAML
35 lines
941 B
YAML
---
|
|
# One-shot for a Seeed XIAO STM32C5 still on TinyUF2: erases TinyUF2 5 s after boot (mrk's tinyuf2_eraser, LED on when
|
|
# done), then hold BOOT + press RESET (ROM DFU, 0483:df11) and flash the MCUboot build of the node:
|
|
# dfu-util -a 0 -s 0x08000000 -D .esphome/build/<node>/.west_build/mcuboot/zephyr/zephyr.bin
|
|
# dfu-util -a 0 -s 0x08008000:leave -D .esphome/build/<node>/.west_build/zephyr/zephyr/zephyr.signed.bin
|
|
esphome:
|
|
name: mcu-stm32-xiao-c5-eraser
|
|
on_boot:
|
|
priority: -100
|
|
then:
|
|
- delay: 5s
|
|
- tinyuf2_eraser.erase: eraser
|
|
# LED on: erased, go to DFU (BOOT + RESET)
|
|
- output.turn_on: led_out
|
|
|
|
external_components:
|
|
- source: github://mrk-its/esphome-canopen@canopen_entities
|
|
components: [tinyuf2_eraser]
|
|
|
|
stm32:
|
|
variant: STM32C5
|
|
board: xiao_stm32c5
|
|
|
|
logger:
|
|
|
|
tinyuf2_eraser:
|
|
id: eraser
|
|
|
|
output:
|
|
- platform: gpio
|
|
id: led_out
|
|
pin:
|
|
number: PB12
|
|
inverted: true
|