From fa11912b9b7c1636b097459529c587a4533ea1ea Mon Sep 17 00:00:00 2001 From: Lucian Copeland Date: Fri, 31 Jan 2020 17:28:42 -0500 Subject: [PATCH] New configuration values --- ports/stm32f4/boards/stm32f4_discovery/mpconfigboard.h | 6 ++++-- ports/stm32f4/boards/stm32f4_discovery/mpconfigboard.mk | 3 ++- ports/stm32f4/boards/stm32f4_discovery/stm32f4xx_hal_conf.h | 6 +++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ports/stm32f4/boards/stm32f4_discovery/mpconfigboard.h b/ports/stm32f4/boards/stm32f4_discovery/mpconfigboard.h index 8a22a874e5..70f89d7e83 100644 --- a/ports/stm32f4/boards/stm32f4_discovery/mpconfigboard.h +++ b/ports/stm32f4/boards/stm32f4_discovery/mpconfigboard.h @@ -29,7 +29,9 @@ #define MICROPY_HW_BOARD_NAME "STM32F4_DISCO" #define MICROPY_HW_MCU_NAME "STM32F407VG" -#define FLASH_SIZE (0x80000) //512K -#define FLASH_PAGE_SIZE (0x4000) //16K +#define FLASH_SIZE (0x100000) +#define FLASH_PAGE_SIZE (0x4000) + +#define BOARD_NO_VBUS_SENSE #define BOARD_OSC_DIV 8 diff --git a/ports/stm32f4/boards/stm32f4_discovery/mpconfigboard.mk b/ports/stm32f4/boards/stm32f4_discovery/mpconfigboard.mk index 68ba3905f4..3e3dba6e80 100644 --- a/ports/stm32f4/boards/stm32f4_discovery/mpconfigboard.mk +++ b/ports/stm32f4/boards/stm32f4_discovery/mpconfigboard.mk @@ -7,7 +7,8 @@ USB_DEVICES = "CDC,MSC" INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = NONE -#This is technically a F407 but there's no difference. +# This is technically a F407 but there's no difference +# other than the camera and ethernet, which aren't supported. MCU_SERIES = m4 MCU_VARIANT = stm32f4 MCU_SUB_VARIANT = stm32f405xx diff --git a/ports/stm32f4/boards/stm32f4_discovery/stm32f4xx_hal_conf.h b/ports/stm32f4/boards/stm32f4_discovery/stm32f4xx_hal_conf.h index 18d9d60ebe..ee5832d49c 100644 --- a/ports/stm32f4/boards/stm32f4_discovery/stm32f4xx_hal_conf.h +++ b/ports/stm32f4/boards/stm32f4_discovery/stm32f4xx_hal_conf.h @@ -41,7 +41,7 @@ /* #define HAL_CAN_MODULE_ENABLED */ /* #define HAL_CRC_MODULE_ENABLED */ /* #define HAL_CRYP_MODULE_ENABLED */ -/* #define HAL_DAC_MODULE_ENABLED */ +#define HAL_DAC_MODULE_ENABLED /* #define HAL_DCMI_MODULE_ENABLED */ /* #define HAL_DMA2D_MODULE_ENABLED */ /* #define HAL_ETH_MODULE_ENABLED */ @@ -55,7 +55,7 @@ #define HAL_I2S_MODULE_ENABLED /* #define HAL_IWDG_MODULE_ENABLED */ /* #define HAL_LTDC_MODULE_ENABLED */ -/* #define HAL_RNG_MODULE_ENABLED */ +#define HAL_RNG_MODULE_ENABLED /* #define HAL_RTC_MODULE_ENABLED */ /* #define HAL_SAI_MODULE_ENABLED */ /* #define HAL_SD_MODULE_ENABLED */ @@ -63,7 +63,7 @@ #define HAL_SPI_MODULE_ENABLED #define HAL_TIM_MODULE_ENABLED #define HAL_UART_MODULE_ENABLED -/* #define HAL_USART_MODULE_ENABLED */ +#define HAL_USART_MODULE_ENABLED /* #define HAL_IRDA_MODULE_ENABLED */ /* #define HAL_SMARTCARD_MODULE_ENABLED */ /* #define HAL_WWDG_MODULE_ENABLED */