You've already forked Core2forAWS-MicroPython
mirror of
https://github.com/m5stack/Core2forAWS-MicroPython.git
synced 2026-05-20 10:30:31 -07:00
stm32/boards: Update all boards to work with new USB configuration.
This commit is contained in:
@@ -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)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user