modm-io / cmsis-header-stm32 Goto Github PK
View Code? Open in Web Editor NEWCMSIS device headers for all STM32 devices
License: Apache License 2.0
CMSIS device headers for all STM32 devices
License: Apache License 2.0
ST recently published their entire CubeHAL code on GitHub and it would significantly improve reliablity of this code to checkout the code from that.
In the stm32f103xb header file.
FLASH_ACR_LATENCY_n macros are defined incorrectly, which will cause a system fault when clock is 72MHz.
You may have also made the same error in similar families of CM3, so I will leave that to you to check.
I only noticed this because I am using a bluepill board.
So from line 9687, you defined the following:
#define FLASH_ACR_LATENCY_0 (0x1UL << FLASH_ACR_LATENCY_Pos) /*!< 0x00000001 /
#define FLASH_ACR_LATENCY_1 (0x2UL << FLASH_ACR_LATENCY_Pos) /!< 0x00000002 /
#define FLASH_ACR_LATENCY_2 (0x4UL << FLASH_ACR_LATENCY_Pos) /!< 0x00000004 /
This is incorrect, and according to the reference manual RM0008 Rev 21, page 60, Flash access control register (FLASH_ACR),
It should be the following:
#define FLASH_ACR_LATENCY_0 (0x0UL << FLASH_ACR_LATENCY_Pos) /!< 0x00000000 /
#define FLASH_ACR_LATENCY_1 (0x1UL << FLASH_ACR_LATENCY_Pos) /!< 0x00000001 /
#define FLASH_ACR_LATENCY_2 (0x2UL << FLASH_ACR_LATENCY_Pos) /!< 0x00000002 */
You have done a very fine job, thank you for your efforts.
Cheers.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.