Giter VIP home page Giter VIP logo

cmsis_device_f4's Introduction

STM32CubeF4 CMSIS Device MCU Component

latest tag

Overview

STM32Cube is an STMicroelectronics original initiative to ease the developers life by reducing efforts, time and cost.

STM32Cube covers the overall STM32 products portfolio. It includes a comprehensive embedded software platform delivered for each STM32 series.

  • The CMSIS modules (core and device) corresponding to the ARM(tm) core implemented in this STM32 product.
  • The STM32 HAL-LL drivers, an abstraction layer offering a set of APIs ensuring maximized portability across the STM32 portfolio.
  • The BSP drivers of each evaluation, demonstration or nucleo board provided for this STM32 series.
  • A consistent set of middleware libraries such as RTOS, USB, FatFS, graphics, touch sensing library...
  • A full set of software projects (basic examples, applications, and demonstrations) for each board provided for this STM32 series.

Two models of publication are proposed for the STM32Cube embedded software:

  • The monolithic MCU Package: all STM32Cube software modules of one STM32 series are present (Drivers, Middleware, Projects, Utilities) in the repository (usual name STM32Cubexx, xx corresponding to the STM32 series).
  • The MCU component: each STM32Cube software module being part of the STM32Cube MCU Package, is delivered as an individual repository, allowing the user to select and get only the required software functions.

Description

This cmsis_device_f4 MCU component repo is one element of the STM32CubeF4 MCU embedded software package, providing the cmsis device part.

Release note

Details about the content of this release are available in the release note here.

Compatibility information

It is crucial that you use a consistent set of versions for the CMSIS Core - CMSIS Device, as mentioned in this release note.

The full STM32CubeF4 MCU package is available here.

Troubleshooting

If you have any issue with the Software content of this repo, you can file an issue on Github.

For any other question related to the product, the tools, the environment, you can submit a topic on the ST Community/STM32 MCUs forum.

cmsis_device_f4's People

Contributors

alabstm avatar aselstm avatar ccastm avatar rkoustm avatar tounstm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cmsis_device_f4's Issues

Missing GCC linker scripts

the startup .s files refer to symbols defined in the linker script, but where is the linker script(s)?

Using '__IOM' for peripheral register definitions

Additional context

Is there a specific reason to not use '__IO' for peripheral register definitions instead of '__IOM' as per guidelines for versions greater than v4.2?

typedef struct { __IO uint32_t SR; /*!< ADC status register, Address offset: 0x00 */ __IO uint32_t CR1; /*!< ADC control register 1, Address offset: 0x04 */ __IO uint32_t CR2; /*!< ADC control register 2, Address offset: 0x08 */ __IO uint32_t SMPR1; /*!< ADC sample time register 1, Address offset: 0x0C */ __IO uint32_t SMPR2; /*!< ADC sample time register 2, Address offset: 0x10 */ __IO uint32_t JOFR1; /*!< ADC injected channel data offset register 1, Address offset: 0x14 */ __IO uint32_t JOFR2; /*!< ADC injected channel data offset register 2, Address offset: 0x18 */ __IO uint32_t JOFR3; /*!< ADC injected channel data offset register 3, Address offset: 0x1C */ __IO uint32_t JOFR4; /*!< ADC injected channel data offset register 4, Address offset: 0x20 */ __IO uint32_t HTR; /*!< ADC watchdog higher threshold register, Address offset: 0x24 */ __IO uint32_t LTR; /*!< ADC watchdog lower threshold register, Address offset: 0x28 */ __IO uint32_t SQR1; /*!< ADC regular sequence register 1, Address offset: 0x2C */ __IO uint32_t SQR2; /*!< ADC regular sequence register 2, Address offset: 0x30 */ __IO uint32_t SQR3; /*!< ADC regular sequence register 3, Address offset: 0x34 */ __IO uint32_t JSQR; /*!< ADC injected sequence register, Address offset: 0x38*/ __IO uint32_t JDR1; /*!< ADC injected data register 1, Address offset: 0x3C */ __IO uint32_t JDR2; /*!< ADC injected data register 2, Address offset: 0x40 */ __IO uint32_t JDR3; /*!< ADC injected data register 3, Address offset: 0x44 */ __IO uint32_t JDR4; /*!< ADC injected data register 4, Address offset: 0x48 */ __IO uint32_t DR; /*!< ADC regular data register, Address offset: 0x4C */ } ADC_TypeDef;

https://developer.arm.com/documentation/ka002980/latest

Note:
Since CMSIS-Core V4.20 the macros __I, __O and __IO should only be used for scalar variables. For peripheral register definitions in structures, the macros __IM, __OM and __IOM should now be used. The definition __IM always contains the const type qualifier because C++ does not optimize struct-members to constants. This way, registers can be write-protected even in C++.

or https://github.com/ARM-software/CMSIS_5/blob/develop/CMSIS/Core/Include/core_cm4.h#L229
/* following defines should be used for structure members */ #define __IM volatile const /*! Defines 'read only' structure member permissions */ #define __OM volatile /*! Defines 'write only' structure member permissions */ #define __IOM volatile /*! Defines 'read / write' structure member permissions */

Typo in definition of __STM32F4xx_CMSIS_VERSION

The definition of __STM32F4xx_CMSIS_VERSION in stm32f4xx.h reads
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\ |(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\ |(__STM32F4xx_CMSIS_VERSION_SUB2 << 8 )\ |(__STM32F4xx_CMSIS_VERSION))
resulting in a compilation error when used. It should instead read
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\ |(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\ |(__STM32F4xx_CMSIS_VERSION_SUB2 << 8 )\ |(__STM32F4xx_CMSIS_VERSION_RC))

Wrong value for GPIO_MODER_MODE8_Msk in all headers

Describe the bug
All headers for F4 board have this

#define GPIO_MODER_MODE8_Msk             GPIO_MODER_MODER2_Msk

Changing 8 to 2 seems odd.
All surrounding lines have consistent numbering so it would make more sense to change it to

#define GPIO_MODER_MODE8_Msk             GPIO_MODER_MODER8_Msk

Wrong value for FLASH_ACR_LATENCY_Msk in stm32f407xx.h

Describe the bug

#define FLASH_ACR_LATENCY_Msk (0xFUL << FLASH_ACR_LATENCY_Pos) /*!< 0x0000000F */

there are only 3 bits

#define FLASH_ACR_LATENCY_Msk (0x7UL << FLASH_ACR_LATENCY_Pos) /*!< 0x00000007 */

maybe it's not critical but misleading

inconsistent naming of macros accross families

It seems that the GPIO peripheral is largely the same for all but the STM32F1 family. Still, macros that seem to refer to the exact same thing are named inconsistently, e.g.:

  • GPIO_OSPEEDER_OSPEED0: STM32L0
  • GPIO_OSPEEDER_OSPEEDR0: STM32F0, STM32F2, STM32F3, STM32F4, STM32F7, STM32G4, STM32L1, STM32L4
  • GPIO_OSPEEDR_OSPEED0: STM32F2, STM32F4, STM32G0, STM32G4, STM32L4, STM32L5, STM32U5, STM32WB, STM32WL
  • GPIO_OSPEEDR_OSPEEDR0: STM32F0, STM32F7

Are there any plans to at least provide aliases (e.g. #define GPIO_OSPEEDR_OSPEED0 GPIO_OSPEEDER_OSPEEDR0) so that there is one canonical name for each macro that works across families?

stm32f412cx: lack of MCO2 bits definition

According to RM0402, all STM32F412 chips can configure MCO2 in RCC_CFGR register.

The stm32f412cx.h header doesn't have the definition of MCO2 bits. I guess it is done this way because all stm32f412cx chips are in UFQFPN48 package, which doesn't have PC9 pin (MCO2 pin).

The problem is that changing the MCO2 source clock(to a clock that is disabled) reduces power consumption.

Wouldn't it make sense to define the MCO2 bits for all STM32F412 bit despite the fact the PC9 pin is not present?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.