Skip to content

Commit ecc2e51

Browse files
committed
Portenta H7: Don't blink BLUE LED
This was caused by the default M4 core sketch when no other M4 sketch is configured/loaded. Disable the automatic starting of the M5 core. Was leaving the BLUE led on, so initVariant turns it off...
1 parent fe9e040 commit ecc2e51

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

variants/arduino_portenta_h7_stm32h747xx_m7/arduino_portenta_h7_stm32h747xx_m7.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,4 @@ CONFIG_VIDEO_BUFFER_POOL_ALIGN=32
9595
CONFIG_VIDEO_BUFFER_USE_SHARED_MULTI_HEAP=y
9696
CONFIG_VIDEO_BUFFER_SMH_ATTRIBUTE=2
9797
CONFIG_FLASH=y
98+
CONFIG_STM32H7_BOOT_M4_AT_INIT=n

variants/arduino_portenta_h7_stm32h747xx_m7/variant.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,14 @@ void _on_1200_bps() {
66
*(__IO uint32_t *)tmp = (uint32_t)0xDF59;
77
NVIC_SystemReset();
88
}
9+
10+
void initVariant(void) {
11+
// check the BLUE LED
12+
/* Set led1 inactive since the Arduino bootloader leaves it active */
13+
const struct gpio_dt_spec led2 = GPIO_DT_SPEC_GET(DT_ALIAS(led2), gpios);
14+
if (!gpio_is_ready_dt(&led2)) {
15+
return;
16+
}
17+
18+
gpio_pin_configure_dt(&led2, GPIO_OUTPUT_INACTIVE);
19+
}

0 commit comments

Comments
 (0)