![]() |
STM32Cube
Version 2.0
Create Projects for STM32F2 Series with STM32Cube HAL and STM32CubeMX
|
CMSIS-Driver provide generic peripheral interfaces for middleware and application code. The CMSIS-Driver cooperates with the STM32Cube HAL.
In MDK you should select the CMSIS-Driver in the Manage Run-Time Environment window.
You should configure the parameters for these CMSIS-Driver in STM32CubeMX as described below. Once you use Generate Code in STM32CubeMX, the relevant STM32Cube HAL components are added to the MDK project. Refer to Setup STM32Cube Framework - STM32CubeMX for more information about the overall process.
For each CMSIS-Driver the setup with STM32CubeMX is explained in the pages below.
Some CMSIS-Driver have additional GPIO pins that are not covered by the underlying peripheral. The following User Labels assign GPIO pins to these CMSIS-Drivers.
User Label | CMSIS-Driver | Description |
---|---|---|
MemoryCard_CD | MCI | Memory Card: Card Detect Pin |
MemoryCard_WP | MCI | Memory Card: Write Protect Pin |
USB_OTG_FS_VBUS_Power | USBH_FS | Full-speed USB Host: VBUS Power Pin |
USB_OTG_FS_Overcurrent | USBH_FS | Full-speed USB Host: Overcurrent Pin |
USB_OTG_HS_VBUS_Power | USBH_HS | High-speed USB Host: VBUS Power Pin |
USB_OTG_HS_Overcurrent | USBH_HS | High-speed USB Host: Overcurrent Pin |
STM32CubeMX generates for the configuration of the CMSIS-Driver the file MX_Device.h. The file MX_Device.h contains sections for every peripheral that is enabled in the STM32CubeMX configuration. The #define symbols have the same names as in the classic configuration file RTE_Device.h and are used by the CMSIS-Driver when the component Device:STM32Cube Framework (API):STM32CubeMX is selected in the RTE.
Example: