stm32/boards/PYBD_SFx: Put SPI flash to sleep during sleep modes.
This commit is contained in:
parent
ea033bf25a
commit
d821a27b58
@ -36,3 +36,8 @@ void board_early_init(void) {
|
||||
// Explicitly init SPI2 because it's not enabled as a block device
|
||||
spi_bdev_ioctl(&spi_bdev2, BDEV_IOCTL_INIT, (uint32_t)&spiflash2_config);
|
||||
}
|
||||
|
||||
void board_sleep(int value) {
|
||||
mp_spiflash_deepsleep(&spi_bdev.spiflash, value);
|
||||
mp_spiflash_deepsleep(&spi_bdev2.spiflash, value);
|
||||
}
|
||||
|
@ -41,7 +41,11 @@
|
||||
#define MICROPY_HW_ENABLE_MMCARD (1)
|
||||
|
||||
#define MICROPY_BOARD_EARLY_INIT board_early_init
|
||||
#define MICROPY_BOARD_ENTER_STOP board_sleep(1);
|
||||
#define MICROPY_BOARD_LEAVE_STOP board_sleep(0);
|
||||
#define MICROPY_BOARD_ENTER_STANDBY board_sleep(1);
|
||||
void board_early_init(void);
|
||||
void board_sleep(int value);
|
||||
|
||||
// HSE is 25MHz, run SYS at 120MHz
|
||||
#define MICROPY_HW_CLK_PLLM (20)
|
||||
|
Loading…
x
Reference in New Issue
Block a user