Skip to content

Commit 8fbe703

Browse files
committed
PortentaH7 - Stop the blue blink...
This was caused by the default sketch running on the M4 core when no other sketch was loaded on the M4. This changes the config to not automatically start the M4 at boot and. It appears like that left the Blue LED on, so added an InitVariant implementation for the PortentaH7 that turns it off.
1 parent fe9e040 commit 8fbe703

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-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
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
#include <zephyr/kernel.h>
2+
#include <zephyrInternal.h>
23

34
void _on_1200_bps() {
45
uint32_t tmp = (uint32_t) & (RTC->BKP0R);
56
tmp += (RTC_BKP_DR0 * 4U);
67
*(__IO uint32_t *)tmp = (uint32_t)0xDF59;
78
NVIC_SystemReset();
89
}
10+
11+
void initVariant(void) {
12+
// check the BLUE LED
13+
/* Set led1 inactive since the Arduino bootloader leaves it active */
14+
const struct gpio_dt_spec led2 = GPIO_DT_SPEC_GET(DT_ALIAS(led2), gpios);
15+
if (!gpio_is_ready_dt(&led2)) {
16+
return;
17+
}
18+
19+
gpio_pin_configure_dt(&led2, GPIO_OUTPUT_INACTIVE);
20+
}

0 commit comments

Comments
 (0)