Skip to content

Commit 1cd2bc0

Browse files
committed
stm32/boards/PYBD_SFx: Configure EN_3V3 pin as output on boot.
But leave it turned off, the application must turn it on if/when needed.
1 parent afb2e9d commit 1cd2bc0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ports/stm32/boards/PYBD_SF2/board_init.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ void mboot_board_early_init(void) {
3333
}
3434

3535
void board_early_init(void) {
36+
// Configure EN_3V3 as an output pin, but keep it turned off
37+
mp_hal_pin_config(pyb_pin_EN_3V3, MP_HAL_PIN_MODE_OUTPUT, MP_HAL_PIN_PULL_NONE, 0);
38+
3639
// Explicitly init SPI2 because it's not enabled as a block device
3740
spi_bdev_ioctl(&spi_bdev2, BDEV_IOCTL_INIT, (uint32_t)&spiflash2_config);
3841
}

0 commit comments

Comments
 (0)