Keil
STM32F0xx_DFP
STMicroelectronics STM32F0 Series Device Support
https://www.keil.com/pack/
https://github.com/Open-CMSIS-Pack/STM32F0xx_DFP.git
LICENSE
Active development ...
Updated Pack to STM32Cube_FW_F0 Firmware Package version V1.11.3.
STM32CubeMX integration: Synchronized versions of generated component ::Device:STM32Cube Framework:STM32CubeMX (in gpdsc) and its bootstrap (in pdsc).
Package Description (pdsc):
- Added global define USE_HAL_DRIVER and USE_FULL_LL_DRIVER to the component STM32CubeMX:Device:STM32Cube HAL.
- Added global define USE_HAL_DRIVER and USE_FULL_LL_DRIVER to the component Standalone:Device:Startup.
- STM32072B-EVAL, STM32091C-EVAL: Added board components drivers.
- Removed unnecessary condition for 'emWin LCD' and 'Graphics Display' components (Removed SPI CMSIS Driver).
- Changed schemaVersion (1.7.2).
- Corrected device in board description attribute 'mountedDevice'.
- Added debugProbe board description.
Updated Documentation files.
CMSIS-Driver:
- Updated disclaimers.
- I2C:
-- Corrected usage function name.
-- Corrected pins configuration.
- USBD:
-- Removed include of stm32f0xx_hal_pcd.h header.
Board Examples:
- Migrated CubeMX projects to V6.4.0.
- Overridden default HAL_InitTick function.
- Changed Assembler option to armclang(Auto Select).
- Updated config files to CMSIS 5.8.0.
- USB:
-- Updated all examples with user templates from MDK-Middleware v7.11.1.
-- Changed variant selection to "MDK-Plus".
Device support:
- Updated Cube FW to STM32Cube_FW_F0 V1.11.0.
- Updated SVD file.
- Updated documentation.
- Corrected flash programming algorithms.
- Added capability to launch the Option Byte Loading after flash download.
STM32CubeMX integration:
- Added support for Timebase Source TIMx in gpdsc.ftl.
- Corrected launching STM32CubeMX via "play" button for existing projects overwrites with a new STM32CubeMX project file instead of loading it.
- MX_Devive_h.ftl:
-- Updated parsing of USART virtual mode.
-- Updated generation of macros: Added handling for '(' and ')' symbols.
Examples:
- Updated compiler to AC6.
- Added Event Recorder.
CMSIS-Driver:
- CAN:
-- Corrected SetBitrate function to leave Silent and Loopback mode as they were.
-- Corrected SetMode function to clear Silent and Loopback mode when NORMAL mode is activated.
-- Corrected MessageSend function to only access required data for sending.
-- Corrected abort message send functionality.
- I2C:
-- Corrected pin configuration: MX_I2C2_SMBA_GPIO_PuPdOD replaced with MX_I2Cx_yyy_GPIO_PuPdOD.
- USART: Corrected UARTx/USARTx related identifiers.
- USB Device:
-- Updated USBD_EndpointConfigure function to check that maximum packet size requested fits into configured FIFO (compile time configured).
-- Corrected transmitted count for non-control IN endpoints.
This DFP works either with STM32CubeMX (STM32CubeMX V4.23.0 and STM32Cube_FW_F0 V1.9.0 or higher)
or Standalone (no support for STM32CubeMX). STM32CubeMX is mandatory for use of CMSIS-Driver and MDK-Middleware.
- New projects require the component 'Device:STM32Cube Framework:STM32CubeMX' from the STM32Cube MX bundle for configuration of pins and clocks via STM32CubeMX.
This pack only contains a subset of the files from STM32Cube_FW_F0 version 1.9.0 (ST Drivers, STM32Cube documentation and fonts).
Updated documentation for STM32Cube Framework usage.
Device support:
- Updated device names to match STM32CubeMX notation
- Added DBGMCU INI files configuring debug settings of the target for debug units without support for debug sequences
- Updated documentation.
CMSIS Driver:
- Added CAN driver
- Added I2C driver
- Added SPI driver
- Added UART/USART/IrDA/SmartCard driver
- Added USB Device driver
Board support:
- Added STM32072B-EVAL and STM32091C-EVAL
Example projects:
- added emWin graphics library on STM32072B-EVAL and STM32091C-EVAL boards
- added USB Device HID on STM32F072-Discovery Board
- updated all examples to use STM32CubeMX integration
Added new devices:
- STM32F031E6, STM32F051T8
- STM32F038E6, STM32F058T8, STM32F098CC, STM32F098RC, STM32F098VC
Updated Device support files (STM32Cube_FW_F0_V1.5.0).
Updated SVD files.
Updated User manuals and datasheets.
Updated example projects.
Added board support:
- STM32F030-Discovery board
- STM32F072-Discovery board
Updated board support:
- STM32F051-Discovery board
Updated Flash Option Byte Template
Added: STM32F091xx, STM32F070xx, STM32F030xC devices.
Updated: STM32F0xx device support files.
Added: Flash Option Byte Template
Added: Added missing devices.
- STM32F038C6, STM32F038F6, STM32F038G6, STM32F038K6
- STM32F048C6, STM32F048G6, STM32F048T6
- STM32F058C8, STM32F058R8
Added: Devices STM32F071V8, STM32F078RB.
Added: STM32F0-Discovery board description and examples.
Updated: CMSIS-CORE (Ver 1.4.0).
Updated: device documentation.
Added: STM32F042 subfamily
Deleted: Book Entry "STM32F0 Discovery Board" from device section
Updated: device names changed in accordance to STMicroelectronics
First Release version of STM32F0 Device Family Pack.
ST
Device Support
Device Family Package STMicroelectronics
STM32F0
STM32F0xx
High-performance STM32F0 MCUs with Arm Cortex-M0 core, frequency up to 48 MHz.
Sequence("CheckID");
// Replication of Standard Functionality
Write32(0xE000EDF0, 0xA05F0001); // Enable Core Debug via DHCSR
// Device Specific Debug Setup
Write32(0x40021018, Read32(0x40021018) | 0x00400000); // Set RCC_APB2ENR.DBGMCUEN
Write32(0x40015804, DbgMCU_CR); // DBGMCU_CR: Configure MCU Debug
Write32(0x40015808, DbgMCU_APB1_Fz); // DBGMCU_APB1_FZ: Configure APB1 Peripheral Freeze Behavior
Write32(0x4001580C, DbgMCU_APB2_Fz); // DBGMCU_APB1_FZ: Configure APB2 Peripheral Freeze Behavior
__var pidr1 = 0;
__var pidr2 = 0;
__var jep106id = 0;
__var ROMTableBase = 0;
__ap = 0; // AHB-AP
ROMTableBase = ReadAP(0xF8) & ~0x3;
pidr1 = Read32(ROMTableBase + 0x0FE4);
pidr2 = Read32(ROMTableBase + 0x0FE8);
jep106id = ((pidr2 & 0x7) << 4 ) | ((pidr1 >> 4) & 0xF);
Query(0, "Not a genuine ST Device! Abort connection", 1);
Message(2, "Not a genuine ST Device! Abort connection.");
__var connectionFlash = ( __connection & 0xF ) == 2 ;
__var FLASH_BASE = 0x40022000 ;
__var FLASH_CR = FLASH_BASE + 0x10 ;
__var OBL_LAUNCH_BIT = ( 1 << 13 ) ;
__var FLASH_CR_Value = 0 ;
__var DoDebugPortStop = 1 ;
__var DP_CTRL_STAT = 0x4 ;
__var DP_SELECT = 0x8 ;
DoDebugPortStop = 0 ;
FLASH_CR_Value = Read32( FLASH_CR ) ;
__errorcontrol = 1 ;
// write OBL_LAUNCH bit (causes a reset)
Write32( FLASH_CR, FLASH_CR_Value | ( OBL_LAUNCH_BIT ) ) ;
__errorcontrol = 0 ;
// Switch to DP Register Bank 0
WriteDP(DP_SELECT, 0x00000000);
// Power Down Debug port
WriteDP(DP_CTRL_STAT, 0x00000000);
__var DbgMCU_CR = 0x00000006; // DBGMCU_CR: DBG_STOP, DBG_STANDBY
__var DbgMCU_APB1_Fz = 0x00201932; // DGBMCU_APB1_FZ: Configure APB1 peripheral freeze behavior
__var DbgMCU_APB2_Fz = 0x00070800; // DGBMCU_APB2_FZ: Configure APB2 peripheral freeze behavior
__var DoOptionByteLoading = 0; // Disabled
__var DbgMCU_CR = 0x00000006; // DBGMCU_CR: DBG_STOP, DBG_STANDBY
__var DbgMCU_APB1_Fz = 0x02201933; // DGBMCU_APB1_FZ: Configure APB1 peripheral freeze behavior
__var DbgMCU_APB2_Fz = 0x00070800; // DGBMCU_APB2_FZ: Configure APB2 peripheral freeze behavior
__var DoOptionByteLoading = 0; // Disabled
__var DbgMCU_CR = 0x00000006; // DBGMCU_CR: DBG_STOP, DBG_STANDBY
__var DbgMCU_APB1_Fz = 0x02201933; // DGBMCU_APB1_FZ: Configure APB1 peripheral freeze behavior
__var DbgMCU_APB2_Fz = 0x00070800; // DGBMCU_APB2_FZ: Configure APB2 peripheral freeze behavior
__var DoOptionByteLoading = 0; // Disabled
__var DbgMCU_CR = 0x00000006; // DBGMCU_CR: DBG_STOP, DBG_STANDBY
__var DbgMCU_APB1_Fz = 0x02201933; // DGBMCU_APB1_FZ: Configure APB1 peripheral freeze behavior
__var DbgMCU_APB2_Fz = 0x00070800; // DGBMCU_APB2_FZ: Configure APB2 peripheral freeze behavior
__var DoOptionByteLoading = 0; // Disabled
__var DbgMCU_CR = 0x00000006; // DBGMCU_CR: DBG_STOP, DBG_STANDBY
__var DbgMCU_APB1_Fz = 0x02201933; // DGBMCU_APB1_FZ: Configure APB1 peripheral freeze behavior
__var DbgMCU_APB2_Fz = 0x00070800; // DGBMCU_APB2_FZ: Configure APB2 peripheral freeze behavior
__var DoOptionByteLoading = 0; // Disabled
__var DbgMCU_CR = 0x00000006; // DBGMCU_CR: DBG_STOP, DBG_STANDBY
__var DbgMCU_APB1_Fz = 0x02201933; // DGBMCU_APB1_FZ: Configure APB1 peripheral freeze behavior
__var DbgMCU_APB2_Fz = 0x00070800; // DGBMCU_APB2_FZ: Configure APB2 peripheral freeze behavior
__var DoOptionByteLoading = 0; // Disabled
__var DbgMCU_CR = 0x00000006; // DBGMCU_CR: DBG_STOP, DBG_STANDBY
__var DbgMCU_APB1_Fz = 0x02201933; // DGBMCU_APB1_FZ: Configure APB1 peripheral freeze behavior
__var DbgMCU_APB2_Fz = 0x00070800; // DGBMCU_APB2_FZ: Configure APB2 peripheral freeze behavior
__var DoOptionByteLoading = 0; // Disabled
__var DbgMCU_CR = 0x00000006; // DBGMCU_CR: DBG_STOP, DBG_STANDBY
__var DbgMCU_APB1_Fz = 0x00201932; // DGBMCU_APB1_FZ: Configure APB1 peripheral freeze behavior
__var DbgMCU_APB2_Fz = 0x00070800; // DGBMCU_APB2_FZ: Configure APB2 peripheral freeze behavior
__var DoOptionByteLoading = 0; // Disabled
__var DbgMCU_CR = 0x00000006; // DBGMCU_CR: DBG_STOP, DBG_STANDBY
__var DbgMCU_APB1_Fz = 0x02201933; // DGBMCU_APB1_FZ: Configure APB1 peripheral freeze behavior
__var DbgMCU_APB2_Fz = 0x00070800; // DGBMCU_APB2_FZ: Configure APB2 peripheral freeze behavior
__var DoOptionByteLoading = 0; // Disabled
__var DbgMCU_CR = 0x00000006; // DBGMCU_CR: DBG_STOP, DBG_STANDBY
__var DbgMCU_APB1_Fz = 0x02201933; // DGBMCU_APB1_FZ: Configure APB1 peripheral freeze behavior
__var DbgMCU_APB2_Fz = 0x00070800; // DGBMCU_APB2_FZ: Configure APB2 peripheral freeze behavior
__var DoOptionByteLoading = 0; // Disabled
__var DbgMCU_CR = 0x00000006; // DBGMCU_CR: DBG_STOP, DBG_STANDBY
__var DbgMCU_APB1_Fz = 0x02201933; // DGBMCU_APB1_FZ: Configure APB1 peripheral freeze behavior
__var DbgMCU_APB2_Fz = 0x00070800; // DGBMCU_APB2_FZ: Configure APB2 peripheral freeze behavior
__var DoOptionByteLoading = 0; // Disabled
__var DbgMCU_CR = 0x00000006; // DBGMCU_CR: DBG_STOP, DBG_STANDBY
__var DbgMCU_APB1_Fz = 0x02201933; // DGBMCU_APB1_FZ: Configure APB1 peripheral freeze behavior
__var DbgMCU_APB2_Fz = 0x00070800; // DGBMCU_APB2_FZ: Configure APB2 peripheral freeze behavior
__var DoOptionByteLoading = 0; // Disabled
__var DbgMCU_CR = 0x00000006; // DBGMCU_CR: DBG_STOP, DBG_STANDBY
__var DbgMCU_APB1_Fz = 0x02201933; // DGBMCU_APB1_FZ: Configure APB1 peripheral freeze behavior
__var DbgMCU_APB2_Fz = 0x00070800; // DGBMCU_APB2_FZ: Configure APB2 peripheral freeze behavior
__var DoOptionByteLoading = 0; // Disabled
STMicroelectronics STM32F0 Series devices
STMicroelectronics STM32F0 Device and CMSIS-CORE
Configuration via STM32CubeMX
#define RTE_DEVICE_CUBE_MX
#define CMSIS_device_header "stm32f0xx.h"
Create a CubeMX basic solution with project