Release v2.6.12
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 71b0c5a..0000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null
@@ -1,37 +0,0 @@ ---- -name: 'Issue report' -about: 'Create a report to help us improve the quality of our software' -title: '' -labels: '' -assignees: '' ---- - -**Caution** - -The Issues are strictly limited for the reporting of problem encountered with the software provided in this project. -For any other problem related to the STM32 product, the performance, the hardware characteristics and boards, the tools the environment in general, please post your report to the **ST Community** in the STM32 MCUs dedicated [page](https://community.st.com/s/topic/0TO0X000000BSqSWAW/stm32-mcus). - -**Describe the set-up** - - * The board (either ST RPN reference or your custom board) - * IDE or at least the compiler and its version - -**Describe the bug (skip if none)** - -A clear and concise description of what the bug is. - -**How to reproduce the bug (skip if none)** - -1. Indicate the global behavior of your application project -2. List the modules that you suspect to be the cause of the problem (Drivers, BSP, MW...) -3. Describe the use case that generates the problem -4. How we can reproduce the problem - - -**Additional context** - -If you have a first analysis, an enhancement, a fix or a patch, thank you to share your proposal. - -**Screenshots** - -If applicable, add screenshots to help explain your problem.
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..7960c73 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -0,0 +1,51 @@ +name: "\U0001F41B Bug Report" +description: Report a bug in the project +title: "[Bug]: " +labels: [bug] +body: + - type: markdown + attributes: + value: | + Thanks for helping us improve the quality of our software! Please provide as much detail as possible. + - type: input + id: bug_summary + attributes: + label: Bug Summary + description: Briefly describe the bug. + placeholder: "The application crashes when..." + validations: + required: true + - type: textarea + id: bug_details + attributes: + label: Detailed Description + description: Provide a detailed description of the bug, including steps to reproduce it. + validations: + required: true + - type: input + id: expected-behavior + attributes: + label: Expected Behavior + description: A clear and concise description of what you expected to happen. + placeholder: Describe the expected behavior + - type: input + id: actual-behavior + attributes: + label: Actual Behavior + description: A clear and concise description of what actually happens. + placeholder: Describe what actually happened + - type: input + id: environment + attributes: + label: Environment + description: Describe the environment in which the bug occurs (e.g., board, compiler, IDE, version). + - type: dropdown + id: severity + attributes: + label: Severity + description: How severe is the bug? + options: + - Critical + - Major + - Normal + - Minor \ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..bdb8119 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: "\U0001F6E1 Report a security vulnerability" + about: Please refer to the SECURITY.md file for instructions. + url: ./../../SECURITY.md + - name: "\U0001F6F1 Request support" + about: You can reach out to the ST Community. + url: https://community.st.com/s/topiccatalog \ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..fa02ce5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -0,0 +1,29 @@ +name: "\U0001F4A1 Feature Request" +description: Suggest a new feature or enhancement +title: "[Feature]: " +labels: [enhancement] +body: + - type: markdown + attributes: + value: | + We appreciate your interest in improving the quality of our software! Please provide details about the feature. + - type: input + id: feature_summary + attributes: + label: Feature Summary + description: Briefly describe the feature or enhancement. + placeholder: "Add support for..." + validations: + required: true + - type: textarea + id: feature_details + attributes: + label: Detailed Description + description: Provide a detailed description of the feature, including potential benefits. + validations: + required: true + - type: input + id: use_case + attributes: + label: Use Case + description: Describe how this feature will be used and who will benefit from it. \ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/question.yml b/.github/ISSUE_TEMPLATE/question.yml new file mode 100644 index 0000000..09f8e02 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.yml
@@ -0,0 +1,24 @@ +name: "\U0001F4AC Question" +description: Ask a question about the project +title: "[Question]: " +labels: [question] +body: + - type: markdown + attributes: + value: | + Have a question? We're here to help! Please provide details about your inquiry. + - type: input + id: question_summary + attributes: + label: Question Summary + description: Briefly describe your question. + placeholder: "How do I..." + validations: + required: true + - type: textarea + id: question_details + attributes: + label: Detailed Description + description: Provide a detailed description of your question, including any relevant context. + validations: + required: true \ No newline at end of file
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 6001c76..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null
@@ -1,5 +0,0 @@ -## IMPORTANT INFORMATION - -### Contributor License Agreement (CLA) -* The Pull Request feature will be considered by STMicroelectronics after the signature of a **Contributor License Agreement (CLA)** by the submitter. -* If you did not sign such agreement, please follow the steps mentioned in the [CONTRIBUTING.md](https://github.com/STMicroelectronics/cmsis_device_f4/blob/master/CONTRIBUTING.md) file.
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 4452e08..bf0ca35 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md
@@ -55,8 +55,8 @@ ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at https://www.st.com/content/st_com/en/contact-us.html. All -complaints will be reviewed and investigated and will result in a response that +reported by contacting the project team via this [link](https://www.st.com/content/st_com/en/contact-us.html). +All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. @@ -67,9 +67,7 @@ ## Attribution -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 1.4, available [here](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html). -[homepage]: https://www.contributor-covenant.org - For answers to common questions about this code of conduct, refer to the FAQ section [here](https://www.contributor-covenant.org/faq).
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ee37310..f0d0cbb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md
@@ -1,31 +1,46 @@ -## Contributing guide -This document serves as a checklist before contributing to this repository. -It includes links to read up on if topics are unclear to you. +# Contributing guide -This guide mainly focuses on the proper use of Git. +This guide mainly focuses on the steps to follow to submit an issue or a pull request. -### 1. Before opening an issue -Please check the following boxes before posting an issue: -- [ ] `Make sure you are using the latest commit (major releases are Tagged, but corrections are available as new commits).` -- [ ] `Make sure your issue is a question/feedback/suggestions RELATED TO the software provided in this repository.` Otherwise, it should be discussed on the [ST Community/STM32 MCUs forum](https://community.st.com/s/topic/0TO0X000000BSqSWAW/stm32-mcus). -- [ ] `Make sure your issue is not already reported/fixed on GitHub or discussed on a previous issue.` Please refer to this [dashboard](https://github.com/orgs/STMicroelectronics/projects/2) for the list of issues and pull-requests. Do not forget to browse into the **closed** issues. +## 1. Issues -### 2. Posting the issue -When you have checked the previous boxes. You will find two templates (Bug Report or Other Issue) available in the **Issues** tab of this repository. +### 1.1 Before opening an issue -### 3. Pull Requests +Before posting an issue, please ensure: +* You are using the latest commit. +* Your issue is **not** a vulnerability. Otherwise, please refer to section [3](CONTRIBUTING.md#3-vulnerabilities) below. +* Your issue is **related to** the software provided in this repository. Otherwise, please refer to section [4](CONTRIBUTING.md#4-support-requests-and-miscellaneous) below. +* Your issue is not already reported, fixed or discussed in a previous one. Remember to browse the **closed** issues. + +### 1.2 Posting the issue + +When you have checked the previous points, create a new report from the **Issues** tab of this repository. A couple of templates are available [here](../../issues/new/choose). + +## 2. Pull Requests + +### 2.1 Before opening a pull request + STMicrolectronics is happy to receive contributions from the community, based on an initial Contributor License Agreement (CLA) procedure. -* If you are an individual writing original source code and you are sure **you own the intellectual property**, then you need to sign an Individual [CLA](https://cla.st.com). -* If you work for a company that wants also to allow you to contribute with your work, your company needs to provide a Corporate [CLA](https://cla.st.com) mentioning your GitHub account name. -* If you are not sure that a CLA (Individual or Corporate) has been signed for your GitHub account you can check [here](https://cla.st.com). +* If you are an individual writing original source code and you are sure **you own the intellectual property**, then you need to sign an **Individual** [CLA](https://cla.st.com). +* If you work for a company that wants also to allow you to contribute with your work, your company needs to provide a **Corporate** [CLA](https://cla.st.com) mentioning your GitHub account name. +* If you are not sure that a CLA (Individual or Corporate) has been signed for your GitHub account you can check the [CLA](https://cla.st.com) dedicated page. -Please note that: -* The Corporate CLA will always take precedence over the Individual CLA. -* One CLA submission is sufficient, for any project proposed by STMicroelectronics. +> [!IMPORTANT] +> Please note that: +> * The Corporate CLA will always take precedence over the Individual CLA. +> * One CLA submission is sufficient, for any project proposed by STMicroelectronics. -#### How to proceed +### 2.2 How to proceed -* We recommend to engage first a communication thru an issue, in order to present your proposal. Just to confirm that it corresponds to STMicroelectronics domain or scope. +* We recommend to engage first a communication thru an issue, in order to present your proposal, just to confirm that it corresponds to STMicroelectronics' domain or scope. * Then fork the project to your GitHub account to further develop your contribution. Please use the latest commit version. -* Please, submit one Pull Request for one new feature or proposal. This will ease the analysis and the final merge if accepted. +* Please, submit one pull request per new feature or proposal. This will ease the analysis and the final merge if accepted. + +## 3. Vulnerabilities + +To report a **vulnerability**, please refer to the [SECURITY.md](./SECURITY.md) file for instructions. + +## 4. Support requests and miscellaneous + +For support requests or any other topics not related to the content of this repository, you can submit a post to the **ST Community** on the appropriate topic [page](https://community.st.com/s/topiccatalog).
diff --git a/Include/stm32f401xc.h b/Include/stm32f401xc.h index 5d7a281..dab21fb 100644 --- a/Include/stm32f401xc.h +++ b/Include/stm32f401xc.h
@@ -639,6 +639,9 @@ #define PERIPH_BB_BASE 0x42000000UL /*!< Peripheral base address in the bit-band region */ #define BKPSRAM_BB_BASE 0x42480000UL /*!< Backup SRAM(4 KB) base address in the bit-band region */ #define FLASH_END 0x0803FFFFUL /*!< FLASH end address */ +#define FLASH_SIZE ((((*((uint16_t *)FLASHSIZE_BASE)) == 0xFFFFU)) ? 0x40000U : \ + ((((*((uint16_t *)FLASHSIZE_BASE)) == 0x0000U)) ? 0x40000U : \ + (((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0xFFFFU)) << 10U))) #define FLASH_OTP_BASE 0x1FFF7800UL /*!< Base address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define FLASH_OTP_END 0x1FFF7A0FUL /*!< End address of : (up to 528 Bytes) embedded FLASH OTP Area */
diff --git a/Include/stm32f401xe.h b/Include/stm32f401xe.h index a70d8d0..32eee1b 100644 --- a/Include/stm32f401xe.h +++ b/Include/stm32f401xe.h
@@ -639,6 +639,9 @@ #define PERIPH_BB_BASE 0x42000000UL /*!< Peripheral base address in the bit-band region */ #define BKPSRAM_BB_BASE 0x42480000UL /*!< Backup SRAM(4 KB) base address in the bit-band region */ #define FLASH_END 0x0807FFFFUL /*!< FLASH end address */ +#define FLASH_SIZE ((((*((uint16_t *)FLASHSIZE_BASE)) == 0xFFFFU)) ? 0x80000U : \ + ((((*((uint16_t *)FLASHSIZE_BASE)) == 0x0000U)) ? 0x80000U : \ + (((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0xFFFFU)) << 10U))) #define FLASH_OTP_BASE 0x1FFF7800UL /*!< Base address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define FLASH_OTP_END 0x1FFF7A0FUL /*!< End address of : (up to 528 Bytes) embedded FLASH OTP Area */
diff --git a/Include/stm32f405xx.h b/Include/stm32f405xx.h index 5af918e..da60f00 100644 --- a/Include/stm32f405xx.h +++ b/Include/stm32f405xx.h
@@ -819,6 +819,9 @@ #define PERIPH_BB_BASE 0x42000000UL /*!< Peripheral base address in the bit-band region */ #define BKPSRAM_BB_BASE 0x42480000UL /*!< Backup SRAM(4 KB) base address in the bit-band region */ #define FLASH_END 0x080FFFFFUL /*!< FLASH end address */ +#define FLASH_SIZE ((((*((uint16_t *)FLASHSIZE_BASE)) == 0xFFFFU)) ? 0x100000U : \ + ((((*((uint16_t *)FLASHSIZE_BASE)) == 0x0000U)) ? 0x100000U : \ + (((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0xFFFFU)) << 10U))) #define FLASH_OTP_BASE 0x1FFF7800UL /*!< Base address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define FLASH_OTP_END 0x1FFF7A0FUL /*!< End address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define CCMDATARAM_END 0x1000FFFFUL /*!< CCM data RAM end address */
diff --git a/Include/stm32f407xx.h b/Include/stm32f407xx.h index 3ff0e67..9fb5560 100644 --- a/Include/stm32f407xx.h +++ b/Include/stm32f407xx.h
@@ -915,6 +915,9 @@ #define PERIPH_BB_BASE 0x42000000UL /*!< Peripheral base address in the bit-band region */ #define BKPSRAM_BB_BASE 0x42480000UL /*!< Backup SRAM(4 KB) base address in the bit-band region */ #define FLASH_END 0x080FFFFFUL /*!< FLASH end address */ +#define FLASH_SIZE ((((*((uint16_t *)FLASHSIZE_BASE)) == 0xFFFFU)) ? 0x100000U : \ + ((((*((uint16_t *)FLASHSIZE_BASE)) == 0x0000U)) ? 0x100000U : \ + (((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0xFFFFU)) << 10U))) #define FLASH_OTP_BASE 0x1FFF7800UL /*!< Base address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define FLASH_OTP_END 0x1FFF7A0FUL /*!< End address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define CCMDATARAM_END 0x1000FFFFUL /*!< CCM data RAM end address */
diff --git a/Include/stm32f410cx.h b/Include/stm32f410cx.h index 3d81470..9a902e9 100644 --- a/Include/stm32f410cx.h +++ b/Include/stm32f410cx.h
@@ -564,6 +564,9 @@ #define SRAM1_BB_BASE 0x22000000UL /*!< SRAM1(32 KB) base address in the bit-band region */ #define PERIPH_BB_BASE 0x42000000UL /*!< Peripheral base address in the bit-band region */ #define FLASH_END 0x0801FFFFUL /*!< FLASH end address */ +#define FLASH_SIZE ((((*((uint16_t *)FLASHSIZE_BASE)) == 0xFFFFU)) ? 0x20000U : \ + ((((*((uint16_t *)FLASHSIZE_BASE)) == 0x0000U)) ? 0x20000U : \ + (((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0xFFFFU)) << 10U))) #define FLASH_OTP_BASE 0x1FFF7800UL /*!< Base address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define FLASH_OTP_END 0x1FFF7A0FUL /*!< End address of : (up to 528 Bytes) embedded FLASH OTP Area */
diff --git a/Include/stm32f410rx.h b/Include/stm32f410rx.h index b7789a7..aec6510 100644 --- a/Include/stm32f410rx.h +++ b/Include/stm32f410rx.h
@@ -564,6 +564,9 @@ #define SRAM1_BB_BASE 0x22000000UL /*!< SRAM1(32 KB) base address in the bit-band region */ #define PERIPH_BB_BASE 0x42000000UL /*!< Peripheral base address in the bit-band region */ #define FLASH_END 0x0801FFFFUL /*!< FLASH end address */ +#define FLASH_SIZE ((((*((uint16_t *)FLASHSIZE_BASE)) == 0xFFFFU)) ? 0x20000U : \ + ((((*((uint16_t *)FLASHSIZE_BASE)) == 0x0000U)) ? 0x20000U : \ + (((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0xFFFFU)) << 10U))) #define FLASH_OTP_BASE 0x1FFF7800UL /*!< Base address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define FLASH_OTP_END 0x1FFF7A0FUL /*!< End address of : (up to 528 Bytes) embedded FLASH OTP Area */
diff --git a/Include/stm32f410tx.h b/Include/stm32f410tx.h index b1aa48e..ddab714 100644 --- a/Include/stm32f410tx.h +++ b/Include/stm32f410tx.h
@@ -561,6 +561,9 @@ #define SRAM1_BB_BASE 0x22000000UL /*!< SRAM1(32 KB) base address in the bit-band region */ #define PERIPH_BB_BASE 0x42000000UL /*!< Peripheral base address in the bit-band region */ #define FLASH_END 0x0801FFFFUL /*!< FLASH end address */ +#define FLASH_SIZE ((((*((uint16_t *)FLASHSIZE_BASE)) == 0xFFFFU)) ? 0x20000U : \ + ((((*((uint16_t *)FLASHSIZE_BASE)) == 0x0000U)) ? 0x20000U : \ + (((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0xFFFFU)) << 10U))) #define FLASH_OTP_BASE 0x1FFF7800UL /*!< Base address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define FLASH_OTP_END 0x1FFF7A0FUL /*!< End address of : (up to 528 Bytes) embedded FLASH OTP Area */
diff --git a/Include/stm32f411xe.h b/Include/stm32f411xe.h index 03c36a1..9a68606 100644 --- a/Include/stm32f411xe.h +++ b/Include/stm32f411xe.h
@@ -640,6 +640,9 @@ #define PERIPH_BB_BASE 0x42000000UL /*!< Peripheral base address in the bit-band region */ #define BKPSRAM_BB_BASE 0x42480000UL /*!< Backup SRAM(4 KB) base address in the bit-band region */ #define FLASH_END 0x0807FFFFUL /*!< FLASH end address */ +#define FLASH_SIZE ((((*((uint16_t *)FLASHSIZE_BASE)) == 0xFFFFU)) ? 0x80000U : \ + ((((*((uint16_t *)FLASHSIZE_BASE)) == 0x0000U)) ? 0x80000U : \ + (((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0xFFFFU)) << 10U))) #define FLASH_OTP_BASE 0x1FFF7800UL /*!< Base address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define FLASH_OTP_END 0x1FFF7A0FUL /*!< End address of : (up to 528 Bytes) embedded FLASH OTP Area */
diff --git a/Include/stm32f412cx.h b/Include/stm32f412cx.h index 5be3e10..62f9206 100644 --- a/Include/stm32f412cx.h +++ b/Include/stm32f412cx.h
@@ -797,6 +797,9 @@ #define SRAM1_BB_BASE 0x22000000UL /*!< SRAM1(256 KB) base address in the bit-band region */ #define PERIPH_BB_BASE 0x42000000UL /*!< Peripheral base address in the bit-band region */ #define FLASH_END 0x080FFFFFUL /*!< FLASH end address */ +#define FLASH_SIZE ((((*((uint16_t *)FLASHSIZE_BASE)) == 0xFFFFU)) ? 0x100000U : \ + ((((*((uint16_t *)FLASHSIZE_BASE)) == 0x0000U)) ? 0x100000U : \ + (((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0xFFFFU)) << 10U))) #define FLASH_OTP_BASE 0x1FFF7800UL /*!< Base address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define FLASH_OTP_END 0x1FFF7A0FUL /*!< End address of : (up to 528 Bytes) embedded FLASH OTP Area */
diff --git a/Include/stm32f412rx.h b/Include/stm32f412rx.h index 47bb6ca..a48e1fe 100644 --- a/Include/stm32f412rx.h +++ b/Include/stm32f412rx.h
@@ -842,6 +842,9 @@ #define SRAM1_BB_BASE 0x22000000UL /*!< SRAM1(256 KB) base address in the bit-band region */ #define PERIPH_BB_BASE 0x42000000UL /*!< Peripheral base address in the bit-band region */ #define FLASH_END 0x080FFFFFUL /*!< FLASH end address */ +#define FLASH_SIZE ((((*((uint16_t *)FLASHSIZE_BASE)) == 0xFFFFU)) ? 0x100000U : \ + ((((*((uint16_t *)FLASHSIZE_BASE)) == 0x0000U)) ? 0x100000U : \ + (((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0xFFFFU)) << 10U))) #define FLASH_OTP_BASE 0x1FFF7800UL /*!< Base address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define FLASH_OTP_END 0x1FFF7A0FUL /*!< End address of : (up to 528 Bytes) embedded FLASH OTP Area */
diff --git a/Include/stm32f412vx.h b/Include/stm32f412vx.h index 5b9324e..7640225 100644 --- a/Include/stm32f412vx.h +++ b/Include/stm32f412vx.h
@@ -842,6 +842,9 @@ #define SRAM1_BB_BASE 0x22000000UL /*!< SRAM1(256 KB) base address in the bit-band region */ #define PERIPH_BB_BASE 0x42000000UL /*!< Peripheral base address in the bit-band region */ #define FLASH_END 0x080FFFFFUL /*!< FLASH end address */ +#define FLASH_SIZE ((((*((uint16_t *)FLASHSIZE_BASE)) == 0xFFFFU)) ? 0x100000U : \ + ((((*((uint16_t *)FLASHSIZE_BASE)) == 0x0000U)) ? 0x100000U : \ + (((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0xFFFFU)) << 10U))) #define FLASH_OTP_BASE 0x1FFF7800UL /*!< Base address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define FLASH_OTP_END 0x1FFF7A0FUL /*!< End address of : (up to 528 Bytes) embedded FLASH OTP Area */
diff --git a/Include/stm32f412zx.h b/Include/stm32f412zx.h index 55e2750..0254580 100644 --- a/Include/stm32f412zx.h +++ b/Include/stm32f412zx.h
@@ -842,6 +842,9 @@ #define SRAM1_BB_BASE 0x22000000UL /*!< SRAM1(256 KB) base address in the bit-band region */ #define PERIPH_BB_BASE 0x42000000UL /*!< Peripheral base address in the bit-band region */ #define FLASH_END 0x080FFFFFUL /*!< FLASH end address */ +#define FLASH_SIZE ((((*((uint16_t *)FLASHSIZE_BASE)) == 0xFFFFU)) ? 0x100000U : \ + ((((*((uint16_t *)FLASHSIZE_BASE)) == 0x0000U)) ? 0x100000U : \ + (((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0xFFFFU)) << 10U))) #define FLASH_OTP_BASE 0x1FFF7800UL /*!< Base address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define FLASH_OTP_END 0x1FFF7A0FUL /*!< End address of : (up to 528 Bytes) embedded FLASH OTP Area */
diff --git a/Include/stm32f413xx.h b/Include/stm32f413xx.h index a479651..00e3d5e 100644 --- a/Include/stm32f413xx.h +++ b/Include/stm32f413xx.h
@@ -921,6 +921,9 @@ #define SRAM2_BB_BASE 0x22800000UL /*!< SRAM2(64 KB) base address in the bit-band region */ #define PERIPH_BB_BASE 0x42000000UL /*!< Peripheral base address in the bit-band region */ #define FLASH_END 0x0817FFFFUL /*!< FLASH end address */ +#define FLASH_SIZE ((((*((uint16_t *)FLASHSIZE_BASE)) == 0xFFFFU)) ? 0x180000U : \ + ((((*((uint16_t *)FLASHSIZE_BASE)) == 0x0000U)) ? 0x180000U : \ + (((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0xFFFFU)) << 10U))) #define FLASH_OTP_BASE 0x1FFF7800UL /*!< Base address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define FLASH_OTP_END 0x1FFF7A0FUL /*!< End address of : (up to 528 Bytes) embedded FLASH OTP Area */
diff --git a/Include/stm32f415xx.h b/Include/stm32f415xx.h index 290333e..5a51fba 100644 --- a/Include/stm32f415xx.h +++ b/Include/stm32f415xx.h
@@ -887,6 +887,9 @@ #define PERIPH_BB_BASE 0x42000000UL /*!< Peripheral base address in the bit-band region */ #define BKPSRAM_BB_BASE 0x42480000UL /*!< Backup SRAM(4 KB) base address in the bit-band region */ #define FLASH_END 0x080FFFFFUL /*!< FLASH end address */ +#define FLASH_SIZE ((((*((uint16_t *)FLASHSIZE_BASE)) == 0xFFFFU)) ? 0x100000U : \ + ((((*((uint16_t *)FLASHSIZE_BASE)) == 0x0000U)) ? 0x100000U : \ + (((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0xFFFFU)) << 10U))) #define FLASH_OTP_BASE 0x1FFF7800UL /*!< Base address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define FLASH_OTP_END 0x1FFF7A0FUL /*!< End address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define CCMDATARAM_END 0x1000FFFFUL /*!< CCM data RAM end address */
diff --git a/Include/stm32f417xx.h b/Include/stm32f417xx.h index 8070271..25909cd 100644 --- a/Include/stm32f417xx.h +++ b/Include/stm32f417xx.h
@@ -983,6 +983,9 @@ #define PERIPH_BB_BASE 0x42000000UL /*!< Peripheral base address in the bit-band region */ #define BKPSRAM_BB_BASE 0x42480000UL /*!< Backup SRAM(4 KB) base address in the bit-band region */ #define FLASH_END 0x080FFFFFUL /*!< FLASH end address */ +#define FLASH_SIZE ((((*((uint16_t *)FLASHSIZE_BASE)) == 0xFFFFU)) ? 0x100000U : \ + ((((*((uint16_t *)FLASHSIZE_BASE)) == 0x0000U)) ? 0x100000U : \ + (((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0xFFFFU)) << 10U))) #define FLASH_OTP_BASE 0x1FFF7800UL /*!< Base address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define FLASH_OTP_END 0x1FFF7A0FUL /*!< End address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define CCMDATARAM_END 0x1000FFFFUL /*!< CCM data RAM end address */
diff --git a/Include/stm32f423xx.h b/Include/stm32f423xx.h index 08ab7c5..582b5ab 100644 --- a/Include/stm32f423xx.h +++ b/Include/stm32f423xx.h
@@ -955,6 +955,9 @@ #define SRAM2_BB_BASE 0x22800000UL /*!< SRAM2(64 KB) base address in the bit-band region */ #define PERIPH_BB_BASE 0x42000000UL /*!< Peripheral base address in the bit-band region */ #define FLASH_END 0x0817FFFFUL /*!< FLASH end address */ +#define FLASH_SIZE ((((*((uint16_t *)FLASHSIZE_BASE)) == 0xFFFFU)) ? 0x180000U : \ + ((((*((uint16_t *)FLASHSIZE_BASE)) == 0x0000U)) ? 0x180000U : \ + (((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0xFFFFU)) << 10U))) #define FLASH_OTP_BASE 0x1FFF7800UL /*!< Base address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define FLASH_OTP_END 0x1FFF7A0FUL /*!< End address of : (up to 528 Bytes) embedded FLASH OTP Area */
diff --git a/Include/stm32f427xx.h b/Include/stm32f427xx.h index 801b1b0..86b0b48 100644 --- a/Include/stm32f427xx.h +++ b/Include/stm32f427xx.h
@@ -984,7 +984,10 @@ #define SRAM2_BB_BASE 0x22380000UL /*!< SRAM2(16 KB) base address in the bit-band region */ #define PERIPH_BB_BASE 0x42000000UL /*!< Peripheral base address in the bit-band region */ #define BKPSRAM_BB_BASE 0x42480000UL /*!< Backup SRAM(4 KB) base address in the bit-band region */ -#define FLASH_END 0x081FFFFFUL /*!< FLASH end address */ +#define FLASH_END 0x081FFFFFUL /*!< FLASH end address */ +#define FLASH_SIZE ((((*((uint16_t *)FLASHSIZE_BASE)) == 0xFFFFU)) ? 0x200000U : \ + ((((*((uint16_t *)FLASHSIZE_BASE)) == 0x0000U)) ? 0x200000U : \ + (((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0xFFFFU)) << 10U))) #define FLASH_OTP_BASE 0x1FFF7800UL /*!< Base address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define FLASH_OTP_END 0x1FFF7A0FUL /*!< End address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define CCMDATARAM_END 0x1000FFFFUL /*!< CCM data RAM end address */
diff --git a/Include/stm32f429xx.h b/Include/stm32f429xx.h index 064cfe1..703e7a2 100644 --- a/Include/stm32f429xx.h +++ b/Include/stm32f429xx.h
@@ -1034,7 +1034,10 @@ #define SRAM3_BB_BASE 0x22400000UL /*!< SRAM3(64 KB) base address in the bit-band region */ #define PERIPH_BB_BASE 0x42000000UL /*!< Peripheral base address in the bit-band region */ #define BKPSRAM_BB_BASE 0x42480000UL /*!< Backup SRAM(4 KB) base address in the bit-band region */ -#define FLASH_END 0x081FFFFFUL /*!< FLASH end address */ +#define FLASH_END 0x081FFFFFUL /*!< FLASH end address */ +#define FLASH_SIZE ((((*((uint16_t *)FLASHSIZE_BASE)) == 0xFFFFU)) ? 0x200000U : \ + ((((*((uint16_t *)FLASHSIZE_BASE)) == 0x0000U)) ? 0x200000U : \ + (((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0xFFFFU)) << 10U))) #define FLASH_OTP_BASE 0x1FFF7800UL /*!< Base address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define FLASH_OTP_END 0x1FFF7A0FUL /*!< End address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define CCMDATARAM_END 0x1000FFFFUL /*!< CCM data RAM end address */
diff --git a/Include/stm32f437xx.h b/Include/stm32f437xx.h index fda343d..5576364 100644 --- a/Include/stm32f437xx.h +++ b/Include/stm32f437xx.h
@@ -1056,7 +1056,10 @@ #define SRAM3_BB_BASE 0x22400000UL /*!< SRAM3(64 KB) base address in the bit-band region */ #define PERIPH_BB_BASE 0x42000000UL /*!< Peripheral base address in the bit-band region */ #define BKPSRAM_BB_BASE 0x42480000UL /*!< Backup SRAM(4 KB) base address in the bit-band region */ -#define FLASH_END 0x081FFFFFUL /*!< FLASH end address */ +#define FLASH_END 0x081FFFFFUL /*!< FLASH end address */ +#define FLASH_SIZE ((((*((uint16_t *)FLASHSIZE_BASE)) == 0xFFFFU)) ? 0x200000U : \ + ((((*((uint16_t *)FLASHSIZE_BASE)) == 0x0000U)) ? 0x200000U : \ + (((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0xFFFFU)) << 10U))) #define FLASH_OTP_BASE 0x1FFF7800UL /*!< Base address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define FLASH_OTP_END 0x1FFF7A0FUL /*!< End address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define CCMDATARAM_END 0x1000FFFFUL /*!< CCM data RAM end address */
diff --git a/Include/stm32f439xx.h b/Include/stm32f439xx.h index 57cf0c5..745add1 100644 --- a/Include/stm32f439xx.h +++ b/Include/stm32f439xx.h
@@ -1104,7 +1104,10 @@ #define SRAM3_BB_BASE 0x22400000UL /*!< SRAM3(64 KB) base address in the bit-band region */ #define PERIPH_BB_BASE 0x42000000UL /*!< Peripheral base address in the bit-band region */ #define BKPSRAM_BB_BASE 0x42480000UL /*!< Backup SRAM(4 KB) base address in the bit-band region */ -#define FLASH_END 0x081FFFFFUL /*!< FLASH end address */ +#define FLASH_END 0x081FFFFFUL /*!< FLASH end address */ +#define FLASH_SIZE ((((*((uint16_t *)FLASHSIZE_BASE)) == 0xFFFFU)) ? 0x200000U : \ + ((((*((uint16_t *)FLASHSIZE_BASE)) == 0x0000U)) ? 0x200000U : \ + (((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0xFFFFU)) << 10U))) #define FLASH_OTP_BASE 0x1FFF7800UL /*!< Base address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define FLASH_OTP_END 0x1FFF7A0FUL /*!< End address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define CCMDATARAM_END 0x1000FFFFUL /*!< CCM data RAM end address */
diff --git a/Include/stm32f446xx.h b/Include/stm32f446xx.h index 18c0e09..ea8414c 100644 --- a/Include/stm32f446xx.h +++ b/Include/stm32f446xx.h
@@ -926,6 +926,9 @@ #define PERIPH_BB_BASE 0x42000000UL /*!< Peripheral base address in the bit-band region */ #define BKPSRAM_BB_BASE 0x42480000UL /*!< Backup SRAM(4 KB) base address in the bit-band region */ #define FLASH_END 0x0807FFFFUL /*!< FLASH end address */ +#define FLASH_SIZE ((((*((uint16_t *)FLASHSIZE_BASE)) == 0xFFFFU)) ? 0x80000U : \ + ((((*((uint16_t *)FLASHSIZE_BASE)) == 0x0000U)) ? 0x80000U : \ + (((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0xFFFFU)) << 10U))) #define FLASH_OTP_BASE 0x1FFF7800UL /*!< Base address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define FLASH_OTP_END 0x1FFF7A0FUL /*!< End address of : (up to 528 Bytes) embedded FLASH OTP Area */
diff --git a/Include/stm32f469xx.h b/Include/stm32f469xx.h index 001e853..5b290a9 100644 --- a/Include/stm32f469xx.h +++ b/Include/stm32f469xx.h
@@ -1124,7 +1124,10 @@ #define SRAM3_BB_BASE 0x22600000UL /*!< SRAM3(64 KB) base address in the bit-band region */ #define PERIPH_BB_BASE 0x42000000UL /*!< Peripheral base address in the bit-band region */ #define BKPSRAM_BB_BASE 0x42480000UL /*!< Backup SRAM(4 KB) base address in the bit-band region */ -#define FLASH_END 0x081FFFFFUL /*!< FLASH end address */ +#define FLASH_END 0x081FFFFFUL /*!< FLASH end address */ +#define FLASH_SIZE ((((*((uint16_t *)FLASHSIZE_BASE)) == 0xFFFFU)) ? 0x200000U : \ + ((((*((uint16_t *)FLASHSIZE_BASE)) == 0x0000U)) ? 0x200000U : \ + (((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0xFFFFU)) << 10U))) #define FLASH_OTP_BASE 0x1FFF7800UL /*!< Base address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define FLASH_OTP_END 0x1FFF7A0FUL /*!< End address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define CCMDATARAM_END 0x1000FFFFUL /*!< CCM data RAM end address */
diff --git a/Include/stm32f479xx.h b/Include/stm32f479xx.h index 8a013bd..16e692b 100644 --- a/Include/stm32f479xx.h +++ b/Include/stm32f479xx.h
@@ -1194,7 +1194,10 @@ #define SRAM3_BB_BASE 0x22600000UL /*!< SRAM3(64 KB) base address in the bit-band region */ #define PERIPH_BB_BASE 0x42000000UL /*!< Peripheral base address in the bit-band region */ #define BKPSRAM_BB_BASE 0x42480000UL /*!< Backup SRAM(4 KB) base address in the bit-band region */ -#define FLASH_END 0x081FFFFFUL /*!< FLASH end address */ +#define FLASH_END 0x081FFFFFUL /*!< FLASH end address */ +#define FLASH_SIZE ((((*((uint16_t *)FLASHSIZE_BASE)) == 0xFFFFU)) ? 0x200000U : \ + ((((*((uint16_t *)FLASHSIZE_BASE)) == 0x0000U)) ? 0x200000U : \ + (((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0xFFFFU)) << 10U))) #define FLASH_OTP_BASE 0x1FFF7800UL /*!< Base address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define FLASH_OTP_END 0x1FFF7A0FUL /*!< End address of : (up to 528 Bytes) embedded FLASH OTP Area */ #define CCMDATARAM_END 0x1000FFFFUL /*!< CCM data RAM end address */
diff --git a/Include/stm32f4xx.h b/Include/stm32f4xx.h index 8e1346a..5bfe6ed 100644 --- a/Include/stm32f4xx.h +++ b/Include/stm32f4xx.h
@@ -105,11 +105,11 @@ #endif /* USE_HAL_DRIVER */ /** - * @brief CMSIS version number V2.6.11 + * @brief CMSIS version number V2.6.12 */ #define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */ #define __STM32F4xx_CMSIS_VERSION_SUB1 (0x06U) /*!< [23:16] sub1 version */ -#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x0BU) /*!< [15:8] sub2 version */ +#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x0CU) /*!< [15:8] sub2 version */ #define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */ #define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\ |(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\
diff --git a/LICENSE.md b/LICENSE.md index e0d829b..72fbf79 100644 --- a/LICENSE.md +++ b/LICENSE.md
@@ -80,4 +80,4 @@ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and - limitations under the License. + limitations under the License. \ No newline at end of file
diff --git a/README.md b/README.md index 1c317af..0e97af9 100644 --- a/README.md +++ b/README.md
@@ -1,6 +1,6 @@ # STM32CubeF4 CMSIS Device MCU Component - + ## Overview
diff --git a/Release_Notes.html b/Release_Notes.html index 2de24ed..3b7625a 100644 --- a/Release_Notes.html +++ b/Release_Notes.html
@@ -33,10 +33,21 @@ <div class="col-sm-12 col-lg-8"> <h1 id="update-history">Update History</h1> <div class="collapse"> -<input type="checkbox" id="collapse-section33" checked aria-hidden="true"> <label for="collapse-section33" aria-hidden="true">V2.6.11 / 25-April-2025</label> +<input type="checkbox" id="collapse-section34" checked aria-hidden="true"> <label for="collapse-section34" aria-hidden="true">V2.6.12 / 28-October-2026</label> <div> <h2 id="main-changes">Main Changes</h2> <ul> +<li>Default VTOR to the internal Flash base address if ‘USER_VECT_TAB_ADDRESS’ is not defined to ensure correct IRQ dispatch</li> +<li>Add FLASH_SIZE define</li> +<li>Add missing SYSCFG_CFGR2_PVDL bit definition in STM32F412xx CMSIS headers</li> +</ul> +</div> +</div> +<div class="collapse"> +<input type="checkbox" id="collapse-section33" aria-hidden="true"> <label for="collapse-section33" aria-hidden="true">V2.6.11 / 25-April-2025</label> +<div> +<h2 id="main-changes-1">Main Changes</h2> +<ul> <li>Fix CMSIS-DSP and CMSIS-NN files in CMSIS Core v5.9.0</li> <li>Allow redefinition of the macro ‘VECT_TAB_OFFSET’ externally from the IDE, makefile, or command line.</li> <li>Update definitions of USB_OTG_DIEPMSK_NAKM bit.</li> @@ -48,7 +59,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section32" aria-hidden="true"> <label for="collapse-section32" aria-hidden="true">V2.6.10 / 31-May-2024</label> <div> -<h2 id="main-changes-1">Main Changes</h2> +<h2 id="main-changes-2">Main Changes</h2> <ul> <li>Add MCO2PRE[2:0] and MCO2[1:0] bits definition within CMSIS files.</li> </ul> @@ -57,7 +68,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section31" aria-hidden="true"> <label for="collapse-section31" aria-hidden="true">V2.6.9 / 22-September-2022</label> <div> -<h2 id="main-changes-2">Main Changes</h2> +<h2 id="main-changes-3">Main Changes</h2> <ul> <li>Added new atomic register access macros in stm32f4xx.h file.</li> <li>Update FLASH_SCALE2_LATENCY4_FREQ value to 120MHz instead of 12MHz.</li> @@ -72,7 +83,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section30" aria-hidden="true"> <label for="collapse-section30" aria-hidden="true">V2.6.8 / 11-Fabruary-2022</label> <div> -<h2 id="main-changes-3">Main Changes</h2> +<h2 id="main-changes-4">Main Changes</h2> <ul> <li>All source files: update disclaimer to add reference to the new license agreement.</li> <li>Correct ETH bits definitions to be in line with naming used in the STM32F4 reference manual documents.</li> @@ -82,7 +93,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section29" aria-hidden="true"> <label for="collapse-section29" aria-hidden="true">V2.6.7 / 16-July-2021</label> <div> -<h2 id="main-changes-4">Main Changes</h2> +<h2 id="main-changes-5">Main Changes</h2> <ul> <li>Add missing definition FLASH_CR_ERRIE to the CMSIS header file.</li> <li>Remove unsupported “GPIOF_BASE” and “GPIOG_BASE” defines from STM32F412Vx device.</li> @@ -95,7 +106,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section28" aria-hidden="true"> <label for="collapse-section28" aria-hidden="true">V2.6.6 / 12-Fabruary-2021</label> <div> -<h2 id="main-changes-5">Main Changes</h2> +<h2 id="main-changes-6">Main Changes</h2> <ul> <li>system_stm32f4xx.c: <ul> @@ -116,7 +127,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section27" aria-hidden="true"> <label for="collapse-section27" aria-hidden="true">V2.6.5 / 10-Fabruary-2020</label> <div> -<h2 id="main-changes-6">Main Changes</h2> +<h2 id="main-changes-7">Main Changes</h2> <ul> <li>All header files <ul> @@ -132,7 +143,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section26" aria-hidden="true"> <label for="collapse-section26" aria-hidden="true">V2.6.4 / 06-December-2019</label> <div> -<h2 id="main-changes-7">Main Changes</h2> +<h2 id="main-changes-8">Main Changes</h2> <ul> <li>stm32f446xx.h file <ul> @@ -156,7 +167,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section25" aria-hidden="true"> <label for="collapse-section25" aria-hidden="true">V2.6.3 / 08-Fabruary-2019</label> <div> -<h2 id="main-changes-8">Main Changes</h2> +<h2 id="main-changes-9">Main Changes</h2> <ul> <li>CRYP: <ul> @@ -226,7 +237,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section24" aria-hidden="true"> <label for="collapse-section24" aria-hidden="true">V2.6.2 / 06-October-2017</label> <div> -<h2 id="main-changes-9">Main Changes</h2> +<h2 id="main-changes-10">Main Changes</h2> <ul> <li>Remove Date and Version from all header files</li> <li>USB_OTG register clean up: remove duplicated bits definitions</li> @@ -252,7 +263,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section23" aria-hidden="true"> <label for="collapse-section23" aria-hidden="true">V2.6.1 / 14-Fabruary-2017</label> <div> -<h2 id="main-changes-10">Main Changes</h2> +<h2 id="main-changes-11">Main Changes</h2> <ul> <li>General updates in header files to support LL drivers <ul> @@ -308,7 +319,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section22" aria-hidden="true"> <label for="collapse-section22" aria-hidden="true">V2.6.0 / 04-November-2016</label> <div> -<h2 id="main-changes-11">Main Changes</h2> +<h2 id="main-changes-12">Main Changes</h2> <ul> <li>Add support of STM32F413xx and STM32F423xx devices <ul> @@ -356,7 +367,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section21" aria-hidden="true"> <label for="collapse-section21" aria-hidden="true">V2.5.1 / 28-June-2016</label> <div> -<h2 id="main-changes-12">Main Changes</h2> +<h2 id="main-changes-13">Main Changes</h2> <ul> <li>stm32f412rx.h, stm32f412vx.h and stm32f412zx.h files: <ul> @@ -368,7 +379,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section20" aria-hidden="true"> <label for="collapse-section20" aria-hidden="true">V2.5.0 / 22-April-2016</label> <div> -<h2 id="main-changes-13">Main Changes</h2> +<h2 id="main-changes-14">Main Changes</h2> <ul> <li>Add support of STM32F412Cx, STM32F412Rx, STM32F412Vx and STM32F412Zx devices <ul> @@ -424,7 +435,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section19" aria-hidden="true"> <label for="collapse-section19" aria-hidden="true">V2.4.3 / 29-January-2016</label> <div> -<h2 id="main-changes-14">Main Changes</h2> +<h2 id="main-changes-15">Main Changes</h2> <ul> <li>Header file for all STM32 devices <ul> @@ -468,7 +479,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section18" aria-hidden="true"> <label for="collapse-section18" aria-hidden="true">V2.4.2 / 13-November-2015</label> <div> -<h2 id="main-changes-15">Main Changes</h2> +<h2 id="main-changes-16">Main Changes</h2> <ul> <li>system_stm32f4xx.c file <ul> @@ -501,7 +512,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section17" aria-hidden="true"> <label for="collapse-section17" aria-hidden="true">V2.4.1 / 09-October-2015</label> <div> -<h2 id="main-changes-16">Main Changes</h2> +<h2 id="main-changes-17">Main Changes</h2> <ul> <li>“stm32f469xx.h”, “stm32f479xx.h” <ul> @@ -513,7 +524,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section16" aria-hidden="true"> <label for="collapse-section16" aria-hidden="true">V2.4.0 / 14-August-2015</label> <div> -<h2 id="main-changes-17">Main Changes</h2> +<h2 id="main-changes-18">Main Changes</h2> <ul> <li>Add support of STM32F469xx and STM32F479xx devices <ul> @@ -533,7 +544,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section15" aria-hidden="true"> <label for="collapse-section15" aria-hidden="true">V2.3.2 / 26-June-2015</label> <div> -<h2 id="main-changes-18">Main Changes</h2> +<h2 id="main-changes-19">Main Changes</h2> <ul> <li>“stm32f405xx.h”, “stm32f407xx.h”, “stm32f415xx.h” and “stm32f417xx.h” <ul> @@ -562,7 +573,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section14" aria-hidden="true"> <label for="collapse-section14" aria-hidden="true">V2.3.1 / 03-April-2015</label> <div> -<h2 id="main-changes-19">Main Changes</h2> +<h2 id="main-changes-20">Main Changes</h2> <ul> <li>Header file for all STM32 devices <ul> @@ -577,7 +588,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section13" aria-hidden="true"> <label for="collapse-section13" aria-hidden="true">V2.3.0 / 02-March-2015</label> <div> -<h2 id="main-changes-20">Main Changes</h2> +<h2 id="main-changes-21">Main Changes</h2> <ul> <li>Add support of STM32F446xx devices <ul> @@ -598,7 +609,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section12" aria-hidden="true"> <label for="collapse-section12" aria-hidden="true">V2.2.0 / 15-December-2014</label> <div> -<h2 id="main-changes-21">Main Changes</h2> +<h2 id="main-changes-22">Main Changes</h2> <ul> <li>stm32f4xx.h <ul> @@ -619,7 +630,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section11" aria-hidden="true"> <label for="collapse-section11" aria-hidden="true">V2.1.0 / 19-June-2014</label> <div> -<h2 id="main-changes-22">Main Changes</h2> +<h2 id="main-changes-23">Main Changes</h2> <ul> <li>Add support of STM32F411xExx devices <ul> @@ -673,7 +684,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section10" aria-hidden="true"> <label for="collapse-section10" aria-hidden="true">V2.0.0 / 18-Fabruary-2014</label> <div> -<h2 id="main-changes-23">Main Changes</h2> +<h2 id="main-changes-24">Main Changes</h2> <ul> <li>Update based on STM32Cube specification</li> <li>This version and later has to be used only with STM32CubeF4 based development</li> @@ -683,7 +694,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section9" aria-hidden="true"> <label for="collapse-section9" aria-hidden="true">V1.3.0 / 08-November-2013</label> <div> -<h2 id="main-changes-24">Main Changes</h2> +<h2 id="main-changes-25">Main Changes</h2> <ul> <li>Add support of STM32F401xExx devices</li> <li>Update startup files “startup_stm32f401xx.s” for EWARM, MDK-ARM, TrueSTUDIO and Ride toolchains: Add SPI4 interrupt handler entry in the vector table</li> @@ -693,7 +704,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section8" aria-hidden="true"> <label for="collapse-section8" aria-hidden="true">V1.2.1 / 19-September-2013</label> <div> -<h2 id="main-changes-25">Main Changes</h2> +<h2 id="main-changes-26">Main Changes</h2> <ul> <li>system_stm32f4xx.c : Update FMC SDRAM configuration (RBURST mode activation)</li> <li>Update startup files “startup_stm32f427_437xx.s” and “startup_stm32f429_439xx.s” for TrueSTUDIO and Ride toolchains and maintain the old name of startup files for legacy purpose</li> @@ -703,7 +714,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section7" aria-hidden="true"> <label for="collapse-section7" aria-hidden="true">V1.2.0 / 11-September-2013</label> <div> -<h2 id="main-changes-26">Main Changes</h2> +<h2 id="main-changes-27">Main Changes</h2> <ul> <li>Add support of STM32F429/439xx and STM32F401xCxx devices</li> <li>Update definition of STM32F427/437xx devices : extension of the features to include system clock up to 180MHz, dual bank Flash, reduced STOP Mode current, SAI, PCROP, SDRAM and DMA2D</li> @@ -730,7 +741,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section6" aria-hidden="true"> <label for="collapse-section6" aria-hidden="true">V1.1.0 / 11-January-2013</label> <div> -<h2 id="main-changes-27">Main Changes</h2> +<h2 id="main-changes-28">Main Changes</h2> <ul> <li>Official release for STM32F427x/437x devices.</li> <li>stm32f4xx.h @@ -756,7 +767,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section5" aria-hidden="true"> <label for="collapse-section5" aria-hidden="true">V1.0.2 / 05-March-2012</label> <div> -<h2 id="main-changes-28">Main Changes</h2> +<h2 id="main-changes-29">Main Changes</h2> <ul> <li>All source files: license disclaimer text update and add link to the License file on ST Internet.</li> </ul> @@ -765,7 +776,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section4" aria-hidden="true"> <label for="collapse-section4" aria-hidden="true">V1.0.1 / 28-December-2011</label> <div> -<h2 id="main-changes-29">Main Changes</h2> +<h2 id="main-changes-30">Main Changes</h2> <ul> <li>All source files: update disclaimer to add reference to the new license agreement</li> <li>stm32f4xx.h @@ -778,7 +789,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section3" aria-hidden="true"> <label for="collapse-section3" aria-hidden="true">V1.0.0 / 30-September-2011</label> <div> -<h2 id="main-changes-30">Main Changes</h2> +<h2 id="main-changes-31">Main Changes</h2> <ul> <li>First official release for STM32F40x/41x devices</li> <li>Add startup file for TASKING toolchain</li> @@ -789,7 +800,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section2" aria-hidden="true"> <label for="collapse-section2" aria-hidden="true">V1.0.0RC2 / 26-September-2011</label> <div> -<h2 id="main-changes-31">Main Changes</h2> +<h2 id="main-changes-32">Main Changes</h2> <ul> <li>Official version (V1.0.0) Release Candidate2 for STM32F40x/41x devices</li> <li>stm32f4xx.h @@ -827,7 +838,7 @@ <div class="collapse"> <input type="checkbox" id="collapse-section1" aria-hidden="true"> <label for="collapse-section1" aria-hidden="true">V1.0.0RC1 / 25-August-2011</label> <div> -<h2 id="main-changes-32">Main Changes</h2> +<h2 id="main-changes-33">Main Changes</h2> <ul> <li>Official version (V1.0.0) Release Candidate1 for STM32F4xx devices</li> </ul>
diff --git a/Release_Notes.md b/Release_Notes.md new file mode 100644 index 0000000..0fc984c --- /dev/null +++ b/Release_Notes.md
@@ -0,0 +1,664 @@ + + +# Release Notes for +# <mark>STM32F4xx CMSIS</mark> +Copyright © 2017 STMicroelectronics\ + +[](https://www.st.com) + +# Purpose + +This driver provides the CMSIS device for the stm32f4xx products. + + +# Update History + +<label for="collapse-section34" aria-hidden="true">V2.6.12 / 28-October-2026</label> +<div> + +## Main Changes + +- Default VTOR to the internal Flash base address if 'USER_VECT_TAB_ADDRESS' is not defined to ensure correct IRQ dispatch +- Add FLASH_SIZE define +- Add missing SYSCFG_CFGR2_PVDL bit definition in STM32F412xx CMSIS headers + +</div> + +<label for="collapse-section33" aria-hidden="true">V2.6.11 / 25-April-2025</label> +<div> + +## Main Changes + +- Fix CMSIS-DSP and CMSIS-NN files in CMSIS Core v5.9.0 +- Allow redefinition of the macro 'VECT_TAB_OFFSET' externally from the IDE, makefile, or command line. +- Update definitions of USB_OTG_DIEPMSK_NAKM bit. +- Update the DMA_SxCR_CHSEL_x bit definitions to use bitwise shift operations. +- Rename FLASH_SR_SOP_XX bits to FLASH_SR_OPERR_XX. + +</div> + +<label for="collapse-section32" aria-hidden="true">V2.6.10 / 31-May-2024</label> +<div> + +## Main Changes + +- Add MCO2PRE[2:0] and MCO2[1:0] bits definition within CMSIS files. + +</div> + +<label for="collapse-section31" aria-hidden="true">V2.6.9 / 22-September-2022</label> +<div> + +## Main Changes + +- Added new atomic register access macros in stm32f4xx.h file. +- Update FLASH_SCALE2_LATENCY4_FREQ value to 120MHz instead of 12MHz. +- Update the GCC startup file to be aligned to IAR/Keil IDE. +- STM32F410/412/413/423: + - Fix wrong defined value for wake-up pin 3 (PWR_CSR_EWUP3). + +</div> + +<label for="collapse-section30" aria-hidden="true">V2.6.8 / 11-Fabruary-2022</label> +<div> + +## Main Changes + +- All source files: update disclaimer to add reference to the new license agreement. +- Correct ETH bits definitions to be in line with naming used in the STM32F4 reference manual documents. + +</div> + +<label for="collapse-section29" aria-hidden="true">V2.6.7 / 16-July-2021</label> +<div> + +## Main Changes + +- Add missing definition FLASH_CR_ERRIE to the CMSIS header file. +- Remove unsupported “GPIOF_BASE” and “GPIOG_BASE” defines from STM32F412Vx device. +- Add new atomic register access macros in stm32f4xx.h file. +- Add LSI maximum startup time datasheet value: LSI_STARTUP_TIME. +- Fix a typo in CMSIS STM32F4xx version macro (__STM32F4xx_CMSIS_VERSION). + +</div> + +<label for="collapse-section28" aria-hidden="true">V2.6.6 / 12-Fabruary-2021</label> +<div> + +## Main Changes + +- system_stm32f4xx.c: + - Protect Vector table modification following SRAM or FLASH preprocessor directive by a generic preprocessor directive : USER_VECT_TAB_ADDRESS + - Update SystemInit_ExtMemCtl() API to initialize the tmpreg variable before each time out loop condition. +- Add License.md and Readme.md files required for GitHub publication +- Improve GCC startup files robustness. +- Fix wrong value for GPIO_MODER_MODE8_Msk and GPIO_MODER_MODE2_Pos. +- Update max number of host channels in FS for STM32F446: + - Update USB_OTG_FS_HOST_MAX_CHANNEL_NBR value from 8 to 12. +- Add SMBDEN and SMBHEN bit definition for STM32F410Tx device. + +</div> + +<label for="collapse-section27" aria-hidden="true">V2.6.5 / 10-Fabruary-2020</label> +<div> + +## Main Changes + +- All header files + - Update to use new BSD License format +- MDK-ARM startup files + - Update to fix invalid config wizard annotations + +</div> + +<label for="collapse-section26" aria-hidden="true">V2.6.4 / 06-December-2019</label> +<div> + +## Main Changes + +- stm32f446xx.h file + - Update to support HW flow control on UART4 and UART5 instances +- stm32f412xx.h, stm32f413xx.h and stm32f423xx.h files + - Remove unused IS_USB_ALL_INSTANCE() assert macro +- All header files + - Remove unused IS_TIM_SYNCHRO_INSTANCE() assert macro +- system_stm32f4xx.c file + - Update SystemInit() API to don't reset RCC registers to its reset values + +</div> + +<label for="collapse-section25" aria-hidden="true">V2.6.3 / 08-Fabruary-2019</label> +<div> + +## Main Changes + +- CRYP: + - Update CMSIS devices with correct CRYP data input register name: DIN instead of DR + - Add Bits definition for CRYP CR ALGOMODE AES GCM/CCM +- HASH: + - Update HASH_DIGEST_TypeDef structure: resize the HR register + - Remove MDMAT Bits definition +- TIM: + - Add requires TIM assert macros: + - IS_TIM_SYNCHRO_INSTANCE() + - IS_TIM_CLOCKSOURCE_TIX_INSTANCE() + - IS_TIM_CLOCKSOURCE_ITRX_INSTANCE() +- RCC + - Add RCC_CSR_BORRSTF bits definition +- GPIO + - Fix GPIO BRR bits definition + - Adjust the GPIO present on STM32F412 devices +- SAI + - Fix frame length in SAI_xFRCR_FSALL & SAI_xFRCR_FRL bits description +- USB: + - Add missing Bits Definitions in USB_OTG_DOEPMSK register + - USB_OTG_DOEPMSK_AHBERRM + - USB_OTG_DOEPMSK_OTEPSPRM + - USB_OTG_DOEPMSK_BERRM + - USB_OTG_DOEPMSK_NAKM + - USB_OTG_DOEPMSK_NYETM + - Add missing Bits Definitions in USB_OTG_DIEPINT register + - USB_OTG_DIEPINT_INEPNM + - USB_OTG_DIEPINT_AHBERR + - USB_OTG_DOEPINT_OUTPKTERR + - USB_OTG_DOEPINT_NAK + - USB_OTG_DOEPINT_STPKTRX + - Add missing Bits Definitions in USB_OTG_DCFG register + - USB_OTG_DCFG_XCVRDLY + - USB_OTG_DCFG_ERRATIM + - Update USB OTG max number of endpoints (6 FS and 9 HS instead of 5 and 8) +- I2C/FMPI2C + - Align Bit naming for FMPI2C_CR1 register: FMPI2C_CR1_DFN--> FMPI2C_CR1_DNF + - Add IS_SMBUS_ALL_INSTANCE() define +- DFSDM + - Align Bit naming for DFSDM_FLTICR register: DFSDM_FLTICR_CLRSCSDF--> DFSDM_FLTICR_CLRSCDF +- PWR + - Remove PWR_CSR_WUPP define: feature not available on STM32F469xx/479xx devices + +</div> + +<label for="collapse-section24" aria-hidden="true">V2.6.2 / 06-October-2017</label> +<div> + +## Main Changes + +- Remove Date and Version from all header files +- USB_OTG register clean up: remove duplicated bits definitions +- stm32f401xc.h, stm32f401xe.h, stm32f411xe.h files + - Remove BKPSRAM_BASE define: feature not available +- stm32f405xx.h, stm32f407xx.h files + - Rename HASH_RNG_IRQn to RNG_IRQn: HASH instance not available +- stm32f410xx.h, stm32f412xx.h, stm32f413xx.h, stm32f423xx.h files + - Add missing wake-up pins defines +- stm32f412cx.h files + - Add support of USART3 instance + +</div> + +<label for="collapse-section23" aria-hidden="true">V2.6.1 / 14-Fabruary-2017</label> +<div> + +## Main Changes + +- General updates in header files to support LL drivers + - Align Bit naming for RCC_CSR register (ex: RCC_CSR_PADRSTF --> RCC_CSR_PINRSTF) + - Add new defines for RCC features support: + - RCC PLLI2S and RCC PLLSAI support + - RCC PLLR I2S clock source and RCC PLLR system clock support + - RCC SAI1A PLL source and RCC SAI1B PLL source support + - RCC AHB2 support + - Add RCC_DCKCFGR_PLLI2SDIVQ_X and RCC_DCKCFGR_PLLSAIDIVQ_X bits definition + - Add new defines for RCC_PLLI2SCFGR_RST_VALUE, RCC_PLLSAICFGR_RST_VALUE and RCC_PLLCFGR_RST_VALUE + - Add new defines for RTC features support: + - RTC Tamper 2 support + - RTC AF2 mapping support + - Align Bit naming for RTC_CR and RTC_TAFCR registers (ex: RTC_CR_BCK --> RTC_CR_BKP) + - Add new define to manage RTC backup register number: RTC_BKP_NUMBER + - Rename IS_UART_INSTANCE() macro to IS_UART_HALFDUPLEX_INSTANCE() + - Add new defines to check LIN instance: IS_UART_LIN_INSTANCE + - Remove USART6 instance from STM32F410Tx header file + - Rename IS_I2S_ALL_INSTANCE_EXT() macro to IS_I2S_EXT_ALL_INSTANCEE() + - Add IS_I2S_APB1_INSTANCE() macro to check if I2S instance mapping: API1 or APB2 + - Remove SPI_I2S_SUPPORT define for SPI I2S features support: I2S feature is available on all STM32F4xx devices + - Add SPI_I2S_FULLDUPLEX_SUPPORT define for STM32F413xx/423xx devices + - Align SPI_I2SCFGR bit naming: SPI_I2SCFGR_ASTRTEN bit is missing for STM32F412xx devices + - Add new I2S_APB1_APB2_FEATURE define for STM32F4xx devices where I2S IP's are splited between RCC APB1 and APB2 interfaces + - Add new FLASH_SR_RDERR define in FLASH_SR register + - Add FLASH_OTP_BASE and FLASH_OTP_END defnes to manage FLASH OPT area + - Add bit definitions for ETH_MACDBGR register + - Add new defines ADC1_COMMON_BASE and ADC123_COMMON_BASE to replace ADC_BASE define + - Add new defines ADC1_COMMON and ADC123_COMMON to replace ADC define + - Add new ADC macros: IS_ADC_COMMON_INSTANCE() and IS_ADC_MULTIMODE_MASTER_INSTANCE() + - Add new defines for ADC multi mode features support + - Add new ADC aliases ADC_CDR_RDATA_MST and ADC_CDR_RDATA_SLV for compatibilities with all STM32 Families + - Update TIM CNT and ARR register mask on 32-bits + - Add new TIM_OR_TI1_RMP define in TIM_OR register + - Add new TIM macros to check TIM feature instance support: + - IS_TIM_COUNTER_MODE_SELECT_INSTANCE() + - IS_TIM_CLOCK_DIVISION_INSTANCE() + - IS_TIM_COMMUTATION_EVENT_INSTANCE() + - IS_TIM_OCXREF_CLEAR_INSTANCE() + - IS_TIM_CLOCKSOURCE_ETRMODE1_INSTANCE() + - IS_TIM_CLOCKSOURCE_ETRMODE2_INSTANCE() + - IS_TIM_REPETITION_COUNTER_INSTANCE() + - IS_TIM_ENCODER_INTERFACE_INSTANCE() + - IS_TIM_HALL_SENSOR_INTERFACE_INSTANCE() + - IS_TIM_BREAK_INSTANCE() +- CAN_IER register clean up: remove duplicated bit definitions +- USB_OTG register: fix the wrong defined values for USB_OTG_GAHBCFG bits + +</div> + +<label for="collapse-section22" aria-hidden="true">V2.6.0 / 04-November-2016</label> +<div> + +## Main Changes + +- Add support of STM32F413xx and STM32F423xx devices + - Add "stm32f413xx.h" and "stm32f423xx.h" files + - Add startup files "startup_stm32f413xx.s" and "startup_stm32f423xx.s" for EWARM, MDK-ARM and SW4STM32 toolchains + - Add Linker files "stm32f413xx_flash.icf", "stm32f413xx_sram.icf", "stm32f423xx_flash.icf" and "stm32f423xx_sram.icf" used within EWARM Workspaces +- All header files + - Use _Pos and _Mask macro for all Bit Definitions + - Update LPTIM_OR Bit Definition + - Update the defined frequencies by scale for USB exported constants + - Add UID_BASE, FLASHSIZE_BASE and PACKAGE_BASE defines + - Add new define DAC_CHANNEL2_SUPPORT to manage DAC channel2 support + - Use new DAC1 naming + - Rename PWR_CSR_UDSWRDY define to PWR_CSR_UDRDY in PWR_CSR register + - Align Bit naming for EXTI_IMR and EXTI_EMR registers (ex: EXTI_IMR_MR0 --> EXTI_IMR_IM0) + - Add new EXTI_IMR_IM define in EXTI_IMR register + - Add missing DMA registers definition + - Add macro to check SMBUS instance support +- stm32f412cx.h, stm32f412zx.h, stm32f412vx.h, stm32f412rx.h files + - Add missing SYSCFG register: CFGR2 +- stm32f405xx.h, stm32f407xx.h, stm32f427xx.h, stm32f429xx.h files + - Remove HASH_RNG_IRQn in IRQn_Type enumeration +- stm32f405xx.h, stm32f407xx.h, stm32f415xx.h, stm32f417xx.h files + - Remove I2C FLTR register as not supported +- stm32f407xx.h, stm32f417xx.h, stm32f427xx.h, stm32f429xx.h, stm32f437xx.h, stm32f439xx.h, stm32f469xx.h, stm32f479xx.h files + - Add missing Bit Definition of ETH_MACDBGR register +- system_stm32f4xx.c file + - Add APBPrescTable declaration + +</div> + +<label for="collapse-section21" aria-hidden="true">V2.5.1 / 28-June-2016</label> +<div> + +## Main Changes + +- stm32f412rx.h, stm32f412vx.h and stm32f412zx.h files: + - Add QSPI1_V2_1L define to manage the QSPI DMA2 limitation + +</div> + +<label for="collapse-section20" aria-hidden="true">V2.5.0 / 22-April-2016</label> +<div> + +## Main Changes + +- Add support of STM32F412Cx, STM32F412Rx, STM32F412Vx and STM32F412Zx devices + - Add "stm32f412Cx.h", "stm32f412Rx.h", "stm32f412Vx.h" and "stm32f412Zx.h" files + - Add startup files "startup_stm32f412cx.s", "startup_stm32f412rx.s", "startup_stm32f412vx.s" and "startup_stm32f412zx.s" for EWARM, MDK-ARM and SW4STM32 toolchains + - Add Linker files "stm32f412cx_flash.icf", "stm32f412cx_sram.icf", "stm32f412rx_flash.icf", "stm32f412rx_sram.icf", "stm32f412vx_flash.icf", "stm32f412vx_sram.icf", "stm32f412zx_flash.icf" and "stm32f412zx_sram.icf" used within EWARM Workspaces +- Header files for all STM32 devices + - Remove uint32_t cast and keep only Misra Cast (U) to avoid two types cast duplication + - Correct some bits definition to be in line with naming used in the Reference Manual + - WWDG_CR_Tx changed to WWDG_CR_T_x + - WWDG_CFR_Wx changed to WWDG_CFR_W_x + - WWDG_CFR_WDGTBx changed to WWDG_CFR_WDGTB_x +- stm32f407xx.h, stm32f417xx.h, stm32f427xx.h, stm32f429xx.h, stm32f437xx.h, stm32f439xx.h, stm32f446xx.h, stm32f469xx.h, stm32f479xx.h files + - Correct some bits definition to be in line with naming used in the Reference Manual + - DCMI_RISR_x changed to DCMI_RIS_x + - DCMI_RISR_OVF_RIS changed to DCMI_RIS_OVR_RIS + - DCMI_IER_OVF_IE changed to DCMI_IER_OVR_IE +- stm32f427xx.h, stm32f429xx.h, stm32f437xx.h, stm32f439xx.h, stm32f469xx.h, stm32f479xx.h, stm32f446xx.h files + - Correct some bits definition to be in line with naming used in the Reference Manual + - SAI_xFRCR_FSPO changed to SAI_xFRCR_FSPOL + - Rename IS_SAI_BLOCK_PERIPH to IS_SAI_ALL_INSTANCE +- stm32f410cx.h, stm32f410rx.h, stm32f410tx.h files and stm32f446xx.h + - Remove FMPI2C_CR1_SWRST and FMPI2C_CR1_WUPEN Bit definition for I2C_CR1 register +- stm32f407xx.h, stm32f417xx.h, stm32f427xx.h, stm32f437xx.h, stm32f439xx.h, stm32f469xx.h, stm32f479xx.h files + - Add missing bits definitions for DMA2D_CR, DMA2D_FGPFCCR, DMA2D_BGPFCCR, DMA2D_OPFCCR registers +- stm32f401xc.h, stm32f401xe.h, stm32f411xe.h files + - Add missing RCC_DCKCFGR register in RCC_TypeDef structure + - Add missing Bit definition for RCC_DCKCFGR register +- system_stm32f4xx.c + - Update SystemInit_ExtMemCtl() API to fix delay optimization problem with GCC compiler: index variable is declared as volatile +- stm32f4xx.h + - Rename __STM32F4xx_CMSIS_DEVICE_VERSION_xx defines to __STM32F4_CMSIS_VERSION_xx (MISRA-C 2004 rule 5.1) + +</div> + +<label for="collapse-section19" aria-hidden="true">V2.4.3 / 29-January-2016</label> +<div> + +## Main Changes + +- Header file for all STM32 devices + - Rename ADC overrun flags definitions : ADC_CSR_DOVR1, ADC_CSR_DOVR2 and ADC_CSR_DOVR3 are replaced respectively by ADC_CSR_OVR1, ADC_CSR_OVR2 and ADC_CSR_OVR3 to be aligned with reference manuals + - Add missing bits definitions for DAC : DAC_CR_DMAUDRIE1 and DAC_CR_DMAUDRIE2 + - Update CMSIS driver to be compliant with MISRA C 2004 rule 10.6 + - Remove the double definition of USB_OTG_HS_MAX_IN_ENDPOINTS and add a new one for USB_OTG_HS_MAX_OUT_ENDPOINTS +- stm32f446xx.h, stm32f469xx.h, stm32f479xx.h files + - Change the bit definition value of QUADSPI_CR_FTHRES +- stm32f446xx.h, stm32f469xx.h, stm32f479xx.h, stm32f429xx.h, stm32f439xx.h files + - Rename the LTDC_GCR_DTEN to LTDC_GCR_DEN in order to be aligned with the reference manual + - Rename DCMI_MISR bit definitions to DCMI_MIS + - Rename DCMI_ICR_OVF_ISC to DCMI_ICR_OVR_ISC + - Add missing bits definitions for DCMI_ESCR, DCMI_ESUR, DCMI_CWSTRT, DCMI_CWSIZE, DCMI_DR registers +- stm32f407xx.h, stm32f417xx.h, stm32f427xx.h, stm32f437xx.h files + - Rename DCMI_MISR bit definitions to DCMI_MIS + - Rename DCMI_ICR_OVF_ISC to DCMI_ICR_OVR_ISC + - Add missing bits definitions for DCMI_ESCR, DCMI_ESUR, DCMI_CWSTRT, DCMI_CWSIZE, DCMI_DR registers +- stm32f410cx.h, stm32f410rx.h, stm32f410tx.h files + - Update the LPTIM SNGSTRT defined value +- stm32f427xx.h, stm32f429xx.h, stm32f437xx.h, stm32f439xx.h, stm32f469xx.h, stm32f479xx.h files + - Rename the DMA2D_IFSR bit definitions to DMA2D_IFCR +- stm32f427xx.h, stm32f429xx.h, stm32f437xx.h, stm32f439xx.h, stm32f469xx.h, stm32f479xx.h, stm32f446xx.h files + - Correct a wrong value of SAI_xCR2_CPL definition bit + +</div> + +<label for="collapse-section18" aria-hidden="true">V2.4.2 / 13-November-2015</label> +<div> + +## Main Changes + +- system_stm32f4xx.c file + - update SystemInit_ExtMemCtl() function implementation to allow the possibility of simultaneous use of DATA_IN_ExtSRAM and DATA_IN_ExtSDRAM +- stm32f4xx.h file + - add symbols for STM32F411xC devices +- stm32f405xx.h, stm32f407xx.h, stm32f415xx.h, stm32f417xx.h files + - add FSMC_BCRx_CPSIZE bits definitions + - remove FSMC_BWTRx_CLKDIV and FSMC_BWTRx_DATLAT bits definitions +- stm32f429xx.h, stm32f427xx.h, stm32f437xx.h files + - add FMC_BCRx_CPSIZE bits definitions + - remove FMC_BWTRx_CLKDIV and FMC_BWTRx_DATLAT bits definitions +- stm32f446xx.h, stm32f469xx.h and stm32f479xx.h + - update USB_OTG_GlobalTypeDef registers structure to remove ADP control registers + - add USB_OTG_DOEPMSK_OTEPSPRM and USB_OTG_DOEPINT_OTEPSPR bits definitions + - Remove ADP related bits definitions + - add IS_PCD_ALL_INSTANCE() and IS_HCD_ALL_INSTANCE() macros + +</div> + +<label for="collapse-section17" aria-hidden="true">V2.4.1 / 09-October-2015</label> +<div> + +## Main Changes + +- "stm32f469xx.h", "stm32f479xx.h" + - Update bits definition for DSI_WPCR and DSI_TCCR registers + +</div> + +<label for="collapse-section16" aria-hidden="true">V2.4.0 / 14-August-2015</label> +<div> + +## Main Changes + +- Add support of STM32F469xx and STM32F479xx devices + - Add "stm32f469xx.h" and "stm32f479xx.h" files + - Add startup files "startup_stm32f469xx.s" and "startup_stm32f479xx.s" for EWARM, MDK-ARM and SW4STM32 toolchains + - Add Linker files "stm32f469xx_flash.icf", "stm32f469xx_sram.icf", "stm32f479xx_flash.icf" and "stm32f479xx_sram.icf" used within EWARM Workspaces +- Add support of STM32F410xx devices + - Add "stm32f410cx.h", "stm32f410tx.h" and "stm32f410rx.h" files + - Add startup files "startup_stm32f410cx.s", "startup_stm32f410rx.s" and "startup_stm32f410tx.s" for EWARM, MDK-ARM and SW4STM32 toolchains + - Add Linker files "stm32f410cx_flash.icf", "stm32f410cx_sram.icf", "stm32f410rx_flash.icf", "stm32f410tx_sram.icf", "stm32f410tx_flash.icf", and "stm32f410rx_sram.icf" used within EWARM Workspaces + +</div> + +<label for="collapse-section15" aria-hidden="true">V2.3.2 / 26-June-2015</label> +<div> + +## Main Changes + +- "stm32f405xx.h", "stm32f407xx.h", "stm32f415xx.h" and "stm32f417xx.h" + - Update FSMC_BTRx_DATAST and FSMC_BWTRx_DATAST (where x can be 1, 2, 3 and 4) mask on 8bits instead of 4bits +- "stm32f427xx.h", "stm32f437xx.h", "stm32f429xx.h" and "stm32f439xx.h" + - Update the defined mask value for SAI_xSR_FLVL_2 +- "stm32f415xx.h", "stm32f417xx.h", "stm32f437xx.h" and "stm32f439xx.h" + - HASH alignement with bits namming used in documentation + - Rename HASH_IMR_DINIM to HASH_IMR_DINIE + - Rename HASH_IMR_DCIM to HASH_IMR_DCIE + - Rename HASH_STR_NBW to HASH_STR_NBW +- system_stm32f4xx.c + - Remove __IO on constant table declaration + - Implement workaround to cover RCC limitation regarding peripheral enable delay + - SystemInit_ExtMemCtl() update GPIO configuration when external SDRAM is used + +</div> + +<label for="collapse-section14" aria-hidden="true">V2.3.1 / 03-April-2015</label> +<div> + +## Main Changes + +- Header file for all STM32 devices + - Update SRAM2, SRAM3 and BKPSRAM Bit-Banding base address defined values + - Keep reference to SRAM3 only for STM32F42xx and STM32F43xx devices + - Remove CCMDATARAM_BB_BASE: the CCM Data RAM region is not accessible via Bit-Banding + - Update the RTC_PRER_PREDIV_S defined value to 0x00007FFF instead of 0x00001FFF + +</div> + +<label for="collapse-section13" aria-hidden="true">V2.3.0 / 02-March-2015</label> +<div> + +## Main Changes + +- Add support of STM32F446xx devices + - Add "stm32f446xx.h" file + - Add startup file "startup_stm32f446xx.s" for EWARM, MDK-ARM and TrueSTUDIO toolchains + - Add Linker files "stm32f446xx_flash.icf" and "stm32f446xx_sram.icf" used within EWARM Workspaces +- Header file for all STM32 devices + - Add missing bits definition in the EXTI IMR, EMR, RTSR, FTSR, SWIER and PR registers + - Update RCC_AHB1RSTR_OTGHRST bit definition + - Update PWR_CR_VOS bits definition for STM32F40xx and STM32F41xx devices + - update SAI_xCR1_MCKDIV bit definition + +</div> + +<label for="collapse-section12" aria-hidden="true">V2.2.0 / 15-December-2014</label> +<div> + +## Main Changes + +- stm32f4xx.h + - Add new constant definition STM32F4 +- system_stm32f4xx.c + - Fix SDRAM configuration in SystemInit_ExtMemCtl(): change RowBitsNumber from 11 to 12 (for MT48LC4M32B2 available on STM324x9I_EVAL board) +- Header file for all STM32 devices + - Add missing bits definition for CAN, FMC and USB peripherals + - GPIO_TypeDef: change the BSRR register definition, the two 16-bits definition BSRRH and BSRRL are merged in a single 32-bits definition BSRR + +</div> + +<label for="collapse-section11" aria-hidden="true">V2.1.0 / 19-June-2014</label> +<div> + +## Main Changes + +- Add support of STM32F411xExx devices + - Add "stm32f411xe.h" file + - Add startup file "startup_stm32f411xx.s" for EWARM, MDK-ARM and TrueSTUDIO toolchains +- All header files + - Add missing defines for GPIO LCKR Register + - Add defines for memories base and end addresses: FLASH, SRAM, BKPSRAM and CCMRAM. + - Add the following aliases for IRQ number and handler definition to ensure compatibility across the product lines of STM32F4 Series; + - example for STM32F405xx.h + + #define FMC_IRQn FSMC_IRQn + #define FMC_IRQHandler FSMC_IRQHandler + + - and for STM32F427xx.h + + #define FSMC_IRQn FMC_IRQn + #define FSMC_IRQHandler FMC_IRQHandler + +- "stm32f401xc.h" and "stm32f401xe.h": update to be in line with latest version of the Reference manual + - Remove RNG registers structures and the corresponding bit definitions + - Remove any occurrence to RNG (clock enable, clock reset,…) + - Add the following bit definition for PWR CR registerAdd the following bit definition for PWR CR register + - #define PWR_CR_ADCDC1 ((uint32_t)0x00002000) + - #define PWR_CR_LPLVDS ((uint32_t)0x00000400) + - #define PWR_CR_MRLVDS ((uint32_t)0x00000800) +- "stm32f427xx.h", "stm32f437xx.h", "stm32f429xx.h" and "stm32f439xx.h" + - Add a new legacy bit definition for PWR to be in line with latest version of the Reference manual + - #define PWR_CR_LPUDS PWR_CR_LPLVDS + - #define PWR_CR_MRUDS PWR_CR_MRLVDS +- Update startup files for EWARM toolchain to cope with compiler enhancement of the V7.10 version +- system_stm32f4xx.c + - Remove dependency vs. the HAL, to allow using this file without the need to have the HAL drivers + - Include stm32f4xx.h instead of stm32f4xx_hal.h + - Add definition of HSE_VALUE and HSI_VALUE, if they are not yet defined in the compilation scope (these values are defined in stm32f4xx_hal_conf). + - Use “__IO const” instead of “__I”, to avoid any compilation issue when __cplusplus switch is defined + +</div> + +<label for="collapse-section10" aria-hidden="true">V2.0.0 / 18-Fabruary-2014</label> +<div> + +## Main Changes + +- Update based on STM32Cube specification +- This version and later has to be used only with STM32CubeF4 based development + +</div> + +<label for="collapse-section9" aria-hidden="true">V1.3.0 / 08-November-2013</label> +<div> + +## Main Changes + +- Add support of STM32F401xExx devices +- Update startup files "startup_stm32f401xx.s" for EWARM, MDK-ARM, TrueSTUDIO and Ride toolchains: Add SPI4 interrupt handler entry in the vector table + +</div> + +<label for="collapse-section8" aria-hidden="true">V1.2.1 / 19-September-2013</label> +<div> + +## Main Changes + +- system_stm32f4xx.c : Update FMC SDRAM configuration (RBURST mode activation) +- Update startup files "startup_stm32f427_437xx.s" and "startup_stm32f429_439xx.s" for TrueSTUDIO and Ride toolchains and maintain the old name of startup files for legacy purpose + +</div> + +<label for="collapse-section7" aria-hidden="true">V1.2.0 / 11-September-2013</label> +<div> + +## Main Changes + +- Add support of STM32F429/439xx and STM32F401xCxx devices +- Update definition of STM32F427/437xx devices : extension of the features to include system clock up to 180MHz, dual bank Flash, reduced STOP Mode current, SAI, PCROP, SDRAM and DMA2D +- stm32f4xx.h + - Add the following device defines : + - "#define STM32F40_41xxx" for all STM32405/415/407/417xx devices + - "#define STM32F427_437xx" for all STM32F427/437xx devices + - "#define STM32F429_439xx" for all STM32F429/439xx devices + - "#define STM32F401xx" for all STM32F401xx devices + - Maintain the old device define for legacy purpose + - Update IRQ handler enumeration structure to support all STM32F4xx Family devices. +- Add new startup files "startup_stm32f40_41xxx.s","startup_stm32f427_437xx.s", "startup_stm32f429_439xx.s" and "startup_stm32f401xx.s" for all toolchains and maintain the old name for startup files for legacy purpose +- system_stm32f4xx.c + - Update the system configuration to support all STM32F4xx Family devices. + +</div> + +<label for="collapse-section6" aria-hidden="true">V1.1.0 / 11-January-2013</label> +<div> + +## Main Changes + +- Official release for STM32F427x/437x devices. +- stm32f4xx.h + - Update product define: replace "#define STM32F4XX" by "#define STM32F40XX" for STM32F40x/41x devices + - Add new product define: "#define STM32F427X" for STM32F427x/437x devices. +- Add new startup files "startup_stm32f427x.s" for all toolchains +- rename startup files "startup_stm32f4xx.s" by "startup_stm32f40xx.s" for all toolchains +- system_stm32f4xx.c + - Prefetch Buffer enabled + - Add reference to STM32F427x/437x devices and STM324x7I_EVAL board + - SystemInit_ExtMemCtl() function + - Add configuration of missing FSMC address and data lines + - Change memory type to SRAM instead of PSRAM (PSRAM is available only on STM324xG-EVAL RevA) and update timing values + +</div> + +<label for="collapse-section5" aria-hidden="true">V1.0.2 / 05-March-2012</label> +<div> + +## Main Changes + +- All source files: license disclaimer text update and add link to the License file on ST Internet. + +</div> + +<label for="collapse-section4" aria-hidden="true">V1.0.1 / 28-December-2011</label> +<div> + +## Main Changes + +- All source files: update disclaimer to add reference to the new license agreement +- stm32f4xx.h + - Correct bit definition: RCC_AHB2RSTR_HSAHRST changed to RCC_AHB2RSTR_HASHRST + +</div> + +<label for="collapse-section3" aria-hidden="true">V1.0.0 / 30-September-2011</label> +<div> + +## Main Changes + +- First official release for STM32F40x/41x devices +- Add startup file for TASKING toolchain +- system_stm32f4xx.c: driver's comments update + +</div> + +<label for="collapse-section2" aria-hidden="true">V1.0.0RC2 / 26-September-2011</label> +<div> + +## Main Changes + +- Official version (V1.0.0) Release Candidate2 for STM32F40x/41x devices +- stm32f4xx.h + - Add define for Cortex-M4 revision __CM4_REV + - Correct RCC_CFGR_PPRE2_DIV16 bit (in RCC_CFGR register) value to 0x0000E000 + - Correct some bits definition to be in line with naming used in the Reference Manual (RM0090) + - GPIO_OTYPER_IDR_x changed to GPIO_IDR_IDR_x + - GPIO_OTYPER_ODR_x changed to GPIO_ODR_ODR_x + - SYSCFG_PMC_MII_RMII changed to SYSCFG_PMC_MII_RMII_SEL + - RCC_APB2RSTR_SPI1 changed to RCC_APB2RSTR_SPI1RST + - DBGMCU_APB1_FZ_DBG_IWDEG_STOP changed to DBGMCU_APB1_FZ_DBG_IWDG_STOP + - PWR_CR_PMODE changed to PWR_CR_VOS + - PWR_CSR_REGRDY changed to PWR_CSR_VOSRDY + - Add new define RCC_AHB1ENR_CCMDATARAMEN + - Add new defines SRAM2_BASE, CCMDATARAM_BASE and BKPSRAM_BASE + - GPIO_TypeDef structure: in the comment change AFR[2] address mapping to 0x20-0x24 instead of 0x24-0x28 +- system_stm32f4xx.c + - SystemInit(): add code to enable the FPU + - SetSysClock(): change PWR_CR_PMODE by PWR_CR_VOS + - SystemInit_ExtMemCtl(): remove commented values +- startup (for all compilers) + - Delete code used to enable the FPU (moved to system_stm32f4xx.c file) + - File’s header updated + +</div> + +<label for="collapse-section1" aria-hidden="true">V1.0.0RC1 / 25-August-2011</label> +<div> + +## Main Changes + +- Official version (V1.0.0) Release Candidate1 for STM32F4xx devices + +</div> + + +For complete documentation on <mark>STM32 Microcontrollers</mark> , +visit: [http://www.st.com/STM32](http://www.st.com/STM32) \ No newline at end of file
diff --git a/Source/Templates/system_stm32f4xx.c b/Source/Templates/system_stm32f4xx.c index 504229c..9696828 100644 --- a/Source/Templates/system_stm32f4xx.c +++ b/Source/Templates/system_stm32f4xx.c
@@ -4,16 +4,16 @@ * @author MCD Application Team * @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File. * - * This file provides two functions and one global variable to be called from + * This file provides two functions and one global variable to be called from * user application: - * - SystemInit(): This function is called at startup just after reset and + * - SystemInit(): This function is called at startup just after reset and * before branch to main program. This call is made inside * the "startup_stm32f4xx.s" file. * * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used - * by the user application to setup the SysTick + * by the user application to setup the SysTick * timer or configure other parameters. - * + * * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must * be called whenever the core clock is changed * during program execution. @@ -38,8 +38,8 @@ /** @addtogroup stm32f4xx_system * @{ - */ - + */ + /** @addtogroup STM32F4xx_System_Private_Includes * @{ */ @@ -47,7 +47,7 @@ #include "stm32f4xx.h" -#if !defined (HSE_VALUE) +#if !defined (HSE_VALUE) #define HSE_VALUE ((uint32_t)25000000) /*!< Default value of the External oscillator in Hz */ #endif /* HSE_VALUE */ @@ -79,7 +79,7 @@ /* #define DATA_IN_ExtSRAM */ #endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx ||\ STM32F412Zx || STM32F412Vx */ - + #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\ || defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) /* #define DATA_IN_ExtSDRAM */ @@ -129,7 +129,7 @@ /* This variable is updated in three ways: 1) by calling CMSIS function SystemCoreClockUpdate() 2) by calling HAL API function HAL_RCC_GetHCLKFreq() - 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency + 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency Note: If you use this function to configure the system clock; then there is no need to call the 2 first functions listed above, since SystemCoreClock variable is updated automatically. @@ -146,7 +146,7 @@ */ #if defined (DATA_IN_ExtSRAM) || defined (DATA_IN_ExtSDRAM) - static void SystemInit_ExtMemCtl(void); + static void SystemInit_ExtMemCtl(void); #endif /* DATA_IN_ExtSRAM || DATA_IN_ExtSDRAM */ /** @@ -159,7 +159,7 @@ /** * @brief Setup the microcontroller system - * Initialize the FPU setting, vector table location and External memory + * Initialize the FPU setting, vector table location and External memory * configuration. * @param None * @retval None @@ -172,7 +172,7 @@ #endif #if defined (DATA_IN_ExtSRAM) || defined (DATA_IN_ExtSDRAM) - SystemInit_ExtMemCtl(); + SystemInit_ExtMemCtl(); #endif /* DATA_IN_ExtSRAM || DATA_IN_ExtSDRAM */ /* Configure the Vector Table location -------------------------------------*/ @@ -188,41 +188,41 @@ * The SystemCoreClock variable contains the core clock (HCLK), it can * be used by the user application to setup the SysTick timer or configure * other parameters. - * + * * @note Each time the core clock (HCLK) changes, this function must be called * to update SystemCoreClock variable value. Otherwise, any configuration - * based on this variable will be incorrect. - * - * @note - The system frequency computed by this function is not the real - * frequency in the chip. It is calculated based on the predefined + * based on this variable will be incorrect. + * + * @note - The system frequency computed by this function is not the real + * frequency in the chip. It is calculated based on the predefined * constant and the selected clock source: - * + * * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*) - * + * * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**) - * - * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**) + * + * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**) * or HSI_VALUE(*) multiplied/divided by the PLL factors. - * + * * (*) HSI_VALUE is a constant defined in stm32f4xx_hal_conf.h file (default value * 16 MHz) but the real value may vary depending on the variations - * in voltage and temperature. - * + * in voltage and temperature. + * * (**) HSE_VALUE is a constant defined in stm32f4xx_hal_conf.h file (its value * depends on the application requirements), user has to ensure that HSE_VALUE * is same as the real frequency of the crystal used. Otherwise, this function * may have wrong result. - * + * * - The result of this function could be not correct when using fractional * value for HSE crystal. - * + * * @param None * @retval None */ void SystemCoreClockUpdate(void) { uint32_t tmp, pllvco, pllp, pllsource, pllm; - + /* Get SYSCLK source -------------------------------------------------------*/ tmp = RCC->CFGR & RCC_CFGR_SWS; @@ -238,10 +238,10 @@ /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N SYSCLK = PLL_VCO / PLL_P - */ + */ pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22; pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; - + if (pllsource != 0) { /* HSE used as PLL clock source */ @@ -290,79 +290,79 @@ /* Delay after an RCC peripheral clock enabling */ tmp = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOCEN); - + /* Connect PDx pins to FMC Alternate function */ GPIOD->AFR[0] = 0x00CCC0CC; GPIOD->AFR[1] = 0xCCCCCCCC; - /* Configure PDx pins in Alternate function mode */ + /* Configure PDx pins in Alternate function mode */ GPIOD->MODER = 0xAAAA0A8A; - /* Configure PDx pins speed to 100 MHz */ + /* Configure PDx pins speed to 100 MHz */ GPIOD->OSPEEDR = 0xFFFF0FCF; - /* Configure PDx pins Output type to push-pull */ + /* Configure PDx pins Output type to push-pull */ GPIOD->OTYPER = 0x00000000; - /* No pull-up, pull-down for PDx pins */ + /* No pull-up, pull-down for PDx pins */ GPIOD->PUPDR = 0x00000000; /* Connect PEx pins to FMC Alternate function */ GPIOE->AFR[0] = 0xC00CC0CC; GPIOE->AFR[1] = 0xCCCCCCCC; - /* Configure PEx pins in Alternate function mode */ + /* Configure PEx pins in Alternate function mode */ GPIOE->MODER = 0xAAAA828A; - /* Configure PEx pins speed to 100 MHz */ + /* Configure PEx pins speed to 100 MHz */ GPIOE->OSPEEDR = 0xFFFFC3CF; - /* Configure PEx pins Output type to push-pull */ + /* Configure PEx pins Output type to push-pull */ GPIOE->OTYPER = 0x00000000; - /* No pull-up, pull-down for PEx pins */ + /* No pull-up, pull-down for PEx pins */ GPIOE->PUPDR = 0x00000000; - + /* Connect PFx pins to FMC Alternate function */ GPIOF->AFR[0] = 0xCCCCCCCC; GPIOF->AFR[1] = 0xCCCCCCCC; - /* Configure PFx pins in Alternate function mode */ + /* Configure PFx pins in Alternate function mode */ GPIOF->MODER = 0xAA800AAA; - /* Configure PFx pins speed to 50 MHz */ + /* Configure PFx pins speed to 50 MHz */ GPIOF->OSPEEDR = 0xAA800AAA; - /* Configure PFx pins Output type to push-pull */ + /* Configure PFx pins Output type to push-pull */ GPIOF->OTYPER = 0x00000000; - /* No pull-up, pull-down for PFx pins */ + /* No pull-up, pull-down for PFx pins */ GPIOF->PUPDR = 0x00000000; /* Connect PGx pins to FMC Alternate function */ GPIOG->AFR[0] = 0xCCCCCCCC; GPIOG->AFR[1] = 0xCCCCCCCC; - /* Configure PGx pins in Alternate function mode */ + /* Configure PGx pins in Alternate function mode */ GPIOG->MODER = 0xAAAAAAAA; - /* Configure PGx pins speed to 50 MHz */ + /* Configure PGx pins speed to 50 MHz */ GPIOG->OSPEEDR = 0xAAAAAAAA; - /* Configure PGx pins Output type to push-pull */ + /* Configure PGx pins Output type to push-pull */ GPIOG->OTYPER = 0x00000000; - /* No pull-up, pull-down for PGx pins */ + /* No pull-up, pull-down for PGx pins */ GPIOG->PUPDR = 0x00000000; - + /* Connect PHx pins to FMC Alternate function */ GPIOH->AFR[0] = 0x00C0CC00; GPIOH->AFR[1] = 0xCCCCCCCC; - /* Configure PHx pins in Alternate function mode */ + /* Configure PHx pins in Alternate function mode */ GPIOH->MODER = 0xAAAA08A0; - /* Configure PHx pins speed to 50 MHz */ + /* Configure PHx pins speed to 50 MHz */ GPIOH->OSPEEDR = 0xAAAA08A0; - /* Configure PHx pins Output type to push-pull */ + /* Configure PHx pins Output type to push-pull */ GPIOH->OTYPER = 0x00000000; - /* No pull-up, pull-down for PHx pins */ + /* No pull-up, pull-down for PHx pins */ GPIOH->PUPDR = 0x00000000; - + /* Connect PIx pins to FMC Alternate function */ GPIOI->AFR[0] = 0xCCCCCCCC; GPIOI->AFR[1] = 0x00000CC0; - /* Configure PIx pins in Alternate function mode */ + /* Configure PIx pins in Alternate function mode */ GPIOI->MODER = 0x0028AAAA; - /* Configure PIx pins speed to 50 MHz */ + /* Configure PIx pins speed to 50 MHz */ GPIOI->OSPEEDR = 0x0028AAAA; - /* Configure PIx pins Output type to push-pull */ + /* Configure PIx pins Output type to push-pull */ GPIOI->OTYPER = 0x00000000; - /* No pull-up, pull-down for PIx pins */ + /* No pull-up, pull-down for PIx pins */ GPIOI->PUPDR = 0x00000000; - + /*-- FMC Configuration -------------------------------------------------------*/ /* Enable the FMC interface clock */ RCC->AHB3ENR |= 0x00000001; @@ -370,53 +370,53 @@ tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN); FMC_Bank5_6->SDCR[0] = 0x000019E4; - FMC_Bank5_6->SDTR[0] = 0x01115351; - + FMC_Bank5_6->SDTR[0] = 0x01115351; + /* SDRAM initialization sequence */ /* Clock enable command */ - FMC_Bank5_6->SDCMR = 0x00000011; - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; + FMC_Bank5_6->SDCMR = 0x00000011; + tmpreg = FMC_Bank5_6->SDSR & 0x00000020; while((tmpreg != 0) && (timeout-- > 0)) { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; + tmpreg = FMC_Bank5_6->SDSR & 0x00000020; } /* Delay */ for (index = 0; index<1000; index++); - + /* PALL command */ - FMC_Bank5_6->SDCMR = 0x00000012; + FMC_Bank5_6->SDCMR = 0x00000012; tmpreg = FMC_Bank5_6->SDSR & 0x00000020; timeout = 0xFFFF; while((tmpreg != 0) && (timeout-- > 0)) { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; + tmpreg = FMC_Bank5_6->SDSR & 0x00000020; } - + /* Auto refresh command */ FMC_Bank5_6->SDCMR = 0x00000073; tmpreg = FMC_Bank5_6->SDSR & 0x00000020; timeout = 0xFFFF; while((tmpreg != 0) && (timeout-- > 0)) { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; + tmpreg = FMC_Bank5_6->SDSR & 0x00000020; } - + /* MRD register program */ FMC_Bank5_6->SDCMR = 0x00046014; tmpreg = FMC_Bank5_6->SDSR & 0x00000020; timeout = 0xFFFF; while((tmpreg != 0) && (timeout-- > 0)) { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - } - + tmpreg = FMC_Bank5_6->SDSR & 0x00000020; + } + /* Set refresh count */ tmpreg = FMC_Bank5_6->SDRTR; FMC_Bank5_6->SDRTR = (tmpreg | (0x0000027C<<1)); - + /* Disable write protection */ - tmpreg = FMC_Bank5_6->SDCR[0]; + tmpreg = FMC_Bank5_6->SDCR[0]; FMC_Bank5_6->SDCR[0] = (tmpreg & 0xFFFFFDFF); #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) @@ -424,7 +424,7 @@ FMC_Bank1->BTCR[2] = 0x00001011; FMC_Bank1->BTCR[3] = 0x00000201; FMC_Bank1E->BWTR[2] = 0x0fffffff; -#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */ +#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */ #if defined(STM32F469xx) || defined(STM32F479xx) /* Configure and enable Bank1_SRAM2 */ FMC_Bank1->BTCR[2] = 0x00001091; @@ -432,7 +432,7 @@ FMC_Bank1E->BWTR[2] = 0x0fffffff; #endif /* STM32F469xx || STM32F479xx */ - (void)(tmp); + (void)(tmp); } #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */ #elif defined (DATA_IN_ExtSRAM) || defined (DATA_IN_ExtSDRAM) @@ -458,13 +458,13 @@ clock */ RCC->AHB1ENR |= 0x0000007D; #else - /* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface + /* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */ RCC->AHB1ENR |= 0x000001F8; -#endif /* STM32F446xx */ +#endif /* STM32F446xx */ /* Delay after an RCC peripheral clock enabling */ tmp = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOCEN); - + #if defined(STM32F446xx) /* Connect PAx pins to FMC Alternate function */ GPIOA->AFR[0] |= 0xC0000000; @@ -494,78 +494,78 @@ /* Connect PDx pins to FMC Alternate function */ GPIOD->AFR[0] = 0x000000CC; GPIOD->AFR[1] = 0xCC000CCC; - /* Configure PDx pins in Alternate function mode */ + /* Configure PDx pins in Alternate function mode */ GPIOD->MODER = 0xA02A000A; - /* Configure PDx pins speed to 50 MHz */ + /* Configure PDx pins speed to 50 MHz */ GPIOD->OSPEEDR = 0xA02A000A; - /* Configure PDx pins Output type to push-pull */ + /* Configure PDx pins Output type to push-pull */ GPIOD->OTYPER = 0x00000000; - /* No pull-up, pull-down for PDx pins */ + /* No pull-up, pull-down for PDx pins */ GPIOD->PUPDR = 0x00000000; /* Connect PEx pins to FMC Alternate function */ GPIOE->AFR[0] = 0xC00000CC; GPIOE->AFR[1] = 0xCCCCCCCC; - /* Configure PEx pins in Alternate function mode */ + /* Configure PEx pins in Alternate function mode */ GPIOE->MODER = 0xAAAA800A; - /* Configure PEx pins speed to 50 MHz */ + /* Configure PEx pins speed to 50 MHz */ GPIOE->OSPEEDR = 0xAAAA800A; - /* Configure PEx pins Output type to push-pull */ + /* Configure PEx pins Output type to push-pull */ GPIOE->OTYPER = 0x00000000; - /* No pull-up, pull-down for PEx pins */ + /* No pull-up, pull-down for PEx pins */ GPIOE->PUPDR = 0x00000000; /* Connect PFx pins to FMC Alternate function */ GPIOF->AFR[0] = 0xCCCCCCCC; GPIOF->AFR[1] = 0xCCCCCCCC; - /* Configure PFx pins in Alternate function mode */ + /* Configure PFx pins in Alternate function mode */ GPIOF->MODER = 0xAA800AAA; - /* Configure PFx pins speed to 50 MHz */ + /* Configure PFx pins speed to 50 MHz */ GPIOF->OSPEEDR = 0xAA800AAA; - /* Configure PFx pins Output type to push-pull */ + /* Configure PFx pins Output type to push-pull */ GPIOF->OTYPER = 0x00000000; - /* No pull-up, pull-down for PFx pins */ + /* No pull-up, pull-down for PFx pins */ GPIOF->PUPDR = 0x00000000; /* Connect PGx pins to FMC Alternate function */ GPIOG->AFR[0] = 0xCCCCCCCC; GPIOG->AFR[1] = 0xCCCCCCCC; - /* Configure PGx pins in Alternate function mode */ + /* Configure PGx pins in Alternate function mode */ GPIOG->MODER = 0xAAAAAAAA; - /* Configure PGx pins speed to 50 MHz */ + /* Configure PGx pins speed to 50 MHz */ GPIOG->OSPEEDR = 0xAAAAAAAA; - /* Configure PGx pins Output type to push-pull */ + /* Configure PGx pins Output type to push-pull */ GPIOG->OTYPER = 0x00000000; - /* No pull-up, pull-down for PGx pins */ + /* No pull-up, pull-down for PGx pins */ GPIOG->PUPDR = 0x00000000; #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\ - || defined(STM32F469xx) || defined(STM32F479xx) + || defined(STM32F469xx) || defined(STM32F479xx) /* Connect PHx pins to FMC Alternate function */ GPIOH->AFR[0] = 0x00C0CC00; GPIOH->AFR[1] = 0xCCCCCCCC; - /* Configure PHx pins in Alternate function mode */ + /* Configure PHx pins in Alternate function mode */ GPIOH->MODER = 0xAAAA08A0; - /* Configure PHx pins speed to 50 MHz */ + /* Configure PHx pins speed to 50 MHz */ GPIOH->OSPEEDR = 0xAAAA08A0; - /* Configure PHx pins Output type to push-pull */ + /* Configure PHx pins Output type to push-pull */ GPIOH->OTYPER = 0x00000000; - /* No pull-up, pull-down for PHx pins */ + /* No pull-up, pull-down for PHx pins */ GPIOH->PUPDR = 0x00000000; - + /* Connect PIx pins to FMC Alternate function */ GPIOI->AFR[0] = 0xCCCCCCCC; GPIOI->AFR[1] = 0x00000CC0; - /* Configure PIx pins in Alternate function mode */ + /* Configure PIx pins in Alternate function mode */ GPIOI->MODER = 0x0028AAAA; - /* Configure PIx pins speed to 50 MHz */ + /* Configure PIx pins speed to 50 MHz */ GPIOI->OSPEEDR = 0x0028AAAA; - /* Configure PIx pins Output type to push-pull */ + /* Configure PIx pins Output type to push-pull */ GPIOI->OTYPER = 0x00000000; - /* No pull-up, pull-down for PIx pins */ + /* No pull-up, pull-down for PIx pins */ GPIOI->PUPDR = 0x00000000; #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */ - + /*-- FMC Configuration -------------------------------------------------------*/ /* Enable the FMC interface clock */ RCC->AHB3ENR |= 0x00000001; @@ -575,68 +575,68 @@ /* Configure and enable SDRAM bank1 */ #if defined(STM32F446xx) FMC_Bank5_6->SDCR[0] = 0x00001954; -#else +#else FMC_Bank5_6->SDCR[0] = 0x000019E4; #endif /* STM32F446xx */ - FMC_Bank5_6->SDTR[0] = 0x01115351; - + FMC_Bank5_6->SDTR[0] = 0x01115351; + /* SDRAM initialization sequence */ /* Clock enable command */ - FMC_Bank5_6->SDCMR = 0x00000011; - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; + FMC_Bank5_6->SDCMR = 0x00000011; + tmpreg = FMC_Bank5_6->SDSR & 0x00000020; while((tmpreg != 0) && (timeout-- > 0)) { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; + tmpreg = FMC_Bank5_6->SDSR & 0x00000020; } /* Delay */ for (index = 0; index<1000; index++); - + /* PALL command */ - FMC_Bank5_6->SDCMR = 0x00000012; + FMC_Bank5_6->SDCMR = 0x00000012; tmpreg = FMC_Bank5_6->SDSR & 0x00000020; timeout = 0xFFFF; while((tmpreg != 0) && (timeout-- > 0)) { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; + tmpreg = FMC_Bank5_6->SDSR & 0x00000020; } - + /* Auto refresh command */ #if defined(STM32F446xx) FMC_Bank5_6->SDCMR = 0x000000F3; -#else +#else FMC_Bank5_6->SDCMR = 0x00000073; #endif /* STM32F446xx */ tmpreg = FMC_Bank5_6->SDSR & 0x00000020; timeout = 0xFFFF; while((tmpreg != 0) && (timeout-- > 0)) { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; + tmpreg = FMC_Bank5_6->SDSR & 0x00000020; } - + /* MRD register program */ #if defined(STM32F446xx) FMC_Bank5_6->SDCMR = 0x00044014; -#else +#else FMC_Bank5_6->SDCMR = 0x00046014; #endif /* STM32F446xx */ tmpreg = FMC_Bank5_6->SDSR & 0x00000020; timeout = 0xFFFF; while((tmpreg != 0) && (timeout-- > 0)) { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - } - + tmpreg = FMC_Bank5_6->SDSR & 0x00000020; + } + /* Set refresh count */ tmpreg = FMC_Bank5_6->SDRTR; #if defined(STM32F446xx) FMC_Bank5_6->SDRTR = (tmpreg | (0x0000050C<<1)); -#else +#else FMC_Bank5_6->SDRTR = (tmpreg | (0x0000027C<<1)); #endif /* STM32F446xx */ - + /* Disable write protection */ - tmpreg = FMC_Bank5_6->SDCR[0]; + tmpreg = FMC_Bank5_6->SDCR[0]; FMC_Bank5_6->SDCR[0] = (tmpreg & 0xFFFFFDFF); #endif /* DATA_IN_ExtSDRAM */ #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx || STM32F479xx */ @@ -651,55 +651,55 @@ RCC->AHB1ENR |= 0x00000078; /* Delay after an RCC peripheral clock enabling */ tmp = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIODEN); - + /* Connect PDx pins to FMC Alternate function */ GPIOD->AFR[0] = 0x00CCC0CC; GPIOD->AFR[1] = 0xCCCCCCCC; - /* Configure PDx pins in Alternate function mode */ + /* Configure PDx pins in Alternate function mode */ GPIOD->MODER = 0xAAAA0A8A; - /* Configure PDx pins speed to 100 MHz */ + /* Configure PDx pins speed to 100 MHz */ GPIOD->OSPEEDR = 0xFFFF0FCF; - /* Configure PDx pins Output type to push-pull */ + /* Configure PDx pins Output type to push-pull */ GPIOD->OTYPER = 0x00000000; - /* No pull-up, pull-down for PDx pins */ + /* No pull-up, pull-down for PDx pins */ GPIOD->PUPDR = 0x00000000; /* Connect PEx pins to FMC Alternate function */ GPIOE->AFR[0] = 0xC00CC0CC; GPIOE->AFR[1] = 0xCCCCCCCC; - /* Configure PEx pins in Alternate function mode */ + /* Configure PEx pins in Alternate function mode */ GPIOE->MODER = 0xAAAA828A; - /* Configure PEx pins speed to 100 MHz */ + /* Configure PEx pins speed to 100 MHz */ GPIOE->OSPEEDR = 0xFFFFC3CF; - /* Configure PEx pins Output type to push-pull */ + /* Configure PEx pins Output type to push-pull */ GPIOE->OTYPER = 0x00000000; - /* No pull-up, pull-down for PEx pins */ + /* No pull-up, pull-down for PEx pins */ GPIOE->PUPDR = 0x00000000; /* Connect PFx pins to FMC Alternate function */ GPIOF->AFR[0] = 0x00CCCCCC; GPIOF->AFR[1] = 0xCCCC0000; - /* Configure PFx pins in Alternate function mode */ + /* Configure PFx pins in Alternate function mode */ GPIOF->MODER = 0xAA000AAA; - /* Configure PFx pins speed to 100 MHz */ + /* Configure PFx pins speed to 100 MHz */ GPIOF->OSPEEDR = 0xFF000FFF; - /* Configure PFx pins Output type to push-pull */ + /* Configure PFx pins Output type to push-pull */ GPIOF->OTYPER = 0x00000000; - /* No pull-up, pull-down for PFx pins */ + /* No pull-up, pull-down for PFx pins */ GPIOF->PUPDR = 0x00000000; /* Connect PGx pins to FMC Alternate function */ GPIOG->AFR[0] = 0x00CCCCCC; GPIOG->AFR[1] = 0x000000C0; - /* Configure PGx pins in Alternate function mode */ + /* Configure PGx pins in Alternate function mode */ GPIOG->MODER = 0x00085AAA; - /* Configure PGx pins speed to 100 MHz */ + /* Configure PGx pins speed to 100 MHz */ GPIOG->OSPEEDR = 0x000CAFFF; - /* Configure PGx pins Output type to push-pull */ + /* Configure PGx pins Output type to push-pull */ GPIOG->OTYPER = 0x00000000; - /* No pull-up, pull-down for PGx pins */ + /* No pull-up, pull-down for PGx pins */ GPIOG->PUPDR = 0x00000000; - + /*-- FMC/FSMC Configuration --------------------------------------------------*/ /* Enable the FMC/FSMC interface clock */ RCC->AHB3ENR |= 0x00000001; @@ -711,7 +711,7 @@ FMC_Bank1->BTCR[2] = 0x00001011; FMC_Bank1->BTCR[3] = 0x00000201; FMC_Bank1E->BWTR[2] = 0x0fffffff; -#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */ +#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */ #if defined(STM32F469xx) || defined(STM32F479xx) /* Delay after an RCC peripheral clock enabling */ tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN); @@ -732,8 +732,8 @@ #endif /* DATA_IN_ExtSRAM */ #endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\ - STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Vx */ - (void)(tmp); + STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Vx */ + (void)(tmp); } #endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */ /**