mirror of https://github.com/ARMmbed/mbed-os.git
parent
8e15a6cc55
commit
a9b27da409
File diff suppressed because it is too large
Load Diff
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx.h
|
* @file stm32f4xx.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File.
|
* @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File.
|
||||||
*
|
*
|
||||||
* The file is the unique include file that the application programmer
|
* The file is the unique include file that the application programmer
|
||||||
|
@ -78,7 +78,8 @@
|
||||||
!defined (STM32F427xx) && !defined (STM32F437xx) && !defined (STM32F429xx) && !defined (STM32F439xx) && \
|
!defined (STM32F427xx) && !defined (STM32F437xx) && !defined (STM32F429xx) && !defined (STM32F439xx) && \
|
||||||
!defined (STM32F401xC) && !defined (STM32F401xE) && !defined (STM32F410Tx) && !defined (STM32F410Cx) && \
|
!defined (STM32F401xC) && !defined (STM32F401xE) && !defined (STM32F410Tx) && !defined (STM32F410Cx) && \
|
||||||
!defined (STM32F410Rx) && !defined (STM32F411xE) && !defined (STM32F446xx) && !defined (STM32F469xx) && \
|
!defined (STM32F410Rx) && !defined (STM32F411xE) && !defined (STM32F446xx) && !defined (STM32F469xx) && \
|
||||||
!defined (STM32F479xx)
|
!defined (STM32F479xx) && !defined (STM32F412Cx) && !defined (STM32F412Rx) && !defined (STM32F412Vx) && \
|
||||||
|
!defined (STM32F412Zx)
|
||||||
/* #define STM32F405xx */ /*!< STM32F405RG, STM32F405VG and STM32F405ZG Devices */
|
/* #define STM32F405xx */ /*!< STM32F405RG, STM32F405VG and STM32F405ZG Devices */
|
||||||
/* #define STM32F415xx */ /*!< STM32F415RG, STM32F415VG and STM32F415ZG Devices */
|
/* #define STM32F415xx */ /*!< STM32F415RG, STM32F415VG and STM32F415ZG Devices */
|
||||||
/* #define STM32F407xx */ /*!< STM32F407VG, STM32F407VE, STM32F407ZG, STM32F407ZE, STM32F407IG and STM32F407IE Devices */
|
/* #define STM32F407xx */ /*!< STM32F407VG, STM32F407VE, STM32F407ZG, STM32F407ZE, STM32F407IG and STM32F407IE Devices */
|
||||||
|
@ -101,6 +102,10 @@
|
||||||
STM32F469NG, STM32F469AE, STM32F469IE, STM32F469BE and STM32F469NE Devices */
|
STM32F469NG, STM32F469AE, STM32F469IE, STM32F469BE and STM32F469NE Devices */
|
||||||
/* #define STM32F479xx */ /*!< STM32F479AI, STM32F479II, STM32F479BI, STM32F479NI, STM32F479AG, STM32F479IG, STM32F479BG
|
/* #define STM32F479xx */ /*!< STM32F479AI, STM32F479II, STM32F479BI, STM32F479NI, STM32F479AG, STM32F479IG, STM32F479BG
|
||||||
and STM32F479NG Devices */
|
and STM32F479NG Devices */
|
||||||
|
/* #define STM32F412Cx */ /*!< STM32F412CEU and STM32F412CGU Devices */
|
||||||
|
/* #define STM32F412Zx */ /*!< STM32F412ZET, STM32F412ZGT, STM32F412ZEJ and STM32F412ZGJ Devices */
|
||||||
|
/* #define STM32F412Vx */ /*!< STM32F412VET, STM32F412VGT, STM32F412VEH and STM32F412VGH Devices */
|
||||||
|
/* #define STM32F412Rx */ /*!< STM32F412RET, STM32F412RGT, STM32F412REY and STM32F412RGY Devices */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Tip: To avoid modifying this file each time you need to switch between these
|
/* Tip: To avoid modifying this file each time you need to switch between these
|
||||||
|
@ -116,11 +121,11 @@
|
||||||
#endif /* USE_HAL_DRIVER */
|
#endif /* USE_HAL_DRIVER */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief CMSIS version number V2.4.3
|
* @brief CMSIS version number V2.5.0
|
||||||
*/
|
*/
|
||||||
#define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
|
#define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_SUB1 (0x04U) /*!< [23:16] sub1 version */
|
#define __STM32F4xx_CMSIS_VERSION_SUB1 (0x05U) /*!< [23:16] sub1 version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x03U) /*!< [15:8] sub2 version */
|
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
|
#define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
|
||||||
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\
|
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\
|
||||||
|(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\
|
|(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\
|
||||||
|
@ -160,7 +165,7 @@
|
||||||
#elif defined(STM32F410Cx)
|
#elif defined(STM32F410Cx)
|
||||||
#include "stm32f410cx.h"
|
#include "stm32f410cx.h"
|
||||||
#elif defined(STM32F410Rx)
|
#elif defined(STM32F410Rx)
|
||||||
#include "stm32f410rx.h"
|
#include "stm32f410rx.h"
|
||||||
#elif defined(STM32F411xE)
|
#elif defined(STM32F411xE)
|
||||||
#include "stm32f411xe.h"
|
#include "stm32f411xe.h"
|
||||||
#elif defined(STM32F446xx)
|
#elif defined(STM32F446xx)
|
||||||
|
@ -169,6 +174,14 @@
|
||||||
#include "stm32f469xx.h"
|
#include "stm32f469xx.h"
|
||||||
#elif defined(STM32F479xx)
|
#elif defined(STM32F479xx)
|
||||||
#include "stm32f479xx.h"
|
#include "stm32f479xx.h"
|
||||||
|
#elif defined(STM32F412Cx)
|
||||||
|
#include "stm32f412cx.h"
|
||||||
|
#elif defined(STM32F412Zx)
|
||||||
|
#include "stm32f412zx.h"
|
||||||
|
#elif defined(STM32F412Rx)
|
||||||
|
#include "stm32f412rx.h"
|
||||||
|
#elif defined(STM32F412Vx)
|
||||||
|
#include "stm32f412vx.h"
|
||||||
#else
|
#else
|
||||||
#error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
|
#error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file system_stm32f4xx.c
|
* @file system_stm32f4xx.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File.
|
* @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
|
||||||
|
@ -108,9 +108,10 @@
|
||||||
/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */
|
/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
||||||
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
/* #define DATA_IN_ExtSRAM */
|
/* #define DATA_IN_ExtSRAM */
|
||||||
#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx */
|
#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx ||\
|
||||||
|
STM32F412Zx || STM32F412Vx */
|
||||||
|
|
||||||
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
|
@ -341,7 +342,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
__IO uint32_t tmp = 0x00;
|
__IO uint32_t tmp = 0x00;
|
||||||
|
|
||||||
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
||||||
register uint32_t index;
|
register __IO uint32_t index;
|
||||||
|
|
||||||
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
|
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
|
||||||
RCC->AHB1ENR |= 0x000001F8;
|
RCC->AHB1ENR |= 0x000001F8;
|
||||||
|
@ -506,7 +507,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
#if defined (DATA_IN_ExtSDRAM)
|
#if defined (DATA_IN_ExtSDRAM)
|
||||||
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
||||||
register uint32_t index;
|
register __IO uint32_t index;
|
||||||
|
|
||||||
#if defined(STM32F446xx)
|
#if defined(STM32F446xx)
|
||||||
/* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface
|
/* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface
|
||||||
|
@ -695,7 +696,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
|
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
||||||
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
|
|
||||||
#if defined(DATA_IN_ExtSRAM)
|
#if defined(DATA_IN_ExtSRAM)
|
||||||
/*-- GPIOs Configuration -----------------------------------------------------*/
|
/*-- GPIOs Configuration -----------------------------------------------------*/
|
||||||
|
@ -772,18 +773,19 @@ void SystemInit_ExtMemCtl(void)
|
||||||
FMC_Bank1->BTCR[3] = 0x00110212;
|
FMC_Bank1->BTCR[3] = 0x00110212;
|
||||||
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
||||||
#endif /* STM32F469xx || STM32F479xx */
|
#endif /* STM32F469xx || STM32F479xx */
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)\
|
||||||
|
|| defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
/* Delay after an RCC peripheral clock enabling */
|
/* Delay after an RCC peripheral clock enabling */
|
||||||
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN);
|
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN);
|
||||||
/* Configure and enable Bank1_SRAM2 */
|
/* Configure and enable Bank1_SRAM2 */
|
||||||
FSMC_Bank1->BTCR[2] = 0x00001011;
|
FSMC_Bank1->BTCR[2] = 0x00001011;
|
||||||
FSMC_Bank1->BTCR[3] = 0x00000201;
|
FSMC_Bank1->BTCR[3] = 0x00000201;
|
||||||
FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF;
|
FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF;
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx */
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F412Zx || STM32F412Vx */
|
||||||
|
|
||||||
#endif /* DATA_IN_ExtSRAM */
|
#endif /* DATA_IN_ExtSRAM */
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
||||||
STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */
|
STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Vx */
|
||||||
(void)(tmp);
|
(void)(tmp);
|
||||||
}
|
}
|
||||||
#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */
|
#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file system_stm32f4xx.h
|
* @file system_stm32f4xx.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
|
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx.h
|
* @file stm32f4xx.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File.
|
* @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File.
|
||||||
*
|
*
|
||||||
* The file is the unique include file that the application programmer
|
* The file is the unique include file that the application programmer
|
||||||
|
@ -78,7 +78,8 @@
|
||||||
!defined (STM32F427xx) && !defined (STM32F437xx) && !defined (STM32F429xx) && !defined (STM32F439xx) && \
|
!defined (STM32F427xx) && !defined (STM32F437xx) && !defined (STM32F429xx) && !defined (STM32F439xx) && \
|
||||||
!defined (STM32F401xC) && !defined (STM32F401xE) && !defined (STM32F410Tx) && !defined (STM32F410Cx) && \
|
!defined (STM32F401xC) && !defined (STM32F401xE) && !defined (STM32F410Tx) && !defined (STM32F410Cx) && \
|
||||||
!defined (STM32F410Rx) && !defined (STM32F411xE) && !defined (STM32F446xx) && !defined (STM32F469xx) && \
|
!defined (STM32F410Rx) && !defined (STM32F411xE) && !defined (STM32F446xx) && !defined (STM32F469xx) && \
|
||||||
!defined (STM32F479xx)
|
!defined (STM32F479xx) && !defined (STM32F412Cx) && !defined (STM32F412Rx) && !defined (STM32F412Vx) && \
|
||||||
|
!defined (STM32F412Zx)
|
||||||
/* #define STM32F405xx */ /*!< STM32F405RG, STM32F405VG and STM32F405ZG Devices */
|
/* #define STM32F405xx */ /*!< STM32F405RG, STM32F405VG and STM32F405ZG Devices */
|
||||||
/* #define STM32F415xx */ /*!< STM32F415RG, STM32F415VG and STM32F415ZG Devices */
|
/* #define STM32F415xx */ /*!< STM32F415RG, STM32F415VG and STM32F415ZG Devices */
|
||||||
/* #define STM32F407xx */ /*!< STM32F407VG, STM32F407VE, STM32F407ZG, STM32F407ZE, STM32F407IG and STM32F407IE Devices */
|
/* #define STM32F407xx */ /*!< STM32F407VG, STM32F407VE, STM32F407ZG, STM32F407ZE, STM32F407IG and STM32F407IE Devices */
|
||||||
|
@ -101,6 +102,10 @@
|
||||||
STM32F469NG, STM32F469AE, STM32F469IE, STM32F469BE and STM32F469NE Devices */
|
STM32F469NG, STM32F469AE, STM32F469IE, STM32F469BE and STM32F469NE Devices */
|
||||||
/* #define STM32F479xx */ /*!< STM32F479AI, STM32F479II, STM32F479BI, STM32F479NI, STM32F479AG, STM32F479IG, STM32F479BG
|
/* #define STM32F479xx */ /*!< STM32F479AI, STM32F479II, STM32F479BI, STM32F479NI, STM32F479AG, STM32F479IG, STM32F479BG
|
||||||
and STM32F479NG Devices */
|
and STM32F479NG Devices */
|
||||||
|
/* #define STM32F412Cx */ /*!< STM32F412CEU and STM32F412CGU Devices */
|
||||||
|
/* #define STM32F412Zx */ /*!< STM32F412ZET, STM32F412ZGT, STM32F412ZEJ and STM32F412ZGJ Devices */
|
||||||
|
/* #define STM32F412Vx */ /*!< STM32F412VET, STM32F412VGT, STM32F412VEH and STM32F412VGH Devices */
|
||||||
|
/* #define STM32F412Rx */ /*!< STM32F412RET, STM32F412RGT, STM32F412REY and STM32F412RGY Devices */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Tip: To avoid modifying this file each time you need to switch between these
|
/* Tip: To avoid modifying this file each time you need to switch between these
|
||||||
|
@ -116,11 +121,11 @@
|
||||||
#endif /* USE_HAL_DRIVER */
|
#endif /* USE_HAL_DRIVER */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief CMSIS version number V2.4.3
|
* @brief CMSIS version number V2.5.0
|
||||||
*/
|
*/
|
||||||
#define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
|
#define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_SUB1 (0x04U) /*!< [23:16] sub1 version */
|
#define __STM32F4xx_CMSIS_VERSION_SUB1 (0x05U) /*!< [23:16] sub1 version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x03U) /*!< [15:8] sub2 version */
|
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
|
#define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
|
||||||
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\
|
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\
|
||||||
|(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\
|
|(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\
|
||||||
|
@ -160,7 +165,7 @@
|
||||||
#elif defined(STM32F410Cx)
|
#elif defined(STM32F410Cx)
|
||||||
#include "stm32f410cx.h"
|
#include "stm32f410cx.h"
|
||||||
#elif defined(STM32F410Rx)
|
#elif defined(STM32F410Rx)
|
||||||
#include "stm32f410rx.h"
|
#include "stm32f410rx.h"
|
||||||
#elif defined(STM32F411xE)
|
#elif defined(STM32F411xE)
|
||||||
#include "stm32f411xe.h"
|
#include "stm32f411xe.h"
|
||||||
#elif defined(STM32F446xx)
|
#elif defined(STM32F446xx)
|
||||||
|
@ -169,6 +174,14 @@
|
||||||
#include "stm32f469xx.h"
|
#include "stm32f469xx.h"
|
||||||
#elif defined(STM32F479xx)
|
#elif defined(STM32F479xx)
|
||||||
#include "stm32f479xx.h"
|
#include "stm32f479xx.h"
|
||||||
|
#elif defined(STM32F412Cx)
|
||||||
|
#include "stm32f412cx.h"
|
||||||
|
#elif defined(STM32F412Zx)
|
||||||
|
#include "stm32f412zx.h"
|
||||||
|
#elif defined(STM32F412Rx)
|
||||||
|
#include "stm32f412rx.h"
|
||||||
|
#elif defined(STM32F412Vx)
|
||||||
|
#include "stm32f412vx.h"
|
||||||
#else
|
#else
|
||||||
#error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
|
#error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file system_stm32f4xx.c
|
* @file system_stm32f4xx.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File.
|
* @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
|
||||||
|
@ -110,9 +110,10 @@
|
||||||
/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */
|
/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
||||||
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
/* #define DATA_IN_ExtSRAM */
|
/* #define DATA_IN_ExtSRAM */
|
||||||
#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx */
|
#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx ||\
|
||||||
|
STM32F412Zx || STM32F412Vx */
|
||||||
|
|
||||||
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
|
@ -339,7 +340,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
__IO uint32_t tmp = 0x00;
|
__IO uint32_t tmp = 0x00;
|
||||||
|
|
||||||
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
||||||
register uint32_t index;
|
register __IO uint32_t index;
|
||||||
|
|
||||||
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
|
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
|
||||||
RCC->AHB1ENR |= 0x000001F8;
|
RCC->AHB1ENR |= 0x000001F8;
|
||||||
|
@ -504,7 +505,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
#if defined (DATA_IN_ExtSDRAM)
|
#if defined (DATA_IN_ExtSDRAM)
|
||||||
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
||||||
register uint32_t index;
|
register __IO uint32_t index;
|
||||||
|
|
||||||
#if defined(STM32F446xx)
|
#if defined(STM32F446xx)
|
||||||
/* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface
|
/* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface
|
||||||
|
@ -693,7 +694,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
|
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
||||||
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
|
|
||||||
#if defined(DATA_IN_ExtSRAM)
|
#if defined(DATA_IN_ExtSRAM)
|
||||||
/*-- GPIOs Configuration -----------------------------------------------------*/
|
/*-- GPIOs Configuration -----------------------------------------------------*/
|
||||||
|
@ -770,18 +771,19 @@ void SystemInit_ExtMemCtl(void)
|
||||||
FMC_Bank1->BTCR[3] = 0x00110212;
|
FMC_Bank1->BTCR[3] = 0x00110212;
|
||||||
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
||||||
#endif /* STM32F469xx || STM32F479xx */
|
#endif /* STM32F469xx || STM32F479xx */
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)\
|
||||||
|
|| defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
/* Delay after an RCC peripheral clock enabling */
|
/* Delay after an RCC peripheral clock enabling */
|
||||||
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN);
|
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN);
|
||||||
/* Configure and enable Bank1_SRAM2 */
|
/* Configure and enable Bank1_SRAM2 */
|
||||||
FSMC_Bank1->BTCR[2] = 0x00001011;
|
FSMC_Bank1->BTCR[2] = 0x00001011;
|
||||||
FSMC_Bank1->BTCR[3] = 0x00000201;
|
FSMC_Bank1->BTCR[3] = 0x00000201;
|
||||||
FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF;
|
FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF;
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx */
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F412Zx || STM32F412Vx */
|
||||||
|
|
||||||
#endif /* DATA_IN_ExtSRAM */
|
#endif /* DATA_IN_ExtSRAM */
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
||||||
STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */
|
STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Vx */
|
||||||
(void)(tmp);
|
(void)(tmp);
|
||||||
}
|
}
|
||||||
#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */
|
#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file system_stm32f4xx.h
|
* @file system_stm32f4xx.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
|
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx.h
|
* @file stm32f4xx.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.2
|
* @version V2.5.0
|
||||||
* @date 13-November-2015
|
* @date 22-April-2016
|
||||||
* @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File.
|
* @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File.
|
||||||
*
|
*
|
||||||
* The file is the unique include file that the application programmer
|
* The file is the unique include file that the application programmer
|
||||||
|
@ -121,16 +121,16 @@
|
||||||
#endif /* USE_HAL_DRIVER */
|
#endif /* USE_HAL_DRIVER */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief CMSIS Device version number V2.4.2
|
* @brief CMSIS version number V2.5.0
|
||||||
*/
|
*/
|
||||||
#define __STM32F4xx_CMSIS_DEVICE_VERSION_MAIN (0x02) /*!< [31:24] main version */
|
#define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
|
||||||
#define __STM32F4xx_CMSIS_DEVICE_VERSION_SUB1 (0x04) /*!< [23:16] sub1 version */
|
#define __STM32F4xx_CMSIS_VERSION_SUB1 (0x05U) /*!< [23:16] sub1 version */
|
||||||
#define __STM32F4xx_CMSIS_DEVICE_VERSION_SUB2 (0x02) /*!< [15:8] sub2 version */
|
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
|
||||||
#define __STM32F4xx_CMSIS_DEVICE_VERSION_RC (0x00) /*!< [7:0] release candidate */
|
#define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
|
||||||
#define __STM32F4xx_CMSIS_DEVICE_VERSION ((__STM32F4xx_CMSIS_DEVICE_VERSION_MAIN << 24)\
|
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\
|
||||||
|(__STM32F4xx_CMSIS_DEVICE_VERSION_SUB1 << 16)\
|
|(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\
|
||||||
|(__STM32F4xx_CMSIS_DEVICE_VERSION_SUB2 << 8 )\
|
|(__STM32F4xx_CMSIS_VERSION_SUB2 << 8 )\
|
||||||
|(__STM32F4xx_CMSIS_DEVICE_VERSION))
|
|(__STM32F4xx_CMSIS_VERSION))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file system_stm32f4xx.c
|
* @file system_stm32f4xx.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.2
|
* @version V2.5.0
|
||||||
* @date 13-November-2015
|
* @date 22-April-2016
|
||||||
* @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File.
|
* @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
|
||||||
|
@ -109,9 +109,10 @@
|
||||||
/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */
|
/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
||||||
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
/* #define DATA_IN_ExtSRAM */
|
/* #define DATA_IN_ExtSRAM */
|
||||||
#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx */
|
#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx ||\
|
||||||
|
STM32F412Zx || STM32F412Vx */
|
||||||
|
|
||||||
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
|
@ -334,7 +335,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
__IO uint32_t tmp = 0x00;
|
__IO uint32_t tmp = 0x00;
|
||||||
|
|
||||||
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
||||||
register uint32_t index;
|
register __IO uint32_t index;
|
||||||
|
|
||||||
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
|
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
|
||||||
RCC->AHB1ENR |= 0x000001F8;
|
RCC->AHB1ENR |= 0x000001F8;
|
||||||
|
@ -499,7 +500,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
#if defined (DATA_IN_ExtSDRAM)
|
#if defined (DATA_IN_ExtSDRAM)
|
||||||
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
||||||
register uint32_t index;
|
register __IO uint32_t index;
|
||||||
|
|
||||||
#if defined(STM32F446xx)
|
#if defined(STM32F446xx)
|
||||||
/* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface
|
/* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface
|
||||||
|
@ -688,7 +689,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
|
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
||||||
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
|
|
||||||
#if defined(DATA_IN_ExtSRAM)
|
#if defined(DATA_IN_ExtSRAM)
|
||||||
/*-- GPIOs Configuration -----------------------------------------------------*/
|
/*-- GPIOs Configuration -----------------------------------------------------*/
|
||||||
|
@ -755,17 +756,27 @@ void SystemInit_ExtMemCtl(void)
|
||||||
FMC_Bank1->BTCR[3] = 0x00000201;
|
FMC_Bank1->BTCR[3] = 0x00000201;
|
||||||
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
||||||
#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */
|
#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */
|
||||||
|
#if defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)
|
/* Delay after an RCC peripheral clock enabling */
|
||||||
|
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN);
|
||||||
|
/* Configure and enable Bank1_SRAM2 */
|
||||||
|
FMC_Bank1->BTCR[2] = 0x00001091;
|
||||||
|
FMC_Bank1->BTCR[3] = 0x00110212;
|
||||||
|
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
||||||
|
#endif /* STM32F469xx || STM32F479xx */
|
||||||
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)\
|
||||||
|
|| defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
|
/* Delay after an RCC peripheral clock enabling */
|
||||||
|
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN);
|
||||||
/* Configure and enable Bank1_SRAM2 */
|
/* Configure and enable Bank1_SRAM2 */
|
||||||
FSMC_Bank1->BTCR[2] = 0x00001011;
|
FSMC_Bank1->BTCR[2] = 0x00001011;
|
||||||
FSMC_Bank1->BTCR[3] = 0x00000201;
|
FSMC_Bank1->BTCR[3] = 0x00000201;
|
||||||
FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF;
|
FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF;
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx */
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F412Zx || STM32F412Vx */
|
||||||
|
|
||||||
#endif /* DATA_IN_ExtSRAM */
|
#endif /* DATA_IN_ExtSRAM */
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
||||||
STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */
|
STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Vx */
|
||||||
(void)(tmp);
|
(void)(tmp);
|
||||||
}
|
}
|
||||||
#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */
|
#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file system_stm32f4xx.h
|
* @file system_stm32f4xx.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
|
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx.h
|
* @file stm32f4xx.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File.
|
* @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File.
|
||||||
*
|
*
|
||||||
* The file is the unique include file that the application programmer
|
* The file is the unique include file that the application programmer
|
||||||
|
@ -78,7 +78,8 @@
|
||||||
!defined (STM32F427xx) && !defined (STM32F437xx) && !defined (STM32F429xx) && !defined (STM32F439xx) && \
|
!defined (STM32F427xx) && !defined (STM32F437xx) && !defined (STM32F429xx) && !defined (STM32F439xx) && \
|
||||||
!defined (STM32F401xC) && !defined (STM32F401xE) && !defined (STM32F410Tx) && !defined (STM32F410Cx) && \
|
!defined (STM32F401xC) && !defined (STM32F401xE) && !defined (STM32F410Tx) && !defined (STM32F410Cx) && \
|
||||||
!defined (STM32F410Rx) && !defined (STM32F411xE) && !defined (STM32F446xx) && !defined (STM32F469xx) && \
|
!defined (STM32F410Rx) && !defined (STM32F411xE) && !defined (STM32F446xx) && !defined (STM32F469xx) && \
|
||||||
!defined (STM32F479xx)
|
!defined (STM32F479xx) && !defined (STM32F412Cx) && !defined (STM32F412Rx) && !defined (STM32F412Vx) && \
|
||||||
|
!defined (STM32F412Zx)
|
||||||
/* #define STM32F405xx */ /*!< STM32F405RG, STM32F405VG and STM32F405ZG Devices */
|
/* #define STM32F405xx */ /*!< STM32F405RG, STM32F405VG and STM32F405ZG Devices */
|
||||||
/* #define STM32F415xx */ /*!< STM32F415RG, STM32F415VG and STM32F415ZG Devices */
|
/* #define STM32F415xx */ /*!< STM32F415RG, STM32F415VG and STM32F415ZG Devices */
|
||||||
/* #define STM32F407xx */ /*!< STM32F407VG, STM32F407VE, STM32F407ZG, STM32F407ZE, STM32F407IG and STM32F407IE Devices */
|
/* #define STM32F407xx */ /*!< STM32F407VG, STM32F407VE, STM32F407ZG, STM32F407ZE, STM32F407IG and STM32F407IE Devices */
|
||||||
|
@ -101,6 +102,10 @@
|
||||||
STM32F469NG, STM32F469AE, STM32F469IE, STM32F469BE and STM32F469NE Devices */
|
STM32F469NG, STM32F469AE, STM32F469IE, STM32F469BE and STM32F469NE Devices */
|
||||||
/* #define STM32F479xx */ /*!< STM32F479AI, STM32F479II, STM32F479BI, STM32F479NI, STM32F479AG, STM32F479IG, STM32F479BG
|
/* #define STM32F479xx */ /*!< STM32F479AI, STM32F479II, STM32F479BI, STM32F479NI, STM32F479AG, STM32F479IG, STM32F479BG
|
||||||
and STM32F479NG Devices */
|
and STM32F479NG Devices */
|
||||||
|
/* #define STM32F412Cx */ /*!< STM32F412CEU and STM32F412CGU Devices */
|
||||||
|
/* #define STM32F412Zx */ /*!< STM32F412ZET, STM32F412ZGT, STM32F412ZEJ and STM32F412ZGJ Devices */
|
||||||
|
/* #define STM32F412Vx */ /*!< STM32F412VET, STM32F412VGT, STM32F412VEH and STM32F412VGH Devices */
|
||||||
|
/* #define STM32F412Rx */ /*!< STM32F412RET, STM32F412RGT, STM32F412REY and STM32F412RGY Devices */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Tip: To avoid modifying this file each time you need to switch between these
|
/* Tip: To avoid modifying this file each time you need to switch between these
|
||||||
|
@ -116,11 +121,11 @@
|
||||||
#endif /* USE_HAL_DRIVER */
|
#endif /* USE_HAL_DRIVER */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief CMSIS version number V2.4.3
|
* @brief CMSIS version number V2.5.0
|
||||||
*/
|
*/
|
||||||
#define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
|
#define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_SUB1 (0x04U) /*!< [23:16] sub1 version */
|
#define __STM32F4xx_CMSIS_VERSION_SUB1 (0x05U) /*!< [23:16] sub1 version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x03U) /*!< [15:8] sub2 version */
|
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
|
#define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
|
||||||
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\
|
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\
|
||||||
|(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\
|
|(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\
|
||||||
|
@ -160,7 +165,7 @@
|
||||||
#elif defined(STM32F410Cx)
|
#elif defined(STM32F410Cx)
|
||||||
#include "stm32f410cx.h"
|
#include "stm32f410cx.h"
|
||||||
#elif defined(STM32F410Rx)
|
#elif defined(STM32F410Rx)
|
||||||
#include "stm32f410rx.h"
|
#include "stm32f410rx.h"
|
||||||
#elif defined(STM32F411xE)
|
#elif defined(STM32F411xE)
|
||||||
#include "stm32f411xe.h"
|
#include "stm32f411xe.h"
|
||||||
#elif defined(STM32F446xx)
|
#elif defined(STM32F446xx)
|
||||||
|
@ -169,6 +174,14 @@
|
||||||
#include "stm32f469xx.h"
|
#include "stm32f469xx.h"
|
||||||
#elif defined(STM32F479xx)
|
#elif defined(STM32F479xx)
|
||||||
#include "stm32f479xx.h"
|
#include "stm32f479xx.h"
|
||||||
|
#elif defined(STM32F412Cx)
|
||||||
|
#include "stm32f412cx.h"
|
||||||
|
#elif defined(STM32F412Zx)
|
||||||
|
#include "stm32f412zx.h"
|
||||||
|
#elif defined(STM32F412Rx)
|
||||||
|
#include "stm32f412rx.h"
|
||||||
|
#elif defined(STM32F412Vx)
|
||||||
|
#include "stm32f412vx.h"
|
||||||
#else
|
#else
|
||||||
#error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
|
#error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file system_stm32f4xx.c
|
* @file system_stm32f4xx.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File.
|
* @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
|
||||||
|
@ -109,9 +109,10 @@
|
||||||
/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */
|
/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
||||||
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
/* #define DATA_IN_ExtSRAM */
|
/* #define DATA_IN_ExtSRAM */
|
||||||
#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx */
|
#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx ||\
|
||||||
|
STM32F412Zx || STM32F412Vx */
|
||||||
|
|
||||||
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
|
@ -334,7 +335,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
__IO uint32_t tmp = 0x00;
|
__IO uint32_t tmp = 0x00;
|
||||||
|
|
||||||
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
||||||
register uint32_t index;
|
register __IO uint32_t index;
|
||||||
|
|
||||||
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
|
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
|
||||||
RCC->AHB1ENR |= 0x000001F8;
|
RCC->AHB1ENR |= 0x000001F8;
|
||||||
|
@ -499,7 +500,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
#if defined (DATA_IN_ExtSDRAM)
|
#if defined (DATA_IN_ExtSDRAM)
|
||||||
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
||||||
register uint32_t index;
|
register __IO uint32_t index;
|
||||||
|
|
||||||
#if defined(STM32F446xx)
|
#if defined(STM32F446xx)
|
||||||
/* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface
|
/* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface
|
||||||
|
@ -688,7 +689,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
|
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
||||||
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
|
|
||||||
#if defined(DATA_IN_ExtSRAM)
|
#if defined(DATA_IN_ExtSRAM)
|
||||||
/*-- GPIOs Configuration -----------------------------------------------------*/
|
/*-- GPIOs Configuration -----------------------------------------------------*/
|
||||||
|
@ -765,18 +766,19 @@ void SystemInit_ExtMemCtl(void)
|
||||||
FMC_Bank1->BTCR[3] = 0x00110212;
|
FMC_Bank1->BTCR[3] = 0x00110212;
|
||||||
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
||||||
#endif /* STM32F469xx || STM32F479xx */
|
#endif /* STM32F469xx || STM32F479xx */
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)\
|
||||||
|
|| defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
/* Delay after an RCC peripheral clock enabling */
|
/* Delay after an RCC peripheral clock enabling */
|
||||||
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN);
|
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN);
|
||||||
/* Configure and enable Bank1_SRAM2 */
|
/* Configure and enable Bank1_SRAM2 */
|
||||||
FSMC_Bank1->BTCR[2] = 0x00001011;
|
FSMC_Bank1->BTCR[2] = 0x00001011;
|
||||||
FSMC_Bank1->BTCR[3] = 0x00000201;
|
FSMC_Bank1->BTCR[3] = 0x00000201;
|
||||||
FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF;
|
FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF;
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx */
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F412Zx || STM32F412Vx */
|
||||||
|
|
||||||
#endif /* DATA_IN_ExtSRAM */
|
#endif /* DATA_IN_ExtSRAM */
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
||||||
STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */
|
STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Vx */
|
||||||
(void)(tmp);
|
(void)(tmp);
|
||||||
}
|
}
|
||||||
#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */
|
#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file system_stm32f4xx.h
|
* @file system_stm32f4xx.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
|
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx.h
|
* @file stm32f4xx.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File.
|
* @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File.
|
||||||
*
|
*
|
||||||
* The file is the unique include file that the application programmer
|
* The file is the unique include file that the application programmer
|
||||||
|
@ -78,7 +78,8 @@
|
||||||
!defined (STM32F427xx) && !defined (STM32F437xx) && !defined (STM32F429xx) && !defined (STM32F439xx) && \
|
!defined (STM32F427xx) && !defined (STM32F437xx) && !defined (STM32F429xx) && !defined (STM32F439xx) && \
|
||||||
!defined (STM32F401xC) && !defined (STM32F401xE) && !defined (STM32F410Tx) && !defined (STM32F410Cx) && \
|
!defined (STM32F401xC) && !defined (STM32F401xE) && !defined (STM32F410Tx) && !defined (STM32F410Cx) && \
|
||||||
!defined (STM32F410Rx) && !defined (STM32F411xE) && !defined (STM32F446xx) && !defined (STM32F469xx) && \
|
!defined (STM32F410Rx) && !defined (STM32F411xE) && !defined (STM32F446xx) && !defined (STM32F469xx) && \
|
||||||
!defined (STM32F479xx)
|
!defined (STM32F479xx) && !defined (STM32F412Cx) && !defined (STM32F412Rx) && !defined (STM32F412Vx) && \
|
||||||
|
!defined (STM32F412Zx)
|
||||||
/* #define STM32F405xx */ /*!< STM32F405RG, STM32F405VG and STM32F405ZG Devices */
|
/* #define STM32F405xx */ /*!< STM32F405RG, STM32F405VG and STM32F405ZG Devices */
|
||||||
/* #define STM32F415xx */ /*!< STM32F415RG, STM32F415VG and STM32F415ZG Devices */
|
/* #define STM32F415xx */ /*!< STM32F415RG, STM32F415VG and STM32F415ZG Devices */
|
||||||
/* #define STM32F407xx */ /*!< STM32F407VG, STM32F407VE, STM32F407ZG, STM32F407ZE, STM32F407IG and STM32F407IE Devices */
|
/* #define STM32F407xx */ /*!< STM32F407VG, STM32F407VE, STM32F407ZG, STM32F407ZE, STM32F407IG and STM32F407IE Devices */
|
||||||
|
@ -101,6 +102,10 @@
|
||||||
STM32F469NG, STM32F469AE, STM32F469IE, STM32F469BE and STM32F469NE Devices */
|
STM32F469NG, STM32F469AE, STM32F469IE, STM32F469BE and STM32F469NE Devices */
|
||||||
/* #define STM32F479xx */ /*!< STM32F479AI, STM32F479II, STM32F479BI, STM32F479NI, STM32F479AG, STM32F479IG, STM32F479BG
|
/* #define STM32F479xx */ /*!< STM32F479AI, STM32F479II, STM32F479BI, STM32F479NI, STM32F479AG, STM32F479IG, STM32F479BG
|
||||||
and STM32F479NG Devices */
|
and STM32F479NG Devices */
|
||||||
|
/* #define STM32F412Cx */ /*!< STM32F412CEU and STM32F412CGU Devices */
|
||||||
|
/* #define STM32F412Zx */ /*!< STM32F412ZET, STM32F412ZGT, STM32F412ZEJ and STM32F412ZGJ Devices */
|
||||||
|
/* #define STM32F412Vx */ /*!< STM32F412VET, STM32F412VGT, STM32F412VEH and STM32F412VGH Devices */
|
||||||
|
/* #define STM32F412Rx */ /*!< STM32F412RET, STM32F412RGT, STM32F412REY and STM32F412RGY Devices */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Tip: To avoid modifying this file each time you need to switch between these
|
/* Tip: To avoid modifying this file each time you need to switch between these
|
||||||
|
@ -116,11 +121,11 @@
|
||||||
#endif /* USE_HAL_DRIVER */
|
#endif /* USE_HAL_DRIVER */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief CMSIS version number V2.4.3
|
* @brief CMSIS version number V2.5.0
|
||||||
*/
|
*/
|
||||||
#define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
|
#define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_SUB1 (0x04U) /*!< [23:16] sub1 version */
|
#define __STM32F4xx_CMSIS_VERSION_SUB1 (0x05U) /*!< [23:16] sub1 version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x03U) /*!< [15:8] sub2 version */
|
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
|
#define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
|
||||||
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\
|
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\
|
||||||
|(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\
|
|(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\
|
||||||
|
@ -160,7 +165,7 @@
|
||||||
#elif defined(STM32F410Cx)
|
#elif defined(STM32F410Cx)
|
||||||
#include "stm32f410cx.h"
|
#include "stm32f410cx.h"
|
||||||
#elif defined(STM32F410Rx)
|
#elif defined(STM32F410Rx)
|
||||||
#include "stm32f410rx.h"
|
#include "stm32f410rx.h"
|
||||||
#elif defined(STM32F411xE)
|
#elif defined(STM32F411xE)
|
||||||
#include "stm32f411xe.h"
|
#include "stm32f411xe.h"
|
||||||
#elif defined(STM32F446xx)
|
#elif defined(STM32F446xx)
|
||||||
|
@ -169,6 +174,14 @@
|
||||||
#include "stm32f469xx.h"
|
#include "stm32f469xx.h"
|
||||||
#elif defined(STM32F479xx)
|
#elif defined(STM32F479xx)
|
||||||
#include "stm32f479xx.h"
|
#include "stm32f479xx.h"
|
||||||
|
#elif defined(STM32F412Cx)
|
||||||
|
#include "stm32f412cx.h"
|
||||||
|
#elif defined(STM32F412Zx)
|
||||||
|
#include "stm32f412zx.h"
|
||||||
|
#elif defined(STM32F412Rx)
|
||||||
|
#include "stm32f412rx.h"
|
||||||
|
#elif defined(STM32F412Vx)
|
||||||
|
#include "stm32f412vx.h"
|
||||||
#else
|
#else
|
||||||
#error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
|
#error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file system_stm32f4xx.c
|
* @file system_stm32f4xx.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File.
|
* @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
|
||||||
|
@ -111,9 +111,10 @@
|
||||||
/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */
|
/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
||||||
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
/* #define DATA_IN_ExtSRAM */
|
/* #define DATA_IN_ExtSRAM */
|
||||||
#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx */
|
#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx ||\
|
||||||
|
STM32F412Zx || STM32F412Vx */
|
||||||
|
|
||||||
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
|
@ -340,7 +341,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
__IO uint32_t tmp = 0x00;
|
__IO uint32_t tmp = 0x00;
|
||||||
|
|
||||||
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
||||||
register uint32_t index;
|
register __IO uint32_t index;
|
||||||
|
|
||||||
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
|
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
|
||||||
RCC->AHB1ENR |= 0x000001F8;
|
RCC->AHB1ENR |= 0x000001F8;
|
||||||
|
@ -505,7 +506,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
#if defined (DATA_IN_ExtSDRAM)
|
#if defined (DATA_IN_ExtSDRAM)
|
||||||
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
||||||
register uint32_t index;
|
register __IO uint32_t index;
|
||||||
|
|
||||||
#if defined(STM32F446xx)
|
#if defined(STM32F446xx)
|
||||||
/* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface
|
/* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface
|
||||||
|
@ -694,7 +695,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
|
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
||||||
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
|
|
||||||
#if defined(DATA_IN_ExtSRAM)
|
#if defined(DATA_IN_ExtSRAM)
|
||||||
/*-- GPIOs Configuration -----------------------------------------------------*/
|
/*-- GPIOs Configuration -----------------------------------------------------*/
|
||||||
|
@ -771,18 +772,19 @@ void SystemInit_ExtMemCtl(void)
|
||||||
FMC_Bank1->BTCR[3] = 0x00110212;
|
FMC_Bank1->BTCR[3] = 0x00110212;
|
||||||
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
||||||
#endif /* STM32F469xx || STM32F479xx */
|
#endif /* STM32F469xx || STM32F479xx */
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)\
|
||||||
|
|| defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
/* Delay after an RCC peripheral clock enabling */
|
/* Delay after an RCC peripheral clock enabling */
|
||||||
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN);
|
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN);
|
||||||
/* Configure and enable Bank1_SRAM2 */
|
/* Configure and enable Bank1_SRAM2 */
|
||||||
FSMC_Bank1->BTCR[2] = 0x00001011;
|
FSMC_Bank1->BTCR[2] = 0x00001011;
|
||||||
FSMC_Bank1->BTCR[3] = 0x00000201;
|
FSMC_Bank1->BTCR[3] = 0x00000201;
|
||||||
FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF;
|
FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF;
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx */
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F412Zx || STM32F412Vx */
|
||||||
|
|
||||||
#endif /* DATA_IN_ExtSRAM */
|
#endif /* DATA_IN_ExtSRAM */
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
||||||
STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */
|
STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Vx */
|
||||||
(void)(tmp);
|
(void)(tmp);
|
||||||
}
|
}
|
||||||
#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */
|
#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file system_stm32f4xx.h
|
* @file system_stm32f4xx.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
|
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx.h
|
* @file stm32f4xx.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File.
|
* @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File.
|
||||||
*
|
*
|
||||||
* The file is the unique include file that the application programmer
|
* The file is the unique include file that the application programmer
|
||||||
|
@ -78,7 +78,8 @@
|
||||||
!defined (STM32F427xx) && !defined (STM32F437xx) && !defined (STM32F429xx) && !defined (STM32F439xx) && \
|
!defined (STM32F427xx) && !defined (STM32F437xx) && !defined (STM32F429xx) && !defined (STM32F439xx) && \
|
||||||
!defined (STM32F401xC) && !defined (STM32F401xE) && !defined (STM32F410Tx) && !defined (STM32F410Cx) && \
|
!defined (STM32F401xC) && !defined (STM32F401xE) && !defined (STM32F410Tx) && !defined (STM32F410Cx) && \
|
||||||
!defined (STM32F410Rx) && !defined (STM32F411xE) && !defined (STM32F446xx) && !defined (STM32F469xx) && \
|
!defined (STM32F410Rx) && !defined (STM32F411xE) && !defined (STM32F446xx) && !defined (STM32F469xx) && \
|
||||||
!defined (STM32F479xx)
|
!defined (STM32F479xx) && !defined (STM32F412Cx) && !defined (STM32F412Rx) && !defined (STM32F412Vx) && \
|
||||||
|
!defined (STM32F412Zx)
|
||||||
/* #define STM32F405xx */ /*!< STM32F405RG, STM32F405VG and STM32F405ZG Devices */
|
/* #define STM32F405xx */ /*!< STM32F405RG, STM32F405VG and STM32F405ZG Devices */
|
||||||
/* #define STM32F415xx */ /*!< STM32F415RG, STM32F415VG and STM32F415ZG Devices */
|
/* #define STM32F415xx */ /*!< STM32F415RG, STM32F415VG and STM32F415ZG Devices */
|
||||||
/* #define STM32F407xx */ /*!< STM32F407VG, STM32F407VE, STM32F407ZG, STM32F407ZE, STM32F407IG and STM32F407IE Devices */
|
/* #define STM32F407xx */ /*!< STM32F407VG, STM32F407VE, STM32F407ZG, STM32F407ZE, STM32F407IG and STM32F407IE Devices */
|
||||||
|
@ -101,6 +102,10 @@
|
||||||
STM32F469NG, STM32F469AE, STM32F469IE, STM32F469BE and STM32F469NE Devices */
|
STM32F469NG, STM32F469AE, STM32F469IE, STM32F469BE and STM32F469NE Devices */
|
||||||
/* #define STM32F479xx */ /*!< STM32F479AI, STM32F479II, STM32F479BI, STM32F479NI, STM32F479AG, STM32F479IG, STM32F479BG
|
/* #define STM32F479xx */ /*!< STM32F479AI, STM32F479II, STM32F479BI, STM32F479NI, STM32F479AG, STM32F479IG, STM32F479BG
|
||||||
and STM32F479NG Devices */
|
and STM32F479NG Devices */
|
||||||
|
/* #define STM32F412Cx */ /*!< STM32F412CEU and STM32F412CGU Devices */
|
||||||
|
/* #define STM32F412Zx */ /*!< STM32F412ZET, STM32F412ZGT, STM32F412ZEJ and STM32F412ZGJ Devices */
|
||||||
|
/* #define STM32F412Vx */ /*!< STM32F412VET, STM32F412VGT, STM32F412VEH and STM32F412VGH Devices */
|
||||||
|
/* #define STM32F412Rx */ /*!< STM32F412RET, STM32F412RGT, STM32F412REY and STM32F412RGY Devices */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Tip: To avoid modifying this file each time you need to switch between these
|
/* Tip: To avoid modifying this file each time you need to switch between these
|
||||||
|
@ -116,11 +121,11 @@
|
||||||
#endif /* USE_HAL_DRIVER */
|
#endif /* USE_HAL_DRIVER */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief CMSIS version number V2.4.3
|
* @brief CMSIS version number V2.5.0
|
||||||
*/
|
*/
|
||||||
#define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
|
#define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_SUB1 (0x04U) /*!< [23:16] sub1 version */
|
#define __STM32F4xx_CMSIS_VERSION_SUB1 (0x05U) /*!< [23:16] sub1 version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x03U) /*!< [15:8] sub2 version */
|
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
|
#define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
|
||||||
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\
|
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\
|
||||||
|(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\
|
|(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\
|
||||||
|
@ -160,7 +165,7 @@
|
||||||
#elif defined(STM32F410Cx)
|
#elif defined(STM32F410Cx)
|
||||||
#include "stm32f410cx.h"
|
#include "stm32f410cx.h"
|
||||||
#elif defined(STM32F410Rx)
|
#elif defined(STM32F410Rx)
|
||||||
#include "stm32f410rx.h"
|
#include "stm32f410rx.h"
|
||||||
#elif defined(STM32F411xE)
|
#elif defined(STM32F411xE)
|
||||||
#include "stm32f411xe.h"
|
#include "stm32f411xe.h"
|
||||||
#elif defined(STM32F446xx)
|
#elif defined(STM32F446xx)
|
||||||
|
@ -169,6 +174,14 @@
|
||||||
#include "stm32f469xx.h"
|
#include "stm32f469xx.h"
|
||||||
#elif defined(STM32F479xx)
|
#elif defined(STM32F479xx)
|
||||||
#include "stm32f479xx.h"
|
#include "stm32f479xx.h"
|
||||||
|
#elif defined(STM32F412Cx)
|
||||||
|
#include "stm32f412cx.h"
|
||||||
|
#elif defined(STM32F412Zx)
|
||||||
|
#include "stm32f412zx.h"
|
||||||
|
#elif defined(STM32F412Rx)
|
||||||
|
#include "stm32f412rx.h"
|
||||||
|
#elif defined(STM32F412Vx)
|
||||||
|
#include "stm32f412vx.h"
|
||||||
#else
|
#else
|
||||||
#error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
|
#error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file system_stm32f4xx.c
|
* @file system_stm32f4xx.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File.
|
* @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
|
||||||
|
@ -110,9 +110,10 @@
|
||||||
/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */
|
/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
||||||
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
/* #define DATA_IN_ExtSRAM */
|
/* #define DATA_IN_ExtSRAM */
|
||||||
#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx */
|
#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx ||\
|
||||||
|
STM32F412Zx || STM32F412Vx */
|
||||||
|
|
||||||
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
|
@ -341,7 +342,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
__IO uint32_t tmp = 0x00;
|
__IO uint32_t tmp = 0x00;
|
||||||
|
|
||||||
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
||||||
register uint32_t index;
|
register __IO uint32_t index;
|
||||||
|
|
||||||
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
|
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
|
||||||
RCC->AHB1ENR |= 0x000001F8;
|
RCC->AHB1ENR |= 0x000001F8;
|
||||||
|
@ -506,7 +507,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
#if defined (DATA_IN_ExtSDRAM)
|
#if defined (DATA_IN_ExtSDRAM)
|
||||||
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
||||||
register uint32_t index;
|
register __IO uint32_t index;
|
||||||
|
|
||||||
#if defined(STM32F446xx)
|
#if defined(STM32F446xx)
|
||||||
/* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface
|
/* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface
|
||||||
|
@ -695,7 +696,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
|
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
||||||
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
|
|
||||||
#if defined(DATA_IN_ExtSRAM)
|
#if defined(DATA_IN_ExtSRAM)
|
||||||
/*-- GPIOs Configuration -----------------------------------------------------*/
|
/*-- GPIOs Configuration -----------------------------------------------------*/
|
||||||
|
@ -772,18 +773,19 @@ void SystemInit_ExtMemCtl(void)
|
||||||
FMC_Bank1->BTCR[3] = 0x00110212;
|
FMC_Bank1->BTCR[3] = 0x00110212;
|
||||||
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
||||||
#endif /* STM32F469xx || STM32F479xx */
|
#endif /* STM32F469xx || STM32F479xx */
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)\
|
||||||
|
|| defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
/* Delay after an RCC peripheral clock enabling */
|
/* Delay after an RCC peripheral clock enabling */
|
||||||
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN);
|
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN);
|
||||||
/* Configure and enable Bank1_SRAM2 */
|
/* Configure and enable Bank1_SRAM2 */
|
||||||
FSMC_Bank1->BTCR[2] = 0x00001011;
|
FSMC_Bank1->BTCR[2] = 0x00001011;
|
||||||
FSMC_Bank1->BTCR[3] = 0x00000201;
|
FSMC_Bank1->BTCR[3] = 0x00000201;
|
||||||
FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF;
|
FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF;
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx */
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F412Zx || STM32F412Vx */
|
||||||
|
|
||||||
#endif /* DATA_IN_ExtSRAM */
|
#endif /* DATA_IN_ExtSRAM */
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
||||||
STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */
|
STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Vx */
|
||||||
(void)(tmp);
|
(void)(tmp);
|
||||||
}
|
}
|
||||||
#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */
|
#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file system_stm32f4xx.h
|
* @file system_stm32f4xx.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
|
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx.h
|
* @file stm32f4xx.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File.
|
* @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File.
|
||||||
*
|
*
|
||||||
* The file is the unique include file that the application programmer
|
* The file is the unique include file that the application programmer
|
||||||
|
@ -78,7 +78,8 @@
|
||||||
!defined (STM32F427xx) && !defined (STM32F437xx) && !defined (STM32F429xx) && !defined (STM32F439xx) && \
|
!defined (STM32F427xx) && !defined (STM32F437xx) && !defined (STM32F429xx) && !defined (STM32F439xx) && \
|
||||||
!defined (STM32F401xC) && !defined (STM32F401xE) && !defined (STM32F410Tx) && !defined (STM32F410Cx) && \
|
!defined (STM32F401xC) && !defined (STM32F401xE) && !defined (STM32F410Tx) && !defined (STM32F410Cx) && \
|
||||||
!defined (STM32F410Rx) && !defined (STM32F411xE) && !defined (STM32F446xx) && !defined (STM32F469xx) && \
|
!defined (STM32F410Rx) && !defined (STM32F411xE) && !defined (STM32F446xx) && !defined (STM32F469xx) && \
|
||||||
!defined (STM32F479xx)
|
!defined (STM32F479xx) && !defined (STM32F412Cx) && !defined (STM32F412Rx) && !defined (STM32F412Vx) && \
|
||||||
|
!defined (STM32F412Zx)
|
||||||
#define STM32F405xx /*!< STM32F405RG, STM32F405VG and STM32F405ZG Devices */
|
#define STM32F405xx /*!< STM32F405RG, STM32F405VG and STM32F405ZG Devices */
|
||||||
/* #define STM32F415xx */ /*!< STM32F415RG, STM32F415VG and STM32F415ZG Devices */
|
/* #define STM32F415xx */ /*!< STM32F415RG, STM32F415VG and STM32F415ZG Devices */
|
||||||
/* #define STM32F407xx */ /*!< STM32F407VG, STM32F407VE, STM32F407ZG, STM32F407ZE, STM32F407IG and STM32F407IE Devices */
|
/* #define STM32F407xx */ /*!< STM32F407VG, STM32F407VE, STM32F407ZG, STM32F407ZE, STM32F407IG and STM32F407IE Devices */
|
||||||
|
@ -101,6 +102,10 @@
|
||||||
STM32F469NG, STM32F469AE, STM32F469IE, STM32F469BE and STM32F469NE Devices */
|
STM32F469NG, STM32F469AE, STM32F469IE, STM32F469BE and STM32F469NE Devices */
|
||||||
/* #define STM32F479xx */ /*!< STM32F479AI, STM32F479II, STM32F479BI, STM32F479NI, STM32F479AG, STM32F479IG, STM32F479BG
|
/* #define STM32F479xx */ /*!< STM32F479AI, STM32F479II, STM32F479BI, STM32F479NI, STM32F479AG, STM32F479IG, STM32F479BG
|
||||||
and STM32F479NG Devices */
|
and STM32F479NG Devices */
|
||||||
|
/* #define STM32F412Cx */ /*!< STM32F412CEU and STM32F412CGU Devices */
|
||||||
|
/* #define STM32F412Zx */ /*!< STM32F412ZET, STM32F412ZGT, STM32F412ZEJ and STM32F412ZGJ Devices */
|
||||||
|
/* #define STM32F412Vx */ /*!< STM32F412VET, STM32F412VGT, STM32F412VEH and STM32F412VGH Devices */
|
||||||
|
/* #define STM32F412Rx */ /*!< STM32F412RET, STM32F412RGT, STM32F412REY and STM32F412RGY Devices */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Tip: To avoid modifying this file each time you need to switch between these
|
/* Tip: To avoid modifying this file each time you need to switch between these
|
||||||
|
@ -116,11 +121,11 @@
|
||||||
#endif /* USE_HAL_DRIVER */
|
#endif /* USE_HAL_DRIVER */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief CMSIS version number V2.4.3
|
* @brief CMSIS version number V2.5.0
|
||||||
*/
|
*/
|
||||||
#define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
|
#define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_SUB1 (0x04U) /*!< [23:16] sub1 version */
|
#define __STM32F4xx_CMSIS_VERSION_SUB1 (0x05U) /*!< [23:16] sub1 version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x03U) /*!< [15:8] sub2 version */
|
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
|
#define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
|
||||||
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\
|
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\
|
||||||
|(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\
|
|(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\
|
||||||
|
@ -160,7 +165,7 @@
|
||||||
#elif defined(STM32F410Cx)
|
#elif defined(STM32F410Cx)
|
||||||
#include "stm32f410cx.h"
|
#include "stm32f410cx.h"
|
||||||
#elif defined(STM32F410Rx)
|
#elif defined(STM32F410Rx)
|
||||||
#include "stm32f410rx.h"
|
#include "stm32f410rx.h"
|
||||||
#elif defined(STM32F411xE)
|
#elif defined(STM32F411xE)
|
||||||
#include "stm32f411xe.h"
|
#include "stm32f411xe.h"
|
||||||
#elif defined(STM32F446xx)
|
#elif defined(STM32F446xx)
|
||||||
|
@ -169,6 +174,14 @@
|
||||||
#include "stm32f469xx.h"
|
#include "stm32f469xx.h"
|
||||||
#elif defined(STM32F479xx)
|
#elif defined(STM32F479xx)
|
||||||
#include "stm32f479xx.h"
|
#include "stm32f479xx.h"
|
||||||
|
#elif defined(STM32F412Cx)
|
||||||
|
#include "stm32f412cx.h"
|
||||||
|
#elif defined(STM32F412Zx)
|
||||||
|
#include "stm32f412zx.h"
|
||||||
|
#elif defined(STM32F412Rx)
|
||||||
|
#include "stm32f412rx.h"
|
||||||
|
#elif defined(STM32F412Vx)
|
||||||
|
#include "stm32f412vx.h"
|
||||||
#else
|
#else
|
||||||
#error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
|
#error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file system_stm32f4xx.c
|
* @file system_stm32f4xx.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File.
|
* @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
|
||||||
|
@ -95,9 +95,10 @@
|
||||||
/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */
|
/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
||||||
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
/* #define DATA_IN_ExtSRAM */
|
/* #define DATA_IN_ExtSRAM */
|
||||||
#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx */
|
#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx ||\
|
||||||
|
STM32F412Zx || STM32F412Vx */
|
||||||
|
|
||||||
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
|
@ -316,7 +317,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
__IO uint32_t tmp = 0x00;
|
__IO uint32_t tmp = 0x00;
|
||||||
|
|
||||||
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
||||||
register uint32_t index;
|
register __IO uint32_t index;
|
||||||
|
|
||||||
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
|
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
|
||||||
RCC->AHB1ENR |= 0x000001F8;
|
RCC->AHB1ENR |= 0x000001F8;
|
||||||
|
@ -481,7 +482,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
#if defined (DATA_IN_ExtSDRAM)
|
#if defined (DATA_IN_ExtSDRAM)
|
||||||
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
||||||
register uint32_t index;
|
register __IO uint32_t index;
|
||||||
|
|
||||||
#if defined(STM32F446xx)
|
#if defined(STM32F446xx)
|
||||||
/* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface
|
/* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface
|
||||||
|
@ -670,7 +671,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
|
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
||||||
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
|
|
||||||
#if defined(DATA_IN_ExtSRAM)
|
#if defined(DATA_IN_ExtSRAM)
|
||||||
/*-- GPIOs Configuration -----------------------------------------------------*/
|
/*-- GPIOs Configuration -----------------------------------------------------*/
|
||||||
|
@ -747,18 +748,19 @@ void SystemInit_ExtMemCtl(void)
|
||||||
FMC_Bank1->BTCR[3] = 0x00110212;
|
FMC_Bank1->BTCR[3] = 0x00110212;
|
||||||
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
||||||
#endif /* STM32F469xx || STM32F479xx */
|
#endif /* STM32F469xx || STM32F479xx */
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)\
|
||||||
|
|| defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
/* Delay after an RCC peripheral clock enabling */
|
/* Delay after an RCC peripheral clock enabling */
|
||||||
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN);
|
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN);
|
||||||
/* Configure and enable Bank1_SRAM2 */
|
/* Configure and enable Bank1_SRAM2 */
|
||||||
FSMC_Bank1->BTCR[2] = 0x00001011;
|
FSMC_Bank1->BTCR[2] = 0x00001011;
|
||||||
FSMC_Bank1->BTCR[3] = 0x00000201;
|
FSMC_Bank1->BTCR[3] = 0x00000201;
|
||||||
FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF;
|
FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF;
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx */
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F412Zx || STM32F412Vx */
|
||||||
|
|
||||||
#endif /* DATA_IN_ExtSRAM */
|
#endif /* DATA_IN_ExtSRAM */
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
||||||
STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */
|
STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Vx */
|
||||||
(void)(tmp);
|
(void)(tmp);
|
||||||
}
|
}
|
||||||
#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */
|
#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file system_stm32f4xx.h
|
* @file system_stm32f4xx.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
|
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx.h
|
* @file stm32f4xx.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File.
|
* @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File.
|
||||||
*
|
*
|
||||||
* The file is the unique include file that the application programmer
|
* The file is the unique include file that the application programmer
|
||||||
|
@ -78,7 +78,8 @@
|
||||||
!defined (STM32F427xx) && !defined (STM32F437xx) && !defined (STM32F429xx) && !defined (STM32F439xx) && \
|
!defined (STM32F427xx) && !defined (STM32F437xx) && !defined (STM32F429xx) && !defined (STM32F439xx) && \
|
||||||
!defined (STM32F401xC) && !defined (STM32F401xE) && !defined (STM32F410Tx) && !defined (STM32F410Cx) && \
|
!defined (STM32F401xC) && !defined (STM32F401xE) && !defined (STM32F410Tx) && !defined (STM32F410Cx) && \
|
||||||
!defined (STM32F410Rx) && !defined (STM32F411xE) && !defined (STM32F446xx) && !defined (STM32F469xx) && \
|
!defined (STM32F410Rx) && !defined (STM32F411xE) && !defined (STM32F446xx) && !defined (STM32F469xx) && \
|
||||||
!defined (STM32F479xx)
|
!defined (STM32F479xx) && !defined (STM32F412Cx) && !defined (STM32F412Rx) && !defined (STM32F412Vx) && \
|
||||||
|
!defined (STM32F412Zx)
|
||||||
/* #define STM32F405xx */ /*!< STM32F405RG, STM32F405VG and STM32F405ZG Devices */
|
/* #define STM32F405xx */ /*!< STM32F405RG, STM32F405VG and STM32F405ZG Devices */
|
||||||
/* #define STM32F415xx */ /*!< STM32F415RG, STM32F415VG and STM32F415ZG Devices */
|
/* #define STM32F415xx */ /*!< STM32F415RG, STM32F415VG and STM32F415ZG Devices */
|
||||||
/* #define STM32F407xx */ /*!< STM32F407VG, STM32F407VE, STM32F407ZG, STM32F407ZE, STM32F407IG and STM32F407IE Devices */
|
/* #define STM32F407xx */ /*!< STM32F407VG, STM32F407VE, STM32F407ZG, STM32F407ZE, STM32F407IG and STM32F407IE Devices */
|
||||||
|
@ -101,6 +102,10 @@
|
||||||
STM32F469NG, STM32F469AE, STM32F469IE, STM32F469BE and STM32F469NE Devices */
|
STM32F469NG, STM32F469AE, STM32F469IE, STM32F469BE and STM32F469NE Devices */
|
||||||
/* #define STM32F479xx */ /*!< STM32F479AI, STM32F479II, STM32F479BI, STM32F479NI, STM32F479AG, STM32F479IG, STM32F479BG
|
/* #define STM32F479xx */ /*!< STM32F479AI, STM32F479II, STM32F479BI, STM32F479NI, STM32F479AG, STM32F479IG, STM32F479BG
|
||||||
and STM32F479NG Devices */
|
and STM32F479NG Devices */
|
||||||
|
/* #define STM32F412Cx */ /*!< STM32F412CEU and STM32F412CGU Devices */
|
||||||
|
/* #define STM32F412Zx */ /*!< STM32F412ZET, STM32F412ZGT, STM32F412ZEJ and STM32F412ZGJ Devices */
|
||||||
|
/* #define STM32F412Vx */ /*!< STM32F412VET, STM32F412VGT, STM32F412VEH and STM32F412VGH Devices */
|
||||||
|
/* #define STM32F412Rx */ /*!< STM32F412RET, STM32F412RGT, STM32F412REY and STM32F412RGY Devices */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Tip: To avoid modifying this file each time you need to switch between these
|
/* Tip: To avoid modifying this file each time you need to switch between these
|
||||||
|
@ -116,11 +121,11 @@
|
||||||
#endif /* USE_HAL_DRIVER */
|
#endif /* USE_HAL_DRIVER */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief CMSIS version number V2.4.3
|
* @brief CMSIS version number V2.5.0
|
||||||
*/
|
*/
|
||||||
#define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
|
#define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_SUB1 (0x04U) /*!< [23:16] sub1 version */
|
#define __STM32F4xx_CMSIS_VERSION_SUB1 (0x05U) /*!< [23:16] sub1 version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x03U) /*!< [15:8] sub2 version */
|
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
|
#define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
|
||||||
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\
|
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\
|
||||||
|(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\
|
|(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\
|
||||||
|
@ -160,7 +165,7 @@
|
||||||
#elif defined(STM32F410Cx)
|
#elif defined(STM32F410Cx)
|
||||||
#include "stm32f410cx.h"
|
#include "stm32f410cx.h"
|
||||||
#elif defined(STM32F410Rx)
|
#elif defined(STM32F410Rx)
|
||||||
#include "stm32f410rx.h"
|
#include "stm32f410rx.h"
|
||||||
#elif defined(STM32F411xE)
|
#elif defined(STM32F411xE)
|
||||||
#include "stm32f411xe.h"
|
#include "stm32f411xe.h"
|
||||||
#elif defined(STM32F446xx)
|
#elif defined(STM32F446xx)
|
||||||
|
@ -169,6 +174,14 @@
|
||||||
#include "stm32f469xx.h"
|
#include "stm32f469xx.h"
|
||||||
#elif defined(STM32F479xx)
|
#elif defined(STM32F479xx)
|
||||||
#include "stm32f479xx.h"
|
#include "stm32f479xx.h"
|
||||||
|
#elif defined(STM32F412Cx)
|
||||||
|
#include "stm32f412cx.h"
|
||||||
|
#elif defined(STM32F412Zx)
|
||||||
|
#include "stm32f412zx.h"
|
||||||
|
#elif defined(STM32F412Rx)
|
||||||
|
#include "stm32f412rx.h"
|
||||||
|
#elif defined(STM32F412Vx)
|
||||||
|
#include "stm32f412vx.h"
|
||||||
#else
|
#else
|
||||||
#error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
|
#error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file system_stm32f4xx.c
|
* @file system_stm32f4xx.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File.
|
* @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
|
||||||
|
@ -111,9 +111,10 @@
|
||||||
/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */
|
/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
||||||
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
/* #define DATA_IN_ExtSRAM */
|
/* #define DATA_IN_ExtSRAM */
|
||||||
#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx */
|
#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx ||\
|
||||||
|
STM32F412Zx || STM32F412Vx */
|
||||||
|
|
||||||
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
|
@ -346,7 +347,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
__IO uint32_t tmp = 0x00;
|
__IO uint32_t tmp = 0x00;
|
||||||
|
|
||||||
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
||||||
register uint32_t index;
|
register __IO uint32_t index;
|
||||||
|
|
||||||
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
|
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
|
||||||
RCC->AHB1ENR |= 0x000001F8;
|
RCC->AHB1ENR |= 0x000001F8;
|
||||||
|
@ -511,7 +512,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
#if defined (DATA_IN_ExtSDRAM)
|
#if defined (DATA_IN_ExtSDRAM)
|
||||||
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
||||||
register uint32_t index;
|
register __IO uint32_t index;
|
||||||
|
|
||||||
#if defined(STM32F446xx)
|
#if defined(STM32F446xx)
|
||||||
/* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface
|
/* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface
|
||||||
|
@ -700,7 +701,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
|
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
||||||
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
|
|
||||||
#if defined(DATA_IN_ExtSRAM)
|
#if defined(DATA_IN_ExtSRAM)
|
||||||
/*-- GPIOs Configuration -----------------------------------------------------*/
|
/*-- GPIOs Configuration -----------------------------------------------------*/
|
||||||
|
@ -777,18 +778,19 @@ void SystemInit_ExtMemCtl(void)
|
||||||
FMC_Bank1->BTCR[3] = 0x00110212;
|
FMC_Bank1->BTCR[3] = 0x00110212;
|
||||||
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
||||||
#endif /* STM32F469xx || STM32F479xx */
|
#endif /* STM32F469xx || STM32F479xx */
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)\
|
||||||
|
|| defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
/* Delay after an RCC peripheral clock enabling */
|
/* Delay after an RCC peripheral clock enabling */
|
||||||
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN);
|
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN);
|
||||||
/* Configure and enable Bank1_SRAM2 */
|
/* Configure and enable Bank1_SRAM2 */
|
||||||
FSMC_Bank1->BTCR[2] = 0x00001011;
|
FSMC_Bank1->BTCR[2] = 0x00001011;
|
||||||
FSMC_Bank1->BTCR[3] = 0x00000201;
|
FSMC_Bank1->BTCR[3] = 0x00000201;
|
||||||
FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF;
|
FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF;
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx */
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F412Zx || STM32F412Vx */
|
||||||
|
|
||||||
#endif /* DATA_IN_ExtSRAM */
|
#endif /* DATA_IN_ExtSRAM */
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
||||||
STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */
|
STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Vx */
|
||||||
(void)(tmp);
|
(void)(tmp);
|
||||||
}
|
}
|
||||||
#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */
|
#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file system_stm32f4xx.h
|
* @file system_stm32f4xx.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
|
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx.h
|
* @file stm32f4xx.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File.
|
* @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File.
|
||||||
*
|
*
|
||||||
* The file is the unique include file that the application programmer
|
* The file is the unique include file that the application programmer
|
||||||
|
@ -78,7 +78,8 @@
|
||||||
!defined (STM32F427xx) && !defined (STM32F437xx) && !defined (STM32F429xx) && !defined (STM32F439xx) && \
|
!defined (STM32F427xx) && !defined (STM32F437xx) && !defined (STM32F429xx) && !defined (STM32F439xx) && \
|
||||||
!defined (STM32F401xC) && !defined (STM32F401xE) && !defined (STM32F410Tx) && !defined (STM32F410Cx) && \
|
!defined (STM32F401xC) && !defined (STM32F401xE) && !defined (STM32F410Tx) && !defined (STM32F410Cx) && \
|
||||||
!defined (STM32F410Rx) && !defined (STM32F411xE) && !defined (STM32F446xx) && !defined (STM32F469xx) && \
|
!defined (STM32F410Rx) && !defined (STM32F411xE) && !defined (STM32F446xx) && !defined (STM32F469xx) && \
|
||||||
!defined (STM32F479xx)
|
!defined (STM32F479xx) && !defined (STM32F412Cx) && !defined (STM32F412Rx) && !defined (STM32F412Vx) && \
|
||||||
|
!defined (STM32F412Zx)
|
||||||
/* #define STM32F405xx */ /*!< STM32F405RG, STM32F405VG and STM32F405ZG Devices */
|
/* #define STM32F405xx */ /*!< STM32F405RG, STM32F405VG and STM32F405ZG Devices */
|
||||||
/* #define STM32F415xx */ /*!< STM32F415RG, STM32F415VG and STM32F415ZG Devices */
|
/* #define STM32F415xx */ /*!< STM32F415RG, STM32F415VG and STM32F415ZG Devices */
|
||||||
/* #define STM32F407xx */ /*!< STM32F407VG, STM32F407VE, STM32F407ZG, STM32F407ZE, STM32F407IG and STM32F407IE Devices */
|
/* #define STM32F407xx */ /*!< STM32F407VG, STM32F407VE, STM32F407ZG, STM32F407ZE, STM32F407IG and STM32F407IE Devices */
|
||||||
|
@ -101,6 +102,10 @@
|
||||||
STM32F469NG, STM32F469AE, STM32F469IE, STM32F469BE and STM32F469NE Devices */
|
STM32F469NG, STM32F469AE, STM32F469IE, STM32F469BE and STM32F469NE Devices */
|
||||||
/* #define STM32F479xx */ /*!< STM32F479AI, STM32F479II, STM32F479BI, STM32F479NI, STM32F479AG, STM32F479IG, STM32F479BG
|
/* #define STM32F479xx */ /*!< STM32F479AI, STM32F479II, STM32F479BI, STM32F479NI, STM32F479AG, STM32F479IG, STM32F479BG
|
||||||
and STM32F479NG Devices */
|
and STM32F479NG Devices */
|
||||||
|
/* #define STM32F412Cx */ /*!< STM32F412CEU and STM32F412CGU Devices */
|
||||||
|
/* #define STM32F412Zx */ /*!< STM32F412ZET, STM32F412ZGT, STM32F412ZEJ and STM32F412ZGJ Devices */
|
||||||
|
/* #define STM32F412Vx */ /*!< STM32F412VET, STM32F412VGT, STM32F412VEH and STM32F412VGH Devices */
|
||||||
|
/* #define STM32F412Rx */ /*!< STM32F412RET, STM32F412RGT, STM32F412REY and STM32F412RGY Devices */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Tip: To avoid modifying this file each time you need to switch between these
|
/* Tip: To avoid modifying this file each time you need to switch between these
|
||||||
|
@ -116,11 +121,11 @@
|
||||||
#endif /* USE_HAL_DRIVER */
|
#endif /* USE_HAL_DRIVER */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief CMSIS version number V2.4.3
|
* @brief CMSIS version number V2.5.0
|
||||||
*/
|
*/
|
||||||
#define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
|
#define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_SUB1 (0x04U) /*!< [23:16] sub1 version */
|
#define __STM32F4xx_CMSIS_VERSION_SUB1 (0x05U) /*!< [23:16] sub1 version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x03U) /*!< [15:8] sub2 version */
|
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
|
#define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
|
||||||
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\
|
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\
|
||||||
|(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\
|
|(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\
|
||||||
|
@ -160,7 +165,7 @@
|
||||||
#elif defined(STM32F410Cx)
|
#elif defined(STM32F410Cx)
|
||||||
#include "stm32f410cx.h"
|
#include "stm32f410cx.h"
|
||||||
#elif defined(STM32F410Rx)
|
#elif defined(STM32F410Rx)
|
||||||
#include "stm32f410rx.h"
|
#include "stm32f410rx.h"
|
||||||
#elif defined(STM32F411xE)
|
#elif defined(STM32F411xE)
|
||||||
#include "stm32f411xe.h"
|
#include "stm32f411xe.h"
|
||||||
#elif defined(STM32F446xx)
|
#elif defined(STM32F446xx)
|
||||||
|
@ -169,6 +174,14 @@
|
||||||
#include "stm32f469xx.h"
|
#include "stm32f469xx.h"
|
||||||
#elif defined(STM32F479xx)
|
#elif defined(STM32F479xx)
|
||||||
#include "stm32f479xx.h"
|
#include "stm32f479xx.h"
|
||||||
|
#elif defined(STM32F412Cx)
|
||||||
|
#include "stm32f412cx.h"
|
||||||
|
#elif defined(STM32F412Zx)
|
||||||
|
#include "stm32f412zx.h"
|
||||||
|
#elif defined(STM32F412Rx)
|
||||||
|
#include "stm32f412rx.h"
|
||||||
|
#elif defined(STM32F412Vx)
|
||||||
|
#include "stm32f412vx.h"
|
||||||
#else
|
#else
|
||||||
#error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
|
#error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file system_stm32f4xx.c
|
* @file system_stm32f4xx.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File.
|
* @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
|
||||||
|
@ -110,9 +110,10 @@
|
||||||
/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */
|
/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
||||||
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
/* #define DATA_IN_ExtSRAM */
|
/* #define DATA_IN_ExtSRAM */
|
||||||
#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx */
|
#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx ||\
|
||||||
|
STM32F412Zx || STM32F412Vx */
|
||||||
|
|
||||||
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
|
@ -339,7 +340,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
__IO uint32_t tmp = 0x00;
|
__IO uint32_t tmp = 0x00;
|
||||||
|
|
||||||
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
||||||
register uint32_t index;
|
register __IO uint32_t index;
|
||||||
|
|
||||||
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
|
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
|
||||||
RCC->AHB1ENR |= 0x000001F8;
|
RCC->AHB1ENR |= 0x000001F8;
|
||||||
|
@ -504,7 +505,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
#if defined (DATA_IN_ExtSDRAM)
|
#if defined (DATA_IN_ExtSDRAM)
|
||||||
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
||||||
register uint32_t index;
|
register __IO uint32_t index;
|
||||||
|
|
||||||
#if defined(STM32F446xx)
|
#if defined(STM32F446xx)
|
||||||
/* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface
|
/* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface
|
||||||
|
@ -693,7 +694,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
|
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
||||||
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
|
|
||||||
#if defined(DATA_IN_ExtSRAM)
|
#if defined(DATA_IN_ExtSRAM)
|
||||||
/*-- GPIOs Configuration -----------------------------------------------------*/
|
/*-- GPIOs Configuration -----------------------------------------------------*/
|
||||||
|
@ -770,18 +771,19 @@ void SystemInit_ExtMemCtl(void)
|
||||||
FMC_Bank1->BTCR[3] = 0x00110212;
|
FMC_Bank1->BTCR[3] = 0x00110212;
|
||||||
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
||||||
#endif /* STM32F469xx || STM32F479xx */
|
#endif /* STM32F469xx || STM32F479xx */
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)\
|
||||||
|
|| defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
/* Delay after an RCC peripheral clock enabling */
|
/* Delay after an RCC peripheral clock enabling */
|
||||||
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN);
|
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN);
|
||||||
/* Configure and enable Bank1_SRAM2 */
|
/* Configure and enable Bank1_SRAM2 */
|
||||||
FSMC_Bank1->BTCR[2] = 0x00001011;
|
FSMC_Bank1->BTCR[2] = 0x00001011;
|
||||||
FSMC_Bank1->BTCR[3] = 0x00000201;
|
FSMC_Bank1->BTCR[3] = 0x00000201;
|
||||||
FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF;
|
FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF;
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx */
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F412Zx || STM32F412Vx */
|
||||||
|
|
||||||
#endif /* DATA_IN_ExtSRAM */
|
#endif /* DATA_IN_ExtSRAM */
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
||||||
STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */
|
STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Vx */
|
||||||
(void)(tmp);
|
(void)(tmp);
|
||||||
}
|
}
|
||||||
#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */
|
#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file system_stm32f4xx.h
|
* @file system_stm32f4xx.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
|
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx.h
|
* @file stm32f4xx.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.2
|
* @version V2.5.0
|
||||||
* @date 13-November-2015
|
* @date 22-April-2016
|
||||||
* @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File.
|
* @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File.
|
||||||
*
|
*
|
||||||
* The file is the unique include file that the application programmer
|
* The file is the unique include file that the application programmer
|
||||||
|
@ -77,8 +77,9 @@
|
||||||
#if !defined (STM32F405xx) && !defined (STM32F415xx) && !defined (STM32F407xx) && !defined (STM32F417xx) && \
|
#if !defined (STM32F405xx) && !defined (STM32F415xx) && !defined (STM32F407xx) && !defined (STM32F417xx) && \
|
||||||
!defined (STM32F427xx) && !defined (STM32F437xx) && !defined (STM32F429xx) && !defined (STM32F439xx) && \
|
!defined (STM32F427xx) && !defined (STM32F437xx) && !defined (STM32F429xx) && !defined (STM32F439xx) && \
|
||||||
!defined (STM32F401xC) && !defined (STM32F401xE) && !defined (STM32F410Tx) && !defined (STM32F410Cx) && \
|
!defined (STM32F401xC) && !defined (STM32F401xE) && !defined (STM32F410Tx) && !defined (STM32F410Cx) && \
|
||||||
!defined (STM32F410Rx) && !defined (STM32F411xE) && !defined (STM32F446xx) && !defined (STM32F469xx) && \
|
!defined (STM32F410Rx) && !defined (STM32F411xE) && !defined (STM32F446xx) && !defined (STM32F469xx) && \
|
||||||
!defined (STM32F479xx)
|
!defined (STM32F479xx) && !defined (STM32F412Cx) && !defined (STM32F412Rx) && !defined (STM32F412Vx) && \
|
||||||
|
!defined (STM32F412Zx)
|
||||||
/* #define STM32F405xx */ /*!< STM32F405RG, STM32F405VG and STM32F405ZG Devices */
|
/* #define STM32F405xx */ /*!< STM32F405RG, STM32F405VG and STM32F405ZG Devices */
|
||||||
/* #define STM32F415xx */ /*!< STM32F415RG, STM32F415VG and STM32F415ZG Devices */
|
/* #define STM32F415xx */ /*!< STM32F415RG, STM32F415VG and STM32F415ZG Devices */
|
||||||
/* #define STM32F407xx */ /*!< STM32F407VG, STM32F407VE, STM32F407ZG, STM32F407ZE, STM32F407IG and STM32F407IE Devices */
|
/* #define STM32F407xx */ /*!< STM32F407VG, STM32F407VE, STM32F407ZG, STM32F407ZE, STM32F407IG and STM32F407IE Devices */
|
||||||
|
@ -101,6 +102,10 @@
|
||||||
STM32F469NG, STM32F469AE, STM32F469IE, STM32F469BE and STM32F469NE Devices */
|
STM32F469NG, STM32F469AE, STM32F469IE, STM32F469BE and STM32F469NE Devices */
|
||||||
/* #define STM32F479xx */ /*!< STM32F479AI, STM32F479II, STM32F479BI, STM32F479NI, STM32F479AG, STM32F479IG, STM32F479BG
|
/* #define STM32F479xx */ /*!< STM32F479AI, STM32F479II, STM32F479BI, STM32F479NI, STM32F479AG, STM32F479IG, STM32F479BG
|
||||||
and STM32F479NG Devices */
|
and STM32F479NG Devices */
|
||||||
|
/* #define STM32F412Cx */ /*!< STM32F412CEU and STM32F412CGU Devices */
|
||||||
|
/* #define STM32F412Zx */ /*!< STM32F412ZET, STM32F412ZGT, STM32F412ZEJ and STM32F412ZGJ Devices */
|
||||||
|
/* #define STM32F412Vx */ /*!< STM32F412VET, STM32F412VGT, STM32F412VEH and STM32F412VGH Devices */
|
||||||
|
/* #define STM32F412Rx */ /*!< STM32F412RET, STM32F412RGT, STM32F412REY and STM32F412RGY Devices */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Tip: To avoid modifying this file each time you need to switch between these
|
/* Tip: To avoid modifying this file each time you need to switch between these
|
||||||
|
@ -116,16 +121,16 @@
|
||||||
#endif /* USE_HAL_DRIVER */
|
#endif /* USE_HAL_DRIVER */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief CMSIS Device version number V2.4.2
|
* @brief CMSIS version number V2.5.0
|
||||||
*/
|
*/
|
||||||
#define __STM32F4xx_CMSIS_DEVICE_VERSION_MAIN (0x02) /*!< [31:24] main version */
|
#define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
|
||||||
#define __STM32F4xx_CMSIS_DEVICE_VERSION_SUB1 (0x04) /*!< [23:16] sub1 version */
|
#define __STM32F4xx_CMSIS_VERSION_SUB1 (0x05U) /*!< [23:16] sub1 version */
|
||||||
#define __STM32F4xx_CMSIS_DEVICE_VERSION_SUB2 (0x02) /*!< [15:8] sub2 version */
|
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
|
||||||
#define __STM32F4xx_CMSIS_DEVICE_VERSION_RC (0x00) /*!< [7:0] release candidate */
|
#define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
|
||||||
#define __STM32F4xx_CMSIS_DEVICE_VERSION ((__STM32F4xx_CMSIS_DEVICE_VERSION_MAIN << 24)\
|
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\
|
||||||
|(__STM32F4xx_CMSIS_DEVICE_VERSION_SUB1 << 16)\
|
|(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\
|
||||||
|(__STM32F4xx_CMSIS_DEVICE_VERSION_SUB2 << 8 )\
|
|(__STM32F4xx_CMSIS_VERSION_SUB2 << 8 )\
|
||||||
|(__STM32F4xx_CMSIS_DEVICE_VERSION))
|
|(__STM32F4xx_CMSIS_VERSION))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
@ -160,7 +165,7 @@
|
||||||
#elif defined(STM32F410Cx)
|
#elif defined(STM32F410Cx)
|
||||||
#include "stm32f410cx.h"
|
#include "stm32f410cx.h"
|
||||||
#elif defined(STM32F410Rx)
|
#elif defined(STM32F410Rx)
|
||||||
#include "stm32f410rx.h"
|
#include "stm32f410rx.h"
|
||||||
#elif defined(STM32F411xE)
|
#elif defined(STM32F411xE)
|
||||||
#include "stm32f411xe.h"
|
#include "stm32f411xe.h"
|
||||||
#elif defined(STM32F446xx)
|
#elif defined(STM32F446xx)
|
||||||
|
@ -169,6 +174,14 @@
|
||||||
#include "stm32f469xx.h"
|
#include "stm32f469xx.h"
|
||||||
#elif defined(STM32F479xx)
|
#elif defined(STM32F479xx)
|
||||||
#include "stm32f479xx.h"
|
#include "stm32f479xx.h"
|
||||||
|
#elif defined(STM32F412Cx)
|
||||||
|
#include "stm32f412cx.h"
|
||||||
|
#elif defined(STM32F412Zx)
|
||||||
|
#include "stm32f412zx.h"
|
||||||
|
#elif defined(STM32F412Rx)
|
||||||
|
#include "stm32f412rx.h"
|
||||||
|
#elif defined(STM32F412Vx)
|
||||||
|
#include "stm32f412vx.h"
|
||||||
#else
|
#else
|
||||||
#error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
|
#error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file system_stm32f4xx.c
|
* @file system_stm32f4xx.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File.
|
* @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
|
||||||
|
@ -95,9 +95,10 @@
|
||||||
/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */
|
/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
||||||
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
/* #define DATA_IN_ExtSRAM */
|
/* #define DATA_IN_ExtSRAM */
|
||||||
#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx */
|
#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx ||\
|
||||||
|
STM32F412Zx || STM32F412Vx */
|
||||||
|
|
||||||
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
|
@ -324,7 +325,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
__IO uint32_t tmp = 0x00;
|
__IO uint32_t tmp = 0x00;
|
||||||
|
|
||||||
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
||||||
register uint32_t index;
|
register __IO uint32_t index;
|
||||||
|
|
||||||
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
|
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
|
||||||
RCC->AHB1ENR |= 0x000001F8;
|
RCC->AHB1ENR |= 0x000001F8;
|
||||||
|
@ -489,7 +490,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
#if defined (DATA_IN_ExtSDRAM)
|
#if defined (DATA_IN_ExtSDRAM)
|
||||||
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
||||||
register uint32_t index;
|
register __IO uint32_t index;
|
||||||
|
|
||||||
#if defined(STM32F446xx)
|
#if defined(STM32F446xx)
|
||||||
/* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface
|
/* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface
|
||||||
|
@ -678,7 +679,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
|
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
||||||
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
|
|
||||||
#if defined(DATA_IN_ExtSRAM)
|
#if defined(DATA_IN_ExtSRAM)
|
||||||
/*-- GPIOs Configuration -----------------------------------------------------*/
|
/*-- GPIOs Configuration -----------------------------------------------------*/
|
||||||
|
@ -755,18 +756,19 @@ void SystemInit_ExtMemCtl(void)
|
||||||
FMC_Bank1->BTCR[3] = 0x00110212;
|
FMC_Bank1->BTCR[3] = 0x00110212;
|
||||||
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
||||||
#endif /* STM32F469xx || STM32F479xx */
|
#endif /* STM32F469xx || STM32F479xx */
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)\
|
||||||
|
|| defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
/* Delay after an RCC peripheral clock enabling */
|
/* Delay after an RCC peripheral clock enabling */
|
||||||
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN);
|
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN);
|
||||||
/* Configure and enable Bank1_SRAM2 */
|
/* Configure and enable Bank1_SRAM2 */
|
||||||
FSMC_Bank1->BTCR[2] = 0x00001011;
|
FSMC_Bank1->BTCR[2] = 0x00001011;
|
||||||
FSMC_Bank1->BTCR[3] = 0x00000201;
|
FSMC_Bank1->BTCR[3] = 0x00000201;
|
||||||
FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF;
|
FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF;
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx */
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F412Zx || STM32F412Vx */
|
||||||
|
|
||||||
#endif /* DATA_IN_ExtSRAM */
|
#endif /* DATA_IN_ExtSRAM */
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
||||||
STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */
|
STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Vx */
|
||||||
(void)(tmp);
|
(void)(tmp);
|
||||||
}
|
}
|
||||||
#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */
|
#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */
|
||||||
|
|
4
hal/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F410RB/system_stm32f4xx.h
Executable file → Normal file
4
hal/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F410RB/system_stm32f4xx.h
Executable file → Normal file
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file system_stm32f4xx.h
|
* @file system_stm32f4xx.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.2
|
* @version V2.5.0
|
||||||
* @date 13-November-2015
|
* @date 22-April-2016
|
||||||
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
|
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx.h
|
* @file stm32f4xx.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File.
|
* @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File.
|
||||||
*
|
*
|
||||||
* The file is the unique include file that the application programmer
|
* The file is the unique include file that the application programmer
|
||||||
|
@ -78,7 +78,8 @@
|
||||||
!defined (STM32F427xx) && !defined (STM32F437xx) && !defined (STM32F429xx) && !defined (STM32F439xx) && \
|
!defined (STM32F427xx) && !defined (STM32F437xx) && !defined (STM32F429xx) && !defined (STM32F439xx) && \
|
||||||
!defined (STM32F401xC) && !defined (STM32F401xE) && !defined (STM32F410Tx) && !defined (STM32F410Cx) && \
|
!defined (STM32F401xC) && !defined (STM32F401xE) && !defined (STM32F410Tx) && !defined (STM32F410Cx) && \
|
||||||
!defined (STM32F410Rx) && !defined (STM32F411xE) && !defined (STM32F446xx) && !defined (STM32F469xx) && \
|
!defined (STM32F410Rx) && !defined (STM32F411xE) && !defined (STM32F446xx) && !defined (STM32F469xx) && \
|
||||||
!defined (STM32F479xx)
|
!defined (STM32F479xx) && !defined (STM32F412Cx) && !defined (STM32F412Rx) && !defined (STM32F412Vx) && \
|
||||||
|
!defined (STM32F412Zx)
|
||||||
/* #define STM32F405xx */ /*!< STM32F405RG, STM32F405VG and STM32F405ZG Devices */
|
/* #define STM32F405xx */ /*!< STM32F405RG, STM32F405VG and STM32F405ZG Devices */
|
||||||
/* #define STM32F415xx */ /*!< STM32F415RG, STM32F415VG and STM32F415ZG Devices */
|
/* #define STM32F415xx */ /*!< STM32F415RG, STM32F415VG and STM32F415ZG Devices */
|
||||||
/* #define STM32F407xx */ /*!< STM32F407VG, STM32F407VE, STM32F407ZG, STM32F407ZE, STM32F407IG and STM32F407IE Devices */
|
/* #define STM32F407xx */ /*!< STM32F407VG, STM32F407VE, STM32F407ZG, STM32F407ZE, STM32F407IG and STM32F407IE Devices */
|
||||||
|
@ -101,6 +102,10 @@
|
||||||
STM32F469NG, STM32F469AE, STM32F469IE, STM32F469BE and STM32F469NE Devices */
|
STM32F469NG, STM32F469AE, STM32F469IE, STM32F469BE and STM32F469NE Devices */
|
||||||
/* #define STM32F479xx */ /*!< STM32F479AI, STM32F479II, STM32F479BI, STM32F479NI, STM32F479AG, STM32F479IG, STM32F479BG
|
/* #define STM32F479xx */ /*!< STM32F479AI, STM32F479II, STM32F479BI, STM32F479NI, STM32F479AG, STM32F479IG, STM32F479BG
|
||||||
and STM32F479NG Devices */
|
and STM32F479NG Devices */
|
||||||
|
/* #define STM32F412Cx */ /*!< STM32F412CEU and STM32F412CGU Devices */
|
||||||
|
/* #define STM32F412Zx */ /*!< STM32F412ZET, STM32F412ZGT, STM32F412ZEJ and STM32F412ZGJ Devices */
|
||||||
|
/* #define STM32F412Vx */ /*!< STM32F412VET, STM32F412VGT, STM32F412VEH and STM32F412VGH Devices */
|
||||||
|
/* #define STM32F412Rx */ /*!< STM32F412RET, STM32F412RGT, STM32F412REY and STM32F412RGY Devices */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Tip: To avoid modifying this file each time you need to switch between these
|
/* Tip: To avoid modifying this file each time you need to switch between these
|
||||||
|
@ -116,11 +121,11 @@
|
||||||
#endif /* USE_HAL_DRIVER */
|
#endif /* USE_HAL_DRIVER */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief CMSIS version number V2.4.3
|
* @brief CMSIS version number V2.5.0
|
||||||
*/
|
*/
|
||||||
#define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
|
#define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_SUB1 (0x04U) /*!< [23:16] sub1 version */
|
#define __STM32F4xx_CMSIS_VERSION_SUB1 (0x05U) /*!< [23:16] sub1 version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x03U) /*!< [15:8] sub2 version */
|
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
|
#define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
|
||||||
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\
|
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\
|
||||||
|(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\
|
|(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\
|
||||||
|
@ -160,7 +165,7 @@
|
||||||
#elif defined(STM32F410Cx)
|
#elif defined(STM32F410Cx)
|
||||||
#include "stm32f410cx.h"
|
#include "stm32f410cx.h"
|
||||||
#elif defined(STM32F410Rx)
|
#elif defined(STM32F410Rx)
|
||||||
#include "stm32f410rx.h"
|
#include "stm32f410rx.h"
|
||||||
#elif defined(STM32F411xE)
|
#elif defined(STM32F411xE)
|
||||||
#include "stm32f411xe.h"
|
#include "stm32f411xe.h"
|
||||||
#elif defined(STM32F446xx)
|
#elif defined(STM32F446xx)
|
||||||
|
@ -169,6 +174,14 @@
|
||||||
#include "stm32f469xx.h"
|
#include "stm32f469xx.h"
|
||||||
#elif defined(STM32F479xx)
|
#elif defined(STM32F479xx)
|
||||||
#include "stm32f479xx.h"
|
#include "stm32f479xx.h"
|
||||||
|
#elif defined(STM32F412Cx)
|
||||||
|
#include "stm32f412cx.h"
|
||||||
|
#elif defined(STM32F412Zx)
|
||||||
|
#include "stm32f412zx.h"
|
||||||
|
#elif defined(STM32F412Rx)
|
||||||
|
#include "stm32f412rx.h"
|
||||||
|
#elif defined(STM32F412Vx)
|
||||||
|
#include "stm32f412vx.h"
|
||||||
#else
|
#else
|
||||||
#error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
|
#error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file system_stm32f4xx.c
|
* @file system_stm32f4xx.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File.
|
* @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
|
||||||
|
@ -111,9 +111,10 @@
|
||||||
/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */
|
/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
||||||
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
/* #define DATA_IN_ExtSRAM */
|
/* #define DATA_IN_ExtSRAM */
|
||||||
#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx */
|
#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx ||\
|
||||||
|
STM32F412Zx || STM32F412Vx */
|
||||||
|
|
||||||
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
|
@ -340,7 +341,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
__IO uint32_t tmp = 0x00;
|
__IO uint32_t tmp = 0x00;
|
||||||
|
|
||||||
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
||||||
register uint32_t index;
|
register __IO uint32_t index;
|
||||||
|
|
||||||
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
|
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
|
||||||
RCC->AHB1ENR |= 0x000001F8;
|
RCC->AHB1ENR |= 0x000001F8;
|
||||||
|
@ -505,7 +506,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
#if defined (DATA_IN_ExtSDRAM)
|
#if defined (DATA_IN_ExtSDRAM)
|
||||||
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
||||||
register uint32_t index;
|
register __IO uint32_t index;
|
||||||
|
|
||||||
#if defined(STM32F446xx)
|
#if defined(STM32F446xx)
|
||||||
/* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface
|
/* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface
|
||||||
|
@ -694,7 +695,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
|
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
||||||
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
|
|
||||||
#if defined(DATA_IN_ExtSRAM)
|
#if defined(DATA_IN_ExtSRAM)
|
||||||
/*-- GPIOs Configuration -----------------------------------------------------*/
|
/*-- GPIOs Configuration -----------------------------------------------------*/
|
||||||
|
@ -771,18 +772,19 @@ void SystemInit_ExtMemCtl(void)
|
||||||
FMC_Bank1->BTCR[3] = 0x00110212;
|
FMC_Bank1->BTCR[3] = 0x00110212;
|
||||||
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
||||||
#endif /* STM32F469xx || STM32F479xx */
|
#endif /* STM32F469xx || STM32F479xx */
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)\
|
||||||
|
|| defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
/* Delay after an RCC peripheral clock enabling */
|
/* Delay after an RCC peripheral clock enabling */
|
||||||
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN);
|
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN);
|
||||||
/* Configure and enable Bank1_SRAM2 */
|
/* Configure and enable Bank1_SRAM2 */
|
||||||
FSMC_Bank1->BTCR[2] = 0x00001011;
|
FSMC_Bank1->BTCR[2] = 0x00001011;
|
||||||
FSMC_Bank1->BTCR[3] = 0x00000201;
|
FSMC_Bank1->BTCR[3] = 0x00000201;
|
||||||
FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF;
|
FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF;
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx */
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F412Zx || STM32F412Vx */
|
||||||
|
|
||||||
#endif /* DATA_IN_ExtSRAM */
|
#endif /* DATA_IN_ExtSRAM */
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
||||||
STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */
|
STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Vx */
|
||||||
(void)(tmp);
|
(void)(tmp);
|
||||||
}
|
}
|
||||||
#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */
|
#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file system_stm32f4xx.h
|
* @file system_stm32f4xx.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
|
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx.h
|
* @file stm32f4xx.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File.
|
* @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File.
|
||||||
*
|
*
|
||||||
* The file is the unique include file that the application programmer
|
* The file is the unique include file that the application programmer
|
||||||
|
@ -78,7 +78,8 @@
|
||||||
!defined (STM32F427xx) && !defined (STM32F437xx) && !defined (STM32F429xx) && !defined (STM32F439xx) && \
|
!defined (STM32F427xx) && !defined (STM32F437xx) && !defined (STM32F429xx) && !defined (STM32F439xx) && \
|
||||||
!defined (STM32F401xC) && !defined (STM32F401xE) && !defined (STM32F410Tx) && !defined (STM32F410Cx) && \
|
!defined (STM32F401xC) && !defined (STM32F401xE) && !defined (STM32F410Tx) && !defined (STM32F410Cx) && \
|
||||||
!defined (STM32F410Rx) && !defined (STM32F411xE) && !defined (STM32F446xx) && !defined (STM32F469xx) && \
|
!defined (STM32F410Rx) && !defined (STM32F411xE) && !defined (STM32F446xx) && !defined (STM32F469xx) && \
|
||||||
!defined (STM32F479xx)
|
!defined (STM32F479xx) && !defined (STM32F412Cx) && !defined (STM32F412Rx) && !defined (STM32F412Vx) && \
|
||||||
|
!defined (STM32F412Zx)
|
||||||
/* #define STM32F405xx */ /*!< STM32F405RG, STM32F405VG and STM32F405ZG Devices */
|
/* #define STM32F405xx */ /*!< STM32F405RG, STM32F405VG and STM32F405ZG Devices */
|
||||||
/* #define STM32F415xx */ /*!< STM32F415RG, STM32F415VG and STM32F415ZG Devices */
|
/* #define STM32F415xx */ /*!< STM32F415RG, STM32F415VG and STM32F415ZG Devices */
|
||||||
/* #define STM32F407xx */ /*!< STM32F407VG, STM32F407VE, STM32F407ZG, STM32F407ZE, STM32F407IG and STM32F407IE Devices */
|
/* #define STM32F407xx */ /*!< STM32F407VG, STM32F407VE, STM32F407ZG, STM32F407ZE, STM32F407IG and STM32F407IE Devices */
|
||||||
|
@ -101,6 +102,10 @@
|
||||||
STM32F469NG, STM32F469AE, STM32F469IE, STM32F469BE and STM32F469NE Devices */
|
STM32F469NG, STM32F469AE, STM32F469IE, STM32F469BE and STM32F469NE Devices */
|
||||||
/* #define STM32F479xx */ /*!< STM32F479AI, STM32F479II, STM32F479BI, STM32F479NI, STM32F479AG, STM32F479IG, STM32F479BG
|
/* #define STM32F479xx */ /*!< STM32F479AI, STM32F479II, STM32F479BI, STM32F479NI, STM32F479AG, STM32F479IG, STM32F479BG
|
||||||
and STM32F479NG Devices */
|
and STM32F479NG Devices */
|
||||||
|
/* #define STM32F412Cx */ /*!< STM32F412CEU and STM32F412CGU Devices */
|
||||||
|
/* #define STM32F412Zx */ /*!< STM32F412ZET, STM32F412ZGT, STM32F412ZEJ and STM32F412ZGJ Devices */
|
||||||
|
/* #define STM32F412Vx */ /*!< STM32F412VET, STM32F412VGT, STM32F412VEH and STM32F412VGH Devices */
|
||||||
|
/* #define STM32F412Rx */ /*!< STM32F412RET, STM32F412RGT, STM32F412REY and STM32F412RGY Devices */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Tip: To avoid modifying this file each time you need to switch between these
|
/* Tip: To avoid modifying this file each time you need to switch between these
|
||||||
|
@ -116,11 +121,11 @@
|
||||||
#endif /* USE_HAL_DRIVER */
|
#endif /* USE_HAL_DRIVER */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief CMSIS version number V2.4.3
|
* @brief CMSIS version number V2.5.0
|
||||||
*/
|
*/
|
||||||
#define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
|
#define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_SUB1 (0x04U) /*!< [23:16] sub1 version */
|
#define __STM32F4xx_CMSIS_VERSION_SUB1 (0x05U) /*!< [23:16] sub1 version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x03U) /*!< [15:8] sub2 version */
|
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
|
#define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
|
||||||
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\
|
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\
|
||||||
|(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\
|
|(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\
|
||||||
|
@ -160,7 +165,7 @@
|
||||||
#elif defined(STM32F410Cx)
|
#elif defined(STM32F410Cx)
|
||||||
#include "stm32f410cx.h"
|
#include "stm32f410cx.h"
|
||||||
#elif defined(STM32F410Rx)
|
#elif defined(STM32F410Rx)
|
||||||
#include "stm32f410rx.h"
|
#include "stm32f410rx.h"
|
||||||
#elif defined(STM32F411xE)
|
#elif defined(STM32F411xE)
|
||||||
#include "stm32f411xe.h"
|
#include "stm32f411xe.h"
|
||||||
#elif defined(STM32F446xx)
|
#elif defined(STM32F446xx)
|
||||||
|
@ -169,6 +174,14 @@
|
||||||
#include "stm32f469xx.h"
|
#include "stm32f469xx.h"
|
||||||
#elif defined(STM32F479xx)
|
#elif defined(STM32F479xx)
|
||||||
#include "stm32f479xx.h"
|
#include "stm32f479xx.h"
|
||||||
|
#elif defined(STM32F412Cx)
|
||||||
|
#include "stm32f412cx.h"
|
||||||
|
#elif defined(STM32F412Zx)
|
||||||
|
#include "stm32f412zx.h"
|
||||||
|
#elif defined(STM32F412Rx)
|
||||||
|
#include "stm32f412rx.h"
|
||||||
|
#elif defined(STM32F412Vx)
|
||||||
|
#include "stm32f412vx.h"
|
||||||
#else
|
#else
|
||||||
#error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
|
#error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file system_stm32f4xx.c
|
* @file system_stm32f4xx.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File.
|
* @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
|
||||||
|
@ -111,9 +111,10 @@
|
||||||
/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */
|
/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
||||||
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
/* #define DATA_IN_ExtSRAM */
|
/* #define DATA_IN_ExtSRAM */
|
||||||
#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx */
|
#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx ||\
|
||||||
|
STM32F412Zx || STM32F412Vx */
|
||||||
|
|
||||||
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
|
@ -341,7 +342,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
__IO uint32_t tmp = 0x00;
|
__IO uint32_t tmp = 0x00;
|
||||||
|
|
||||||
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
||||||
register uint32_t index;
|
register __IO uint32_t index;
|
||||||
|
|
||||||
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
|
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
|
||||||
RCC->AHB1ENR |= 0x000001F8;
|
RCC->AHB1ENR |= 0x000001F8;
|
||||||
|
@ -506,7 +507,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
#if defined (DATA_IN_ExtSDRAM)
|
#if defined (DATA_IN_ExtSDRAM)
|
||||||
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
||||||
register uint32_t index;
|
register __IO uint32_t index;
|
||||||
|
|
||||||
#if defined(STM32F446xx)
|
#if defined(STM32F446xx)
|
||||||
/* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface
|
/* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface
|
||||||
|
@ -695,7 +696,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
|
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
||||||
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
|
|
||||||
#if defined(DATA_IN_ExtSRAM)
|
#if defined(DATA_IN_ExtSRAM)
|
||||||
/*-- GPIOs Configuration -----------------------------------------------------*/
|
/*-- GPIOs Configuration -----------------------------------------------------*/
|
||||||
|
@ -772,18 +773,19 @@ void SystemInit_ExtMemCtl(void)
|
||||||
FMC_Bank1->BTCR[3] = 0x00110212;
|
FMC_Bank1->BTCR[3] = 0x00110212;
|
||||||
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
||||||
#endif /* STM32F469xx || STM32F479xx */
|
#endif /* STM32F469xx || STM32F479xx */
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)\
|
||||||
|
|| defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
/* Delay after an RCC peripheral clock enabling */
|
/* Delay after an RCC peripheral clock enabling */
|
||||||
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN);
|
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN);
|
||||||
/* Configure and enable Bank1_SRAM2 */
|
/* Configure and enable Bank1_SRAM2 */
|
||||||
FSMC_Bank1->BTCR[2] = 0x00001011;
|
FSMC_Bank1->BTCR[2] = 0x00001011;
|
||||||
FSMC_Bank1->BTCR[3] = 0x00000201;
|
FSMC_Bank1->BTCR[3] = 0x00000201;
|
||||||
FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF;
|
FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF;
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx */
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F412Zx || STM32F412Vx */
|
||||||
|
|
||||||
#endif /* DATA_IN_ExtSRAM */
|
#endif /* DATA_IN_ExtSRAM */
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
||||||
STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */
|
STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Vx */
|
||||||
(void)(tmp);
|
(void)(tmp);
|
||||||
}
|
}
|
||||||
#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */
|
#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file system_stm32f4xx.h
|
* @file system_stm32f4xx.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
|
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx.h
|
* @file stm32f4xx.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.2
|
* @version V2.5.0
|
||||||
* @date 13-November-2015
|
* @date 22-April-2016
|
||||||
* @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File.
|
* @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File.
|
||||||
*
|
*
|
||||||
* The file is the unique include file that the application programmer
|
* The file is the unique include file that the application programmer
|
||||||
|
@ -76,7 +76,10 @@
|
||||||
*/
|
*/
|
||||||
#if !defined (STM32F405xx) && !defined (STM32F415xx) && !defined (STM32F407xx) && !defined (STM32F417xx) && \
|
#if !defined (STM32F405xx) && !defined (STM32F415xx) && !defined (STM32F407xx) && !defined (STM32F417xx) && \
|
||||||
!defined (STM32F427xx) && !defined (STM32F437xx) && !defined (STM32F429xx) && !defined (STM32F439xx) && \
|
!defined (STM32F427xx) && !defined (STM32F437xx) && !defined (STM32F429xx) && !defined (STM32F439xx) && \
|
||||||
!defined (STM32F401xC) && !defined (STM32F401xE) && !defined (STM32F411xE) && !defined (STM32F446xx)
|
!defined (STM32F401xC) && !defined (STM32F401xE) && !defined (STM32F410Tx) && !defined (STM32F410Cx) && \
|
||||||
|
!defined (STM32F410Rx) && !defined (STM32F411xE) && !defined (STM32F446xx) && !defined (STM32F469xx) && \
|
||||||
|
!defined (STM32F479xx) && !defined (STM32F412Cx) && !defined (STM32F412Rx) && !defined (STM32F412Vx) && \
|
||||||
|
!defined (STM32F412Zx)
|
||||||
/* #define STM32F405xx */ /*!< STM32F405RG, STM32F405VG and STM32F405ZG Devices */
|
/* #define STM32F405xx */ /*!< STM32F405RG, STM32F405VG and STM32F405ZG Devices */
|
||||||
/* #define STM32F415xx */ /*!< STM32F415RG, STM32F415VG and STM32F415ZG Devices */
|
/* #define STM32F415xx */ /*!< STM32F415RG, STM32F415VG and STM32F415ZG Devices */
|
||||||
#define STM32F407xx /*!< STM32F407VG, STM32F407VE, STM32F407ZG, STM32F407ZE, STM32F407IG and STM32F407IE Devices */
|
#define STM32F407xx /*!< STM32F407VG, STM32F407VE, STM32F407ZG, STM32F407ZE, STM32F407IG and STM32F407IE Devices */
|
||||||
|
@ -91,7 +94,15 @@
|
||||||
/* #define STM32F401xE */ /*!< STM32F401CD, STM32F401RD, STM32F401VD, STM32F401CE, STM32F401RE and STM32F401VE Devices */
|
/* #define STM32F401xE */ /*!< STM32F401CD, STM32F401RD, STM32F401VD, STM32F401CE, STM32F401RE and STM32F401VE Devices */
|
||||||
/* #define STM32F411xE */ /*!< STM32F411CC, STM32F411RC, STM32F411VC, STM32F411CE, STM32F411RE and STM32F411VE Devices */
|
/* #define STM32F411xE */ /*!< STM32F411CC, STM32F411RC, STM32F411VC, STM32F411CE, STM32F411RE and STM32F411VE Devices */
|
||||||
/* #define STM32F446xx */ /*!< STM32F446MC, STM32F446ME, STM32F446RC, STM32F446RE, STM32F446VC, STM32F446VE, STM32F446ZC,
|
/* #define STM32F446xx */ /*!< STM32F446MC, STM32F446ME, STM32F446RC, STM32F446RE, STM32F446VC, STM32F446VE, STM32F446ZC,
|
||||||
and STM32F446ZE Devices */
|
and STM32F446ZE Devices */
|
||||||
|
/* #define STM32F469xx */ /*!< STM32F469AI, STM32F469II, STM32F469BI, STM32F469NI, STM32F469AG, STM32F469IG, STM32F469BG,
|
||||||
|
STM32F469NG, STM32F469AE, STM32F469IE, STM32F469BE and STM32F469NE Devices */
|
||||||
|
/* #define STM32F479xx */ /*!< STM32F479AI, STM32F479II, STM32F479BI, STM32F479NI, STM32F479AG, STM32F479IG, STM32F479BG
|
||||||
|
and STM32F479NG Devices */
|
||||||
|
/* #define STM32F412Cx */ /*!< STM32F412CEU and STM32F412CGU Devices */
|
||||||
|
/* #define STM32F412Zx */ /*!< STM32F412ZET, STM32F412ZGT, STM32F412ZEJ and STM32F412ZGJ Devices */
|
||||||
|
/* #define STM32F412Vx */ /*!< STM32F412VET, STM32F412VGT, STM32F412VEH and STM32F412VGH Devices */
|
||||||
|
/* #define STM32F412Rx */ /*!< STM32F412RET, STM32F412RGT, STM32F412REY and STM32F412RGY Devices */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Tip: To avoid modifying this file each time you need to switch between these
|
/* Tip: To avoid modifying this file each time you need to switch between these
|
||||||
|
@ -107,17 +118,17 @@
|
||||||
#endif /* USE_HAL_DRIVER */
|
#endif /* USE_HAL_DRIVER */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief CMSIS Device version number V2.4.1
|
* @brief CMSIS version number V2.5.0
|
||||||
*/
|
*/
|
||||||
#define __STM32F4xx_CMSIS_DEVICE_VERSION_MAIN (0x02) /*!< [31:24] main version */
|
#define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
|
||||||
#define __STM32F4xx_CMSIS_DEVICE_VERSION_SUB1 (0x03) /*!< [23:16] sub1 version */
|
#define __STM32F4xx_CMSIS_VERSION_SUB1 (0x05U) /*!< [23:16] sub1 version */
|
||||||
#define __STM32F4xx_CMSIS_DEVICE_VERSION_SUB2 (0x02) /*!< [15:8] sub2 version */
|
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
|
||||||
#define __STM32F4xx_CMSIS_DEVICE_VERSION_RC (0x00) /*!< [7:0] release candidate */
|
#define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
|
||||||
#define __STM32F4xx_CMSIS_DEVICE_VERSION ((__STM32F4xx_CMSIS_DEVICE_VERSION_MAIN << 24)\
|
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\
|
||||||
|(__STM32F4xx_CMSIS_DEVICE_VERSION_SUB1 << 16)\
|
|(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\
|
||||||
|(__STM32F4xx_CMSIS_DEVICE_VERSION_SUB2 << 8 )\
|
|(__STM32F4xx_CMSIS_VERSION_SUB2 << 8 )\
|
||||||
|(__STM32F4xx_CMSIS_DEVICE_VERSION))
|
|(__STM32F4xx_CMSIS_VERSION))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
@ -146,10 +157,28 @@
|
||||||
#include "stm32f401xc.h"
|
#include "stm32f401xc.h"
|
||||||
#elif defined(STM32F401xE)
|
#elif defined(STM32F401xE)
|
||||||
#include "stm32f401xe.h"
|
#include "stm32f401xe.h"
|
||||||
|
#elif defined(STM32F410Tx)
|
||||||
|
#include "stm32f410tx.h"
|
||||||
|
#elif defined(STM32F410Cx)
|
||||||
|
#include "stm32f410cx.h"
|
||||||
|
#elif defined(STM32F410Rx)
|
||||||
|
#include "stm32f410rx.h"
|
||||||
#elif defined(STM32F411xE)
|
#elif defined(STM32F411xE)
|
||||||
#include "stm32f411xe.h"
|
#include "stm32f411xe.h"
|
||||||
#elif defined(STM32F446xx)
|
#elif defined(STM32F446xx)
|
||||||
#include "stm32f446xx.h"
|
#include "stm32f446xx.h"
|
||||||
|
#elif defined(STM32F469xx)
|
||||||
|
#include "stm32f469xx.h"
|
||||||
|
#elif defined(STM32F479xx)
|
||||||
|
#include "stm32f479xx.h"
|
||||||
|
#elif defined(STM32F412Cx)
|
||||||
|
#include "stm32f412cx.h"
|
||||||
|
#elif defined(STM32F412Zx)
|
||||||
|
#include "stm32f412zx.h"
|
||||||
|
#elif defined(STM32F412Rx)
|
||||||
|
#include "stm32f412rx.h"
|
||||||
|
#elif defined(STM32F412Vx)
|
||||||
|
#include "stm32f412vx.h"
|
||||||
#else
|
#else
|
||||||
#error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
|
#error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file system_stm32f4xx.c
|
* @file system_stm32f4xx.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.2
|
* @version V2.5.0
|
||||||
* @date 13-November-2015
|
* @date 22-April-2016
|
||||||
* @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File.
|
* @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
|
||||||
|
@ -341,7 +341,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
__IO uint32_t tmp = 0x00;
|
__IO uint32_t tmp = 0x00;
|
||||||
|
|
||||||
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
||||||
register uint32_t index;
|
register __IO uint32_t index;
|
||||||
|
|
||||||
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
|
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
|
||||||
RCC->AHB1ENR |= 0x000001F8;
|
RCC->AHB1ENR |= 0x000001F8;
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file system_stm32f4xx.h
|
* @file system_stm32f4xx.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.2
|
* @version V2.5.0
|
||||||
* @date 13-November-2015
|
* @date 22-April-2016
|
||||||
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
|
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx.h
|
* @file stm32f4xx.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File.
|
* @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File.
|
||||||
*
|
*
|
||||||
* The file is the unique include file that the application programmer
|
* The file is the unique include file that the application programmer
|
||||||
|
@ -78,7 +78,8 @@
|
||||||
!defined (STM32F427xx) && !defined (STM32F437xx) && !defined (STM32F429xx) && !defined (STM32F439xx) && \
|
!defined (STM32F427xx) && !defined (STM32F437xx) && !defined (STM32F429xx) && !defined (STM32F439xx) && \
|
||||||
!defined (STM32F401xC) && !defined (STM32F401xE) && !defined (STM32F410Tx) && !defined (STM32F410Cx) && \
|
!defined (STM32F401xC) && !defined (STM32F401xE) && !defined (STM32F410Tx) && !defined (STM32F410Cx) && \
|
||||||
!defined (STM32F410Rx) && !defined (STM32F411xE) && !defined (STM32F446xx) && !defined (STM32F469xx) && \
|
!defined (STM32F410Rx) && !defined (STM32F411xE) && !defined (STM32F446xx) && !defined (STM32F469xx) && \
|
||||||
!defined (STM32F479xx)
|
!defined (STM32F479xx) && !defined (STM32F412Cx) && !defined (STM32F412Rx) && !defined (STM32F412Vx) && \
|
||||||
|
!defined (STM32F412Zx)
|
||||||
/* #define STM32F405xx */ /*!< STM32F405RG, STM32F405VG and STM32F405ZG Devices */
|
/* #define STM32F405xx */ /*!< STM32F405RG, STM32F405VG and STM32F405ZG Devices */
|
||||||
/* #define STM32F415xx */ /*!< STM32F415RG, STM32F415VG and STM32F415ZG Devices */
|
/* #define STM32F415xx */ /*!< STM32F415RG, STM32F415VG and STM32F415ZG Devices */
|
||||||
/* #define STM32F407xx */ /*!< STM32F407VG, STM32F407VE, STM32F407ZG, STM32F407ZE, STM32F407IG and STM32F407IE Devices */
|
/* #define STM32F407xx */ /*!< STM32F407VG, STM32F407VE, STM32F407ZG, STM32F407ZE, STM32F407IG and STM32F407IE Devices */
|
||||||
|
@ -101,6 +102,10 @@
|
||||||
STM32F469NG, STM32F469AE, STM32F469IE, STM32F469BE and STM32F469NE Devices */
|
STM32F469NG, STM32F469AE, STM32F469IE, STM32F469BE and STM32F469NE Devices */
|
||||||
/* #define STM32F479xx */ /*!< STM32F479AI, STM32F479II, STM32F479BI, STM32F479NI, STM32F479AG, STM32F479IG, STM32F479BG
|
/* #define STM32F479xx */ /*!< STM32F479AI, STM32F479II, STM32F479BI, STM32F479NI, STM32F479AG, STM32F479IG, STM32F479BG
|
||||||
and STM32F479NG Devices */
|
and STM32F479NG Devices */
|
||||||
|
/* #define STM32F412Cx */ /*!< STM32F412CEU and STM32F412CGU Devices */
|
||||||
|
/* #define STM32F412Zx */ /*!< STM32F412ZET, STM32F412ZGT, STM32F412ZEJ and STM32F412ZGJ Devices */
|
||||||
|
/* #define STM32F412Vx */ /*!< STM32F412VET, STM32F412VGT, STM32F412VEH and STM32F412VGH Devices */
|
||||||
|
/* #define STM32F412Rx */ /*!< STM32F412RET, STM32F412RGT, STM32F412REY and STM32F412RGY Devices */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Tip: To avoid modifying this file each time you need to switch between these
|
/* Tip: To avoid modifying this file each time you need to switch between these
|
||||||
|
@ -116,11 +121,11 @@
|
||||||
#endif /* USE_HAL_DRIVER */
|
#endif /* USE_HAL_DRIVER */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief CMSIS version number V2.4.3
|
* @brief CMSIS version number V2.5.0
|
||||||
*/
|
*/
|
||||||
#define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
|
#define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_SUB1 (0x04U) /*!< [23:16] sub1 version */
|
#define __STM32F4xx_CMSIS_VERSION_SUB1 (0x05U) /*!< [23:16] sub1 version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x03U) /*!< [15:8] sub2 version */
|
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
|
||||||
#define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
|
#define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
|
||||||
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\
|
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\
|
||||||
|(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\
|
|(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\
|
||||||
|
@ -160,7 +165,7 @@
|
||||||
#elif defined(STM32F410Cx)
|
#elif defined(STM32F410Cx)
|
||||||
#include "stm32f410cx.h"
|
#include "stm32f410cx.h"
|
||||||
#elif defined(STM32F410Rx)
|
#elif defined(STM32F410Rx)
|
||||||
#include "stm32f410rx.h"
|
#include "stm32f410rx.h"
|
||||||
#elif defined(STM32F411xE)
|
#elif defined(STM32F411xE)
|
||||||
#include "stm32f411xe.h"
|
#include "stm32f411xe.h"
|
||||||
#elif defined(STM32F446xx)
|
#elif defined(STM32F446xx)
|
||||||
|
@ -169,6 +174,14 @@
|
||||||
#include "stm32f469xx.h"
|
#include "stm32f469xx.h"
|
||||||
#elif defined(STM32F479xx)
|
#elif defined(STM32F479xx)
|
||||||
#include "stm32f479xx.h"
|
#include "stm32f479xx.h"
|
||||||
|
#elif defined(STM32F412Cx)
|
||||||
|
#include "stm32f412cx.h"
|
||||||
|
#elif defined(STM32F412Zx)
|
||||||
|
#include "stm32f412zx.h"
|
||||||
|
#elif defined(STM32F412Rx)
|
||||||
|
#include "stm32f412rx.h"
|
||||||
|
#elif defined(STM32F412Vx)
|
||||||
|
#include "stm32f412vx.h"
|
||||||
#else
|
#else
|
||||||
#error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
|
#error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file system_stm32f4xx.c
|
* @file system_stm32f4xx.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.3
|
* @version V2.5.0
|
||||||
* @date 22-January-2016
|
* @date 22-April-2016
|
||||||
* @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File.
|
* @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
|
||||||
|
@ -111,9 +111,10 @@
|
||||||
/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */
|
/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
||||||
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
/* #define DATA_IN_ExtSRAM */
|
/* #define DATA_IN_ExtSRAM */
|
||||||
#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx */
|
#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx ||\
|
||||||
|
STM32F412Zx || STM32F412Vx */
|
||||||
|
|
||||||
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
|
@ -340,7 +341,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
__IO uint32_t tmp = 0x00;
|
__IO uint32_t tmp = 0x00;
|
||||||
|
|
||||||
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
||||||
register uint32_t index;
|
register __IO uint32_t index;
|
||||||
|
|
||||||
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
|
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
|
||||||
RCC->AHB1ENR |= 0x000001F8;
|
RCC->AHB1ENR |= 0x000001F8;
|
||||||
|
@ -505,7 +506,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
#if defined (DATA_IN_ExtSDRAM)
|
#if defined (DATA_IN_ExtSDRAM)
|
||||||
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
||||||
register uint32_t index;
|
register __IO uint32_t index;
|
||||||
|
|
||||||
#if defined(STM32F446xx)
|
#if defined(STM32F446xx)
|
||||||
/* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface
|
/* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface
|
||||||
|
@ -694,7 +695,7 @@ void SystemInit_ExtMemCtl(void)
|
||||||
|
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
||||||
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|| defined(STM32F469xx) || defined(STM32F479xx)
|
|| defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
|
|
||||||
#if defined(DATA_IN_ExtSRAM)
|
#if defined(DATA_IN_ExtSRAM)
|
||||||
/*-- GPIOs Configuration -----------------------------------------------------*/
|
/*-- GPIOs Configuration -----------------------------------------------------*/
|
||||||
|
@ -771,18 +772,19 @@ void SystemInit_ExtMemCtl(void)
|
||||||
FMC_Bank1->BTCR[3] = 0x00110212;
|
FMC_Bank1->BTCR[3] = 0x00110212;
|
||||||
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
||||||
#endif /* STM32F469xx || STM32F479xx */
|
#endif /* STM32F469xx || STM32F479xx */
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)\
|
||||||
|
|| defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
/* Delay after an RCC peripheral clock enabling */
|
/* Delay after an RCC peripheral clock enabling */
|
||||||
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN);
|
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN);
|
||||||
/* Configure and enable Bank1_SRAM2 */
|
/* Configure and enable Bank1_SRAM2 */
|
||||||
FSMC_Bank1->BTCR[2] = 0x00001011;
|
FSMC_Bank1->BTCR[2] = 0x00001011;
|
||||||
FSMC_Bank1->BTCR[3] = 0x00000201;
|
FSMC_Bank1->BTCR[3] = 0x00000201;
|
||||||
FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF;
|
FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF;
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx */
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F412Zx || STM32F412Vx */
|
||||||
|
|
||||||
#endif /* DATA_IN_ExtSRAM */
|
#endif /* DATA_IN_ExtSRAM */
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
||||||
STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */
|
STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Vx */
|
||||||
(void)(tmp);
|
(void)(tmp);
|
||||||
}
|
}
|
||||||
#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */
|
#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file system_stm32f4xx.h
|
* @file system_stm32f4xx.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V2.4.2
|
* @version V2.5.0
|
||||||
* @date 13-November-2015
|
* @date 22-April-2016
|
||||||
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
|
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32_hal_legacy.h
|
* @file stm32_hal_legacy.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version $VERSION$
|
* @version V1.5.0
|
||||||
* @date $DATE$
|
* @date 06-May-2016
|
||||||
* @brief This file contains aliases definition for the STM32Cube HAL constants
|
* @brief This file contains aliases definition for the STM32Cube HAL constants
|
||||||
* macros and functions maintained for legacy purpose.
|
* macros and functions maintained for legacy purpose.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
|
@ -129,7 +129,6 @@
|
||||||
/** @defgroup HAL_COMP_Aliased_Defines HAL COMP Aliased Defines maintained for legacy purpose
|
/** @defgroup HAL_COMP_Aliased_Defines HAL COMP Aliased Defines maintained for legacy purpose
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define COMP_WINDOWMODE_DISABLED COMP_WINDOWMODE_DISABLE
|
#define COMP_WINDOWMODE_DISABLED COMP_WINDOWMODE_DISABLE
|
||||||
#define COMP_WINDOWMODE_ENABLED COMP_WINDOWMODE_ENABLE
|
#define COMP_WINDOWMODE_ENABLED COMP_WINDOWMODE_ENABLE
|
||||||
#define COMP_EXTI_LINE_COMP1_EVENT COMP_EXTI_LINE_COMP1
|
#define COMP_EXTI_LINE_COMP1_EVENT COMP_EXTI_LINE_COMP1
|
||||||
|
@ -144,6 +143,62 @@
|
||||||
#define COMP_OUTPUT_TIM3IC1 COMP_OUTPUT_COMP1_TIM3IC1
|
#define COMP_OUTPUT_TIM3IC1 COMP_OUTPUT_COMP1_TIM3IC1
|
||||||
#define COMP_OUTPUT_TIM3OCREFCLR COMP_OUTPUT_COMP1_TIM3OCREFCLR
|
#define COMP_OUTPUT_TIM3OCREFCLR COMP_OUTPUT_COMP1_TIM3OCREFCLR
|
||||||
#endif /* STM32F373xC || STM32F378xx */
|
#endif /* STM32F373xC || STM32F378xx */
|
||||||
|
|
||||||
|
#if defined(STM32L0) || defined(STM32L4)
|
||||||
|
#define COMP_WINDOWMODE_ENABLE COMP_WINDOWMODE_COMP1_INPUT_PLUS_COMMON
|
||||||
|
|
||||||
|
#define COMP_NONINVERTINGINPUT_IO1 COMP_INPUT_PLUS_IO1
|
||||||
|
#define COMP_NONINVERTINGINPUT_IO2 COMP_INPUT_PLUS_IO2
|
||||||
|
#define COMP_NONINVERTINGINPUT_IO3 COMP_INPUT_PLUS_IO3
|
||||||
|
|
||||||
|
#define COMP_INVERTINGINPUT_1_4VREFINT COMP_INPUT_MINUS_1_4VREFINT
|
||||||
|
#define COMP_INVERTINGINPUT_1_2VREFINT COMP_INPUT_MINUS_1_2VREFINT
|
||||||
|
#define COMP_INVERTINGINPUT_3_4VREFINT COMP_INPUT_MINUS_3_4VREFINT
|
||||||
|
#define COMP_INVERTINGINPUT_VREFINT COMP_INPUT_MINUS_VREFINT
|
||||||
|
#define COMP_INVERTINGINPUT_DAC1_CH1 COMP_INPUT_MINUS_DAC1_CH1
|
||||||
|
#define COMP_INVERTINGINPUT_DAC1_CH2 COMP_INPUT_MINUS_DAC1_CH2
|
||||||
|
#define COMP_INVERTINGINPUT_DAC1 COMP_INPUT_MINUS_DAC1_CH1
|
||||||
|
#define COMP_INVERTINGINPUT_DAC2 COMP_INPUT_MINUS_DAC1_CH2
|
||||||
|
#define COMP_INVERTINGINPUT_IO1 COMP_INPUT_MINUS_IO1
|
||||||
|
#define COMP_INVERTINGINPUT_IO2 COMP_INPUT_MINUS_IO2
|
||||||
|
#define COMP_INVERTINGINPUT_IO3 COMP_INPUT_MINUS_IO3
|
||||||
|
#define COMP_INVERTINGINPUT_IO4 COMP_INPUT_MINUS_IO4
|
||||||
|
#define COMP_INVERTINGINPUT_IO5 COMP_INPUT_MINUS_IO5
|
||||||
|
|
||||||
|
#define COMP_OUTPUTLEVEL_LOW COMP_OUTPUT_LEVEL_LOW
|
||||||
|
#define COMP_OUTPUTLEVEL_HIGH COMP_OUTPUT_LEVEL_HIGH
|
||||||
|
|
||||||
|
/* Note: Literal "COMP_FLAG_LOCK" kept for legacy purpose. */
|
||||||
|
/* To check COMP lock state, use macro "__HAL_COMP_IS_LOCKED()". */
|
||||||
|
#if defined(COMP_CSR_LOCK)
|
||||||
|
#define COMP_FLAG_LOCK COMP_CSR_LOCK
|
||||||
|
#elif defined(COMP_CSR_COMP1LOCK)
|
||||||
|
#define COMP_FLAG_LOCK COMP_CSR_COMP1LOCK
|
||||||
|
#elif defined(COMP_CSR_COMPxLOCK)
|
||||||
|
#define COMP_FLAG_LOCK COMP_CSR_COMPxLOCK
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(STM32L4)
|
||||||
|
#define COMP_BLANKINGSRCE_TIM1OC5 COMP_BLANKINGSRC_TIM1_OC5_COMP1
|
||||||
|
#define COMP_BLANKINGSRCE_TIM2OC3 COMP_BLANKINGSRC_TIM2_OC3_COMP1
|
||||||
|
#define COMP_BLANKINGSRCE_TIM3OC3 COMP_BLANKINGSRC_TIM3_OC3_COMP1
|
||||||
|
#define COMP_BLANKINGSRCE_TIM3OC4 COMP_BLANKINGSRC_TIM3_OC4_COMP2
|
||||||
|
#define COMP_BLANKINGSRCE_TIM8OC5 COMP_BLANKINGSRC_TIM8_OC5_COMP2
|
||||||
|
#define COMP_BLANKINGSRCE_TIM15OC1 COMP_BLANKINGSRC_TIM15_OC1_COMP2
|
||||||
|
#define COMP_BLANKINGSRCE_NONE COMP_BLANKINGSRC_NONE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(STM32L0)
|
||||||
|
#define COMP_MODE_HIGHSPEED COMP_POWERMODE_MEDIUMSPEED
|
||||||
|
#define COMP_MODE_LOWSPEED COMP_POWERMODE_ULTRALOWPOWER
|
||||||
|
#else
|
||||||
|
#define COMP_MODE_HIGHSPEED COMP_POWERMODE_HIGHSPEED
|
||||||
|
#define COMP_MODE_MEDIUMSPEED COMP_POWERMODE_MEDIUMSPEED
|
||||||
|
#define COMP_MODE_LOWPOWER COMP_POWERMODE_LOWPOWER
|
||||||
|
#define COMP_MODE_ULTRALOWPOWER COMP_POWERMODE_ULTRALOWPOWER
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
@ -384,6 +439,7 @@
|
||||||
#define GPIO_SPEED_HIGH GPIO_SPEED_FREQ_HIGH
|
#define GPIO_SPEED_HIGH GPIO_SPEED_FREQ_HIGH
|
||||||
#endif /* STM32F0 || STM32F3 || STM32F1 */
|
#endif /* STM32F0 || STM32F3 || STM32F1 */
|
||||||
|
|
||||||
|
#define GPIO_AF6_DFSDM GPIO_AF6_DFSDM1
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
@ -424,7 +480,7 @@
|
||||||
#define I2C_NOSTRETCH_ENABLED I2C_NOSTRETCH_ENABLE
|
#define I2C_NOSTRETCH_ENABLED I2C_NOSTRETCH_ENABLE
|
||||||
#define I2C_ANALOGFILTER_ENABLED I2C_ANALOGFILTER_ENABLE
|
#define I2C_ANALOGFILTER_ENABLED I2C_ANALOGFILTER_ENABLE
|
||||||
#define I2C_ANALOGFILTER_DISABLED I2C_ANALOGFILTER_DISABLE
|
#define I2C_ANALOGFILTER_DISABLED I2C_ANALOGFILTER_DISABLE
|
||||||
#if defined(STM32F0) || defined(STM32F1) || defined(STM32F3) || defined(STM32G0) || defined(STM32L4) || defined(STM32L1)
|
#if defined(STM32F0) || defined(STM32F1) || defined(STM32F3) || defined(STM32G0) || defined(STM32L4) || defined(STM32L1) || defined(STM32F7)
|
||||||
#define HAL_I2C_STATE_MEM_BUSY_TX HAL_I2C_STATE_BUSY_TX
|
#define HAL_I2C_STATE_MEM_BUSY_TX HAL_I2C_STATE_BUSY_TX
|
||||||
#define HAL_I2C_STATE_MEM_BUSY_RX HAL_I2C_STATE_BUSY_RX
|
#define HAL_I2C_STATE_MEM_BUSY_RX HAL_I2C_STATE_BUSY_RX
|
||||||
#define HAL_I2C_STATE_MASTER_BUSY_TX HAL_I2C_STATE_BUSY_TX
|
#define HAL_I2C_STATE_MASTER_BUSY_TX HAL_I2C_STATE_BUSY_TX
|
||||||
|
@ -556,6 +612,9 @@
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define I2S_STANDARD_PHILLIPS I2S_STANDARD_PHILIPS
|
#define I2S_STANDARD_PHILLIPS I2S_STANDARD_PHILIPS
|
||||||
|
#if defined(STM32F7)
|
||||||
|
#define I2S_CLOCK_SYSCLK I2S_CLOCK_PLL
|
||||||
|
#endif
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
@ -872,9 +931,12 @@
|
||||||
#define ETH_MAC_RXFIFO_BELOW_THRESHOLD ((uint32_t)0x00000100) /* Rx FIFO fill level: fill-level below flow-control de-activate threshold */
|
#define ETH_MAC_RXFIFO_BELOW_THRESHOLD ((uint32_t)0x00000100) /* Rx FIFO fill level: fill-level below flow-control de-activate threshold */
|
||||||
#define ETH_MAC_RXFIFO_ABOVE_THRESHOLD ((uint32_t)0x00000200) /* Rx FIFO fill level: fill-level above flow-control activate threshold */
|
#define ETH_MAC_RXFIFO_ABOVE_THRESHOLD ((uint32_t)0x00000200) /* Rx FIFO fill level: fill-level above flow-control activate threshold */
|
||||||
#define ETH_MAC_RXFIFO_FULL ((uint32_t)0x00000300) /* Rx FIFO fill level: full */
|
#define ETH_MAC_RXFIFO_FULL ((uint32_t)0x00000300) /* Rx FIFO fill level: full */
|
||||||
|
#if defined(STM32F1)
|
||||||
|
#else
|
||||||
#define ETH_MAC_READCONTROLLER_IDLE ((uint32_t)0x00000000) /* Rx FIFO read controller IDLE state */
|
#define ETH_MAC_READCONTROLLER_IDLE ((uint32_t)0x00000000) /* Rx FIFO read controller IDLE state */
|
||||||
#define ETH_MAC_READCONTROLLER_READING_DATA ((uint32_t)0x00000020) /* Rx FIFO read controller Reading frame data */
|
#define ETH_MAC_READCONTROLLER_READING_DATA ((uint32_t)0x00000020) /* Rx FIFO read controller Reading frame data */
|
||||||
#define ETH_MAC_READCONTROLLER_READING_STATUS ((uint32_t)0x00000040) /* Rx FIFO read controller Reading frame status (or time-stamp) */
|
#define ETH_MAC_READCONTROLLER_READING_STATUS ((uint32_t)0x00000040) /* Rx FIFO read controller Reading frame status (or time-stamp) */
|
||||||
|
#endif
|
||||||
#define ETH_MAC_READCONTROLLER_FLUSHING ((uint32_t)0x00000060) /* Rx FIFO read controller Flushing the frame data and status */
|
#define ETH_MAC_READCONTROLLER_FLUSHING ((uint32_t)0x00000060) /* Rx FIFO read controller Flushing the frame data and status */
|
||||||
#define ETH_MAC_RXFIFO_WRITE_ACTIVE ((uint32_t)0x00000010) /* Rx FIFO write controller active */
|
#define ETH_MAC_RXFIFO_WRITE_ACTIVE ((uint32_t)0x00000010) /* Rx FIFO write controller active */
|
||||||
#define ETH_MAC_SMALL_FIFO_NOTACTIVE ((uint32_t)0x00000000) /* MAC small FIFO read / write controllers not active */
|
#define ETH_MAC_SMALL_FIFO_NOTACTIVE ((uint32_t)0x00000000) /* MAC small FIFO read / write controllers not active */
|
||||||
|
@ -886,6 +948,49 @@
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/** @defgroup HAL_DCMI_Aliased_Defines HAL DCMI Aliased Defines maintained for legacy purpose
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define HAL_DCMI_ERROR_OVF HAL_DCMI_ERROR_OVR
|
||||||
|
#define DCMI_IT_OVF DCMI_IT_OVR
|
||||||
|
#define DCMI_FLAG_OVFRI DCMI_FLAG_OVRRI
|
||||||
|
#define DCMI_FLAG_OVFMI DCMI_FLAG_OVRMI
|
||||||
|
|
||||||
|
#define HAL_DCMI_ConfigCROP HAL_DCMI_ConfigCrop
|
||||||
|
#define HAL_DCMI_EnableCROP HAL_DCMI_EnableCrop
|
||||||
|
#define HAL_DCMI_DisableCROP HAL_DCMI_DisableCrop
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(STM32L4xx) || defined(STM32F7) || defined(STM32F427xx) || defined(STM32F437xx) ||\
|
||||||
|
defined(STM32F429xx) || defined(STM32F439xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
|
/** @defgroup HAL_DMA2D_Aliased_Defines HAL DMA2D Aliased Defines maintained for legacy purpose
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define DMA2D_ARGB8888 DMA2D_OUTPUT_ARGB8888
|
||||||
|
#define DMA2D_RGB888 DMA2D_OUTPUT_RGB888
|
||||||
|
#define DMA2D_RGB565 DMA2D_OUTPUT_RGB565
|
||||||
|
#define DMA2D_ARGB1555 DMA2D_OUTPUT_ARGB1555
|
||||||
|
#define DMA2D_ARGB4444 DMA2D_OUTPUT_ARGB4444
|
||||||
|
|
||||||
|
#define CM_ARGB8888 DMA2D_INPUT_ARGB8888
|
||||||
|
#define CM_RGB888 DMA2D_INPUT_RGB888
|
||||||
|
#define CM_RGB565 DMA2D_INPUT_RGB565
|
||||||
|
#define CM_ARGB1555 DMA2D_INPUT_ARGB1555
|
||||||
|
#define CM_ARGB4444 DMA2D_INPUT_ARGB4444
|
||||||
|
#define CM_L8 DMA2D_INPUT_L8
|
||||||
|
#define CM_AL44 DMA2D_INPUT_AL44
|
||||||
|
#define CM_AL88 DMA2D_INPUT_AL88
|
||||||
|
#define CM_L4 DMA2D_INPUT_L4
|
||||||
|
#define CM_A8 DMA2D_INPUT_A8
|
||||||
|
#define CM_A4 DMA2D_INPUT_A4
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
#endif /* STM32L4xx || STM32F7*/
|
||||||
|
|
||||||
/** @defgroup HAL_PPP_Aliased_Defines HAL PPP Aliased Defines maintained for legacy purpose
|
/** @defgroup HAL_PPP_Aliased_Defines HAL PPP Aliased Defines maintained for legacy purpose
|
||||||
* @{
|
* @{
|
||||||
|
@ -943,7 +1048,10 @@
|
||||||
#define HAL_DBG_LowPowerConfig(Periph, cmd) (((cmd)==ENABLE)? HAL_DBGMCU_DBG_EnableLowPowerConfig(Periph) : HAL_DBGMCU_DBG_DisableLowPowerConfig(Periph))
|
#define HAL_DBG_LowPowerConfig(Periph, cmd) (((cmd)==ENABLE)? HAL_DBGMCU_DBG_EnableLowPowerConfig(Periph) : HAL_DBGMCU_DBG_DisableLowPowerConfig(Periph))
|
||||||
#define HAL_VREFINT_OutputSelect HAL_SYSCFG_VREFINT_OutputSelect
|
#define HAL_VREFINT_OutputSelect HAL_SYSCFG_VREFINT_OutputSelect
|
||||||
#define HAL_Lock_Cmd(cmd) (((cmd)==ENABLE) ? HAL_SYSCFG_Enable_Lock_VREFINT() : HAL_SYSCFG_Disable_Lock_VREFINT())
|
#define HAL_Lock_Cmd(cmd) (((cmd)==ENABLE) ? HAL_SYSCFG_Enable_Lock_VREFINT() : HAL_SYSCFG_Disable_Lock_VREFINT())
|
||||||
|
#if defined(STM32L0)
|
||||||
|
#else
|
||||||
#define HAL_VREFINT_Cmd(cmd) (((cmd)==ENABLE)? HAL_SYSCFG_EnableVREFINT() : HAL_SYSCFG_DisableVREFINT())
|
#define HAL_VREFINT_Cmd(cmd) (((cmd)==ENABLE)? HAL_SYSCFG_EnableVREFINT() : HAL_SYSCFG_DisableVREFINT())
|
||||||
|
#endif
|
||||||
#define HAL_ADC_EnableBuffer_Cmd(cmd) (((cmd)==ENABLE) ? HAL_ADCEx_EnableVREFINT() : HAL_ADCEx_DisableVREFINT())
|
#define HAL_ADC_EnableBuffer_Cmd(cmd) (((cmd)==ENABLE) ? HAL_ADCEx_EnableVREFINT() : HAL_ADCEx_DisableVREFINT())
|
||||||
#define HAL_ADC_EnableBufferSensor_Cmd(cmd) (((cmd)==ENABLE) ? HAL_ADCEx_EnableVREFINTTempSensor() : HAL_ADCEx_DisableVREFINTTempSensor())
|
#define HAL_ADC_EnableBufferSensor_Cmd(cmd) (((cmd)==ENABLE) ? HAL_ADCEx_EnableVREFINTTempSensor() : HAL_ADCEx_DisableVREFINTTempSensor())
|
||||||
/**
|
/**
|
||||||
|
@ -1447,10 +1555,28 @@
|
||||||
|
|
||||||
#define __HAL_COMP_GET_EXTI_LINE COMP_GET_EXTI_LINE
|
#define __HAL_COMP_GET_EXTI_LINE COMP_GET_EXTI_LINE
|
||||||
|
|
||||||
|
#if defined(STM32L0) || defined(STM32L4)
|
||||||
|
/* Note: On these STM32 families, the only argument of this macro */
|
||||||
|
/* is COMP_FLAG_LOCK. */
|
||||||
|
/* This macro is replaced by __HAL_COMP_IS_LOCKED with only HAL handle */
|
||||||
|
/* argument. */
|
||||||
|
#define __HAL_COMP_GET_FLAG(__HANDLE__, __FLAG__) (__HAL_COMP_IS_LOCKED(__HANDLE__))
|
||||||
|
#endif
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(STM32L0) || defined(STM32L4)
|
||||||
|
/** @defgroup HAL_COMP_Aliased_Functions HAL COMP Aliased Functions maintained for legacy purpose
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define HAL_COMP_Start_IT HAL_COMP_Start /* Function considered as legacy as EXTI event or IT configuration is done into HAL_COMP_Init() */
|
||||||
|
#define HAL_COMP_Stop_IT HAL_COMP_Stop /* Function considered as legacy as EXTI event or IT configuration is done into HAL_COMP_Init() */
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
#endif
|
||||||
|
|
||||||
/** @defgroup HAL_DAC_Aliased_Macros HAL DAC Aliased Macros maintained for legacy purpose
|
/** @defgroup HAL_DAC_Aliased_Macros HAL DAC Aliased Macros maintained for legacy purpose
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
@ -2494,7 +2620,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(STM32F7)
|
#if defined(STM32F7)
|
||||||
#define RCC_SDIOCLKSOURCE_CK48 RCC_SDMMC1CLKSOURCE_CLK48
|
#define RCC_SDIOCLKSOURCE_CLK48 RCC_SDMMC1CLKSOURCE_CLK48
|
||||||
#define RCC_SDIOCLKSOURCE_SYSCLK RCC_SDMMC1CLKSOURCE_SYSCLK
|
#define RCC_SDIOCLKSOURCE_SYSCLK RCC_SDMMC1CLKSOURCE_SYSCLK
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -2611,6 +2737,31 @@
|
||||||
|
|
||||||
#define RCC_CRS_SYNCWARM RCC_CRS_SYNCWARN
|
#define RCC_CRS_SYNCWARM RCC_CRS_SYNCWARN
|
||||||
#define RCC_CRS_TRIMOV RCC_CRS_TRIMOVF
|
#define RCC_CRS_TRIMOV RCC_CRS_TRIMOVF
|
||||||
|
|
||||||
|
#define RCC_PERIPHCLK_CK48 RCC_PERIPHCLK_CLK48
|
||||||
|
#define RCC_CK48CLKSOURCE_PLLQ RCC_CLK48CLKSOURCE_PLLQ
|
||||||
|
#define RCC_CK48CLKSOURCE_PLLSAIP RCC_CLK48CLKSOURCE_PLLSAIP
|
||||||
|
#define RCC_CK48CLKSOURCE_PLLI2SQ RCC_CLK48CLKSOURCE_PLLI2SQ
|
||||||
|
#define IS_RCC_CK48CLKSOURCE IS_RCC_CLK48CLKSOURCE
|
||||||
|
#define RCC_SDIOCLKSOURCE_CK48 RCC_SDIOCLKSOURCE_CLK48
|
||||||
|
|
||||||
|
#define __HAL_RCC_DFSDM_CLK_ENABLE __HAL_RCC_DFSDM1_CLK_ENABLE
|
||||||
|
#define __HAL_RCC_DFSDM_CLK_DISABLE __HAL_RCC_DFSDM1_CLK_DISABLE
|
||||||
|
#define __HAL_RCC_DFSDM_IS_CLK_ENABLED __HAL_RCC_DFSDM1_IS_CLK_ENABLED
|
||||||
|
#define __HAL_RCC_DFSDM_IS_CLK_DISABLED __HAL_RCC_DFSDM1_IS_CLK_DISABLED
|
||||||
|
#define __HAL_RCC_DFSDM_FORCE_RESET __HAL_RCC_DFSDM1_FORCE_RESET
|
||||||
|
#define __HAL_RCC_DFSDM_RELEASE_RESET __HAL_RCC_DFSDM1_RELEASE_RESET
|
||||||
|
#define __HAL_RCC_DFSDM_CLK_SLEEP_ENABLE __HAL_RCC_DFSDM1_CLK_SLEEP_ENABLE
|
||||||
|
#define __HAL_RCC_DFSDM_CLK_SLEEP_DISABLE __HAL_RCC_DFSDM1_CLK_SLEEP_DISABLE
|
||||||
|
#define __HAL_RCC_DFSDM_IS_CLK_SLEEP_ENABLED __HAL_RCC_DFSDM1_IS_CLK_SLEEP_ENABLED
|
||||||
|
#define __HAL_RCC_DFSDM_IS_CLK_SLEEP_DISABLED __HAL_RCC_DFSDM1_IS_CLK_SLEEP_DISABLED
|
||||||
|
#define DfsdmClockSelection Dfsdm1ClockSelection
|
||||||
|
#define RCC_PERIPHCLK_DFSDM RCC_PERIPHCLK_DFSDM1
|
||||||
|
#define RCC_DFSDMCLKSOURCE_PCLK RCC_DFSDM1CLKSOURCE_PCLK
|
||||||
|
#define RCC_DFSDMCLKSOURCE_SYSCLK RCC_DFSDM1CLKSOURCE_SYSCLK
|
||||||
|
#define __HAL_RCC_DFSDM_CONFIG __HAL_RCC_DFSDM1_CONFIG
|
||||||
|
#define __HAL_RCC_GET_DFSDM_SOURCE __HAL_RCC_GET_DFSDM1_SOURCE
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
@ -2899,6 +3050,8 @@
|
||||||
#define __HAL_TIM_GetICPrescaler __HAL_TIM_GET_ICPRESCALER
|
#define __HAL_TIM_GetICPrescaler __HAL_TIM_GET_ICPRESCALER
|
||||||
#define __HAL_TIM_SetCompare __HAL_TIM_SET_COMPARE
|
#define __HAL_TIM_SetCompare __HAL_TIM_SET_COMPARE
|
||||||
#define __HAL_TIM_GetCompare __HAL_TIM_GET_COMPARE
|
#define __HAL_TIM_GetCompare __HAL_TIM_GET_COMPARE
|
||||||
|
|
||||||
|
#define TIM_BREAKINPUTSOURCE_DFSDM TIM_BREAKINPUTSOURCE_DFSDM1
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal.c
|
* @file stm32f4xx_hal.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief HAL module driver.
|
* @brief HAL module driver.
|
||||||
* This is the common part of the HAL initialization
|
* This is the common part of the HAL initialization
|
||||||
*
|
*
|
||||||
|
@ -68,11 +68,11 @@
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief STM32F4xx HAL Driver version number V1.4.4
|
* @brief STM32F4xx HAL Driver version number V1.5.0
|
||||||
*/
|
*/
|
||||||
#define __STM32F4xx_HAL_VERSION_MAIN (0x01) /*!< [31:24] main version */
|
#define __STM32F4xx_HAL_VERSION_MAIN (0x01) /*!< [31:24] main version */
|
||||||
#define __STM32F4xx_HAL_VERSION_SUB1 (0x04) /*!< [23:16] sub1 version */
|
#define __STM32F4xx_HAL_VERSION_SUB1 (0x05) /*!< [23:16] sub1 version */
|
||||||
#define __STM32F4xx_HAL_VERSION_SUB2 (0x04) /*!< [15:8] sub2 version */
|
#define __STM32F4xx_HAL_VERSION_SUB2 (0x00) /*!< [15:8] sub2 version */
|
||||||
#define __STM32F4xx_HAL_VERSION_RC (0x00) /*!< [7:0] release candidate */
|
#define __STM32F4xx_HAL_VERSION_RC (0x00) /*!< [7:0] release candidate */
|
||||||
#define __STM32F4xx_HAL_VERSION ((__STM32F4xx_HAL_VERSION_MAIN << 24U)\
|
#define __STM32F4xx_HAL_VERSION ((__STM32F4xx_HAL_VERSION_MAIN << 24U)\
|
||||||
|(__STM32F4xx_HAL_VERSION_SUB1 << 16U)\
|
|(__STM32F4xx_HAL_VERSION_SUB1 << 16U)\
|
||||||
|
@ -263,7 +263,7 @@ __weak void HAL_MspDeInit(void)
|
||||||
__weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
|
__weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
|
||||||
{
|
{
|
||||||
/*Configure the SysTick to have interrupt in 1ms time basis*/
|
/*Configure the SysTick to have interrupt in 1ms time basis*/
|
||||||
HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq()/1000U);
|
HAL_SYSTICK_Config(SystemCoreClock/1000U);
|
||||||
|
|
||||||
/*Configure the SysTick IRQ priority */
|
/*Configure the SysTick IRQ priority */
|
||||||
HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority ,0U);
|
HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority ,0U);
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal.h
|
* @file stm32f4xx_hal.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief This file contains all the functions prototypes for the HAL
|
* @brief This file contains all the functions prototypes for the HAL
|
||||||
* module driver.
|
* module driver.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_adc.c
|
* @file stm32f4xx_hal_adc.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief This file provides firmware functions to manage the following
|
* @brief This file provides firmware functions to manage the following
|
||||||
* functionalities of the Analog to Digital Convertor (ADC) peripheral:
|
* functionalities of the Analog to Digital Convertor (ADC) peripheral:
|
||||||
* + Initialization and de-initialization functions
|
* + Initialization and de-initialization functions
|
||||||
|
@ -498,7 +498,7 @@ HAL_StatusTypeDef HAL_ADC_Start(ADC_HandleTypeDef* hadc)
|
||||||
|
|
||||||
/* Clear regular group conversion flag and overrun flag */
|
/* Clear regular group conversion flag and overrun flag */
|
||||||
/* (To ensure of no unknown state from potential previous ADC operations) */
|
/* (To ensure of no unknown state from potential previous ADC operations) */
|
||||||
__HAL_ADC_CLEAR_FLAG(hadc, ADC_FLAG_EOC);
|
__HAL_ADC_CLEAR_FLAG(hadc, ADC_FLAG_EOC | ADC_FLAG_OVR);
|
||||||
|
|
||||||
/* Check if Multimode enabled */
|
/* Check if Multimode enabled */
|
||||||
if(HAL_IS_BIT_CLR(ADC->CCR, ADC_CCR_MULTI))
|
if(HAL_IS_BIT_CLR(ADC->CCR, ADC_CCR_MULTI))
|
||||||
|
@ -789,7 +789,7 @@ HAL_StatusTypeDef HAL_ADC_Start_IT(ADC_HandleTypeDef* hadc)
|
||||||
|
|
||||||
/* Clear regular group conversion flag and overrun flag */
|
/* Clear regular group conversion flag and overrun flag */
|
||||||
/* (To ensure of no unknown state from potential previous ADC operations) */
|
/* (To ensure of no unknown state from potential previous ADC operations) */
|
||||||
__HAL_ADC_CLEAR_FLAG(hadc, ADC_FLAG_EOC);
|
__HAL_ADC_CLEAR_FLAG(hadc, ADC_FLAG_EOC | ADC_FLAG_OVR);
|
||||||
|
|
||||||
/* Enable end of conversion interrupt for regular group */
|
/* Enable end of conversion interrupt for regular group */
|
||||||
__HAL_ADC_ENABLE_IT(hadc, (ADC_IT_EOC | ADC_IT_OVR));
|
__HAL_ADC_ENABLE_IT(hadc, (ADC_IT_EOC | ADC_IT_OVR));
|
||||||
|
@ -1087,7 +1087,7 @@ HAL_StatusTypeDef HAL_ADC_Start_DMA(ADC_HandleTypeDef* hadc, uint32_t* pData, ui
|
||||||
|
|
||||||
/* Clear regular group conversion flag and overrun flag */
|
/* Clear regular group conversion flag and overrun flag */
|
||||||
/* (To ensure of no unknown state from potential previous ADC operations) */
|
/* (To ensure of no unknown state from potential previous ADC operations) */
|
||||||
__HAL_ADC_CLEAR_FLAG(hadc, ADC_FLAG_EOC);
|
__HAL_ADC_CLEAR_FLAG(hadc, ADC_FLAG_EOC | ADC_FLAG_OVR);
|
||||||
|
|
||||||
/* Enable ADC overrun interrupt */
|
/* Enable ADC overrun interrupt */
|
||||||
__HAL_ADC_ENABLE_IT(hadc, ADC_IT_OVR);
|
__HAL_ADC_ENABLE_IT(hadc, ADC_IT_OVR);
|
||||||
|
@ -1228,6 +1228,12 @@ __weak void HAL_ADC_LevelOutOfWindowCallback(ADC_HandleTypeDef* hadc)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Error ADC callback.
|
* @brief Error ADC callback.
|
||||||
|
* @note In case of error due to overrun when using ADC with DMA transfer
|
||||||
|
* (HAL ADC handle paramater "ErrorCode" to state "HAL_ADC_ERROR_OVR"):
|
||||||
|
* - Reinitialize the DMA using function "HAL_ADC_Stop_DMA()".
|
||||||
|
* - If needed, restart a new ADC conversion using function
|
||||||
|
* "HAL_ADC_Start_DMA()"
|
||||||
|
* (this function is also clearing overrun flag)
|
||||||
* @param hadc: pointer to a ADC_HandleTypeDef structure that contains
|
* @param hadc: pointer to a ADC_HandleTypeDef structure that contains
|
||||||
* the configuration information for the specified ADC.
|
* the configuration information for the specified ADC.
|
||||||
* @retval None
|
* @retval None
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_adc.h
|
* @file stm32f4xx_hal_adc.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief Header file containing functions prototypes of ADC HAL library.
|
* @brief Header file containing functions prototypes of ADC HAL library.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_adc_ex.c
|
* @file stm32f4xx_hal_adc_ex.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief This file provides firmware functions to manage the following
|
* @brief This file provides firmware functions to manage the following
|
||||||
* functionalities of the ADC extension peripheral:
|
* functionalities of the ADC extension peripheral:
|
||||||
* + Extended features functions
|
* + Extended features functions
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_adc_ex.h
|
* @file stm32f4xx_hal_adc_ex.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief Header file of ADC HAL module.
|
* @brief Header file of ADC HAL module.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
@ -231,15 +231,16 @@ typedef struct
|
||||||
*/
|
*/
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) || \
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) || \
|
||||||
defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) || \
|
defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) || \
|
||||||
defined(STM32F410Rx)
|
defined(STM32F410Rx) || defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) || \
|
||||||
|
defined(STM32F412Cx)
|
||||||
#define ADC_CHANNEL_TEMPSENSOR ((uint32_t)ADC_CHANNEL_16)
|
#define ADC_CHANNEL_TEMPSENSOR ((uint32_t)ADC_CHANNEL_16)
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F401xC || STM32F401xE || STM32F410xx */
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F401xC || STM32F401xE || STM32F410xx || STM32F412Zx || STM32F412Vx || STM32F412Rx || STM32F412Cxs */
|
||||||
|
|
||||||
#if defined(STM32F411xE) || defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) || \
|
#if defined(STM32F411xE) || defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) || \
|
||||||
defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
#define ADC_CHANNEL_DIFFERENCIATION_TEMPSENSOR_VBAT ((uint32_t)0x10000000U) /* Dummy bit for driver internal usage, not used in ADC channel setting registers CR1 or SQRx */
|
#define ADC_CHANNEL_DIFFERENCIATION_TEMPSENSOR_VBAT ((uint32_t)0x10000000U) /* Dummy bit for driver internal usage, not used in ADC channel setting registers CR1 or SQRx */
|
||||||
#define ADC_CHANNEL_TEMPSENSOR ((uint32_t)ADC_CHANNEL_18 | ADC_CHANNEL_DIFFERENCIATION_TEMPSENSOR_VBAT)
|
#define ADC_CHANNEL_TEMPSENSOR ((uint32_t)ADC_CHANNEL_18 | ADC_CHANNEL_DIFFERENCIATION_TEMPSENSOR_VBAT)
|
||||||
#endif /* STM32F411xE || STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx || STM32F479xx */
|
#endif /* STM32F411xE || STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx || STM32F479xx */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
@ -253,7 +254,20 @@ typedef struct
|
||||||
/** @defgroup ADC_Exported_Macros ADC Exported Macros
|
/** @defgroup ADC_Exported_Macros ADC Exported Macros
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx)|| defined(STM32F439xx)
|
||||||
|
/**
|
||||||
|
* @brief Disable internal path of ADC channel Vbat
|
||||||
|
* @Note Use case of this macro:
|
||||||
|
* On devices STM32F42x and STM32F43x, ADC internal channels
|
||||||
|
* Vbat and VrefInt share the same internal path, only
|
||||||
|
* one of them can be enabled.This macro is to be used when ADC
|
||||||
|
* channels Vbat and VrefInt are selected, and must be called
|
||||||
|
* before starting conversion of ADC channel VrefInt in order
|
||||||
|
* to disable ADC channel Vbat.
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
#define __HAL_ADC_PATH_INTERNAL_VBAT_DISABLE() (ADC->CCR &= ~(ADC_CCR_VBATE))
|
||||||
|
#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
@ -307,9 +321,10 @@ HAL_StatusTypeDef HAL_ADCEx_MultiModeConfigChannel(ADC_HandleTypeDef* hadc, ADC_
|
||||||
*/
|
*/
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) || \
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) || \
|
||||||
defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) || \
|
defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) || \
|
||||||
defined(STM32F410Rx) || defined(STM32F411xE)
|
defined(STM32F410Rx) || defined(STM32F411xE) || defined(STM32F412Zx) || defined(STM32F412Vx) || \
|
||||||
|
defined(STM32F412Rx) || defined(STM32F412Cx)
|
||||||
#define IS_ADC_CHANNEL(CHANNEL) ((CHANNEL) <= ADC_CHANNEL_18)
|
#define IS_ADC_CHANNEL(CHANNEL) ((CHANNEL) <= ADC_CHANNEL_18)
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F401xC || STM32F401xE || STM32F410xx || STM32F411xE */
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F401xC || STM32F401xE || STM32F410xx || STM32F411xE || STM32F412Zx || STM32F412Vx || STM32F412Rx || STM32F412Cx */
|
||||||
|
|
||||||
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) || \
|
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) || \
|
||||||
defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_can.c
|
* @file stm32f4xx_hal_can.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief This file provides firmware functions to manage the following
|
* @brief This file provides firmware functions to manage the following
|
||||||
* functionalities of the Controller Area Network (CAN) peripheral:
|
* functionalities of the Controller Area Network (CAN) peripheral:
|
||||||
* + Initialization and de-initialization functions
|
* + Initialization and de-initialization functions
|
||||||
|
@ -115,7 +115,8 @@
|
||||||
|
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) ||\
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) ||\
|
||||||
defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) ||\
|
defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) ||\
|
||||||
defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) ||\
|
||||||
|
defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx)
|
||||||
|
|
||||||
/* Private typedef -----------------------------------------------------------*/
|
/* Private typedef -----------------------------------------------------------*/
|
||||||
/* Private define ------------------------------------------------------------*/
|
/* Private define ------------------------------------------------------------*/
|
||||||
|
@ -1420,7 +1421,8 @@ static HAL_StatusTypeDef CAN_Receive_IT(CAN_HandleTypeDef* hcan, uint8_t FIFONum
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
||||||
STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx || STM32F479xx */
|
STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx || STM32F479xx || STM32F412Zx ||\
|
||||||
|
STM32F412Vx || STM32F412Rx || STM32F412Cx */
|
||||||
|
|
||||||
#endif /* HAL_CAN_MODULE_ENABLED */
|
#endif /* HAL_CAN_MODULE_ENABLED */
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_can.h
|
* @file stm32f4xx_hal_can.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief Header file of CAN HAL module.
|
* @brief Header file of CAN HAL module.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
@ -45,7 +45,8 @@
|
||||||
|
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) ||\
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) ||\
|
||||||
defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) ||\
|
defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) ||\
|
||||||
defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) ||\
|
||||||
|
defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx)
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "stm32f4xx_hal_def.h"
|
#include "stm32f4xx_hal_def.h"
|
||||||
|
|
||||||
|
@ -755,7 +756,8 @@ HAL_CAN_StateTypeDef HAL_CAN_GetState(CAN_HandleTypeDef* hcan);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
||||||
STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx || STM32F479xx */
|
STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx || STM32F479xx || STM32F412Zx ||\
|
||||||
|
STM32F412Vx || STM32F412Rx || STM32F412Cx */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_cec.h
|
* @file stm32f4xx_hal_cec.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief Header file of CEC HAL module.
|
* @brief Header file of CEC HAL module.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
@ -108,8 +108,6 @@ typedef struct
|
||||||
uint32_t SignalFreeTimeOption; /*!< Set SFTOP bit @ref CEC_SFT_Option : specifies when SFT timer starts.
|
uint32_t SignalFreeTimeOption; /*!< Set SFTOP bit @ref CEC_SFT_Option : specifies when SFT timer starts.
|
||||||
CEC_SFT_START_ON_TXSOM SFT: timer starts when TXSOM is set by software.
|
CEC_SFT_START_ON_TXSOM SFT: timer starts when TXSOM is set by software.
|
||||||
CEC_SFT_START_ON_TX_RX_END: SFT timer starts automatically at the end of message transmission/reception. */
|
CEC_SFT_START_ON_TX_RX_END: SFT timer starts automatically at the end of message transmission/reception. */
|
||||||
|
|
||||||
uint32_t OwnAddress; /*!< Set OAR field, specifies CEC device address within a 15-bit long field */
|
|
||||||
|
|
||||||
uint32_t ListenMode; /*!< Set LSTN bit @ref CEC_Listening_Mode : specifies device listening mode. It can take two values:
|
uint32_t ListenMode; /*!< Set LSTN bit @ref CEC_Listening_Mode : specifies device listening mode. It can take two values:
|
||||||
|
|
||||||
|
@ -121,23 +119,66 @@ typedef struct
|
||||||
address (OAR) with positive acknowledge. Messages addressed to different destination
|
address (OAR) with positive acknowledge. Messages addressed to different destination
|
||||||
are received, but without interfering with the CEC bus: no acknowledge sent. */
|
are received, but without interfering with the CEC bus: no acknowledge sent. */
|
||||||
|
|
||||||
uint8_t InitiatorAddress; /* Initiator address (source logical address, sent in each header) */
|
uint16_t OwnAddress; /*!< Own addresses configuration
|
||||||
|
This parameter can be a value of @ref CEC_OWN_ADDRESS */
|
||||||
|
|
||||||
|
uint8_t *RxBuffer; /*!< CEC Rx buffer pointeur */
|
||||||
|
|
||||||
|
|
||||||
}CEC_InitTypeDef;
|
}CEC_InitTypeDef;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief HAL CEC State structures definition
|
* @brief HAL CEC State structures definition
|
||||||
|
* @note HAL CEC State value is a combination of 2 different substates: gState and RxState.
|
||||||
|
* - gState contains CEC state information related to global Handle management
|
||||||
|
* and also information related to Tx operations.
|
||||||
|
* gState value coding follow below described bitmap :
|
||||||
|
* b7 (not used)
|
||||||
|
* x : Should be set to 0
|
||||||
|
* b6 Error information
|
||||||
|
* 0 : No Error
|
||||||
|
* 1 : Error
|
||||||
|
* b5 IP initilisation status
|
||||||
|
* 0 : Reset (IP not initialized)
|
||||||
|
* 1 : Init done (IP initialized. HAL CEC Init function already called)
|
||||||
|
* b4-b3 (not used)
|
||||||
|
* xx : Should be set to 00
|
||||||
|
* b2 Intrinsic process state
|
||||||
|
* 0 : Ready
|
||||||
|
* 1 : Busy (IP busy with some configuration or internal operations)
|
||||||
|
* b1 (not used)
|
||||||
|
* x : Should be set to 0
|
||||||
|
* b0 Tx state
|
||||||
|
* 0 : Ready (no Tx operation ongoing)
|
||||||
|
* 1 : Busy (Tx operation ongoing)
|
||||||
|
* - RxState contains information related to Rx operations.
|
||||||
|
* RxState value coding follow below described bitmap :
|
||||||
|
* b7-b6 (not used)
|
||||||
|
* xx : Should be set to 00
|
||||||
|
* b5 IP initilisation status
|
||||||
|
* 0 : Reset (IP not initialized)
|
||||||
|
* 1 : Init done (IP initialized)
|
||||||
|
* b4-b2 (not used)
|
||||||
|
* xxx : Should be set to 000
|
||||||
|
* b1 Rx state
|
||||||
|
* 0 : Ready (no Rx operation ongoing)
|
||||||
|
* 1 : Busy (Rx operation ongoing)
|
||||||
|
* b0 (not used)
|
||||||
|
* x : Should be set to 0.
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
HAL_CEC_STATE_RESET = 0x00U, /*!< Peripheral Reset state */
|
HAL_CEC_STATE_RESET = 0x00U, /*!< Peripheral is not yet Initialized
|
||||||
HAL_CEC_STATE_READY = 0x01U, /*!< Peripheral Initialized and ready for use */
|
Value is allowed for gState and RxState */
|
||||||
HAL_CEC_STATE_BUSY = 0x02U, /*!< an internal process is ongoing */
|
HAL_CEC_STATE_READY = 0x20U, /*!< Peripheral Initialized and ready for use
|
||||||
HAL_CEC_STATE_BUSY_TX = 0x03U, /*!< Data Transmission process is ongoing */
|
Value is allowed for gState and RxState */
|
||||||
HAL_CEC_STATE_BUSY_RX = 0x04U, /*!< Data Reception process is ongoing */
|
HAL_CEC_STATE_BUSY = 0x24U, /*!< an internal process is ongoing
|
||||||
HAL_CEC_STATE_STANDBY_RX = 0x05U, /*!< IP ready to receive, doesn't prevent IP to transmit */
|
Value is allowed for gState only */
|
||||||
HAL_CEC_STATE_TIMEOUT = 0x06U, /*!< Timeout state */
|
HAL_CEC_STATE_BUSY_RX = 0x22U, /*!< Data Reception process is ongoing
|
||||||
HAL_CEC_STATE_ERROR = 0x07U /*!< State Error */
|
Value is allowed for RxState only */
|
||||||
|
HAL_CEC_STATE_BUSY_TX = 0x21U, /*!< Data Transmission process is ongoing
|
||||||
|
Value is allowed for gState only */
|
||||||
|
HAL_CEC_STATE_ERROR = 0x60U /*!< Error Value is allowed for gState only */
|
||||||
}HAL_CEC_StateTypeDef;
|
}HAL_CEC_StateTypeDef;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -145,25 +186,27 @@ typedef enum
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
CEC_TypeDef *Instance; /* CEC registers base address */
|
CEC_TypeDef *Instance; /*!< CEC registers base address */
|
||||||
|
|
||||||
CEC_InitTypeDef Init; /* CEC communication parameters */
|
CEC_InitTypeDef Init; /*!< CEC communication parameters */
|
||||||
|
|
||||||
uint8_t *pTxBuffPtr; /* Pointer to CEC Tx transfer Buffer */
|
uint8_t *pTxBuffPtr; /*!< Pointer to CEC Tx transfer Buffer */
|
||||||
|
|
||||||
uint16_t TxXferCount; /* CEC Tx Transfer Counter */
|
uint16_t TxXferCount; /*!< CEC Tx Transfer Counter */
|
||||||
|
|
||||||
uint8_t *pRxBuffPtr; /* Pointer to CEC Rx transfer Buffer */
|
uint16_t RxXferSize; /*!< CEC Rx Transfer size, 0: header received only */
|
||||||
|
|
||||||
uint16_t RxXferSize; /* CEC Rx Transfer size, 0: header received only */
|
HAL_LockTypeDef Lock; /*!< Locking object */
|
||||||
|
|
||||||
|
HAL_CEC_StateTypeDef gState; /*!< CEC state information related to global Handle management
|
||||||
|
and also related to Tx operations.
|
||||||
|
This parameter can be a value of @ref HAL_CEC_StateTypeDef */
|
||||||
|
|
||||||
uint32_t ErrorCode; /* For errors handling purposes, copy of ISR register
|
HAL_CEC_StateTypeDef RxState; /*!< CEC state information related to Rx operations.
|
||||||
in case error is reported */
|
This parameter can be a value of @ref HAL_CEC_StateTypeDef */
|
||||||
|
|
||||||
HAL_LockTypeDef Lock; /* Locking object */
|
uint32_t ErrorCode; /*!< For errors handling purposes, copy of ISR register
|
||||||
|
in case error is reported */
|
||||||
HAL_CEC_StateTypeDef State; /* CEC communication state */
|
|
||||||
|
|
||||||
}CEC_HandleTypeDef;
|
}CEC_HandleTypeDef;
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
@ -177,16 +220,16 @@ typedef struct
|
||||||
/** @defgroup CEC_Error_Code CEC Error Code
|
/** @defgroup CEC_Error_Code CEC Error Code
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define HAL_CEC_ERROR_NONE ((uint32_t)0x00000000) /*!< no error */
|
#define HAL_CEC_ERROR_NONE ((uint32_t)0x00000000U)/*!< no error */
|
||||||
#define HAL_CEC_ERROR_RXOVR CEC_ISR_RXOVR /*!< CEC Rx-Overrun */
|
#define HAL_CEC_ERROR_RXOVR CEC_ISR_RXOVR /*!< CEC Rx-Overrun */
|
||||||
#define HAL_CEC_ERROR_BRE CEC_ISR_BRE /*!< CEC Rx Bit Rising Error */
|
#define HAL_CEC_ERROR_BRE CEC_ISR_BRE /*!< CEC Rx Bit Rising Error */
|
||||||
#define HAL_CEC_ERROR_SBPE CEC_ISR_SBPE /*!< CEC Rx Short Bit period Error */
|
#define HAL_CEC_ERROR_SBPE CEC_ISR_SBPE /*!< CEC Rx Short Bit period Error */
|
||||||
#define HAL_CEC_ERROR_LBPE CEC_ISR_LBPE /*!< CEC Rx Long Bit period Error */
|
#define HAL_CEC_ERROR_LBPE CEC_ISR_LBPE /*!< CEC Rx Long Bit period Error */
|
||||||
#define HAL_CEC_ERROR_RXACKE CEC_ISR_RXACKE /*!< CEC Rx Missing Acknowledge */
|
#define HAL_CEC_ERROR_RXACKE CEC_ISR_RXACKE /*!< CEC Rx Missing Acknowledge */
|
||||||
#define HAL_CEC_ERROR_ARBLST CEC_ISR_ARBLST /*!< CEC Arbitration Lost */
|
#define HAL_CEC_ERROR_ARBLST CEC_ISR_ARBLST /*!< CEC Arbitration Lost */
|
||||||
#define HAL_CEC_ERROR_TXUDR CEC_ISR_TXUDR /*!< CEC Tx-Buffer Underrun */
|
#define HAL_CEC_ERROR_TXUDR CEC_ISR_TXUDR /*!< CEC Tx-Buffer Underrun */
|
||||||
#define HAL_CEC_ERROR_TXERR CEC_ISR_TXERR /*!< CEC Tx-Error */
|
#define HAL_CEC_ERROR_TXERR CEC_ISR_TXERR /*!< CEC Tx-Error */
|
||||||
#define HAL_CEC_ERROR_TXACKE CEC_ISR_TXACKE /*!< CEC Tx Missing Acknowledge */
|
#define HAL_CEC_ERROR_TXACKE CEC_ISR_TXACKE /*!< CEC Tx Missing Acknowledge */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
@ -284,7 +327,30 @@ typedef struct
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/** @defgroup CEC_OWN_ADDRESS CEC Own Address
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define CEC_OWN_ADDRESS_NONE ((uint16_t) 0x0000U) /* Reset value */
|
||||||
|
#define CEC_OWN_ADDRESS_0 ((uint16_t) 0x0001U) /* Logical Address 0 */
|
||||||
|
#define CEC_OWN_ADDRESS_1 ((uint16_t) 0x0002U) /* Logical Address 1 */
|
||||||
|
#define CEC_OWN_ADDRESS_2 ((uint16_t) 0x0004U) /* Logical Address 2 */
|
||||||
|
#define CEC_OWN_ADDRESS_3 ((uint16_t) 0x0008U) /* Logical Address 3 */
|
||||||
|
#define CEC_OWN_ADDRESS_4 ((uint16_t) 0x0010U) /* Logical Address 4 */
|
||||||
|
#define CEC_OWN_ADDRESS_5 ((uint16_t) 0x0020U) /* Logical Address 5 */
|
||||||
|
#define CEC_OWN_ADDRESS_6 ((uint16_t) 0x0040U) /* Logical Address 6 */
|
||||||
|
#define CEC_OWN_ADDRESS_7 ((uint16_t) 0x0080U) /* Logical Address 7 */
|
||||||
|
#define CEC_OWN_ADDRESS_8 ((uint16_t) 0x0100U) /* Logical Address 9 */
|
||||||
|
#define CEC_OWN_ADDRESS_9 ((uint16_t) 0x0200U) /* Logical Address 10 */
|
||||||
|
#define CEC_OWN_ADDRESS_10 ((uint16_t) 0x0400U) /* Logical Address 11 */
|
||||||
|
#define CEC_OWN_ADDRESS_11 ((uint16_t) 0x0800U) /* Logical Address 12 */
|
||||||
|
#define CEC_OWN_ADDRESS_12 ((uint16_t) 0x1000U) /* Logical Address 13 */
|
||||||
|
#define CEC_OWN_ADDRESS_13 ((uint16_t) 0x2000U) /* Logical Address 14 */
|
||||||
|
#define CEC_OWN_ADDRESS_14 ((uint16_t) 0x4000U) /* Logical Address 15 */
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
/** @defgroup CEC_Interrupts_Definitions CEC Interrupts definition
|
/** @defgroup CEC_Interrupts_Definitions CEC Interrupts definition
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
@ -359,15 +425,18 @@ typedef struct
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @brief Reset CEC handle state
|
/** @brief Reset CEC handle gstate & RxState
|
||||||
* @param __HANDLE__: CEC handle.
|
* @param __HANDLE__: CEC handle.
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
#define __HAL_CEC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_CEC_STATE_RESET)
|
#define __HAL_CEC_RESET_HANDLE_STATE(__HANDLE__) do{ \
|
||||||
|
(__HANDLE__)->gState = HAL_CEC_STATE_RESET; \
|
||||||
|
(__HANDLE__)->RxState = HAL_CEC_STATE_RESET; \
|
||||||
|
} while(0)
|
||||||
|
|
||||||
/** @brief Checks whether or not the specified CEC interrupt flag is set.
|
/** @brief Checks whether or not the specified CEC interrupt flag is set.
|
||||||
* @param __HANDLE__: specifies the CEC Handle.
|
* @param __HANDLE__: specifies the CEC Handle.
|
||||||
* @param __FLAG__: specifies the interrupt to check.
|
* @param __FLAG__: specifies the flag to check.
|
||||||
* @arg CEC_FLAG_TXACKE: Tx Missing acknowledge Error
|
* @arg CEC_FLAG_TXACKE: Tx Missing acknowledge Error
|
||||||
* @arg CEC_FLAG_TXERR: Tx Error.
|
* @arg CEC_FLAG_TXERR: Tx Error.
|
||||||
* @arg CEC_FLAG_TXUDR: Tx-Buffer Underrun.
|
* @arg CEC_FLAG_TXUDR: Tx-Buffer Underrun.
|
||||||
|
@ -377,7 +446,7 @@ typedef struct
|
||||||
* @arg CEC_FLAG_RXACKE: Rx-Missing Acknowledge
|
* @arg CEC_FLAG_RXACKE: Rx-Missing Acknowledge
|
||||||
* @arg CEC_FLAG_LBPE: Rx Long period Error
|
* @arg CEC_FLAG_LBPE: Rx Long period Error
|
||||||
* @arg CEC_FLAG_SBPE: Rx Short period Error
|
* @arg CEC_FLAG_SBPE: Rx Short period Error
|
||||||
* @arg CEC_FLAG_BRE: Rx Bit Rissing Error
|
* @arg CEC_FLAG_BRE: Rx Bit Rising Error
|
||||||
* @arg CEC_FLAG_RXOVR: Rx Overrun.
|
* @arg CEC_FLAG_RXOVR: Rx Overrun.
|
||||||
* @arg CEC_FLAG_RXEND: End Of Reception.
|
* @arg CEC_FLAG_RXEND: End Of Reception.
|
||||||
* @arg CEC_FLAG_RXBR: Rx-Byte Received.
|
* @arg CEC_FLAG_RXBR: Rx-Byte Received.
|
||||||
|
@ -398,7 +467,7 @@ typedef struct
|
||||||
* @arg CEC_FLAG_RXACKE: Rx-Missing Acknowledge
|
* @arg CEC_FLAG_RXACKE: Rx-Missing Acknowledge
|
||||||
* @arg CEC_FLAG_LBPE: Rx Long period Error
|
* @arg CEC_FLAG_LBPE: Rx Long period Error
|
||||||
* @arg CEC_FLAG_SBPE: Rx Short period Error
|
* @arg CEC_FLAG_SBPE: Rx Short period Error
|
||||||
* @arg CEC_FLAG_BRE: Rx Bit Rissing Error
|
* @arg CEC_FLAG_BRE: Rx Bit Rising Error
|
||||||
* @arg CEC_FLAG_RXOVR: Rx Overrun.
|
* @arg CEC_FLAG_RXOVR: Rx Overrun.
|
||||||
* @arg CEC_FLAG_RXEND: End Of Reception.
|
* @arg CEC_FLAG_RXEND: End Of Reception.
|
||||||
* @arg CEC_FLAG_RXBR: Rx-Byte Received.
|
* @arg CEC_FLAG_RXBR: Rx-Byte Received.
|
||||||
|
@ -422,7 +491,7 @@ typedef struct
|
||||||
* @arg CEC_IT_BRE: Rx Bit Rising Error IT Enable
|
* @arg CEC_IT_BRE: Rx Bit Rising Error IT Enable
|
||||||
* @arg CEC_IT_RXOVR: Rx Overrun IT Enable
|
* @arg CEC_IT_RXOVR: Rx Overrun IT Enable
|
||||||
* @arg CEC_IT_RXEND: End Of Reception IT Enable
|
* @arg CEC_IT_RXEND: End Of Reception IT Enable
|
||||||
* @arg CEC_IT_RXBR: Rx-Byte Received IT Enable
|
* @arg CEC_IT_RXBR: Rx-Byte Received IT Enable
|
||||||
* @retval none
|
* @retval none
|
||||||
*/
|
*/
|
||||||
#define __HAL_CEC_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER |= (__INTERRUPT__))
|
#define __HAL_CEC_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER |= (__INTERRUPT__))
|
||||||
|
@ -443,7 +512,7 @@ typedef struct
|
||||||
* @arg CEC_IT_BRE: Rx Bit Rising Error IT Enable
|
* @arg CEC_IT_BRE: Rx Bit Rising Error IT Enable
|
||||||
* @arg CEC_IT_RXOVR: Rx Overrun IT Enable
|
* @arg CEC_IT_RXOVR: Rx Overrun IT Enable
|
||||||
* @arg CEC_IT_RXEND: End Of Reception IT Enable
|
* @arg CEC_IT_RXEND: End Of Reception IT Enable
|
||||||
* @arg CEC_IT_RXBR: Rx-Byte Received IT Enable
|
* @arg CEC_IT_RXBR: Rx-Byte Received IT Enable
|
||||||
* @retval none
|
* @retval none
|
||||||
*/
|
*/
|
||||||
#define __HAL_CEC_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER &= (~(__INTERRUPT__)))
|
#define __HAL_CEC_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER &= (~(__INTERRUPT__)))
|
||||||
|
@ -518,7 +587,7 @@ typedef struct
|
||||||
* @param __ADDRESS__: Own Address value (CEC logical address is identified by bit position)
|
* @param __ADDRESS__: Own Address value (CEC logical address is identified by bit position)
|
||||||
* @retval none
|
* @retval none
|
||||||
*/
|
*/
|
||||||
#define __HAL_CEC_SET_OAR(__HANDLE__,__ADDRESS__) SET_BIT((__HANDLE__)->Instance->CFGR, (__ADDRESS__) << CEC_CFGR_OAR_LSB_POS)
|
#define __HAL_CEC_SET_OAR(__HANDLE__,__ADDRESS__) SET_BIT((__HANDLE__)->Instance->CFGR, (__ADDRESS__)<< CEC_CFGR_OAR_LSB_POS)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
@ -535,6 +604,7 @@ typedef struct
|
||||||
/* Initialization and de-initialization functions ****************************/
|
/* Initialization and de-initialization functions ****************************/
|
||||||
HAL_StatusTypeDef HAL_CEC_Init(CEC_HandleTypeDef *hcec);
|
HAL_StatusTypeDef HAL_CEC_Init(CEC_HandleTypeDef *hcec);
|
||||||
HAL_StatusTypeDef HAL_CEC_DeInit(CEC_HandleTypeDef *hcec);
|
HAL_StatusTypeDef HAL_CEC_DeInit(CEC_HandleTypeDef *hcec);
|
||||||
|
HAL_StatusTypeDef HAL_CEC_SetDeviceAddress(CEC_HandleTypeDef *hcec, uint16_t CEC_OwnAddress);
|
||||||
void HAL_CEC_MspInit(CEC_HandleTypeDef *hcec);
|
void HAL_CEC_MspInit(CEC_HandleTypeDef *hcec);
|
||||||
void HAL_CEC_MspDeInit(CEC_HandleTypeDef *hcec);
|
void HAL_CEC_MspDeInit(CEC_HandleTypeDef *hcec);
|
||||||
/**
|
/**
|
||||||
|
@ -545,14 +615,12 @@ void HAL_CEC_MspDeInit(CEC_HandleTypeDef *hcec);
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/* I/O operation functions ***************************************************/
|
/* I/O operation functions ***************************************************/
|
||||||
HAL_StatusTypeDef HAL_CEC_Transmit(CEC_HandleTypeDef *hcec, uint8_t DestinationAddress, uint8_t *pData, uint32_t Size, uint32_t Timeout);
|
HAL_StatusTypeDef HAL_CEC_Transmit_IT(CEC_HandleTypeDef *hcec, uint8_t InitiatorAddress,uint8_t DestinationAddress, uint8_t *pData, uint32_t Size);
|
||||||
HAL_StatusTypeDef HAL_CEC_Receive(CEC_HandleTypeDef *hcec, uint8_t *pData, uint32_t Timeout);
|
uint32_t HAL_CEC_GetLastReceivedFrameSize(CEC_HandleTypeDef *hcec);
|
||||||
HAL_StatusTypeDef HAL_CEC_Transmit_IT(CEC_HandleTypeDef *hcec, uint8_t DestinationAddress, uint8_t *pData, uint32_t Size);
|
void HAL_CEC_ChangeRxBuffer(CEC_HandleTypeDef *hcec, uint8_t* Rxbuffer);
|
||||||
HAL_StatusTypeDef HAL_CEC_Receive_IT(CEC_HandleTypeDef *hcec, uint8_t *pData);
|
|
||||||
uint32_t HAL_CEC_GetReceivedFrameSize(CEC_HandleTypeDef *hcec);
|
|
||||||
void HAL_CEC_IRQHandler(CEC_HandleTypeDef *hcec);
|
void HAL_CEC_IRQHandler(CEC_HandleTypeDef *hcec);
|
||||||
void HAL_CEC_TxCpltCallback(CEC_HandleTypeDef *hcec);
|
void HAL_CEC_TxCpltCallback(CEC_HandleTypeDef *hcec);
|
||||||
void HAL_CEC_RxCpltCallback(CEC_HandleTypeDef *hcec);
|
void HAL_CEC_RxCpltCallback(CEC_HandleTypeDef *hcec, uint32_t RxFrameSize);
|
||||||
void HAL_CEC_ErrorCallback(CEC_HandleTypeDef *hcec);
|
void HAL_CEC_ErrorCallback(CEC_HandleTypeDef *hcec);
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
@ -627,20 +695,6 @@ uint32_t HAL_CEC_GetError(CEC_HandleTypeDef *hcec);
|
||||||
#define IS_CEC_LISTENING_MODE(__MODE__) (((__MODE__) == CEC_REDUCED_LISTENING_MODE) || \
|
#define IS_CEC_LISTENING_MODE(__MODE__) (((__MODE__) == CEC_REDUCED_LISTENING_MODE) || \
|
||||||
((__MODE__) == CEC_FULL_LISTENING_MODE))
|
((__MODE__) == CEC_FULL_LISTENING_MODE))
|
||||||
|
|
||||||
/** @brief Check CEC device Own Address Register (OAR) setting.
|
|
||||||
* OAR address is written in a 15-bit field within CEC_CFGR register.
|
|
||||||
* @param __ADDRESS__: CEC own address.
|
|
||||||
* @retval Test result (TRUE or FALSE).
|
|
||||||
*/
|
|
||||||
#define IS_CEC_OAR_ADDRESS(__ADDRESS__) ((__ADDRESS__) <= 0x07FFFU)
|
|
||||||
|
|
||||||
/** @brief Check CEC initiator or destination logical address setting.
|
|
||||||
* Initiator and destination addresses are coded over 4 bits.
|
|
||||||
* @param __ADDRESS__: CEC initiator or logical address.
|
|
||||||
* @retval Test result (TRUE or FALSE).
|
|
||||||
*/
|
|
||||||
#define IS_CEC_ADDRESS(__ADDRESS__) ((__ADDRESS__) <= 0x0FU)
|
|
||||||
|
|
||||||
/** @brief Check CEC message size.
|
/** @brief Check CEC message size.
|
||||||
* The message size is the payload size: without counting the header,
|
* The message size is the payload size: without counting the header,
|
||||||
* it varies from 0 byte (ping operation, one header only, no payload) to
|
* it varies from 0 byte (ping operation, one header only, no payload) to
|
||||||
|
@ -648,12 +702,24 @@ uint32_t HAL_CEC_GetError(CEC_HandleTypeDef *hcec);
|
||||||
* @param __SIZE__: CEC message size.
|
* @param __SIZE__: CEC message size.
|
||||||
* @retval Test result (TRUE or FALSE).
|
* @retval Test result (TRUE or FALSE).
|
||||||
*/
|
*/
|
||||||
#define IS_CEC_MSGSIZE(__SIZE__) ((__SIZE__) <= 0xFU)
|
#define IS_CEC_MSGSIZE(__SIZE__) ((__SIZE__) <= 0x10)
|
||||||
|
|
||||||
|
/** @brief Check CEC device Own Address Register (OAR) setting.
|
||||||
|
* OAR address is written in a 15-bit field within CEC_CFGR register.
|
||||||
|
* @param __ADDRESS__: CEC own address.
|
||||||
|
* @retval Test result (TRUE or FALSE).
|
||||||
|
*/
|
||||||
|
#define IS_CEC_OWN_ADDRESS(__ADDRESS__) ((__ADDRESS__) <= 0x7FFFU)
|
||||||
|
|
||||||
|
/** @brief Check CEC initiator or destination logical address setting.
|
||||||
|
* Initiator and destination addresses are coded over 4 bits.
|
||||||
|
* @param __ADDRESS__: CEC initiator or logical address.
|
||||||
|
* @retval Test result (TRUE or FALSE).
|
||||||
|
*/
|
||||||
|
#define IS_CEC_ADDRESS(__ADDRESS__) ((__ADDRESS__) <= 0x0FU)
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Private functions ---------------------------------------------------------*/
|
/* Private functions ---------------------------------------------------------*/
|
||||||
/** @defgroup CEC_Private_Functions CEC Private Functions
|
/** @defgroup CEC_Private_Functions CEC Private Functions
|
||||||
* @{
|
* @{
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_conf_template.h
|
* @file stm32f4xx_hal_conf_template.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief HAL configuration template file.
|
* @brief HAL configuration template file.
|
||||||
* This file should be copied to the application folder and renamed
|
* This file should be copied to the application folder and renamed
|
||||||
* to stm32f4xx_hal_conf.h.
|
* to stm32f4xx_hal_conf.h.
|
||||||
|
@ -95,6 +95,7 @@
|
||||||
#define HAL_HCD_MODULE_ENABLED
|
#define HAL_HCD_MODULE_ENABLED
|
||||||
#define HAL_FMPI2C_MODULE_ENABLED
|
#define HAL_FMPI2C_MODULE_ENABLED
|
||||||
#define HAL_SPDIFRX_MODULE_ENABLED
|
#define HAL_SPDIFRX_MODULE_ENABLED
|
||||||
|
#define HAL_DFSDM_MODULE_ENABLED
|
||||||
#define HAL_LPTIM_MODULE_ENABLED
|
#define HAL_LPTIM_MODULE_ENABLED
|
||||||
|
|
||||||
/* ########################## HSE/HSI Values adaptation ##################### */
|
/* ########################## HSE/HSI Values adaptation ##################### */
|
||||||
|
@ -417,6 +418,10 @@
|
||||||
#include "stm32f4xx_hal_spdifrx.h"
|
#include "stm32f4xx_hal_spdifrx.h"
|
||||||
#endif /* HAL_SPDIFRX_MODULE_ENABLED */
|
#endif /* HAL_SPDIFRX_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_DFSDM_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_dfsdm.h"
|
||||||
|
#endif /* HAL_DFSDM_MODULE_ENABLED */
|
||||||
|
|
||||||
#ifdef HAL_LPTIM_MODULE_ENABLED
|
#ifdef HAL_LPTIM_MODULE_ENABLED
|
||||||
#include "stm32f4xx_hal_lptim.h"
|
#include "stm32f4xx_hal_lptim.h"
|
||||||
#endif /* HAL_LPTIM_MODULE_ENABLED */
|
#endif /* HAL_LPTIM_MODULE_ENABLED */
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_cortex.c
|
* @file stm32f4xx_hal_cortex.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief CORTEX HAL module driver.
|
* @brief CORTEX HAL module driver.
|
||||||
* This file provides firmware functions to manage the following
|
* This file provides firmware functions to manage the following
|
||||||
* functionalities of the CORTEX:
|
* functionalities of the CORTEX:
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_cortex.h
|
* @file stm32f4xx_hal_cortex.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief Header file of CORTEX HAL module.
|
* @brief Header file of CORTEX HAL module.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_crc.c
|
* @file stm32f4xx_hal_crc.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief CRC HAL module driver.
|
* @brief CRC HAL module driver.
|
||||||
* This file provides firmware functions to manage the following
|
* This file provides firmware functions to manage the following
|
||||||
* functionalities of the Cyclic Redundancy Check (CRC) peripheral:
|
* functionalities of the Cyclic Redundancy Check (CRC) peripheral:
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_crc.h
|
* @file stm32f4xx_hal_crc.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief Header file of CRC HAL module.
|
* @brief Header file of CRC HAL module.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_cryp.c
|
* @file stm32f4xx_hal_cryp.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief CRYP HAL module driver.
|
* @brief CRYP HAL module driver.
|
||||||
* This file provides firmware functions to manage the following
|
* This file provides firmware functions to manage the following
|
||||||
* functionalities of the Cryptography (CRYP) peripheral:
|
* functionalities of the Cryptography (CRYP) peripheral:
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_cryp.h
|
* @file stm32f4xx_hal_cryp.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief Header file of CRYP HAL module.
|
* @brief Header file of CRYP HAL module.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_cryp_ex.c
|
* @file stm32f4xx_hal_cryp_ex.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief Extended CRYP HAL module driver
|
* @brief Extended CRYP HAL module driver
|
||||||
* This file provides firmware functions to manage the following
|
* This file provides firmware functions to manage the following
|
||||||
* functionalities of CRYP extension peripheral:
|
* functionalities of CRYP extension peripheral:
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_cryp_ex.h
|
* @file stm32f4xx_hal_cryp_ex.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief Header file of CRYP HAL Extension module.
|
* @brief Header file of CRYP HAL Extension module.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_dac.c
|
* @file stm32f4xx_hal_dac.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief DAC HAL module driver.
|
* @brief DAC HAL module driver.
|
||||||
* This file provides firmware functions to manage the following
|
* This file provides firmware functions to manage the following
|
||||||
* functionalities of the Digital to Analog Converter (DAC) peripheral:
|
* functionalities of the Digital to Analog Converter (DAC) peripheral:
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_dac.h
|
* @file stm32f4xx_hal_dac.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief Header file of DAC HAL module.
|
* @brief Header file of DAC HAL module.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_dac_ex.c
|
* @file stm32f4xx_hal_dac_ex.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief DAC HAL module driver.
|
* @brief DAC HAL module driver.
|
||||||
* This file provides firmware functions to manage the following
|
* This file provides firmware functions to manage the following
|
||||||
* functionalities of DAC extension peripheral:
|
* functionalities of DAC extension peripheral:
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_dac.h
|
* @file stm32f4xx_hal_dac.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief Header file of DAC HAL Extension module.
|
* @brief Header file of DAC HAL Extension module.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
|
|
@ -2,17 +2,17 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_dcmi.c
|
* @file stm32f4xx_hal_dcmi.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief DCMI HAL module driver
|
* @brief DCMI HAL module driver
|
||||||
* This file provides firmware functions to manage the following
|
* This file provides firmware functions to manage the following
|
||||||
* functionalities of the Digital Camera Interface (DCMI) peripheral:
|
* functionalities of the Digital Camera Interface (DCMI) peripheral:
|
||||||
* + Initialization and de-initialization functions
|
* + Initialization and de-initialization functions
|
||||||
* + IO operation functions
|
* + IO operation functions
|
||||||
* + Peripheral Control functions
|
* + Peripheral Control functions
|
||||||
* + Peripheral State and Error functions
|
* + Peripheral State and Error functions
|
||||||
*
|
*
|
||||||
@verbatim
|
@verbatim
|
||||||
==============================================================================
|
==============================================================================
|
||||||
##### How to use this driver #####
|
##### How to use this driver #####
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
@ -32,11 +32,11 @@
|
||||||
register to the destination memory buffer.
|
register to the destination memory buffer.
|
||||||
|
|
||||||
(#) Program the required configuration through following parameters:
|
(#) Program the required configuration through following parameters:
|
||||||
DCMI mode, destination memory Buffer address and the data length
|
DCMI mode, destination memory Buffer address and the data length
|
||||||
and enable capture using HAL_DCMI_Start_DMA() function.
|
and enable capture using HAL_DCMI_Start_DMA() function.
|
||||||
|
|
||||||
(#) Optionally, configure and Enable the CROP feature to select a rectangular
|
(#) Optionally, configure and Enable the CROP feature to select a rectangular
|
||||||
window from the received image using HAL_DCMI_ConfigCrop()
|
window from the received image using HAL_DCMI_ConfigCrop()
|
||||||
and HAL_DCMI_EnableCROP() functions
|
and HAL_DCMI_EnableCROP() functions
|
||||||
|
|
||||||
(#) The capture can be stopped using HAL_DCMI_Stop() function.
|
(#) The capture can be stopped using HAL_DCMI_Stop() function.
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
(#) To control DCMI state you can use the function HAL_DCMI_GetState().
|
(#) To control DCMI state you can use the function HAL_DCMI_GetState().
|
||||||
|
|
||||||
*** DCMI HAL driver macros list ***
|
*** DCMI HAL driver macros list ***
|
||||||
=============================================
|
=============================================
|
||||||
[..]
|
[..]
|
||||||
Below the list of most used macros in DCMI HAL driver.
|
Below the list of most used macros in DCMI HAL driver.
|
||||||
|
|
||||||
|
@ -55,8 +55,8 @@
|
||||||
(+) __HAL_DCMI_ENABLE_IT: Enable the specified DCMI interrupts.
|
(+) __HAL_DCMI_ENABLE_IT: Enable the specified DCMI interrupts.
|
||||||
(+) __HAL_DCMI_DISABLE_IT: Disable the specified DCMI interrupts.
|
(+) __HAL_DCMI_DISABLE_IT: Disable the specified DCMI interrupts.
|
||||||
(+) __HAL_DCMI_GET_IT_SOURCE: Check whether the specified DCMI interrupt has occurred or not.
|
(+) __HAL_DCMI_GET_IT_SOURCE: Check whether the specified DCMI interrupt has occurred or not.
|
||||||
|
|
||||||
[..]
|
[..]
|
||||||
(@) You can refer to the DCMI HAL driver header file for more useful macros
|
(@) You can refer to the DCMI HAL driver header file for more useful macros
|
||||||
|
|
||||||
@endverbatim
|
@endverbatim
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "stm32f4xx_hal.h"
|
#include "stm32f4xx_hal.h"
|
||||||
|
@ -108,7 +108,7 @@
|
||||||
defined(STM32F479xx)
|
defined(STM32F479xx)
|
||||||
/* Private typedef -----------------------------------------------------------*/
|
/* Private typedef -----------------------------------------------------------*/
|
||||||
/* Private define ------------------------------------------------------------*/
|
/* Private define ------------------------------------------------------------*/
|
||||||
#define HAL_TIMEOUT_DCMI_STOP ((uint32_t)1000U) /* 1s */
|
#define HAL_TIMEOUT_DCMI_STOP ((uint32_t)14U) /* Set timeout to 1s */
|
||||||
/* Private macro -------------------------------------------------------------*/
|
/* Private macro -------------------------------------------------------------*/
|
||||||
/* Private variables ---------------------------------------------------------*/
|
/* Private variables ---------------------------------------------------------*/
|
||||||
/* Private function prototypes -----------------------------------------------*/
|
/* Private function prototypes -----------------------------------------------*/
|
||||||
|
@ -124,10 +124,10 @@ static void DCMI_DMAError(DMA_HandleTypeDef *hdma);
|
||||||
/** @defgroup DCMI_Exported_Functions_Group1 Initialization and Configuration functions
|
/** @defgroup DCMI_Exported_Functions_Group1 Initialization and Configuration functions
|
||||||
* @brief Initialization and Configuration functions
|
* @brief Initialization and Configuration functions
|
||||||
*
|
*
|
||||||
@verbatim
|
@verbatim
|
||||||
===============================================================================
|
===============================================================================
|
||||||
##### Initialization and Configuration functions #####
|
##### Initialization and Configuration functions #####
|
||||||
===============================================================================
|
===============================================================================
|
||||||
[..] This section provides functions allowing to:
|
[..] This section provides functions allowing to:
|
||||||
(+) Initialize and configure the DCMI
|
(+) Initialize and configure the DCMI
|
||||||
(+) De-initialize the DCMI
|
(+) De-initialize the DCMI
|
||||||
|
@ -135,7 +135,7 @@ static void DCMI_DMAError(DMA_HandleTypeDef *hdma);
|
||||||
@endverbatim
|
@endverbatim
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Initializes the DCMI according to the specified
|
* @brief Initializes the DCMI according to the specified
|
||||||
* parameters in the DCMI_InitTypeDef and create the associated handle.
|
* parameters in the DCMI_InitTypeDef and create the associated handle.
|
||||||
|
@ -144,13 +144,13 @@ static void DCMI_DMAError(DMA_HandleTypeDef *hdma);
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
__weak HAL_StatusTypeDef HAL_DCMI_Init(DCMI_HandleTypeDef *hdcmi)
|
__weak HAL_StatusTypeDef HAL_DCMI_Init(DCMI_HandleTypeDef *hdcmi)
|
||||||
{
|
{
|
||||||
/* Check the DCMI peripheral state */
|
/* Check the DCMI peripheral state */
|
||||||
if(hdcmi == NULL)
|
if(hdcmi == NULL)
|
||||||
{
|
{
|
||||||
return HAL_ERROR;
|
return HAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check function parameters */
|
/* Check function parameters */
|
||||||
assert_param(IS_DCMI_ALL_INSTANCE(hdcmi->Instance));
|
assert_param(IS_DCMI_ALL_INSTANCE(hdcmi->Instance));
|
||||||
assert_param(IS_DCMI_PCKPOLARITY(hdcmi->Init.PCKPolarity));
|
assert_param(IS_DCMI_PCKPOLARITY(hdcmi->Init.PCKPolarity));
|
||||||
|
@ -167,10 +167,12 @@ __weak HAL_StatusTypeDef HAL_DCMI_Init(DCMI_HandleTypeDef *hdcmi)
|
||||||
hdcmi->Lock = HAL_UNLOCKED;
|
hdcmi->Lock = HAL_UNLOCKED;
|
||||||
/* Init the low level hardware */
|
/* Init the low level hardware */
|
||||||
HAL_DCMI_MspInit(hdcmi);
|
HAL_DCMI_MspInit(hdcmi);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Change the DCMI state */
|
/* Change the DCMI state */
|
||||||
hdcmi->State = HAL_DCMI_STATE_BUSY;
|
hdcmi->State = HAL_DCMI_STATE_BUSY;
|
||||||
|
|
||||||
|
/* Set DCMI parameters */
|
||||||
/* Configures the HS, VS, DE and PC polarity */
|
/* Configures the HS, VS, DE and PC polarity */
|
||||||
hdcmi->Instance->CR &= ~(DCMI_CR_PCKPOL | DCMI_CR_HSPOL | DCMI_CR_VSPOL | DCMI_CR_EDM_0 |
|
hdcmi->Instance->CR &= ~(DCMI_CR_PCKPOL | DCMI_CR_HSPOL | DCMI_CR_VSPOL | DCMI_CR_EDM_0 |
|
||||||
DCMI_CR_EDM_1 | DCMI_CR_FCRC_0 | DCMI_CR_FCRC_1 | DCMI_CR_JPEG |
|
DCMI_CR_EDM_1 | DCMI_CR_FCRC_0 | DCMI_CR_FCRC_1 | DCMI_CR_JPEG |
|
||||||
|
@ -182,19 +184,18 @@ __weak HAL_StatusTypeDef HAL_DCMI_Init(DCMI_HandleTypeDef *hdcmi)
|
||||||
|
|
||||||
if(hdcmi->Init.SynchroMode == DCMI_SYNCHRO_EMBEDDED)
|
if(hdcmi->Init.SynchroMode == DCMI_SYNCHRO_EMBEDDED)
|
||||||
{
|
{
|
||||||
DCMI->ESCR = (((uint32_t)hdcmi->Init.SyncroCode.FrameStartCode) |
|
hdcmi->Instance->ESCR = (((uint32_t)hdcmi->Init.SyncroCode.FrameStartCode) |
|
||||||
((uint32_t)hdcmi->Init.SyncroCode.LineStartCode << 8U)|
|
((uint32_t)hdcmi->Init.SyncroCode.LineStartCode << DCMI_POSITION_ESCR_LSC)|
|
||||||
((uint32_t)hdcmi->Init.SyncroCode.LineEndCode << 16U) |
|
((uint32_t)hdcmi->Init.SyncroCode.LineEndCode << DCMI_POSITION_ESCR_LEC) |
|
||||||
((uint32_t)hdcmi->Init.SyncroCode.FrameEndCode << 24U));
|
((uint32_t)hdcmi->Init.SyncroCode.FrameEndCode << DCMI_POSITION_ESCR_FEC));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enable DCMI by setting DCMIEN bit */
|
/* Enable the Line, Vsync, Error and Overrun interrupts */
|
||||||
__HAL_DCMI_ENABLE(hdcmi);
|
__HAL_DCMI_ENABLE_IT(hdcmi, DCMI_IT_LINE | DCMI_IT_VSYNC | DCMI_IT_ERR | DCMI_IT_OVR);
|
||||||
|
|
||||||
/* Update error code */
|
/* Update error code */
|
||||||
hdcmi->ErrorCode = HAL_DCMI_ERROR_NONE;
|
hdcmi->ErrorCode = HAL_DCMI_ERROR_NONE;
|
||||||
|
|
||||||
/* Initialize the DCMI state*/
|
/* Initialize the DCMI state*/
|
||||||
hdcmi->State = HAL_DCMI_STATE_READY;
|
hdcmi->State = HAL_DCMI_STATE_READY;
|
||||||
|
|
||||||
|
@ -259,15 +260,15 @@ __weak void HAL_DCMI_MspDeInit(DCMI_HandleTypeDef* hdcmi)
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
/** @defgroup DCMI_Exported_Functions_Group2 IO operation functions
|
/** @defgroup DCMI_Exported_Functions_Group2 IO operation functions
|
||||||
* @brief IO operation functions
|
* @brief IO operation functions
|
||||||
*
|
*
|
||||||
@verbatim
|
@verbatim
|
||||||
===============================================================================
|
===============================================================================
|
||||||
##### IO operation functions #####
|
##### IO operation functions #####
|
||||||
===============================================================================
|
===============================================================================
|
||||||
[..] This section provides functions allowing to:
|
[..] This section provides functions allowing to:
|
||||||
(+) Configure destination address and data length and
|
(+) Configure destination address and data length and
|
||||||
Enables DCMI DMA request and enables DCMI capture
|
Enables DCMI DMA request and enables DCMI capture
|
||||||
(+) Stop the DCMI capture.
|
(+) Stop the DCMI capture.
|
||||||
(+) Handles DCMI interrupt request.
|
(+) Handles DCMI interrupt request.
|
||||||
|
@ -277,7 +278,7 @@ __weak void HAL_DCMI_MspDeInit(DCMI_HandleTypeDef* hdcmi)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Enables DCMI DMA request and enables DCMI capture
|
* @brief Enables DCMI DMA request and enables DCMI capture
|
||||||
* @param hdcmi: pointer to a DCMI_HandleTypeDef structure that contains
|
* @param hdcmi: pointer to a DCMI_HandleTypeDef structure that contains
|
||||||
* the configuration information for DCMI.
|
* the configuration information for DCMI.
|
||||||
* @param DCMI_Mode: DCMI capture mode snapshot or continuous grab.
|
* @param DCMI_Mode: DCMI capture mode snapshot or continuous grab.
|
||||||
|
@ -286,7 +287,7 @@ __weak void HAL_DCMI_MspDeInit(DCMI_HandleTypeDef* hdcmi)
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_DCMI_Start_DMA(DCMI_HandleTypeDef* hdcmi, uint32_t DCMI_Mode, uint32_t pData, uint32_t Length)
|
HAL_StatusTypeDef HAL_DCMI_Start_DMA(DCMI_HandleTypeDef* hdcmi, uint32_t DCMI_Mode, uint32_t pData, uint32_t Length)
|
||||||
{
|
{
|
||||||
/* Initialize the second memory address */
|
/* Initialize the second memory address */
|
||||||
uint32_t SecondMemAddress = 0U;
|
uint32_t SecondMemAddress = 0U;
|
||||||
|
|
||||||
|
@ -296,17 +297,11 @@ HAL_StatusTypeDef HAL_DCMI_Start_DMA(DCMI_HandleTypeDef* hdcmi, uint32_t DCMI_Mo
|
||||||
/* Process Locked */
|
/* Process Locked */
|
||||||
__HAL_LOCK(hdcmi);
|
__HAL_LOCK(hdcmi);
|
||||||
|
|
||||||
/* Enable the Line, Vsync, Error and Overrun interrupts */
|
|
||||||
__HAL_DCMI_ENABLE_IT(hdcmi, DCMI_IT_LINE | DCMI_IT_VSYNC | DCMI_IT_ERR | DCMI_IT_OVF);
|
|
||||||
|
|
||||||
/* Disable the End of Frame interrupt */
|
|
||||||
__HAL_DCMI_DISABLE_IT(hdcmi, DCMI_IT_FRAME);
|
|
||||||
|
|
||||||
/* Lock the DCMI peripheral state */
|
/* Lock the DCMI peripheral state */
|
||||||
hdcmi->State = HAL_DCMI_STATE_BUSY;
|
hdcmi->State = HAL_DCMI_STATE_BUSY;
|
||||||
|
|
||||||
/* Check the parameters */
|
/* Enable DCMI by setting DCMIEN bit */
|
||||||
assert_param(IS_DCMI_CAPTURE_MODE(DCMI_Mode));
|
__HAL_DCMI_ENABLE(hdcmi);
|
||||||
|
|
||||||
/* Configure the DCMI Mode */
|
/* Configure the DCMI Mode */
|
||||||
hdcmi->Instance->CR &= ~(DCMI_CR_CM);
|
hdcmi->Instance->CR &= ~(DCMI_CR_CM);
|
||||||
|
@ -318,6 +313,13 @@ HAL_StatusTypeDef HAL_DCMI_Start_DMA(DCMI_HandleTypeDef* hdcmi, uint32_t DCMI_Mo
|
||||||
/* Set the DMA error callback */
|
/* Set the DMA error callback */
|
||||||
hdcmi->DMA_Handle->XferErrorCallback = DCMI_DMAError;
|
hdcmi->DMA_Handle->XferErrorCallback = DCMI_DMAError;
|
||||||
|
|
||||||
|
/* Set the dma abort callback */
|
||||||
|
hdcmi->DMA_Handle->XferAbortCallback = NULL;
|
||||||
|
|
||||||
|
/* Reset transfer counters value */
|
||||||
|
hdcmi->XferCount = 0;
|
||||||
|
hdcmi->XferTransferNumber = 0;
|
||||||
|
|
||||||
if(Length <= 0xFFFFU)
|
if(Length <= 0xFFFFU)
|
||||||
{
|
{
|
||||||
/* Enable the DMA Stream */
|
/* Enable the DMA Stream */
|
||||||
|
@ -326,13 +328,13 @@ HAL_StatusTypeDef HAL_DCMI_Start_DMA(DCMI_HandleTypeDef* hdcmi, uint32_t DCMI_Mo
|
||||||
else /* DCMI_DOUBLE_BUFFER Mode */
|
else /* DCMI_DOUBLE_BUFFER Mode */
|
||||||
{
|
{
|
||||||
/* Set the DMA memory1 conversion complete callback */
|
/* Set the DMA memory1 conversion complete callback */
|
||||||
hdcmi->DMA_Handle->XferM1CpltCallback = DCMI_DMAXferCplt;
|
hdcmi->DMA_Handle->XferM1CpltCallback = DCMI_DMAXferCplt;
|
||||||
|
|
||||||
/* Initialize transfer parameters */
|
/* Initialize transfer parameters */
|
||||||
hdcmi->XferCount = 1U;
|
hdcmi->XferCount = 1U;
|
||||||
hdcmi->XferSize = Length;
|
hdcmi->XferSize = Length;
|
||||||
hdcmi->pBuffPtr = pData;
|
hdcmi->pBuffPtr = pData;
|
||||||
|
|
||||||
/* Get the number of buffer */
|
/* Get the number of buffer */
|
||||||
while(hdcmi->XferSize > 0xFFFFU)
|
while(hdcmi->XferSize > 0xFFFFU)
|
||||||
{
|
{
|
||||||
|
@ -352,50 +354,50 @@ HAL_StatusTypeDef HAL_DCMI_Start_DMA(DCMI_HandleTypeDef* hdcmi, uint32_t DCMI_Mo
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enable Capture */
|
/* Enable Capture */
|
||||||
DCMI->CR |= DCMI_CR_CAPTURE;
|
hdcmi->Instance->CR |= DCMI_CR_CAPTURE;
|
||||||
|
|
||||||
|
/* Release Lock */
|
||||||
|
__HAL_UNLOCK(hdcmi);
|
||||||
|
|
||||||
/* Return function status */
|
/* Return function status */
|
||||||
return HAL_OK;
|
return HAL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Disable DCMI DMA request and Disable DCMI capture
|
* @brief Disable DCMI DMA request and Disable DCMI capture
|
||||||
* @param hdcmi: pointer to a DCMI_HandleTypeDef structure that contains
|
* @param hdcmi: pointer to a DCMI_HandleTypeDef structure that contains
|
||||||
* the configuration information for DCMI.
|
* the configuration information for DCMI.
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_DCMI_Stop(DCMI_HandleTypeDef* hdcmi)
|
HAL_StatusTypeDef HAL_DCMI_Stop(DCMI_HandleTypeDef* hdcmi)
|
||||||
{
|
{
|
||||||
uint32_t tickstart = 0U;
|
__IO uint32_t count = SystemCoreClock / HAL_TIMEOUT_DCMI_STOP;
|
||||||
|
HAL_StatusTypeDef status = HAL_OK;
|
||||||
|
|
||||||
|
/* Process locked */
|
||||||
|
__HAL_LOCK(hdcmi);
|
||||||
|
|
||||||
/* Lock the DCMI peripheral state */
|
/* Lock the DCMI peripheral state */
|
||||||
hdcmi->State = HAL_DCMI_STATE_BUSY;
|
hdcmi->State = HAL_DCMI_STATE_BUSY;
|
||||||
|
|
||||||
__HAL_DCMI_DISABLE(hdcmi);
|
|
||||||
|
|
||||||
/* Disable Capture */
|
/* Disable Capture */
|
||||||
DCMI->CR &= ~(DCMI_CR_CAPTURE);
|
hdcmi->Instance->CR &= ~(DCMI_CR_CAPTURE);
|
||||||
|
|
||||||
/* Get tick */
|
|
||||||
tickstart = HAL_GetTick();
|
|
||||||
|
|
||||||
/* Check if the DCMI capture effectively disabled */
|
/* Check if the DCMI capture effectively disabled */
|
||||||
while((hdcmi->Instance->CR & DCMI_CR_CAPTURE) != 0U)
|
do
|
||||||
{
|
{
|
||||||
if((HAL_GetTick() - tickstart ) > HAL_TIMEOUT_DCMI_STOP)
|
if (count-- == 0)
|
||||||
{
|
{
|
||||||
/* Process Unlocked */
|
|
||||||
__HAL_UNLOCK(hdcmi);
|
|
||||||
|
|
||||||
/* Update error code */
|
/* Update error code */
|
||||||
hdcmi->ErrorCode |= HAL_DCMI_ERROR_TIMEOUT;
|
hdcmi->ErrorCode |= HAL_DCMI_ERROR_TIMEOUT;
|
||||||
|
|
||||||
/* Change DCMI state */
|
status = HAL_TIMEOUT;
|
||||||
hdcmi->State = HAL_DCMI_STATE_TIMEOUT;
|
|
||||||
|
|
||||||
return HAL_TIMEOUT;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
while((hdcmi->Instance->CR & DCMI_CR_CAPTURE) != 0);
|
||||||
|
|
||||||
|
/* Disable the DCMI */
|
||||||
|
__HAL_DCMI_DISABLE(hdcmi);
|
||||||
|
|
||||||
/* Disable the DMA */
|
/* Disable the DMA */
|
||||||
HAL_DMA_Abort(hdcmi->DMA_Handle);
|
HAL_DMA_Abort(hdcmi->DMA_Handle);
|
||||||
|
@ -409,6 +411,72 @@ HAL_StatusTypeDef HAL_DCMI_Stop(DCMI_HandleTypeDef* hdcmi)
|
||||||
/* Process Unlocked */
|
/* Process Unlocked */
|
||||||
__HAL_UNLOCK(hdcmi);
|
__HAL_UNLOCK(hdcmi);
|
||||||
|
|
||||||
|
/* Return function status */
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
HAL_StatusTypeDef HAL_DCMI_Suspend(DCMI_HandleTypeDef* hdcmi)
|
||||||
|
{
|
||||||
|
__IO uint32_t count = SystemCoreClock / HAL_TIMEOUT_DCMI_STOP;
|
||||||
|
HAL_StatusTypeDef status = HAL_OK;
|
||||||
|
|
||||||
|
/* Process locked */
|
||||||
|
__HAL_LOCK(hdcmi);
|
||||||
|
|
||||||
|
if(hdcmi->State == HAL_DCMI_STATE_BUSY)
|
||||||
|
{
|
||||||
|
/* Change DCMI state */
|
||||||
|
hdcmi->State = HAL_DCMI_STATE_SUSPENDED;
|
||||||
|
|
||||||
|
/* Disable Capture */
|
||||||
|
hdcmi->Instance->CR &= ~(DCMI_CR_CAPTURE);
|
||||||
|
|
||||||
|
/* Check if the DCMI capture effectively disabled */
|
||||||
|
do
|
||||||
|
{
|
||||||
|
if (count-- == 0)
|
||||||
|
{
|
||||||
|
/* Update error code */
|
||||||
|
hdcmi->ErrorCode |= HAL_DCMI_ERROR_TIMEOUT;
|
||||||
|
|
||||||
|
/* Change DCMI state */
|
||||||
|
hdcmi->State = HAL_DCMI_STATE_READY;
|
||||||
|
|
||||||
|
status = HAL_TIMEOUT;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while((hdcmi->Instance->CR & DCMI_CR_CAPTURE) != 0);
|
||||||
|
}
|
||||||
|
/* Process Unlocked */
|
||||||
|
__HAL_UNLOCK(hdcmi);
|
||||||
|
|
||||||
|
/* Return function status */
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Resume DCMI capture
|
||||||
|
* @param hdcmi: pointer to a DCMI_HandleTypeDef structure that contains
|
||||||
|
* the configuration information for DCMI.
|
||||||
|
* @retval HAL status
|
||||||
|
*/
|
||||||
|
HAL_StatusTypeDef HAL_DCMI_Resume(DCMI_HandleTypeDef* hdcmi)
|
||||||
|
{
|
||||||
|
/* Process locked */
|
||||||
|
__HAL_LOCK(hdcmi);
|
||||||
|
|
||||||
|
if(hdcmi->State == HAL_DCMI_STATE_SUSPENDED)
|
||||||
|
{
|
||||||
|
/* Change DCMI state */
|
||||||
|
hdcmi->State = HAL_DCMI_STATE_BUSY;
|
||||||
|
|
||||||
|
/* Disable Capture */
|
||||||
|
hdcmi->Instance->CR |= DCMI_CR_CAPTURE;
|
||||||
|
}
|
||||||
|
/* Process Unlocked */
|
||||||
|
__HAL_UNLOCK(hdcmi);
|
||||||
|
|
||||||
/* Return function status */
|
/* Return function status */
|
||||||
return HAL_OK;
|
return HAL_OK;
|
||||||
}
|
}
|
||||||
|
@ -420,112 +488,83 @@ HAL_StatusTypeDef HAL_DCMI_Stop(DCMI_HandleTypeDef* hdcmi)
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
void HAL_DCMI_IRQHandler(DCMI_HandleTypeDef *hdcmi)
|
void HAL_DCMI_IRQHandler(DCMI_HandleTypeDef *hdcmi)
|
||||||
{
|
{
|
||||||
|
uint32_t isr_value = READ_REG(hdcmi->Instance->MISR);
|
||||||
|
|
||||||
/* Synchronization error interrupt management *******************************/
|
/* Synchronization error interrupt management *******************************/
|
||||||
if(__HAL_DCMI_GET_FLAG(hdcmi, DCMI_FLAG_ERRRI) != RESET)
|
if((isr_value & DCMI_FLAG_ERRRI) == DCMI_FLAG_ERRRI)
|
||||||
{
|
{
|
||||||
if(__HAL_DCMI_GET_IT_SOURCE(hdcmi, DCMI_IT_ERR) != RESET)
|
/* Clear the Synchronization error flag */
|
||||||
{
|
__HAL_DCMI_CLEAR_FLAG(hdcmi, DCMI_FLAG_ERRRI);
|
||||||
/* Clear the Synchronization error flag */
|
|
||||||
__HAL_DCMI_CLEAR_FLAG(hdcmi, DCMI_FLAG_ERRRI);
|
|
||||||
|
|
||||||
/* Update error code */
|
/* Update error code */
|
||||||
hdcmi->ErrorCode |= HAL_DCMI_ERROR_SYNC;
|
hdcmi->ErrorCode |= HAL_DCMI_ERROR_SYNC;
|
||||||
|
|
||||||
/* Change DCMI state */
|
/* Change DCMI state */
|
||||||
hdcmi->State = HAL_DCMI_STATE_ERROR;
|
hdcmi->State = HAL_DCMI_STATE_ERROR;
|
||||||
|
|
||||||
|
/* Set the synchronization error callback */
|
||||||
|
hdcmi->DMA_Handle->XferAbortCallback = DCMI_DMAError;
|
||||||
|
|
||||||
/* Process Unlocked */
|
/* Abort the DMA Transfer */
|
||||||
__HAL_UNLOCK(hdcmi);
|
HAL_DMA_Abort_IT(hdcmi->DMA_Handle);
|
||||||
|
|
||||||
/* Abort the DMA Transfer */
|
|
||||||
HAL_DMA_Abort(hdcmi->DMA_Handle);
|
|
||||||
|
|
||||||
/* Synchronization error Callback */
|
|
||||||
HAL_DCMI_ErrorCallback(hdcmi);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/* Overflow interrupt management ********************************************/
|
/* Overflow interrupt management ********************************************/
|
||||||
if(__HAL_DCMI_GET_FLAG(hdcmi, DCMI_FLAG_OVFRI) != RESET)
|
if((isr_value & DCMI_FLAG_OVRRI) == DCMI_FLAG_OVRRI)
|
||||||
{
|
{
|
||||||
if(__HAL_DCMI_GET_IT_SOURCE(hdcmi, DCMI_IT_OVF) != RESET)
|
/* Clear the Overflow flag */
|
||||||
{
|
__HAL_DCMI_CLEAR_FLAG(hdcmi, DCMI_FLAG_OVRRI);
|
||||||
/* Clear the Overflow flag */
|
|
||||||
__HAL_DCMI_CLEAR_FLAG(hdcmi, DCMI_FLAG_OVFRI);
|
|
||||||
|
|
||||||
/* Update error code */
|
/* Update error code */
|
||||||
hdcmi->ErrorCode |= HAL_DCMI_ERROR_OVF;
|
hdcmi->ErrorCode |= HAL_DCMI_ERROR_OVR;
|
||||||
|
|
||||||
/* Change DCMI state */
|
/* Change DCMI state */
|
||||||
hdcmi->State = HAL_DCMI_STATE_ERROR;
|
hdcmi->State = HAL_DCMI_STATE_ERROR;
|
||||||
|
|
||||||
|
/* Set the overflow callback */
|
||||||
|
hdcmi->DMA_Handle->XferAbortCallback = DCMI_DMAError;
|
||||||
|
|
||||||
/* Process Unlocked */
|
/* Abort the DMA Transfer */
|
||||||
__HAL_UNLOCK(hdcmi);
|
HAL_DMA_Abort_IT(hdcmi->DMA_Handle);
|
||||||
|
|
||||||
/* Abort the DMA Transfer */
|
|
||||||
HAL_DMA_Abort(hdcmi->DMA_Handle);
|
|
||||||
|
|
||||||
/* Overflow Callback */
|
|
||||||
HAL_DCMI_ErrorCallback(hdcmi);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/* Line Interrupt management ************************************************/
|
/* Line Interrupt management ************************************************/
|
||||||
if(__HAL_DCMI_GET_FLAG(hdcmi, DCMI_FLAG_LINERI) != RESET)
|
if((isr_value & DCMI_FLAG_LINERI) == DCMI_FLAG_LINERI)
|
||||||
{
|
{
|
||||||
if(__HAL_DCMI_GET_IT_SOURCE(hdcmi, DCMI_IT_LINE) != RESET)
|
/* Clear the Line interrupt flag */
|
||||||
{
|
__HAL_DCMI_CLEAR_FLAG(hdcmi, DCMI_FLAG_LINERI);
|
||||||
/* Clear the Line interrupt flag */
|
|
||||||
__HAL_DCMI_CLEAR_FLAG(hdcmi, DCMI_FLAG_LINERI);
|
/* Line interrupt Callback */
|
||||||
|
HAL_DCMI_LineEventCallback(hdcmi);
|
||||||
/* Process Unlocked */
|
|
||||||
__HAL_UNLOCK(hdcmi);
|
|
||||||
|
|
||||||
/* Line interrupt Callback */
|
|
||||||
HAL_DCMI_LineEventCallback(hdcmi);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/* VSYNC interrupt management ***********************************************/
|
/* VSYNC interrupt management ***********************************************/
|
||||||
if(__HAL_DCMI_GET_FLAG(hdcmi, DCMI_FLAG_VSYNCRI) != RESET)
|
if((isr_value & DCMI_FLAG_VSYNCRI) == DCMI_FLAG_VSYNCRI)
|
||||||
{
|
{
|
||||||
if(__HAL_DCMI_GET_IT_SOURCE(hdcmi, DCMI_IT_VSYNC) != RESET)
|
/* Clear the VSYNC flag */
|
||||||
{
|
__HAL_DCMI_CLEAR_FLAG(hdcmi, DCMI_FLAG_VSYNCRI);
|
||||||
/* Clear the VSYNC flag */
|
|
||||||
__HAL_DCMI_CLEAR_FLAG(hdcmi, DCMI_FLAG_VSYNCRI);
|
/* VSYNC Callback */
|
||||||
|
HAL_DCMI_VsyncEventCallback(hdcmi);
|
||||||
/* Process Unlocked */
|
|
||||||
__HAL_UNLOCK(hdcmi);
|
|
||||||
|
|
||||||
/* VSYNC Callback */
|
|
||||||
HAL_DCMI_VsyncEventCallback(hdcmi);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/* End of Frame interrupt management ****************************************/
|
/* FRAME interrupt management ***********************************************/
|
||||||
if(__HAL_DCMI_GET_FLAG(hdcmi, DCMI_FLAG_FRAMERI) != RESET)
|
if((isr_value & DCMI_FLAG_FRAMERI) == DCMI_FLAG_FRAMERI)
|
||||||
{
|
{
|
||||||
if(__HAL_DCMI_GET_IT_SOURCE(hdcmi, DCMI_IT_FRAME) != RESET)
|
/* When snapshot mode, disable Vsync, Error and Overrun interrupts */
|
||||||
{
|
if((hdcmi->Instance->CR & DCMI_CR_CM) == DCMI_MODE_SNAPSHOT)
|
||||||
/* Disable the Line interrupt when using snapshot mode */
|
{
|
||||||
if ((hdcmi->Instance->CR & DCMI_CR_CM) == DCMI_MODE_SNAPSHOT)
|
/* Disable the Line, Vsync, Error and Overrun interrupts */
|
||||||
{
|
__HAL_DCMI_DISABLE_IT(hdcmi, DCMI_IT_LINE | DCMI_IT_VSYNC | DCMI_IT_ERR | DCMI_IT_OVR);
|
||||||
__HAL_DCMI_DISABLE_IT(hdcmi, DCMI_IT_LINE);
|
|
||||||
}
|
|
||||||
/* Disable the End of frame, Vsync, Error and Overrun interrupts */
|
|
||||||
__HAL_DCMI_DISABLE_IT(hdcmi, DCMI_IT_FRAME | DCMI_IT_VSYNC | DCMI_IT_ERR | DCMI_IT_OVF);
|
|
||||||
|
|
||||||
/* Clear the End of Frame flag */
|
|
||||||
__HAL_DCMI_CLEAR_FLAG(hdcmi, DCMI_FLAG_FRAMERI);
|
|
||||||
|
|
||||||
/* Process Unlocked */
|
|
||||||
__HAL_UNLOCK(hdcmi);
|
|
||||||
|
|
||||||
/* End of Frame Callback */
|
|
||||||
HAL_DCMI_FrameEventCallback(hdcmi);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Disable the Frame interrupt */
|
||||||
|
__HAL_DCMI_DISABLE_IT(hdcmi, DCMI_IT_FRAME);
|
||||||
|
|
||||||
|
/* Frame Callback */
|
||||||
|
HAL_DCMI_FrameEventCallback(hdcmi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Error DCMI callback.
|
* @brief Error DCMI callback.
|
||||||
* @param hdcmi: pointer to a DCMI_HandleTypeDef structure that contains
|
* @param hdcmi: pointer to a DCMI_HandleTypeDef structure that contains
|
||||||
* the configuration information for DCMI.
|
* the configuration information for DCMI.
|
||||||
* @retval None
|
* @retval None
|
||||||
|
@ -589,12 +628,12 @@ __weak void HAL_DCMI_FrameEventCallback(DCMI_HandleTypeDef *hdcmi)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup DCMI_Exported_Functions_Group3 Peripheral Control functions
|
/** @defgroup DCMI_Exported_Functions_Group3 Peripheral Control functions
|
||||||
* @brief Peripheral Control functions
|
* @brief Peripheral Control functions
|
||||||
*
|
*
|
||||||
@verbatim
|
@verbatim
|
||||||
===============================================================================
|
===============================================================================
|
||||||
##### Peripheral Control functions #####
|
##### Peripheral Control functions #####
|
||||||
===============================================================================
|
===============================================================================
|
||||||
[..] This section provides functions allowing to:
|
[..] This section provides functions allowing to:
|
||||||
(+) Configure the CROP feature.
|
(+) Configure the CROP feature.
|
||||||
(+) Enable/Disable the CROP feature.
|
(+) Enable/Disable the CROP feature.
|
||||||
|
@ -613,7 +652,7 @@ __weak void HAL_DCMI_FrameEventCallback(DCMI_HandleTypeDef *hdcmi)
|
||||||
* @param YSize: DCMI Line number
|
* @param YSize: DCMI Line number
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_DCMI_ConfigCROP(DCMI_HandleTypeDef *hdcmi, uint32_t X0, uint32_t Y0, uint32_t XSize, uint32_t YSize)
|
HAL_StatusTypeDef HAL_DCMI_ConfigCrop(DCMI_HandleTypeDef *hdcmi, uint32_t X0, uint32_t Y0, uint32_t XSize, uint32_t YSize)
|
||||||
{
|
{
|
||||||
/* Process Locked */
|
/* Process Locked */
|
||||||
__HAL_LOCK(hdcmi);
|
__HAL_LOCK(hdcmi);
|
||||||
|
@ -628,8 +667,8 @@ HAL_StatusTypeDef HAL_DCMI_ConfigCROP(DCMI_HandleTypeDef *hdcmi, uint32_t X0, ui
|
||||||
assert_param(IS_DCMI_WINDOW_HEIGHT(Y0));
|
assert_param(IS_DCMI_WINDOW_HEIGHT(Y0));
|
||||||
|
|
||||||
/* Configure CROP */
|
/* Configure CROP */
|
||||||
DCMI->CWSIZER = (XSize | (YSize << 16U));
|
hdcmi->Instance->CWSIZER = (XSize | (YSize << DCMI_POSITION_CWSIZE_VLINE));
|
||||||
DCMI->CWSTRTR = (X0 | (Y0 << 16U));
|
hdcmi->Instance->CWSTRTR = (X0 | (Y0 << DCMI_POSITION_CWSTRT_VST));
|
||||||
|
|
||||||
/* Initialize the DCMI state*/
|
/* Initialize the DCMI state*/
|
||||||
hdcmi->State = HAL_DCMI_STATE_READY;
|
hdcmi->State = HAL_DCMI_STATE_READY;
|
||||||
|
@ -646,7 +685,7 @@ HAL_StatusTypeDef HAL_DCMI_ConfigCROP(DCMI_HandleTypeDef *hdcmi, uint32_t X0, ui
|
||||||
* the configuration information for DCMI.
|
* the configuration information for DCMI.
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_DCMI_DisableCROP(DCMI_HandleTypeDef *hdcmi)
|
HAL_StatusTypeDef HAL_DCMI_DisableCrop(DCMI_HandleTypeDef *hdcmi)
|
||||||
{
|
{
|
||||||
/* Process Locked */
|
/* Process Locked */
|
||||||
__HAL_LOCK(hdcmi);
|
__HAL_LOCK(hdcmi);
|
||||||
|
@ -655,15 +694,15 @@ HAL_StatusTypeDef HAL_DCMI_DisableCROP(DCMI_HandleTypeDef *hdcmi)
|
||||||
hdcmi->State = HAL_DCMI_STATE_BUSY;
|
hdcmi->State = HAL_DCMI_STATE_BUSY;
|
||||||
|
|
||||||
/* Disable DCMI Crop feature */
|
/* Disable DCMI Crop feature */
|
||||||
DCMI->CR &= ~(uint32_t)DCMI_CR_CROP;
|
hdcmi->Instance->CR &= ~(uint32_t)DCMI_CR_CROP;
|
||||||
|
|
||||||
/* Change the DCMI state*/
|
/* Change the DCMI state*/
|
||||||
hdcmi->State = HAL_DCMI_STATE_READY;
|
hdcmi->State = HAL_DCMI_STATE_READY;
|
||||||
|
|
||||||
/* Process Unlocked */
|
/* Process Unlocked */
|
||||||
__HAL_UNLOCK(hdcmi);
|
__HAL_UNLOCK(hdcmi);
|
||||||
|
|
||||||
return HAL_OK;
|
return HAL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -672,7 +711,7 @@ HAL_StatusTypeDef HAL_DCMI_DisableCROP(DCMI_HandleTypeDef *hdcmi)
|
||||||
* the configuration information for DCMI.
|
* the configuration information for DCMI.
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_DCMI_EnableCROP(DCMI_HandleTypeDef *hdcmi)
|
HAL_StatusTypeDef HAL_DCMI_EnableCrop(DCMI_HandleTypeDef *hdcmi)
|
||||||
{
|
{
|
||||||
/* Process Locked */
|
/* Process Locked */
|
||||||
__HAL_LOCK(hdcmi);
|
__HAL_LOCK(hdcmi);
|
||||||
|
@ -681,7 +720,7 @@ HAL_StatusTypeDef HAL_DCMI_EnableCROP(DCMI_HandleTypeDef *hdcmi)
|
||||||
hdcmi->State = HAL_DCMI_STATE_BUSY;
|
hdcmi->State = HAL_DCMI_STATE_BUSY;
|
||||||
|
|
||||||
/* Enable DCMI Crop feature */
|
/* Enable DCMI Crop feature */
|
||||||
DCMI->CR |= (uint32_t)DCMI_CR_CROP;
|
hdcmi->Instance->CR |= (uint32_t)DCMI_CR_CROP;
|
||||||
|
|
||||||
/* Change the DCMI state*/
|
/* Change the DCMI state*/
|
||||||
hdcmi->State = HAL_DCMI_STATE_READY;
|
hdcmi->State = HAL_DCMI_STATE_READY;
|
||||||
|
@ -689,7 +728,7 @@ HAL_StatusTypeDef HAL_DCMI_EnableCROP(DCMI_HandleTypeDef *hdcmi)
|
||||||
/* Process Unlocked */
|
/* Process Unlocked */
|
||||||
__HAL_UNLOCK(hdcmi);
|
__HAL_UNLOCK(hdcmi);
|
||||||
|
|
||||||
return HAL_OK;
|
return HAL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -697,16 +736,16 @@ HAL_StatusTypeDef HAL_DCMI_EnableCROP(DCMI_HandleTypeDef *hdcmi)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup DCMI_Exported_Functions_Group4 Peripheral State functions
|
/** @defgroup DCMI_Exported_Functions_Group4 Peripheral State functions
|
||||||
* @brief Peripheral State functions
|
* @brief Peripheral State functions
|
||||||
*
|
*
|
||||||
@verbatim
|
@verbatim
|
||||||
===============================================================================
|
===============================================================================
|
||||||
##### Peripheral State and Errors functions #####
|
##### Peripheral State and Errors functions #####
|
||||||
===============================================================================
|
===============================================================================
|
||||||
[..]
|
[..]
|
||||||
This subsection provides functions allowing to
|
This subsection provides functions allowing to
|
||||||
(+) Check the DCMI state.
|
(+) Check the DCMI state.
|
||||||
(+) Get the specific DCMI error flag.
|
(+) Get the specific DCMI error flag.
|
||||||
|
|
||||||
@endverbatim
|
@endverbatim
|
||||||
* @{
|
* @{
|
||||||
|
@ -718,7 +757,7 @@ HAL_StatusTypeDef HAL_DCMI_EnableCROP(DCMI_HandleTypeDef *hdcmi)
|
||||||
* the configuration information for DCMI.
|
* the configuration information for DCMI.
|
||||||
* @retval HAL state
|
* @retval HAL state
|
||||||
*/
|
*/
|
||||||
HAL_DCMI_StateTypeDef HAL_DCMI_GetState(DCMI_HandleTypeDef *hdcmi)
|
HAL_DCMI_StateTypeDef HAL_DCMI_GetState(DCMI_HandleTypeDef *hdcmi)
|
||||||
{
|
{
|
||||||
return hdcmi->State;
|
return hdcmi->State;
|
||||||
}
|
}
|
||||||
|
@ -733,6 +772,7 @@ uint32_t HAL_DCMI_GetError(DCMI_HandleTypeDef *hdcmi)
|
||||||
{
|
{
|
||||||
return hdcmi->ErrorCode;
|
return hdcmi->ErrorCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
@ -741,11 +781,11 @@ uint32_t HAL_DCMI_GetError(DCMI_HandleTypeDef *hdcmi)
|
||||||
/** @defgroup DCMI_Private_Functions DCMI Private Functions
|
/** @defgroup DCMI_Private_Functions DCMI Private Functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief DMA conversion complete callback.
|
* @brief DMA conversion complete callback.
|
||||||
* @param hdma: pointer to a DMA_HandleTypeDef structure that contains
|
* @param hdma: pointer to a DMA_HandleTypeDef structure that contains
|
||||||
* the configuration information for the specified DMA module.
|
* the configuration information for the specified DMA module.
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
static void DCMI_DMAXferCplt(DMA_HandleTypeDef *hdma)
|
static void DCMI_DMAXferCplt(DMA_HandleTypeDef *hdma)
|
||||||
|
@ -753,9 +793,8 @@ static void DCMI_DMAXferCplt(DMA_HandleTypeDef *hdma)
|
||||||
uint32_t tmp = 0U;
|
uint32_t tmp = 0U;
|
||||||
|
|
||||||
DCMI_HandleTypeDef* hdcmi = ( DCMI_HandleTypeDef* )((DMA_HandleTypeDef* )hdma)->Parent;
|
DCMI_HandleTypeDef* hdcmi = ( DCMI_HandleTypeDef* )((DMA_HandleTypeDef* )hdma)->Parent;
|
||||||
hdcmi->State= HAL_DCMI_STATE_READY;
|
|
||||||
|
if(hdcmi->XferCount != 0)
|
||||||
if(hdcmi->XferCount != 0U)
|
|
||||||
{
|
{
|
||||||
/* Update memory 0 address location */
|
/* Update memory 0 address location */
|
||||||
tmp = ((hdcmi->DMA_Handle->Instance->CR) & DMA_SxCR_CT);
|
tmp = ((hdcmi->DMA_Handle->Instance->CR) & DMA_SxCR_CT);
|
||||||
|
@ -785,9 +824,19 @@ static void DCMI_DMAXferCplt(DMA_HandleTypeDef *hdma)
|
||||||
hdcmi->DMA_Handle->Instance->M1AR = (tmp + (4U*hdcmi->XferSize));
|
hdcmi->DMA_Handle->Instance->M1AR = (tmp + (4U*hdcmi->XferSize));
|
||||||
hdcmi->XferCount = hdcmi->XferTransferNumber;
|
hdcmi->XferCount = hdcmi->XferTransferNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enable the Frame interrupt */
|
/* Check if the frame is transferred */
|
||||||
__HAL_DCMI_ENABLE_IT(hdcmi, DCMI_IT_FRAME);
|
if(hdcmi->XferCount == hdcmi->XferTransferNumber)
|
||||||
|
{
|
||||||
|
/* Enable the Frame interrupt */
|
||||||
|
__HAL_DCMI_ENABLE_IT(hdcmi, DCMI_IT_FRAME);
|
||||||
|
|
||||||
|
/* When snapshot mode, set dcmi state to ready */
|
||||||
|
if((hdcmi->Instance->CR & DCMI_CR_CM) == DCMI_MODE_SNAPSHOT)
|
||||||
|
{
|
||||||
|
hdcmi->State= HAL_DCMI_STATE_READY;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -798,10 +847,18 @@ static void DCMI_DMAXferCplt(DMA_HandleTypeDef *hdma)
|
||||||
*/
|
*/
|
||||||
static void DCMI_DMAError(DMA_HandleTypeDef *hdma)
|
static void DCMI_DMAError(DMA_HandleTypeDef *hdma)
|
||||||
{
|
{
|
||||||
DCMI_HandleTypeDef* hdcmi = ( DCMI_HandleTypeDef* )((DMA_HandleTypeDef* )hdma)->Parent;
|
DCMI_HandleTypeDef* hdcmi = ( DCMI_HandleTypeDef* )((DMA_HandleTypeDef* )hdma)->Parent;
|
||||||
hdcmi->State= HAL_DCMI_STATE_READY;
|
|
||||||
|
if(hdcmi->DMA_Handle->ErrorCode != HAL_DMA_ERROR_FE)
|
||||||
|
{
|
||||||
|
/* Initialize the DCMI state*/
|
||||||
|
hdcmi->State = HAL_DCMI_STATE_READY;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* DCMI error Callback */
|
||||||
HAL_DCMI_ErrorCallback(hdcmi);
|
HAL_DCMI_ErrorCallback(hdcmi);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_dcmi.h
|
* @file stm32f4xx_hal_dcmi.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief Header file of DCMI HAL module.
|
* @brief Header file of DCMI HAL module.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
#ifndef __STM32F4xx_HAL_DCMI_H
|
#ifndef __STM32F4xx_HAL_DCMI_H
|
||||||
|
@ -60,23 +60,13 @@
|
||||||
/** @addtogroup DCMI DCMI
|
/** @addtogroup DCMI DCMI
|
||||||
* @brief DCMI HAL module driver
|
* @brief DCMI HAL module driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Exported types ------------------------------------------------------------*/
|
/* Exported types ------------------------------------------------------------*/
|
||||||
/** @defgroup DCMI_Exported_Types DCMI Exported Types
|
/** @defgroup DCMI_Exported_Types DCMI Exported Types
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief DCMI Error source
|
|
||||||
*/
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
DCMI_ERROR_SYNC = 1, /*!< Synchronisation error */
|
|
||||||
DCMI_OVERRUN = 2, /*!< DCMI Overrun */
|
|
||||||
}DCMI_ErrorTypeDef;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief HAL DCMI State structures definition
|
* @brief HAL DCMI State structures definition
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -85,7 +75,8 @@ typedef enum
|
||||||
HAL_DCMI_STATE_READY = 0x01U, /*!< DCMI initialized and ready for use */
|
HAL_DCMI_STATE_READY = 0x01U, /*!< DCMI initialized and ready for use */
|
||||||
HAL_DCMI_STATE_BUSY = 0x02U, /*!< DCMI internal processing is ongoing */
|
HAL_DCMI_STATE_BUSY = 0x02U, /*!< DCMI internal processing is ongoing */
|
||||||
HAL_DCMI_STATE_TIMEOUT = 0x03U, /*!< DCMI timeout state */
|
HAL_DCMI_STATE_TIMEOUT = 0x03U, /*!< DCMI timeout state */
|
||||||
HAL_DCMI_STATE_ERROR = 0x04U /*!< DCMI error state */
|
HAL_DCMI_STATE_ERROR = 0x04U, /*!< DCMI error state */
|
||||||
|
HAL_DCMI_STATE_SUSPENDED = 0x05U /*!< DCMI suspend state */
|
||||||
}HAL_DCMI_StateTypeDef;
|
}HAL_DCMI_StateTypeDef;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -127,9 +118,10 @@ typedef struct
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define HAL_DCMI_ERROR_NONE ((uint32_t)0x00000000U) /*!< No error */
|
#define HAL_DCMI_ERROR_NONE ((uint32_t)0x00000000U) /*!< No error */
|
||||||
#define HAL_DCMI_ERROR_OVF ((uint32_t)0x00000001U) /*!< Overflow error */
|
#define HAL_DCMI_ERROR_OVR ((uint32_t)0x00000001U) /*!< Overrun error */
|
||||||
#define HAL_DCMI_ERROR_SYNC ((uint32_t)0x00000002U) /*!< Synchronization error */
|
#define HAL_DCMI_ERROR_SYNC ((uint32_t)0x00000002U) /*!< Synchronization error */
|
||||||
#define HAL_DCMI_ERROR_TIMEOUT ((uint32_t)0x00000020U) /*!< Timeout error */
|
#define HAL_DCMI_ERROR_TIMEOUT ((uint32_t)0x00000020U) /*!< Timeout error */
|
||||||
|
#define HAL_DCMI_ERROR_DMA ((uint32_t)0x00000040U) /*!< DMA error */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
@ -137,9 +129,9 @@ typedef struct
|
||||||
/** @defgroup DCMI_Capture_Mode DCMI Capture Mode
|
/** @defgroup DCMI_Capture_Mode DCMI Capture Mode
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define DCMI_MODE_CONTINUOUS ((uint32_t)0x00000000U) /*!< The received data are transferred continuously
|
#define DCMI_MODE_CONTINUOUS ((uint32_t)0x00000000U) /*!< The received data are transferred continuously
|
||||||
into the destination memory through the DMA */
|
into the destination memory through the DMA */
|
||||||
#define DCMI_MODE_SNAPSHOT ((uint32_t)DCMI_CR_CM) /*!< Once activated, the interface waits for the start of
|
#define DCMI_MODE_SNAPSHOT ((uint32_t)DCMI_CR_CM) /*!< Once activated, the interface waits for the start of
|
||||||
frame and then transfers a single frame through the DMA */
|
frame and then transfers a single frame through the DMA */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
@ -147,10 +139,10 @@ typedef struct
|
||||||
|
|
||||||
/** @defgroup DCMI_Synchronization_Mode DCMI Synchronization Mode
|
/** @defgroup DCMI_Synchronization_Mode DCMI Synchronization Mode
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define DCMI_SYNCHRO_HARDWARE ((uint32_t)0x00000000U) /*!< Hardware synchronization data capture (frame/line start/stop)
|
#define DCMI_SYNCHRO_HARDWARE ((uint32_t)0x00000000U) /*!< Hardware synchronization data capture (frame/line start/stop)
|
||||||
is synchronized with the HSYNC/VSYNC signals */
|
is synchronized with the HSYNC/VSYNC signals */
|
||||||
#define DCMI_SYNCHRO_EMBEDDED ((uint32_t)DCMI_CR_ESS) /*!< Embedded synchronization data capture is synchronized with
|
#define DCMI_SYNCHRO_EMBEDDED ((uint32_t)DCMI_CR_ESS) /*!< Embedded synchronization data capture is synchronized with
|
||||||
synchronization codes embedded in the data flow */
|
synchronization codes embedded in the data flow */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -160,17 +152,17 @@ typedef struct
|
||||||
/** @defgroup DCMI_PIXCK_Polarity DCMI PIXCK Polarity
|
/** @defgroup DCMI_PIXCK_Polarity DCMI PIXCK Polarity
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define DCMI_PCKPOLARITY_FALLING ((uint32_t)0x00000000U) /*!< Pixel clock active on Falling edge */
|
#define DCMI_PCKPOLARITY_FALLING ((uint32_t)0x00000000U) /*!< Pixel clock active on Falling edge */
|
||||||
#define DCMI_PCKPOLARITY_RISING ((uint32_t)DCMI_CR_PCKPOL) /*!< Pixel clock active on Rising edge */
|
#define DCMI_PCKPOLARITY_RISING ((uint32_t)DCMI_CR_PCKPOL) /*!< Pixel clock active on Rising edge */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup DCMI_VSYNC_Polarity DCMI VSYNC Polarity
|
/** @defgroup DCMI_VSYNC_Polarity DCMI VSYNC Polarity
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define DCMI_VSPOLARITY_LOW ((uint32_t)0x00000000U) /*!< Vertical synchronization active Low */
|
#define DCMI_VSPOLARITY_LOW ((uint32_t)0x00000000U) /*!< Vertical synchronization active Low */
|
||||||
#define DCMI_VSPOLARITY_HIGH ((uint32_t)DCMI_CR_VSPOL) /*!< Vertical synchronization active High */
|
#define DCMI_VSPOLARITY_HIGH ((uint32_t)DCMI_CR_VSPOL) /*!< Vertical synchronization active High */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -180,7 +172,7 @@ typedef struct
|
||||||
/** @defgroup DCMI_HSYNC_Polarity DCMI HSYNC Polarity
|
/** @defgroup DCMI_HSYNC_Polarity DCMI HSYNC Polarity
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define DCMI_HSPOLARITY_LOW ((uint32_t)0x00000000U) /*!< Horizontal synchronization active Low */
|
#define DCMI_HSPOLARITY_LOW ((uint32_t)0x00000000U) /*!< Horizontal synchronization active Low */
|
||||||
#define DCMI_HSPOLARITY_HIGH ((uint32_t)DCMI_CR_HSPOL) /*!< Horizontal synchronization active High */
|
#define DCMI_HSPOLARITY_HIGH ((uint32_t)DCMI_CR_HSPOL) /*!< Horizontal synchronization active High */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -190,7 +182,7 @@ typedef struct
|
||||||
/** @defgroup DCMI_MODE_JPEG DCMI MODE JPEG
|
/** @defgroup DCMI_MODE_JPEG DCMI MODE JPEG
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define DCMI_JPEG_DISABLE ((uint32_t)0x00000000U) /*!< Mode JPEG Disabled */
|
#define DCMI_JPEG_DISABLE ((uint32_t)0x00000000U) /*!< Mode JPEG Disabled */
|
||||||
#define DCMI_JPEG_ENABLE ((uint32_t)DCMI_CR_JPEG) /*!< Mode JPEG Enabled */
|
#define DCMI_JPEG_ENABLE ((uint32_t)DCMI_CR_JPEG) /*!< Mode JPEG Enabled */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -200,7 +192,7 @@ typedef struct
|
||||||
/** @defgroup DCMI_Capture_Rate DCMI Capture Rate
|
/** @defgroup DCMI_Capture_Rate DCMI Capture Rate
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define DCMI_CR_ALL_FRAME ((uint32_t)0x00000000U) /*!< All frames are captured */
|
#define DCMI_CR_ALL_FRAME ((uint32_t)0x00000000U) /*!< All frames are captured */
|
||||||
#define DCMI_CR_ALTERNATE_2_FRAME ((uint32_t)DCMI_CR_FCRC_0) /*!< Every alternate frame captured */
|
#define DCMI_CR_ALTERNATE_2_FRAME ((uint32_t)DCMI_CR_FCRC_0) /*!< Every alternate frame captured */
|
||||||
#define DCMI_CR_ALTERNATE_4_FRAME ((uint32_t)DCMI_CR_FCRC_1) /*!< One frame in 4 frames captured */
|
#define DCMI_CR_ALTERNATE_4_FRAME ((uint32_t)DCMI_CR_FCRC_1) /*!< One frame in 4 frames captured */
|
||||||
|
|
||||||
|
@ -211,7 +203,7 @@ typedef struct
|
||||||
/** @defgroup DCMI_Extended_Data_Mode DCMI Extended Data Mode
|
/** @defgroup DCMI_Extended_Data_Mode DCMI Extended Data Mode
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define DCMI_EXTEND_DATA_8B ((uint32_t)0x00000000U) /*!< Interface captures 8-bit data on every pixel clock */
|
#define DCMI_EXTEND_DATA_8B ((uint32_t)0x00000000U) /*!< Interface captures 8-bit data on every pixel clock */
|
||||||
#define DCMI_EXTEND_DATA_10B ((uint32_t)DCMI_CR_EDM_0) /*!< Interface captures 10-bit data on every pixel clock */
|
#define DCMI_EXTEND_DATA_10B ((uint32_t)DCMI_CR_EDM_0) /*!< Interface captures 10-bit data on every pixel clock */
|
||||||
#define DCMI_EXTEND_DATA_12B ((uint32_t)DCMI_CR_EDM_1) /*!< Interface captures 12-bit data on every pixel clock */
|
#define DCMI_EXTEND_DATA_12B ((uint32_t)DCMI_CR_EDM_1) /*!< Interface captures 12-bit data on every pixel clock */
|
||||||
#define DCMI_EXTEND_DATA_14B ((uint32_t)(DCMI_CR_EDM_0 | DCMI_CR_EDM_1)) /*!< Interface captures 14-bit data on every pixel clock */
|
#define DCMI_EXTEND_DATA_14B ((uint32_t)(DCMI_CR_EDM_0 | DCMI_CR_EDM_1)) /*!< Interface captures 14-bit data on every pixel clock */
|
||||||
|
@ -234,6 +226,16 @@ typedef struct
|
||||||
*/
|
*/
|
||||||
#define DCMI_WINDOW_HEIGHT ((uint32_t)0x1FFFU) /*!< Window Height */
|
#define DCMI_WINDOW_HEIGHT ((uint32_t)0x1FFFU) /*!< Window Height */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup DCMI_Window_Vertical_Line DCMI Window Vertical Line
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define DCMI_POSITION_CWSIZE_VLINE (uint32_t)POSITION_VAL(DCMI_CWSIZE_VLINE) /*!< Required left shift to set crop window vertical line count */
|
||||||
|
#define DCMI_POSITION_CWSTRT_VST (uint32_t)POSITION_VAL(DCMI_CWSTRT_VST) /*!< Required left shift to set crop window vertical start line count */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
@ -241,11 +243,11 @@ typedef struct
|
||||||
/** @defgroup DCMI_interrupt_sources DCMI interrupt sources
|
/** @defgroup DCMI_interrupt_sources DCMI interrupt sources
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define DCMI_IT_FRAME ((uint32_t)DCMI_IER_FRAME_IE)
|
#define DCMI_IT_FRAME ((uint32_t)DCMI_IER_FRAME_IE) /*!< Capture complete interrupt */
|
||||||
#define DCMI_IT_OVF ((uint32_t)DCMI_IER_OVF_IE)
|
#define DCMI_IT_OVR ((uint32_t)DCMI_IER_OVR_IE) /*!< Overrun interrupt */
|
||||||
#define DCMI_IT_ERR ((uint32_t)DCMI_IER_ERR_IE)
|
#define DCMI_IT_ERR ((uint32_t)DCMI_IER_ERR_IE) /*!< Synchronization error interrupt */
|
||||||
#define DCMI_IT_VSYNC ((uint32_t)DCMI_IER_VSYNC_IE)
|
#define DCMI_IT_VSYNC ((uint32_t)DCMI_IER_VSYNC_IE) /*!< VSYNC interrupt */
|
||||||
#define DCMI_IT_LINE ((uint32_t)DCMI_IER_LINE_IE)
|
#define DCMI_IT_LINE ((uint32_t)DCMI_IER_LINE_IE) /*!< Line interrupt */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
@ -256,29 +258,29 @@ typedef struct
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief DCMI SR register
|
* @brief DCMI SR register
|
||||||
*/
|
*/
|
||||||
#define DCMI_FLAG_HSYNC ((uint32_t)0x2001U) /* State of HSYNC pin with the correct programmed polarity */
|
#define DCMI_FLAG_HSYNC ((uint32_t)DCMI_SR_INDEX|DCMI_SR_HSYNC) /*!< HSYNC pin state (active line / synchronization between lines) */
|
||||||
#define DCMI_FLAG_VSYNC ((uint32_t)0x2002U) /* State of VSYNC pin with the correct programmed polarity */
|
#define DCMI_FLAG_VSYNC ((uint32_t)DCMI_SR_INDEX|DCMI_SR_VSYNC) /*!< VSYNC pin state (active frame / synchronization between frames) */
|
||||||
#define DCMI_FLAG_FNE ((uint32_t)0x2004U) /* Status of the FIFO */
|
#define DCMI_FLAG_FNE ((uint32_t)DCMI_SR_INDEX|DCMI_SR_FNE) /*!< FIFO not empty flag */
|
||||||
/**
|
/**
|
||||||
* @brief DCMI RISR register
|
* @brief DCMI RIS register
|
||||||
*/
|
*/
|
||||||
#define DCMI_FLAG_FRAMERI ((uint32_t)DCMI_RISR_FRAME_RIS)
|
#define DCMI_FLAG_FRAMERI ((uint32_t)DCMI_RISR_FRAME_RIS) /*!< Frame capture complete interrupt flag */
|
||||||
#define DCMI_FLAG_OVFRI ((uint32_t)DCMI_RISR_OVF_RIS)
|
#define DCMI_FLAG_OVRRI ((uint32_t)DCMI_RISR_OVR_RIS) /*!< Overrun interrupt flag */
|
||||||
#define DCMI_FLAG_ERRRI ((uint32_t)DCMI_RISR_ERR_RIS)
|
#define DCMI_FLAG_ERRRI ((uint32_t)DCMI_RISR_ERR_RIS) /*!< Synchronization error interrupt flag */
|
||||||
#define DCMI_FLAG_VSYNCRI ((uint32_t)DCMI_RISR_VSYNC_RIS)
|
#define DCMI_FLAG_VSYNCRI ((uint32_t)DCMI_RISR_VSYNC_RIS) /*!< VSYNC interrupt flag */
|
||||||
#define DCMI_FLAG_LINERI ((uint32_t)DCMI_RISR_LINE_RIS)
|
#define DCMI_FLAG_LINERI ((uint32_t)DCMI_RISR_LINE_RIS) /*!< Line interrupt flag */
|
||||||
/**
|
/**
|
||||||
* @brief DCMI MISR register
|
* @brief DCMI MIS register
|
||||||
*/
|
*/
|
||||||
#define DCMI_FLAG_FRAMEMI ((uint32_t)0x1001U)
|
#define DCMI_FLAG_FRAMEMI ((uint32_t)DCMI_MIS_INDEX|DCMI_MIS_FRAME_MIS) /*!< DCMI Frame capture complete masked interrupt status */
|
||||||
#define DCMI_FLAG_OVFMI ((uint32_t)0x1002U)
|
#define DCMI_FLAG_OVRMI ((uint32_t)DCMI_MIS_INDEX|DCMI_MIS_OVR_MIS ) /*!< DCMI Overrun masked interrupt status */
|
||||||
#define DCMI_FLAG_ERRMI ((uint32_t)0x1004U)
|
#define DCMI_FLAG_ERRMI ((uint32_t)DCMI_MIS_INDEX|DCMI_MIS_ERR_MIS ) /*!< DCMI Synchronization error masked interrupt status */
|
||||||
#define DCMI_FLAG_VSYNCMI ((uint32_t)0x1008U)
|
#define DCMI_FLAG_VSYNCMI ((uint32_t)DCMI_MIS_INDEX|DCMI_MIS_VSYNC_MIS) /*!< DCMI VSYNC masked interrupt status */
|
||||||
#define DCMI_FLAG_LINEMI ((uint32_t)0x1010U)
|
#define DCMI_FLAG_LINEMI ((uint32_t)DCMI_MIS_INDEX|DCMI_MIS_LINE_MIS ) /*!< DCMI Line masked interrupt status */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
@ -311,28 +313,28 @@ typedef struct
|
||||||
|
|
||||||
/* Interrupt & Flag management */
|
/* Interrupt & Flag management */
|
||||||
/**
|
/**
|
||||||
* @brief Get the DCMI pending flags.
|
* @brief Get the DCMI pending flag.
|
||||||
* @param __HANDLE__: DCMI handle
|
* @param __HANDLE__: DCMI handle
|
||||||
* @param __FLAG__: Get the specified flag.
|
* @param __FLAG__: Get the specified flag.
|
||||||
* This parameter can be any combination of the following values:
|
* This parameter can be one of the following values (no combination allowed)
|
||||||
* @arg DCMI_FLAG_FRAMERI: Frame capture complete flag
|
* @arg DCMI_FLAG_HSYNC: HSYNC pin state (active line / synchronization between lines)
|
||||||
* @arg DCMI_FLAG_OVFRI: Overflow flag
|
* @arg DCMI_FLAG_VSYNC: VSYNC pin state (active frame / synchronization between frames)
|
||||||
* @arg DCMI_FLAG_ERRRI: Synchronization error flag
|
* @arg DCMI_FLAG_FNE: FIFO empty flag
|
||||||
* @arg DCMI_FLAG_VSYNCRI: VSYNC flag
|
* @arg DCMI_FLAG_FRAMERI: Frame capture complete flag mask
|
||||||
* @arg DCMI_FLAG_LINERI: Line flag
|
* @arg DCMI_FLAG_OVRRI: Overrun flag mask
|
||||||
* @arg DCMI_FLAG_FRAMEMI: Frame capture complete flag mask
|
* @arg DCMI_FLAG_ERRRI: Synchronization error flag mask
|
||||||
* @arg DCMI_FLAG_OVFMI: Overflow flag mask
|
* @arg DCMI_FLAG_VSYNCRI: VSYNC flag mask
|
||||||
* @arg DCMI_FLAG_ERRMI: Synchronization error flag mask
|
* @arg DCMI_FLAG_LINERI: Line flag mask
|
||||||
* @arg DCMI_FLAG_VSYNCMI: VSYNC flag mask
|
* @arg DCMI_FLAG_FRAMEMI: DCMI Capture complete masked interrupt status
|
||||||
* @arg DCMI_FLAG_LINEMI: Line flag mask
|
* @arg DCMI_FLAG_OVRMI: DCMI Overrun masked interrupt status
|
||||||
* @arg DCMI_FLAG_HSYNC: HSYNC flag
|
* @arg DCMI_FLAG_ERRMI: DCMI Synchronization error masked interrupt status
|
||||||
* @arg DCMI_FLAG_VSYNC: VSYNC flag
|
* @arg DCMI_FLAG_VSYNCMI: DCMI VSYNC masked interrupt status
|
||||||
* @arg DCMI_FLAG_FNE: FNE flag
|
* @arg DCMI_FLAG_LINEMI: DCMI Line masked interrupt status
|
||||||
* @retval The state of FLAG.
|
* @retval The state of FLAG.
|
||||||
*/
|
*/
|
||||||
#define __HAL_DCMI_GET_FLAG(__HANDLE__, __FLAG__)\
|
#define __HAL_DCMI_GET_FLAG(__HANDLE__, __FLAG__)\
|
||||||
((((__FLAG__) & 0x3000U) == 0x00U)? ((__HANDLE__)->Instance->RISR & (__FLAG__)) :\
|
((((__FLAG__) & (DCMI_SR_INDEX|DCMI_MIS_INDEX)) == 0x0U)? ((__HANDLE__)->Instance->RIS & (__FLAG__)) :\
|
||||||
(((__FLAG__) & 0x2000U) == 0x00U)? ((__HANDLE__)->Instance->MISR & (__FLAG__)) : ((__HANDLE__)->Instance->SR & (__FLAG__)))
|
(((__FLAG__) & DCMI_SR_INDEX) == 0x0U)? ((__HANDLE__)->Instance->MIS & (__FLAG__)) : ((__HANDLE__)->Instance->SR & (__FLAG__)))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Clear the DCMI pending flags.
|
* @brief Clear the DCMI pending flags.
|
||||||
|
@ -340,7 +342,7 @@ typedef struct
|
||||||
* @param __FLAG__: specifies the flag to clear.
|
* @param __FLAG__: specifies the flag to clear.
|
||||||
* This parameter can be any combination of the following values:
|
* This parameter can be any combination of the following values:
|
||||||
* @arg DCMI_FLAG_FRAMERI: Frame capture complete flag mask
|
* @arg DCMI_FLAG_FRAMERI: Frame capture complete flag mask
|
||||||
* @arg DCMI_FLAG_OVFRI: Overflow flag mask
|
* @arg DCMI_FLAG_OVRRI: Overrun flag mask
|
||||||
* @arg DCMI_FLAG_ERRRI: Synchronization error flag mask
|
* @arg DCMI_FLAG_ERRRI: Synchronization error flag mask
|
||||||
* @arg DCMI_FLAG_VSYNCRI: VSYNC flag mask
|
* @arg DCMI_FLAG_VSYNCRI: VSYNC flag mask
|
||||||
* @arg DCMI_FLAG_LINERI: Line flag mask
|
* @arg DCMI_FLAG_LINERI: Line flag mask
|
||||||
|
@ -351,10 +353,10 @@ typedef struct
|
||||||
/**
|
/**
|
||||||
* @brief Enable the specified DCMI interrupts.
|
* @brief Enable the specified DCMI interrupts.
|
||||||
* @param __HANDLE__: DCMI handle
|
* @param __HANDLE__: DCMI handle
|
||||||
* @param __INTERRUPT__: specifies the DCMI interrupt sources to be enabled.
|
* @param __INTERRUPT__: specifies the DCMI interrupt sources to be enabled.
|
||||||
* This parameter can be any combination of the following values:
|
* This parameter can be any combination of the following values:
|
||||||
* @arg DCMI_IT_FRAME: Frame capture complete interrupt mask
|
* @arg DCMI_IT_FRAME: Frame capture complete interrupt mask
|
||||||
* @arg DCMI_IT_OVF: Overflow interrupt mask
|
* @arg DCMI_IT_OVR: Overrun interrupt mask
|
||||||
* @arg DCMI_IT_ERR: Synchronization error interrupt mask
|
* @arg DCMI_IT_ERR: Synchronization error interrupt mask
|
||||||
* @arg DCMI_IT_VSYNC: VSYNC interrupt mask
|
* @arg DCMI_IT_VSYNC: VSYNC interrupt mask
|
||||||
* @arg DCMI_IT_LINE: Line interrupt mask
|
* @arg DCMI_IT_LINE: Line interrupt mask
|
||||||
|
@ -365,10 +367,10 @@ typedef struct
|
||||||
/**
|
/**
|
||||||
* @brief Disable the specified DCMI interrupts.
|
* @brief Disable the specified DCMI interrupts.
|
||||||
* @param __HANDLE__: DCMI handle
|
* @param __HANDLE__: DCMI handle
|
||||||
* @param __INTERRUPT__: specifies the DCMI interrupt sources to be enabled.
|
* @param __INTERRUPT__: specifies the DCMI interrupt sources to be enabled.
|
||||||
* This parameter can be any combination of the following values:
|
* This parameter can be any combination of the following values:
|
||||||
* @arg DCMI_IT_FRAME: Frame capture complete interrupt mask
|
* @arg DCMI_IT_FRAME: Frame capture complete interrupt mask
|
||||||
* @arg DCMI_IT_OVF: Overflow interrupt mask
|
* @arg DCMI_IT_OVR: Overrun interrupt mask
|
||||||
* @arg DCMI_IT_ERR: Synchronization error interrupt mask
|
* @arg DCMI_IT_ERR: Synchronization error interrupt mask
|
||||||
* @arg DCMI_IT_VSYNC: VSYNC interrupt mask
|
* @arg DCMI_IT_VSYNC: VSYNC interrupt mask
|
||||||
* @arg DCMI_IT_LINE: Line interrupt mask
|
* @arg DCMI_IT_LINE: Line interrupt mask
|
||||||
|
@ -382,7 +384,7 @@ typedef struct
|
||||||
* @param __INTERRUPT__: specifies the DCMI interrupt source to check.
|
* @param __INTERRUPT__: specifies the DCMI interrupt source to check.
|
||||||
* This parameter can be one of the following values:
|
* This parameter can be one of the following values:
|
||||||
* @arg DCMI_IT_FRAME: Frame capture complete interrupt mask
|
* @arg DCMI_IT_FRAME: Frame capture complete interrupt mask
|
||||||
* @arg DCMI_IT_OVF: Overflow interrupt mask
|
* @arg DCMI_IT_OVR: Overrun interrupt mask
|
||||||
* @arg DCMI_IT_ERR: Synchronization error interrupt mask
|
* @arg DCMI_IT_ERR: Synchronization error interrupt mask
|
||||||
* @arg DCMI_IT_VSYNC: VSYNC interrupt mask
|
* @arg DCMI_IT_VSYNC: VSYNC interrupt mask
|
||||||
* @arg DCMI_IT_LINE: Line interrupt mask
|
* @arg DCMI_IT_LINE: Line interrupt mask
|
||||||
|
@ -393,16 +395,15 @@ typedef struct
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Exported functions --------------------------------------------------------*/
|
/* Exported functions --------------------------------------------------------*/
|
||||||
/** @addtogroup DCMI_Exported_Functions
|
/** @addtogroup DCMI_Exported_Functions DCMI Exported Functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @addtogroup DCMI_Exported_Functions_Group1
|
/** @addtogroup DCMI_Exported_Functions_Group1 Initialization and Configuration functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Initialization and de-initialization functions *****************************/
|
/* Initialization and de-initialization functions *****************************/
|
||||||
HAL_StatusTypeDef HAL_DCMI_Init(DCMI_HandleTypeDef *hdcmi);
|
HAL_StatusTypeDef HAL_DCMI_Init(DCMI_HandleTypeDef *hdcmi);
|
||||||
HAL_StatusTypeDef HAL_DCMI_DeInit(DCMI_HandleTypeDef *hdcmi);
|
HAL_StatusTypeDef HAL_DCMI_DeInit(DCMI_HandleTypeDef *hdcmi);
|
||||||
|
@ -411,35 +412,38 @@ void HAL_DCMI_MspDeInit(DCMI_HandleTypeDef* hdcmi);
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @addtogroup DCMI_Exported_Functions_Group2
|
/** @addtogroup DCMI_Exported_Functions_Group2 IO operation functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* IO operation functions *****************************************************/
|
/* IO operation functions *****************************************************/
|
||||||
HAL_StatusTypeDef HAL_DCMI_Start_DMA(DCMI_HandleTypeDef* hdcmi, uint32_t DCMI_Mode, uint32_t pData, uint32_t Length);
|
HAL_StatusTypeDef HAL_DCMI_Start_DMA(DCMI_HandleTypeDef* hdcmi, uint32_t DCMI_Mode, uint32_t pData, uint32_t Length);
|
||||||
HAL_StatusTypeDef HAL_DCMI_Stop(DCMI_HandleTypeDef* hdcmi);
|
HAL_StatusTypeDef HAL_DCMI_Stop(DCMI_HandleTypeDef* hdcmi);
|
||||||
void HAL_DCMI_ErrorCallback(DCMI_HandleTypeDef *hdcmi);
|
HAL_StatusTypeDef HAL_DCMI_Suspend(DCMI_HandleTypeDef* hdcmi);
|
||||||
void HAL_DCMI_LineEventCallback(DCMI_HandleTypeDef *hdcmi);
|
HAL_StatusTypeDef HAL_DCMI_Resume(DCMI_HandleTypeDef* hdcmi);
|
||||||
void HAL_DCMI_FrameEventCallback(DCMI_HandleTypeDef *hdcmi);
|
void HAL_DCMI_ErrorCallback(DCMI_HandleTypeDef *hdcmi);
|
||||||
void HAL_DCMI_VsyncEventCallback(DCMI_HandleTypeDef *hdcmi);
|
void HAL_DCMI_LineEventCallback(DCMI_HandleTypeDef *hdcmi);
|
||||||
void HAL_DCMI_IRQHandler(DCMI_HandleTypeDef *hdcmi);
|
void HAL_DCMI_FrameEventCallback(DCMI_HandleTypeDef *hdcmi);
|
||||||
|
void HAL_DCMI_VsyncEventCallback(DCMI_HandleTypeDef *hdcmi);
|
||||||
|
void HAL_DCMI_VsyncCallback(DCMI_HandleTypeDef *hdcmi);
|
||||||
|
void HAL_DCMI_HsyncCallback(DCMI_HandleTypeDef *hdcmi);
|
||||||
|
void HAL_DCMI_IRQHandler(DCMI_HandleTypeDef *hdcmi);
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @addtogroup DCMI_Exported_Functions_Group3
|
/** @addtogroup DCMI_Exported_Functions_Group3 Peripheral Control functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/* Peripheral Control functions ***********************************************/
|
/* Peripheral Control functions ***********************************************/
|
||||||
HAL_StatusTypeDef HAL_DCMI_ConfigCROP(DCMI_HandleTypeDef *hdcmi, uint32_t X0, uint32_t Y0, uint32_t XSize, uint32_t YSize);
|
HAL_StatusTypeDef HAL_DCMI_ConfigCrop(DCMI_HandleTypeDef *hdcmi, uint32_t X0, uint32_t Y0, uint32_t XSize, uint32_t YSize);
|
||||||
HAL_StatusTypeDef HAL_DCMI_EnableCROP(DCMI_HandleTypeDef *hdcmi);
|
HAL_StatusTypeDef HAL_DCMI_EnableCrop(DCMI_HandleTypeDef *hdcmi);
|
||||||
HAL_StatusTypeDef HAL_DCMI_DisableCROP(DCMI_HandleTypeDef *hdcmi);
|
HAL_StatusTypeDef HAL_DCMI_DisableCrop(DCMI_HandleTypeDef *hdcmi);
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @addtogroup DCMI_Exported_Functions_Group4
|
/** @addtogroup DCMI_Exported_Functions_Group4 Peripheral State functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/* Peripheral State functions *************************************************/
|
/* Peripheral State functions *************************************************/
|
||||||
|
@ -455,7 +459,15 @@ uint32_t HAL_DCMI_GetError(DCMI_HandleTypeDef *hdcmi);
|
||||||
|
|
||||||
/* Private types -------------------------------------------------------------*/
|
/* Private types -------------------------------------------------------------*/
|
||||||
/* Private variables ---------------------------------------------------------*/
|
/* Private variables ---------------------------------------------------------*/
|
||||||
/* Private constants ---------------------------------------------------------*/
|
/* Private constants ---------------------------------------------------------*/
|
||||||
|
/** @defgroup DCMI_Private_Constants DCMI Private Constants
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define DCMI_MIS_INDEX ((uint32_t)0x1000) /*!< DCMI MIS register index */
|
||||||
|
#define DCMI_SR_INDEX ((uint32_t)0x2000) /*!< DCMI SR register index */
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
/* Private macro -------------------------------------------------------------*/
|
/* Private macro -------------------------------------------------------------*/
|
||||||
/** @defgroup DCMI_Private_Macros DCMI Private Macros
|
/** @defgroup DCMI_Private_Macros DCMI Private Macros
|
||||||
* @{
|
* @{
|
||||||
|
@ -514,7 +526,7 @@ uint32_t HAL_DCMI_GetError(DCMI_HandleTypeDef *hdcmi);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,27 +2,27 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_dcmi_ex.c
|
* @file stm32f4xx_hal_dcmi_ex.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief DCMI Extension HAL module driver.
|
* @brief DCMI Extension HAL module driver
|
||||||
* This file provides firmware functions to manage the following
|
* This file provides firmware functions to manage the following
|
||||||
* functionalities of DCMI extension peripheral:
|
* functionalities of DCMI extension peripheral:
|
||||||
* + Extension features functions
|
* + Extension features functions
|
||||||
*
|
*
|
||||||
@verbatim
|
@verbatim
|
||||||
==============================================================================
|
==============================================================================
|
||||||
##### DCMI peripheral extension features #####
|
##### DCMI peripheral extension features #####
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
[..] Comparing to other previous devices, the DCMI interface for STM32F446xx
|
[..] Comparing to other previous devices, the DCMI interface for STM32F446xx
|
||||||
devices contains the following additional features :
|
devices contains the following additional features :
|
||||||
|
|
||||||
(+) Support of Black and White cameras
|
(+) Support of Black and White cameras
|
||||||
|
|
||||||
##### How to use this driver #####
|
##### How to use this driver #####
|
||||||
==============================================================================
|
==============================================================================
|
||||||
[..] This driver provides functions to manage the Black and White feature
|
[..] This driver provides functions to manage the Black and White feature
|
||||||
|
|
||||||
@endverbatim
|
@endverbatim
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "stm32f4xx_hal.h"
|
#include "stm32f4xx_hal.h"
|
||||||
|
@ -86,15 +86,15 @@
|
||||||
@verbatim
|
@verbatim
|
||||||
===============================================================================
|
===============================================================================
|
||||||
##### Initialization and Configuration functions #####
|
##### Initialization and Configuration functions #####
|
||||||
===============================================================================
|
===============================================================================
|
||||||
[..] This section provides functions allowing to:
|
[..] This section provides functions allowing to:
|
||||||
(+) Initialize and configure the DCMI
|
(+) Initialize and configure the DCMI
|
||||||
(+) De-initialize the DCMI
|
(+) De-initialize the DCMI
|
||||||
|
|
||||||
@endverbatim
|
@endverbatim
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Initializes the DCMI according to the specified
|
* @brief Initializes the DCMI according to the specified
|
||||||
* parameters in the DCMI_InitTypeDef and create the associated handle.
|
* parameters in the DCMI_InitTypeDef and create the associated handle.
|
||||||
|
@ -103,13 +103,13 @@
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_DCMI_Init(DCMI_HandleTypeDef *hdcmi)
|
HAL_StatusTypeDef HAL_DCMI_Init(DCMI_HandleTypeDef *hdcmi)
|
||||||
{
|
{
|
||||||
/* Check the DCMI peripheral state */
|
/* Check the DCMI peripheral state */
|
||||||
if(hdcmi == NULL)
|
if(hdcmi == NULL)
|
||||||
{
|
{
|
||||||
return HAL_ERROR;
|
return HAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check function parameters */
|
/* Check function parameters */
|
||||||
assert_param(IS_DCMI_ALL_INSTANCE(hdcmi->Instance));
|
assert_param(IS_DCMI_ALL_INSTANCE(hdcmi->Instance));
|
||||||
assert_param(IS_DCMI_PCKPOLARITY(hdcmi->Init.PCKPolarity));
|
assert_param(IS_DCMI_PCKPOLARITY(hdcmi->Init.PCKPolarity));
|
||||||
|
@ -129,10 +129,10 @@ HAL_StatusTypeDef HAL_DCMI_Init(DCMI_HandleTypeDef *hdcmi)
|
||||||
{
|
{
|
||||||
/* Init the low level hardware */
|
/* Init the low level hardware */
|
||||||
HAL_DCMI_MspInit(hdcmi);
|
HAL_DCMI_MspInit(hdcmi);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Change the DCMI state */
|
/* Change the DCMI state */
|
||||||
hdcmi->State = HAL_DCMI_STATE_BUSY;
|
hdcmi->State = HAL_DCMI_STATE_BUSY;
|
||||||
/* Configures the HS, VS, DE and PC polarity */
|
/* Configures the HS, VS, DE and PC polarity */
|
||||||
hdcmi->Instance->CR &= ~(DCMI_CR_PCKPOL | DCMI_CR_HSPOL | DCMI_CR_VSPOL | DCMI_CR_EDM_0 |\
|
hdcmi->Instance->CR &= ~(DCMI_CR_PCKPOL | DCMI_CR_HSPOL | DCMI_CR_VSPOL | DCMI_CR_EDM_0 |\
|
||||||
DCMI_CR_EDM_1 | DCMI_CR_FCRC_0 | DCMI_CR_FCRC_1 | DCMI_CR_JPEG |\
|
DCMI_CR_EDM_1 | DCMI_CR_FCRC_0 | DCMI_CR_FCRC_1 | DCMI_CR_JPEG |\
|
||||||
|
@ -154,19 +154,19 @@ HAL_StatusTypeDef HAL_DCMI_Init(DCMI_HandleTypeDef *hdcmi)
|
||||||
);
|
);
|
||||||
if(hdcmi->Init.SynchroMode == DCMI_SYNCHRO_EMBEDDED)
|
if(hdcmi->Init.SynchroMode == DCMI_SYNCHRO_EMBEDDED)
|
||||||
{
|
{
|
||||||
DCMI->ESCR = (((uint32_t)hdcmi->Init.SyncroCode.FrameStartCode) |
|
hdcmi->Instance->ESCR = (((uint32_t)hdcmi->Init.SyncroCode.FrameStartCode) |
|
||||||
((uint32_t)hdcmi->Init.SyncroCode.LineStartCode << 8U)|
|
((uint32_t)hdcmi->Init.SyncroCode.LineStartCode << DCMI_POSITION_ESCR_LSC)|
|
||||||
((uint32_t)hdcmi->Init.SyncroCode.LineEndCode << 16U) |
|
((uint32_t)hdcmi->Init.SyncroCode.LineEndCode << DCMI_POSITION_ESCR_LEC) |
|
||||||
((uint32_t)hdcmi->Init.SyncroCode.FrameEndCode << 24U));
|
((uint32_t)hdcmi->Init.SyncroCode.FrameEndCode << DCMI_POSITION_ESCR_FEC));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enable DCMI by setting DCMIEN bit */
|
/* Enable the Line, Vsync, Error and Overrun interrupts */
|
||||||
__HAL_DCMI_ENABLE(hdcmi);
|
__HAL_DCMI_ENABLE_IT(hdcmi, DCMI_IT_LINE | DCMI_IT_VSYNC | DCMI_IT_ERR | DCMI_IT_OVR);
|
||||||
|
|
||||||
/* Update error code */
|
/* Update error code */
|
||||||
hdcmi->ErrorCode = HAL_DCMI_ERROR_NONE;
|
hdcmi->ErrorCode = HAL_DCMI_ERROR_NONE;
|
||||||
|
|
||||||
/* Initialize the DCMI state*/
|
/* Initialize the DCMI state*/
|
||||||
hdcmi->State = HAL_DCMI_STATE_READY;
|
hdcmi->State = HAL_DCMI_STATE_READY;
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_dcmi_ex.h
|
* @file stm32f4xx_hal_dcmi_ex.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief Header file of DCMI Extension HAL module.
|
* @brief Header file of DCMI Extension HAL module.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
@ -81,27 +81,27 @@ typedef struct
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
uint32_t SynchroMode; /*!< Specifies the Synchronization Mode: Hardware or Embedded.
|
uint32_t SynchroMode; /*!< Specifies the Synchronization Mode: Hardware or Embedded.
|
||||||
This parameter can be a value of @ref DCMI_Synchronization_Mode */
|
This parameter can be a value of @ref DCMI_Synchronization_Mode */
|
||||||
|
|
||||||
uint32_t PCKPolarity; /*!< Specifies the Pixel clock polarity: Falling or Rising.
|
uint32_t PCKPolarity; /*!< Specifies the Pixel clock polarity: Falling or Rising.
|
||||||
This parameter can be a value of @ref DCMI_PIXCK_Polarity */
|
This parameter can be a value of @ref DCMI_PIXCK_Polarity */
|
||||||
|
|
||||||
uint32_t VSPolarity; /*!< Specifies the Vertical synchronization polarity: High or Low.
|
uint32_t VSPolarity; /*!< Specifies the Vertical synchronization polarity: High or Low.
|
||||||
This parameter can be a value of @ref DCMI_VSYNC_Polarity */
|
This parameter can be a value of @ref DCMI_VSYNC_Polarity */
|
||||||
|
|
||||||
uint32_t HSPolarity; /*!< Specifies the Horizontal synchronization polarity: High or Low.
|
uint32_t HSPolarity; /*!< Specifies the Horizontal synchronization polarity: High or Low.
|
||||||
This parameter can be a value of @ref DCMI_HSYNC_Polarity */
|
This parameter can be a value of @ref DCMI_HSYNC_Polarity */
|
||||||
|
|
||||||
uint32_t CaptureRate; /*!< Specifies the frequency of frame capture: All, 1/2 or 1/4.
|
uint32_t CaptureRate; /*!< Specifies the frequency of frame capture: All, 1/2 or 1/4.
|
||||||
This parameter can be a value of @ref DCMI_Capture_Rate */
|
This parameter can be a value of @ref DCMI_Capture_Rate */
|
||||||
|
|
||||||
uint32_t ExtendedDataMode; /*!< Specifies the data width: 8-bit, 10-bit, 12-bit or 14-bit.
|
uint32_t ExtendedDataMode; /*!< Specifies the data width: 8-bit, 10-bit, 12-bit or 14-bit.
|
||||||
This parameter can be a value of @ref DCMI_Extended_Data_Mode */
|
This parameter can be a value of @ref DCMI_Extended_Data_Mode */
|
||||||
|
|
||||||
DCMI_CodesInitTypeDef SyncroCode; /*!< Specifies the code of the frame start delimiter. */
|
DCMI_CodesInitTypeDef SyncroCode; /*!< Specifies the code of the frame start delimiter. */
|
||||||
|
|
||||||
uint32_t JPEGMode; /*!< Enable or Disable the JPEG mode.
|
uint32_t JPEGMode; /*!< Enable or Disable the JPEG mode
|
||||||
This parameter can be a value of @ref DCMI_MODE_JPEG */
|
This parameter can be a value of @ref DCMI_MODE_JPEG */
|
||||||
#if defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
#if defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
uint32_t ByteSelectMode; /*!< Specifies the data to be captured by the interface
|
uint32_t ByteSelectMode; /*!< Specifies the data to be captured by the interface
|
||||||
This parameter can be a value of @ref DCMIEx_Byte_Select_Mode */
|
This parameter can be a value of @ref DCMIEx_Byte_Select_Mode */
|
||||||
|
@ -131,10 +131,10 @@ typedef struct
|
||||||
/** @defgroup DCMIEx_Byte_Select_Mode DCMI Byte Select Mode
|
/** @defgroup DCMIEx_Byte_Select_Mode DCMI Byte Select Mode
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define DCMI_BSM_ALL ((uint32_t)0x00000000U) /*!< Interface captures all received data */
|
#define DCMI_BSM_ALL ((uint32_t)0x00000000U) /*!< Interface captures all received data */
|
||||||
#define DCMI_BSM_OTHER ((uint32_t)DCMI_CR_BSM_0) /*!< Interface captures every other byte from the received data */
|
#define DCMI_BSM_OTHER ((uint32_t)DCMI_CR_BSM_0) /*!< Interface captures every other byte from the received data */
|
||||||
#define DCMI_BSM_ALTERNATE_4 ((uint32_t)DCMI_CR_BSM_1) /*!< Interface captures one byte out of four */
|
#define DCMI_BSM_ALTERNATE_4 ((uint32_t)DCMI_CR_BSM_1) /*!< Interface captures one byte out of four */
|
||||||
#define DCMI_BSM_ALTERNATE_2 ((uint32_t)(DCMI_CR_BSM_0 | DCMI_CR_BSM_1)) /*!< Interface captures two bytes out of four */
|
#define DCMI_BSM_ALTERNATE_2 ((uint32_t)(DCMI_CR_BSM_0 | DCMI_CR_BSM_1)) /*!< Interface captures two bytes out of four */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
@ -143,7 +143,7 @@ typedef struct
|
||||||
/** @defgroup DCMIEx_Byte_Select_Start DCMI Byte Select Start
|
/** @defgroup DCMIEx_Byte_Select_Start DCMI Byte Select Start
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define DCMI_OEBS_ODD ((uint32_t)0x00000000U) /*!< Interface captures first data from the frame/line start, second one being dropped */
|
#define DCMI_OEBS_ODD ((uint32_t)0x00000000U) /*!< Interface captures first data from the frame/line start, second one being dropped */
|
||||||
#define DCMI_OEBS_EVEN ((uint32_t)DCMI_CR_OEBS) /*!< Interface captures second data from the frame/line start, first one being dropped */
|
#define DCMI_OEBS_EVEN ((uint32_t)DCMI_CR_OEBS) /*!< Interface captures second data from the frame/line start, first one being dropped */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -153,7 +153,7 @@ typedef struct
|
||||||
/** @defgroup DCMIEx_Line_Select_Mode DCMI Line Select Mode
|
/** @defgroup DCMIEx_Line_Select_Mode DCMI Line Select Mode
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define DCMI_LSM_ALL ((uint32_t)0x00000000U) /*!< Interface captures all received lines */
|
#define DCMI_LSM_ALL ((uint32_t)0x00000000U) /*!< Interface captures all received lines */
|
||||||
#define DCMI_LSM_ALTERNATE_2 ((uint32_t)DCMI_CR_LSM) /*!< Interface captures one line out of two */
|
#define DCMI_LSM_ALTERNATE_2 ((uint32_t)DCMI_CR_LSM) /*!< Interface captures one line out of two */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -163,7 +163,7 @@ typedef struct
|
||||||
/** @defgroup DCMIEx_Line_Select_Start DCMI Line Select Start
|
/** @defgroup DCMIEx_Line_Select_Start DCMI Line Select Start
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define DCMI_OELS_ODD ((uint32_t)0x00000000U) /*!< Interface captures first line from the frame start, second one being dropped */
|
#define DCMI_OELS_ODD ((uint32_t)0x00000000U) /*!< Interface captures first line from the frame start, second one being dropped */
|
||||||
#define DCMI_OELS_EVEN ((uint32_t)DCMI_CR_OELS) /*!< Interface captures second line from the frame start, first one being dropped */
|
#define DCMI_OELS_EVEN ((uint32_t)DCMI_CR_OELS) /*!< Interface captures second line from the frame start, first one being dropped */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -173,14 +173,19 @@ typedef struct
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
#endif /* STM32F446xx || STM32F469xx || STM32F479xx */
|
||||||
|
|
||||||
/* Exported macro ------------------------------------------------------------*/
|
/* Exported macro ------------------------------------------------------------*/
|
||||||
/* Exported functions --------------------------------------------------------*/
|
/* Exported functions --------------------------------------------------------*/
|
||||||
/* Private types -------------------------------------------------------------*/
|
/* Private types -------------------------------------------------------------*/
|
||||||
/* Private variables ---------------------------------------------------------*/
|
/* Private variables ---------------------------------------------------------*/
|
||||||
/* Private constants ---------------------------------------------------------*/
|
/* Private constants ---------------------------------------------------------*/
|
||||||
/* Private macro -------------------------------------------------------------*/
|
#define DCMI_POSITION_ESCR_LSC (uint32_t)POSITION_VAL(DCMI_ESCR_LSC) /*!< Required left shift to set line start delimiter */
|
||||||
|
#define DCMI_POSITION_ESCR_LEC (uint32_t)POSITION_VAL(DCMI_ESCR_LEC) /*!< Required left shift to set line end delimiter */
|
||||||
|
#define DCMI_POSITION_ESCR_FEC (uint32_t)POSITION_VAL(DCMI_ESCR_FEC) /*!< Required left shift to set frame end delimiter */
|
||||||
|
|
||||||
|
/* Private macro -------------------------------------------------------------*/
|
||||||
|
#if defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
/** @defgroup DCMIEx_Private_Macros DCMI Extended Private Macros
|
/** @defgroup DCMIEx_Private_Macros DCMI Extended Private Macros
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
@ -206,10 +211,12 @@ typedef struct
|
||||||
#endif /* STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
#endif /* STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
||||||
STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx ||\
|
STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx ||\
|
||||||
STM32F479xx */
|
STM32F479xx */
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_def.h
|
* @file stm32f4xx_hal_def.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief This file contains HAL common defines, enumeration, macros and
|
* @brief This file contains HAL common defines, enumeration, macros and
|
||||||
* structures definitions.
|
* structures definitions.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,691 @@
|
||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file stm32f4xx_hal_dfsdm.h
|
||||||
|
* @author MCD Application Team
|
||||||
|
* @version V1.5.0
|
||||||
|
* @date 06-May-2016
|
||||||
|
* @brief Header file of DFSDM HAL module.
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT(c) 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:
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
|
* and/or other materials provided with the distribution.
|
||||||
|
* 3. Neither the name of STMicroelectronics nor the names of its contributors
|
||||||
|
* may be used to endorse or promote products derived from this software
|
||||||
|
* without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* 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
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
|
#ifndef __STM32F4xx_HAL_DFSDM_H
|
||||||
|
#define __STM32F4xx_HAL_DFSDM_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx)
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "stm32f4xx_hal_def.h"
|
||||||
|
|
||||||
|
/** @addtogroup STM32F4xx_HAL_Driver
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup DFSDM
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Exported types ------------------------------------------------------------*/
|
||||||
|
/** @defgroup DFSDM_Exported_Types DFSDM Exported Types
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief HAL DFSDM Channel states definition
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
HAL_DFSDM_CHANNEL_STATE_RESET = 0x00U, /*!< DFSDM channel not initialized */
|
||||||
|
HAL_DFSDM_CHANNEL_STATE_READY = 0x01U, /*!< DFSDM channel initialized and ready for use */
|
||||||
|
HAL_DFSDM_CHANNEL_STATE_ERROR = 0xFFU /*!< DFSDM channel state error */
|
||||||
|
}HAL_DFSDM_Channel_StateTypeDef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief DFSDM channel output clock structure definition
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
FunctionalState Activation; /*!< Output clock enable/disable */
|
||||||
|
uint32_t Selection; /*!< Output clock is system clock or audio clock.
|
||||||
|
This parameter can be a value of @ref DFSDM_Channel_OuputClock */
|
||||||
|
uint32_t Divider; /*!< Output clock divider.
|
||||||
|
This parameter must be a number between Min_Data = 2 and Max_Data = 256 */
|
||||||
|
}DFSDM_Channel_OutputClockTypeDef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief DFSDM channel input structure definition
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
uint32_t Multiplexer; /*!< Input is external serial inputs or internal register.
|
||||||
|
This parameter can be a value of @ref DFSDM_Channel_InputMultiplexer */
|
||||||
|
uint32_t DataPacking; /*!< Standard, interleaved or dual mode for internal register.
|
||||||
|
This parameter can be a value of @ref DFSDM_Channel_DataPacking */
|
||||||
|
uint32_t Pins; /*!< Input pins are taken from same or following channel.
|
||||||
|
This parameter can be a value of @ref DFSDM_Channel_InputPins */
|
||||||
|
}DFSDM_Channel_InputTypeDef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief DFSDM channel serial interface structure definition
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
uint32_t Type; /*!< SPI or Manchester modes.
|
||||||
|
This parameter can be a value of @ref DFSDM_Channel_SerialInterfaceType */
|
||||||
|
uint32_t SpiClock; /*!< SPI clock select (external or internal with different sampling point).
|
||||||
|
This parameter can be a value of @ref DFSDM_Channel_SpiClock */
|
||||||
|
}DFSDM_Channel_SerialInterfaceTypeDef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief DFSDM channel analog watchdog structure definition
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
uint32_t FilterOrder; /*!< Analog watchdog Sinc filter order.
|
||||||
|
This parameter can be a value of @ref DFSDM_Channel_AwdFilterOrder */
|
||||||
|
uint32_t Oversampling; /*!< Analog watchdog filter oversampling ratio.
|
||||||
|
This parameter must be a number between Min_Data = 1 and Max_Data = 32 */
|
||||||
|
}DFSDM_Channel_AwdTypeDef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief DFSDM channel init structure definition
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
DFSDM_Channel_OutputClockTypeDef OutputClock; /*!< DFSDM channel output clock parameters */
|
||||||
|
DFSDM_Channel_InputTypeDef Input; /*!< DFSDM channel input parameters */
|
||||||
|
DFSDM_Channel_SerialInterfaceTypeDef SerialInterface; /*!< DFSDM channel serial interface parameters */
|
||||||
|
DFSDM_Channel_AwdTypeDef Awd; /*!< DFSDM channel analog watchdog parameters */
|
||||||
|
int32_t Offset; /*!< DFSDM channel offset.
|
||||||
|
This parameter must be a number between Min_Data = -8388608 and Max_Data = 8388607 */
|
||||||
|
uint32_t RightBitShift; /*!< DFSDM channel right bit shift.
|
||||||
|
This parameter must be a number between Min_Data = 0x00 and Max_Data = 0x1F */
|
||||||
|
}DFSDM_Channel_InitTypeDef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief DFSDM channel handle structure definition
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
DFSDM_Channel_TypeDef *Instance; /*!< DFSDM channel instance */
|
||||||
|
DFSDM_Channel_InitTypeDef Init; /*!< DFSDM channel init parameters */
|
||||||
|
HAL_DFSDM_Channel_StateTypeDef State; /*!< DFSDM channel state */
|
||||||
|
}DFSDM_Channel_HandleTypeDef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief HAL DFSDM Filter states definition
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
HAL_DFSDM_FILTER_STATE_RESET = 0x00U, /*!< DFSDM filter not initialized */
|
||||||
|
HAL_DFSDM_FILTER_STATE_READY = 0x01U, /*!< DFSDM filter initialized and ready for use */
|
||||||
|
HAL_DFSDM_FILTER_STATE_REG = 0x02U, /*!< DFSDM filter regular conversion in progress */
|
||||||
|
HAL_DFSDM_FILTER_STATE_INJ = 0x03U, /*!< DFSDM filter injected conversion in progress */
|
||||||
|
HAL_DFSDM_FILTER_STATE_REG_INJ = 0x04U, /*!< DFSDM filter regular and injected conversions in progress */
|
||||||
|
HAL_DFSDM_FILTER_STATE_ERROR = 0xFFU /*!< DFSDM filter state error */
|
||||||
|
}HAL_DFSDM_Filter_StateTypeDef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief DFSDM filter regular conversion parameters structure definition
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
uint32_t Trigger; /*!< Trigger used to start regular conversion: software or synchronous.
|
||||||
|
This parameter can be a value of @ref DFSDM_Filter_Trigger */
|
||||||
|
FunctionalState FastMode; /*!< Enable/disable fast mode for regular conversion */
|
||||||
|
FunctionalState DmaMode; /*!< Enable/disable DMA for regular conversion */
|
||||||
|
}DFSDM_Filter_RegularParamTypeDef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief DFSDM filter injected conversion parameters structure definition
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
uint32_t Trigger; /*!< Trigger used to start injected conversion: software, external or synchronous.
|
||||||
|
This parameter can be a value of @ref DFSDM_Filter_Trigger */
|
||||||
|
FunctionalState ScanMode; /*!< Enable/disable scanning mode for injected conversion */
|
||||||
|
FunctionalState DmaMode; /*!< Enable/disable DMA for injected conversion */
|
||||||
|
uint32_t ExtTrigger; /*!< External trigger.
|
||||||
|
This parameter can be a value of @ref DFSDM_Filter_ExtTrigger */
|
||||||
|
uint32_t ExtTriggerEdge; /*!< External trigger edge: rising, falling or both.
|
||||||
|
This parameter can be a value of @ref DFSDM_Filter_ExtTriggerEdge */
|
||||||
|
}DFSDM_Filter_InjectedParamTypeDef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief DFSDM filter parameters structure definition
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
uint32_t SincOrder; /*!< Sinc filter order.
|
||||||
|
This parameter can be a value of @ref DFSDM_Filter_SincOrder */
|
||||||
|
uint32_t Oversampling; /*!< Filter oversampling ratio.
|
||||||
|
This parameter must be a number between Min_Data = 1 and Max_Data = 1024 */
|
||||||
|
uint32_t IntOversampling; /*!< Integrator oversampling ratio.
|
||||||
|
This parameter must be a number between Min_Data = 1 and Max_Data = 256 */
|
||||||
|
}DFSDM_Filter_FilterParamTypeDef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief DFSDM filter init structure definition
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
DFSDM_Filter_RegularParamTypeDef RegularParam; /*!< DFSDM regular conversion parameters */
|
||||||
|
DFSDM_Filter_InjectedParamTypeDef InjectedParam; /*!< DFSDM injected conversion parameters */
|
||||||
|
DFSDM_Filter_FilterParamTypeDef FilterParam; /*!< DFSDM filter parameters */
|
||||||
|
}DFSDM_Filter_InitTypeDef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief DFSDM filter handle structure definition
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
DFSDM_Filter_TypeDef *Instance; /*!< DFSDM filter instance */
|
||||||
|
DFSDM_Filter_InitTypeDef Init; /*!< DFSDM filter init parameters */
|
||||||
|
DMA_HandleTypeDef *hdmaReg; /*!< Pointer on DMA handler for regular conversions */
|
||||||
|
DMA_HandleTypeDef *hdmaInj; /*!< Pointer on DMA handler for injected conversions */
|
||||||
|
uint32_t RegularContMode; /*!< Regular conversion continuous mode */
|
||||||
|
uint32_t RegularTrigger; /*!< Trigger used for regular conversion */
|
||||||
|
uint32_t InjectedTrigger; /*!< Trigger used for injected conversion */
|
||||||
|
uint32_t ExtTriggerEdge; /*!< Rising, falling or both edges selected */
|
||||||
|
FunctionalState InjectedScanMode; /*!< Injected scanning mode */
|
||||||
|
uint32_t InjectedChannelsNbr; /*!< Number of channels in injected sequence */
|
||||||
|
uint32_t InjConvRemaining; /*!< Injected conversions remaining */
|
||||||
|
HAL_DFSDM_Filter_StateTypeDef State; /*!< DFSDM filter state */
|
||||||
|
uint32_t ErrorCode; /*!< DFSDM filter error code */
|
||||||
|
}DFSDM_Filter_HandleTypeDef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief DFSDM filter analog watchdog parameters structure definition
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
uint32_t DataSource; /*!< Values from digital filter or from channel watchdog filter.
|
||||||
|
This parameter can be a value of @ref DFSDM_Filter_AwdDataSource */
|
||||||
|
uint32_t Channel; /*!< Analog watchdog channel selection.
|
||||||
|
This parameter can be a values combination of @ref DFSDM_Channel_Selection */
|
||||||
|
int32_t HighThreshold; /*!< High threshold for the analog watchdog.
|
||||||
|
This parameter must be a number between Min_Data = -8388608 and Max_Data = 8388607 */
|
||||||
|
int32_t LowThreshold; /*!< Low threshold for the analog watchdog.
|
||||||
|
This parameter must be a number between Min_Data = -8388608 and Max_Data = 8388607 */
|
||||||
|
uint32_t HighBreakSignal; /*!< Break signal assigned to analog watchdog high threshold event.
|
||||||
|
This parameter can be a values combination of @ref DFSDM_BreakSignals */
|
||||||
|
uint32_t LowBreakSignal; /*!< Break signal assigned to analog watchdog low threshold event.
|
||||||
|
This parameter can be a values combination of @ref DFSDM_BreakSignals */
|
||||||
|
}DFSDM_Filter_AwdParamTypeDef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
/* End of exported types -----------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Exported constants --------------------------------------------------------*/
|
||||||
|
/** @defgroup DFSDM_Exported_Constants DFSDM Exported Constants
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup DFSDM_Channel_OuputClock DFSDM channel output clock selection
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define DFSDM_CHANNEL_OUTPUT_CLOCK_SYSTEM ((uint32_t)0x00000000U) /*!< Source for ouput clock is system clock */
|
||||||
|
#define DFSDM_CHANNEL_OUTPUT_CLOCK_AUDIO DFSDM_CHCFGR1_CKOUTSRC /*!< Source for ouput clock is audio clock */
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup DFSDM_Channel_InputMultiplexer DFSDM channel input multiplexer
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define DFSDM_CHANNEL_EXTERNAL_INPUTS ((uint32_t)0x00000000U) /*!< Data are taken from external inputs */
|
||||||
|
#define DFSDM_CHANNEL_INTERNAL_REGISTER DFSDM_CHCFGR1_DATMPX_1 /*!< Data are taken from internal register */
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup DFSDM_Channel_DataPacking DFSDM channel input data packing
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define DFSDM_CHANNEL_STANDARD_MODE ((uint32_t)0x00000000U) /*!< Standard data packing mode */
|
||||||
|
#define DFSDM_CHANNEL_INTERLEAVED_MODE DFSDM_CHCFGR1_DATPACK_0 /*!< Interleaved data packing mode */
|
||||||
|
#define DFSDM_CHANNEL_DUAL_MODE DFSDM_CHCFGR1_DATPACK_1 /*!< Dual data packing mode */
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup DFSDM_Channel_InputPins DFSDM channel input pins
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define DFSDM_CHANNEL_SAME_CHANNEL_PINS ((uint32_t)0x00000000U) /*!< Input from pins on same channel */
|
||||||
|
#define DFSDM_CHANNEL_FOLLOWING_CHANNEL_PINS DFSDM_CHCFGR1_CHINSEL /*!< Input from pins on following channel */
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup DFSDM_Channel_SerialInterfaceType DFSDM channel serial interface type
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define DFSDM_CHANNEL_SPI_RISING ((uint32_t)0x00000000U) /*!< SPI with rising edge */
|
||||||
|
#define DFSDM_CHANNEL_SPI_FALLING DFSDM_CHCFGR1_SITP_0 /*!< SPI with falling edge */
|
||||||
|
#define DFSDM_CHANNEL_MANCHESTER_RISING DFSDM_CHCFGR1_SITP_1 /*!< Manchester with rising edge */
|
||||||
|
#define DFSDM_CHANNEL_MANCHESTER_FALLING DFSDM_CHCFGR1_SITP /*!< Manchester with falling edge */
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup DFSDM_Channel_SpiClock DFSDM channel SPI clock selection
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define DFSDM_CHANNEL_SPI_CLOCK_EXTERNAL ((uint32_t)0x00000000U) /*!< External SPI clock */
|
||||||
|
#define DFSDM_CHANNEL_SPI_CLOCK_INTERNAL DFSDM_CHCFGR1_SPICKSEL_0 /*!< Internal SPI clock */
|
||||||
|
#define DFSDM_CHANNEL_SPI_CLOCK_INTERNAL_DIV2_FALLING DFSDM_CHCFGR1_SPICKSEL_1 /*!< Internal SPI clock divided by 2, falling edge */
|
||||||
|
#define DFSDM_CHANNEL_SPI_CLOCK_INTERNAL_DIV2_RISING DFSDM_CHCFGR1_SPICKSEL /*!< Internal SPI clock divided by 2, rising edge */
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup DFSDM_Channel_AwdFilterOrder DFSDM channel analog watchdog filter order
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define DFSDM_CHANNEL_FASTSINC_ORDER ((uint32_t)0x00000000U) /*!< FastSinc filter type */
|
||||||
|
#define DFSDM_CHANNEL_SINC1_ORDER DFSDM_CHAWSCDR_AWFORD_0 /*!< Sinc 1 filter type */
|
||||||
|
#define DFSDM_CHANNEL_SINC2_ORDER DFSDM_CHAWSCDR_AWFORD_1 /*!< Sinc 2 filter type */
|
||||||
|
#define DFSDM_CHANNEL_SINC3_ORDER DFSDM_CHAWSCDR_AWFORD /*!< Sinc 3 filter type */
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup DFSDM_Filter_Trigger DFSDM filter conversion trigger
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define DFSDM_FILTER_SW_TRIGGER ((uint32_t)0x00000000U) /*!< Software trigger */
|
||||||
|
#define DFSDM_FILTER_SYNC_TRIGGER ((uint32_t)0x00000001U) /*!< Synchronous with DFSDM_FLT0 */
|
||||||
|
#define DFSDM_FILTER_EXT_TRIGGER ((uint32_t)0x00000002U) /*!< External trigger (only for injected conversion) */
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup DFSDM_Filter_ExtTrigger DFSDM filter external trigger
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define DFSDM_FILTER_EXT_TRIG_TIM1_TRGO ((uint32_t)0x00000000U) /*!< For DFSDM filter 0 and 1*/
|
||||||
|
#define DFSDM_FILTER_EXT_TRIG_TIM3_TRGO DFSDM_FLTCR1_JEXTSEL_0 /*!< For DFSDM filter 0 and 1*/
|
||||||
|
#define DFSDM_FILTER_EXT_TRIG_TIM8_TRGO DFSDM_FLTCR1_JEXTSEL_1 /*!< For DFSDM filter 0 and 1*/
|
||||||
|
#define DFSDM_FILTER_EXT_TRIG_TIM10_OC1 (DFSDM_FLTCR1_JEXTSEL_0 | DFSDM_FLTCR1_JEXTSEL_1) /*!< For DFSDM filter 0 and 1*/
|
||||||
|
#define DFSDM_FILTER_EXT_TRIG_TIM4_TRGO DFSDM_FLTCR1_JEXTSEL_2 /*!< For DFSDM filter 0 and 1*/
|
||||||
|
#define DFSDM_FILTER_EXT_TRIG_TIM6_TRGO (DFSDM_FLTCR1_JEXTSEL_0 | DFSDM_FLTCR1_JEXTSEL_2) /*!< For DFSDM filter 0 and 1*/
|
||||||
|
#define DFSDM_FILTER_EXT_TRIG_EXTI11 (DFSDM_FLTCR1_JEXTSEL_1 | DFSDM_FLTCR1_JEXTSEL_2) /*!< For DFSDM filter 0 and 1*/
|
||||||
|
#define DFSDM_FILTER_EXT_TRIG_EXTI15 DFSDM_FLTCR1_JEXTSEL /*!< For DFSDM filter 0 and 1*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup DFSDM_Filter_ExtTriggerEdge DFSDM filter external trigger edge
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define DFSDM_FILTER_EXT_TRIG_RISING_EDGE DFSDM_FLTCR1_JEXTEN_0 /*!< External rising edge */
|
||||||
|
#define DFSDM_FILTER_EXT_TRIG_FALLING_EDGE DFSDM_FLTCR1_JEXTEN_1 /*!< External falling edge */
|
||||||
|
#define DFSDM_FILTER_EXT_TRIG_BOTH_EDGES DFSDM_FLTCR1_JEXTEN /*!< External rising and falling edges */
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup DFSDM_Filter_SincOrder DFSDM filter sinc order
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define DFSDM_FILTER_FASTSINC_ORDER ((uint32_t)0x00000000U) /*!< FastSinc filter type */
|
||||||
|
#define DFSDM_FILTER_SINC1_ORDER DFSDM_FLTFCR_FORD_0 /*!< Sinc 1 filter type */
|
||||||
|
#define DFSDM_FILTER_SINC2_ORDER DFSDM_FLTFCR_FORD_1 /*!< Sinc 2 filter type */
|
||||||
|
#define DFSDM_FILTER_SINC3_ORDER (DFSDM_FLTFCR_FORD_0 | DFSDM_FLTFCR_FORD_1) /*!< Sinc 3 filter type */
|
||||||
|
#define DFSDM_FILTER_SINC4_ORDER DFSDM_FLTFCR_FORD_2 /*!< Sinc 4 filter type */
|
||||||
|
#define DFSDM_FILTER_SINC5_ORDER (DFSDM_FLTFCR_FORD_0 | DFSDM_FLTFCR_FORD_2) /*!< Sinc 5 filter type */
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup DFSDM_Filter_AwdDataSource DFSDM filter analog watchdog data source
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define DFSDM_FILTER_AWD_FILTER_DATA ((uint32_t)0x00000000U) /*!< From digital filter */
|
||||||
|
#define DFSDM_FILTER_AWD_CHANNEL_DATA DFSDM_FLTCR1_AWFSEL /*!< From analog watchdog channel */
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup DFSDM_Filter_ErrorCode DFSDM filter error code
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define DFSDM_FILTER_ERROR_NONE ((uint32_t)0x00000000U) /*!< No error */
|
||||||
|
#define DFSDM_FILTER_ERROR_REGULAR_OVERRUN ((uint32_t)0x00000001U) /*!< Overrun occurs during regular conversion */
|
||||||
|
#define DFSDM_FILTER_ERROR_INJECTED_OVERRUN ((uint32_t)0x00000002U) /*!< Overrun occurs during injected conversion */
|
||||||
|
#define DFSDM_FILTER_ERROR_DMA ((uint32_t)0x00000003U) /*!< DMA error occurs */
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup DFSDM_BreakSignals DFSDM break signals
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define DFSDM_NO_BREAK_SIGNAL ((uint32_t)0x00000000U) /*!< No break signal */
|
||||||
|
#define DFSDM_BREAK_SIGNAL_0 ((uint32_t)0x00000001U) /*!< Break signal 0 */
|
||||||
|
#define DFSDM_BREAK_SIGNAL_1 ((uint32_t)0x00000002U) /*!< Break signal 1 */
|
||||||
|
#define DFSDM_BREAK_SIGNAL_2 ((uint32_t)0x00000004U) /*!< Break signal 2 */
|
||||||
|
#define DFSDM_BREAK_SIGNAL_3 ((uint32_t)0x00000008U) /*!< Break signal 3 */
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup DFSDM_Channel_Selection DFSDM Channel Selection
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/* DFSDM Channels ------------------------------------------------------------*/
|
||||||
|
/* The DFSDM channels are defined as follows:
|
||||||
|
- in 16-bit LSB the channel mask is set
|
||||||
|
- in 16-bit MSB the channel number is set
|
||||||
|
e.g. for channel 3 definition:
|
||||||
|
- the channel mask is 0x00000008U (bit 3 is set)
|
||||||
|
- the channel number 3 is 0x00030000
|
||||||
|
--> Consequently, channel 3 definition is 0x00000008U | 0x00030000 = 0x00030008 */
|
||||||
|
#define DFSDM_CHANNEL_0 ((uint32_t)0x00000001U)
|
||||||
|
#define DFSDM_CHANNEL_1 ((uint32_t)0x00010002U)
|
||||||
|
#define DFSDM_CHANNEL_2 ((uint32_t)0x00020004U)
|
||||||
|
#define DFSDM_CHANNEL_3 ((uint32_t)0x00030008U)
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup DFSDM_ContinuousMode DFSDM Continuous Mode
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define DFSDM_CONTINUOUS_CONV_OFF ((uint32_t)0x00000000U) /*!< Conversion are not continuous */
|
||||||
|
#define DFSDM_CONTINUOUS_CONV_ON ((uint32_t)0x00000001U) /*!< Conversion are continuous */
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup DFSDM_AwdThreshold DFSDM analog watchdog threshold
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define DFSDM_AWD_HIGH_THRESHOLD ((uint32_t)0x00000000U) /*!< Analog watchdog high threshold */
|
||||||
|
#define DFSDM_AWD_LOW_THRESHOLD ((uint32_t)0x00000001U) /*!< Analog watchdog low threshold */
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
/* End of exported constants -------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Exported macros -----------------------------------------------------------*/
|
||||||
|
/** @defgroup DFSDM_Exported_Macros DFSDM Exported Macros
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @brief Reset DFSDM channel handle state.
|
||||||
|
* @param __HANDLE__: DFSDM channel handle.
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
#define __HAL_DFSDM_CHANNEL_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_DFSDM_CHANNEL_STATE_RESET)
|
||||||
|
|
||||||
|
/** @brief Reset DFSDM filter handle state.
|
||||||
|
* @param __HANDLE__: DFSDM filter handle.
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
#define __HAL_DFSDM_FILTER_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_DFSDM_FILTER_STATE_RESET)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
/* End of exported macros ----------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Exported functions --------------------------------------------------------*/
|
||||||
|
/** @addtogroup DFSDM_Exported_Functions DFSDM Exported Functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup DFSDM_Exported_Functions_Group1_Channel Channel initialization and de-initialization functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/* Channel initialization and de-initialization functions *********************/
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_ChannelInit(DFSDM_Channel_HandleTypeDef *hdfsdm_channel);
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_ChannelDeInit(DFSDM_Channel_HandleTypeDef *hdfsdm_channel);
|
||||||
|
void HAL_DFSDM_ChannelMspInit(DFSDM_Channel_HandleTypeDef *hdfsdm_channel);
|
||||||
|
void HAL_DFSDM_ChannelMspDeInit(DFSDM_Channel_HandleTypeDef *hdfsdm_channel);
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup DFSDM_Exported_Functions_Group2_Channel Channel operation functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/* Channel operation functions ************************************************/
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_ChannelCkabStart(DFSDM_Channel_HandleTypeDef *hdfsdm_channel);
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_ChannelCkabStart_IT(DFSDM_Channel_HandleTypeDef *hdfsdm_channel);
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_ChannelCkabStop(DFSDM_Channel_HandleTypeDef *hdfsdm_channel);
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_ChannelCkabStop_IT(DFSDM_Channel_HandleTypeDef *hdfsdm_channel);
|
||||||
|
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_ChannelScdStart(DFSDM_Channel_HandleTypeDef *hdfsdm_channel, uint32_t Threshold, uint32_t BreakSignal);
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_ChannelScdStart_IT(DFSDM_Channel_HandleTypeDef *hdfsdm_channel, uint32_t Threshold, uint32_t BreakSignal);
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_ChannelScdStop(DFSDM_Channel_HandleTypeDef *hdfsdm_channel);
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_ChannelScdStop_IT(DFSDM_Channel_HandleTypeDef *hdfsdm_channel);
|
||||||
|
|
||||||
|
int16_t HAL_DFSDM_ChannelGetAwdValue(DFSDM_Channel_HandleTypeDef *hdfsdm_channel);
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_ChannelModifyOffset(DFSDM_Channel_HandleTypeDef *hdfsdm_channel, int32_t Offset);
|
||||||
|
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_ChannelPollForCkab(DFSDM_Channel_HandleTypeDef *hdfsdm_channel, uint32_t Timeout);
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_ChannelPollForScd(DFSDM_Channel_HandleTypeDef *hdfsdm_channel, uint32_t Timeout);
|
||||||
|
|
||||||
|
void HAL_DFSDM_ChannelCkabCallback(DFSDM_Channel_HandleTypeDef *hdfsdm_channel);
|
||||||
|
void HAL_DFSDM_ChannelScdCallback(DFSDM_Channel_HandleTypeDef *hdfsdm_channel);
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup DFSDM_Exported_Functions_Group3_Channel Channel state function
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/* Channel state function *****************************************************/
|
||||||
|
HAL_DFSDM_Channel_StateTypeDef HAL_DFSDM_ChannelGetState(DFSDM_Channel_HandleTypeDef *hdfsdm_channel);
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup DFSDM_Exported_Functions_Group1_Filter Filter initialization and de-initialization functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/* Filter initialization and de-initialization functions *********************/
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_FilterInit(DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_FilterDeInit(DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
|
||||||
|
void HAL_DFSDM_FilterMspInit(DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
|
||||||
|
void HAL_DFSDM_FilterMspDeInit(DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup DFSDM_Exported_Functions_Group2_Filter Filter control functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/* Filter control functions *********************/
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_FilterConfigRegChannel(DFSDM_Filter_HandleTypeDef *hdfsdm_filter,
|
||||||
|
uint32_t Channel,
|
||||||
|
uint32_t ContinuousMode);
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_FilterConfigInjChannel(DFSDM_Filter_HandleTypeDef *hdfsdm_filter,
|
||||||
|
uint32_t Channel);
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup DFSDM_Exported_Functions_Group3_Filter Filter operation functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/* Filter operation functions *********************/
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_FilterRegularStart(DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_FilterRegularStart_IT(DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_FilterRegularStart_DMA(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, int32_t *pData, uint32_t Length);
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_FilterRegularMsbStart_DMA(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, int16_t *pData, uint32_t Length);
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_FilterRegularStop(DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_FilterRegularStop_IT(DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_FilterRegularStop_DMA(DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_FilterInjectedStart(DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_FilterInjectedStart_IT(DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_FilterInjectedStart_DMA(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, int32_t *pData, uint32_t Length);
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_FilterInjectedMsbStart_DMA(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, int16_t *pData, uint32_t Length);
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_FilterInjectedStop(DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_FilterInjectedStop_IT(DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_FilterInjectedStop_DMA(DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_FilterAwdStart_IT(DFSDM_Filter_HandleTypeDef *hdfsdm_filter,
|
||||||
|
DFSDM_Filter_AwdParamTypeDef* awdParam);
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_FilterAwdStop_IT(DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_FilterExdStart(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t Channel);
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_FilterExdStop(DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
|
||||||
|
|
||||||
|
int32_t HAL_DFSDM_FilterGetRegularValue(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t* Channel);
|
||||||
|
int32_t HAL_DFSDM_FilterGetInjectedValue(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t* Channel);
|
||||||
|
int32_t HAL_DFSDM_FilterGetExdMaxValue(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t* Channel);
|
||||||
|
int32_t HAL_DFSDM_FilterGetExdMinValue(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t* Channel);
|
||||||
|
uint32_t HAL_DFSDM_FilterGetConvTimeValue(DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
|
||||||
|
|
||||||
|
void HAL_DFSDM_IRQHandler(DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
|
||||||
|
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_FilterPollForRegConversion(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t Timeout);
|
||||||
|
HAL_StatusTypeDef HAL_DFSDM_FilterPollForInjConversion(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t Timeout);
|
||||||
|
|
||||||
|
void HAL_DFSDM_FilterRegConvCpltCallback(DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
|
||||||
|
void HAL_DFSDM_FilterRegConvHalfCpltCallback(DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
|
||||||
|
void HAL_DFSDM_FilterInjConvCpltCallback(DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
|
||||||
|
void HAL_DFSDM_FilterInjConvHalfCpltCallback(DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
|
||||||
|
void HAL_DFSDM_FilterAwdCallback(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t Channel, uint32_t Threshold);
|
||||||
|
void HAL_DFSDM_FilterErrorCallback(DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup DFSDM_Exported_Functions_Group4_Filter Filter state functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/* Filter state functions *****************************************************/
|
||||||
|
HAL_DFSDM_Filter_StateTypeDef HAL_DFSDM_FilterGetState(DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
|
||||||
|
uint32_t HAL_DFSDM_FilterGetError(DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
/* End of exported functions -------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Private macros ------------------------------------------------------------*/
|
||||||
|
/** @defgroup DFSDM_Private_Macros DFSDM Private Macros
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define IS_DFSDM_CHANNEL_OUTPUT_CLOCK(CLOCK) (((CLOCK) == DFSDM_CHANNEL_OUTPUT_CLOCK_SYSTEM) || \
|
||||||
|
((CLOCK) == DFSDM_CHANNEL_OUTPUT_CLOCK_AUDIO))
|
||||||
|
#define IS_DFSDM_CHANNEL_OUTPUT_CLOCK_DIVIDER(DIVIDER) ((2U <= (DIVIDER)) && ((DIVIDER) <= 256U))
|
||||||
|
#define IS_DFSDM_CHANNEL_INPUT(INPUT) (((INPUT) == DFSDM_CHANNEL_EXTERNAL_INPUTS) || \
|
||||||
|
((INPUT) == DFSDM_CHANNEL_INTERNAL_REGISTER))
|
||||||
|
#define IS_DFSDM_CHANNEL_DATA_PACKING(MODE) (((MODE) == DFSDM_CHANNEL_STANDARD_MODE) || \
|
||||||
|
((MODE) == DFSDM_CHANNEL_INTERLEAVED_MODE) || \
|
||||||
|
((MODE) == DFSDM_CHANNEL_DUAL_MODE))
|
||||||
|
#define IS_DFSDM_CHANNEL_INPUT_PINS(PINS) (((PINS) == DFSDM_CHANNEL_SAME_CHANNEL_PINS) || \
|
||||||
|
((PINS) == DFSDM_CHANNEL_FOLLOWING_CHANNEL_PINS))
|
||||||
|
#define IS_DFSDM_CHANNEL_SERIAL_INTERFACE_TYPE(MODE) (((MODE) == DFSDM_CHANNEL_SPI_RISING) || \
|
||||||
|
((MODE) == DFSDM_CHANNEL_SPI_FALLING) || \
|
||||||
|
((MODE) == DFSDM_CHANNEL_MANCHESTER_RISING) || \
|
||||||
|
((MODE) == DFSDM_CHANNEL_MANCHESTER_FALLING))
|
||||||
|
#define IS_DFSDM_CHANNEL_SPI_CLOCK(TYPE) (((TYPE) == DFSDM_CHANNEL_SPI_CLOCK_EXTERNAL) || \
|
||||||
|
((TYPE) == DFSDM_CHANNEL_SPI_CLOCK_INTERNAL) || \
|
||||||
|
((TYPE) == DFSDM_CHANNEL_SPI_CLOCK_INTERNAL_DIV2_FALLING) || \
|
||||||
|
((TYPE) == DFSDM_CHANNEL_SPI_CLOCK_INTERNAL_DIV2_RISING))
|
||||||
|
#define IS_DFSDM_CHANNEL_FILTER_ORDER(ORDER) (((ORDER) == DFSDM_CHANNEL_FASTSINC_ORDER) || \
|
||||||
|
((ORDER) == DFSDM_CHANNEL_SINC1_ORDER) || \
|
||||||
|
((ORDER) == DFSDM_CHANNEL_SINC2_ORDER) || \
|
||||||
|
((ORDER) == DFSDM_CHANNEL_SINC3_ORDER))
|
||||||
|
#define IS_DFSDM_CHANNEL_FILTER_OVS_RATIO(RATIO) ((1U <= (RATIO)) && ((RATIO) <= 32U))
|
||||||
|
#define IS_DFSDM_CHANNEL_OFFSET(VALUE) ((-8388608 <= (VALUE)) && ((VALUE) <= 8388607))
|
||||||
|
#define IS_DFSDM_CHANNEL_RIGHT_BIT_SHIFT(VALUE) ((VALUE) <= 0x1FU)
|
||||||
|
#define IS_DFSDM_CHANNEL_SCD_THRESHOLD(VALUE) ((VALUE) <= 0xFFU)
|
||||||
|
#define IS_DFSDM_FILTER_REG_TRIGGER(TRIG) (((TRIG) == DFSDM_FILTER_SW_TRIGGER) || \
|
||||||
|
((TRIG) == DFSDM_FILTER_SYNC_TRIGGER))
|
||||||
|
#define IS_DFSDM_FILTER_INJ_TRIGGER(TRIG) (((TRIG) == DFSDM_FILTER_SW_TRIGGER) || \
|
||||||
|
((TRIG) == DFSDM_FILTER_SYNC_TRIGGER) || \
|
||||||
|
((TRIG) == DFSDM_FILTER_EXT_TRIGGER))
|
||||||
|
#define IS_DFSDM_FILTER_EXT_TRIG(TRIG) (((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM1_TRGO) || \
|
||||||
|
((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM3_TRGO) || \
|
||||||
|
((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM8_TRGO) || \
|
||||||
|
((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM10_OC1) || \
|
||||||
|
((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM4_TRGO) || \
|
||||||
|
((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM6_TRGO) || \
|
||||||
|
((TRIG) == DFSDM_FILTER_EXT_TRIG_EXTI11) || \
|
||||||
|
((TRIG) == DFSDM_FILTER_EXT_TRIG_EXTI15))
|
||||||
|
#define IS_DFSDM_FILTER_EXT_TRIG_EDGE(EDGE) (((EDGE) == DFSDM_FILTER_EXT_TRIG_RISING_EDGE) || \
|
||||||
|
((EDGE) == DFSDM_FILTER_EXT_TRIG_FALLING_EDGE) || \
|
||||||
|
((EDGE) == DFSDM_FILTER_EXT_TRIG_BOTH_EDGES))
|
||||||
|
#define IS_DFSDM_FILTER_SINC_ORDER(ORDER) (((ORDER) == DFSDM_FILTER_FASTSINC_ORDER) || \
|
||||||
|
((ORDER) == DFSDM_FILTER_SINC1_ORDER) || \
|
||||||
|
((ORDER) == DFSDM_FILTER_SINC2_ORDER) || \
|
||||||
|
((ORDER) == DFSDM_FILTER_SINC3_ORDER) || \
|
||||||
|
((ORDER) == DFSDM_FILTER_SINC4_ORDER) || \
|
||||||
|
((ORDER) == DFSDM_FILTER_SINC5_ORDER))
|
||||||
|
#define IS_DFSDM_FILTER_OVS_RATIO(RATIO) ((1U <= (RATIO)) && ((RATIO) <= 1024U))
|
||||||
|
#define IS_DFSDM_FILTER_INTEGRATOR_OVS_RATIO(RATIO) ((1U <= (RATIO)) && ((RATIO) <= 256U))
|
||||||
|
#define IS_DFSDM_FILTER_AWD_DATA_SOURCE(DATA) (((DATA) == DFSDM_FILTER_AWD_FILTER_DATA) || \
|
||||||
|
((DATA) == DFSDM_FILTER_AWD_CHANNEL_DATA))
|
||||||
|
#define IS_DFSDM_FILTER_AWD_THRESHOLD(VALUE) ((-8388608 <= (VALUE)) && ((VALUE) <= 8388607))
|
||||||
|
#define IS_DFSDM_BREAK_SIGNALS(VALUE) ((VALUE) <= 0x0FU)
|
||||||
|
#define IS_DFSDM_REGULAR_CHANNEL(CHANNEL) (((CHANNEL) == DFSDM_CHANNEL_0) || \
|
||||||
|
((CHANNEL) == DFSDM_CHANNEL_1) || \
|
||||||
|
((CHANNEL) == DFSDM_CHANNEL_2) || \
|
||||||
|
((CHANNEL) == DFSDM_CHANNEL_3))
|
||||||
|
#define IS_DFSDM_INJECTED_CHANNEL(CHANNEL) (((CHANNEL) != 0U) && ((CHANNEL) <= 0x0003000FU))
|
||||||
|
#define IS_DFSDM_CONTINUOUS_MODE(MODE) (((MODE) == DFSDM_CONTINUOUS_CONV_OFF) || \
|
||||||
|
((MODE) == DFSDM_CONTINUOUS_CONV_ON))
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
/* End of private macros -----------------------------------------------------*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
#endif /* STM32F412Zx || STM32F412Vx || STM32F412Rx || STM32F412Cx */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __STM32F4xx_HAL_DFSDM_H */
|
||||||
|
|
||||||
|
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
File diff suppressed because it is too large
Load Diff
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_dma.h
|
* @file stm32f4xx_hal_dma.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief Header file of DMA HAL module.
|
* @brief Header file of DMA HAL module.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
@ -108,7 +108,7 @@ typedef struct
|
||||||
@note The burst mode is possible only if the address Increment mode is enabled. */
|
@note The burst mode is possible only if the address Increment mode is enabled. */
|
||||||
|
|
||||||
uint32_t PeriphBurst; /*!< Specifies the Burst transfer configuration for the peripheral transfers.
|
uint32_t PeriphBurst; /*!< Specifies the Burst transfer configuration for the peripheral transfers.
|
||||||
It specifies the amount of data to be transferred in a single non interruptable
|
It specifies the amount of data to be transferred in a single non interruptible
|
||||||
transaction.
|
transaction.
|
||||||
This parameter can be a value of @ref DMA_Peripheral_burst
|
This parameter can be a value of @ref DMA_Peripheral_burst
|
||||||
@note The burst mode is possible only if the address Increment mode is enabled. */
|
@note The burst mode is possible only if the address Increment mode is enabled. */
|
||||||
|
@ -122,15 +122,10 @@ typedef enum
|
||||||
{
|
{
|
||||||
HAL_DMA_STATE_RESET = 0x00U, /*!< DMA not yet initialized or disabled */
|
HAL_DMA_STATE_RESET = 0x00U, /*!< DMA not yet initialized or disabled */
|
||||||
HAL_DMA_STATE_READY = 0x01U, /*!< DMA initialized and ready for use */
|
HAL_DMA_STATE_READY = 0x01U, /*!< DMA initialized and ready for use */
|
||||||
HAL_DMA_STATE_READY_MEM0 = 0x11U, /*!< DMA Mem0 process success */
|
|
||||||
HAL_DMA_STATE_READY_MEM1 = 0x21U, /*!< DMA Mem1 process success */
|
|
||||||
HAL_DMA_STATE_READY_HALF_MEM0 = 0x31U, /*!< DMA Mem0 Half process success */
|
|
||||||
HAL_DMA_STATE_READY_HALF_MEM1 = 0x41U, /*!< DMA Mem1 Half process success */
|
|
||||||
HAL_DMA_STATE_BUSY = 0x02U, /*!< DMA process is ongoing */
|
HAL_DMA_STATE_BUSY = 0x02U, /*!< DMA process is ongoing */
|
||||||
HAL_DMA_STATE_BUSY_MEM0 = 0x12U, /*!< DMA Mem0 process is ongoing */
|
|
||||||
HAL_DMA_STATE_BUSY_MEM1 = 0x22U, /*!< DMA Mem1 process is ongoing */
|
|
||||||
HAL_DMA_STATE_TIMEOUT = 0x03U, /*!< DMA timeout state */
|
HAL_DMA_STATE_TIMEOUT = 0x03U, /*!< DMA timeout state */
|
||||||
HAL_DMA_STATE_ERROR = 0x04U /*!< DMA error state */
|
HAL_DMA_STATE_ERROR = 0x04U, /*!< DMA error state */
|
||||||
|
HAL_DMA_STATE_ABORT = 0x05U, /*!< DMA Abort state */
|
||||||
}HAL_DMA_StateTypeDef;
|
}HAL_DMA_StateTypeDef;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -142,6 +137,20 @@ typedef enum
|
||||||
HAL_DMA_HALF_TRANSFER = 0x01U /*!< Half Transfer */
|
HAL_DMA_HALF_TRANSFER = 0x01U /*!< Half Transfer */
|
||||||
}HAL_DMA_LevelCompleteTypeDef;
|
}HAL_DMA_LevelCompleteTypeDef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief HAL DMA Error Code structure definition
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
HAL_DMA_XFER_CPLT_CB_ID = 0x00U, /*!< Full transfer */
|
||||||
|
HAL_DMA_XFER_HALFCPLT_CB_ID = 0x01U, /*!< Half Transfer */
|
||||||
|
HAL_DMA_XFER_M1CPLT_CB_ID = 0x02U, /*!< M1 Full Transfer */
|
||||||
|
HAL_DMA_XFER_M1HALFCPLT_CB_ID = 0x03U, /*!< M1 Half Transfer */
|
||||||
|
HAL_DMA_XFER_ERROR_CB_ID = 0x04U, /*!< Error */
|
||||||
|
HAL_DMA_XFER_ABORT_CB_ID = 0x05U, /*!< Abort */
|
||||||
|
HAL_DMA_XFER_ALL_CB_ID = 0x06U /*!< All */
|
||||||
|
}HAL_DMA_CallbackIDTypeDef;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief DMA handle Structure definition
|
* @brief DMA handle Structure definition
|
||||||
*/
|
*/
|
||||||
|
@ -155,21 +164,26 @@ typedef struct __DMA_HandleTypeDef
|
||||||
|
|
||||||
__IO HAL_DMA_StateTypeDef State; /*!< DMA transfer state */
|
__IO HAL_DMA_StateTypeDef State; /*!< DMA transfer state */
|
||||||
|
|
||||||
void *Parent; /*!< Parent object state */
|
void *Parent; /*!< Parent object state */
|
||||||
|
|
||||||
void (* XferCpltCallback)( struct __DMA_HandleTypeDef * hdma); /*!< DMA transfer complete callback */
|
void (* XferCpltCallback)( struct __DMA_HandleTypeDef * hdma); /*!< DMA transfer complete callback */
|
||||||
|
|
||||||
void (* XferHalfCpltCallback)( struct __DMA_HandleTypeDef * hdma); /*!< DMA Half transfer complete callback */
|
void (* XferHalfCpltCallback)( struct __DMA_HandleTypeDef * hdma); /*!< DMA Half transfer complete callback */
|
||||||
|
|
||||||
void (* XferM1CpltCallback)( struct __DMA_HandleTypeDef * hdma); /*!< DMA transfer complete Memory1 callback */
|
void (* XferM1CpltCallback)( struct __DMA_HandleTypeDef * hdma); /*!< DMA transfer complete Memory1 callback */
|
||||||
|
|
||||||
|
void (* XferM1HalfCpltCallback)( struct __DMA_HandleTypeDef * hdma); /*!< DMA transfer Half complete Memory1 callback */
|
||||||
|
|
||||||
void (* XferErrorCallback)( struct __DMA_HandleTypeDef * hdma); /*!< DMA transfer error callback */
|
void (* XferErrorCallback)( struct __DMA_HandleTypeDef * hdma); /*!< DMA transfer error callback */
|
||||||
|
|
||||||
|
void (* XferAbortCallback)( struct __DMA_HandleTypeDef * hdma); /*!< DMA transfer Abort callback */
|
||||||
|
|
||||||
__IO uint32_t ErrorCode; /*!< DMA Error code */
|
__IO uint32_t ErrorCode; /*!< DMA Error code */
|
||||||
|
|
||||||
uint32_t StreamBaseAddress; /*!< DMA Stream Base Address */
|
uint32_t StreamBaseAddress; /*!< DMA Stream Base Address */
|
||||||
|
|
||||||
uint32_t StreamIndex; /*!< DMA Stream Index */
|
uint32_t StreamIndex; /*!< DMA Stream Index */
|
||||||
|
|
||||||
}DMA_HandleTypeDef;
|
}DMA_HandleTypeDef;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -187,11 +201,14 @@ typedef struct __DMA_HandleTypeDef
|
||||||
* @brief DMA Error Code
|
* @brief DMA Error Code
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define HAL_DMA_ERROR_NONE ((uint32_t)0x00000000U) /*!< No error */
|
#define HAL_DMA_ERROR_NONE ((uint32_t)0x00000000U) /*!< No error */
|
||||||
#define HAL_DMA_ERROR_TE ((uint32_t)0x00000001U) /*!< Transfer error */
|
#define HAL_DMA_ERROR_TE ((uint32_t)0x00000001U) /*!< Transfer error */
|
||||||
#define HAL_DMA_ERROR_FE ((uint32_t)0x00000002U) /*!< FIFO error */
|
#define HAL_DMA_ERROR_FE ((uint32_t)0x00000002U) /*!< FIFO error */
|
||||||
#define HAL_DMA_ERROR_DME ((uint32_t)0x00000004U) /*!< Direct Mode error */
|
#define HAL_DMA_ERROR_DME ((uint32_t)0x00000004U) /*!< Direct Mode error */
|
||||||
#define HAL_DMA_ERROR_TIMEOUT ((uint32_t)0x00000020U) /*!< Timeout error */
|
#define HAL_DMA_ERROR_TIMEOUT ((uint32_t)0x00000020U) /*!< Timeout error */
|
||||||
|
#define HAL_DMA_ERROR_PARAM ((uint32_t)0x00000040U) /*!< Parameter error */
|
||||||
|
#define HAL_DMA_ERROR_NO_XFER ((uint32_t)0x00000080U) /*!< Abort requested with no Xfer ongoing */
|
||||||
|
#define HAL_DMA_ERROR_NOT_SUPPORTED ((uint32_t)0x00000100U) /*!< Not supported mode */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
@ -221,7 +238,7 @@ typedef struct __DMA_HandleTypeDef
|
||||||
#define DMA_MEMORY_TO_MEMORY ((uint32_t)DMA_SxCR_DIR_1) /*!< Memory to memory direction */
|
#define DMA_MEMORY_TO_MEMORY ((uint32_t)DMA_SxCR_DIR_1) /*!< Memory to memory direction */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup DMA_Peripheral_incremented_mode DMA Peripheral incremented mode
|
/** @defgroup DMA_Peripheral_incremented_mode DMA Peripheral incremented mode
|
||||||
* @brief DMA peripheral incremented mode
|
* @brief DMA peripheral incremented mode
|
||||||
|
@ -326,7 +343,7 @@ typedef struct __DMA_HandleTypeDef
|
||||||
* @brief DMA peripheral burst
|
* @brief DMA peripheral burst
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define DMA_PBURST_SINGLE ((uint32_t)0x00000000U)
|
#define DMA_PBURST_SINGLE ((uint32_t)0x00000000U)
|
||||||
#define DMA_PBURST_INC4 ((uint32_t)DMA_SxCR_PBURST_0)
|
#define DMA_PBURST_INC4 ((uint32_t)DMA_SxCR_PBURST_0)
|
||||||
#define DMA_PBURST_INC8 ((uint32_t)DMA_SxCR_PBURST_1)
|
#define DMA_PBURST_INC8 ((uint32_t)DMA_SxCR_PBURST_1)
|
||||||
#define DMA_PBURST_INC16 ((uint32_t)DMA_SxCR_PBURST)
|
#define DMA_PBURST_INC16 ((uint32_t)DMA_SxCR_PBURST)
|
||||||
|
@ -654,8 +671,13 @@ HAL_StatusTypeDef HAL_DMA_DeInit(DMA_HandleTypeDef *hdma);
|
||||||
HAL_StatusTypeDef HAL_DMA_Start (DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength);
|
HAL_StatusTypeDef HAL_DMA_Start (DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength);
|
||||||
HAL_StatusTypeDef HAL_DMA_Start_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength);
|
HAL_StatusTypeDef HAL_DMA_Start_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength);
|
||||||
HAL_StatusTypeDef HAL_DMA_Abort(DMA_HandleTypeDef *hdma);
|
HAL_StatusTypeDef HAL_DMA_Abort(DMA_HandleTypeDef *hdma);
|
||||||
HAL_StatusTypeDef HAL_DMA_PollForTransfer(DMA_HandleTypeDef *hdma, uint32_t CompleteLevel, uint32_t Timeout);
|
HAL_StatusTypeDef HAL_DMA_Abort_IT(DMA_HandleTypeDef *hdma);
|
||||||
|
HAL_StatusTypeDef HAL_DMA_PollForTransfer(DMA_HandleTypeDef *hdma, HAL_DMA_LevelCompleteTypeDef CompleteLevel, uint32_t Timeout);
|
||||||
void HAL_DMA_IRQHandler(DMA_HandleTypeDef *hdma);
|
void HAL_DMA_IRQHandler(DMA_HandleTypeDef *hdma);
|
||||||
|
HAL_StatusTypeDef HAL_DMA_CleanCallbacks(DMA_HandleTypeDef *hdma);
|
||||||
|
HAL_StatusTypeDef HAL_DMA_RegisterCallback(DMA_HandleTypeDef *hdma, HAL_DMA_CallbackIDTypeDef CallbackID, void (* pCallback)(DMA_HandleTypeDef *_hdma));
|
||||||
|
HAL_StatusTypeDef HAL_DMA_UnRegisterCallback(DMA_HandleTypeDef *hdma, HAL_DMA_CallbackIDTypeDef CallbackID);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_dma2d.h
|
* @file stm32f4xx_hal_dma2d.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief Header file of DMA2D HAL module.
|
* @brief Header file of DMA2D HAL module.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
#ifndef __STM32F4xx_HAL_DMA2D_H
|
#ifndef __STM32F4xx_HAL_DMA2D_H
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup DMA2D DMA2D
|
/** @addtogroup DMA2D DMA2D
|
||||||
* @brief DMA2D HAL module driver
|
* @brief DMA2D HAL module driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
/** @defgroup DMA2D_Exported_Types DMA2D Exported Types
|
/** @defgroup DMA2D_Exported_Types DMA2D Exported Types
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define MAX_DMA2D_LAYER 2
|
#define MAX_DMA2D_LAYER 2U
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief DMA2D color Structure definition
|
* @brief DMA2D color Structure definition
|
||||||
|
@ -85,10 +85,10 @@ typedef struct
|
||||||
{
|
{
|
||||||
uint32_t *pCLUT; /*!< Configures the DMA2D CLUT memory address.*/
|
uint32_t *pCLUT; /*!< Configures the DMA2D CLUT memory address.*/
|
||||||
|
|
||||||
uint32_t CLUTColorMode; /*!< configures the DMA2D CLUT color mode.
|
uint32_t CLUTColorMode; /*!< Configures the DMA2D CLUT color mode.
|
||||||
This parameter can be one value of @ref DMA2D_CLUT_CM */
|
This parameter can be one value of @ref DMA2D_CLUT_CM. */
|
||||||
|
|
||||||
uint32_t Size; /*!< configures the DMA2D CLUT size.
|
uint32_t Size; /*!< Configures the DMA2D CLUT size.
|
||||||
This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF.*/
|
This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF.*/
|
||||||
} DMA2D_CLUTCfgTypeDef;
|
} DMA2D_CLUTCfgTypeDef;
|
||||||
|
|
||||||
|
@ -97,14 +97,15 @@ typedef struct
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
uint32_t Mode; /*!< configures the DMA2D transfer mode.
|
uint32_t Mode; /*!< Configures the DMA2D transfer mode.
|
||||||
This parameter can be one value of @ref DMA2D_Mode */
|
This parameter can be one value of @ref DMA2D_Mode. */
|
||||||
|
|
||||||
uint32_t ColorMode; /*!< configures the color format of the output image.
|
uint32_t ColorMode; /*!< Configures the color format of the output image.
|
||||||
This parameter can be one value of @ref DMA2D_Color_Mode */
|
This parameter can be one value of @ref DMA2D_Output_Color_Mode. */
|
||||||
|
|
||||||
|
uint32_t OutputOffset; /*!< Specifies the Offset value.
|
||||||
|
This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0x3FFF. */
|
||||||
|
|
||||||
uint32_t OutputOffset; /*!< Specifies the Offset value.
|
|
||||||
This parameter must be a number between Min_Data = 0x0000U and Max_Data = 0x3FFF. */
|
|
||||||
} DMA2D_InitTypeDef;
|
} DMA2D_InitTypeDef;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -112,20 +113,24 @@ typedef struct
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
uint32_t InputOffset; /*!< configures the DMA2D foreground offset.
|
uint32_t InputOffset; /*!< Configures the DMA2D foreground or background offset.
|
||||||
This parameter must be a number between Min_Data = 0x0000U and Max_Data = 0x3FFF. */
|
This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0x3FFF. */
|
||||||
|
|
||||||
uint32_t InputColorMode; /*!< configures the DMA2D foreground color mode .
|
uint32_t InputColorMode; /*!< Configures the DMA2D foreground or background color mode.
|
||||||
This parameter can be one value of @ref DMA2D_Input_Color_Mode */
|
This parameter can be one value of @ref DMA2D_Input_Color_Mode. */
|
||||||
|
|
||||||
uint32_t AlphaMode; /*!< configures the DMA2D foreground alpha mode.
|
uint32_t AlphaMode; /*!< Configures the DMA2D foreground or background alpha mode.
|
||||||
This parameter can be one value of @ref DMA2D_ALPHA_MODE */
|
This parameter can be one value of @ref DMA2D_Alpha_Mode. */
|
||||||
|
|
||||||
uint32_t InputAlpha; /*!< Specifies the DMA2D foreground alpha value and color value in case of A8 or A4 color mode.
|
|
||||||
This parameter must be a number between Min_Data = 0x00000000 and Max_Data = 0xFFFFFFFFU
|
|
||||||
in case of A8 or A4 color mode (ARGB).
|
|
||||||
Otherwise, This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF.*/
|
|
||||||
|
|
||||||
|
uint32_t InputAlpha; /*!< Specifies the DMA2D foreground or background alpha value and color value in case of A8 or A4 color mode.
|
||||||
|
This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF except for the color modes detailed below.
|
||||||
|
@note In case of A8 or A4 color mode (ARGB), this parameter must be a number between
|
||||||
|
Min_Data = 0x00000000 and Max_Data = 0xFFFFFFFF where
|
||||||
|
- InputAlpha[24:31] is the alpha value ALPHA[0:7]
|
||||||
|
- InputAlpha[16:23] is the red value RED[0:7]
|
||||||
|
- InputAlpha[8:15] is the green value GREEN[0:7]
|
||||||
|
- InputAlpha[0:7] is the blue value BLUE[0:7]. */
|
||||||
|
|
||||||
} DMA2D_LayerCfgTypeDef;
|
} DMA2D_LayerCfgTypeDef;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -135,32 +140,32 @@ typedef enum
|
||||||
{
|
{
|
||||||
HAL_DMA2D_STATE_RESET = 0x00U, /*!< DMA2D not yet initialized or disabled */
|
HAL_DMA2D_STATE_RESET = 0x00U, /*!< DMA2D not yet initialized or disabled */
|
||||||
HAL_DMA2D_STATE_READY = 0x01U, /*!< Peripheral Initialized and ready for use */
|
HAL_DMA2D_STATE_READY = 0x01U, /*!< Peripheral Initialized and ready for use */
|
||||||
HAL_DMA2D_STATE_BUSY = 0x02U, /*!< an internal process is ongoing */
|
HAL_DMA2D_STATE_BUSY = 0x02U, /*!< An internal process is ongoing */
|
||||||
HAL_DMA2D_STATE_TIMEOUT = 0x03U, /*!< Timeout state */
|
HAL_DMA2D_STATE_TIMEOUT = 0x03U, /*!< Timeout state */
|
||||||
HAL_DMA2D_STATE_ERROR = 0x04U, /*!< DMA2D state error */
|
HAL_DMA2D_STATE_ERROR = 0x04U, /*!< DMA2D state error */
|
||||||
HAL_DMA2D_STATE_SUSPEND = 0x05U /*!< DMA2D process is suspended */
|
HAL_DMA2D_STATE_SUSPEND = 0x05U /*!< DMA2D process is suspended */
|
||||||
}HAL_DMA2D_StateTypeDef;
|
}HAL_DMA2D_StateTypeDef;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief DMA2D handle Structure definition
|
* @brief DMA2D handle Structure definition
|
||||||
*/
|
*/
|
||||||
typedef struct __DMA2D_HandleTypeDef
|
typedef struct __DMA2D_HandleTypeDef
|
||||||
{
|
{
|
||||||
DMA2D_TypeDef *Instance; /*!< DMA2D Register base address */
|
DMA2D_TypeDef *Instance; /*!< DMA2D register base address. */
|
||||||
|
|
||||||
DMA2D_InitTypeDef Init; /*!< DMA2D communication parameters */
|
DMA2D_InitTypeDef Init; /*!< DMA2D communication parameters. */
|
||||||
|
|
||||||
void (* XferCpltCallback)(struct __DMA2D_HandleTypeDef * hdma2d); /*!< DMA2D transfer complete callback */
|
void (* XferCpltCallback)(struct __DMA2D_HandleTypeDef * hdma2d); /*!< DMA2D transfer complete callback. */
|
||||||
|
|
||||||
void (* XferErrorCallback)(struct __DMA2D_HandleTypeDef * hdma2d); /*!< DMA2D transfer error callback */
|
void (* XferErrorCallback)(struct __DMA2D_HandleTypeDef * hdma2d); /*!< DMA2D transfer error callback. */
|
||||||
|
|
||||||
DMA2D_LayerCfgTypeDef LayerCfg[MAX_DMA2D_LAYER]; /*!< DMA2D Layers parameters */
|
DMA2D_LayerCfgTypeDef LayerCfg[MAX_DMA2D_LAYER]; /*!< DMA2D Layers parameters */
|
||||||
|
|
||||||
HAL_LockTypeDef Lock; /*!< DMA2D Lock */
|
HAL_LockTypeDef Lock; /*!< DMA2D lock. */
|
||||||
|
|
||||||
__IO HAL_DMA2D_StateTypeDef State; /*!< DMA2D transfer state */
|
__IO HAL_DMA2D_StateTypeDef State; /*!< DMA2D transfer state. */
|
||||||
|
|
||||||
__IO uint32_t ErrorCode; /*!< DMA2D Error code */
|
__IO uint32_t ErrorCode; /*!< DMA2D error code. */
|
||||||
} DMA2D_HandleTypeDef;
|
} DMA2D_HandleTypeDef;
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
@ -174,11 +179,11 @@ typedef struct __DMA2D_HandleTypeDef
|
||||||
/** @defgroup DMA2D_Error_Code DMA2D Error Code
|
/** @defgroup DMA2D_Error_Code DMA2D Error Code
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define HAL_DMA2D_ERROR_NONE ((uint32_t)0x00000000U) /*!< No error */
|
#define HAL_DMA2D_ERROR_NONE ((uint32_t)0x00000000U) /*!< No error */
|
||||||
#define HAL_DMA2D_ERROR_TE ((uint32_t)0x00000001U) /*!< Transfer error */
|
#define HAL_DMA2D_ERROR_TE ((uint32_t)0x00000001U) /*!< Transfer error */
|
||||||
#define HAL_DMA2D_ERROR_CE ((uint32_t)0x00000002U) /*!< Configuration error */
|
#define HAL_DMA2D_ERROR_CE ((uint32_t)0x00000002U) /*!< Configuration error */
|
||||||
#define HAL_DMA2D_ERROR_CAE ((uint32_t)0x00000004U) /*!< CLUT access error */
|
#define HAL_DMA2D_ERROR_CAE ((uint32_t)0x00000004U) /*!< CLUT access error */
|
||||||
#define HAL_DMA2D_ERROR_TIMEOUT ((uint32_t)0x00000020U) /*!< Timeout error */
|
#define HAL_DMA2D_ERROR_TIMEOUT ((uint32_t)0x00000020U) /*!< Timeout error */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
@ -186,127 +191,94 @@ typedef struct __DMA2D_HandleTypeDef
|
||||||
/** @defgroup DMA2D_Mode DMA2D Mode
|
/** @defgroup DMA2D_Mode DMA2D Mode
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define DMA2D_M2M ((uint32_t)0x00000000U) /*!< DMA2D memory to memory transfer mode */
|
#define DMA2D_M2M ((uint32_t)0x00000000U) /*!< DMA2D memory to memory transfer mode */
|
||||||
#define DMA2D_M2M_PFC ((uint32_t)0x00010000U) /*!< DMA2D memory to memory with pixel format conversion transfer mode */
|
#define DMA2D_M2M_PFC DMA2D_CR_MODE_0 /*!< DMA2D memory to memory with pixel format conversion transfer mode */
|
||||||
#define DMA2D_M2M_BLEND ((uint32_t)0x00020000U) /*!< DMA2D memory to memory with blending transfer mode */
|
#define DMA2D_M2M_BLEND DMA2D_CR_MODE_1 /*!< DMA2D memory to memory with blending transfer mode */
|
||||||
#define DMA2D_R2M ((uint32_t)0x00030000U) /*!< DMA2D register to memory transfer mode */
|
#define DMA2D_R2M DMA2D_CR_MODE /*!< DMA2D register to memory transfer mode */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup DMA2D_Color_Mode DMA2D Color Mode
|
/** @defgroup DMA2D_Output_Color_Mode DMA2D Output Color Mode
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define DMA2D_ARGB8888 ((uint32_t)0x00000000U) /*!< ARGB8888 DMA2D color mode */
|
#define DMA2D_OUTPUT_ARGB8888 ((uint32_t)0x00000000U) /*!< ARGB8888 DMA2D color mode */
|
||||||
#define DMA2D_RGB888 ((uint32_t)0x00000001U) /*!< RGB888 DMA2D color mode */
|
#define DMA2D_OUTPUT_RGB888 DMA2D_OPFCCR_CM_0 /*!< RGB888 DMA2D color mode */
|
||||||
#define DMA2D_RGB565 ((uint32_t)0x00000002U) /*!< RGB565 DMA2D color mode */
|
#define DMA2D_OUTPUT_RGB565 DMA2D_OPFCCR_CM_1 /*!< RGB565 DMA2D color mode */
|
||||||
#define DMA2D_ARGB1555 ((uint32_t)0x00000003U) /*!< ARGB1555 DMA2D color mode */
|
#define DMA2D_OUTPUT_ARGB1555 (DMA2D_OPFCCR_CM_0|DMA2D_OPFCCR_CM_1) /*!< ARGB1555 DMA2D color mode */
|
||||||
#define DMA2D_ARGB4444 ((uint32_t)0x00000004U) /*!< ARGB4444 DMA2D color mode */
|
#define DMA2D_OUTPUT_ARGB4444 DMA2D_OPFCCR_CM_2 /*!< ARGB4444 DMA2D color mode */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup DMA2D_COLOR_VALUE DMA2D COLOR VALUE
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
#define COLOR_VALUE ((uint32_t)0x000000FFU) /*!< color value mask */
|
|
||||||
/**
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @defgroup DMA2D_SIZE DMA2D SIZE
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
#define DMA2D_PIXEL (DMA2D_NLR_PL >> 16U) /*!< DMA2D pixel per line */
|
|
||||||
#define DMA2D_LINE DMA2D_NLR_NL /*!< DMA2D number of line */
|
|
||||||
/**
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @defgroup DMA2D_Offset DMA2D Offset
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
#define DMA2D_OFFSET DMA2D_FGOR_LO /*!< Line Offset */
|
|
||||||
/**
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @defgroup DMA2D_Input_Color_Mode DMA2D Input Color Mode
|
/** @defgroup DMA2D_Input_Color_Mode DMA2D Input Color Mode
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define CM_ARGB8888 ((uint32_t)0x00000000U) /*!< ARGB8888 color mode */
|
#define DMA2D_INPUT_ARGB8888 ((uint32_t)0x00000000U) /*!< ARGB8888 color mode */
|
||||||
#define CM_RGB888 ((uint32_t)0x00000001U) /*!< RGB888 color mode */
|
#define DMA2D_INPUT_RGB888 ((uint32_t)0x00000001U) /*!< RGB888 color mode */
|
||||||
#define CM_RGB565 ((uint32_t)0x00000002U) /*!< RGB565 color mode */
|
#define DMA2D_INPUT_RGB565 ((uint32_t)0x00000002U) /*!< RGB565 color mode */
|
||||||
#define CM_ARGB1555 ((uint32_t)0x00000003U) /*!< ARGB1555 color mode */
|
#define DMA2D_INPUT_ARGB1555 ((uint32_t)0x00000003U) /*!< ARGB1555 color mode */
|
||||||
#define CM_ARGB4444 ((uint32_t)0x00000004U) /*!< ARGB4444 color mode */
|
#define DMA2D_INPUT_ARGB4444 ((uint32_t)0x00000004U) /*!< ARGB4444 color mode */
|
||||||
#define CM_L8 ((uint32_t)0x00000005U) /*!< L8 color mode */
|
#define DMA2D_INPUT_L8 ((uint32_t)0x00000005U) /*!< L8 color mode */
|
||||||
#define CM_AL44 ((uint32_t)0x00000006U) /*!< AL44 color mode */
|
#define DMA2D_INPUT_AL44 ((uint32_t)0x00000006U) /*!< AL44 color mode */
|
||||||
#define CM_AL88 ((uint32_t)0x00000007U) /*!< AL88 color mode */
|
#define DMA2D_INPUT_AL88 ((uint32_t)0x00000007U) /*!< AL88 color mode */
|
||||||
#define CM_L4 ((uint32_t)0x00000008U) /*!< L4 color mode */
|
#define DMA2D_INPUT_L4 ((uint32_t)0x00000008U) /*!< L4 color mode */
|
||||||
#define CM_A8 ((uint32_t)0x00000009U) /*!< A8 color mode */
|
#define DMA2D_INPUT_A8 ((uint32_t)0x00000009U) /*!< A8 color mode */
|
||||||
#define CM_A4 ((uint32_t)0x0000000AU) /*!< A4 color mode */
|
#define DMA2D_INPUT_A4 ((uint32_t)0x0000000AU) /*!< A4 color mode */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup DMA2D_ALPHA_MODE DMA2D ALPHA MODE
|
/** @defgroup DMA2D_Alpha_Mode DMA2D Alpha Mode
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define DMA2D_NO_MODIF_ALPHA ((uint32_t)0x00000000U) /*!< No modification of the alpha channel value */
|
#define DMA2D_NO_MODIF_ALPHA ((uint32_t)0x00000000U) /*!< No modification of the alpha channel value */
|
||||||
#define DMA2D_REPLACE_ALPHA ((uint32_t)0x00000001U) /*!< Replace original alpha channel value by programmed alpha value */
|
#define DMA2D_REPLACE_ALPHA ((uint32_t)0x00000001U) /*!< Replace original alpha channel value by programmed alpha value */
|
||||||
#define DMA2D_COMBINE_ALPHA ((uint32_t)0x00000002U) /*!< Replace original alpha channel value by programmed alpha value
|
#define DMA2D_COMBINE_ALPHA ((uint32_t)0x00000002U) /*!< Replace original alpha channel value by programmed alpha value
|
||||||
with original alpha channel value */
|
with original alpha channel value */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup DMA2D_CLUT_CM DMA2D CLUT CM
|
/** @defgroup DMA2D_CLUT_CM DMA2D CLUT Color Mode
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define DMA2D_CCM_ARGB8888 ((uint32_t)0x00000000U) /*!< ARGB8888 DMA2D C-LUT color mode */
|
#define DMA2D_CCM_ARGB8888 ((uint32_t)0x00000000U) /*!< ARGB8888 DMA2D CLUT color mode */
|
||||||
#define DMA2D_CCM_RGB888 ((uint32_t)0x00000001U) /*!< RGB888 DMA2D C-LUT color mode */
|
#define DMA2D_CCM_RGB888 ((uint32_t)0x00000001U) /*!< RGB888 DMA2D CLUT color mode */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup DMA2D_Size_Clut DMA2D Size Clut
|
/** @defgroup DMA2D_Interrupts DMA2D Interrupts
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define DMA2D_CLUT_SIZE (DMA2D_FGPFCCR_CS >> 8U) /*!< DMA2D C-LUT size */
|
#define DMA2D_IT_CE DMA2D_CR_CEIE /*!< Configuration Error Interrupt */
|
||||||
|
#define DMA2D_IT_CTC DMA2D_CR_CTCIE /*!< CLUT Transfer Complete Interrupt */
|
||||||
|
#define DMA2D_IT_CAE DMA2D_CR_CAEIE /*!< CLUT Access Error Interrupt */
|
||||||
|
#define DMA2D_IT_TW DMA2D_CR_TWIE /*!< Transfer Watermark Interrupt */
|
||||||
|
#define DMA2D_IT_TC DMA2D_CR_TCIE /*!< Transfer Complete Interrupt */
|
||||||
|
#define DMA2D_IT_TE DMA2D_CR_TEIE /*!< Transfer Error Interrupt */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup DMA2D_DeadTime DMA2D DeadTime
|
/** @defgroup DMA2D_Flags DMA2D Flags
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define LINE_WATERMARK DMA2D_LWR_LW
|
#define DMA2D_FLAG_CE DMA2D_ISR_CEIF /*!< Configuration Error Interrupt Flag */
|
||||||
|
#define DMA2D_FLAG_CTC DMA2D_ISR_CTCIF /*!< CLUT Transfer Complete Interrupt Flag */
|
||||||
|
#define DMA2D_FLAG_CAE DMA2D_ISR_CAEIF /*!< CLUT Access Error Interrupt Flag */
|
||||||
|
#define DMA2D_FLAG_TW DMA2D_ISR_TWIF /*!< Transfer Watermark Interrupt Flag */
|
||||||
|
#define DMA2D_FLAG_TC DMA2D_ISR_TCIF /*!< Transfer Complete Interrupt Flag */
|
||||||
|
#define DMA2D_FLAG_TE DMA2D_ISR_TEIF /*!< Transfer Error Interrupt Flag */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup DMA2D_Interrupts DMA2D Interrupts
|
/** @defgroup DMA2D_Aliases DMA2D API Aliases
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define DMA2D_IT_CE DMA2D_CR_CEIE /*!< Configuration Error Interrupt */
|
#define HAL_DMA2D_DisableCLUT HAL_DMA2D_CLUTLoading_Abort /*!< Aliased to HAL_DMA2D_CLUTLoading_Abort for compatibility with legacy code */
|
||||||
#define DMA2D_IT_CTC DMA2D_CR_CTCIE /*!< C-LUT Transfer Complete Interrupt */
|
|
||||||
#define DMA2D_IT_CAE DMA2D_CR_CAEIE /*!< C-LUT Access Error Interrupt */
|
|
||||||
#define DMA2D_IT_TW DMA2D_CR_TWIE /*!< Transfer Watermark Interrupt */
|
|
||||||
#define DMA2D_IT_TC DMA2D_CR_TCIE /*!< Transfer Complete Interrupt */
|
|
||||||
#define DMA2D_IT_TE DMA2D_CR_TEIE /*!< Transfer Error Interrupt */
|
|
||||||
/**
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @defgroup DMA2D_Flag DMA2D Flag
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
#define DMA2D_FLAG_CE DMA2D_ISR_CEIF /*!< Configuration Error Interrupt Flag */
|
|
||||||
#define DMA2D_FLAG_CTC DMA2D_ISR_CTCIF /*!< C-LUT Transfer Complete Interrupt Flag */
|
|
||||||
#define DMA2D_FLAG_CAE DMA2D_ISR_CAEIF /*!< C-LUT Access Error Interrupt Flag */
|
|
||||||
#define DMA2D_FLAG_TW DMA2D_ISR_TWIF /*!< Transfer Watermark Interrupt Flag */
|
|
||||||
#define DMA2D_FLAG_TC DMA2D_ISR_TCIF /*!< Transfer Complete Interrupt Flag */
|
|
||||||
#define DMA2D_FLAG_TE DMA2D_ISR_TEIF /*!< Transfer Error Interrupt Flag */
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
@ -314,7 +286,7 @@ typedef struct __DMA2D_HandleTypeDef
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
/* Exported macro ------------------------------------------------------------*/
|
/* Exported macros ------------------------------------------------------------*/
|
||||||
/** @defgroup DMA2D_Exported_Macros DMA2D Exported Macros
|
/** @defgroup DMA2D_Exported_Macros DMA2D Exported Macros
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
@ -332,16 +304,15 @@ typedef struct __DMA2D_HandleTypeDef
|
||||||
*/
|
*/
|
||||||
#define __HAL_DMA2D_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= DMA2D_CR_START)
|
#define __HAL_DMA2D_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= DMA2D_CR_START)
|
||||||
|
|
||||||
|
|
||||||
/* Interrupt & Flag management */
|
/* Interrupt & Flag management */
|
||||||
/**
|
/**
|
||||||
* @brief Get the DMA2D pending flags.
|
* @brief Get the DMA2D pending flags.
|
||||||
* @param __HANDLE__: DMA2D handle
|
* @param __HANDLE__: DMA2D handle
|
||||||
* @param __FLAG__: Get the specified flag.
|
* @param __FLAG__: flag to check.
|
||||||
* This parameter can be any combination of the following values:
|
* This parameter can be any combination of the following values:
|
||||||
* @arg DMA2D_FLAG_CE: Configuration error flag
|
* @arg DMA2D_FLAG_CE: Configuration error flag
|
||||||
* @arg DMA2D_FLAG_CTC: C-LUT transfer complete flag
|
* @arg DMA2D_FLAG_CTC: CLUT transfer complete flag
|
||||||
* @arg DMA2D_FLAG_CAE: C-LUT access error flag
|
* @arg DMA2D_FLAG_CAE: CLUT access error flag
|
||||||
* @arg DMA2D_FLAG_TW: Transfer Watermark flag
|
* @arg DMA2D_FLAG_TW: Transfer Watermark flag
|
||||||
* @arg DMA2D_FLAG_TC: Transfer complete flag
|
* @arg DMA2D_FLAG_TC: Transfer complete flag
|
||||||
* @arg DMA2D_FLAG_TE: Transfer error flag
|
* @arg DMA2D_FLAG_TE: Transfer error flag
|
||||||
|
@ -350,28 +321,28 @@ typedef struct __DMA2D_HandleTypeDef
|
||||||
#define __HAL_DMA2D_GET_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR & (__FLAG__))
|
#define __HAL_DMA2D_GET_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR & (__FLAG__))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Clears the DMA2D pending flags.
|
* @brief Clear the DMA2D pending flags.
|
||||||
* @param __HANDLE__: DMA2D handle
|
* @param __HANDLE__: DMA2D handle
|
||||||
* @param __FLAG__: specifies the flag to clear.
|
* @param __FLAG__: specifies the flag to clear.
|
||||||
* This parameter can be any combination of the following values:
|
* This parameter can be any combination of the following values:
|
||||||
* @arg DMA2D_FLAG_CE: Configuration error flag
|
* @arg DMA2D_FLAG_CE: Configuration error flag
|
||||||
* @arg DMA2D_FLAG_CTC: C-LUT transfer complete flag
|
* @arg DMA2D_FLAG_CTC: CLUT transfer complete flag
|
||||||
* @arg DMA2D_FLAG_CAE: C-LUT access error flag
|
* @arg DMA2D_FLAG_CAE: CLUT access error flag
|
||||||
* @arg DMA2D_FLAG_TW: Transfer Watermark flag
|
* @arg DMA2D_FLAG_TW: Transfer Watermark flag
|
||||||
* @arg DMA2D_FLAG_TC: Transfer complete flag
|
* @arg DMA2D_FLAG_TC: Transfer complete flag
|
||||||
* @arg DMA2D_FLAG_TE: Transfer error flag
|
* @arg DMA2D_FLAG_TE: Transfer error flag
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
#define __HAL_DMA2D_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->IFCR = (__FLAG__))
|
#define __HAL_DMA2D_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->IFCR = (__FLAG__))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Enables the specified DMA2D interrupts.
|
* @brief Enable the specified DMA2D interrupts.
|
||||||
* @param __HANDLE__: DMA2D handle
|
* @param __HANDLE__: DMA2D handle
|
||||||
* @param __INTERRUPT__: specifies the DMA2D interrupt sources to be enabled.
|
* @param __INTERRUPT__: specifies the DMA2D interrupt sources to be enabled.
|
||||||
* This parameter can be any combination of the following values:
|
* This parameter can be any combination of the following values:
|
||||||
* @arg DMA2D_IT_CE: Configuration error interrupt mask
|
* @arg DMA2D_IT_CE: Configuration error interrupt mask
|
||||||
* @arg DMA2D_IT_CTC: C-LUT transfer complete interrupt mask
|
* @arg DMA2D_IT_CTC: CLUT transfer complete interrupt mask
|
||||||
* @arg DMA2D_IT_CAE: C-LUT access error interrupt mask
|
* @arg DMA2D_IT_CAE: CLUT access error interrupt mask
|
||||||
* @arg DMA2D_IT_TW: Transfer Watermark interrupt mask
|
* @arg DMA2D_IT_TW: Transfer Watermark interrupt mask
|
||||||
* @arg DMA2D_IT_TC: Transfer complete interrupt mask
|
* @arg DMA2D_IT_TC: Transfer complete interrupt mask
|
||||||
* @arg DMA2D_IT_TE: Transfer error interrupt mask
|
* @arg DMA2D_IT_TE: Transfer error interrupt mask
|
||||||
|
@ -380,13 +351,13 @@ typedef struct __DMA2D_HandleTypeDef
|
||||||
#define __HAL_DMA2D_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR |= (__INTERRUPT__))
|
#define __HAL_DMA2D_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR |= (__INTERRUPT__))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Disables the specified DMA2D interrupts.
|
* @brief Disable the specified DMA2D interrupts.
|
||||||
* @param __HANDLE__: DMA2D handle
|
* @param __HANDLE__: DMA2D handle
|
||||||
* @param __INTERRUPT__: specifies the DMA2D interrupt sources to be disabled.
|
* @param __INTERRUPT__: specifies the DMA2D interrupt sources to be disabled.
|
||||||
* This parameter can be any combination of the following values:
|
* This parameter can be any combination of the following values:
|
||||||
* @arg DMA2D_IT_CE: Configuration error interrupt mask
|
* @arg DMA2D_IT_CE: Configuration error interrupt mask
|
||||||
* @arg DMA2D_IT_CTC: C-LUT transfer complete interrupt mask
|
* @arg DMA2D_IT_CTC: CLUT transfer complete interrupt mask
|
||||||
* @arg DMA2D_IT_CAE: C-LUT access error interrupt mask
|
* @arg DMA2D_IT_CAE: CLUT access error interrupt mask
|
||||||
* @arg DMA2D_IT_TW: Transfer Watermark interrupt mask
|
* @arg DMA2D_IT_TW: Transfer Watermark interrupt mask
|
||||||
* @arg DMA2D_IT_TC: Transfer complete interrupt mask
|
* @arg DMA2D_IT_TC: Transfer complete interrupt mask
|
||||||
* @arg DMA2D_IT_TE: Transfer error interrupt mask
|
* @arg DMA2D_IT_TE: Transfer error interrupt mask
|
||||||
|
@ -395,32 +366,46 @@ typedef struct __DMA2D_HandleTypeDef
|
||||||
#define __HAL_DMA2D_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR &= ~(__INTERRUPT__))
|
#define __HAL_DMA2D_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR &= ~(__INTERRUPT__))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Checks whether the specified DMA2D interrupt has occurred or not.
|
* @brief Check whether the specified DMA2D interrupt source is enabled or not.
|
||||||
* @param __HANDLE__: DMA2D handle
|
* @param __HANDLE__: DMA2D handle
|
||||||
* @param __INTERRUPT__: specifies the DMA2D interrupt source to check.
|
* @param __INTERRUPT__: specifies the DMA2D interrupt source to check.
|
||||||
* This parameter can be one of the following values:
|
* This parameter can be one of the following values:
|
||||||
* @arg DMA2D_IT_CE: Configuration error interrupt mask
|
* @arg DMA2D_IT_CE: Configuration error interrupt mask
|
||||||
* @arg DMA2D_IT_CTC: C-LUT transfer complete interrupt mask
|
* @arg DMA2D_IT_CTC: CLUT transfer complete interrupt mask
|
||||||
* @arg DMA2D_IT_CAE: C-LUT access error interrupt mask
|
* @arg DMA2D_IT_CAE: CLUT access error interrupt mask
|
||||||
* @arg DMA2D_IT_TW: Transfer Watermark interrupt mask
|
* @arg DMA2D_IT_TW: Transfer Watermark interrupt mask
|
||||||
* @arg DMA2D_IT_TC: Transfer complete interrupt mask
|
* @arg DMA2D_IT_TC: Transfer complete interrupt mask
|
||||||
* @arg DMA2D_IT_TE: Transfer error interrupt mask
|
* @arg DMA2D_IT_TE: Transfer error interrupt mask
|
||||||
* @retval The state of INTERRUPT.
|
* @retval The state of INTERRUPT source.
|
||||||
*/
|
*/
|
||||||
#define __HAL_DMA2D_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR & (__INTERRUPT__))
|
#define __HAL_DMA2D_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR & (__INTERRUPT__))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Exported functions --------------------------------------------------------*/
|
/* Exported functions --------------------------------------------------------*/
|
||||||
/** @defgroup DMA2D_Exported_Functions DMA2D Exported Functions
|
/** @addtogroup DMA2D_Exported_Functions DMA2D Exported Functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup DMA2D_Exported_Functions_Group1 Initialization and de-initialization functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
/* Initialization and de-initialization functions *******************************/
|
/* Initialization and de-initialization functions *******************************/
|
||||||
HAL_StatusTypeDef HAL_DMA2D_Init(DMA2D_HandleTypeDef *hdma2d);
|
HAL_StatusTypeDef HAL_DMA2D_Init(DMA2D_HandleTypeDef *hdma2d);
|
||||||
HAL_StatusTypeDef HAL_DMA2D_DeInit (DMA2D_HandleTypeDef *hdma2d);
|
HAL_StatusTypeDef HAL_DMA2D_DeInit (DMA2D_HandleTypeDef *hdma2d);
|
||||||
void HAL_DMA2D_MspInit(DMA2D_HandleTypeDef* hdma2d);
|
void HAL_DMA2D_MspInit(DMA2D_HandleTypeDef* hdma2d);
|
||||||
void HAL_DMA2D_MspDeInit(DMA2D_HandleTypeDef* hdma2d);
|
void HAL_DMA2D_MspDeInit(DMA2D_HandleTypeDef* hdma2d);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup DMA2D_Exported_Functions_Group2 IO operation functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
/* IO operation functions *******************************************************/
|
/* IO operation functions *******************************************************/
|
||||||
HAL_StatusTypeDef HAL_DMA2D_Start(DMA2D_HandleTypeDef *hdma2d, uint32_t pdata, uint32_t DstAddress, uint32_t Width, uint32_t Height);
|
HAL_StatusTypeDef HAL_DMA2D_Start(DMA2D_HandleTypeDef *hdma2d, uint32_t pdata, uint32_t DstAddress, uint32_t Width, uint32_t Height);
|
||||||
|
@ -430,58 +415,108 @@ HAL_StatusTypeDef HAL_DMA2D_BlendingStart_IT(DMA2D_HandleTypeDef *hdma2d, uint32
|
||||||
HAL_StatusTypeDef HAL_DMA2D_Suspend(DMA2D_HandleTypeDef *hdma2d);
|
HAL_StatusTypeDef HAL_DMA2D_Suspend(DMA2D_HandleTypeDef *hdma2d);
|
||||||
HAL_StatusTypeDef HAL_DMA2D_Resume(DMA2D_HandleTypeDef *hdma2d);
|
HAL_StatusTypeDef HAL_DMA2D_Resume(DMA2D_HandleTypeDef *hdma2d);
|
||||||
HAL_StatusTypeDef HAL_DMA2D_Abort(DMA2D_HandleTypeDef *hdma2d);
|
HAL_StatusTypeDef HAL_DMA2D_Abort(DMA2D_HandleTypeDef *hdma2d);
|
||||||
|
HAL_StatusTypeDef HAL_DMA2D_EnableCLUT(DMA2D_HandleTypeDef *hdma2d, uint32_t LayerIdx);
|
||||||
|
HAL_StatusTypeDef HAL_DMA2D_CLUTLoad(DMA2D_HandleTypeDef *hdma2d, DMA2D_CLUTCfgTypeDef CLUTCfg, uint32_t LayerIdx);
|
||||||
HAL_StatusTypeDef HAL_DMA2D_CLUTLoad_IT(DMA2D_HandleTypeDef *hdma2d, DMA2D_CLUTCfgTypeDef CLUTCfg, uint32_t LayerIdx);
|
HAL_StatusTypeDef HAL_DMA2D_CLUTLoad_IT(DMA2D_HandleTypeDef *hdma2d, DMA2D_CLUTCfgTypeDef CLUTCfg, uint32_t LayerIdx);
|
||||||
|
HAL_StatusTypeDef HAL_DMA2D_CLUTLoading_Abort(DMA2D_HandleTypeDef *hdma2d, uint32_t LayerIdx);
|
||||||
|
HAL_StatusTypeDef HAL_DMA2D_CLUTLoading_Suspend(DMA2D_HandleTypeDef *hdma2d, uint32_t LayerIdx);
|
||||||
|
HAL_StatusTypeDef HAL_DMA2D_CLUTLoading_Resume(DMA2D_HandleTypeDef *hdma2d, uint32_t LayerIdx);
|
||||||
HAL_StatusTypeDef HAL_DMA2D_PollForTransfer(DMA2D_HandleTypeDef *hdma2d, uint32_t Timeout);
|
HAL_StatusTypeDef HAL_DMA2D_PollForTransfer(DMA2D_HandleTypeDef *hdma2d, uint32_t Timeout);
|
||||||
void HAL_DMA2D_IRQHandler(DMA2D_HandleTypeDef *hdma2d);
|
void HAL_DMA2D_IRQHandler(DMA2D_HandleTypeDef *hdma2d);
|
||||||
void HAL_DMA2D_LineEventCallback(DMA2D_HandleTypeDef *hdma2d);
|
void HAL_DMA2D_LineEventCallback(DMA2D_HandleTypeDef *hdma2d);
|
||||||
void HAL_DMA2D_CLUTLoadingCpltCallback(DMA2D_HandleTypeDef *hdma2d);
|
void HAL_DMA2D_CLUTLoadingCpltCallback(DMA2D_HandleTypeDef *hdma2d);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup DMA2D_Exported_Functions_Group3 Peripheral Control functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
/* Peripheral Control functions *************************************************/
|
/* Peripheral Control functions *************************************************/
|
||||||
HAL_StatusTypeDef HAL_DMA2D_ConfigLayer(DMA2D_HandleTypeDef *hdma2d, uint32_t LayerIdx);
|
HAL_StatusTypeDef HAL_DMA2D_ConfigLayer(DMA2D_HandleTypeDef *hdma2d, uint32_t LayerIdx);
|
||||||
HAL_StatusTypeDef HAL_DMA2D_ConfigCLUT(DMA2D_HandleTypeDef *hdma2d, DMA2D_CLUTCfgTypeDef CLUTCfg, uint32_t LayerIdx);
|
HAL_StatusTypeDef HAL_DMA2D_ConfigCLUT(DMA2D_HandleTypeDef *hdma2d, DMA2D_CLUTCfgTypeDef CLUTCfg, uint32_t LayerIdx);
|
||||||
HAL_StatusTypeDef HAL_DMA2D_EnableCLUT(DMA2D_HandleTypeDef *hdma2d, uint32_t LayerIdx);
|
HAL_StatusTypeDef HAL_DMA2D_ProgramLineEvent(DMA2D_HandleTypeDef *hdma2d, uint32_t Line);
|
||||||
HAL_StatusTypeDef HAL_DMA2D_DisableCLUT(DMA2D_HandleTypeDef *hdma2d, uint32_t LayerIdx);
|
HAL_StatusTypeDef HAL_DMA2D_EnableDeadTime(DMA2D_HandleTypeDef *hdma2d);
|
||||||
HAL_StatusTypeDef HAL_DMA2D_ProgramLineEvent(DMA2D_HandleTypeDef *hdma2d, uint32_t Line);
|
HAL_StatusTypeDef HAL_DMA2D_DisableDeadTime(DMA2D_HandleTypeDef *hdma2d);
|
||||||
|
HAL_StatusTypeDef HAL_DMA2D_ConfigDeadTime(DMA2D_HandleTypeDef *hdma2d, uint8_t DeadTime);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup DMA2D_Exported_Functions_Group4 Peripheral State and Error functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
/* Peripheral State functions ***************************************************/
|
/* Peripheral State functions ***************************************************/
|
||||||
HAL_DMA2D_StateTypeDef HAL_DMA2D_GetState(DMA2D_HandleTypeDef *hdma2d);
|
HAL_DMA2D_StateTypeDef HAL_DMA2D_GetState(DMA2D_HandleTypeDef *hdma2d);
|
||||||
uint32_t HAL_DMA2D_GetError(DMA2D_HandleTypeDef *hdma2d);
|
uint32_t HAL_DMA2D_GetError(DMA2D_HandleTypeDef *hdma2d);
|
||||||
/**
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Private types -------------------------------------------------------------*/
|
|
||||||
/** @defgroup DMA2D_Private_Types DMA2D Private Types
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Private defines -------------------------------------------------------------*/
|
|
||||||
/** @defgroup DMA2D_Private_Defines DMA2D Private Defines
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Private variables ---------------------------------------------------------*/
|
|
||||||
/** @defgroup DMA2D_Private_Variables DMA2D Private Variables
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Private constants ---------------------------------------------------------*/
|
/* Private constants ---------------------------------------------------------*/
|
||||||
/** @defgroup DMA2D_Private_Constants DMA2D Private Constants
|
|
||||||
|
/** @addtogroup DMA2D_Private_Constants DMA2D Private Constants
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/** @defgroup DMA2D_Maximum_Line_WaterMark DMA2D Maximum Line Watermark
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define DMA2D_LINE_WATERMARK_MAX DMA2D_LWR_LW /*!< DMA2D maximum line watermark */
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup DMA2D_Color_Value DMA2D Color Value
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define DMA2D_COLOR_VALUE ((uint32_t)0x000000FFU) /*!< Color value mask */
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup DMA2D_Max_Layer DMA2D Maximum Number of Layers
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define DMA2D_MAX_LAYER 2U /*!< DMA2D maximum number of layers */
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup DMA2D_Offset DMA2D Offset
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define DMA2D_OFFSET DMA2D_FGOR_LO /*!< Line Offset */
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup DMA2D_Size DMA2D Size
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define DMA2D_PIXEL (DMA2D_NLR_PL >> 16U) /*!< DMA2D number of pixels per line */
|
||||||
|
#define DMA2D_LINE DMA2D_NLR_NL /*!< DMA2D number of lines */
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup DMA2D_CLUT_Size DMA2D CLUT Size
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define DMA2D_CLUT_SIZE (DMA2D_FGPFCCR_CS >> 8U) /*!< DMA2D CLUT size */
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
@ -490,53 +525,42 @@ uint32_t HAL_DMA2D_GetError(DMA2D_HandleTypeDef *hdma2d);
|
||||||
/** @defgroup DMA2D_Private_Macros DMA2D Private Macros
|
/** @defgroup DMA2D_Private_Macros DMA2D Private Macros
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define IS_DMA2D_LAYER(LAYER) ((LAYER) <= MAX_DMA2D_LAYER)
|
#define IS_DMA2D_LAYER(LAYER) ((LAYER) <= DMA2D_MAX_LAYER)
|
||||||
#define IS_DMA2D_MODE(MODE) (((MODE) == DMA2D_M2M) || ((MODE) == DMA2D_M2M_PFC) || \
|
#define IS_DMA2D_MODE(MODE) (((MODE) == DMA2D_M2M) || ((MODE) == DMA2D_M2M_PFC) || \
|
||||||
((MODE) == DMA2D_M2M_BLEND) || ((MODE) == DMA2D_R2M))
|
((MODE) == DMA2D_M2M_BLEND) || ((MODE) == DMA2D_R2M))
|
||||||
#define IS_DMA2D_CMODE(MODE_ARGB) (((MODE_ARGB) == DMA2D_ARGB8888) || ((MODE_ARGB) == DMA2D_RGB888) || \
|
#define IS_DMA2D_CMODE(MODE_ARGB) (((MODE_ARGB) == DMA2D_OUTPUT_ARGB8888) || ((MODE_ARGB) == DMA2D_OUTPUT_RGB888) || \
|
||||||
((MODE_ARGB) == DMA2D_RGB565) || ((MODE_ARGB) == DMA2D_ARGB1555) || \
|
((MODE_ARGB) == DMA2D_OUTPUT_RGB565) || ((MODE_ARGB) == DMA2D_OUTPUT_ARGB1555) || \
|
||||||
((MODE_ARGB) == DMA2D_ARGB4444))
|
((MODE_ARGB) == DMA2D_OUTPUT_ARGB4444))
|
||||||
#define IS_DMA2D_COLOR(COLOR) ((COLOR) <= COLOR_VALUE)
|
#define IS_DMA2D_COLOR(COLOR) ((COLOR) <= DMA2D_COLOR_VALUE)
|
||||||
#define IS_DMA2D_LINE(LINE) ((LINE) <= DMA2D_LINE)
|
#define IS_DMA2D_LINE(LINE) ((LINE) <= DMA2D_LINE)
|
||||||
#define IS_DMA2D_PIXEL(PIXEL) ((PIXEL) <= DMA2D_PIXEL)
|
#define IS_DMA2D_PIXEL(PIXEL) ((PIXEL) <= DMA2D_PIXEL)
|
||||||
#define IS_DMA2D_OFFSET(OOFFSET) ((OOFFSET) <= DMA2D_OFFSET)
|
#define IS_DMA2D_OFFSET(OOFFSET) ((OOFFSET) <= DMA2D_OFFSET)
|
||||||
#define IS_DMA2D_INPUT_COLOR_MODE(INPUT_CM) (((INPUT_CM) == CM_ARGB8888) || ((INPUT_CM) == CM_RGB888) || \
|
#define IS_DMA2D_INPUT_COLOR_MODE(INPUT_CM) (((INPUT_CM) == DMA2D_INPUT_ARGB8888) || ((INPUT_CM) == DMA2D_INPUT_RGB888) || \
|
||||||
((INPUT_CM) == CM_RGB565) || ((INPUT_CM) == CM_ARGB1555) || \
|
((INPUT_CM) == DMA2D_INPUT_RGB565) || ((INPUT_CM) == DMA2D_INPUT_ARGB1555) || \
|
||||||
((INPUT_CM) == CM_ARGB4444) || ((INPUT_CM) == CM_L8) || \
|
((INPUT_CM) == DMA2D_INPUT_ARGB4444) || ((INPUT_CM) == DMA2D_INPUT_L8) || \
|
||||||
((INPUT_CM) == CM_AL44) || ((INPUT_CM) == CM_AL88) || \
|
((INPUT_CM) == DMA2D_INPUT_AL44) || ((INPUT_CM) == DMA2D_INPUT_AL88) || \
|
||||||
((INPUT_CM) == CM_L4) || ((INPUT_CM) == CM_A8) || \
|
((INPUT_CM) == DMA2D_INPUT_L4) || ((INPUT_CM) == DMA2D_INPUT_A8) || \
|
||||||
((INPUT_CM) == CM_A4))
|
((INPUT_CM) == DMA2D_INPUT_A4))
|
||||||
#define IS_DMA2D_ALPHA_MODE(AlphaMode) (((AlphaMode) == DMA2D_NO_MODIF_ALPHA) || \
|
#define IS_DMA2D_ALPHA_MODE(AlphaMode) (((AlphaMode) == DMA2D_NO_MODIF_ALPHA) || \
|
||||||
((AlphaMode) == DMA2D_REPLACE_ALPHA) || \
|
((AlphaMode) == DMA2D_REPLACE_ALPHA) || \
|
||||||
((AlphaMode) == DMA2D_COMBINE_ALPHA))
|
((AlphaMode) == DMA2D_COMBINE_ALPHA))
|
||||||
|
|
||||||
#define IS_DMA2D_CLUT_CM(CLUT_CM) (((CLUT_CM) == DMA2D_CCM_ARGB8888) || ((CLUT_CM) == DMA2D_CCM_RGB888))
|
#define IS_DMA2D_CLUT_CM(CLUT_CM) (((CLUT_CM) == DMA2D_CCM_ARGB8888) || ((CLUT_CM) == DMA2D_CCM_RGB888))
|
||||||
#define IS_DMA2D_CLUT_SIZE(CLUT_SIZE) ((CLUT_SIZE) <= DMA2D_CLUT_SIZE)
|
#define IS_DMA2D_CLUT_SIZE(CLUT_SIZE) ((CLUT_SIZE) <= DMA2D_CLUT_SIZE)
|
||||||
#define IS_DMA2D_LineWatermark(LineWatermark) ((LineWatermark) <= LINE_WATERMARK)
|
#define IS_DMA2D_LINEWATERMARK(LineWatermark) ((LineWatermark) <= DMA2D_LINE_WATERMARK_MAX)
|
||||||
/**
|
#define IS_DMA2D_IT(IT) (((IT) == DMA2D_IT_CTC) || ((IT) == DMA2D_IT_CAE) || \
|
||||||
* @}
|
((IT) == DMA2D_IT_TW) || ((IT) == DMA2D_IT_TC) || \
|
||||||
*/
|
((IT) == DMA2D_IT_TE) || ((IT) == DMA2D_IT_CE))
|
||||||
|
#define IS_DMA2D_GET_FLAG(FLAG) (((FLAG) == DMA2D_FLAG_CTC) || ((FLAG) == DMA2D_FLAG_CAE) || \
|
||||||
/* Private functions prototypes ---------------------------------------------------------*/
|
((FLAG) == DMA2D_FLAG_TW) || ((FLAG) == DMA2D_FLAG_TC) || \
|
||||||
/** @defgroup DMA2D_Private_Functions_Prototypes DMA2D Private Functions Prototypes
|
((FLAG) == DMA2D_FLAG_TE) || ((FLAG) == DMA2D_FLAG_CE))
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Private functions ---------------------------------------------------------*/
|
|
||||||
/** @defgroup DMA2D_Private_Functions DMA2D Private Functions
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_dma_ex.c
|
* @file stm32f4xx_hal_dma_ex.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief DMA Extension HAL module driver
|
* @brief DMA Extension HAL module driver
|
||||||
* This file provides firmware functions to manage the following
|
* This file provides firmware functions to manage the following
|
||||||
* functionalities of the DMA Extension peripheral:
|
* functionalities of the DMA Extension peripheral:
|
||||||
|
@ -118,39 +118,46 @@ static void DMA_MultiBufferSetConfig(DMA_HandleTypeDef *hdma, uint32_t SrcAddres
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_DMAEx_MultiBufferStart(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t SecondMemAddress, uint32_t DataLength)
|
HAL_StatusTypeDef HAL_DMAEx_MultiBufferStart(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t SecondMemAddress, uint32_t DataLength)
|
||||||
{
|
{
|
||||||
/* Process Locked */
|
HAL_StatusTypeDef status = HAL_OK;
|
||||||
__HAL_LOCK(hdma);
|
|
||||||
|
/* Check the parameters */
|
||||||
/* Current memory buffer used is Memory 0 */
|
|
||||||
if((hdma->Instance->CR & DMA_SxCR_CT) == 0U)
|
|
||||||
{
|
|
||||||
hdma->State = HAL_DMA_STATE_BUSY_MEM0;
|
|
||||||
}
|
|
||||||
/* Current memory buffer used is Memory 1 */
|
|
||||||
else if((hdma->Instance->CR & DMA_SxCR_CT) != 0U)
|
|
||||||
{
|
|
||||||
hdma->State = HAL_DMA_STATE_BUSY_MEM1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check the parameters */
|
|
||||||
assert_param(IS_DMA_BUFFER_SIZE(DataLength));
|
assert_param(IS_DMA_BUFFER_SIZE(DataLength));
|
||||||
|
|
||||||
/* Disable the peripheral */
|
/* Memory-to-memory transfer not supported in double buffering mode */
|
||||||
__HAL_DMA_DISABLE(hdma);
|
if (hdma->Init.Direction == DMA_MEMORY_TO_MEMORY)
|
||||||
|
{
|
||||||
/* Enable the double buffer mode */
|
hdma->ErrorCode = HAL_DMA_ERROR_NOT_SUPPORTED;
|
||||||
hdma->Instance->CR |= (uint32_t)DMA_SxCR_DBM;
|
status = HAL_ERROR;
|
||||||
|
}
|
||||||
/* Configure DMA Stream destination address */
|
else
|
||||||
hdma->Instance->M1AR = SecondMemAddress;
|
{
|
||||||
|
/* Process Locked */
|
||||||
/* Configure the source, destination address and the data length */
|
__HAL_LOCK(hdma);
|
||||||
DMA_MultiBufferSetConfig(hdma, SrcAddress, DstAddress, DataLength);
|
|
||||||
|
if(HAL_DMA_STATE_READY == hdma->State)
|
||||||
/* Enable the peripheral */
|
{
|
||||||
__HAL_DMA_ENABLE(hdma);
|
/* Change DMA peripheral state */
|
||||||
|
hdma->State = HAL_DMA_STATE_BUSY;
|
||||||
return HAL_OK;
|
|
||||||
|
/* Enable the double buffer mode */
|
||||||
|
hdma->Instance->CR |= (uint32_t)DMA_SxCR_DBM;
|
||||||
|
|
||||||
|
/* Configure DMA Stream destination address */
|
||||||
|
hdma->Instance->M1AR = SecondMemAddress;
|
||||||
|
|
||||||
|
/* Configure the source, destination address and the data length */
|
||||||
|
DMA_MultiBufferSetConfig(hdma, SrcAddress, DstAddress, DataLength);
|
||||||
|
|
||||||
|
/* Enable the peripheral */
|
||||||
|
__HAL_DMA_ENABLE(hdma);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Return error status */
|
||||||
|
status = HAL_BUSY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -165,54 +172,73 @@ HAL_StatusTypeDef HAL_DMAEx_MultiBufferStart(DMA_HandleTypeDef *hdma, uint32_t S
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_DMAEx_MultiBufferStart_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t SecondMemAddress, uint32_t DataLength)
|
HAL_StatusTypeDef HAL_DMAEx_MultiBufferStart_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t SecondMemAddress, uint32_t DataLength)
|
||||||
{
|
{
|
||||||
/* Process Locked */
|
HAL_StatusTypeDef status = HAL_OK;
|
||||||
__HAL_LOCK(hdma);
|
|
||||||
|
|
||||||
/* Current memory buffer used is Memory 0 */
|
|
||||||
if((hdma->Instance->CR & DMA_SxCR_CT) == 0U)
|
|
||||||
{
|
|
||||||
hdma->State = HAL_DMA_STATE_BUSY_MEM0;
|
|
||||||
}
|
|
||||||
/* Current memory buffer used is Memory 1 */
|
|
||||||
else if((hdma->Instance->CR & DMA_SxCR_CT) != 0U)
|
|
||||||
{
|
|
||||||
hdma->State = HAL_DMA_STATE_BUSY_MEM1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check the parameters */
|
/* Check the parameters */
|
||||||
assert_param(IS_DMA_BUFFER_SIZE(DataLength));
|
assert_param(IS_DMA_BUFFER_SIZE(DataLength));
|
||||||
|
|
||||||
|
/* Memory-to-memory transfer not supported in double buffering mode */
|
||||||
|
if (hdma->Init.Direction == DMA_MEMORY_TO_MEMORY)
|
||||||
|
{
|
||||||
|
hdma->ErrorCode = HAL_DMA_ERROR_NOT_SUPPORTED;
|
||||||
|
return HAL_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Check callback functions */
|
||||||
|
if ((NULL == hdma->XferCpltCallback) || (NULL == hdma->XferM1CpltCallback) || (NULL == hdma->XferErrorCallback))
|
||||||
|
{
|
||||||
|
hdma->ErrorCode = HAL_DMA_ERROR_PARAM;
|
||||||
|
return HAL_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Process locked */
|
||||||
|
__HAL_LOCK(hdma);
|
||||||
|
|
||||||
|
if(HAL_DMA_STATE_READY == hdma->State)
|
||||||
|
{
|
||||||
|
/* Change DMA peripheral state */
|
||||||
|
hdma->State = HAL_DMA_STATE_BUSY;
|
||||||
|
|
||||||
|
/* Initialize the error code */
|
||||||
|
hdma->ErrorCode = HAL_DMA_ERROR_NONE;
|
||||||
|
|
||||||
|
/* Enable the Double buffer mode */
|
||||||
|
hdma->Instance->CR |= (uint32_t)DMA_SxCR_DBM;
|
||||||
|
|
||||||
|
/* Configure DMA Stream destination address */
|
||||||
|
hdma->Instance->M1AR = SecondMemAddress;
|
||||||
|
|
||||||
|
/* Configure the source, destination address and the data length */
|
||||||
|
DMA_MultiBufferSetConfig(hdma, SrcAddress, DstAddress, DataLength);
|
||||||
|
|
||||||
|
/* Clear all flags */
|
||||||
|
__HAL_DMA_CLEAR_FLAG (hdma, __HAL_DMA_GET_TC_FLAG_INDEX(hdma));
|
||||||
|
__HAL_DMA_CLEAR_FLAG (hdma, __HAL_DMA_GET_HT_FLAG_INDEX(hdma));
|
||||||
|
__HAL_DMA_CLEAR_FLAG (hdma, __HAL_DMA_GET_TE_FLAG_INDEX(hdma));
|
||||||
|
__HAL_DMA_CLEAR_FLAG (hdma, __HAL_DMA_GET_DME_FLAG_INDEX(hdma));
|
||||||
|
__HAL_DMA_CLEAR_FLAG (hdma, __HAL_DMA_GET_FE_FLAG_INDEX(hdma));
|
||||||
|
|
||||||
/* Disable the peripheral */
|
/* Enable Common interrupts*/
|
||||||
__HAL_DMA_DISABLE(hdma);
|
hdma->Instance->CR |= DMA_IT_TC | DMA_IT_TE | DMA_IT_DME;
|
||||||
|
hdma->Instance->FCR |= DMA_IT_FE;
|
||||||
/* Enable the Double buffer mode */
|
|
||||||
hdma->Instance->CR |= (uint32_t)DMA_SxCR_DBM;
|
if((hdma->XferHalfCpltCallback != NULL) || (hdma->XferM1HalfCpltCallback != NULL))
|
||||||
|
{
|
||||||
/* Configure DMA Stream destination address */
|
hdma->Instance->CR |= DMA_IT_HT;
|
||||||
hdma->Instance->M1AR = SecondMemAddress;
|
}
|
||||||
|
|
||||||
/* Configure the source, destination address and the data length */
|
/* Enable the peripheral */
|
||||||
DMA_MultiBufferSetConfig(hdma, SrcAddress, DstAddress, DataLength);
|
__HAL_DMA_ENABLE(hdma);
|
||||||
|
}
|
||||||
/* Enable the transfer complete interrupt */
|
else
|
||||||
__HAL_DMA_ENABLE_IT(hdma, DMA_IT_TC);
|
{
|
||||||
|
/* Process unlocked */
|
||||||
/* Enable the Half transfer interrupt */
|
__HAL_UNLOCK(hdma);
|
||||||
__HAL_DMA_ENABLE_IT(hdma, DMA_IT_HT);
|
|
||||||
|
/* Return error status */
|
||||||
/* Enable the transfer Error interrupt */
|
status = HAL_BUSY;
|
||||||
__HAL_DMA_ENABLE_IT(hdma, DMA_IT_TE);
|
}
|
||||||
|
return status;
|
||||||
/* Enable the fifo Error interrupt */
|
|
||||||
__HAL_DMA_ENABLE_IT(hdma, DMA_IT_FE);
|
|
||||||
|
|
||||||
/* Enable the direct mode Error interrupt */
|
|
||||||
__HAL_DMA_ENABLE_IT(hdma, DMA_IT_DME);
|
|
||||||
|
|
||||||
/* Enable the peripheral */
|
|
||||||
__HAL_DMA_ENABLE(hdma);
|
|
||||||
|
|
||||||
return HAL_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_dma_ex.h
|
* @file stm32f4xx_hal_dma_ex.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief Header file of DMA HAL extension module.
|
* @brief Header file of DMA HAL extension module.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
MEMORY0 = 0x00U, /*!< Memory 0 */
|
MEMORY0 = 0x00U, /*!< Memory 0 */
|
||||||
MEMORY1 = 0x01U /*!< Memory 1 */
|
MEMORY1 = 0x01U /*!< Memory 1 */
|
||||||
}HAL_DMA_MemoryTypeDef;
|
}HAL_DMA_MemoryTypeDef;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_dsi.c
|
* @file stm32f4xx_hal_dsi.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief DSI HAL module driver.
|
* @brief DSI HAL module driver.
|
||||||
* This file provides firmware functions to manage the following
|
* This file provides firmware functions to manage the following
|
||||||
* functionalities of the DSI peripheral:
|
* functionalities of the DSI peripheral:
|
||||||
|
@ -329,61 +329,61 @@ HAL_StatusTypeDef HAL_DSI_ConfigErrorMonitor(DSI_HandleTypeDef *hdsi, uint32_t A
|
||||||
/* Store active errors to the handle */
|
/* Store active errors to the handle */
|
||||||
hdsi->ErrorMsk = ActiveErrors;
|
hdsi->ErrorMsk = ActiveErrors;
|
||||||
|
|
||||||
if(ActiveErrors & HAL_DSI_ERROR_ACK)
|
if((ActiveErrors & HAL_DSI_ERROR_ACK) != RESET)
|
||||||
{
|
{
|
||||||
/* Enable the interrupt generation on selected errors */
|
/* Enable the interrupt generation on selected errors */
|
||||||
hdsi->Instance->IER[0U] |= DSI_ERROR_ACK_MASK;
|
hdsi->Instance->IER[0U] |= DSI_ERROR_ACK_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ActiveErrors & HAL_DSI_ERROR_PHY)
|
if((ActiveErrors & HAL_DSI_ERROR_PHY) != RESET)
|
||||||
{
|
{
|
||||||
/* Enable the interrupt generation on selected errors */
|
/* Enable the interrupt generation on selected errors */
|
||||||
hdsi->Instance->IER[0U] |= DSI_ERROR_PHY_MASK;
|
hdsi->Instance->IER[0U] |= DSI_ERROR_PHY_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ActiveErrors & HAL_DSI_ERROR_TX)
|
if((ActiveErrors & HAL_DSI_ERROR_TX) != RESET)
|
||||||
{
|
{
|
||||||
/* Enable the interrupt generation on selected errors */
|
/* Enable the interrupt generation on selected errors */
|
||||||
hdsi->Instance->IER[1U] |= DSI_ERROR_TX_MASK;
|
hdsi->Instance->IER[1U] |= DSI_ERROR_TX_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ActiveErrors & HAL_DSI_ERROR_RX)
|
if((ActiveErrors & HAL_DSI_ERROR_RX) != RESET)
|
||||||
{
|
{
|
||||||
/* Enable the interrupt generation on selected errors */
|
/* Enable the interrupt generation on selected errors */
|
||||||
hdsi->Instance->IER[1U] |= DSI_ERROR_RX_MASK;
|
hdsi->Instance->IER[1U] |= DSI_ERROR_RX_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ActiveErrors & HAL_DSI_ERROR_ECC)
|
if((ActiveErrors & HAL_DSI_ERROR_ECC) != RESET)
|
||||||
{
|
{
|
||||||
/* Enable the interrupt generation on selected errors */
|
/* Enable the interrupt generation on selected errors */
|
||||||
hdsi->Instance->IER[1U] |= DSI_ERROR_ECC_MASK;
|
hdsi->Instance->IER[1U] |= DSI_ERROR_ECC_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ActiveErrors & HAL_DSI_ERROR_CRC)
|
if((ActiveErrors & HAL_DSI_ERROR_CRC) != RESET)
|
||||||
{
|
{
|
||||||
/* Enable the interrupt generation on selected errors */
|
/* Enable the interrupt generation on selected errors */
|
||||||
hdsi->Instance->IER[1U] |= DSI_ERROR_CRC_MASK;
|
hdsi->Instance->IER[1U] |= DSI_ERROR_CRC_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ActiveErrors & HAL_DSI_ERROR_PSE)
|
if((ActiveErrors & HAL_DSI_ERROR_PSE) != RESET)
|
||||||
{
|
{
|
||||||
/* Enable the interrupt generation on selected errors */
|
/* Enable the interrupt generation on selected errors */
|
||||||
hdsi->Instance->IER[1U] |= DSI_ERROR_PSE_MASK;
|
hdsi->Instance->IER[1U] |= DSI_ERROR_PSE_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ActiveErrors & HAL_DSI_ERROR_EOT)
|
if((ActiveErrors & HAL_DSI_ERROR_EOT) != RESET)
|
||||||
{
|
{
|
||||||
/* Enable the interrupt generation on selected errors */
|
/* Enable the interrupt generation on selected errors */
|
||||||
hdsi->Instance->IER[1U] |= DSI_ERROR_EOT_MASK;
|
hdsi->Instance->IER[1U] |= DSI_ERROR_EOT_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ActiveErrors & HAL_DSI_ERROR_OVF)
|
if((ActiveErrors & HAL_DSI_ERROR_OVF) != RESET)
|
||||||
{
|
{
|
||||||
/* Enable the interrupt generation on selected errors */
|
/* Enable the interrupt generation on selected errors */
|
||||||
hdsi->Instance->IER[1U] |= DSI_ERROR_OVF_MASK;
|
hdsi->Instance->IER[1U] |= DSI_ERROR_OVF_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ActiveErrors & HAL_DSI_ERROR_GEN)
|
if((ActiveErrors & HAL_DSI_ERROR_GEN) != RESET)
|
||||||
{
|
{
|
||||||
/* Enable the interrupt generation on selected errors */
|
/* Enable the interrupt generation on selected errors */
|
||||||
hdsi->Instance->IER[1U] |= DSI_ERROR_GEN_MASK;
|
hdsi->Instance->IER[1U] |= DSI_ERROR_GEN_MASK;
|
||||||
|
@ -486,52 +486,52 @@ void HAL_DSI_IRQHandler(DSI_HandleTypeDef *hdsi)
|
||||||
ErrorStatus1 = hdsi->Instance->ISR[1U];
|
ErrorStatus1 = hdsi->Instance->ISR[1U];
|
||||||
ErrorStatus1 &= hdsi->Instance->IER[1U];
|
ErrorStatus1 &= hdsi->Instance->IER[1U];
|
||||||
|
|
||||||
if(ErrorStatus0 & DSI_ERROR_ACK_MASK)
|
if((ErrorStatus0 & DSI_ERROR_ACK_MASK) != RESET)
|
||||||
{
|
{
|
||||||
hdsi->ErrorCode |= HAL_DSI_ERROR_ACK;
|
hdsi->ErrorCode |= HAL_DSI_ERROR_ACK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ErrorStatus0 & DSI_ERROR_PHY_MASK)
|
if((ErrorStatus0 & DSI_ERROR_PHY_MASK) != RESET)
|
||||||
{
|
{
|
||||||
hdsi->ErrorCode |= HAL_DSI_ERROR_PHY;
|
hdsi->ErrorCode |= HAL_DSI_ERROR_PHY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ErrorStatus1 & DSI_ERROR_TX_MASK)
|
if((ErrorStatus1 & DSI_ERROR_TX_MASK) != RESET)
|
||||||
{
|
{
|
||||||
hdsi->ErrorCode |= HAL_DSI_ERROR_TX;
|
hdsi->ErrorCode |= HAL_DSI_ERROR_TX;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ErrorStatus1 & DSI_ERROR_RX_MASK)
|
if((ErrorStatus1 & DSI_ERROR_RX_MASK) != RESET)
|
||||||
{
|
{
|
||||||
hdsi->ErrorCode |= HAL_DSI_ERROR_RX;
|
hdsi->ErrorCode |= HAL_DSI_ERROR_RX;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ErrorStatus1 & DSI_ERROR_ECC_MASK)
|
if((ErrorStatus1 & DSI_ERROR_ECC_MASK) != RESET)
|
||||||
{
|
{
|
||||||
hdsi->ErrorCode |= HAL_DSI_ERROR_ECC;
|
hdsi->ErrorCode |= HAL_DSI_ERROR_ECC;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ErrorStatus1 & DSI_ERROR_CRC_MASK)
|
if((ErrorStatus1 & DSI_ERROR_CRC_MASK) != RESET)
|
||||||
{
|
{
|
||||||
hdsi->ErrorCode |= HAL_DSI_ERROR_CRC;
|
hdsi->ErrorCode |= HAL_DSI_ERROR_CRC;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ErrorStatus1 & DSI_ERROR_PSE_MASK)
|
if((ErrorStatus1 & DSI_ERROR_PSE_MASK) != RESET)
|
||||||
{
|
{
|
||||||
hdsi->ErrorCode |= HAL_DSI_ERROR_PSE;
|
hdsi->ErrorCode |= HAL_DSI_ERROR_PSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ErrorStatus1 & DSI_ERROR_EOT_MASK)
|
if((ErrorStatus1 & DSI_ERROR_EOT_MASK) != RESET)
|
||||||
{
|
{
|
||||||
hdsi->ErrorCode |= HAL_DSI_ERROR_EOT;
|
hdsi->ErrorCode |= HAL_DSI_ERROR_EOT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ErrorStatus1 & DSI_ERROR_OVF_MASK)
|
if((ErrorStatus1 & DSI_ERROR_OVF_MASK) != RESET)
|
||||||
{
|
{
|
||||||
hdsi->ErrorCode |= HAL_DSI_ERROR_OVF;
|
hdsi->ErrorCode |= HAL_DSI_ERROR_OVF;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ErrorStatus1 & DSI_ERROR_GEN_MASK)
|
if((ErrorStatus1 & DSI_ERROR_GEN_MASK) != RESET)
|
||||||
{
|
{
|
||||||
hdsi->ErrorCode |= HAL_DSI_ERROR_GEN;
|
hdsi->ErrorCode |= HAL_DSI_ERROR_GEN;
|
||||||
}
|
}
|
||||||
|
@ -1266,17 +1266,17 @@ HAL_StatusTypeDef HAL_DSI_LongWrite(DSI_HandleTypeDef *hdsi,
|
||||||
if(uicounter == 0x00U)
|
if(uicounter == 0x00U)
|
||||||
{
|
{
|
||||||
hdsi->Instance->GPDR=(Param1 | \
|
hdsi->Instance->GPDR=(Param1 | \
|
||||||
((*(ParametersTable+uicounter))<<8U) | \
|
((uint32_t)(*(ParametersTable + uicounter)) << 8U) | \
|
||||||
((*(ParametersTable+uicounter+1U))<<16U) | \
|
((uint32_t)(*(ParametersTable + uicounter+1U))<<16U) | \
|
||||||
((*(ParametersTable+uicounter+2U))<<24U));
|
((uint32_t)(*(ParametersTable + uicounter+2U))<<24U));
|
||||||
uicounter += 3U;
|
uicounter+=3U;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
hdsi->Instance->GPDR=((*(ParametersTable+uicounter)) | \
|
hdsi->Instance->GPDR=((uint32_t)(*(ParametersTable + uicounter)) | \
|
||||||
((*(ParametersTable+uicounter+1U))<<8U) | \
|
((uint32_t)(*(ParametersTable + uicounter+1U)) << 8U) | \
|
||||||
((*(ParametersTable+uicounter+2U))<<16U) | \
|
((uint32_t)(*(ParametersTable + uicounter+2U)) << 16U) | \
|
||||||
((*(ParametersTable+uicounter+3U))<<24U));
|
((uint32_t)(*(ParametersTable + uicounter+3U)) << 24U));
|
||||||
uicounter+=4U;
|
uicounter+=4U;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1346,6 +1346,13 @@ HAL_StatusTypeDef HAL_DSI_Read(DSI_HandleTypeDef *hdsi,
|
||||||
{
|
{
|
||||||
DSI_ConfigPacketHeader(hdsi->Instance, ChannelNbr, Mode, ParametersTable[0U], ParametersTable[1U]);
|
DSI_ConfigPacketHeader(hdsi->Instance, ChannelNbr, Mode, ParametersTable[0U], ParametersTable[1U]);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Process Unlocked */
|
||||||
|
__HAL_UNLOCK(hdsi);
|
||||||
|
|
||||||
|
return HAL_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
/* Get tick */
|
/* Get tick */
|
||||||
tickstart = HAL_GetTick();
|
tickstart = HAL_GetTick();
|
||||||
|
@ -1837,7 +1844,7 @@ HAL_StatusTypeDef HAL_DSI_SetSDD(DSI_HandleTypeDef *hdsi, FunctionalState State)
|
||||||
|
|
||||||
/* Activate/Disactivate additional current path on all lanes */
|
/* Activate/Disactivate additional current path on all lanes */
|
||||||
hdsi->Instance->WPCR[1U] &= ~DSI_WPCR1_SDDC;
|
hdsi->Instance->WPCR[1U] &= ~DSI_WPCR1_SDDC;
|
||||||
hdsi->Instance->WPCR[1U] |= State<<12U;
|
hdsi->Instance->WPCR[1U] |= ((uint32_t)State << 12U);
|
||||||
|
|
||||||
/* Process unlocked */
|
/* Process unlocked */
|
||||||
__HAL_UNLOCK(hdsi);
|
__HAL_UNLOCK(hdsi);
|
||||||
|
@ -1873,19 +1880,19 @@ HAL_StatusTypeDef HAL_DSI_SetLanePinsConfiguration(DSI_HandleTypeDef *hdsi, uint
|
||||||
{
|
{
|
||||||
/* Swap pins on clock lane */
|
/* Swap pins on clock lane */
|
||||||
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_SWCL;
|
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_SWCL;
|
||||||
hdsi->Instance->WPCR[0U] |= (State<<6U);
|
hdsi->Instance->WPCR[0U] |= ((uint32_t)State << 6U);
|
||||||
}
|
}
|
||||||
else if(Lane == DSI_DATA_LANE0)
|
else if(Lane == DSI_DATA_LANE0)
|
||||||
{
|
{
|
||||||
/* Swap pins on data lane 0 */
|
/* Swap pins on data lane 0 */
|
||||||
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_SWDL0;
|
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_SWDL0;
|
||||||
hdsi->Instance->WPCR[0U] |= (State<<7U);
|
hdsi->Instance->WPCR[0U] |= ((uint32_t)State << 7U);
|
||||||
}
|
}
|
||||||
else if(Lane == DSI_DATA_LANE1)
|
else if(Lane == DSI_DATA_LANE1)
|
||||||
{
|
{
|
||||||
/* Swap pins on data lane 1 */
|
/* Swap pins on data lane 1 */
|
||||||
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_SWDL1;
|
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_SWDL1;
|
||||||
hdsi->Instance->WPCR[0U] |= (State<<8U);
|
hdsi->Instance->WPCR[0U] |= ((uint32_t)State << 8U);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DSI_INVERT_HS_SIGNAL:
|
case DSI_INVERT_HS_SIGNAL:
|
||||||
|
@ -1893,19 +1900,19 @@ HAL_StatusTypeDef HAL_DSI_SetLanePinsConfiguration(DSI_HandleTypeDef *hdsi, uint
|
||||||
{
|
{
|
||||||
/* Invert HS signal on clock lane */
|
/* Invert HS signal on clock lane */
|
||||||
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_HSICL;
|
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_HSICL;
|
||||||
hdsi->Instance->WPCR[0U] |= (State<<9U);
|
hdsi->Instance->WPCR[0U] |= ((uint32_t)State << 9U);
|
||||||
}
|
}
|
||||||
else if(Lane == DSI_DATA_LANE0)
|
else if(Lane == DSI_DATA_LANE0)
|
||||||
{
|
{
|
||||||
/* Invert HS signal on data lane 0 */
|
/* Invert HS signal on data lane 0 */
|
||||||
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_HSIDL0;
|
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_HSIDL0;
|
||||||
hdsi->Instance->WPCR[0U] |= (State<<10U);
|
hdsi->Instance->WPCR[0U] |= ((uint32_t)State << 10U);
|
||||||
}
|
}
|
||||||
else if(Lane == DSI_DATA_LANE1)
|
else if(Lane == DSI_DATA_LANE1)
|
||||||
{
|
{
|
||||||
/* Invert HS signal on data lane 1 */
|
/* Invert HS signal on data lane 1 */
|
||||||
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_HSIDL1;
|
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_HSIDL1;
|
||||||
hdsi->Instance->WPCR[0U] |= (State<<11U);
|
hdsi->Instance->WPCR[0U] |= ((uint32_t)State << 11U);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -1942,7 +1949,7 @@ HAL_StatusTypeDef HAL_DSI_SetPHYTimings(DSI_HandleTypeDef *hdsi, uint32_t Timing
|
||||||
case DSI_TCLK_POST:
|
case DSI_TCLK_POST:
|
||||||
/* Enable/Disable custom timing setting */
|
/* Enable/Disable custom timing setting */
|
||||||
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_TCLKPOSTEN;
|
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_TCLKPOSTEN;
|
||||||
hdsi->Instance->WPCR[0U] |= (State<<27U);
|
hdsi->Instance->WPCR[0U] |= ((uint32_t)State << 27U);
|
||||||
|
|
||||||
if(State)
|
if(State)
|
||||||
{
|
{
|
||||||
|
@ -1955,7 +1962,7 @@ HAL_StatusTypeDef HAL_DSI_SetPHYTimings(DSI_HandleTypeDef *hdsi, uint32_t Timing
|
||||||
case DSI_TLPX_CLK:
|
case DSI_TLPX_CLK:
|
||||||
/* Enable/Disable custom timing setting */
|
/* Enable/Disable custom timing setting */
|
||||||
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_TLPXCEN;
|
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_TLPXCEN;
|
||||||
hdsi->Instance->WPCR[0U] |= (State<<26U);
|
hdsi->Instance->WPCR[0U] |= ((uint32_t)State << 26U);
|
||||||
|
|
||||||
if(State)
|
if(State)
|
||||||
{
|
{
|
||||||
|
@ -1968,7 +1975,7 @@ HAL_StatusTypeDef HAL_DSI_SetPHYTimings(DSI_HandleTypeDef *hdsi, uint32_t Timing
|
||||||
case DSI_THS_EXIT:
|
case DSI_THS_EXIT:
|
||||||
/* Enable/Disable custom timing setting */
|
/* Enable/Disable custom timing setting */
|
||||||
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_THSEXITEN;
|
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_THSEXITEN;
|
||||||
hdsi->Instance->WPCR[0U] |= (State<<25U);
|
hdsi->Instance->WPCR[0U] |= ((uint32_t)State << 25U);
|
||||||
|
|
||||||
if(State)
|
if(State)
|
||||||
{
|
{
|
||||||
|
@ -1981,7 +1988,7 @@ HAL_StatusTypeDef HAL_DSI_SetPHYTimings(DSI_HandleTypeDef *hdsi, uint32_t Timing
|
||||||
case DSI_TLPX_DATA:
|
case DSI_TLPX_DATA:
|
||||||
/* Enable/Disable custom timing setting */
|
/* Enable/Disable custom timing setting */
|
||||||
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_TLPXDEN;
|
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_TLPXDEN;
|
||||||
hdsi->Instance->WPCR[0U] |= (State<<24U);
|
hdsi->Instance->WPCR[0U] |= ((uint32_t)State << 24U);
|
||||||
|
|
||||||
if(State)
|
if(State)
|
||||||
{
|
{
|
||||||
|
@ -1994,7 +2001,7 @@ HAL_StatusTypeDef HAL_DSI_SetPHYTimings(DSI_HandleTypeDef *hdsi, uint32_t Timing
|
||||||
case DSI_THS_ZERO:
|
case DSI_THS_ZERO:
|
||||||
/* Enable/Disable custom timing setting */
|
/* Enable/Disable custom timing setting */
|
||||||
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_THSZEROEN;
|
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_THSZEROEN;
|
||||||
hdsi->Instance->WPCR[0U] |= (State<<23U);
|
hdsi->Instance->WPCR[0U] |= ((uint32_t)State << 23U);
|
||||||
|
|
||||||
if(State)
|
if(State)
|
||||||
{
|
{
|
||||||
|
@ -2007,7 +2014,7 @@ HAL_StatusTypeDef HAL_DSI_SetPHYTimings(DSI_HandleTypeDef *hdsi, uint32_t Timing
|
||||||
case DSI_THS_TRAIL:
|
case DSI_THS_TRAIL:
|
||||||
/* Enable/Disable custom timing setting */
|
/* Enable/Disable custom timing setting */
|
||||||
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_THSTRAILEN;
|
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_THSTRAILEN;
|
||||||
hdsi->Instance->WPCR[0U] |= (State<<22U);
|
hdsi->Instance->WPCR[0U] |= ((uint32_t)State << 22U);
|
||||||
|
|
||||||
if(State)
|
if(State)
|
||||||
{
|
{
|
||||||
|
@ -2020,7 +2027,7 @@ HAL_StatusTypeDef HAL_DSI_SetPHYTimings(DSI_HandleTypeDef *hdsi, uint32_t Timing
|
||||||
case DSI_THS_PREPARE:
|
case DSI_THS_PREPARE:
|
||||||
/* Enable/Disable custom timing setting */
|
/* Enable/Disable custom timing setting */
|
||||||
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_THSPREPEN;
|
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_THSPREPEN;
|
||||||
hdsi->Instance->WPCR[0U] |= (State<<21U);
|
hdsi->Instance->WPCR[0U] |= ((uint32_t)State << 21U);
|
||||||
|
|
||||||
if(State)
|
if(State)
|
||||||
{
|
{
|
||||||
|
@ -2033,7 +2040,7 @@ HAL_StatusTypeDef HAL_DSI_SetPHYTimings(DSI_HandleTypeDef *hdsi, uint32_t Timing
|
||||||
case DSI_TCLK_ZERO:
|
case DSI_TCLK_ZERO:
|
||||||
/* Enable/Disable custom timing setting */
|
/* Enable/Disable custom timing setting */
|
||||||
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_TCLKZEROEN;
|
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_TCLKZEROEN;
|
||||||
hdsi->Instance->WPCR[0U] |= (State<<20U);
|
hdsi->Instance->WPCR[0U] |= ((uint32_t)State << 20U);
|
||||||
|
|
||||||
if(State)
|
if(State)
|
||||||
{
|
{
|
||||||
|
@ -2046,7 +2053,7 @@ HAL_StatusTypeDef HAL_DSI_SetPHYTimings(DSI_HandleTypeDef *hdsi, uint32_t Timing
|
||||||
case DSI_TCLK_PREPARE:
|
case DSI_TCLK_PREPARE:
|
||||||
/* Enable/Disable custom timing setting */
|
/* Enable/Disable custom timing setting */
|
||||||
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_TCLKPREPEN;
|
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_TCLKPREPEN;
|
||||||
hdsi->Instance->WPCR[0U] |= (State<<19U);
|
hdsi->Instance->WPCR[0U] |= ((uint32_t)State << 19U);
|
||||||
|
|
||||||
if(State)
|
if(State)
|
||||||
{
|
{
|
||||||
|
@ -2088,13 +2095,13 @@ HAL_StatusTypeDef HAL_DSI_ForceTXStopMode(DSI_HandleTypeDef *hdsi, uint32_t Lane
|
||||||
{
|
{
|
||||||
/* Force/Unforce the Clock Lane in TX Stop Mode */
|
/* Force/Unforce the Clock Lane in TX Stop Mode */
|
||||||
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_FTXSMCL;
|
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_FTXSMCL;
|
||||||
hdsi->Instance->WPCR[0U] |= (State<<12U);
|
hdsi->Instance->WPCR[0U] |= ((uint32_t)State << 12U);
|
||||||
}
|
}
|
||||||
else if(Lane == DSI_DATA_LANES)
|
else if(Lane == DSI_DATA_LANES)
|
||||||
{
|
{
|
||||||
/* Force/Unforce the Data Lanes in TX Stop Mode */
|
/* Force/Unforce the Data Lanes in TX Stop Mode */
|
||||||
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_FTXSMDL;
|
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_FTXSMDL;
|
||||||
hdsi->Instance->WPCR[0U] |= (State<<13U);
|
hdsi->Instance->WPCR[0U] |= ((uint32_t)State << 13U);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Process unlocked */
|
/* Process unlocked */
|
||||||
|
@ -2120,7 +2127,7 @@ HAL_StatusTypeDef HAL_DSI_ForceRXLowPower(DSI_HandleTypeDef *hdsi, FunctionalSta
|
||||||
|
|
||||||
/* Force/Unforce LP Receiver in Low-Power Mode */
|
/* Force/Unforce LP Receiver in Low-Power Mode */
|
||||||
hdsi->Instance->WPCR[1U] &= ~DSI_WPCR1_FLPRXLPM;
|
hdsi->Instance->WPCR[1U] &= ~DSI_WPCR1_FLPRXLPM;
|
||||||
hdsi->Instance->WPCR[1U] |= State<<22U;
|
hdsi->Instance->WPCR[1U] |= ((uint32_t)State << 22U);
|
||||||
|
|
||||||
/* Process unlocked */
|
/* Process unlocked */
|
||||||
__HAL_UNLOCK(hdsi);
|
__HAL_UNLOCK(hdsi);
|
||||||
|
@ -2145,7 +2152,7 @@ HAL_StatusTypeDef HAL_DSI_ForceDataLanesInRX(DSI_HandleTypeDef *hdsi, Functional
|
||||||
|
|
||||||
/* Force Data Lanes in RX Mode */
|
/* Force Data Lanes in RX Mode */
|
||||||
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_TDDL;
|
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_TDDL;
|
||||||
hdsi->Instance->WPCR[0U] |= State<<16U;
|
hdsi->Instance->WPCR[0U] |= ((uint32_t)State << 16U);
|
||||||
|
|
||||||
/* Process unlocked */
|
/* Process unlocked */
|
||||||
__HAL_UNLOCK(hdsi);
|
__HAL_UNLOCK(hdsi);
|
||||||
|
@ -2170,7 +2177,7 @@ HAL_StatusTypeDef HAL_DSI_SetPullDown(DSI_HandleTypeDef *hdsi, FunctionalState S
|
||||||
|
|
||||||
/* Enable/Disable pull-down on lanes */
|
/* Enable/Disable pull-down on lanes */
|
||||||
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_PDEN;
|
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_PDEN;
|
||||||
hdsi->Instance->WPCR[0U] |= State<<18U;
|
hdsi->Instance->WPCR[0U] |= ((uint32_t)State << 18U);
|
||||||
|
|
||||||
/* Process unlocked */
|
/* Process unlocked */
|
||||||
__HAL_UNLOCK(hdsi);
|
__HAL_UNLOCK(hdsi);
|
||||||
|
@ -2195,7 +2202,7 @@ HAL_StatusTypeDef HAL_DSI_SetContentionDetectionOff(DSI_HandleTypeDef *hdsi, Fun
|
||||||
|
|
||||||
/* Contention Detection on Data Lanes OFF */
|
/* Contention Detection on Data Lanes OFF */
|
||||||
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_CDOFFDL;
|
hdsi->Instance->WPCR[0U] &= ~DSI_WPCR0_CDOFFDL;
|
||||||
hdsi->Instance->WPCR[0U] |= State<<14U;
|
hdsi->Instance->WPCR[0U] |= ((uint32_t)State << 14U);
|
||||||
|
|
||||||
/* Process unlocked */
|
/* Process unlocked */
|
||||||
__HAL_UNLOCK(hdsi);
|
__HAL_UNLOCK(hdsi);
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_dsi.h
|
* @file stm32f4xx_hal_dsi.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief Header file of DSI HAL module.
|
* @brief Header file of DSI HAL module.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
@ -1035,7 +1035,7 @@ HAL_StatusTypeDef HAL_DSI_ConfigVideoMode(DSI_HandleTypeDef *hdsi, DSI_VidCfgTyp
|
||||||
HAL_StatusTypeDef HAL_DSI_ConfigAdaptedCommandMode(DSI_HandleTypeDef *hdsi, DSI_CmdCfgTypeDef *CmdCfg);
|
HAL_StatusTypeDef HAL_DSI_ConfigAdaptedCommandMode(DSI_HandleTypeDef *hdsi, DSI_CmdCfgTypeDef *CmdCfg);
|
||||||
HAL_StatusTypeDef HAL_DSI_ConfigCommand(DSI_HandleTypeDef *hdsi, DSI_LPCmdTypeDef *LPCmd);
|
HAL_StatusTypeDef HAL_DSI_ConfigCommand(DSI_HandleTypeDef *hdsi, DSI_LPCmdTypeDef *LPCmd);
|
||||||
HAL_StatusTypeDef HAL_DSI_ConfigFlowControl(DSI_HandleTypeDef *hdsi, uint32_t FlowControl);
|
HAL_StatusTypeDef HAL_DSI_ConfigFlowControl(DSI_HandleTypeDef *hdsi, uint32_t FlowControl);
|
||||||
HAL_StatusTypeDef HAL_DSI_ConfigPhyTimer(DSI_HandleTypeDef *hdsi, DSI_PHY_TimerTypeDef *PhyTimings);
|
HAL_StatusTypeDef HAL_DSI_ConfigPhyTimer(DSI_HandleTypeDef *hdsi, DSI_PHY_TimerTypeDef *PhyTimers);
|
||||||
HAL_StatusTypeDef HAL_DSI_ConfigHostTimeouts(DSI_HandleTypeDef *hdsi, DSI_HOST_TimeoutTypeDef *HostTimeouts);
|
HAL_StatusTypeDef HAL_DSI_ConfigHostTimeouts(DSI_HandleTypeDef *hdsi, DSI_HOST_TimeoutTypeDef *HostTimeouts);
|
||||||
HAL_StatusTypeDef HAL_DSI_Start(DSI_HandleTypeDef *hdsi);
|
HAL_StatusTypeDef HAL_DSI_Start(DSI_HandleTypeDef *hdsi);
|
||||||
HAL_StatusTypeDef HAL_DSI_Stop(DSI_HandleTypeDef *hdsi);
|
HAL_StatusTypeDef HAL_DSI_Stop(DSI_HandleTypeDef *hdsi);
|
||||||
|
@ -1050,7 +1050,7 @@ HAL_StatusTypeDef HAL_DSI_ShortWrite(DSI_HandleTypeDef *hdsi,
|
||||||
HAL_StatusTypeDef HAL_DSI_LongWrite(DSI_HandleTypeDef *hdsi,
|
HAL_StatusTypeDef HAL_DSI_LongWrite(DSI_HandleTypeDef *hdsi,
|
||||||
uint32_t ChannelID,
|
uint32_t ChannelID,
|
||||||
uint32_t Mode,
|
uint32_t Mode,
|
||||||
uint32_t Nbparams,
|
uint32_t NbParams,
|
||||||
uint32_t Param1,
|
uint32_t Param1,
|
||||||
uint8_t* ParametersTable);
|
uint8_t* ParametersTable);
|
||||||
HAL_StatusTypeDef HAL_DSI_Read(DSI_HandleTypeDef *hdsi,
|
HAL_StatusTypeDef HAL_DSI_Read(DSI_HandleTypeDef *hdsi,
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_eth.c
|
* @file stm32f4xx_hal_eth.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief ETH HAL module driver.
|
* @brief ETH HAL module driver.
|
||||||
* This file provides firmware functions to manage the following
|
* This file provides firmware functions to manage the following
|
||||||
* functionalities of the Ethernet (ETH) peripheral:
|
* functionalities of the Ethernet (ETH) peripheral:
|
||||||
|
@ -144,6 +144,7 @@ static void ETH_DMATransmissionDisable(ETH_HandleTypeDef *heth);
|
||||||
static void ETH_DMAReceptionEnable(ETH_HandleTypeDef *heth);
|
static void ETH_DMAReceptionEnable(ETH_HandleTypeDef *heth);
|
||||||
static void ETH_DMAReceptionDisable(ETH_HandleTypeDef *heth);
|
static void ETH_DMAReceptionDisable(ETH_HandleTypeDef *heth);
|
||||||
static void ETH_FlushTransmitFIFO(ETH_HandleTypeDef *heth);
|
static void ETH_FlushTransmitFIFO(ETH_HandleTypeDef *heth);
|
||||||
|
static void ETH_Delay(uint32_t mdelay);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
@ -1895,7 +1896,7 @@ static void ETH_MACTransmissionEnable(ETH_HandleTypeDef *heth)
|
||||||
/* Wait until the write operation will be taken into account:
|
/* Wait until the write operation will be taken into account:
|
||||||
at least four TX_CLK/RX_CLK clock cycles */
|
at least four TX_CLK/RX_CLK clock cycles */
|
||||||
tmpreg1 = (heth->Instance)->MACCR;
|
tmpreg1 = (heth->Instance)->MACCR;
|
||||||
HAL_Delay(ETH_REG_WRITE_DELAY);
|
ETH_Delay(ETH_REG_WRITE_DELAY);
|
||||||
(heth->Instance)->MACCR = tmpreg1;
|
(heth->Instance)->MACCR = tmpreg1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1915,7 +1916,7 @@ static void ETH_MACTransmissionDisable(ETH_HandleTypeDef *heth)
|
||||||
/* Wait until the write operation will be taken into account:
|
/* Wait until the write operation will be taken into account:
|
||||||
at least four TX_CLK/RX_CLK clock cycles */
|
at least four TX_CLK/RX_CLK clock cycles */
|
||||||
tmpreg1 = (heth->Instance)->MACCR;
|
tmpreg1 = (heth->Instance)->MACCR;
|
||||||
HAL_Delay(ETH_REG_WRITE_DELAY);
|
ETH_Delay(ETH_REG_WRITE_DELAY);
|
||||||
(heth->Instance)->MACCR = tmpreg1;
|
(heth->Instance)->MACCR = tmpreg1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1935,7 +1936,7 @@ static void ETH_MACReceptionEnable(ETH_HandleTypeDef *heth)
|
||||||
/* Wait until the write operation will be taken into account:
|
/* Wait until the write operation will be taken into account:
|
||||||
at least four TX_CLK/RX_CLK clock cycles */
|
at least four TX_CLK/RX_CLK clock cycles */
|
||||||
tmpreg1 = (heth->Instance)->MACCR;
|
tmpreg1 = (heth->Instance)->MACCR;
|
||||||
HAL_Delay(ETH_REG_WRITE_DELAY);
|
ETH_Delay(ETH_REG_WRITE_DELAY);
|
||||||
(heth->Instance)->MACCR = tmpreg1;
|
(heth->Instance)->MACCR = tmpreg1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1955,7 +1956,7 @@ static void ETH_MACReceptionDisable(ETH_HandleTypeDef *heth)
|
||||||
/* Wait until the write operation will be taken into account:
|
/* Wait until the write operation will be taken into account:
|
||||||
at least four TX_CLK/RX_CLK clock cycles */
|
at least four TX_CLK/RX_CLK clock cycles */
|
||||||
tmpreg1 = (heth->Instance)->MACCR;
|
tmpreg1 = (heth->Instance)->MACCR;
|
||||||
HAL_Delay(ETH_REG_WRITE_DELAY);
|
ETH_Delay(ETH_REG_WRITE_DELAY);
|
||||||
(heth->Instance)->MACCR = tmpreg1;
|
(heth->Instance)->MACCR = tmpreg1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2023,10 +2024,25 @@ static void ETH_FlushTransmitFIFO(ETH_HandleTypeDef *heth)
|
||||||
/* Wait until the write operation will be taken into account:
|
/* Wait until the write operation will be taken into account:
|
||||||
at least four TX_CLK/RX_CLK clock cycles */
|
at least four TX_CLK/RX_CLK clock cycles */
|
||||||
tmpreg1 = (heth->Instance)->DMAOMR;
|
tmpreg1 = (heth->Instance)->DMAOMR;
|
||||||
HAL_Delay(ETH_REG_WRITE_DELAY);
|
ETH_Delay(ETH_REG_WRITE_DELAY);
|
||||||
(heth->Instance)->DMAOMR = tmpreg1;
|
(heth->Instance)->DMAOMR = tmpreg1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function provides delay (in milliseconds) based on CPU cycles method.
|
||||||
|
* @param mdelay: specifies the delay time length, in milliseconds.
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
static void ETH_Delay(uint32_t mdelay)
|
||||||
|
{
|
||||||
|
__IO uint32_t Delay = mdelay * (SystemCoreClock / 8 / 1000);
|
||||||
|
do
|
||||||
|
{
|
||||||
|
__NOP();
|
||||||
|
}
|
||||||
|
while (Delay --);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_eth.h
|
* @file stm32f4xx_hal_eth.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief Header file of ETH HAL module.
|
* @brief Header file of ETH HAL module.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_flash.c
|
* @file stm32f4xx_hal_flash.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief FLASH HAL module driver.
|
* @brief FLASH HAL module driver.
|
||||||
* This file provides firmware functions to manage the following
|
* This file provides firmware functions to manage the following
|
||||||
* functionalities of the internal FLASH memory:
|
* functionalities of the internal FLASH memory:
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_flash.h
|
* @file stm32f4xx_hal_flash.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief Header file of FLASH HAL module.
|
* @brief Header file of FLASH HAL module.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f4xx_hal_flash_ex.c
|
* @file stm32f4xx_hal_flash_ex.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @version V1.4.4
|
* @version V1.5.0
|
||||||
* @date 22-January-2016
|
* @date 06-May-2016
|
||||||
* @brief Extended FLASH HAL module driver.
|
* @brief Extended FLASH HAL module driver.
|
||||||
* This file provides firmware functions to manage the following
|
* This file provides firmware functions to manage the following
|
||||||
* functionalities of the FLASH extension peripheral:
|
* functionalities of the FLASH extension peripheral:
|
||||||
|
@ -129,10 +129,10 @@ static uint8_t FLASH_OB_GetRDP(void);
|
||||||
static uint8_t FLASH_OB_GetBOR(void);
|
static uint8_t FLASH_OB_GetBOR(void);
|
||||||
|
|
||||||
#if defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) || defined(STM32F410Rx) || defined(STM32F411xE) ||\
|
#if defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) || defined(STM32F410Rx) || defined(STM32F411xE) ||\
|
||||||
defined(STM32F446xx)
|
defined(STM32F446xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx)
|
||||||
static HAL_StatusTypeDef FLASH_OB_EnablePCROP(uint32_t Sector);
|
static HAL_StatusTypeDef FLASH_OB_EnablePCROP(uint32_t Sector);
|
||||||
static HAL_StatusTypeDef FLASH_OB_DisablePCROP(uint32_t Sector);
|
static HAL_StatusTypeDef FLASH_OB_DisablePCROP(uint32_t Sector);
|
||||||
#endif /* STM32F401xC || STM32F401xE || STM32F410xx || STM32F411xE || STM32F446xx */
|
#endif /* STM32F401xC || STM32F401xE || STM32F410xx || STM32F411xE || STM32F446xx || STM32F412Zx || STM32F412Vx || STM32F412Rx || STM32F412Cx */
|
||||||
|
|
||||||
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx)|| defined(STM32F439xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx)|| defined(STM32F439xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
static HAL_StatusTypeDef FLASH_OB_EnablePCROP(uint32_t SectorBank1, uint32_t SectorBank2, uint32_t Banks);
|
static HAL_StatusTypeDef FLASH_OB_EnablePCROP(uint32_t SectorBank1, uint32_t SectorBank2, uint32_t Banks);
|
||||||
|
@ -378,7 +378,8 @@ void HAL_FLASHEx_OBGetConfig(FLASH_OBProgramInitTypeDef *pOBInit)
|
||||||
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) ||\
|
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) ||\
|
||||||
defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) ||\
|
defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) ||\
|
||||||
defined(STM32F410Rx) || defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F469xx) ||\
|
defined(STM32F410Rx) || defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F469xx) ||\
|
||||||
defined(STM32F479xx)
|
defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) ||\
|
||||||
|
defined(STM32F412Cx)
|
||||||
/**
|
/**
|
||||||
* @brief Program option bytes
|
* @brief Program option bytes
|
||||||
* @param pAdvOBInit: pointer to an FLASH_AdvOBProgramInitTypeDef structure that
|
* @param pAdvOBInit: pointer to an FLASH_AdvOBProgramInitTypeDef structure that
|
||||||
|
@ -402,21 +403,23 @@ HAL_StatusTypeDef HAL_FLASHEx_AdvOBProgram (FLASH_AdvOBProgramInitTypeDef *pAdvO
|
||||||
{
|
{
|
||||||
/*Enable of Write protection on the selected Sector*/
|
/*Enable of Write protection on the selected Sector*/
|
||||||
#if defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) || defined(STM32F410Rx) ||\
|
#if defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) || defined(STM32F410Rx) ||\
|
||||||
defined(STM32F411xE) || defined(STM32F446xx)
|
defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) ||\
|
||||||
|
defined(STM32F412Cx)
|
||||||
status = FLASH_OB_EnablePCROP(pAdvOBInit->Sectors);
|
status = FLASH_OB_EnablePCROP(pAdvOBInit->Sectors);
|
||||||
#else /* STM32F427xx || STM32F437xx || STM32F429xx|| STM32F439xx || STM32F469xx || STM32F479xx */
|
#else /* STM32F427xx || STM32F437xx || STM32F429xx|| STM32F439xx || STM32F469xx || STM32F479xx */
|
||||||
status = FLASH_OB_EnablePCROP(pAdvOBInit->SectorsBank1, pAdvOBInit->SectorsBank2, pAdvOBInit->Banks);
|
status = FLASH_OB_EnablePCROP(pAdvOBInit->SectorsBank1, pAdvOBInit->SectorsBank2, pAdvOBInit->Banks);
|
||||||
#endif /* STM32F401xC || STM32F401xE || STM32F410xx || STM32F411xE || STM32F446xx */
|
#endif /* STM32F401xC || STM32F401xE || STM32F410xx || STM32F411xE || STM32F446xx || STM32F412Zx || STM32F412Vx || STM32F412Rx || STM32F412Cx */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*Disable of Write protection on the selected Sector*/
|
/*Disable of Write protection on the selected Sector*/
|
||||||
#if defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) || defined(STM32F410Rx) ||\
|
#if defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) || defined(STM32F410Rx) ||\
|
||||||
defined(STM32F411xE) || defined(STM32F446xx)
|
defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) ||\
|
||||||
|
defined(STM32F412Cx)
|
||||||
status = FLASH_OB_DisablePCROP(pAdvOBInit->Sectors);
|
status = FLASH_OB_DisablePCROP(pAdvOBInit->Sectors);
|
||||||
#else /* STM32F427xx || STM32F437xx || STM32F429xx|| STM32F439xx || STM32F469xx || STM32F479xx */
|
#else /* STM32F427xx || STM32F437xx || STM32F429xx|| STM32F439xx || STM32F469xx || STM32F479xx */
|
||||||
status = FLASH_OB_DisablePCROP(pAdvOBInit->SectorsBank1, pAdvOBInit->SectorsBank2, pAdvOBInit->Banks);
|
status = FLASH_OB_DisablePCROP(pAdvOBInit->SectorsBank1, pAdvOBInit->SectorsBank2, pAdvOBInit->Banks);
|
||||||
#endif /* STM32F401xC || STM32F401xE || STM32F410xx || STM32F411xE || STM32F446xx */
|
#endif /* STM32F401xC || STM32F401xE || STM32F410xx || STM32F411xE || STM32F446xx || STM32F412Zx || STM32F412Vx || STM32F412Rx || STM32F412Cx */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -441,7 +444,8 @@ HAL_StatusTypeDef HAL_FLASHEx_AdvOBProgram (FLASH_AdvOBProgramInitTypeDef *pAdvO
|
||||||
void HAL_FLASHEx_AdvOBGetConfig(FLASH_AdvOBProgramInitTypeDef *pAdvOBInit)
|
void HAL_FLASHEx_AdvOBGetConfig(FLASH_AdvOBProgramInitTypeDef *pAdvOBInit)
|
||||||
{
|
{
|
||||||
#if defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) || defined(STM32F410Rx) ||\
|
#if defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) || defined(STM32F410Rx) ||\
|
||||||
defined(STM32F411xE) || defined(STM32F446xx)
|
defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) ||\
|
||||||
|
defined(STM32F412Cx)
|
||||||
/*Get Sector*/
|
/*Get Sector*/
|
||||||
pAdvOBInit->Sectors = (*(__IO uint16_t *)(OPTCR_BYTE2_ADDRESS));
|
pAdvOBInit->Sectors = (*(__IO uint16_t *)(OPTCR_BYTE2_ADDRESS));
|
||||||
#else /* STM32F427xx || STM32F437xx || STM32F429xx|| STM32F439xx || STM32F469xx || STM32F479xx */
|
#else /* STM32F427xx || STM32F437xx || STM32F429xx|| STM32F439xx || STM32F469xx || STM32F479xx */
|
||||||
|
@ -453,7 +457,7 @@ void HAL_FLASHEx_AdvOBGetConfig(FLASH_AdvOBProgramInitTypeDef *pAdvOBInit)
|
||||||
|
|
||||||
/*Get Boot config OB*/
|
/*Get Boot config OB*/
|
||||||
pAdvOBInit->BootConfig = *(__IO uint8_t *)OPTCR_BYTE0_ADDRESS;
|
pAdvOBInit->BootConfig = *(__IO uint8_t *)OPTCR_BYTE0_ADDRESS;
|
||||||
#endif /* STM32F401xC || STM32F401xE || STM32F410xx || STM32F411xE || STM32F446xx */
|
#endif /* STM32F401xC || STM32F401xE || STM32F410xx || STM32F411xE || STM32F446xx || STM32F412Zx || STM32F412Vx || STM32F412Rx || STM32F412Cx */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -464,7 +468,7 @@ void HAL_FLASHEx_AdvOBGetConfig(FLASH_AdvOBProgramInitTypeDef *pAdvOBInit)
|
||||||
* @note Once SPRMOD bit is active unprotection of a protected sector is not possible
|
* @note Once SPRMOD bit is active unprotection of a protected sector is not possible
|
||||||
* @note Read a protected sector will set RDERR Flag and write a protected sector will set WRPERR Flag
|
* @note Read a protected sector will set RDERR Flag and write a protected sector will set WRPERR Flag
|
||||||
* @note This function can be used only for STM32F42xxx/STM32F43xxx/STM32F401xx/STM32F411xx/STM32F446xx/
|
* @note This function can be used only for STM32F42xxx/STM32F43xxx/STM32F401xx/STM32F411xx/STM32F446xx/
|
||||||
* STM32F469xx/STM32F479xx devices.
|
* STM32F469xx/STM32F479xx/STM32F412Zx/STM32F412Vx/STM32F412Rx/STM32F412Cx devices.
|
||||||
*
|
*
|
||||||
* @retval HAL Status
|
* @retval HAL Status
|
||||||
*/
|
*/
|
||||||
|
@ -489,7 +493,7 @@ HAL_StatusTypeDef HAL_FLASHEx_OB_SelectPCROP(void)
|
||||||
* @note Once SPRMOD bit is active unprotection of a protected sector is not possible
|
* @note Once SPRMOD bit is active unprotection of a protected sector is not possible
|
||||||
* @note Read a protected sector will set RDERR Flag and write a protected sector will set WRPERR Flag
|
* @note Read a protected sector will set RDERR Flag and write a protected sector will set WRPERR Flag
|
||||||
* @note This function can be used only for STM32F42xxx/STM32F43xxx/STM32F401xx/STM32F411xx/STM32F446xx/
|
* @note This function can be used only for STM32F42xxx/STM32F43xxx/STM32F401xx/STM32F411xx/STM32F446xx/
|
||||||
* STM32F469xx/STM32F479xx devices.
|
* STM32F469xx/STM32F479xx/STM32F412Zx/STM32F412Vx/STM32F412Rx/STM32F412Cx devices.
|
||||||
*
|
*
|
||||||
* @retval HAL Status
|
* @retval HAL Status
|
||||||
*/
|
*/
|
||||||
|
@ -506,7 +510,7 @@ HAL_StatusTypeDef HAL_FLASHEx_OB_DeSelectPCROP(void)
|
||||||
return HAL_OK;
|
return HAL_OK;
|
||||||
}
|
}
|
||||||
#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F401xC || STM32F401xE || STM32F410xx ||\
|
#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F401xC || STM32F401xE || STM32F410xx ||\
|
||||||
STM32F411xE || STM32F469xx || STM32F479xx */
|
STM32F411xE || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Vx || STM32F412Rx || STM32F412Cx */
|
||||||
|
|
||||||
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx)|| defined(STM32F439xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx)|| defined(STM32F439xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
/**
|
/**
|
||||||
|
@ -936,7 +940,8 @@ static HAL_StatusTypeDef FLASH_OB_DisablePCROP(uint32_t SectorBank1, uint32_t Se
|
||||||
|
|
||||||
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) ||\
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) ||\
|
||||||
defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) ||\
|
defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) ||\
|
||||||
defined(STM32F410Rx) || defined(STM32F411xE) || defined(STM32F446xx)
|
defined(STM32F410Rx) || defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F412Zx) ||\
|
||||||
|
defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx)
|
||||||
/**
|
/**
|
||||||
* @brief Mass erase of FLASH memory
|
* @brief Mass erase of FLASH memory
|
||||||
* @param VoltageRange: The device voltage range which defines the erase parallelism.
|
* @param VoltageRange: The device voltage range which defines the erase parallelism.
|
||||||
|
@ -1089,10 +1094,11 @@ static HAL_StatusTypeDef FLASH_OB_DisableWRP(uint32_t WRPSector, uint32_t Banks)
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
#endif /* STM32F40xxx || STM32F41xxx || STM32F401xx || STM32F410xx || STM32F411xE || STM32F446xx */
|
#endif /* STM32F40xxx || STM32F41xxx || STM32F401xx || STM32F410xx || STM32F411xE || STM32F446xx || STM32F412Zx || STM32F412Vx || STM32F412Rx || STM32F412Cx */
|
||||||
|
|
||||||
#if defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) || defined(STM32F410Rx) ||\
|
#if defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) || defined(STM32F410Rx) ||\
|
||||||
defined(STM32F411xE) || defined(STM32F446xx)
|
defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) ||\
|
||||||
|
defined(STM32F412Cx)
|
||||||
/**
|
/**
|
||||||
* @brief Enable the read/write protection (PCROP) of the desired sectors.
|
* @brief Enable the read/write protection (PCROP) of the desired sectors.
|
||||||
* @note This function can be used only for STM32F401xx devices.
|
* @note This function can be used only for STM32F401xx devices.
|
||||||
|
@ -1148,7 +1154,7 @@ static HAL_StatusTypeDef FLASH_OB_DisablePCROP(uint32_t Sector)
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif /* STM32F401xC || STM32F401xE || STM32F411xE || STM32F446xx */
|
#endif /* STM32F401xC || STM32F401xE || STM32F411xE || STM32F446xx || STM32F412Zx || STM32F412Vx || STM32F412Rx || STM32F412Cx */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set the read protection level.
|
* @brief Set the read protection level.
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue