Skip to content

PortentaH7 - Stop the blue blink... #128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,4 @@ CONFIG_VIDEO_BUFFER_POOL_ALIGN=32
CONFIG_VIDEO_BUFFER_USE_SHARED_MULTI_HEAP=y
CONFIG_VIDEO_BUFFER_SMH_ATTRIBUTE=2
CONFIG_FLASH=y
CONFIG_STM32H7_BOOT_M4_AT_INIT=n
12 changes: 12 additions & 0 deletions variants/arduino_portenta_h7_stm32h747xx_m7/variant.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
#include <zephyr/kernel.h>
#include <zephyrInternal.h>

void _on_1200_bps() {
uint32_t tmp = (uint32_t) & (RTC->BKP0R);
tmp += (RTC_BKP_DR0 * 4U);
*(__IO uint32_t *)tmp = (uint32_t)0xDF59;
NVIC_SystemReset();
}

void initVariant(void) {
// check the BLUE LED
/* Set led1 inactive since the Arduino bootloader leaves it active */
const struct gpio_dt_spec led2 = GPIO_DT_SPEC_GET(DT_ALIAS(led2), gpios);
if (!gpio_is_ready_dt(&led2)) {
return;
}

gpio_pin_configure_dt(&led2, GPIO_OUTPUT_INACTIVE);
}