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.
This commit is contained in:
Damien George 2019-07-04 11:03:10 +10:00
parent afb2e9dd94
commit 1cd2bc066d
1 changed files with 3 additions and 0 deletions

View File

@ -33,6 +33,9 @@ void mboot_board_early_init(void) {
}
void board_early_init(void) {
// Configure EN_3V3 as an output pin, but keep it turned off
mp_hal_pin_config(pyb_pin_EN_3V3, MP_HAL_PIN_MODE_OUTPUT, MP_HAL_PIN_PULL_NONE, 0);
// Explicitly init SPI2 because it's not enabled as a block device
spi_bdev_ioctl(&spi_bdev2, BDEV_IOCTL_INIT, (uint32_t)&spiflash2_config);
}