diff --git a/os/hal/ports/STM32/STM32F1xx/stm32_registry.h b/os/hal/ports/STM32/STM32F1xx/stm32_registry.h index 0be4a37c0..e06ed276c 100644 --- a/os/hal/ports/STM32/STM32F1xx/stm32_registry.h +++ b/os/hal/ports/STM32/STM32F1xx/stm32_registry.h @@ -437,7 +437,14 @@ #define STM32_HAS_LPUART1 FALSE /* USB attributes.*/ +#if defined(STM32F103x6) +#define STM32_HAS_USB TRUE +#define STM32_USB_ACCESS_SCHEME_2x16 FALSE +#define STM32_USB_PMA_SIZE 512 +#define STM32_USB_HAS_BCDR FALSE +#else #define STM32_HAS_USB FALSE +#endif #define STM32_HAS_OTG1 FALSE #define STM32_HAS_OTG2 FALSE @@ -637,10 +644,14 @@ #define STM32_HAS_LPUART1 FALSE /* USB attributes.*/ +#if defined(STM32F103xB) #define STM32_HAS_USB TRUE #define STM32_USB_ACCESS_SCHEME_2x16 FALSE #define STM32_USB_PMA_SIZE 512 #define STM32_USB_HAS_BCDR FALSE +#else +#define STM32_HAS_USB FALSE +#endif #define STM32_HAS_OTG1 FALSE #define STM32_HAS_OTG2 FALSE diff --git a/readme.txt b/readme.txt index f10369fe3..7b7f239cc 100644 --- a/readme.txt +++ b/readme.txt @@ -102,6 +102,8 @@ ARMv7-M and ARMv8-M-ML. - NEW: On STM32WBxx added a check on STM32_LSI_ENABLE required by IWDG. - NEW: Added SPIv2 support also to STM32WB and STM32WL. +- FIX: Fixed USB not enabled on STM32F103x6 (bug #1206) + (backported to 20.3.5)(backported to 21.11.1). - FIX: Fixed RT test suite build fails when CH_CFG_USE_TIMESTAMP is FALSE (bug #1205)(backported to 21.11.1). - FIX: Fixed wrong number of CAN filters for STM32L496/9A6 (bug #1204)