Updated CMSIS header files for STM32F4 to version 2.6.7

pull/67/head
Silvano Seva 2022-01-15 14:55:59 +01:00
rodzic ce5ff047ee
commit 3fb93f0a86
6 zmienionych plików z 14757 dodań i 12176 usunięć

Wyświetl plik

@ -180,7 +180,7 @@ stm32f405_inc = ['platform/mcu/CMSIS/Include',
'platform/mcu/STM32F4xx/drivers', 'platform/mcu/STM32F4xx/drivers',
'platform/mcu/STM32F4xx/drivers/usb'] 'platform/mcu/STM32F4xx/drivers/usb']
stm32f405_def = {'STM32F40_41xxx': '', 'HSE_VALUE':'8000000', stm32f405_def = {'STM32F405xx': '', 'HSE_VALUE':'8000000',
'_POSIX_PRIORITY_SCHEDULING':''} '_POSIX_PRIORITY_SCHEDULING':''}
## ##

Wyświetl plik

@ -1,105 +1,122 @@
/** /**
****************************************************************************** ******************************************************************************
* @file system_stm32f4xx.h * @file system_stm32f4xx.h
* @author MCD Application Team * @author MCD Application Team
* @version V1.8.0 * @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
* @date 09-November-2016 ******************************************************************************
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices. * @attention
****************************************************************************** *
* @attention * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
* *
* <h2><center>&copy; COPYRIGHT 2016 STMicroelectronics</center></h2> * Redistribution and use in source and binary forms, with or without modification,
* * are permitted provided that the following conditions are met:
* Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); * 1. Redistributions of source code must retain the above copyright notice,
* You may not use this file except in compliance with the License. * this list of conditions and the following disclaimer.
* You may obtain a copy of the License at: * 2. Redistributions in binary form must reproduce the above copyright notice,
* * this list of conditions and the following disclaimer in the documentation
* http://www.st.com/software_license_agreement_liberty_v2 * and/or other materials provided with the distribution.
* * 3. Neither the name of STMicroelectronics nor the names of its contributors
* Unless required by applicable law or agreed to in writing, software * may be used to endorse or promote products derived from this software
* distributed under the License is distributed on an "AS IS" BASIS, * without specific prior written permission.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
* See the License for the specific language governing permissions and * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* limitations under the License. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
****************************************************************************** * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
*/ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
/** @addtogroup CMSIS * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* @{ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
*/ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/** @addtogroup stm32f4xx_system *
* @{ ******************************************************************************
*/ */
/** /** @addtogroup CMSIS
* @brief Define to prevent recursive inclusion * @{
*/ */
#ifndef __SYSTEM_STM32F4XX_H
#define __SYSTEM_STM32F4XX_H /** @addtogroup stm32f4xx_system
* @{
#ifdef __cplusplus */
extern "C" {
#endif /**
* @brief Define to prevent recursive inclusion
/** @addtogroup STM32F4xx_System_Includes */
* @{ #ifndef __SYSTEM_STM32F4XX_H
*/ #define __SYSTEM_STM32F4XX_H
/** #ifdef __cplusplus
* @} extern "C" {
*/ #endif
/** @addtogroup STM32F4xx_System_Includes
/** @addtogroup STM32F4xx_System_Exported_types * @{
* @{ */
*/
/**
extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ * @}
*/
/**
* @} /** @addtogroup STM32F4xx_System_Exported_types
*/ * @{
*/
/** @addtogroup STM32F4xx_System_Exported_Constants /* This variable is updated in three ways:
* @{ 1) by calling CMSIS function SystemCoreClockUpdate()
*/ 2) by calling HAL API function HAL_RCC_GetSysClockFreq()
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.
*/
/** @addtogroup STM32F4xx_System_Exported_Macros extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
* @{
*/ extern const uint8_t AHBPrescTable[16]; /*!< AHB prescalers table values */
extern const uint8_t APBPrescTable[8]; /*!< APB prescalers table values */
/**
* @} /**
*/ * @}
*/
/** @addtogroup STM32F4xx_System_Exported_Functions
* @{ /** @addtogroup STM32F4xx_System_Exported_Constants
*/ * @{
*/
extern void SystemInit(void);
extern void SystemCoreClockUpdate(void); /**
/** * @}
* @} */
*/
/** @addtogroup STM32F4xx_System_Exported_Macros
#ifdef __cplusplus * @{
} */
#endif
/**
#endif /*__SYSTEM_STM32F4XX_H */ * @}
*/
/**
* @} /** @addtogroup STM32F4xx_System_Exported_Functions
*/ * @{
*/
/**
* @} extern void SystemInit(void);
*/ extern void SystemCoreClockUpdate(void);
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ /**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /*__SYSTEM_STM32F4XX_H */
/**
* @}
*/
/**
* @}
*/
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

Wyświetl plik

@ -116,6 +116,14 @@
/************************* Miscellaneous Configuration ************************/ /************************* Miscellaneous Configuration ************************/
#define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field. #define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field.
This value must be a multiple of 0x200. */ This value must be a multiple of 0x200. */
#if !defined (HSE_STARTUP_TIMEOUT)
#define HSE_STARTUP_TIMEOUT ((uint16_t)0x05000) /*!< Time out for HSE start up */
#endif /* HSE_STARTUP_TIMEOUT */
#if !defined (HSI_VALUE)
#define HSI_VALUE ((uint32_t)16000000) /*!< Value of the Internal oscillator in Hz*/
#endif /* HSI_VALUE */
/******************************************************************************/ /******************************************************************************/
/************************* PLL Parameters *************************************/ /************************* PLL Parameters *************************************/
@ -132,9 +140,9 @@
/******************************************************************************/ /******************************************************************************/
uint32_t SystemCoreClock = 168000000; uint32_t SystemCoreClock = 168000000;
__I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; const uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
static void SetSysClock(void); static void SetSysClock(void);

Wyświetl plik

@ -117,12 +117,12 @@ void gpio_setOutputSpeed(void *port, uint8_t pin, enum Speed spd)
void gpio_setPin(void *port, uint8_t pin) void gpio_setPin(void *port, uint8_t pin)
{ {
((GPIO_TypeDef *)(port))->BSRRL = (1 << pin); ((GPIO_TypeDef *)(port))->BSRR = (1 << pin);
} }
void gpio_clearPin(void *port, uint8_t pin) void gpio_clearPin(void *port, uint8_t pin)
{ {
((GPIO_TypeDef *)(port))->BSRRH = (1 << pin); ((GPIO_TypeDef *)(port))->BSRR = (1 << (pin + 16));
} }
void gpio_togglePin(void *port, uint8_t pin) void gpio_togglePin(void *port, uint8_t pin)