stm32/boards: Update all boards to work with new USB configuration.
This commit is contained in:
parent
d9b9fbc41a
commit
34911f1a57
|
@ -4,6 +4,7 @@
|
|||
#define MICROPY_HW_HAS_SWITCH (1)
|
||||
#define MICROPY_HW_ENABLE_RNG (1)
|
||||
#define MICROPY_HW_ENABLE_RTC (1)
|
||||
#define MICROPY_HW_ENABLE_USB (1)
|
||||
|
||||
// MSI is used and is 4MHz
|
||||
#define MICROPY_HW_CLK_PLLM (1)
|
||||
|
@ -65,3 +66,6 @@
|
|||
#define MICROPY_HW_LED2 (pin_B14) // green
|
||||
#define MICROPY_HW_LED_ON(pin) (mp_hal_pin_high(pin))
|
||||
#define MICROPY_HW_LED_OFF(pin) (mp_hal_pin_low(pin))
|
||||
|
||||
// USB config
|
||||
#define MICROPY_HW_USB_FS (1)
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define USE_USB_FS
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#define MICROPY_HW_ENABLE_RTC (1)
|
||||
#define MICROPY_HW_ENABLE_DAC (1)
|
||||
#define MICROPY_HW_ENABLE_CAN (1)
|
||||
#define MICROPY_HW_ENABLE_USB (1)
|
||||
|
||||
// HSE is 12MHz
|
||||
#define MICROPY_HW_CLK_PLLM (12)
|
||||
|
@ -54,5 +55,6 @@
|
|||
// The Cerb40 has No SDCard
|
||||
|
||||
// USB config
|
||||
#define MICROPY_HW_USB_FS (1)
|
||||
//#define MICROPY_HW_USB_VBUS_DETECT_PIN (pin_A9)
|
||||
//#define MICROPY_HW_USB_OTG_ID_PIN (pin_A10)
|
||||
|
|
|
@ -46,8 +46,6 @@
|
|||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
#define USE_USB_FS
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#define MICROPY_HW_HAS_SWITCH (1)
|
||||
#define MICROPY_HW_HAS_FLASH (1)
|
||||
#define MICROPY_HW_ENABLE_RTC (1)
|
||||
#define MICROPY_HW_ENABLE_USB (1)
|
||||
#define MICROPY_HW_ENABLE_SERVO (1)
|
||||
|
||||
// Pico has an 8 MHz HSE and the F401 does 84 MHz max
|
||||
|
@ -62,3 +63,6 @@
|
|||
#define MICROPY_HW_LED4 (pin_B12) // green
|
||||
#define MICROPY_HW_LED_ON(pin) (mp_hal_pin_high(pin))
|
||||
#define MICROPY_HW_LED_OFF(pin) (mp_hal_pin_low(pin))
|
||||
|
||||
// USB config
|
||||
#define MICROPY_HW_USB_FS (1)
|
||||
|
|
|
@ -46,8 +46,6 @@
|
|||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
#define USE_USB_FS
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#define MICROPY_HW_HAS_SDCARD (1)
|
||||
#define MICROPY_HW_ENABLE_RNG (1)
|
||||
#define MICROPY_HW_ENABLE_DAC (1)
|
||||
#define MICROPY_HW_ENABLE_USB (1)
|
||||
|
||||
// HSE is 8MHz
|
||||
#define MICROPY_HW_CLK_PLLM (8)
|
||||
|
@ -69,4 +70,5 @@
|
|||
#define MICROPY_HW_SDCARD_DETECT_PRESENT (1)
|
||||
|
||||
// USB config
|
||||
#define MICROPY_HW_USB_FS (1)
|
||||
#define MICROPY_HW_USB_OTG_ID_PIN (pin_A10)
|
||||
|
|
|
@ -46,8 +46,6 @@
|
|||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
#define USE_USB_FS
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#define MICROPY_HW_HAS_FLASH (1)
|
||||
#define MICROPY_HW_ENABLE_RNG (1)
|
||||
#define MICROPY_HW_ENABLE_RTC (1)
|
||||
#define MICROPY_HW_ENABLE_USB (1)
|
||||
|
||||
#define MICROPY_BOARD_EARLY_INIT LIMIFROG_board_early_init
|
||||
void LIMIFROG_board_early_init(void);
|
||||
|
@ -50,4 +51,5 @@ void LIMIFROG_board_early_init(void);
|
|||
#define MICROPY_HW_LED_OFF(pin) (mp_hal_pin_low(pin))
|
||||
|
||||
// USB config
|
||||
#define MICROPY_HW_USB_FS (1)
|
||||
// #define MICROPY_HW_USB_OTG_ID_PIN (pin_C12) // This is not the official ID Pin which should be PA10
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define USE_USB_FS
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
// we can turn this on.
|
||||
#define MICROPY_HW_HAS_SDCARD (0)
|
||||
#define MICROPY_HW_ENABLE_RNG (1)
|
||||
#define MICROPY_HW_ENABLE_USB (1)
|
||||
#define MICROPY_HW_ENABLE_SERVO (1)
|
||||
|
||||
void NETDUINO_PLUS_2_board_early_init(void);
|
||||
|
@ -62,5 +63,6 @@ void NETDUINO_PLUS_2_board_early_init(void);
|
|||
#define MICROPY_HW_LED_ON(pin) (mp_hal_pin_high(pin))
|
||||
#define MICROPY_HW_LED_OFF(pin) (mp_hal_pin_low(pin))
|
||||
|
||||
// USB VBUS detect pin
|
||||
// USB config
|
||||
#define MICROPY_HW_USB_FS (1)
|
||||
#define MICROPY_HW_USB_VBUS_DETECT_PIN (pin_A9)
|
||||
|
|
|
@ -46,8 +46,6 @@
|
|||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
#define USE_USB_FS
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
|
|
|
@ -46,10 +46,6 @@
|
|||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
// This board doesn't really have USB, but the stm32 codebase doesn't build
|
||||
// without some USB defined, so we leave this on for now.
|
||||
#define USE_USB_FS
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
|
|
|
@ -46,10 +46,6 @@
|
|||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
// This board doesn't really have USB, but the stm32 codebase doesn't build
|
||||
// without some USB defined, so we leave this on for now.
|
||||
#define USE_USB_FS
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#define MICROPY_HW_ENABLE_RNG (1)
|
||||
#define MICROPY_HW_ENABLE_RTC (1)
|
||||
#define MICROPY_HW_ENABLE_CAN (1)
|
||||
#define MICROPY_HW_ENABLE_USB (1)
|
||||
|
||||
// HSE is 8MHz
|
||||
#define MICROPY_HW_CLK_PLLM (8)
|
||||
|
@ -72,5 +73,6 @@
|
|||
#define MICROPY_HW_LED_OFF(pin) (mp_hal_pin_low(pin))
|
||||
|
||||
// USB config (CN13 - USB OTG FS)
|
||||
#define MICROPY_HW_USB_FS (1)
|
||||
#define MICROPY_HW_USB_VBUS_DETECT_PIN (pin_A9)
|
||||
#define MICROPY_HW_USB_OTG_ID_PIN (pin_A10)
|
||||
|
|
|
@ -46,8 +46,6 @@
|
|||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
#define USE_USB_FS
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
|
|
|
@ -46,10 +46,6 @@
|
|||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
// This board doesn't really have USB, but the stm32 codebase doesn't build
|
||||
// without some USB defined, so we leave this on for now.
|
||||
#define USE_USB_FS
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#define MICROPY_HW_ENABLE_RTC (1)
|
||||
#define MICROPY_HW_ENABLE_DAC (1)
|
||||
#define MICROPY_HW_ENABLE_CAN (1)
|
||||
#define MICROPY_HW_ENABLE_USB (1)
|
||||
|
||||
// HSE is 8MHz
|
||||
// VCOClock = HSE * PLLN / PLLM = 8 MHz * 216 / 4 = 432 MHz
|
||||
|
@ -66,5 +67,6 @@
|
|||
#define MICROPY_HW_LED_OFF(pin) (mp_hal_pin_low(pin))
|
||||
|
||||
// USB config (CN13 - USB OTG FS)
|
||||
#define MICROPY_HW_USB_FS (1)
|
||||
#define MICROPY_HW_USB_VBUS_DETECT_PIN (pin_A9)
|
||||
#define MICROPY_HW_USB_OTG_ID_PIN (pin_A10)
|
||||
|
|
|
@ -46,8 +46,6 @@
|
|||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
#define USE_USB_FS
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#define MICROPY_HW_ENABLE_RTC (1)
|
||||
#define MICROPY_HW_ENABLE_DAC (1)
|
||||
#define MICROPY_HW_ENABLE_CAN (1)
|
||||
#define MICROPY_HW_ENABLE_USB (1)
|
||||
|
||||
// HSE is 25MHz
|
||||
// VCOClock = HSE * PLLN / PLLM = 25 MHz * 432 / 25 = 432 MHz
|
||||
|
@ -66,5 +67,6 @@
|
|||
#define MICROPY_HW_LED_OFF(pin) (mp_hal_pin_low(pin))
|
||||
|
||||
// USB config (CN13 - USB OTG FS)
|
||||
#define MICROPY_HW_USB_FS (1)
|
||||
#define MICROPY_HW_USB_VBUS_DETECT_PIN (pin_A9)
|
||||
#define MICROPY_HW_USB_OTG_ID_PIN (pin_A10)
|
||||
|
|
|
@ -46,8 +46,6 @@
|
|||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
#define USE_USB_FS
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#define MICROPY_HW_HAS_SWITCH (1)
|
||||
#define MICROPY_HW_HAS_FLASH (1)
|
||||
#define MICROPY_HW_ENABLE_RTC (1)
|
||||
#define MICROPY_HW_ENABLE_USB (1)
|
||||
|
||||
// MSI is used and is 4MHz
|
||||
#define MICROPY_HW_CLK_PLLM (1)
|
||||
|
@ -49,3 +50,6 @@
|
|||
#define MICROPY_HW_LED1 (pin_A5) // Green LD2 LED on Nucleo
|
||||
#define MICROPY_HW_LED_ON(pin) (mp_hal_pin_high(pin))
|
||||
#define MICROPY_HW_LED_OFF(pin) (mp_hal_pin_low(pin))
|
||||
|
||||
// USB config
|
||||
#define MICROPY_HW_USB_FS (1)
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define USE_USB_FS
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#define MICROPY_HW_ENABLE_RTC (1)
|
||||
#define MICROPY_HW_ENABLE_DAC (1)
|
||||
#define MICROPY_HW_ENABLE_CAN (1)
|
||||
#define MICROPY_HW_ENABLE_USB (1)
|
||||
|
||||
// HSE is 12MHz
|
||||
#define MICROPY_HW_CLK_PLLM (12)
|
||||
|
@ -69,5 +70,6 @@
|
|||
#define MICROPY_HW_SDCARD_DETECT_PRESENT (GPIO_PIN_RESET)
|
||||
|
||||
// USB config
|
||||
#define MICROPY_HW_USB_FS (1)
|
||||
#define MICROPY_HW_USB_VBUS_DETECT_PIN (pin_A9)
|
||||
#define MICROPY_HW_USB_OTG_ID_PIN (pin_A10)
|
||||
|
|
|
@ -46,8 +46,6 @@
|
|||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
#define USE_USB_FS
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#define MICROPY_HW_HAS_MMA7660 (1)
|
||||
#define MICROPY_HW_HAS_LCD (1)
|
||||
#define MICROPY_HW_ENABLE_RTC (1)
|
||||
#define MICROPY_HW_ENABLE_USB (1)
|
||||
#define MICROPY_HW_ENABLE_SERVO (1)
|
||||
|
||||
// HSE is 12MHz
|
||||
|
@ -76,6 +77,7 @@
|
|||
#define MICROPY_HW_SDCARD_DETECT_PRESENT (GPIO_PIN_RESET)
|
||||
|
||||
// USB config
|
||||
#define MICROPY_HW_USB_FS (1)
|
||||
#define MICROPY_HW_USB_VBUS_DETECT_PIN (pin_A9)
|
||||
|
||||
// MMA accelerometer config
|
||||
|
|
|
@ -46,8 +46,6 @@
|
|||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
#define USE_USB_FS
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#define MICROPY_HW_ENABLE_SERVO (1)
|
||||
#define MICROPY_HW_ENABLE_DAC (1)
|
||||
#define MICROPY_HW_ENABLE_CAN (1)
|
||||
#define MICROPY_HW_ENABLE_USB (1)
|
||||
|
||||
// HSE is 8MHz
|
||||
#define MICROPY_HW_CLK_PLLM (8)
|
||||
|
@ -90,6 +91,7 @@
|
|||
#define MICROPY_HW_SDCARD_DETECT_PRESENT (GPIO_PIN_RESET)
|
||||
|
||||
// USB config
|
||||
#define MICROPY_HW_USB_FS (1)
|
||||
#define MICROPY_HW_USB_VBUS_DETECT_PIN (pin_A9)
|
||||
#define MICROPY_HW_USB_OTG_ID_PIN (pin_A10)
|
||||
|
||||
|
|
|
@ -46,8 +46,6 @@
|
|||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
#define USE_USB_FS
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#define MICROPY_HW_ENABLE_SERVO (1)
|
||||
#define MICROPY_HW_ENABLE_DAC (1)
|
||||
#define MICROPY_HW_ENABLE_CAN (1)
|
||||
#define MICROPY_HW_ENABLE_USB (1)
|
||||
|
||||
// HSE is 12MHz
|
||||
#define MICROPY_HW_CLK_PLLM (12)
|
||||
|
@ -90,6 +91,7 @@
|
|||
#define MICROPY_HW_SDCARD_DETECT_PRESENT (GPIO_PIN_RESET)
|
||||
|
||||
// USB config
|
||||
#define MICROPY_HW_USB_FS (1)
|
||||
#define MICROPY_HW_USB_VBUS_DETECT_PIN (pin_A9)
|
||||
#define MICROPY_HW_USB_OTG_ID_PIN (pin_A10)
|
||||
|
||||
|
|
|
@ -46,8 +46,6 @@
|
|||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
#define USE_USB_FS
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#define MICROPY_HW_ENABLE_SERVO (1)
|
||||
#define MICROPY_HW_ENABLE_DAC (1)
|
||||
#define MICROPY_HW_ENABLE_CAN (1)
|
||||
#define MICROPY_HW_ENABLE_USB (1)
|
||||
|
||||
// HSE is 8MHz
|
||||
#define MICROPY_HW_CLK_PLLM (8)
|
||||
|
@ -79,6 +80,7 @@
|
|||
#define MICROPY_HW_SDCARD_DETECT_PRESENT (GPIO_PIN_SET)
|
||||
|
||||
// USB VBUS detect pin
|
||||
#define MICROPY_HW_USB_FS (1)
|
||||
#define MICROPY_HW_USB_VBUS_DETECT_PIN (pin_A9)
|
||||
|
||||
// MMA accelerometer config
|
||||
|
|
|
@ -46,8 +46,6 @@
|
|||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
#define USE_USB_FS
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#define MICROPY_HW_ENABLE_SERVO (1)
|
||||
#define MICROPY_HW_ENABLE_DAC (1)
|
||||
#define MICROPY_HW_ENABLE_CAN (1)
|
||||
#define MICROPY_HW_ENABLE_USB (1)
|
||||
|
||||
// HSE is 8MHz
|
||||
#define MICROPY_HW_CLK_PLLM (8)
|
||||
|
@ -87,6 +88,7 @@
|
|||
#define MICROPY_HW_SDCARD_DETECT_PRESENT (GPIO_PIN_RESET)
|
||||
|
||||
// USB config
|
||||
#define MICROPY_HW_USB_FS (1)
|
||||
#define MICROPY_HW_USB_VBUS_DETECT_PIN (pin_A9)
|
||||
#define MICROPY_HW_USB_OTG_ID_PIN (pin_A10)
|
||||
|
||||
|
|
|
@ -46,8 +46,6 @@
|
|||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
#define USE_USB_FS
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#define MICROPY_HW_HAS_SWITCH (1)
|
||||
#define MICROPY_HW_HAS_FLASH (1)
|
||||
#define MICROPY_HW_ENABLE_RTC (1)
|
||||
#define MICROPY_HW_ENABLE_USB (1)
|
||||
#define MICROPY_HW_ENABLE_SERVO (1)
|
||||
|
||||
// HSE is 8MHz
|
||||
|
@ -58,5 +59,6 @@
|
|||
#define MICROPY_HW_LED_OFF(pin) (mp_hal_pin_low(pin))
|
||||
|
||||
// USB config
|
||||
#define MICROPY_HW_USB_FS (1)
|
||||
#define MICROPY_HW_USB_VBUS_DETECT_PIN (pin_A9)
|
||||
#define MICROPY_HW_USB_OTG_ID_PIN (pin_A10)
|
||||
|
|
|
@ -46,8 +46,6 @@
|
|||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
#define USE_USB_FS
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#define MICROPY_HW_ENABLE_RNG (1)
|
||||
#define MICROPY_HW_ENABLE_RTC (1)
|
||||
#define MICROPY_HW_ENABLE_CAN (1)
|
||||
#define MICROPY_HW_ENABLE_USB (1)
|
||||
|
||||
// HSE is 8MHz
|
||||
#define MICROPY_HW_CLK_PLLM (8)
|
||||
|
@ -62,5 +63,7 @@
|
|||
#define MICROPY_HW_LED_OFF(pin) (mp_hal_pin_low(pin))
|
||||
|
||||
// USB config
|
||||
#define MICROPY_HW_USB_HS (1)
|
||||
#define MICROPY_HW_USB_HS_IN_FS (1)
|
||||
#define MICROPY_HW_USB_VBUS_DETECT_PIN (pin_B13)
|
||||
#define MICROPY_HW_USB_OTG_ID_PIN (pin_B12)
|
||||
|
|
|
@ -46,9 +46,6 @@
|
|||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
#define USE_USB_HS
|
||||
#define USE_USB_HS_IN_FS
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#define MICROPY_HW_ENABLE_RTC (1)
|
||||
#define MICROPY_HW_ENABLE_DAC (1)
|
||||
#define MICROPY_HW_ENABLE_CAN (1)
|
||||
#define MICROPY_HW_ENABLE_USB (1)
|
||||
|
||||
// SD card detect switch
|
||||
#if MICROPY_HW_HAS_SDCARD
|
||||
|
@ -21,6 +22,9 @@
|
|||
#define MICROPY_HW_CLK_PLLP (RCC_PLLP_DIV2) //divide PLL clock by this to get core clock
|
||||
#define MICROPY_HW_CLK_PLLQ (8) //divide core clock by this to get 48MHz
|
||||
|
||||
// USB config
|
||||
#define MICROPY_HW_USB_FS (1)
|
||||
|
||||
// UART config
|
||||
#define MICROPY_HW_UART1_TX (pin_A9)
|
||||
#define MICROPY_HW_UART1_RX (pin_A10)
|
||||
|
@ -46,7 +50,7 @@
|
|||
#define MICROPY_HW_SPI1_SCK (pin_A5)
|
||||
#define MICROPY_HW_SPI1_MISO (pin_A6)
|
||||
#define MICROPY_HW_SPI1_MOSI (pin_A7)
|
||||
#if defined(USE_USB_HS_IN_FS)
|
||||
#if MICROPY_HW_USB_HS_IN_FS
|
||||
// The HS USB uses B14 & B15 for D- and D+
|
||||
#else
|
||||
#define MICROPY_HW_SPI2_NSS (pin_B12)
|
||||
|
|
|
@ -46,8 +46,6 @@
|
|||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
#define USE_USB_FS
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#define MICROPY_HW_ENABLE_RTC (1)
|
||||
#define MICROPY_HW_ENABLE_DAC (1)
|
||||
#define MICROPY_HW_ENABLE_CAN (1)
|
||||
#define MICROPY_HW_ENABLE_USB (1)
|
||||
|
||||
// HSE is 8MHz
|
||||
#define MICROPY_HW_CLK_PLLM (8)
|
||||
|
@ -74,5 +75,6 @@
|
|||
#define MICROPY_HW_LED_OFF(pin) (mp_hal_pin_low(pin))
|
||||
|
||||
// USB config
|
||||
#define MICROPY_HW_USB_FS (1)
|
||||
#define MICROPY_HW_USB_VBUS_DETECT_PIN (pin_A9)
|
||||
#define MICROPY_HW_USB_OTG_ID_PIN (pin_A10)
|
||||
|
|
|
@ -46,8 +46,6 @@
|
|||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
#define USE_USB_FS
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#define MICROPY_HW_ENABLE_RNG (1)
|
||||
#define MICROPY_HW_ENABLE_RTC (1)
|
||||
#define MICROPY_HW_ENABLE_CAN (1)
|
||||
#define MICROPY_HW_ENABLE_USB (1)
|
||||
|
||||
// HSE is 25MHz
|
||||
// VCOClock = HSE * PLLN / PLLM = 25 MHz * 432 / 25 = 432 MHz
|
||||
|
@ -68,5 +69,7 @@
|
|||
#define MICROPY_HW_SDCARD_DETECT_PRESENT (GPIO_PIN_RESET)
|
||||
|
||||
// USB config (CN13 - USB OTG FS)
|
||||
#define MICROPY_HW_USB_HS (1)
|
||||
#define MICROPY_HW_USB_HS_IN_FS (1)
|
||||
/*#define MICROPY_HW_USB_VBUS_DETECT_PIN (pin_J12)*/
|
||||
#define MICROPY_HW_USB_OTG_ID_PIN (pin_J12)
|
||||
|
|
|
@ -46,9 +46,6 @@
|
|||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
#define USE_USB_HS
|
||||
#define USE_USB_HS_IN_FS
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#define MICROPY_HW_ENABLE_RNG (1)
|
||||
#define MICROPY_HW_ENABLE_RTC (1)
|
||||
#define MICROPY_HW_ENABLE_CAN (1)
|
||||
#define MICROPY_HW_ENABLE_USB (1)
|
||||
|
||||
#define MICROPY_BOARD_EARLY_INIT STM32F7DISC_board_early_init
|
||||
void STM32F7DISC_board_early_init(void);
|
||||
|
@ -69,6 +70,6 @@ void STM32F7DISC_board_early_init(void);
|
|||
// The Hardware VBUS detect only works on pin PA9. The STM32F7 Discovery uses
|
||||
// PA9 for VCP_TX functionality and connects the VBUS to pin J12 (so software
|
||||
// only detect). So we don't define the VBUS detect pin since that requires PA9.
|
||||
|
||||
#define MICROPY_HW_USB_FS (1)
|
||||
/*#define MICROPY_HW_USB_VBUS_DETECT_PIN (pin_J12)*/
|
||||
#define MICROPY_HW_USB_OTG_ID_PIN (pin_A10)
|
||||
|
|
|
@ -46,8 +46,6 @@
|
|||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
#define USE_USB_FS
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
|
|
|
@ -8,6 +8,7 @@ void STM32L476DISC_board_early_init(void);
|
|||
#define MICROPY_HW_HAS_FLASH (1)
|
||||
#define MICROPY_HW_ENABLE_RNG (1)
|
||||
#define MICROPY_HW_ENABLE_RTC (1)
|
||||
#define MICROPY_HW_ENABLE_USB (1)
|
||||
|
||||
// use external SPI flash for storage
|
||||
#define MICROPY_HW_SPIFLASH_SIZE_BITS (128 * 1024 * 1024)
|
||||
|
@ -57,4 +58,5 @@ void STM32L476DISC_board_early_init(void);
|
|||
#define MICROPY_HW_LED_OFF(pin) (mp_hal_pin_low(pin))
|
||||
|
||||
// USB config
|
||||
#define MICROPY_HW_USB_FS (1)
|
||||
// #define MICROPY_HW_USB_OTG_ID_PIN (pin_C12) // This is not the official ID Pin which should be PA10
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define USE_USB_FS
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
|
|
Loading…
Reference in New Issue