Release v1.8.2
This commit is contained in:
parent
6ead386a08
commit
003dfc9e6c
|
|
@ -4880,7 +4880,6 @@ typedef struct
|
|||
#define SPI_TXCRCR_TXCRC SPI_TXCRCR_TXCRC_Msk /*!< Tx CRC Register */
|
||||
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/* */
|
||||
/* Inter-integrated Circuit Interface */
|
||||
|
|
@ -5718,8 +5717,6 @@ typedef struct
|
|||
((INSTANCE) == TIM4) || \
|
||||
((INSTANCE) == TIM15))
|
||||
|
||||
#define IS_TIM_SYNCHRO_INSTANCE(INSTANCE) IS_TIM_MASTER_INSTANCE(INSTANCE)
|
||||
|
||||
#define IS_TIM_DMABURST_INSTANCE(INSTANCE)\
|
||||
(((INSTANCE) == TIM1) || \
|
||||
((INSTANCE) == TIM2) || \
|
||||
|
|
@ -5921,15 +5918,15 @@ typedef struct
|
|||
#define ADC1_2_IRQn ADC1_IRQn
|
||||
#define USBWakeUp_IRQn CEC_IRQn
|
||||
#define OTG_FS_WKUP_IRQn CEC_IRQn
|
||||
#define TIM9_IRQn TIM1_BRK_TIM15_IRQn
|
||||
#define TIM1_BRK_IRQn TIM1_BRK_TIM15_IRQn
|
||||
#define TIM1_BRK_TIM9_IRQn TIM1_BRK_TIM15_IRQn
|
||||
#define TIM1_TRG_COM_TIM11_IRQn TIM1_TRG_COM_TIM17_IRQn
|
||||
#define TIM1_BRK_IRQn TIM1_BRK_TIM15_IRQn
|
||||
#define TIM9_IRQn TIM1_BRK_TIM15_IRQn
|
||||
#define TIM1_TRG_COM_IRQn TIM1_TRG_COM_TIM17_IRQn
|
||||
#define TIM11_IRQn TIM1_TRG_COM_TIM17_IRQn
|
||||
#define TIM1_TRG_COM_TIM11_IRQn TIM1_TRG_COM_TIM17_IRQn
|
||||
#define TIM1_UP_IRQn TIM1_UP_TIM16_IRQn
|
||||
#define TIM1_UP_TIM10_IRQn TIM1_UP_TIM16_IRQn
|
||||
#define TIM10_IRQn TIM1_UP_TIM16_IRQn
|
||||
#define TIM1_UP_IRQn TIM1_UP_TIM16_IRQn
|
||||
#define TIM6_IRQn TIM6_DAC_IRQn
|
||||
|
||||
|
||||
|
|
@ -5937,15 +5934,15 @@ typedef struct
|
|||
#define ADC1_2_IRQHandler ADC1_IRQHandler
|
||||
#define USBWakeUp_IRQHandler CEC_IRQHandler
|
||||
#define OTG_FS_WKUP_IRQHandler CEC_IRQHandler
|
||||
#define TIM9_IRQHandler TIM1_BRK_TIM15_IRQHandler
|
||||
#define TIM1_BRK_IRQHandler TIM1_BRK_TIM15_IRQHandler
|
||||
#define TIM1_BRK_TIM9_IRQHandler TIM1_BRK_TIM15_IRQHandler
|
||||
#define TIM1_TRG_COM_TIM11_IRQHandler TIM1_TRG_COM_TIM17_IRQHandler
|
||||
#define TIM1_BRK_IRQHandler TIM1_BRK_TIM15_IRQHandler
|
||||
#define TIM9_IRQHandler TIM1_BRK_TIM15_IRQHandler
|
||||
#define TIM1_TRG_COM_IRQHandler TIM1_TRG_COM_TIM17_IRQHandler
|
||||
#define TIM11_IRQHandler TIM1_TRG_COM_TIM17_IRQHandler
|
||||
#define TIM1_TRG_COM_TIM11_IRQHandler TIM1_TRG_COM_TIM17_IRQHandler
|
||||
#define TIM1_UP_IRQHandler TIM1_UP_TIM16_IRQHandler
|
||||
#define TIM1_UP_TIM10_IRQHandler TIM1_UP_TIM16_IRQHandler
|
||||
#define TIM10_IRQHandler TIM1_UP_TIM16_IRQHandler
|
||||
#define TIM1_UP_IRQHandler TIM1_UP_TIM16_IRQHandler
|
||||
#define TIM6_IRQHandler TIM6_DAC_IRQHandler
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -5394,7 +5394,6 @@ typedef struct
|
|||
#define SPI_TXCRCR_TXCRC SPI_TXCRCR_TXCRC_Msk /*!< Tx CRC Register */
|
||||
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/* */
|
||||
/* Inter-integrated Circuit Interface */
|
||||
|
|
@ -6283,8 +6282,6 @@ typedef struct
|
|||
((INSTANCE) == TIM12) || \
|
||||
((INSTANCE) == TIM15))
|
||||
|
||||
#define IS_TIM_SYNCHRO_INSTANCE(INSTANCE) IS_TIM_MASTER_INSTANCE(INSTANCE)
|
||||
|
||||
#define IS_TIM_DMABURST_INSTANCE(INSTANCE)\
|
||||
(((INSTANCE) == TIM1) || \
|
||||
((INSTANCE) == TIM2) || \
|
||||
|
|
@ -6522,17 +6519,17 @@ typedef struct
|
|||
|
||||
/* Aliases for __IRQn */
|
||||
#define ADC1_2_IRQn ADC1_IRQn
|
||||
#define USBWakeUp_IRQn CEC_IRQn
|
||||
#define OTG_FS_WKUP_IRQn CEC_IRQn
|
||||
#define USBWakeUp_IRQn CEC_IRQn
|
||||
#define TIM8_BRK_IRQn TIM12_IRQn
|
||||
#define TIM8_BRK_TIM12_IRQn TIM12_IRQn
|
||||
#define TIM8_UP_TIM13_IRQn TIM13_IRQn
|
||||
#define TIM8_UP_IRQn TIM13_IRQn
|
||||
#define TIM8_TRG_COM_IRQn TIM14_IRQn
|
||||
#define TIM8_UP_TIM13_IRQn TIM13_IRQn
|
||||
#define TIM8_TRG_COM_TIM14_IRQn TIM14_IRQn
|
||||
#define TIM8_TRG_COM_IRQn TIM14_IRQn
|
||||
#define TIM9_IRQn TIM1_BRK_TIM15_IRQn
|
||||
#define TIM1_BRK_TIM9_IRQn TIM1_BRK_TIM15_IRQn
|
||||
#define TIM1_BRK_IRQn TIM1_BRK_TIM15_IRQn
|
||||
#define TIM1_BRK_TIM9_IRQn TIM1_BRK_TIM15_IRQn
|
||||
#define TIM1_TRG_COM_TIM11_IRQn TIM1_TRG_COM_TIM17_IRQn
|
||||
#define TIM1_TRG_COM_IRQn TIM1_TRG_COM_TIM17_IRQn
|
||||
#define TIM11_IRQn TIM1_TRG_COM_TIM17_IRQn
|
||||
|
|
@ -6544,17 +6541,17 @@ typedef struct
|
|||
|
||||
/* Aliases for __IRQHandler */
|
||||
#define ADC1_2_IRQHandler ADC1_IRQHandler
|
||||
#define USBWakeUp_IRQHandler CEC_IRQHandler
|
||||
#define OTG_FS_WKUP_IRQHandler CEC_IRQHandler
|
||||
#define USBWakeUp_IRQHandler CEC_IRQHandler
|
||||
#define TIM8_BRK_IRQHandler TIM12_IRQHandler
|
||||
#define TIM8_BRK_TIM12_IRQHandler TIM12_IRQHandler
|
||||
#define TIM8_UP_TIM13_IRQHandler TIM13_IRQHandler
|
||||
#define TIM8_UP_IRQHandler TIM13_IRQHandler
|
||||
#define TIM8_TRG_COM_IRQHandler TIM14_IRQHandler
|
||||
#define TIM8_UP_TIM13_IRQHandler TIM13_IRQHandler
|
||||
#define TIM8_TRG_COM_TIM14_IRQHandler TIM14_IRQHandler
|
||||
#define TIM8_TRG_COM_IRQHandler TIM14_IRQHandler
|
||||
#define TIM9_IRQHandler TIM1_BRK_TIM15_IRQHandler
|
||||
#define TIM1_BRK_TIM9_IRQHandler TIM1_BRK_TIM15_IRQHandler
|
||||
#define TIM1_BRK_IRQHandler TIM1_BRK_TIM15_IRQHandler
|
||||
#define TIM1_BRK_TIM9_IRQHandler TIM1_BRK_TIM15_IRQHandler
|
||||
#define TIM1_TRG_COM_TIM11_IRQHandler TIM1_TRG_COM_TIM17_IRQHandler
|
||||
#define TIM1_TRG_COM_IRQHandler TIM1_TRG_COM_TIM17_IRQHandler
|
||||
#define TIM11_IRQHandler TIM1_TRG_COM_TIM17_IRQHandler
|
||||
|
|
|
|||
|
|
@ -4412,12 +4412,10 @@ typedef struct
|
|||
#define SPI_TXCRCR_TXCRC_Msk (0xFFFFUL << SPI_TXCRCR_TXCRC_Pos) /*!< 0x0000FFFF */
|
||||
#define SPI_TXCRCR_TXCRC SPI_TXCRCR_TXCRC_Msk /*!< Tx CRC Register */
|
||||
|
||||
/****************** Bit definition for SPI_I2SCFGR register *****************/
|
||||
#define SPI_I2SCFGR_I2SMOD_Pos (11U)
|
||||
#define SPI_I2SCFGR_I2SMOD_Msk (0x1UL << SPI_I2SCFGR_I2SMOD_Pos) /*!< 0x00000800 */
|
||||
#define SPI_I2SCFGR_I2SMOD SPI_I2SCFGR_I2SMOD_Msk /*!< I2S mode selection */
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/* */
|
||||
/* Inter-integrated Circuit Interface */
|
||||
|
|
@ -5170,8 +5168,6 @@ typedef struct
|
|||
(((INSTANCE) == TIM2) || \
|
||||
((INSTANCE) == TIM3))
|
||||
|
||||
#define IS_TIM_SYNCHRO_INSTANCE(INSTANCE) IS_TIM_MASTER_INSTANCE(INSTANCE)
|
||||
|
||||
#define IS_TIM_DMABURST_INSTANCE(INSTANCE)\
|
||||
(((INSTANCE) == TIM2) || \
|
||||
((INSTANCE) == TIM3))
|
||||
|
|
|
|||
|
|
@ -4474,12 +4474,10 @@ typedef struct
|
|||
#define SPI_TXCRCR_TXCRC_Msk (0xFFFFUL << SPI_TXCRCR_TXCRC_Pos) /*!< 0x0000FFFF */
|
||||
#define SPI_TXCRCR_TXCRC SPI_TXCRCR_TXCRC_Msk /*!< Tx CRC Register */
|
||||
|
||||
/****************** Bit definition for SPI_I2SCFGR register *****************/
|
||||
#define SPI_I2SCFGR_I2SMOD_Pos (11U)
|
||||
#define SPI_I2SCFGR_I2SMOD_Msk (0x1UL << SPI_I2SCFGR_I2SMOD_Pos) /*!< 0x00000800 */
|
||||
#define SPI_I2SCFGR_I2SMOD SPI_I2SCFGR_I2SMOD_Msk /*!< I2S mode selection */
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/* */
|
||||
/* Inter-integrated Circuit Interface */
|
||||
|
|
@ -5279,8 +5277,6 @@ typedef struct
|
|||
((INSTANCE) == TIM3) || \
|
||||
((INSTANCE) == TIM4))
|
||||
|
||||
#define IS_TIM_SYNCHRO_INSTANCE(INSTANCE) IS_TIM_MASTER_INSTANCE(INSTANCE)
|
||||
|
||||
#define IS_TIM_DMABURST_INSTANCE(INSTANCE)\
|
||||
(((INSTANCE) == TIM2) || \
|
||||
((INSTANCE) == TIM3) || \
|
||||
|
|
|
|||
|
|
@ -514,6 +514,7 @@ typedef struct
|
|||
__IO uint32_t RXCRCR;
|
||||
__IO uint32_t TXCRCR;
|
||||
__IO uint32_t I2SCFGR;
|
||||
__IO uint32_t I2SPR;
|
||||
} SPI_TypeDef;
|
||||
|
||||
/**
|
||||
|
|
@ -5283,6 +5284,10 @@ typedef struct
|
|||
/* Serial Peripheral Interface */
|
||||
/* */
|
||||
/******************************************************************************/
|
||||
/*
|
||||
* @brief Specific device feature definitions (not present on all devices in the STM32F1 serie)
|
||||
*/
|
||||
#define SPI_I2S_SUPPORT /*!< I2S support */
|
||||
#define SPI_CRC_ERROR_WORKAROUND_FEATURE
|
||||
|
||||
/******************* Bit definition for SPI_CR1 register ********************/
|
||||
|
|
@ -5401,10 +5406,52 @@ typedef struct
|
|||
#define SPI_TXCRCR_TXCRC SPI_TXCRCR_TXCRC_Msk /*!< Tx CRC Register */
|
||||
|
||||
/****************** Bit definition for SPI_I2SCFGR register *****************/
|
||||
#define SPI_I2SCFGR_CHLEN_Pos (0U)
|
||||
#define SPI_I2SCFGR_CHLEN_Msk (0x1UL << SPI_I2SCFGR_CHLEN_Pos) /*!< 0x00000001 */
|
||||
#define SPI_I2SCFGR_CHLEN SPI_I2SCFGR_CHLEN_Msk /*!< Channel length (number of bits per audio channel) */
|
||||
|
||||
#define SPI_I2SCFGR_DATLEN_Pos (1U)
|
||||
#define SPI_I2SCFGR_DATLEN_Msk (0x3UL << SPI_I2SCFGR_DATLEN_Pos) /*!< 0x00000006 */
|
||||
#define SPI_I2SCFGR_DATLEN SPI_I2SCFGR_DATLEN_Msk /*!< DATLEN[1:0] bits (Data length to be transferred) */
|
||||
#define SPI_I2SCFGR_DATLEN_0 (0x1UL << SPI_I2SCFGR_DATLEN_Pos) /*!< 0x00000002 */
|
||||
#define SPI_I2SCFGR_DATLEN_1 (0x2UL << SPI_I2SCFGR_DATLEN_Pos) /*!< 0x00000004 */
|
||||
|
||||
#define SPI_I2SCFGR_CKPOL_Pos (3U)
|
||||
#define SPI_I2SCFGR_CKPOL_Msk (0x1UL << SPI_I2SCFGR_CKPOL_Pos) /*!< 0x00000008 */
|
||||
#define SPI_I2SCFGR_CKPOL SPI_I2SCFGR_CKPOL_Msk /*!< steady state clock polarity */
|
||||
|
||||
#define SPI_I2SCFGR_I2SSTD_Pos (4U)
|
||||
#define SPI_I2SCFGR_I2SSTD_Msk (0x3UL << SPI_I2SCFGR_I2SSTD_Pos) /*!< 0x00000030 */
|
||||
#define SPI_I2SCFGR_I2SSTD SPI_I2SCFGR_I2SSTD_Msk /*!< I2SSTD[1:0] bits (I2S standard selection) */
|
||||
#define SPI_I2SCFGR_I2SSTD_0 (0x1UL << SPI_I2SCFGR_I2SSTD_Pos) /*!< 0x00000010 */
|
||||
#define SPI_I2SCFGR_I2SSTD_1 (0x2UL << SPI_I2SCFGR_I2SSTD_Pos) /*!< 0x00000020 */
|
||||
|
||||
#define SPI_I2SCFGR_PCMSYNC_Pos (7U)
|
||||
#define SPI_I2SCFGR_PCMSYNC_Msk (0x1UL << SPI_I2SCFGR_PCMSYNC_Pos) /*!< 0x00000080 */
|
||||
#define SPI_I2SCFGR_PCMSYNC SPI_I2SCFGR_PCMSYNC_Msk /*!< PCM frame synchronization */
|
||||
|
||||
#define SPI_I2SCFGR_I2SCFG_Pos (8U)
|
||||
#define SPI_I2SCFGR_I2SCFG_Msk (0x3UL << SPI_I2SCFGR_I2SCFG_Pos) /*!< 0x00000300 */
|
||||
#define SPI_I2SCFGR_I2SCFG SPI_I2SCFGR_I2SCFG_Msk /*!< I2SCFG[1:0] bits (I2S configuration mode) */
|
||||
#define SPI_I2SCFGR_I2SCFG_0 (0x1UL << SPI_I2SCFGR_I2SCFG_Pos) /*!< 0x00000100 */
|
||||
#define SPI_I2SCFGR_I2SCFG_1 (0x2UL << SPI_I2SCFGR_I2SCFG_Pos) /*!< 0x00000200 */
|
||||
|
||||
#define SPI_I2SCFGR_I2SE_Pos (10U)
|
||||
#define SPI_I2SCFGR_I2SE_Msk (0x1UL << SPI_I2SCFGR_I2SE_Pos) /*!< 0x00000400 */
|
||||
#define SPI_I2SCFGR_I2SE SPI_I2SCFGR_I2SE_Msk /*!< I2S Enable */
|
||||
#define SPI_I2SCFGR_I2SMOD_Pos (11U)
|
||||
#define SPI_I2SCFGR_I2SMOD_Msk (0x1UL << SPI_I2SCFGR_I2SMOD_Pos) /*!< 0x00000800 */
|
||||
#define SPI_I2SCFGR_I2SMOD SPI_I2SCFGR_I2SMOD_Msk /*!< I2S mode selection */
|
||||
|
||||
/****************** Bit definition for SPI_I2SPR register *******************/
|
||||
#define SPI_I2SPR_I2SDIV_Pos (0U)
|
||||
#define SPI_I2SPR_I2SDIV_Msk (0xFFUL << SPI_I2SPR_I2SDIV_Pos) /*!< 0x000000FF */
|
||||
#define SPI_I2SPR_I2SDIV SPI_I2SPR_I2SDIV_Msk /*!< I2S Linear prescaler */
|
||||
#define SPI_I2SPR_ODD_Pos (8U)
|
||||
#define SPI_I2SPR_ODD_Msk (0x1UL << SPI_I2SPR_ODD_Pos) /*!< 0x00000100 */
|
||||
#define SPI_I2SPR_ODD SPI_I2SPR_ODD_Msk /*!< Odd factor for the prescaler */
|
||||
#define SPI_I2SPR_MCKOE_Pos (9U)
|
||||
#define SPI_I2SPR_MCKOE_Msk (0x1UL << SPI_I2SPR_MCKOE_Pos) /*!< 0x00000200 */
|
||||
#define SPI_I2SPR_MCKOE SPI_I2SPR_MCKOE_Msk /*!< Master Clock Output Enable */
|
||||
|
||||
/******************************************************************************/
|
||||
/* */
|
||||
|
|
@ -6153,6 +6200,10 @@ typedef struct
|
|||
/******************************* SMBUS Instances ******************************/
|
||||
#define IS_SMBUS_ALL_INSTANCE IS_I2C_ALL_INSTANCE
|
||||
|
||||
/******************************** I2S Instances *******************************/
|
||||
#define IS_I2S_ALL_INSTANCE(INSTANCE) (((INSTANCE) == SPI2) || \
|
||||
((INSTANCE) == SPI3))
|
||||
|
||||
/****************************** IWDG Instances ********************************/
|
||||
#define IS_IWDG_ALL_INSTANCE(INSTANCE) ((INSTANCE) == IWDG)
|
||||
|
||||
|
|
@ -6253,8 +6304,6 @@ typedef struct
|
|||
((INSTANCE) == TIM4) || \
|
||||
((INSTANCE) == TIM5))
|
||||
|
||||
#define IS_TIM_SYNCHRO_INSTANCE(INSTANCE) IS_TIM_MASTER_INSTANCE(INSTANCE)
|
||||
|
||||
#define IS_TIM_DMABURST_INSTANCE(INSTANCE)\
|
||||
(((INSTANCE) == TIM2) || \
|
||||
((INSTANCE) == TIM3) || \
|
||||
|
|
|
|||
|
|
@ -526,6 +526,7 @@ typedef struct
|
|||
__IO uint32_t RXCRCR;
|
||||
__IO uint32_t TXCRCR;
|
||||
__IO uint32_t I2SCFGR;
|
||||
__IO uint32_t I2SPR;
|
||||
} SPI_TypeDef;
|
||||
|
||||
/**
|
||||
|
|
@ -5358,6 +5359,10 @@ typedef struct
|
|||
/* Serial Peripheral Interface */
|
||||
/* */
|
||||
/******************************************************************************/
|
||||
/*
|
||||
* @brief Specific device feature definitions (not present on all devices in the STM32F1 serie)
|
||||
*/
|
||||
#define SPI_I2S_SUPPORT /*!< I2S support */
|
||||
|
||||
/******************* Bit definition for SPI_CR1 register ********************/
|
||||
#define SPI_CR1_CPHA_Pos (0U)
|
||||
|
|
@ -5475,10 +5480,52 @@ typedef struct
|
|||
#define SPI_TXCRCR_TXCRC SPI_TXCRCR_TXCRC_Msk /*!< Tx CRC Register */
|
||||
|
||||
/****************** Bit definition for SPI_I2SCFGR register *****************/
|
||||
#define SPI_I2SCFGR_CHLEN_Pos (0U)
|
||||
#define SPI_I2SCFGR_CHLEN_Msk (0x1UL << SPI_I2SCFGR_CHLEN_Pos) /*!< 0x00000001 */
|
||||
#define SPI_I2SCFGR_CHLEN SPI_I2SCFGR_CHLEN_Msk /*!< Channel length (number of bits per audio channel) */
|
||||
|
||||
#define SPI_I2SCFGR_DATLEN_Pos (1U)
|
||||
#define SPI_I2SCFGR_DATLEN_Msk (0x3UL << SPI_I2SCFGR_DATLEN_Pos) /*!< 0x00000006 */
|
||||
#define SPI_I2SCFGR_DATLEN SPI_I2SCFGR_DATLEN_Msk /*!< DATLEN[1:0] bits (Data length to be transferred) */
|
||||
#define SPI_I2SCFGR_DATLEN_0 (0x1UL << SPI_I2SCFGR_DATLEN_Pos) /*!< 0x00000002 */
|
||||
#define SPI_I2SCFGR_DATLEN_1 (0x2UL << SPI_I2SCFGR_DATLEN_Pos) /*!< 0x00000004 */
|
||||
|
||||
#define SPI_I2SCFGR_CKPOL_Pos (3U)
|
||||
#define SPI_I2SCFGR_CKPOL_Msk (0x1UL << SPI_I2SCFGR_CKPOL_Pos) /*!< 0x00000008 */
|
||||
#define SPI_I2SCFGR_CKPOL SPI_I2SCFGR_CKPOL_Msk /*!< steady state clock polarity */
|
||||
|
||||
#define SPI_I2SCFGR_I2SSTD_Pos (4U)
|
||||
#define SPI_I2SCFGR_I2SSTD_Msk (0x3UL << SPI_I2SCFGR_I2SSTD_Pos) /*!< 0x00000030 */
|
||||
#define SPI_I2SCFGR_I2SSTD SPI_I2SCFGR_I2SSTD_Msk /*!< I2SSTD[1:0] bits (I2S standard selection) */
|
||||
#define SPI_I2SCFGR_I2SSTD_0 (0x1UL << SPI_I2SCFGR_I2SSTD_Pos) /*!< 0x00000010 */
|
||||
#define SPI_I2SCFGR_I2SSTD_1 (0x2UL << SPI_I2SCFGR_I2SSTD_Pos) /*!< 0x00000020 */
|
||||
|
||||
#define SPI_I2SCFGR_PCMSYNC_Pos (7U)
|
||||
#define SPI_I2SCFGR_PCMSYNC_Msk (0x1UL << SPI_I2SCFGR_PCMSYNC_Pos) /*!< 0x00000080 */
|
||||
#define SPI_I2SCFGR_PCMSYNC SPI_I2SCFGR_PCMSYNC_Msk /*!< PCM frame synchronization */
|
||||
|
||||
#define SPI_I2SCFGR_I2SCFG_Pos (8U)
|
||||
#define SPI_I2SCFGR_I2SCFG_Msk (0x3UL << SPI_I2SCFGR_I2SCFG_Pos) /*!< 0x00000300 */
|
||||
#define SPI_I2SCFGR_I2SCFG SPI_I2SCFGR_I2SCFG_Msk /*!< I2SCFG[1:0] bits (I2S configuration mode) */
|
||||
#define SPI_I2SCFGR_I2SCFG_0 (0x1UL << SPI_I2SCFGR_I2SCFG_Pos) /*!< 0x00000100 */
|
||||
#define SPI_I2SCFGR_I2SCFG_1 (0x2UL << SPI_I2SCFGR_I2SCFG_Pos) /*!< 0x00000200 */
|
||||
|
||||
#define SPI_I2SCFGR_I2SE_Pos (10U)
|
||||
#define SPI_I2SCFGR_I2SE_Msk (0x1UL << SPI_I2SCFGR_I2SE_Pos) /*!< 0x00000400 */
|
||||
#define SPI_I2SCFGR_I2SE SPI_I2SCFGR_I2SE_Msk /*!< I2S Enable */
|
||||
#define SPI_I2SCFGR_I2SMOD_Pos (11U)
|
||||
#define SPI_I2SCFGR_I2SMOD_Msk (0x1UL << SPI_I2SCFGR_I2SMOD_Pos) /*!< 0x00000800 */
|
||||
#define SPI_I2SCFGR_I2SMOD SPI_I2SCFGR_I2SMOD_Msk /*!< I2S mode selection */
|
||||
|
||||
/****************** Bit definition for SPI_I2SPR register *******************/
|
||||
#define SPI_I2SPR_I2SDIV_Pos (0U)
|
||||
#define SPI_I2SPR_I2SDIV_Msk (0xFFUL << SPI_I2SPR_I2SDIV_Pos) /*!< 0x000000FF */
|
||||
#define SPI_I2SPR_I2SDIV SPI_I2SPR_I2SDIV_Msk /*!< I2S Linear prescaler */
|
||||
#define SPI_I2SPR_ODD_Pos (8U)
|
||||
#define SPI_I2SPR_ODD_Msk (0x1UL << SPI_I2SPR_ODD_Pos) /*!< 0x00000100 */
|
||||
#define SPI_I2SPR_ODD SPI_I2SPR_ODD_Msk /*!< Odd factor for the prescaler */
|
||||
#define SPI_I2SPR_MCKOE_Pos (9U)
|
||||
#define SPI_I2SPR_MCKOE_Msk (0x1UL << SPI_I2SPR_MCKOE_Pos) /*!< 0x00000200 */
|
||||
#define SPI_I2SPR_MCKOE SPI_I2SPR_MCKOE_Msk /*!< Master Clock Output Enable */
|
||||
|
||||
/******************************************************************************/
|
||||
/* */
|
||||
|
|
@ -6286,6 +6333,10 @@ typedef struct
|
|||
/******************************* SMBUS Instances ******************************/
|
||||
#define IS_SMBUS_ALL_INSTANCE IS_I2C_ALL_INSTANCE
|
||||
|
||||
/******************************** I2S Instances *******************************/
|
||||
#define IS_I2S_ALL_INSTANCE(INSTANCE) (((INSTANCE) == SPI2) || \
|
||||
((INSTANCE) == SPI3))
|
||||
|
||||
/****************************** IWDG Instances ********************************/
|
||||
#define IS_IWDG_ALL_INSTANCE(INSTANCE) ((INSTANCE) == IWDG)
|
||||
|
||||
|
|
@ -6407,8 +6458,6 @@ typedef struct
|
|||
((INSTANCE) == TIM9) || \
|
||||
((INSTANCE) == TIM12))
|
||||
|
||||
#define IS_TIM_SYNCHRO_INSTANCE(INSTANCE) IS_TIM_MASTER_INSTANCE(INSTANCE)
|
||||
|
||||
#define IS_TIM_DMABURST_INSTANCE(INSTANCE)\
|
||||
(((INSTANCE) == TIM2) || \
|
||||
((INSTANCE) == TIM3) || \
|
||||
|
|
@ -6602,18 +6651,18 @@ typedef struct
|
|||
#define TIM1_UP_TIM16_IRQn TIM10_IRQn
|
||||
#define TIM1_UP_IRQn TIM10_IRQn
|
||||
#define TIM1_UP_TIM10_IRQn TIM10_IRQn
|
||||
#define TIM1_TRG_COM_IRQn TIM11_IRQn
|
||||
#define TIM1_TRG_COM_TIM17_IRQn TIM11_IRQn
|
||||
#define TIM1_TRG_COM_TIM11_IRQn TIM11_IRQn
|
||||
#define TIM1_TRG_COM_IRQn TIM11_IRQn
|
||||
#define TIM8_BRK_TIM12_IRQn TIM12_IRQn
|
||||
#define TIM8_BRK_IRQn TIM12_IRQn
|
||||
#define TIM8_BRK_TIM12_IRQn TIM12_IRQn
|
||||
#define TIM8_UP_TIM13_IRQn TIM13_IRQn
|
||||
#define TIM8_UP_IRQn TIM13_IRQn
|
||||
#define TIM8_TRG_COM_IRQn TIM14_IRQn
|
||||
#define TIM8_TRG_COM_TIM14_IRQn TIM14_IRQn
|
||||
#define TIM6_DAC_IRQn TIM6_IRQn
|
||||
#define TIM1_BRK_IRQn TIM9_IRQn
|
||||
#define TIM1_BRK_TIM15_IRQn TIM9_IRQn
|
||||
#define TIM1_BRK_IRQn TIM9_IRQn
|
||||
#define TIM1_BRK_TIM9_IRQn TIM9_IRQn
|
||||
|
||||
|
||||
|
|
@ -6623,18 +6672,18 @@ typedef struct
|
|||
#define TIM1_UP_TIM16_IRQHandler TIM10_IRQHandler
|
||||
#define TIM1_UP_IRQHandler TIM10_IRQHandler
|
||||
#define TIM1_UP_TIM10_IRQHandler TIM10_IRQHandler
|
||||
#define TIM1_TRG_COM_IRQHandler TIM11_IRQHandler
|
||||
#define TIM1_TRG_COM_TIM17_IRQHandler TIM11_IRQHandler
|
||||
#define TIM1_TRG_COM_TIM11_IRQHandler TIM11_IRQHandler
|
||||
#define TIM1_TRG_COM_IRQHandler TIM11_IRQHandler
|
||||
#define TIM8_BRK_TIM12_IRQHandler TIM12_IRQHandler
|
||||
#define TIM8_BRK_IRQHandler TIM12_IRQHandler
|
||||
#define TIM8_BRK_TIM12_IRQHandler TIM12_IRQHandler
|
||||
#define TIM8_UP_TIM13_IRQHandler TIM13_IRQHandler
|
||||
#define TIM8_UP_IRQHandler TIM13_IRQHandler
|
||||
#define TIM8_TRG_COM_IRQHandler TIM14_IRQHandler
|
||||
#define TIM8_TRG_COM_TIM14_IRQHandler TIM14_IRQHandler
|
||||
#define TIM6_DAC_IRQHandler TIM6_IRQHandler
|
||||
#define TIM1_BRK_IRQHandler TIM9_IRQHandler
|
||||
#define TIM1_BRK_TIM15_IRQHandler TIM9_IRQHandler
|
||||
#define TIM1_BRK_IRQHandler TIM9_IRQHandler
|
||||
#define TIM1_BRK_TIM9_IRQHandler TIM9_IRQHandler
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -5531,12 +5531,10 @@ typedef struct
|
|||
#define SPI_TXCRCR_TXCRC_Msk (0xFFFFUL << SPI_TXCRCR_TXCRC_Pos) /*!< 0x0000FFFF */
|
||||
#define SPI_TXCRCR_TXCRC SPI_TXCRCR_TXCRC_Msk /*!< Tx CRC Register */
|
||||
|
||||
/****************** Bit definition for SPI_I2SCFGR register *****************/
|
||||
#define SPI_I2SCFGR_I2SMOD_Pos (11U)
|
||||
#define SPI_I2SCFGR_I2SMOD_Msk (0x1UL << SPI_I2SCFGR_I2SMOD_Pos) /*!< 0x00000800 */
|
||||
#define SPI_I2SCFGR_I2SMOD SPI_I2SCFGR_I2SMOD_Msk /*!< I2S mode selection */
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/* */
|
||||
/* Inter-integrated Circuit Interface */
|
||||
|
|
@ -6289,8 +6287,6 @@ typedef struct
|
|||
(((INSTANCE) == TIM2) || \
|
||||
((INSTANCE) == TIM3))
|
||||
|
||||
#define IS_TIM_SYNCHRO_INSTANCE(INSTANCE) IS_TIM_MASTER_INSTANCE(INSTANCE)
|
||||
|
||||
#define IS_TIM_DMABURST_INSTANCE(INSTANCE)\
|
||||
(((INSTANCE) == TIM2) || \
|
||||
((INSTANCE) == TIM3))
|
||||
|
|
|
|||
|
|
@ -5585,12 +5585,10 @@ typedef struct
|
|||
#define SPI_TXCRCR_TXCRC_Msk (0xFFFFUL << SPI_TXCRCR_TXCRC_Pos) /*!< 0x0000FFFF */
|
||||
#define SPI_TXCRCR_TXCRC SPI_TXCRCR_TXCRC_Msk /*!< Tx CRC Register */
|
||||
|
||||
/****************** Bit definition for SPI_I2SCFGR register *****************/
|
||||
#define SPI_I2SCFGR_I2SMOD_Pos (11U)
|
||||
#define SPI_I2SCFGR_I2SMOD_Msk (0x1UL << SPI_I2SCFGR_I2SMOD_Pos) /*!< 0x00000800 */
|
||||
#define SPI_I2SCFGR_I2SMOD SPI_I2SCFGR_I2SMOD_Msk /*!< I2S mode selection */
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/* */
|
||||
/* Inter-integrated Circuit Interface */
|
||||
|
|
@ -6389,8 +6387,6 @@ typedef struct
|
|||
((INSTANCE) == TIM3) || \
|
||||
((INSTANCE) == TIM4))
|
||||
|
||||
#define IS_TIM_SYNCHRO_INSTANCE(INSTANCE) IS_TIM_MASTER_INSTANCE(INSTANCE)
|
||||
|
||||
#define IS_TIM_DMABURST_INSTANCE(INSTANCE)\
|
||||
(((INSTANCE) == TIM2) || \
|
||||
((INSTANCE) == TIM3) || \
|
||||
|
|
@ -6532,20 +6528,20 @@ typedef struct
|
|||
#define ADC1_2_IRQn ADC1_IRQn
|
||||
#define CEC_IRQn USBWakeUp_IRQn
|
||||
#define OTG_FS_WKUP_IRQn USBWakeUp_IRQn
|
||||
#define CAN1_TX_IRQn USB_HP_IRQn
|
||||
#define USB_HP_CAN1_TX_IRQn USB_HP_IRQn
|
||||
#define USB_LP_CAN1_RX0_IRQn USB_LP_IRQn
|
||||
#define CAN1_TX_IRQn USB_HP_IRQn
|
||||
#define CAN1_RX0_IRQn USB_LP_IRQn
|
||||
#define USB_LP_CAN1_RX0_IRQn USB_LP_IRQn
|
||||
|
||||
|
||||
/* Aliases for __IRQHandler */
|
||||
#define ADC1_2_IRQHandler ADC1_IRQHandler
|
||||
#define CEC_IRQHandler USBWakeUp_IRQHandler
|
||||
#define OTG_FS_WKUP_IRQHandler USBWakeUp_IRQHandler
|
||||
#define CAN1_TX_IRQHandler USB_HP_IRQHandler
|
||||
#define USB_HP_CAN1_TX_IRQHandler USB_HP_IRQHandler
|
||||
#define USB_LP_CAN1_RX0_IRQHandler USB_LP_IRQHandler
|
||||
#define CAN1_TX_IRQHandler USB_HP_IRQHandler
|
||||
#define CAN1_RX0_IRQHandler USB_LP_IRQHandler
|
||||
#define USB_LP_CAN1_RX0_IRQHandler USB_LP_IRQHandler
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -9128,12 +9128,10 @@ typedef struct
|
|||
#define SPI_TXCRCR_TXCRC_Msk (0xFFFFUL << SPI_TXCRCR_TXCRC_Pos) /*!< 0x0000FFFF */
|
||||
#define SPI_TXCRCR_TXCRC SPI_TXCRCR_TXCRC_Msk /*!< Tx CRC Register */
|
||||
|
||||
/****************** Bit definition for SPI_I2SCFGR register *****************/
|
||||
#define SPI_I2SCFGR_I2SMOD_Pos (11U)
|
||||
#define SPI_I2SCFGR_I2SMOD_Msk (0x1UL << SPI_I2SCFGR_I2SMOD_Pos) /*!< 0x00000800 */
|
||||
#define SPI_I2SCFGR_I2SMOD SPI_I2SCFGR_I2SMOD_Msk /*!< I2S mode selection */
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/* */
|
||||
/* Inter-integrated Circuit Interface */
|
||||
|
|
@ -9912,8 +9910,6 @@ typedef struct
|
|||
((INSTANCE) == TIM2) || \
|
||||
((INSTANCE) == TIM3))
|
||||
|
||||
#define IS_TIM_SYNCHRO_INSTANCE(INSTANCE) IS_TIM_MASTER_INSTANCE(INSTANCE)
|
||||
|
||||
#define IS_TIM_DMABURST_INSTANCE(INSTANCE)\
|
||||
(((INSTANCE) == TIM1) || \
|
||||
((INSTANCE) == TIM2) || \
|
||||
|
|
@ -10051,40 +10047,40 @@ typedef struct
|
|||
|
||||
/* Aliases for __IRQn */
|
||||
#define ADC1_IRQn ADC1_2_IRQn
|
||||
#define TIM1_BRK_TIM15_IRQn TIM1_BRK_IRQn
|
||||
#define TIM1_BRK_TIM9_IRQn TIM1_BRK_IRQn
|
||||
#define TIM1_BRK_TIM15_IRQn TIM1_BRK_IRQn
|
||||
#define TIM9_IRQn TIM1_BRK_IRQn
|
||||
#define TIM1_TRG_COM_TIM17_IRQn TIM1_TRG_COM_IRQn
|
||||
#define TIM11_IRQn TIM1_TRG_COM_IRQn
|
||||
#define TIM1_TRG_COM_TIM17_IRQn TIM1_TRG_COM_IRQn
|
||||
#define TIM1_TRG_COM_TIM11_IRQn TIM1_TRG_COM_IRQn
|
||||
#define TIM1_UP_TIM10_IRQn TIM1_UP_IRQn
|
||||
#define TIM1_UP_TIM16_IRQn TIM1_UP_IRQn
|
||||
#define TIM1_UP_TIM10_IRQn TIM1_UP_IRQn
|
||||
#define TIM10_IRQn TIM1_UP_IRQn
|
||||
#define OTG_FS_WKUP_IRQn USBWakeUp_IRQn
|
||||
#define CEC_IRQn USBWakeUp_IRQn
|
||||
#define CAN1_TX_IRQn USB_HP_CAN1_TX_IRQn
|
||||
#define USB_HP_IRQn USB_HP_CAN1_TX_IRQn
|
||||
#define CAN1_RX0_IRQn USB_LP_CAN1_RX0_IRQn
|
||||
#define CAN1_TX_IRQn USB_HP_CAN1_TX_IRQn
|
||||
#define USB_LP_IRQn USB_LP_CAN1_RX0_IRQn
|
||||
#define CAN1_RX0_IRQn USB_LP_CAN1_RX0_IRQn
|
||||
|
||||
|
||||
/* Aliases for __IRQHandler */
|
||||
#define ADC1_IRQHandler ADC1_2_IRQHandler
|
||||
#define TIM1_BRK_TIM15_IRQHandler TIM1_BRK_IRQHandler
|
||||
#define TIM1_BRK_TIM9_IRQHandler TIM1_BRK_IRQHandler
|
||||
#define TIM1_BRK_TIM15_IRQHandler TIM1_BRK_IRQHandler
|
||||
#define TIM9_IRQHandler TIM1_BRK_IRQHandler
|
||||
#define TIM1_TRG_COM_TIM17_IRQHandler TIM1_TRG_COM_IRQHandler
|
||||
#define TIM11_IRQHandler TIM1_TRG_COM_IRQHandler
|
||||
#define TIM1_TRG_COM_TIM17_IRQHandler TIM1_TRG_COM_IRQHandler
|
||||
#define TIM1_TRG_COM_TIM11_IRQHandler TIM1_TRG_COM_IRQHandler
|
||||
#define TIM1_UP_TIM10_IRQHandler TIM1_UP_IRQHandler
|
||||
#define TIM1_UP_TIM16_IRQHandler TIM1_UP_IRQHandler
|
||||
#define TIM1_UP_TIM10_IRQHandler TIM1_UP_IRQHandler
|
||||
#define TIM10_IRQHandler TIM1_UP_IRQHandler
|
||||
#define OTG_FS_WKUP_IRQHandler USBWakeUp_IRQHandler
|
||||
#define CEC_IRQHandler USBWakeUp_IRQHandler
|
||||
#define CAN1_TX_IRQHandler USB_HP_CAN1_TX_IRQHandler
|
||||
#define USB_HP_IRQHandler USB_HP_CAN1_TX_IRQHandler
|
||||
#define CAN1_RX0_IRQHandler USB_LP_CAN1_RX0_IRQHandler
|
||||
#define CAN1_TX_IRQHandler USB_HP_CAN1_TX_IRQHandler
|
||||
#define USB_LP_IRQHandler USB_LP_CAN1_RX0_IRQHandler
|
||||
#define CAN1_RX0_IRQHandler USB_LP_CAN1_RX0_IRQHandler
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -9190,12 +9190,10 @@ typedef struct
|
|||
#define SPI_TXCRCR_TXCRC_Msk (0xFFFFUL << SPI_TXCRCR_TXCRC_Pos) /*!< 0x0000FFFF */
|
||||
#define SPI_TXCRCR_TXCRC SPI_TXCRCR_TXCRC_Msk /*!< Tx CRC Register */
|
||||
|
||||
/****************** Bit definition for SPI_I2SCFGR register *****************/
|
||||
#define SPI_I2SCFGR_I2SMOD_Pos (11U)
|
||||
#define SPI_I2SCFGR_I2SMOD_Msk (0x1UL << SPI_I2SCFGR_I2SMOD_Pos) /*!< 0x00000800 */
|
||||
#define SPI_I2SCFGR_I2SMOD SPI_I2SCFGR_I2SMOD_Msk /*!< I2S mode selection */
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/* */
|
||||
/* Inter-integrated Circuit Interface */
|
||||
|
|
@ -10021,8 +10019,6 @@ typedef struct
|
|||
((INSTANCE) == TIM3) || \
|
||||
((INSTANCE) == TIM4))
|
||||
|
||||
#define IS_TIM_SYNCHRO_INSTANCE(INSTANCE) IS_TIM_MASTER_INSTANCE(INSTANCE)
|
||||
|
||||
#define IS_TIM_DMABURST_INSTANCE(INSTANCE)\
|
||||
(((INSTANCE) == TIM1) || \
|
||||
((INSTANCE) == TIM2) || \
|
||||
|
|
@ -10182,40 +10178,40 @@ typedef struct
|
|||
|
||||
/* Aliases for __IRQn */
|
||||
#define ADC1_IRQn ADC1_2_IRQn
|
||||
#define TIM1_BRK_TIM9_IRQn TIM1_BRK_IRQn
|
||||
#define TIM9_IRQn TIM1_BRK_IRQn
|
||||
#define TIM1_BRK_TIM15_IRQn TIM1_BRK_IRQn
|
||||
#define TIM11_IRQn TIM1_TRG_COM_IRQn
|
||||
#define TIM1_TRG_COM_TIM11_IRQn TIM1_TRG_COM_IRQn
|
||||
#define TIM9_IRQn TIM1_BRK_IRQn
|
||||
#define TIM1_BRK_TIM9_IRQn TIM1_BRK_IRQn
|
||||
#define TIM1_TRG_COM_TIM17_IRQn TIM1_TRG_COM_IRQn
|
||||
#define TIM1_TRG_COM_TIM11_IRQn TIM1_TRG_COM_IRQn
|
||||
#define TIM11_IRQn TIM1_TRG_COM_IRQn
|
||||
#define TIM10_IRQn TIM1_UP_IRQn
|
||||
#define TIM1_UP_TIM10_IRQn TIM1_UP_IRQn
|
||||
#define TIM1_UP_TIM16_IRQn TIM1_UP_IRQn
|
||||
#define TIM1_UP_TIM10_IRQn TIM1_UP_IRQn
|
||||
#define OTG_FS_WKUP_IRQn USBWakeUp_IRQn
|
||||
#define CEC_IRQn USBWakeUp_IRQn
|
||||
#define CAN1_TX_IRQn USB_HP_CAN1_TX_IRQn
|
||||
#define USB_HP_IRQn USB_HP_CAN1_TX_IRQn
|
||||
#define USB_LP_IRQn USB_LP_CAN1_RX0_IRQn
|
||||
#define CAN1_RX0_IRQn USB_LP_CAN1_RX0_IRQn
|
||||
#define USB_LP_IRQn USB_LP_CAN1_RX0_IRQn
|
||||
|
||||
|
||||
/* Aliases for __IRQHandler */
|
||||
#define ADC1_IRQHandler ADC1_2_IRQHandler
|
||||
#define TIM1_BRK_TIM9_IRQHandler TIM1_BRK_IRQHandler
|
||||
#define TIM9_IRQHandler TIM1_BRK_IRQHandler
|
||||
#define TIM1_BRK_TIM15_IRQHandler TIM1_BRK_IRQHandler
|
||||
#define TIM11_IRQHandler TIM1_TRG_COM_IRQHandler
|
||||
#define TIM1_TRG_COM_TIM11_IRQHandler TIM1_TRG_COM_IRQHandler
|
||||
#define TIM9_IRQHandler TIM1_BRK_IRQHandler
|
||||
#define TIM1_BRK_TIM9_IRQHandler TIM1_BRK_IRQHandler
|
||||
#define TIM1_TRG_COM_TIM17_IRQHandler TIM1_TRG_COM_IRQHandler
|
||||
#define TIM1_TRG_COM_TIM11_IRQHandler TIM1_TRG_COM_IRQHandler
|
||||
#define TIM11_IRQHandler TIM1_TRG_COM_IRQHandler
|
||||
#define TIM10_IRQHandler TIM1_UP_IRQHandler
|
||||
#define TIM1_UP_TIM10_IRQHandler TIM1_UP_IRQHandler
|
||||
#define TIM1_UP_TIM16_IRQHandler TIM1_UP_IRQHandler
|
||||
#define TIM1_UP_TIM10_IRQHandler TIM1_UP_IRQHandler
|
||||
#define OTG_FS_WKUP_IRQHandler USBWakeUp_IRQHandler
|
||||
#define CEC_IRQHandler USBWakeUp_IRQHandler
|
||||
#define CAN1_TX_IRQHandler USB_HP_CAN1_TX_IRQHandler
|
||||
#define USB_HP_IRQHandler USB_HP_CAN1_TX_IRQHandler
|
||||
#define USB_LP_IRQHandler USB_LP_CAN1_RX0_IRQHandler
|
||||
#define CAN1_RX0_IRQHandler USB_LP_CAN1_RX0_IRQHandler
|
||||
#define USB_LP_IRQHandler USB_LP_CAN1_RX0_IRQHandler
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -10583,7 +10583,6 @@ typedef struct
|
|||
#define SPI_I2SCFGR_I2SMOD_Pos (11U)
|
||||
#define SPI_I2SCFGR_I2SMOD_Msk (0x1UL << SPI_I2SCFGR_I2SMOD_Pos) /*!< 0x00000800 */
|
||||
#define SPI_I2SCFGR_I2SMOD SPI_I2SCFGR_I2SMOD_Msk /*!< I2S mode selection */
|
||||
|
||||
/****************** Bit definition for SPI_I2SPR register *******************/
|
||||
#define SPI_I2SPR_I2SDIV_Pos (0U)
|
||||
#define SPI_I2SPR_I2SDIV_Msk (0xFFUL << SPI_I2SPR_I2SDIV_Pos) /*!< 0x000000FF */
|
||||
|
|
@ -11484,8 +11483,6 @@ typedef struct
|
|||
((INSTANCE) == TIM4) || \
|
||||
((INSTANCE) == TIM5))
|
||||
|
||||
#define IS_TIM_SYNCHRO_INSTANCE(INSTANCE) IS_TIM_MASTER_INSTANCE(INSTANCE)
|
||||
|
||||
#define IS_TIM_DMABURST_INSTANCE(INSTANCE)\
|
||||
(((INSTANCE) == TIM1) || \
|
||||
((INSTANCE) == TIM8) || \
|
||||
|
|
@ -11693,20 +11690,20 @@ typedef struct
|
|||
/* Aliases for __IRQn */
|
||||
#define ADC1_IRQn ADC1_2_IRQn
|
||||
#define DMA2_Channel4_IRQn DMA2_Channel4_5_IRQn
|
||||
#define TIM9_IRQn TIM1_BRK_IRQn
|
||||
#define TIM1_BRK_TIM9_IRQn TIM1_BRK_IRQn
|
||||
#define TIM9_IRQn TIM1_BRK_IRQn
|
||||
#define TIM1_BRK_TIM15_IRQn TIM1_BRK_IRQn
|
||||
#define TIM1_TRG_COM_TIM11_IRQn TIM1_TRG_COM_IRQn
|
||||
#define TIM11_IRQn TIM1_TRG_COM_IRQn
|
||||
#define TIM1_TRG_COM_TIM11_IRQn TIM1_TRG_COM_IRQn
|
||||
#define TIM1_TRG_COM_TIM17_IRQn TIM1_TRG_COM_IRQn
|
||||
#define TIM10_IRQn TIM1_UP_IRQn
|
||||
#define TIM1_UP_TIM16_IRQn TIM1_UP_IRQn
|
||||
#define TIM1_UP_TIM10_IRQn TIM1_UP_IRQn
|
||||
#define TIM1_UP_TIM16_IRQn TIM1_UP_IRQn
|
||||
#define TIM10_IRQn TIM1_UP_IRQn
|
||||
#define TIM6_DAC_IRQn TIM6_IRQn
|
||||
#define TIM12_IRQn TIM8_BRK_IRQn
|
||||
#define TIM8_BRK_TIM12_IRQn TIM8_BRK_IRQn
|
||||
#define TIM8_TRG_COM_TIM14_IRQn TIM8_TRG_COM_IRQn
|
||||
#define TIM12_IRQn TIM8_BRK_IRQn
|
||||
#define TIM14_IRQn TIM8_TRG_COM_IRQn
|
||||
#define TIM8_TRG_COM_TIM14_IRQn TIM8_TRG_COM_IRQn
|
||||
#define TIM8_UP_TIM13_IRQn TIM8_UP_IRQn
|
||||
#define TIM13_IRQn TIM8_UP_IRQn
|
||||
#define CEC_IRQn USBWakeUp_IRQn
|
||||
|
|
@ -11720,20 +11717,20 @@ typedef struct
|
|||
/* Aliases for __IRQHandler */
|
||||
#define ADC1_IRQHandler ADC1_2_IRQHandler
|
||||
#define DMA2_Channel4_IRQHandler DMA2_Channel4_5_IRQHandler
|
||||
#define TIM9_IRQHandler TIM1_BRK_IRQHandler
|
||||
#define TIM1_BRK_TIM9_IRQHandler TIM1_BRK_IRQHandler
|
||||
#define TIM9_IRQHandler TIM1_BRK_IRQHandler
|
||||
#define TIM1_BRK_TIM15_IRQHandler TIM1_BRK_IRQHandler
|
||||
#define TIM1_TRG_COM_TIM11_IRQHandler TIM1_TRG_COM_IRQHandler
|
||||
#define TIM11_IRQHandler TIM1_TRG_COM_IRQHandler
|
||||
#define TIM1_TRG_COM_TIM11_IRQHandler TIM1_TRG_COM_IRQHandler
|
||||
#define TIM1_TRG_COM_TIM17_IRQHandler TIM1_TRG_COM_IRQHandler
|
||||
#define TIM10_IRQHandler TIM1_UP_IRQHandler
|
||||
#define TIM1_UP_TIM16_IRQHandler TIM1_UP_IRQHandler
|
||||
#define TIM1_UP_TIM10_IRQHandler TIM1_UP_IRQHandler
|
||||
#define TIM1_UP_TIM16_IRQHandler TIM1_UP_IRQHandler
|
||||
#define TIM10_IRQHandler TIM1_UP_IRQHandler
|
||||
#define TIM6_DAC_IRQHandler TIM6_IRQHandler
|
||||
#define TIM12_IRQHandler TIM8_BRK_IRQHandler
|
||||
#define TIM8_BRK_TIM12_IRQHandler TIM8_BRK_IRQHandler
|
||||
#define TIM8_TRG_COM_TIM14_IRQHandler TIM8_TRG_COM_IRQHandler
|
||||
#define TIM12_IRQHandler TIM8_BRK_IRQHandler
|
||||
#define TIM14_IRQHandler TIM8_TRG_COM_IRQHandler
|
||||
#define TIM8_TRG_COM_TIM14_IRQHandler TIM8_TRG_COM_IRQHandler
|
||||
#define TIM8_UP_TIM13_IRQHandler TIM8_UP_IRQHandler
|
||||
#define TIM13_IRQHandler TIM8_UP_IRQHandler
|
||||
#define CEC_IRQHandler USBWakeUp_IRQHandler
|
||||
|
|
|
|||
|
|
@ -10652,7 +10652,6 @@ typedef struct
|
|||
#define SPI_I2SCFGR_I2SMOD_Pos (11U)
|
||||
#define SPI_I2SCFGR_I2SMOD_Msk (0x1UL << SPI_I2SCFGR_I2SMOD_Pos) /*!< 0x00000800 */
|
||||
#define SPI_I2SCFGR_I2SMOD SPI_I2SCFGR_I2SMOD_Msk /*!< I2S mode selection */
|
||||
|
||||
/****************** Bit definition for SPI_I2SPR register *******************/
|
||||
#define SPI_I2SPR_I2SDIV_Pos (0U)
|
||||
#define SPI_I2SPR_I2SDIV_Msk (0xFFUL << SPI_I2SPR_I2SDIV_Pos) /*!< 0x000000FF */
|
||||
|
|
@ -11642,8 +11641,6 @@ typedef struct
|
|||
((INSTANCE) == TIM9) || \
|
||||
((INSTANCE) == TIM12))
|
||||
|
||||
#define IS_TIM_SYNCHRO_INSTANCE(INSTANCE) IS_TIM_MASTER_INSTANCE(INSTANCE)
|
||||
|
||||
#define IS_TIM_DMABURST_INSTANCE(INSTANCE)\
|
||||
(((INSTANCE) == TIM1) || \
|
||||
((INSTANCE) == TIM8) || \
|
||||
|
|
@ -11878,11 +11875,11 @@ typedef struct
|
|||
#define ADC1_IRQn ADC1_2_IRQn
|
||||
#define DMA2_Channel4_IRQn DMA2_Channel4_5_IRQn
|
||||
#define TIM9_IRQn TIM1_BRK_TIM9_IRQn
|
||||
#define TIM1_BRK_TIM15_IRQn TIM1_BRK_TIM9_IRQn
|
||||
#define TIM1_BRK_IRQn TIM1_BRK_TIM9_IRQn
|
||||
#define TIM1_BRK_TIM15_IRQn TIM1_BRK_TIM9_IRQn
|
||||
#define TIM1_TRG_COM_TIM17_IRQn TIM1_TRG_COM_TIM11_IRQn
|
||||
#define TIM1_TRG_COM_IRQn TIM1_TRG_COM_TIM11_IRQn
|
||||
#define TIM11_IRQn TIM1_TRG_COM_TIM11_IRQn
|
||||
#define TIM1_TRG_COM_TIM17_IRQn TIM1_TRG_COM_TIM11_IRQn
|
||||
#define TIM10_IRQn TIM1_UP_TIM10_IRQn
|
||||
#define TIM1_UP_IRQn TIM1_UP_TIM10_IRQn
|
||||
#define TIM1_UP_TIM16_IRQn TIM1_UP_TIM10_IRQn
|
||||
|
|
@ -11891,25 +11888,25 @@ typedef struct
|
|||
#define TIM8_BRK_IRQn TIM8_BRK_TIM12_IRQn
|
||||
#define TIM14_IRQn TIM8_TRG_COM_TIM14_IRQn
|
||||
#define TIM8_TRG_COM_IRQn TIM8_TRG_COM_TIM14_IRQn
|
||||
#define TIM8_UP_IRQn TIM8_UP_TIM13_IRQn
|
||||
#define TIM13_IRQn TIM8_UP_TIM13_IRQn
|
||||
#define TIM8_UP_IRQn TIM8_UP_TIM13_IRQn
|
||||
#define CEC_IRQn USBWakeUp_IRQn
|
||||
#define OTG_FS_WKUP_IRQn USBWakeUp_IRQn
|
||||
#define CAN1_TX_IRQn USB_HP_CAN1_TX_IRQn
|
||||
#define USB_HP_IRQn USB_HP_CAN1_TX_IRQn
|
||||
#define USB_LP_IRQn USB_LP_CAN1_RX0_IRQn
|
||||
#define CAN1_RX0_IRQn USB_LP_CAN1_RX0_IRQn
|
||||
#define USB_LP_IRQn USB_LP_CAN1_RX0_IRQn
|
||||
|
||||
|
||||
/* Aliases for __IRQHandler */
|
||||
#define ADC1_IRQHandler ADC1_2_IRQHandler
|
||||
#define DMA2_Channel4_IRQHandler DMA2_Channel4_5_IRQHandler
|
||||
#define TIM9_IRQHandler TIM1_BRK_TIM9_IRQHandler
|
||||
#define TIM1_BRK_TIM15_IRQHandler TIM1_BRK_TIM9_IRQHandler
|
||||
#define TIM1_BRK_IRQHandler TIM1_BRK_TIM9_IRQHandler
|
||||
#define TIM1_BRK_TIM15_IRQHandler TIM1_BRK_TIM9_IRQHandler
|
||||
#define TIM1_TRG_COM_TIM17_IRQHandler TIM1_TRG_COM_TIM11_IRQHandler
|
||||
#define TIM1_TRG_COM_IRQHandler TIM1_TRG_COM_TIM11_IRQHandler
|
||||
#define TIM11_IRQHandler TIM1_TRG_COM_TIM11_IRQHandler
|
||||
#define TIM1_TRG_COM_TIM17_IRQHandler TIM1_TRG_COM_TIM11_IRQHandler
|
||||
#define TIM10_IRQHandler TIM1_UP_TIM10_IRQHandler
|
||||
#define TIM1_UP_IRQHandler TIM1_UP_TIM10_IRQHandler
|
||||
#define TIM1_UP_TIM16_IRQHandler TIM1_UP_TIM10_IRQHandler
|
||||
|
|
@ -11918,14 +11915,14 @@ typedef struct
|
|||
#define TIM8_BRK_IRQHandler TIM8_BRK_TIM12_IRQHandler
|
||||
#define TIM14_IRQHandler TIM8_TRG_COM_TIM14_IRQHandler
|
||||
#define TIM8_TRG_COM_IRQHandler TIM8_TRG_COM_TIM14_IRQHandler
|
||||
#define TIM8_UP_IRQHandler TIM8_UP_TIM13_IRQHandler
|
||||
#define TIM13_IRQHandler TIM8_UP_TIM13_IRQHandler
|
||||
#define TIM8_UP_IRQHandler TIM8_UP_TIM13_IRQHandler
|
||||
#define CEC_IRQHandler USBWakeUp_IRQHandler
|
||||
#define OTG_FS_WKUP_IRQHandler USBWakeUp_IRQHandler
|
||||
#define CAN1_TX_IRQHandler USB_HP_CAN1_TX_IRQHandler
|
||||
#define USB_HP_IRQHandler USB_HP_CAN1_TX_IRQHandler
|
||||
#define USB_LP_IRQHandler USB_LP_CAN1_RX0_IRQHandler
|
||||
#define CAN1_RX0_IRQHandler USB_LP_CAN1_RX0_IRQHandler
|
||||
#define USB_LP_IRQHandler USB_LP_CAN1_RX0_IRQHandler
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1250,6 +1250,11 @@ typedef struct
|
|||
/* Reset and Clock Control */
|
||||
/* */
|
||||
/******************************************************************************/
|
||||
/*
|
||||
* @brief Specific device feature definitions (not present on all devices in the STM32F1 serie)
|
||||
*/
|
||||
#define RCC_PLL2_SUPPORT /*!< Support PLL2 */
|
||||
#define RCC_PLLI2S_SUPPORT
|
||||
|
||||
/******************** Bit definition for RCC_CR register ********************/
|
||||
#define RCC_CR_HSION_Pos (0U)
|
||||
|
|
@ -1283,11 +1288,6 @@ typedef struct
|
|||
#define RCC_CR_PLLRDY_Msk (0x1UL << RCC_CR_PLLRDY_Pos) /*!< 0x02000000 */
|
||||
#define RCC_CR_PLLRDY RCC_CR_PLLRDY_Msk /*!< PLL clock ready flag */
|
||||
|
||||
/*
|
||||
* @brief Specific device feature definitions (not present on all devices in the STM32F1 serie)
|
||||
*/
|
||||
#define RCC_PLL2_SUPPORT /*!< Support PLL2 */
|
||||
|
||||
#define RCC_CR_PLL2ON_Pos (26U)
|
||||
#define RCC_CR_PLL2ON_Msk (0x1UL << RCC_CR_PLL2ON_Pos) /*!< 0x04000000 */
|
||||
#define RCC_CR_PLL2ON RCC_CR_PLL2ON_Msk /*!< PLL2 enable */
|
||||
|
|
@ -1295,11 +1295,6 @@ typedef struct
|
|||
#define RCC_CR_PLL2RDY_Msk (0x1UL << RCC_CR_PLL2RDY_Pos) /*!< 0x08000000 */
|
||||
#define RCC_CR_PLL2RDY RCC_CR_PLL2RDY_Msk /*!< PLL2 clock ready flag */
|
||||
|
||||
/*
|
||||
* @brief Specific device feature definitions (not present on all devices in the STM32F1 serie)
|
||||
*/
|
||||
#define RCC_PLLI2S_SUPPORT /*!< Support PLL3 (PLLI2S)*/
|
||||
|
||||
#define RCC_CR_PLL3ON_Pos (28U)
|
||||
#define RCC_CR_PLL3ON_Msk (0x1UL << RCC_CR_PLL3ON_Pos) /*!< 0x10000000 */
|
||||
#define RCC_CR_PLL3ON RCC_CR_PLL3ON_Msk /*!< PLL3 enable */
|
||||
|
|
@ -11914,7 +11909,6 @@ typedef struct
|
|||
#define SPI_I2SCFGR_I2SMOD_Pos (11U)
|
||||
#define SPI_I2SCFGR_I2SMOD_Msk (0x1UL << SPI_I2SCFGR_I2SMOD_Pos) /*!< 0x00000800 */
|
||||
#define SPI_I2SCFGR_I2SMOD SPI_I2SCFGR_I2SMOD_Msk /*!< I2S mode selection */
|
||||
|
||||
/****************** Bit definition for SPI_I2SPR register *******************/
|
||||
#define SPI_I2SPR_I2SDIV_Pos (0U)
|
||||
#define SPI_I2SPR_I2SDIV_Msk (0xFFUL << SPI_I2SPR_I2SDIV_Pos) /*!< 0x000000FF */
|
||||
|
|
@ -14092,8 +14086,6 @@ typedef struct
|
|||
((INSTANCE) == TIM4) || \
|
||||
((INSTANCE) == TIM5))
|
||||
|
||||
#define IS_TIM_SYNCHRO_INSTANCE(INSTANCE) IS_TIM_MASTER_INSTANCE(INSTANCE)
|
||||
|
||||
#define IS_TIM_DMABURST_INSTANCE(INSTANCE)\
|
||||
(((INSTANCE) == TIM1) || \
|
||||
((INSTANCE) == TIM2) || \
|
||||
|
|
@ -14289,15 +14281,15 @@ typedef struct
|
|||
#define DMA2_Channel4_5_IRQn DMA2_Channel4_IRQn
|
||||
#define USBWakeUp_IRQn OTG_FS_WKUP_IRQn
|
||||
#define CEC_IRQn OTG_FS_WKUP_IRQn
|
||||
#define TIM9_IRQn TIM1_BRK_IRQn
|
||||
#define TIM1_BRK_TIM9_IRQn TIM1_BRK_IRQn
|
||||
#define TIM1_BRK_TIM15_IRQn TIM1_BRK_IRQn
|
||||
#define TIM1_TRG_COM_TIM11_IRQn TIM1_TRG_COM_IRQn
|
||||
#define TIM9_IRQn TIM1_BRK_IRQn
|
||||
#define TIM11_IRQn TIM1_TRG_COM_IRQn
|
||||
#define TIM1_TRG_COM_TIM17_IRQn TIM1_TRG_COM_IRQn
|
||||
#define TIM10_IRQn TIM1_UP_IRQn
|
||||
#define TIM1_TRG_COM_TIM11_IRQn TIM1_TRG_COM_IRQn
|
||||
#define TIM1_UP_TIM16_IRQn TIM1_UP_IRQn
|
||||
#define TIM1_UP_TIM10_IRQn TIM1_UP_IRQn
|
||||
#define TIM10_IRQn TIM1_UP_IRQn
|
||||
#define TIM6_DAC_IRQn TIM6_IRQn
|
||||
|
||||
|
||||
|
|
@ -14310,15 +14302,15 @@ typedef struct
|
|||
#define DMA2_Channel4_5_IRQHandler DMA2_Channel4_IRQHandler
|
||||
#define USBWakeUp_IRQHandler OTG_FS_WKUP_IRQHandler
|
||||
#define CEC_IRQHandler OTG_FS_WKUP_IRQHandler
|
||||
#define TIM9_IRQHandler TIM1_BRK_IRQHandler
|
||||
#define TIM1_BRK_TIM9_IRQHandler TIM1_BRK_IRQHandler
|
||||
#define TIM1_BRK_TIM15_IRQHandler TIM1_BRK_IRQHandler
|
||||
#define TIM1_TRG_COM_TIM11_IRQHandler TIM1_TRG_COM_IRQHandler
|
||||
#define TIM9_IRQHandler TIM1_BRK_IRQHandler
|
||||
#define TIM11_IRQHandler TIM1_TRG_COM_IRQHandler
|
||||
#define TIM1_TRG_COM_TIM17_IRQHandler TIM1_TRG_COM_IRQHandler
|
||||
#define TIM10_IRQHandler TIM1_UP_IRQHandler
|
||||
#define TIM1_TRG_COM_TIM11_IRQHandler TIM1_TRG_COM_IRQHandler
|
||||
#define TIM1_UP_TIM16_IRQHandler TIM1_UP_IRQHandler
|
||||
#define TIM1_UP_TIM10_IRQHandler TIM1_UP_IRQHandler
|
||||
#define TIM10_IRQHandler TIM1_UP_IRQHandler
|
||||
#define TIM6_DAC_IRQHandler TIM6_IRQHandler
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1330,6 +1330,11 @@ typedef struct
|
|||
/* Reset and Clock Control */
|
||||
/* */
|
||||
/******************************************************************************/
|
||||
/*
|
||||
* @brief Specific device feature definitions (not present on all devices in the STM32F1 serie)
|
||||
*/
|
||||
#define RCC_PLL2_SUPPORT /*!< Support PLL2 */
|
||||
#define RCC_PLLI2S_SUPPORT
|
||||
|
||||
/******************** Bit definition for RCC_CR register ********************/
|
||||
#define RCC_CR_HSION_Pos (0U)
|
||||
|
|
@ -1363,11 +1368,6 @@ typedef struct
|
|||
#define RCC_CR_PLLRDY_Msk (0x1UL << RCC_CR_PLLRDY_Pos) /*!< 0x02000000 */
|
||||
#define RCC_CR_PLLRDY RCC_CR_PLLRDY_Msk /*!< PLL clock ready flag */
|
||||
|
||||
/*
|
||||
* @brief Specific device feature definitions (not present on all devices in the STM32F1 serie)
|
||||
*/
|
||||
#define RCC_PLL2_SUPPORT /*!< Support PLL2 */
|
||||
|
||||
#define RCC_CR_PLL2ON_Pos (26U)
|
||||
#define RCC_CR_PLL2ON_Msk (0x1UL << RCC_CR_PLL2ON_Pos) /*!< 0x04000000 */
|
||||
#define RCC_CR_PLL2ON RCC_CR_PLL2ON_Msk /*!< PLL2 enable */
|
||||
|
|
@ -1375,11 +1375,6 @@ typedef struct
|
|||
#define RCC_CR_PLL2RDY_Msk (0x1UL << RCC_CR_PLL2RDY_Pos) /*!< 0x08000000 */
|
||||
#define RCC_CR_PLL2RDY RCC_CR_PLL2RDY_Msk /*!< PLL2 clock ready flag */
|
||||
|
||||
/*
|
||||
* @brief Specific device feature definitions (not present on all devices in the STM32F1 serie)
|
||||
*/
|
||||
#define RCC_PLLI2S_SUPPORT /*!< Support PLL3 (PLLI2S)*/
|
||||
|
||||
#define RCC_CR_PLL3ON_Pos (28U)
|
||||
#define RCC_CR_PLL3ON_Msk (0x1UL << RCC_CR_PLL3ON_Pos) /*!< 0x10000000 */
|
||||
#define RCC_CR_PLL3ON RCC_CR_PLL3ON_Msk /*!< PLL3 enable */
|
||||
|
|
@ -12006,7 +12001,6 @@ typedef struct
|
|||
#define SPI_I2SCFGR_I2SMOD_Pos (11U)
|
||||
#define SPI_I2SCFGR_I2SMOD_Msk (0x1UL << SPI_I2SCFGR_I2SMOD_Pos) /*!< 0x00000800 */
|
||||
#define SPI_I2SCFGR_I2SMOD SPI_I2SCFGR_I2SMOD_Msk /*!< I2S mode selection */
|
||||
|
||||
/****************** Bit definition for SPI_I2SPR register *******************/
|
||||
#define SPI_I2SPR_I2SDIV_Pos (0U)
|
||||
#define SPI_I2SPR_I2SDIV_Msk (0xFFUL << SPI_I2SPR_I2SDIV_Pos) /*!< 0x000000FF */
|
||||
|
|
@ -15003,8 +14997,6 @@ typedef struct
|
|||
((INSTANCE) == TIM4) || \
|
||||
((INSTANCE) == TIM5))
|
||||
|
||||
#define IS_TIM_SYNCHRO_INSTANCE(INSTANCE) IS_TIM_MASTER_INSTANCE(INSTANCE)
|
||||
|
||||
#define IS_TIM_DMABURST_INSTANCE(INSTANCE)\
|
||||
(((INSTANCE) == TIM1) || \
|
||||
((INSTANCE) == TIM2) || \
|
||||
|
|
@ -15195,42 +15187,42 @@ typedef struct
|
|||
|
||||
/* Aliases for __IRQn */
|
||||
#define ADC1_IRQn ADC1_2_IRQn
|
||||
#define USB_LP_CAN1_RX0_IRQn CAN1_RX0_IRQn
|
||||
#define USB_LP_IRQn CAN1_RX0_IRQn
|
||||
#define USB_HP_CAN1_TX_IRQn CAN1_TX_IRQn
|
||||
#define USB_LP_CAN1_RX0_IRQn CAN1_RX0_IRQn
|
||||
#define USB_HP_IRQn CAN1_TX_IRQn
|
||||
#define USB_HP_CAN1_TX_IRQn CAN1_TX_IRQn
|
||||
#define DMA2_Channel4_5_IRQn DMA2_Channel4_IRQn
|
||||
#define USBWakeUp_IRQn OTG_FS_WKUP_IRQn
|
||||
#define CEC_IRQn OTG_FS_WKUP_IRQn
|
||||
#define TIM1_BRK_TIM9_IRQn TIM1_BRK_IRQn
|
||||
#define TIM1_BRK_TIM15_IRQn TIM1_BRK_IRQn
|
||||
#define TIM9_IRQn TIM1_BRK_IRQn
|
||||
#define TIM1_BRK_TIM9_IRQn TIM1_BRK_IRQn
|
||||
#define TIM11_IRQn TIM1_TRG_COM_IRQn
|
||||
#define TIM1_TRG_COM_TIM17_IRQn TIM1_TRG_COM_IRQn
|
||||
#define TIM1_TRG_COM_TIM11_IRQn TIM1_TRG_COM_IRQn
|
||||
#define TIM11_IRQn TIM1_TRG_COM_IRQn
|
||||
#define TIM1_UP_TIM10_IRQn TIM1_UP_IRQn
|
||||
#define TIM1_UP_TIM16_IRQn TIM1_UP_IRQn
|
||||
#define TIM1_UP_TIM10_IRQn TIM1_UP_IRQn
|
||||
#define TIM10_IRQn TIM1_UP_IRQn
|
||||
#define TIM6_DAC_IRQn TIM6_IRQn
|
||||
|
||||
|
||||
/* Aliases for __IRQHandler */
|
||||
#define ADC1_IRQHandler ADC1_2_IRQHandler
|
||||
#define USB_LP_CAN1_RX0_IRQHandler CAN1_RX0_IRQHandler
|
||||
#define USB_LP_IRQHandler CAN1_RX0_IRQHandler
|
||||
#define USB_HP_CAN1_TX_IRQHandler CAN1_TX_IRQHandler
|
||||
#define USB_LP_CAN1_RX0_IRQHandler CAN1_RX0_IRQHandler
|
||||
#define USB_HP_IRQHandler CAN1_TX_IRQHandler
|
||||
#define USB_HP_CAN1_TX_IRQHandler CAN1_TX_IRQHandler
|
||||
#define DMA2_Channel4_5_IRQHandler DMA2_Channel4_IRQHandler
|
||||
#define USBWakeUp_IRQHandler OTG_FS_WKUP_IRQHandler
|
||||
#define CEC_IRQHandler OTG_FS_WKUP_IRQHandler
|
||||
#define TIM1_BRK_TIM9_IRQHandler TIM1_BRK_IRQHandler
|
||||
#define TIM1_BRK_TIM15_IRQHandler TIM1_BRK_IRQHandler
|
||||
#define TIM9_IRQHandler TIM1_BRK_IRQHandler
|
||||
#define TIM1_BRK_TIM9_IRQHandler TIM1_BRK_IRQHandler
|
||||
#define TIM11_IRQHandler TIM1_TRG_COM_IRQHandler
|
||||
#define TIM1_TRG_COM_TIM17_IRQHandler TIM1_TRG_COM_IRQHandler
|
||||
#define TIM1_TRG_COM_TIM11_IRQHandler TIM1_TRG_COM_IRQHandler
|
||||
#define TIM11_IRQHandler TIM1_TRG_COM_IRQHandler
|
||||
#define TIM1_UP_TIM10_IRQHandler TIM1_UP_IRQHandler
|
||||
#define TIM1_UP_TIM16_IRQHandler TIM1_UP_IRQHandler
|
||||
#define TIM1_UP_TIM10_IRQHandler TIM1_UP_IRQHandler
|
||||
#define TIM10_IRQHandler TIM1_UP_IRQHandler
|
||||
#define TIM6_DAC_IRQHandler TIM6_IRQHandler
|
||||
|
||||
|
|
|
|||
|
|
@ -90,11 +90,11 @@
|
|||
#endif /* USE_HAL_DRIVER */
|
||||
|
||||
/**
|
||||
* @brief CMSIS Device version number V4.3.1
|
||||
* @brief CMSIS Device version number V4.3.2
|
||||
*/
|
||||
#define __STM32F1_CMSIS_VERSION_MAIN (0x04) /*!< [31:24] main version */
|
||||
#define __STM32F1_CMSIS_VERSION_SUB1 (0x03) /*!< [23:16] sub1 version */
|
||||
#define __STM32F1_CMSIS_VERSION_SUB2 (0x01) /*!< [15:8] sub2 version */
|
||||
#define __STM32F1_CMSIS_VERSION_SUB2 (0x02) /*!< [15:8] sub2 version */
|
||||
#define __STM32F1_CMSIS_VERSION_RC (0x00) /*!< [7:0] release candidate */
|
||||
#define __STM32F1_CMSIS_VERSION ((__STM32F1_CMSIS_VERSION_MAIN << 24)\
|
||||
|(__STM32F1_CMSIS_VERSION_SUB1 << 16)\
|
||||
|
|
|
|||
|
|
@ -0,0 +1,83 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License.
|
||||
|
||||
Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License.
|
||||
|
||||
Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution.
|
||||
|
||||
You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
||||
1.You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
||||
2.You must cause any modified files to carry prominent notices stating that You changed the files; and
|
||||
3.You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
||||
4.If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions.
|
||||
|
||||
Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks.
|
||||
|
||||
This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability.
|
||||
|
||||
In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability.
|
||||
|
||||
While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX:
|
||||
|
||||
Copyright [2019] [STMicroelectronics]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
# STM32CubeF1 CMSIS Device MCU Component
|
||||
|
||||
## Overview
|
||||
|
||||
**STM32Cube** is an STMicroelectronics original initiative to ease the developers life by reducing efforts, time and cost.
|
||||
|
||||
**STM32Cube** covers the overall STM32 products portfolio. It includes a comprehensive embedded software platform, delivered for each STM32 series.
|
||||
* The CMSIS modules (core and device) corresponding to the ARM(tm) core implemented in this STM32 product
|
||||
* The STM32 HAL-LL drivers : an abstraction drivers layer, the API ensuring maximized portability across the STM32 portfolio
|
||||
* The BSP Drivers of each evaluation or demonstration board provided by this STM32 series
|
||||
* A consistent set of middlewares components such as RTOS, USB, FatFS, Graphics, STM32_TouchSensing_Library ...
|
||||
* A full set of software projects (basic examples, applications or demonstrations) for each board provided by this STM32 series
|
||||
|
||||
Two models of publication are proposed for the STM32Cube embedded software :
|
||||
* The monolithic **MCU Package** : all STM32Cube software modules of one STM32 series are present (Drivers, Middlewares, Projects, Utilities) in the repo (usual name **STM32Cubexx**, xx corresponding to the STM32 series)
|
||||
* The **MCU component** : progressively from November 2019, each STM32Cube software module being part of the STM32Cube MCU Package, will be delivered as an individual repo, allowing the user to select and get only the required software functions.
|
||||
|
||||
## Description
|
||||
|
||||
This **cmsis_device_f1** MCU component repo is one element of the STM32CubeF1 MCU embedded software package, providing the **cmsis device** part.
|
||||
|
||||
## Release note
|
||||
|
||||
Details about the content of this release are available in the release note [here](https://htmlpreview.github.io/?https://github.com/STMicroelectronics/cmsis_device_f1/blob/master/Release_Notes.html).
|
||||
|
||||
## Compatibility information
|
||||
|
||||
In this table, you can find the successive versions of this CMSIS Device component, in-line with the corresponding versions of the full MCU package:
|
||||
|
||||
CMSIS Device F1 | CMSIS Core | Was delivered in the full MCU package
|
||||
--------------- | ---------- | -------------------------------------
|
||||
Tag v4.3.1 | Tag v5.4.0_cm3 | Tag v1.8.0
|
||||
Tag v4.3.1 | Tag v5.4.0_cm3 | Tag v1.8.1
|
||||
Tag v4.3.2 | Tag v5.4.0_cm3 | Tag v1.8.2
|
||||
|
||||
The full **STM32CubeF1** MCU package is available [here](https://github.com/STMicroelectronics/STM32CubeF1).
|
||||
|
||||
## Troubleshooting
|
||||
If you have any issue with the **Software content** of this repo, you can [file an issue on Github](https://github.com/STMicroelectronics/cmsis_device_f1/issues/new).
|
||||
|
||||
For any other question related to the product, the tools, the environment, you can submit a topic on the [ST Community/STM32 MCUs forum](https://community.st.com/s/group/0F90X000000AXsASAW/stm32-mcus).
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -89,12 +89,31 @@
|
|||
/* #define DATA_IN_ExtSRAM */
|
||||
#endif /* STM32F100xE || STM32F101xE || STM32F101xG || STM32F103xE || STM32F103xG */
|
||||
|
||||
/*!< Uncomment the following line if you need to relocate your vector Table in
|
||||
Internal SRAM. */
|
||||
/* Note: Following vector table addresses must be defined in line with linker
|
||||
configuration. */
|
||||
/*!< Uncomment the following line if you need to relocate the vector table
|
||||
anywhere in Flash or Sram, else the vector table is kept at the automatic
|
||||
remap of boot address selected */
|
||||
/* #define USER_VECT_TAB_ADDRESS */
|
||||
|
||||
#if defined(USER_VECT_TAB_ADDRESS)
|
||||
/*!< Uncomment the following line if you need to relocate your vector Table
|
||||
in Sram else user remap will be done in Flash. */
|
||||
/* #define VECT_TAB_SRAM */
|
||||
#if defined(VECT_TAB_SRAM)
|
||||
#define VECT_TAB_BASE_ADDRESS SRAM_BASE /*!< Vector Table base address field.
|
||||
This value must be a multiple of 0x200. */
|
||||
#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field.
|
||||
This value must be a multiple of 0x200. */
|
||||
#else
|
||||
#define VECT_TAB_BASE_ADDRESS FLASH_BASE /*!< Vector Table base address field.
|
||||
This value must be a multiple of 0x200. */
|
||||
#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field.
|
||||
This value must be a multiple of 0x200. */
|
||||
#endif /* VECT_TAB_SRAM */
|
||||
#endif /* USER_VECT_TAB_ADDRESS */
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
|
@ -156,57 +175,16 @@ const uint8_t APBPrescTable[8U] = {0, 0, 0, 0, 1, 2, 3, 4};
|
|||
*/
|
||||
void SystemInit (void)
|
||||
{
|
||||
/* Reset the RCC clock configuration to the default reset state(for debug purpose) */
|
||||
/* Set HSION bit */
|
||||
RCC->CR |= 0x00000001U;
|
||||
|
||||
/* Reset SW, HPRE, PPRE1, PPRE2, ADCPRE and MCO bits */
|
||||
#if !defined(STM32F105xC) && !defined(STM32F107xC)
|
||||
RCC->CFGR &= 0xF8FF0000U;
|
||||
#else
|
||||
RCC->CFGR &= 0xF0FF0000U;
|
||||
#endif /* STM32F105xC */
|
||||
|
||||
/* Reset HSEON, CSSON and PLLON bits */
|
||||
RCC->CR &= 0xFEF6FFFFU;
|
||||
|
||||
/* Reset HSEBYP bit */
|
||||
RCC->CR &= 0xFFFBFFFFU;
|
||||
|
||||
/* Reset PLLSRC, PLLXTPRE, PLLMUL and USBPRE/OTGFSPRE bits */
|
||||
RCC->CFGR &= 0xFF80FFFFU;
|
||||
|
||||
#if defined(STM32F105xC) || defined(STM32F107xC)
|
||||
/* Reset PLL2ON and PLL3ON bits */
|
||||
RCC->CR &= 0xEBFFFFFFU;
|
||||
|
||||
/* Disable all interrupts and clear pending bits */
|
||||
RCC->CIR = 0x00FF0000U;
|
||||
|
||||
/* Reset CFGR2 register */
|
||||
RCC->CFGR2 = 0x00000000U;
|
||||
#elif defined(STM32F100xB) || defined(STM32F100xE)
|
||||
/* Disable all interrupts and clear pending bits */
|
||||
RCC->CIR = 0x009F0000U;
|
||||
|
||||
/* Reset CFGR2 register */
|
||||
RCC->CFGR2 = 0x00000000U;
|
||||
#else
|
||||
/* Disable all interrupts and clear pending bits */
|
||||
RCC->CIR = 0x009F0000U;
|
||||
#endif /* STM32F105xC */
|
||||
|
||||
#if defined(STM32F100xE) || defined(STM32F101xE) || defined(STM32F101xG) || defined(STM32F103xE) || defined(STM32F103xG)
|
||||
#ifdef DATA_IN_ExtSRAM
|
||||
SystemInit_ExtMemCtl();
|
||||
#endif /* DATA_IN_ExtSRAM */
|
||||
#endif
|
||||
|
||||
#ifdef VECT_TAB_SRAM
|
||||
SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM. */
|
||||
#else
|
||||
SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH. */
|
||||
#endif
|
||||
/* Configure the Vector Table location -------------------------------------*/
|
||||
#if defined(USER_VECT_TAB_ADDRESS)
|
||||
SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM. */
|
||||
#endif /* USER_VECT_TAB_ADDRESS */
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
|
|
@ -38,7 +38,6 @@
|
|||
#define AES_CLEARFLAG_CCF CRYP_CLEARFLAG_CCF
|
||||
#define AES_CLEARFLAG_RDERR CRYP_CLEARFLAG_RDERR
|
||||
#define AES_CLEARFLAG_WRERR CRYP_CLEARFLAG_WRERR
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -236,12 +235,12 @@
|
|||
#define DAC_WAVEGENERATION_NOISE DAC_WAVE_NOISE
|
||||
#define DAC_WAVEGENERATION_TRIANGLE DAC_WAVE_TRIANGLE
|
||||
|
||||
#if defined(STM32G4)
|
||||
#define DAC_CHIPCONNECT_DISABLE (DAC_CHIPCONNECT_EXTERNAL | DAC_CHIPCONNECT_BOTH)
|
||||
#define DAC_CHIPCONNECT_ENABLE (DAC_CHIPCONNECT_INTERNAL | DAC_CHIPCONNECT_BOTH)
|
||||
#if defined(STM32G4) || defined(STM32H7)
|
||||
#define DAC_CHIPCONNECT_DISABLE DAC_CHIPCONNECT_EXTERNAL
|
||||
#define DAC_CHIPCONNECT_ENABLE DAC_CHIPCONNECT_INTERNAL
|
||||
#endif
|
||||
|
||||
#if defined(STM32L1) || defined(STM32L4) || defined(STM32G0)
|
||||
#if defined(STM32L1) || defined(STM32L4) || defined(STM32G0) || defined(STM32L5) || defined(STM32H7) || defined(STM32F4) || defined(STM32G4)
|
||||
#define HAL_DAC_MSP_INIT_CB_ID HAL_DAC_MSPINIT_CB_ID
|
||||
#define HAL_DAC_MSP_DEINIT_CB_ID HAL_DAC_MSPDEINIT_CB_ID
|
||||
#endif
|
||||
|
|
@ -306,8 +305,22 @@
|
|||
#define HAL_DMAMUX_REQUEST_GEN_FALLING HAL_DMAMUX_REQ_GEN_FALLING
|
||||
#define HAL_DMAMUX_REQUEST_GEN_RISING_FALLING HAL_DMAMUX_REQ_GEN_RISING_FALLING
|
||||
|
||||
#if defined(STM32L4R5xx) || defined(STM32L4R9xx) || defined(STM32L4R9xx) || defined(STM32L4S5xx) || defined(STM32L4S7xx) || defined(STM32L4S9xx)
|
||||
#define DMA_REQUEST_DCMI_PSSI DMA_REQUEST_DCMI
|
||||
#endif
|
||||
|
||||
#endif /* STM32L4 */
|
||||
|
||||
#if defined(STM32G0)
|
||||
#define DMA_REQUEST_DAC1_CHANNEL1 DMA_REQUEST_DAC1_CH1
|
||||
#define DMA_REQUEST_DAC1_CHANNEL2 DMA_REQUEST_DAC1_CH2
|
||||
#define DMA_REQUEST_TIM16_TRIG_COM DMA_REQUEST_TIM16_COM
|
||||
#define DMA_REQUEST_TIM17_TRIG_COM DMA_REQUEST_TIM17_COM
|
||||
|
||||
#define LL_DMAMUX_REQ_TIM16_TRIG_COM LL_DMAMUX_REQ_TIM16_COM
|
||||
#define LL_DMAMUX_REQ_TIM17_TRIG_COM LL_DMAMUX_REQ_TIM17_COM
|
||||
#endif
|
||||
|
||||
#if defined(STM32H7)
|
||||
|
||||
#define DMA_REQUEST_DAC1 DMA_REQUEST_DAC1_CH1
|
||||
|
|
@ -365,6 +378,9 @@
|
|||
#define DFSDM_FILTER_EXT_TRIG_LPTIM2 DFSDM_FILTER_EXT_TRIG_LPTIM2_OUT
|
||||
#define DFSDM_FILTER_EXT_TRIG_LPTIM3 DFSDM_FILTER_EXT_TRIG_LPTIM3_OUT
|
||||
|
||||
#define DAC_TRIGGER_LP1_OUT DAC_TRIGGER_LPTIM1_OUT
|
||||
#define DAC_TRIGGER_LP2_OUT DAC_TRIGGER_LPTIM2_OUT
|
||||
|
||||
#endif /* STM32H7 */
|
||||
|
||||
/**
|
||||
|
|
@ -460,7 +476,9 @@
|
|||
#define FLASH_FLAG_SNECCE_BANK2RR FLASH_FLAG_SNECCERR_BANK2
|
||||
#define FLASH_FLAG_DBECCE_BANK2RR FLASH_FLAG_DBECCERR_BANK2
|
||||
#define FLASH_FLAG_STRBER_BANK2R FLASH_FLAG_STRBERR_BANK2
|
||||
#endif
|
||||
#define FLASH_FLAG_WDW FLASH_FLAG_WBNE
|
||||
#define OB_WRP_SECTOR_All OB_WRP_SECTOR_ALL
|
||||
#endif /* STM32H7 */
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
|
@ -564,7 +582,14 @@
|
|||
#define GPIO_AF9_SDIO2 GPIO_AF9_SDMMC2
|
||||
#define GPIO_AF10_SDIO2 GPIO_AF10_SDMMC2
|
||||
#define GPIO_AF11_SDIO2 GPIO_AF11_SDMMC2
|
||||
#endif
|
||||
|
||||
#if defined (STM32H743xx) || defined (STM32H753xx) || defined (STM32H750xx) || defined (STM32H742xx) || \
|
||||
defined (STM32H745xx) || defined (STM32H755xx) || defined (STM32H747xx) || defined (STM32H757xx)
|
||||
#define GPIO_AF10_OTG2_HS GPIO_AF10_OTG2_FS
|
||||
#define GPIO_AF10_OTG1_FS GPIO_AF10_OTG1_HS
|
||||
#define GPIO_AF12_OTG2_FS GPIO_AF12_OTG1_FS
|
||||
#endif /*STM32H743xx || STM32H753xx || STM32H750xx || STM32H742xx || STM32H745xx || STM32H755xx || STM32H747xx || STM32H757xx */
|
||||
#endif /* STM32H7 */
|
||||
|
||||
#define GPIO_AF0_LPTIM GPIO_AF0_LPTIM1
|
||||
#define GPIO_AF1_LPTIM GPIO_AF1_LPTIM1
|
||||
|
|
@ -622,6 +647,10 @@
|
|||
#define HAL_HRTIM_ExternalEventCounterEnable HAL_HRTIM_ExtEventCounterEnable
|
||||
#define HAL_HRTIM_ExternalEventCounterDisable HAL_HRTIM_ExtEventCounterDisable
|
||||
#define HAL_HRTIM_ExternalEventCounterReset HAL_HRTIM_ExtEventCounterReset
|
||||
#define HRTIM_TIMEEVENT_A HRTIM_EVENTCOUNTER_A
|
||||
#define HRTIM_TIMEEVENT_B HRTIM_EVENTCOUNTER_B
|
||||
#define HRTIM_TIMEEVENTRESETMODE_UNCONDITIONAL HRTIM_EVENTCOUNTER_RSTMODE_UNCONDITIONAL
|
||||
#define HRTIM_TIMEEVENTRESETMODE_CONDITIONAL HRTIM_EVENTCOUNTER_RSTMODE_CONDITIONAL
|
||||
#endif /* STM32G4 */
|
||||
|
||||
#if defined(STM32H7)
|
||||
|
|
@ -735,6 +764,66 @@
|
|||
#define HRTIM_OUTPUTRESET_TIMFEV8_TIMECMP2 HRTIM_OUTPUTSET_TIMEV_8
|
||||
#define HRTIM_OUTPUTRESET_TIMFEV9_TIMECMP3 HRTIM_OUTPUTSET_TIMEV_9
|
||||
#endif /* STM32H7 */
|
||||
|
||||
#if defined(STM32F3)
|
||||
/** @brief Constants defining available sources associated to external events.
|
||||
*/
|
||||
#define HRTIM_EVENTSRC_1 (0x00000000U)
|
||||
#define HRTIM_EVENTSRC_2 (HRTIM_EECR1_EE1SRC_0)
|
||||
#define HRTIM_EVENTSRC_3 (HRTIM_EECR1_EE1SRC_1)
|
||||
#define HRTIM_EVENTSRC_4 (HRTIM_EECR1_EE1SRC_1 | HRTIM_EECR1_EE1SRC_0)
|
||||
|
||||
/** @brief Constants defining the events that can be selected to configure the
|
||||
* set/reset crossbar of a timer output
|
||||
*/
|
||||
#define HRTIM_OUTPUTSET_TIMEV_1 (HRTIM_SET1R_TIMEVNT1)
|
||||
#define HRTIM_OUTPUTSET_TIMEV_2 (HRTIM_SET1R_TIMEVNT2)
|
||||
#define HRTIM_OUTPUTSET_TIMEV_3 (HRTIM_SET1R_TIMEVNT3)
|
||||
#define HRTIM_OUTPUTSET_TIMEV_4 (HRTIM_SET1R_TIMEVNT4)
|
||||
#define HRTIM_OUTPUTSET_TIMEV_5 (HRTIM_SET1R_TIMEVNT5)
|
||||
#define HRTIM_OUTPUTSET_TIMEV_6 (HRTIM_SET1R_TIMEVNT6)
|
||||
#define HRTIM_OUTPUTSET_TIMEV_7 (HRTIM_SET1R_TIMEVNT7)
|
||||
#define HRTIM_OUTPUTSET_TIMEV_8 (HRTIM_SET1R_TIMEVNT8)
|
||||
#define HRTIM_OUTPUTSET_TIMEV_9 (HRTIM_SET1R_TIMEVNT9)
|
||||
|
||||
#define HRTIM_OUTPUTRESET_TIMEV_1 (HRTIM_RST1R_TIMEVNT1)
|
||||
#define HRTIM_OUTPUTRESET_TIMEV_2 (HRTIM_RST1R_TIMEVNT2)
|
||||
#define HRTIM_OUTPUTRESET_TIMEV_3 (HRTIM_RST1R_TIMEVNT3)
|
||||
#define HRTIM_OUTPUTRESET_TIMEV_4 (HRTIM_RST1R_TIMEVNT4)
|
||||
#define HRTIM_OUTPUTRESET_TIMEV_5 (HRTIM_RST1R_TIMEVNT5)
|
||||
#define HRTIM_OUTPUTRESET_TIMEV_6 (HRTIM_RST1R_TIMEVNT6)
|
||||
#define HRTIM_OUTPUTRESET_TIMEV_7 (HRTIM_RST1R_TIMEVNT7)
|
||||
#define HRTIM_OUTPUTRESET_TIMEV_8 (HRTIM_RST1R_TIMEVNT8)
|
||||
#define HRTIM_OUTPUTRESET_TIMEV_9 (HRTIM_RST1R_TIMEVNT9)
|
||||
|
||||
/** @brief Constants defining the event filtering applied to external events
|
||||
* by a timer
|
||||
*/
|
||||
#define HRTIM_TIMEVENTFILTER_NONE (0x00000000U)
|
||||
#define HRTIM_TIMEVENTFILTER_BLANKINGCMP1 (HRTIM_EEFR1_EE1FLTR_0)
|
||||
#define HRTIM_TIMEVENTFILTER_BLANKINGCMP2 (HRTIM_EEFR1_EE1FLTR_1)
|
||||
#define HRTIM_TIMEVENTFILTER_BLANKINGCMP3 (HRTIM_EEFR1_EE1FLTR_1 | HRTIM_EEFR1_EE1FLTR_0)
|
||||
#define HRTIM_TIMEVENTFILTER_BLANKINGCMP4 (HRTIM_EEFR1_EE1FLTR_2)
|
||||
#define HRTIM_TIMEVENTFILTER_BLANKINGFLTR1 (HRTIM_EEFR1_EE1FLTR_2 | HRTIM_EEFR1_EE1FLTR_0)
|
||||
#define HRTIM_TIMEVENTFILTER_BLANKINGFLTR2 (HRTIM_EEFR1_EE1FLTR_2 | HRTIM_EEFR1_EE1FLTR_1)
|
||||
#define HRTIM_TIMEVENTFILTER_BLANKINGFLTR3 (HRTIM_EEFR1_EE1FLTR_2 | HRTIM_EEFR1_EE1FLTR_1 | HRTIM_EEFR1_EE1FLTR_0)
|
||||
#define HRTIM_TIMEVENTFILTER_BLANKINGFLTR4 (HRTIM_EEFR1_EE1FLTR_3)
|
||||
#define HRTIM_TIMEVENTFILTER_BLANKINGFLTR5 (HRTIM_EEFR1_EE1FLTR_3 | HRTIM_EEFR1_EE1FLTR_0)
|
||||
#define HRTIM_TIMEVENTFILTER_BLANKINGFLTR6 (HRTIM_EEFR1_EE1FLTR_3 | HRTIM_EEFR1_EE1FLTR_1)
|
||||
#define HRTIM_TIMEVENTFILTER_BLANKINGFLTR7 (HRTIM_EEFR1_EE1FLTR_3 | HRTIM_EEFR1_EE1FLTR_1 | HRTIM_EEFR1_EE1FLTR_0)
|
||||
#define HRTIM_TIMEVENTFILTER_BLANKINGFLTR8 (HRTIM_EEFR1_EE1FLTR_3 | HRTIM_EEFR1_EE1FLTR_2)
|
||||
#define HRTIM_TIMEVENTFILTER_WINDOWINGCMP2 (HRTIM_EEFR1_EE1FLTR_3 | HRTIM_EEFR1_EE1FLTR_2 | HRTIM_EEFR1_EE1FLTR_0)
|
||||
#define HRTIM_TIMEVENTFILTER_WINDOWINGCMP3 (HRTIM_EEFR1_EE1FLTR_3 | HRTIM_EEFR1_EE1FLTR_2 | HRTIM_EEFR1_EE1FLTR_1)
|
||||
#define HRTIM_TIMEVENTFILTER_WINDOWINGTIM (HRTIM_EEFR1_EE1FLTR_3 | HRTIM_EEFR1_EE1FLTR_2 | HRTIM_EEFR1_EE1FLTR_1 | HRTIM_EEFR1_EE1FLTR_0)
|
||||
|
||||
/** @brief Constants defining the DLL calibration periods (in micro seconds)
|
||||
*/
|
||||
#define HRTIM_CALIBRATIONRATE_7300 0x00000000U
|
||||
#define HRTIM_CALIBRATIONRATE_910 (HRTIM_DLLCR_CALRTE_0)
|
||||
#define HRTIM_CALIBRATIONRATE_114 (HRTIM_DLLCR_CALRTE_1)
|
||||
#define HRTIM_CALIBRATIONRATE_14 (HRTIM_DLLCR_CALRTE_1 | HRTIM_DLLCR_CALRTE_0)
|
||||
|
||||
#endif /* STM32F3 */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -874,7 +963,7 @@
|
|||
#define OPAMP_PGACONNECT_VM0 OPAMP_PGA_CONNECT_INVERTINGINPUT_IO0
|
||||
#define OPAMP_PGACONNECT_VM1 OPAMP_PGA_CONNECT_INVERTINGINPUT_IO1
|
||||
|
||||
#if defined(STM32L1) || defined(STM32L4)
|
||||
#if defined(STM32L1) || defined(STM32L4) || defined(STM32L5) || defined(STM32H7) || defined(STM32G4)
|
||||
#define HAL_OPAMP_MSP_INIT_CB_ID HAL_OPAMP_MSPINIT_CB_ID
|
||||
#define HAL_OPAMP_MSP_DEINIT_CB_ID HAL_OPAMP_MSPDEINIT_CB_ID
|
||||
#endif
|
||||
|
|
@ -965,6 +1054,16 @@
|
|||
#define RTC_TAMPERPIN_PA0 RTC_TAMPERPIN_POS1
|
||||
#define RTC_TAMPERPIN_PI8 RTC_TAMPERPIN_POS1
|
||||
|
||||
#if defined(STM32H7)
|
||||
#define RTC_TAMPCR_TAMPXE RTC_TAMPER_X
|
||||
#define RTC_TAMPCR_TAMPXIE RTC_TAMPER_X_INTERRUPT
|
||||
|
||||
#define RTC_TAMPER1_INTERRUPT RTC_IT_TAMP1
|
||||
#define RTC_TAMPER2_INTERRUPT RTC_IT_TAMP2
|
||||
#define RTC_TAMPER3_INTERRUPT RTC_IT_TAMP3
|
||||
#define RTC_ALL_TAMPER_INTERRUPT RTC_IT_TAMPALL
|
||||
#endif /* STM32H7 */
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -1358,6 +1457,30 @@
|
|||
|
||||
#define HASH_HMACKeyType_ShortKey HASH_HMAC_KEYTYPE_SHORTKEY
|
||||
#define HASH_HMACKeyType_LongKey HASH_HMAC_KEYTYPE_LONGKEY
|
||||
|
||||
#if defined(STM32L4) || defined(STM32L5) || defined(STM32F2) || defined(STM32F4) || defined(STM32F7) || defined(STM32H7)
|
||||
|
||||
#define HAL_HASH_MD5_Accumulate HAL_HASH_MD5_Accmlt
|
||||
#define HAL_HASH_MD5_Accumulate_End HAL_HASH_MD5_Accmlt_End
|
||||
#define HAL_HASH_MD5_Accumulate_IT HAL_HASH_MD5_Accmlt_IT
|
||||
#define HAL_HASH_MD5_Accumulate_End_IT HAL_HASH_MD5_Accmlt_End_IT
|
||||
|
||||
#define HAL_HASH_SHA1_Accumulate HAL_HASH_SHA1_Accmlt
|
||||
#define HAL_HASH_SHA1_Accumulate_End HAL_HASH_SHA1_Accmlt_End
|
||||
#define HAL_HASH_SHA1_Accumulate_IT HAL_HASH_SHA1_Accmlt_IT
|
||||
#define HAL_HASH_SHA1_Accumulate_End_IT HAL_HASH_SHA1_Accmlt_End_IT
|
||||
|
||||
#define HAL_HASHEx_SHA224_Accumulate HAL_HASHEx_SHA224_Accmlt
|
||||
#define HAL_HASHEx_SHA224_Accumulate_End HAL_HASHEx_SHA224_Accmlt_End
|
||||
#define HAL_HASHEx_SHA224_Accumulate_IT HAL_HASHEx_SHA224_Accmlt_IT
|
||||
#define HAL_HASHEx_SHA224_Accumulate_End_IT HAL_HASHEx_SHA224_Accmlt_End_IT
|
||||
|
||||
#define HAL_HASHEx_SHA256_Accumulate HAL_HASHEx_SHA256_Accmlt
|
||||
#define HAL_HASHEx_SHA256_Accumulate_End HAL_HASHEx_SHA256_Accmlt_End
|
||||
#define HAL_HASHEx_SHA256_Accumulate_IT HAL_HASHEx_SHA256_Accmlt_IT
|
||||
#define HAL_HASHEx_SHA256_Accumulate_End_IT HAL_HASHEx_SHA256_Accmlt_End_IT
|
||||
|
||||
#endif /* STM32L4 || STM32L5 || STM32F2 || STM32F4 || STM32F7 || STM32H7 */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -1380,6 +1503,13 @@
|
|||
#endif
|
||||
#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())
|
||||
#if defined(STM32H7A3xx) || defined(STM32H7B3xx) || defined(STM32H7B0xx) || defined(STM32H7A3xxQ) || defined(STM32H7B3xxQ) || defined(STM32H7B0xxQ)
|
||||
#define HAL_EnableSRDomainDBGStopMode HAL_EnableDomain3DBGStopMode
|
||||
#define HAL_DisableSRDomainDBGStopMode HAL_DisableDomain3DBGStopMode
|
||||
#define HAL_EnableSRDomainDBGStandbyMode HAL_EnableDomain3DBGStandbyMode
|
||||
#define HAL_DisableSRDomainDBGStandbyMode HAL_DisableDomain3DBGStandbyMode
|
||||
#endif /* STM32H7A3xx || STM32H7B3xx || STM32H7B0xx || STM32H7A3xxQ || STM32H7B3xxQ || STM32H7B0xxQ */
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -1409,16 +1539,18 @@
|
|||
|
||||
#define HAL_I2CFastModePlusConfig(SYSCFG_I2CFastModePlus, cmd) (((cmd)==ENABLE)? HAL_I2CEx_EnableFastModePlus(SYSCFG_I2CFastModePlus): HAL_I2CEx_DisableFastModePlus(SYSCFG_I2CFastModePlus))
|
||||
|
||||
#if defined(STM32H7) || defined(STM32WB) || defined(STM32G0) || defined(STM32F4) || defined(STM32F7) || defined(STM32L0) || defined(STM32L4) || defined(STM32G4)
|
||||
#if defined(STM32H7) || defined(STM32WB) || defined(STM32G0) || defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) || defined(STM32F4) || defined(STM32F7) || defined(STM32L0) || defined(STM32L4) || defined(STM32L5) || defined(STM32G4) || defined(STM32L1)
|
||||
#define HAL_I2C_Master_Sequential_Transmit_IT HAL_I2C_Master_Seq_Transmit_IT
|
||||
#define HAL_I2C_Master_Sequential_Receive_IT HAL_I2C_Master_Seq_Receive_IT
|
||||
#define HAL_I2C_Slave_Sequential_Transmit_IT HAL_I2C_Slave_Seq_Transmit_IT
|
||||
#define HAL_I2C_Slave_Sequential_Receive_IT HAL_I2C_Slave_Seq_Receive_IT
|
||||
#endif /* STM32H7 || STM32WB || STM32G0 || STM32F0 || STM32F1 || STM32F2 || STM32F3 || STM32F4 || STM32F7 || STM32L0 || STM32L4 || STM32L5 || STM32G4 || STM32L1 */
|
||||
#if defined(STM32H7) || defined(STM32WB) || defined(STM32G0) || defined(STM32F4) || defined(STM32F7) || defined(STM32L0) || defined(STM32L4) || defined(STM32L5) || defined(STM32G4)|| defined(STM32L1)
|
||||
#define HAL_I2C_Master_Sequential_Transmit_DMA HAL_I2C_Master_Seq_Transmit_DMA
|
||||
#define HAL_I2C_Master_Sequential_Receive_DMA HAL_I2C_Master_Seq_Receive_DMA
|
||||
#define HAL_I2C_Slave_Sequential_Transmit_DMA HAL_I2C_Slave_Seq_Transmit_DMA
|
||||
#define HAL_I2C_Slave_Sequential_Receive_DMA HAL_I2C_Slave_Seq_Receive_DMA
|
||||
#endif /* STM32H7 || STM32WB || STM32G0 || STM32F4 || STM32F7 || STM32L0 || STM32L4 */
|
||||
#endif /* STM32H7 || STM32WB || STM32G0 || STM32F4 || STM32F7 || STM32L0 || STM32L4 || STM32L5 || STM32G4 || STM32L1 */
|
||||
|
||||
#if defined(STM32F4)
|
||||
#define HAL_FMPI2C_Master_Sequential_Transmit_IT HAL_FMPI2C_Master_Seq_Transmit_IT
|
||||
|
|
@ -1437,6 +1569,13 @@
|
|||
/** @defgroup HAL_PWR_Aliased HAL PWR Aliased maintained for legacy purpose
|
||||
* @{
|
||||
*/
|
||||
|
||||
#if defined(STM32G0)
|
||||
#define HAL_PWR_ConfigPVD HAL_PWREx_ConfigPVD
|
||||
#define HAL_PWR_EnablePVD HAL_PWREx_EnablePVD
|
||||
#define HAL_PWR_DisablePVD HAL_PWREx_DisablePVD
|
||||
#define HAL_PWR_PVD_IRQHandler HAL_PWREx_PVD_IRQHandler
|
||||
#endif
|
||||
#define HAL_PWR_PVDConfig HAL_PWR_ConfigPVD
|
||||
#define HAL_PWR_DisableBkUpReg HAL_PWREx_DisableBkUpReg
|
||||
#define HAL_PWR_DisableFlashPowerDown HAL_PWREx_DisableFlashPowerDown
|
||||
|
|
@ -1509,14 +1648,14 @@
|
|||
#define HAL_TIM_DMAError TIM_DMAError
|
||||
#define HAL_TIM_DMACaptureCplt TIM_DMACaptureCplt
|
||||
#define HAL_TIMEx_DMACommutationCplt TIMEx_DMACommutationCplt
|
||||
#if defined(STM32H7) || defined(STM32G0) || defined(STM32F7) || defined(STM32F4) || defined(STM32L0) || defined(STM32L4)
|
||||
#if defined(STM32H7) || defined(STM32G0) || defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) || defined(STM32F4) || defined(STM32F7) || defined(STM32L0) || defined(STM32L4)
|
||||
#define HAL_TIM_SlaveConfigSynchronization HAL_TIM_SlaveConfigSynchro
|
||||
#define HAL_TIM_SlaveConfigSynchronization_IT HAL_TIM_SlaveConfigSynchro_IT
|
||||
#define HAL_TIMEx_CommutationCallback HAL_TIMEx_CommutCallback
|
||||
#define HAL_TIMEx_ConfigCommutationEvent HAL_TIMEx_ConfigCommutEvent
|
||||
#define HAL_TIMEx_ConfigCommutationEvent_IT HAL_TIMEx_ConfigCommutEvent_IT
|
||||
#define HAL_TIMEx_ConfigCommutationEvent_DMA HAL_TIMEx_ConfigCommutEvent_DMA
|
||||
#endif /* STM32H7 || STM32G0 || STM32F7 || STM32F4 || STM32L0 */
|
||||
#endif /* STM32H7 || STM32G0 || STM32F0 || STM32F1 || STM32F2 || STM32F3 || STM32F4 || STM32F7 || STM32L0 */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -3112,9 +3251,8 @@
|
|||
#define RCC_MCOSOURCE_PLLCLK_NODIV RCC_MCO1SOURCE_PLLCLK
|
||||
#define RCC_MCOSOURCE_PLLCLK_DIV2 RCC_MCO1SOURCE_PLLCLK_DIV2
|
||||
|
||||
#if defined(STM32L4)
|
||||
#if defined(STM32L4) || defined(STM32WB) || defined(STM32G0) || defined(STM32G4) || defined(STM32L5)
|
||||
#define RCC_RTCCLKSOURCE_NO_CLK RCC_RTCCLKSOURCE_NONE
|
||||
#elif defined(STM32WB) || defined(STM32G0) || defined(STM32G4)
|
||||
#else
|
||||
#define RCC_RTCCLKSOURCE_NONE RCC_RTCCLKSOURCE_NO_CLK
|
||||
#endif
|
||||
|
|
@ -3242,7 +3380,7 @@
|
|||
/** @defgroup HAL_RTC_Aliased_Macros HAL RTC Aliased Macros maintained for legacy purpose
|
||||
* @{
|
||||
*/
|
||||
#if defined (STM32G0) || defined (STM32L412xx) || defined (STM32L422xx) || defined (STM32G4)
|
||||
#if defined (STM32G0) || defined (STM32L5) || defined (STM32L412xx) || defined (STM32L422xx) || defined (STM32L4P5xx) || defined (STM32L4Q5xx) || defined (STM32G4)
|
||||
#else
|
||||
#define __HAL_RTC_CLEAR_FLAG __HAL_RTC_EXTI_CLEAR_FLAG
|
||||
#endif
|
||||
|
|
@ -3365,7 +3503,7 @@
|
|||
#define HAL_SD_CardStateTypedef HAL_SD_CardStateTypeDef
|
||||
#endif
|
||||
|
||||
#if defined(STM32H7)
|
||||
#if defined(STM32H7) || defined(STM32L5)
|
||||
#define HAL_MMCEx_Read_DMADoubleBuffer0CpltCallback HAL_MMCEx_Read_DMADoubleBuf0CpltCallback
|
||||
#define HAL_MMCEx_Read_DMADoubleBuffer1CpltCallback HAL_MMCEx_Read_DMADoubleBuf1CpltCallback
|
||||
#define HAL_MMCEx_Write_DMADoubleBuffer0CpltCallback HAL_MMCEx_Write_DMADoubleBuf0CpltCallback
|
||||
|
|
@ -3620,9 +3758,9 @@
|
|||
/** @defgroup HAL_QSPI_Aliased_Macros HAL QSPI Aliased Macros maintained for legacy purpose
|
||||
* @{
|
||||
*/
|
||||
#if defined (STM32L4)
|
||||
#if defined (STM32L4) || defined (STM32F4) || defined (STM32F7) || defined(STM32H7)
|
||||
#define HAL_QPSI_TIMEOUT_DEFAULT_VALUE HAL_QSPI_TIMEOUT_DEFAULT_VALUE
|
||||
#endif
|
||||
#endif /* STM32L4 || STM32F4 || STM32F7 */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -6,29 +6,13 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© Copyright (c) 2016 STMicroelectronics.
|
||||
* All rights reserved.</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.
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -295,11 +295,11 @@ typedef void (*pCAN_CallbackTypeDef)(CAN_HandleTypeDef *hcan); /*!< pointer to
|
|||
#define HAL_CAN_ERROR_RX_FOV0 (0x00000200U) /*!< Rx FIFO0 overrun error */
|
||||
#define HAL_CAN_ERROR_RX_FOV1 (0x00000400U) /*!< Rx FIFO1 overrun error */
|
||||
#define HAL_CAN_ERROR_TX_ALST0 (0x00000800U) /*!< TxMailbox 0 transmit failure due to arbitration lost */
|
||||
#define HAL_CAN_ERROR_TX_TERR0 (0x00001000U) /*!< TxMailbox 1 transmit failure due to tranmit error */
|
||||
#define HAL_CAN_ERROR_TX_TERR0 (0x00001000U) /*!< TxMailbox 1 transmit failure due to transmit error */
|
||||
#define HAL_CAN_ERROR_TX_ALST1 (0x00002000U) /*!< TxMailbox 0 transmit failure due to arbitration lost */
|
||||
#define HAL_CAN_ERROR_TX_TERR1 (0x00004000U) /*!< TxMailbox 1 transmit failure due to tranmit error */
|
||||
#define HAL_CAN_ERROR_TX_TERR1 (0x00004000U) /*!< TxMailbox 1 transmit failure due to transmit error */
|
||||
#define HAL_CAN_ERROR_TX_ALST2 (0x00008000U) /*!< TxMailbox 0 transmit failure due to arbitration lost */
|
||||
#define HAL_CAN_ERROR_TX_TERR2 (0x00010000U) /*!< TxMailbox 1 transmit failure due to tranmit error */
|
||||
#define HAL_CAN_ERROR_TX_TERR2 (0x00010000U) /*!< TxMailbox 1 transmit failure due to transmit error */
|
||||
#define HAL_CAN_ERROR_TIMEOUT (0x00020000U) /*!< Timeout error */
|
||||
#define HAL_CAN_ERROR_NOT_INITIALIZED (0x00040000U) /*!< Peripheral not initialized */
|
||||
#define HAL_CAN_ERROR_NOT_READY (0x00080000U) /*!< Peripheral not ready */
|
||||
|
|
|
|||
|
|
@ -28,9 +28,7 @@ extern "C" {
|
|||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f1xx.h"
|
||||
#if defined(USE_HAL_LEGACY)
|
||||
#include "Legacy/stm32_hal_legacy.h"
|
||||
#endif
|
||||
#include <stddef.h>
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
|
|
@ -108,7 +106,14 @@ typedef enum
|
|||
}while (0U)
|
||||
#endif /* USE_RTOS */
|
||||
|
||||
#if defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */
|
||||
#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) /* ARM Compiler V6 */
|
||||
#ifndef __weak
|
||||
#define __weak __attribute__((weak))
|
||||
#endif
|
||||
#ifndef __packed
|
||||
#define __packed __attribute__((packed))
|
||||
#endif
|
||||
#elif defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */
|
||||
#ifndef __weak
|
||||
#define __weak __attribute__((weak))
|
||||
#endif /* __weak */
|
||||
|
|
@ -119,7 +124,14 @@ typedef enum
|
|||
|
||||
|
||||
/* Macro to get variable aligned on 4-bytes, for __ICCARM__ the directive "#pragma data_alignment=4" must be used instead */
|
||||
#if defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */
|
||||
#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) /* ARM Compiler V6 */
|
||||
#ifndef __ALIGN_BEGIN
|
||||
#define __ALIGN_BEGIN
|
||||
#endif
|
||||
#ifndef __ALIGN_END
|
||||
#define __ALIGN_END __attribute__ ((aligned (4)))
|
||||
#endif
|
||||
#elif defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */
|
||||
#ifndef __ALIGN_END
|
||||
#define __ALIGN_END __attribute__ ((aligned (4)))
|
||||
#endif /* __ALIGN_END */
|
||||
|
|
@ -131,7 +143,7 @@ typedef enum
|
|||
#define __ALIGN_END
|
||||
#endif /* __ALIGN_END */
|
||||
#ifndef __ALIGN_BEGIN
|
||||
#if defined (__CC_ARM) /* ARM Compiler */
|
||||
#if defined (__CC_ARM) /* ARM Compiler V5*/
|
||||
#define __ALIGN_BEGIN __align(4)
|
||||
#elif defined (__ICCARM__) /* IAR Compiler */
|
||||
#define __ALIGN_BEGIN
|
||||
|
|
@ -143,9 +155,9 @@ typedef enum
|
|||
/**
|
||||
* @brief __RAM_FUNC definition
|
||||
*/
|
||||
#if defined ( __CC_ARM )
|
||||
/* ARM Compiler
|
||||
------------
|
||||
#if defined ( __CC_ARM ) || (defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
/* ARM Compiler V4/V5 and V6
|
||||
--------------------------
|
||||
RAM functions are defined using the toolchain options.
|
||||
Functions that are executed in RAM should reside in a separate source module.
|
||||
Using the 'Options for File' dialog you can simply change the 'Code / Const'
|
||||
|
|
@ -175,9 +187,9 @@ typedef enum
|
|||
/**
|
||||
* @brief __NOINLINE definition
|
||||
*/
|
||||
#if defined ( __CC_ARM ) || defined ( __GNUC__ )
|
||||
/* ARM & GNUCompiler
|
||||
----------------
|
||||
#if defined ( __CC_ARM ) || (defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) || defined ( __GNUC__ )
|
||||
/* ARM V4/V5 and V6 & GNU Compiler
|
||||
-------------------------------
|
||||
*/
|
||||
#define __NOINLINE __attribute__ ( (noinline) )
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ extern "C" {
|
|||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup HCD
|
||||
/** @addtogroup HCD HCD
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
|
@ -262,9 +262,6 @@ HAL_StatusTypeDef HAL_HCD_Stop(HCD_HandleTypeDef *hhcd);
|
|||
/**
|
||||
* @}
|
||||
*/
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/* Peripheral State functions ************************************************/
|
||||
/** @addtogroup HCD_Exported_Functions_Group4 Peripheral State functions
|
||||
|
|
@ -293,19 +290,10 @@ uint32_t HAL_HCD_GetCurrentSpeed(HCD_HandleTypeDef *hhcd);
|
|||
* @}
|
||||
*/
|
||||
/* Private functions prototypes ----------------------------------------------*/
|
||||
/** @defgroup HCD_Private_Functions_Prototypes HCD Private Functions Prototypes
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/* Private functions ---------------------------------------------------------*/
|
||||
/** @defgroup HCD_Private_Functions HCD Private Functions
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -174,6 +174,7 @@ typedef void (*pI2S_CallbackTypeDef)(I2S_HandleTypeDef *hi2s); /*!< pointer to
|
|||
#if (USE_HAL_I2S_REGISTER_CALLBACKS == 1U)
|
||||
#define HAL_I2S_ERROR_INVALID_CALLBACK (0x00000020U) /*!< Invalid Callback error */
|
||||
#endif /* USE_HAL_I2S_REGISTER_CALLBACKS */
|
||||
#define HAL_I2S_ERROR_BUSY_LINE_RX (0x00000040U) /*!< Busy Rx Line error */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -380,6 +381,15 @@ typedef void (*pI2S_CallbackTypeDef)(I2S_HandleTypeDef *hi2s); /*!< pointer to
|
|||
tmpreg_udr = ((__HANDLE__)->Instance->SR);\
|
||||
UNUSED(tmpreg_udr); \
|
||||
}while(0U)
|
||||
/** @brief Flush the I2S DR Register.
|
||||
* @param __HANDLE__ specifies the I2S Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_I2S_FLUSH_RX_DR(__HANDLE__) do{\
|
||||
__IO uint32_t tmpreg_dr = 0x00U;\
|
||||
tmpreg_dr = ((__HANDLE__)->Instance->DR);\
|
||||
UNUSED(tmpreg_dr); \
|
||||
}while(0U)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -462,7 +472,7 @@ uint32_t HAL_I2S_GetError(I2S_HandleTypeDef *hi2s);
|
|||
*/
|
||||
|
||||
/** @brief Check whether the specified SPI flag is set or not.
|
||||
* @param __SR__ copy of I2S SR regsiter.
|
||||
* @param __SR__ copy of I2S SR register.
|
||||
* @param __FLAG__ specifies the flag to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg I2S_FLAG_RXNE: Receive buffer not empty flag
|
||||
|
|
@ -477,7 +487,7 @@ uint32_t HAL_I2S_GetError(I2S_HandleTypeDef *hi2s);
|
|||
& ((__FLAG__) & I2S_FLAG_MASK)) == ((__FLAG__) & I2S_FLAG_MASK)) ? SET : RESET)
|
||||
|
||||
/** @brief Check whether the specified SPI Interrupt is set or not.
|
||||
* @param __CR2__ copy of I2S CR2 regsiter.
|
||||
* @param __CR2__ copy of I2S CR2 register.
|
||||
* @param __INTERRUPT__ specifies the SPI interrupt source to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg I2S_IT_TXE: Tx buffer empty interrupt enable
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ extern "C" {
|
|||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup IWDG
|
||||
/** @defgroup IWDG IWDG
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
|
@ -62,9 +62,9 @@ typedef struct
|
|||
IWDG_TypeDef *Instance; /*!< Register base address */
|
||||
|
||||
IWDG_InitTypeDef Init; /*!< IWDG required parameters */
|
||||
|
||||
} IWDG_HandleTypeDef;
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -84,15 +84,17 @@ typedef struct
|
|||
#define IWDG_PRESCALER_64 IWDG_PR_PR_2 /*!< IWDG prescaler set to 64 */
|
||||
#define IWDG_PRESCALER_128 (IWDG_PR_PR_2 | IWDG_PR_PR_0) /*!< IWDG prescaler set to 128 */
|
||||
#define IWDG_PRESCALER_256 (IWDG_PR_PR_2 | IWDG_PR_PR_1) /*!< IWDG prescaler set to 256 */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/* Exported macros -----------------------------------------------------------*/
|
||||
/** @defgroup IWDG_Exported_Macros IWDG Exported Macros
|
||||
* @{
|
||||
|
|
@ -107,7 +109,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Reload IWDG counter with value defined in the reload register
|
||||
* (write access to IWDG_PR & IWDG_RLR registers disabled).
|
||||
* (write access to IWDG_PR and IWDG_RLR registers disabled).
|
||||
* @param __HANDLE__ IWDG handle
|
||||
* @retval None
|
||||
*/
|
||||
|
|
@ -200,6 +202,8 @@ HAL_StatusTypeDef HAL_IWDG_Refresh(IWDG_HandleTypeDef *hiwdg);
|
|||
*/
|
||||
#define IS_IWDG_RELOAD(__RELOAD__) ((__RELOAD__) <= IWDG_RLR_RL)
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -90,10 +90,10 @@ typedef struct
|
|||
typedef struct
|
||||
{
|
||||
uint32_t PageSize; /*!< NAND memory page (without spare area) size measured in bytes
|
||||
for 8 bits adressing or words for 16 bits addressing */
|
||||
for 8 bits addressing or words for 16 bits addressing */
|
||||
|
||||
uint32_t SpareAreaSize; /*!< NAND memory spare area size measured in bytes
|
||||
for 8 bits adressing or words for 16 bits addressing */
|
||||
for 8 bits addressing or words for 16 bits addressing */
|
||||
|
||||
uint32_t BlockSize; /*!< NAND memory block size measured in number of pages */
|
||||
|
||||
|
|
@ -192,7 +192,8 @@ typedef void (*pNAND_CallbackTypeDef)(NAND_HandleTypeDef *hnand);
|
|||
*/
|
||||
|
||||
/* Initialization/de-initialization functions ********************************/
|
||||
HAL_StatusTypeDef HAL_NAND_Init(NAND_HandleTypeDef *hnand, FSMC_NAND_PCC_TimingTypeDef *ComSpace_Timing, FSMC_NAND_PCC_TimingTypeDef *AttSpace_Timing);
|
||||
HAL_StatusTypeDef HAL_NAND_Init(NAND_HandleTypeDef *hnand, FSMC_NAND_PCC_TimingTypeDef *ComSpace_Timing,
|
||||
FSMC_NAND_PCC_TimingTypeDef *AttSpace_Timing);
|
||||
HAL_StatusTypeDef HAL_NAND_DeInit(NAND_HandleTypeDef *hnand);
|
||||
|
||||
HAL_StatusTypeDef HAL_NAND_ConfigDevice(NAND_HandleTypeDef *hnand, NAND_DeviceConfigTypeDef *pDeviceConfig);
|
||||
|
|
@ -215,15 +216,23 @@ void HAL_NAND_ITCallback(NAND_HandleTypeDef *hnand);
|
|||
/* IO operation functions ****************************************************/
|
||||
HAL_StatusTypeDef HAL_NAND_Reset(NAND_HandleTypeDef *hnand);
|
||||
|
||||
HAL_StatusTypeDef HAL_NAND_Read_Page_8b(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress, uint8_t *pBuffer, uint32_t NumPageToRead);
|
||||
HAL_StatusTypeDef HAL_NAND_Write_Page_8b(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress, uint8_t *pBuffer, uint32_t NumPageToWrite);
|
||||
HAL_StatusTypeDef HAL_NAND_Read_SpareArea_8b(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress, uint8_t *pBuffer, uint32_t NumSpareAreaToRead);
|
||||
HAL_StatusTypeDef HAL_NAND_Write_SpareArea_8b(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress, uint8_t *pBuffer, uint32_t NumSpareAreaTowrite);
|
||||
HAL_StatusTypeDef HAL_NAND_Read_Page_8b(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress, uint8_t *pBuffer,
|
||||
uint32_t NumPageToRead);
|
||||
HAL_StatusTypeDef HAL_NAND_Write_Page_8b(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress, uint8_t *pBuffer,
|
||||
uint32_t NumPageToWrite);
|
||||
HAL_StatusTypeDef HAL_NAND_Read_SpareArea_8b(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress,
|
||||
uint8_t *pBuffer, uint32_t NumSpareAreaToRead);
|
||||
HAL_StatusTypeDef HAL_NAND_Write_SpareArea_8b(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress,
|
||||
uint8_t *pBuffer, uint32_t NumSpareAreaTowrite);
|
||||
|
||||
HAL_StatusTypeDef HAL_NAND_Read_Page_16b(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress, uint16_t *pBuffer, uint32_t NumPageToRead);
|
||||
HAL_StatusTypeDef HAL_NAND_Write_Page_16b(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress, uint16_t *pBuffer, uint32_t NumPageToWrite);
|
||||
HAL_StatusTypeDef HAL_NAND_Read_SpareArea_16b(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress, uint16_t *pBuffer, uint32_t NumSpareAreaToRead);
|
||||
HAL_StatusTypeDef HAL_NAND_Write_SpareArea_16b(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress, uint16_t *pBuffer, uint32_t NumSpareAreaTowrite);
|
||||
HAL_StatusTypeDef HAL_NAND_Read_Page_16b(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress, uint16_t *pBuffer,
|
||||
uint32_t NumPageToRead);
|
||||
HAL_StatusTypeDef HAL_NAND_Write_Page_16b(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress, uint16_t *pBuffer,
|
||||
uint32_t NumPageToWrite);
|
||||
HAL_StatusTypeDef HAL_NAND_Read_SpareArea_16b(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress,
|
||||
uint16_t *pBuffer, uint32_t NumSpareAreaToRead);
|
||||
HAL_StatusTypeDef HAL_NAND_Write_SpareArea_16b(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress,
|
||||
uint16_t *pBuffer, uint32_t NumSpareAreaTowrite);
|
||||
|
||||
HAL_StatusTypeDef HAL_NAND_Erase_Block(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress);
|
||||
|
||||
|
|
@ -231,7 +240,8 @@ uint32_t HAL_NAND_Address_Inc(NAND_HandleTypeDef *hnand, NAND_AddressT
|
|||
|
||||
#if (USE_HAL_NAND_REGISTER_CALLBACKS == 1)
|
||||
/* NAND callback registering/unregistering */
|
||||
HAL_StatusTypeDef HAL_NAND_RegisterCallback(NAND_HandleTypeDef *hnand, HAL_NAND_CallbackIDTypeDef CallbackId, pNAND_CallbackTypeDef pCallback);
|
||||
HAL_StatusTypeDef HAL_NAND_RegisterCallback(NAND_HandleTypeDef *hnand, HAL_NAND_CallbackIDTypeDef CallbackId,
|
||||
pNAND_CallbackTypeDef pCallback);
|
||||
HAL_StatusTypeDef HAL_NAND_UnRegisterCallback(NAND_HandleTypeDef *hnand, HAL_NAND_CallbackIDTypeDef CallbackId);
|
||||
#endif
|
||||
|
||||
|
|
@ -272,34 +282,34 @@ uint32_t HAL_NAND_Read_Status(NAND_HandleTypeDef *hnand);
|
|||
/** @defgroup NAND_Private_Constants NAND Private Constants
|
||||
* @{
|
||||
*/
|
||||
#define NAND_DEVICE1 ((uint32_t)0x70000000U)
|
||||
#define NAND_DEVICE2 ((uint32_t)0x80000000U)
|
||||
#define NAND_WRITE_TIMEOUT ((uint32_t)0x01000000U)
|
||||
#define NAND_DEVICE1 0x70000000UL
|
||||
#define NAND_DEVICE2 0x80000000UL
|
||||
#define NAND_WRITE_TIMEOUT 0x01000000UL
|
||||
|
||||
#define CMD_AREA ((uint32_t)(1UL<<16U)) /* A16 = CLE high */
|
||||
#define ADDR_AREA ((uint32_t)(1UL<<17U)) /* A17 = ALE high */
|
||||
#define CMD_AREA (1UL<<16U) /* A16 = CLE high */
|
||||
#define ADDR_AREA (1UL<<17U) /* A17 = ALE high */
|
||||
|
||||
#define NAND_CMD_AREA_A ((uint8_t)0x00U)
|
||||
#define NAND_CMD_AREA_B ((uint8_t)0x01U)
|
||||
#define NAND_CMD_AREA_C ((uint8_t)0x50U)
|
||||
#define NAND_CMD_AREA_TRUE1 ((uint8_t)0x30U)
|
||||
#define NAND_CMD_AREA_A ((uint8_t)0x00)
|
||||
#define NAND_CMD_AREA_B ((uint8_t)0x01)
|
||||
#define NAND_CMD_AREA_C ((uint8_t)0x50)
|
||||
#define NAND_CMD_AREA_TRUE1 ((uint8_t)0x30)
|
||||
|
||||
#define NAND_CMD_WRITE0 ((uint8_t)0x80U)
|
||||
#define NAND_CMD_WRITE_TRUE1 ((uint8_t)0x10U)
|
||||
#define NAND_CMD_ERASE0 ((uint8_t)0x60U)
|
||||
#define NAND_CMD_ERASE1 ((uint8_t)0xD0U)
|
||||
#define NAND_CMD_READID ((uint8_t)0x90U)
|
||||
#define NAND_CMD_STATUS ((uint8_t)0x70U)
|
||||
#define NAND_CMD_LOCK_STATUS ((uint8_t)0x7AU)
|
||||
#define NAND_CMD_RESET ((uint8_t)0xFFU)
|
||||
#define NAND_CMD_WRITE0 ((uint8_t)0x80)
|
||||
#define NAND_CMD_WRITE_TRUE1 ((uint8_t)0x10)
|
||||
#define NAND_CMD_ERASE0 ((uint8_t)0x60)
|
||||
#define NAND_CMD_ERASE1 ((uint8_t)0xD0)
|
||||
#define NAND_CMD_READID ((uint8_t)0x90)
|
||||
#define NAND_CMD_STATUS ((uint8_t)0x70)
|
||||
#define NAND_CMD_LOCK_STATUS ((uint8_t)0x7A)
|
||||
#define NAND_CMD_RESET ((uint8_t)0xFF)
|
||||
|
||||
/* NAND memory status */
|
||||
#define NAND_VALID_ADDRESS ((uint32_t)0x00000100U)
|
||||
#define NAND_INVALID_ADDRESS ((uint32_t)0x00000200U)
|
||||
#define NAND_TIMEOUT_ERROR ((uint32_t)0x00000400U)
|
||||
#define NAND_BUSY ((uint32_t)0x00000000U)
|
||||
#define NAND_ERROR ((uint32_t)0x00000001U)
|
||||
#define NAND_READY ((uint32_t)0x00000040U)
|
||||
#define NAND_VALID_ADDRESS 0x00000100UL
|
||||
#define NAND_INVALID_ADDRESS 0x00000200UL
|
||||
#define NAND_TIMEOUT_ERROR 0x00000400UL
|
||||
#define NAND_BUSY 0x00000000UL
|
||||
#define NAND_ERROR 0x00000001UL
|
||||
#define NAND_READY 0x00000040UL
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -121,6 +121,8 @@ typedef struct
|
|||
|
||||
__IO HAL_NOR_StateTypeDef State; /*!< NOR device access state */
|
||||
|
||||
uint32_t CommandSet; /*!< NOR algorithm command set and control */
|
||||
|
||||
#if (USE_HAL_NOR_REGISTER_CALLBACKS == 1)
|
||||
void (* MspInitCallback)(struct __NOR_HandleTypeDef *hnor); /*!< NOR Msp Init callback */
|
||||
void (* MspDeInitCallback)(struct __NOR_HandleTypeDef *hnor); /*!< NOR Msp DeInit callback */
|
||||
|
|
@ -178,7 +180,8 @@ typedef void (*pNOR_CallbackTypeDef)(NOR_HandleTypeDef *hnor);
|
|||
*/
|
||||
|
||||
/* Initialization/de-initialization functions ********************************/
|
||||
HAL_StatusTypeDef HAL_NOR_Init(NOR_HandleTypeDef *hnor, FSMC_NORSRAM_TimingTypeDef *Timing, FSMC_NORSRAM_TimingTypeDef *ExtTiming);
|
||||
HAL_StatusTypeDef HAL_NOR_Init(NOR_HandleTypeDef *hnor, FSMC_NORSRAM_TimingTypeDef *Timing,
|
||||
FSMC_NORSRAM_TimingTypeDef *ExtTiming);
|
||||
HAL_StatusTypeDef HAL_NOR_DeInit(NOR_HandleTypeDef *hnor);
|
||||
void HAL_NOR_MspInit(NOR_HandleTypeDef *hnor);
|
||||
void HAL_NOR_MspDeInit(NOR_HandleTypeDef *hnor);
|
||||
|
|
@ -197,8 +200,10 @@ HAL_StatusTypeDef HAL_NOR_ReturnToReadMode(NOR_HandleTypeDef *hnor);
|
|||
HAL_StatusTypeDef HAL_NOR_Read(NOR_HandleTypeDef *hnor, uint32_t *pAddress, uint16_t *pData);
|
||||
HAL_StatusTypeDef HAL_NOR_Program(NOR_HandleTypeDef *hnor, uint32_t *pAddress, uint16_t *pData);
|
||||
|
||||
HAL_StatusTypeDef HAL_NOR_ReadBuffer(NOR_HandleTypeDef *hnor, uint32_t uwAddress, uint16_t *pData, uint32_t uwBufferSize);
|
||||
HAL_StatusTypeDef HAL_NOR_ProgramBuffer(NOR_HandleTypeDef *hnor, uint32_t uwAddress, uint16_t *pData, uint32_t uwBufferSize);
|
||||
HAL_StatusTypeDef HAL_NOR_ReadBuffer(NOR_HandleTypeDef *hnor, uint32_t uwAddress, uint16_t *pData,
|
||||
uint32_t uwBufferSize);
|
||||
HAL_StatusTypeDef HAL_NOR_ProgramBuffer(NOR_HandleTypeDef *hnor, uint32_t uwAddress, uint16_t *pData,
|
||||
uint32_t uwBufferSize);
|
||||
|
||||
HAL_StatusTypeDef HAL_NOR_Erase_Block(NOR_HandleTypeDef *hnor, uint32_t BlockAddress, uint32_t Address);
|
||||
HAL_StatusTypeDef HAL_NOR_Erase_Chip(NOR_HandleTypeDef *hnor, uint32_t Address);
|
||||
|
|
@ -206,7 +211,8 @@ HAL_StatusTypeDef HAL_NOR_Read_CFI(NOR_HandleTypeDef *hnor, NOR_CFITypeDef *pNOR
|
|||
|
||||
#if (USE_HAL_NOR_REGISTER_CALLBACKS == 1)
|
||||
/* NOR callback registering/unregistering */
|
||||
HAL_StatusTypeDef HAL_NOR_RegisterCallback(NOR_HandleTypeDef *hnor, HAL_NOR_CallbackIDTypeDef CallbackId, pNOR_CallbackTypeDef pCallback);
|
||||
HAL_StatusTypeDef HAL_NOR_RegisterCallback(NOR_HandleTypeDef *hnor, HAL_NOR_CallbackIDTypeDef CallbackId,
|
||||
pNOR_CallbackTypeDef pCallback);
|
||||
HAL_StatusTypeDef HAL_NOR_UnRegisterCallback(NOR_HandleTypeDef *hnor, HAL_NOR_CallbackIDTypeDef CallbackId);
|
||||
#endif
|
||||
/**
|
||||
|
|
@ -246,29 +252,29 @@ HAL_NOR_StatusTypeDef HAL_NOR_GetStatus(NOR_HandleTypeDef *hnor, uint32_t Addres
|
|||
* @{
|
||||
*/
|
||||
/* NOR device IDs addresses */
|
||||
#define MC_ADDRESS ((uint16_t)0x0000U)
|
||||
#define DEVICE_CODE1_ADDR ((uint16_t)0x0001U)
|
||||
#define DEVICE_CODE2_ADDR ((uint16_t)0x000EU)
|
||||
#define DEVICE_CODE3_ADDR ((uint16_t)0x000FU)
|
||||
#define MC_ADDRESS ((uint16_t)0x0000)
|
||||
#define DEVICE_CODE1_ADDR ((uint16_t)0x0001)
|
||||
#define DEVICE_CODE2_ADDR ((uint16_t)0x000E)
|
||||
#define DEVICE_CODE3_ADDR ((uint16_t)0x000F)
|
||||
|
||||
/* NOR CFI IDs addresses */
|
||||
#define CFI1_ADDRESS ((uint16_t)0x61U)
|
||||
#define CFI2_ADDRESS ((uint16_t)0x62U)
|
||||
#define CFI3_ADDRESS ((uint16_t)0x63U)
|
||||
#define CFI4_ADDRESS ((uint16_t)0x64U)
|
||||
#define CFI1_ADDRESS ((uint16_t)0x61)
|
||||
#define CFI2_ADDRESS ((uint16_t)0x62)
|
||||
#define CFI3_ADDRESS ((uint16_t)0x63)
|
||||
#define CFI4_ADDRESS ((uint16_t)0x64)
|
||||
|
||||
/* NOR operation wait timeout */
|
||||
#define NOR_TMEOUT ((uint16_t)0xFFFFU)
|
||||
#define NOR_TMEOUT ((uint16_t)0xFFFF)
|
||||
|
||||
/* NOR memory data width */
|
||||
#define NOR_MEMORY_8B ((uint8_t)0x0U)
|
||||
#define NOR_MEMORY_16B ((uint8_t)0x1U)
|
||||
#define NOR_MEMORY_8B ((uint8_t)0x0)
|
||||
#define NOR_MEMORY_16B ((uint8_t)0x1)
|
||||
|
||||
/* NOR memory device read/write start address */
|
||||
#define NOR_MEMORY_ADRESS1 ((uint32_t)0x60000000U)
|
||||
#define NOR_MEMORY_ADRESS2 ((uint32_t)0x64000000U)
|
||||
#define NOR_MEMORY_ADRESS3 ((uint32_t)0x68000000U)
|
||||
#define NOR_MEMORY_ADRESS4 ((uint32_t)0x6C000000U)
|
||||
#define NOR_MEMORY_ADRESS1 (0x60000000U)
|
||||
#define NOR_MEMORY_ADRESS2 (0x64000000U)
|
||||
#define NOR_MEMORY_ADRESS3 (0x68000000U)
|
||||
#define NOR_MEMORY_ADRESS4 (0x6C000000U)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -137,7 +137,8 @@ typedef void (*pPCCARD_CallbackTypeDef)(PCCARD_HandleTypeDef *hpccard);
|
|||
* @{
|
||||
*/
|
||||
/* Initialization/de-initialization functions **********************************/
|
||||
HAL_StatusTypeDef HAL_PCCARD_Init(PCCARD_HandleTypeDef *hpccard, FSMC_NAND_PCC_TimingTypeDef *ComSpaceTiming, FSMC_NAND_PCC_TimingTypeDef *AttSpaceTiming, FSMC_NAND_PCC_TimingTypeDef *IOSpaceTiming);
|
||||
HAL_StatusTypeDef HAL_PCCARD_Init(PCCARD_HandleTypeDef *hpccard, FSMC_NAND_PCC_TimingTypeDef *ComSpaceTiming,
|
||||
FSMC_NAND_PCC_TimingTypeDef *AttSpaceTiming, FSMC_NAND_PCC_TimingTypeDef *IOSpaceTiming);
|
||||
HAL_StatusTypeDef HAL_PCCARD_DeInit(PCCARD_HandleTypeDef *hpccard);
|
||||
void HAL_PCCARD_MspInit(PCCARD_HandleTypeDef *hpccard);
|
||||
void HAL_PCCARD_MspDeInit(PCCARD_HandleTypeDef *hpccard);
|
||||
|
|
@ -150,8 +151,10 @@ void HAL_PCCARD_MspDeInit(PCCARD_HandleTypeDef *hpccard);
|
|||
*/
|
||||
/* IO operation functions *****************************************************/
|
||||
HAL_StatusTypeDef HAL_PCCARD_Read_ID(PCCARD_HandleTypeDef *hpccard, uint8_t CompactFlash_ID[], uint8_t *pStatus);
|
||||
HAL_StatusTypeDef HAL_PCCARD_Write_Sector(PCCARD_HandleTypeDef *hpccard, uint16_t *pBuffer, uint16_t SectorAddress, uint8_t *pStatus);
|
||||
HAL_StatusTypeDef HAL_PCCARD_Read_Sector(PCCARD_HandleTypeDef *hpccard, uint16_t *pBuffer, uint16_t SectorAddress, uint8_t *pStatus);
|
||||
HAL_StatusTypeDef HAL_PCCARD_Write_Sector(PCCARD_HandleTypeDef *hpccard, uint16_t *pBuffer, uint16_t SectorAddress,
|
||||
uint8_t *pStatus);
|
||||
HAL_StatusTypeDef HAL_PCCARD_Read_Sector(PCCARD_HandleTypeDef *hpccard, uint16_t *pBuffer, uint16_t SectorAddress,
|
||||
uint8_t *pStatus);
|
||||
HAL_StatusTypeDef HAL_PCCARD_Erase_Sector(PCCARD_HandleTypeDef *hpccard, uint16_t SectorAddress, uint8_t *pStatus);
|
||||
HAL_StatusTypeDef HAL_PCCARD_Reset(PCCARD_HandleTypeDef *hpccard);
|
||||
void HAL_PCCARD_IRQHandler(PCCARD_HandleTypeDef *hpccard);
|
||||
|
|
@ -159,8 +162,10 @@ void HAL_PCCARD_ITCallback(PCCARD_HandleTypeDef *hpccard);
|
|||
|
||||
#if (USE_HAL_PCCARD_REGISTER_CALLBACKS == 1)
|
||||
/* PCCARD callback registering/unregistering */
|
||||
HAL_StatusTypeDef HAL_PCCARD_RegisterCallback(PCCARD_HandleTypeDef *hpccard, HAL_PCCARD_CallbackIDTypeDef CallbackId, pPCCARD_CallbackTypeDef pCallback);
|
||||
HAL_StatusTypeDef HAL_PCCARD_UnRegisterCallback(PCCARD_HandleTypeDef *hpccard, HAL_PCCARD_CallbackIDTypeDef CallbackId);
|
||||
HAL_StatusTypeDef HAL_PCCARD_RegisterCallback(PCCARD_HandleTypeDef *hpccard, HAL_PCCARD_CallbackIDTypeDef CallbackId,
|
||||
pPCCARD_CallbackTypeDef pCallback);
|
||||
HAL_StatusTypeDef HAL_PCCARD_UnRegisterCallback(PCCARD_HandleTypeDef *hpccard,
|
||||
HAL_PCCARD_CallbackIDTypeDef CallbackId);
|
||||
#endif
|
||||
/**
|
||||
* @}
|
||||
|
|
|
|||
|
|
@ -330,11 +330,11 @@ typedef struct
|
|||
*/
|
||||
#define RCC_PERIPHCLK_RTC 0x00000001U
|
||||
#define RCC_PERIPHCLK_ADC 0x00000002U
|
||||
#if defined(STM32F103xE) || defined(STM32F103xG) || defined(STM32F105xC)\
|
||||
|| defined(STM32F107xC)
|
||||
#if defined(STM32F101xE) || defined(STM32F101xG) || defined(STM32F103xE)\
|
||||
|| defined(STM32F103xG) || defined(STM32F105xC) || defined(STM32F107xC)
|
||||
#define RCC_PERIPHCLK_I2S2 0x00000004U
|
||||
#define RCC_PERIPHCLK_I2S3 0x00000008U
|
||||
#endif /* STM32F103xE || STM32F103xG || STM32F105xC || STM32F107xC */
|
||||
#endif /* STM32F101xE || STM32F101xG || STM32F103xE || STM32F103xG || STM32F105xC || STM32F107xC */
|
||||
#if defined(STM32F102x6) || defined(STM32F102xB) || defined(STM32F103x6)\
|
||||
|| defined(STM32F103xB) || defined(STM32F103xE) || defined(STM32F103xG)\
|
||||
|| defined(STM32F105xC) || defined(STM32F107xC)
|
||||
|
|
|
|||
|
|
@ -708,7 +708,7 @@ uint32_t HAL_SMARTCARD_GetError(SMARTCARD_HandleTypeDef *hsc);
|
|||
|
||||
#define SMARTCARD_DIV(__PCLK__, __BAUD__) (((__PCLK__)*25U)/(4U*(__BAUD__)))
|
||||
#define SMARTCARD_DIVMANT(__PCLK__, __BAUD__) (SMARTCARD_DIV((__PCLK__), (__BAUD__))/100U)
|
||||
#define SMARTCARD_DIVFRAQ(__PCLK__, __BAUD__) (((SMARTCARD_DIV((__PCLK__), (__BAUD__)) - (SMARTCARD_DIVMANT((__PCLK__), (__BAUD__)) * 100U)) * 16U + 50U) / 100U)
|
||||
#define SMARTCARD_DIVFRAQ(__PCLK__, __BAUD__) ((((SMARTCARD_DIV((__PCLK__), (__BAUD__)) - (SMARTCARD_DIVMANT((__PCLK__), (__BAUD__)) * 100U)) * 16U) + 50U) / 100U)
|
||||
/* SMARTCARD BRR = mantissa + overflow + fraction
|
||||
= (SMARTCARD DIVMANT << 4) + (SMARTCARD DIVFRAQ & 0xF0) + (SMARTCARD DIVFRAQ & 0x0FU) */
|
||||
#define SMARTCARD_BRR(__PCLK__, __BAUD__) (((SMARTCARD_DIVMANT((__PCLK__), (__BAUD__)) << 4U) + \
|
||||
|
|
|
|||
|
|
@ -487,7 +487,7 @@ typedef void (*pSPI_CallbackTypeDef)(SPI_HandleTypeDef *hspi); /*!< pointer to
|
|||
SET_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_CRCEN);}while(0U)
|
||||
|
||||
/** @brief Check whether the specified SPI flag is set or not.
|
||||
* @param __SR__ copy of SPI SR regsiter.
|
||||
* @param __SR__ copy of SPI SR register.
|
||||
* @param __FLAG__ specifies the flag to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg SPI_FLAG_RXNE: Receive buffer not empty flag
|
||||
|
|
@ -498,10 +498,11 @@ typedef void (*pSPI_CallbackTypeDef)(SPI_HandleTypeDef *hspi); /*!< pointer to
|
|||
* @arg SPI_FLAG_BSY: Busy flag
|
||||
* @retval SET or RESET.
|
||||
*/
|
||||
#define SPI_CHECK_FLAG(__SR__, __FLAG__) ((((__SR__) & ((__FLAG__) & SPI_FLAG_MASK)) == ((__FLAG__) & SPI_FLAG_MASK)) ? SET : RESET)
|
||||
#define SPI_CHECK_FLAG(__SR__, __FLAG__) ((((__SR__) & ((__FLAG__) & SPI_FLAG_MASK)) == \
|
||||
((__FLAG__) & SPI_FLAG_MASK)) ? SET : RESET)
|
||||
|
||||
/** @brief Check whether the specified SPI Interrupt is set or not.
|
||||
* @param __CR2__ copy of SPI CR2 regsiter.
|
||||
* @param __CR2__ copy of SPI CR2 register.
|
||||
* @param __INTERRUPT__ specifies the SPI interrupt source to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg SPI_IT_TXE: Tx buffer empty interrupt enable
|
||||
|
|
@ -509,7 +510,8 @@ typedef void (*pSPI_CallbackTypeDef)(SPI_HandleTypeDef *hspi); /*!< pointer to
|
|||
* @arg SPI_IT_ERR: Error interrupt enable
|
||||
* @retval SET or RESET.
|
||||
*/
|
||||
#define SPI_CHECK_IT_SOURCE(__CR2__, __INTERRUPT__) ((((__CR2__) & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)
|
||||
#define SPI_CHECK_IT_SOURCE(__CR2__, __INTERRUPT__) ((((__CR2__) & (__INTERRUPT__)) == \
|
||||
(__INTERRUPT__)) ? SET : RESET)
|
||||
|
||||
/** @brief Checks if SPI Mode parameter is in allowed range.
|
||||
* @param __MODE__ specifies the SPI Mode.
|
||||
|
|
@ -616,7 +618,9 @@ typedef void (*pSPI_CallbackTypeDef)(SPI_HandleTypeDef *hspi); /*!< pointer to
|
|||
* This parameter must be a number between Min_Data = 0 and Max_Data = 65535
|
||||
* @retval None
|
||||
*/
|
||||
#define IS_SPI_CRC_POLYNOMIAL(__POLYNOMIAL__) (((__POLYNOMIAL__) >= 0x1U) && ((__POLYNOMIAL__) <= 0xFFFFU) && (((__POLYNOMIAL__)&0x1U) != 0U))
|
||||
#define IS_SPI_CRC_POLYNOMIAL(__POLYNOMIAL__) (((__POLYNOMIAL__) >= 0x1U) && \
|
||||
((__POLYNOMIAL__) <= 0xFFFFU) && \
|
||||
(((__POLYNOMIAL__)&0x1U) != 0U))
|
||||
|
||||
/** @brief Checks if DMA handle is valid.
|
||||
* @param __HANDLE__ specifies a DMA Handle.
|
||||
|
|
|
|||
|
|
@ -141,7 +141,8 @@ typedef void (*pSRAM_DmaCallbackTypeDef)(DMA_HandleTypeDef *hdma);
|
|||
*/
|
||||
|
||||
/* Initialization/de-initialization functions ********************************/
|
||||
HAL_StatusTypeDef HAL_SRAM_Init(SRAM_HandleTypeDef *hsram, FSMC_NORSRAM_TimingTypeDef *Timing, FSMC_NORSRAM_TimingTypeDef *ExtTiming);
|
||||
HAL_StatusTypeDef HAL_SRAM_Init(SRAM_HandleTypeDef *hsram, FSMC_NORSRAM_TimingTypeDef *Timing,
|
||||
FSMC_NORSRAM_TimingTypeDef *ExtTiming);
|
||||
HAL_StatusTypeDef HAL_SRAM_DeInit(SRAM_HandleTypeDef *hsram);
|
||||
void HAL_SRAM_MspInit(SRAM_HandleTypeDef *hsram);
|
||||
void HAL_SRAM_MspDeInit(SRAM_HandleTypeDef *hsram);
|
||||
|
|
@ -155,23 +156,33 @@ void HAL_SRAM_MspDeInit(SRAM_HandleTypeDef *hsram);
|
|||
*/
|
||||
|
||||
/* I/O operation functions ***************************************************/
|
||||
HAL_StatusTypeDef HAL_SRAM_Read_8b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint8_t *pDstBuffer, uint32_t BufferSize);
|
||||
HAL_StatusTypeDef HAL_SRAM_Write_8b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint8_t *pSrcBuffer, uint32_t BufferSize);
|
||||
HAL_StatusTypeDef HAL_SRAM_Read_16b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint16_t *pDstBuffer, uint32_t BufferSize);
|
||||
HAL_StatusTypeDef HAL_SRAM_Write_16b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint16_t *pSrcBuffer, uint32_t BufferSize);
|
||||
HAL_StatusTypeDef HAL_SRAM_Read_32b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pDstBuffer, uint32_t BufferSize);
|
||||
HAL_StatusTypeDef HAL_SRAM_Write_32b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pSrcBuffer, uint32_t BufferSize);
|
||||
HAL_StatusTypeDef HAL_SRAM_Read_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pDstBuffer, uint32_t BufferSize);
|
||||
HAL_StatusTypeDef HAL_SRAM_Write_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pSrcBuffer, uint32_t BufferSize);
|
||||
HAL_StatusTypeDef HAL_SRAM_Read_8b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint8_t *pDstBuffer,
|
||||
uint32_t BufferSize);
|
||||
HAL_StatusTypeDef HAL_SRAM_Write_8b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint8_t *pSrcBuffer,
|
||||
uint32_t BufferSize);
|
||||
HAL_StatusTypeDef HAL_SRAM_Read_16b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint16_t *pDstBuffer,
|
||||
uint32_t BufferSize);
|
||||
HAL_StatusTypeDef HAL_SRAM_Write_16b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint16_t *pSrcBuffer,
|
||||
uint32_t BufferSize);
|
||||
HAL_StatusTypeDef HAL_SRAM_Read_32b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pDstBuffer,
|
||||
uint32_t BufferSize);
|
||||
HAL_StatusTypeDef HAL_SRAM_Write_32b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pSrcBuffer,
|
||||
uint32_t BufferSize);
|
||||
HAL_StatusTypeDef HAL_SRAM_Read_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pDstBuffer,
|
||||
uint32_t BufferSize);
|
||||
HAL_StatusTypeDef HAL_SRAM_Write_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pSrcBuffer,
|
||||
uint32_t BufferSize);
|
||||
|
||||
void HAL_SRAM_DMA_XferCpltCallback(DMA_HandleTypeDef *hdma);
|
||||
void HAL_SRAM_DMA_XferErrorCallback(DMA_HandleTypeDef *hdma);
|
||||
|
||||
#if (USE_HAL_SRAM_REGISTER_CALLBACKS == 1)
|
||||
/* SRAM callback registering/unregistering */
|
||||
HAL_StatusTypeDef HAL_SRAM_RegisterCallback(SRAM_HandleTypeDef *hsram, HAL_SRAM_CallbackIDTypeDef CallbackId, pSRAM_CallbackTypeDef pCallback);
|
||||
HAL_StatusTypeDef HAL_SRAM_RegisterCallback(SRAM_HandleTypeDef *hsram, HAL_SRAM_CallbackIDTypeDef CallbackId,
|
||||
pSRAM_CallbackTypeDef pCallback);
|
||||
HAL_StatusTypeDef HAL_SRAM_UnRegisterCallback(SRAM_HandleTypeDef *hsram, HAL_SRAM_CallbackIDTypeDef CallbackId);
|
||||
HAL_StatusTypeDef HAL_SRAM_RegisterDmaCallback(SRAM_HandleTypeDef *hsram, HAL_SRAM_CallbackIDTypeDef CallbackId, pSRAM_DmaCallbackTypeDef pCallback);
|
||||
HAL_StatusTypeDef HAL_SRAM_RegisterDmaCallback(SRAM_HandleTypeDef *hsram, HAL_SRAM_CallbackIDTypeDef CallbackId,
|
||||
pSRAM_DmaCallbackTypeDef pCallback);
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ typedef struct
|
|||
This parameter can be a value of @ref TIM_Encoder_Mode */
|
||||
|
||||
uint32_t IC1Polarity; /*!< Specifies the active edge of the input signal.
|
||||
This parameter can be a value of @ref TIM_Input_Capture_Polarity */
|
||||
This parameter can be a value of @ref TIM_Encoder_Input_Polarity */
|
||||
|
||||
uint32_t IC1Selection; /*!< Specifies the input.
|
||||
This parameter can be a value of @ref TIM_Input_Capture_Selection */
|
||||
|
|
@ -179,7 +179,7 @@ typedef struct
|
|||
This parameter can be a number between Min_Data = 0x0 and Max_Data = 0xF */
|
||||
|
||||
uint32_t IC2Polarity; /*!< Specifies the active edge of the input signal.
|
||||
This parameter can be a value of @ref TIM_Input_Capture_Polarity */
|
||||
This parameter can be a value of @ref TIM_Encoder_Input_Polarity */
|
||||
|
||||
uint32_t IC2Selection; /*!< Specifies the input.
|
||||
This parameter can be a value of @ref TIM_Input_Capture_Selection */
|
||||
|
|
@ -294,6 +294,26 @@ typedef enum
|
|||
HAL_TIM_STATE_ERROR = 0x04U /*!< Reception process is ongoing */
|
||||
} HAL_TIM_StateTypeDef;
|
||||
|
||||
/**
|
||||
* @brief TIM Channel States definition
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
HAL_TIM_CHANNEL_STATE_RESET = 0x00U, /*!< TIM Channel initial state */
|
||||
HAL_TIM_CHANNEL_STATE_READY = 0x01U, /*!< TIM Channel ready for use */
|
||||
HAL_TIM_CHANNEL_STATE_BUSY = 0x02U, /*!< An internal process is ongoing on the TIM channel */
|
||||
} HAL_TIM_ChannelStateTypeDef;
|
||||
|
||||
/**
|
||||
* @brief DMA Burst States definition
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
HAL_DMA_BURST_STATE_RESET = 0x00U, /*!< DMA Burst initial state */
|
||||
HAL_DMA_BURST_STATE_READY = 0x01U, /*!< DMA Burst ready for use */
|
||||
HAL_DMA_BURST_STATE_BUSY = 0x02U, /*!< Ongoing DMA Burst */
|
||||
} HAL_TIM_DMABurstStateTypeDef;
|
||||
|
||||
/**
|
||||
* @brief HAL Active channel structures definition
|
||||
*/
|
||||
|
|
@ -322,6 +342,9 @@ typedef struct
|
|||
This array is accessed by a @ref DMA_Handle_index */
|
||||
HAL_LockTypeDef Lock; /*!< Locking object */
|
||||
__IO HAL_TIM_StateTypeDef State; /*!< TIM operation state */
|
||||
__IO HAL_TIM_ChannelStateTypeDef ChannelState[4]; /*!< TIM channel operation state */
|
||||
__IO HAL_TIM_ChannelStateTypeDef ChannelNState[4]; /*!< TIM complementary channel operation state */
|
||||
__IO HAL_TIM_DMABurstStateTypeDef DMABurstState; /*!< DMA burst operation state */
|
||||
|
||||
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
|
||||
void (* Base_MspInitCallback)(struct __TIM_HandleTypeDef *htim); /*!< TIM Base Msp Init Callback */
|
||||
|
|
@ -593,6 +616,15 @@ typedef void (*pTIM_CallbackTypeDef)(TIM_HandleTypeDef *htim); /*!< pointer to
|
|||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup TIM_Encoder_Input_Polarity TIM Encoder Input Polarity
|
||||
* @{
|
||||
*/
|
||||
#define TIM_ENCODERINPUTPOLARITY_RISING TIM_INPUTCHANNELPOLARITY_RISING /*!< Encoder input with rising edge polarity */
|
||||
#define TIM_ENCODERINPUTPOLARITY_FALLING TIM_INPUTCHANNELPOLARITY_FALLING /*!< Encoder input with falling edge polarity */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup TIM_Input_Capture_Selection TIM Input Capture Selection
|
||||
* @{
|
||||
*/
|
||||
|
|
@ -986,6 +1018,15 @@ typedef void (*pTIM_CallbackTypeDef)(TIM_HandleTypeDef *htim); /*!< pointer to
|
|||
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
|
||||
#define __HAL_TIM_RESET_HANDLE_STATE(__HANDLE__) do { \
|
||||
(__HANDLE__)->State = HAL_TIM_STATE_RESET; \
|
||||
(__HANDLE__)->ChannelState[0] = HAL_TIM_CHANNEL_STATE_RESET; \
|
||||
(__HANDLE__)->ChannelState[1] = HAL_TIM_CHANNEL_STATE_RESET; \
|
||||
(__HANDLE__)->ChannelState[2] = HAL_TIM_CHANNEL_STATE_RESET; \
|
||||
(__HANDLE__)->ChannelState[3] = HAL_TIM_CHANNEL_STATE_RESET; \
|
||||
(__HANDLE__)->ChannelNState[0] = HAL_TIM_CHANNEL_STATE_RESET; \
|
||||
(__HANDLE__)->ChannelNState[1] = HAL_TIM_CHANNEL_STATE_RESET; \
|
||||
(__HANDLE__)->ChannelNState[2] = HAL_TIM_CHANNEL_STATE_RESET; \
|
||||
(__HANDLE__)->ChannelNState[3] = HAL_TIM_CHANNEL_STATE_RESET; \
|
||||
(__HANDLE__)->DMABurstState = HAL_DMA_BURST_STATE_RESET; \
|
||||
(__HANDLE__)->Base_MspInitCallback = NULL; \
|
||||
(__HANDLE__)->Base_MspDeInitCallback = NULL; \
|
||||
(__HANDLE__)->IC_MspInitCallback = NULL; \
|
||||
|
|
@ -1002,7 +1043,18 @@ typedef void (*pTIM_CallbackTypeDef)(TIM_HandleTypeDef *htim); /*!< pointer to
|
|||
(__HANDLE__)->HallSensor_MspDeInitCallback = NULL; \
|
||||
} while(0)
|
||||
#else
|
||||
#define __HAL_TIM_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_TIM_STATE_RESET)
|
||||
#define __HAL_TIM_RESET_HANDLE_STATE(__HANDLE__) do { \
|
||||
(__HANDLE__)->State = HAL_TIM_STATE_RESET; \
|
||||
(__HANDLE__)->ChannelState[0] = HAL_TIM_CHANNEL_STATE_RESET; \
|
||||
(__HANDLE__)->ChannelState[1] = HAL_TIM_CHANNEL_STATE_RESET; \
|
||||
(__HANDLE__)->ChannelState[2] = HAL_TIM_CHANNEL_STATE_RESET; \
|
||||
(__HANDLE__)->ChannelState[3] = HAL_TIM_CHANNEL_STATE_RESET; \
|
||||
(__HANDLE__)->ChannelNState[0] = HAL_TIM_CHANNEL_STATE_RESET; \
|
||||
(__HANDLE__)->ChannelNState[1] = HAL_TIM_CHANNEL_STATE_RESET; \
|
||||
(__HANDLE__)->ChannelNState[2] = HAL_TIM_CHANNEL_STATE_RESET; \
|
||||
(__HANDLE__)->ChannelNState[3] = HAL_TIM_CHANNEL_STATE_RESET; \
|
||||
(__HANDLE__)->DMABurstState = HAL_DMA_BURST_STATE_RESET; \
|
||||
} while(0)
|
||||
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
|
||||
|
||||
/**
|
||||
|
|
@ -1547,6 +1599,9 @@ mode.
|
|||
#define IS_TIM_OCNIDLE_STATE(__STATE__) (((__STATE__) == TIM_OCNIDLESTATE_SET) || \
|
||||
((__STATE__) == TIM_OCNIDLESTATE_RESET))
|
||||
|
||||
#define IS_TIM_ENCODERINPUT_POLARITY(__POLARITY__) (((__POLARITY__) == TIM_ENCODERINPUTPOLARITY_RISING) || \
|
||||
((__POLARITY__) == TIM_ENCODERINPUTPOLARITY_FALLING))
|
||||
|
||||
#define IS_TIM_IC_POLARITY(__POLARITY__) (((__POLARITY__) == TIM_ICPOLARITY_RISING) || \
|
||||
((__POLARITY__) == TIM_ICPOLARITY_FALLING) || \
|
||||
((__POLARITY__) == TIM_ICPOLARITY_BOTHEDGE))
|
||||
|
|
@ -1717,6 +1772,8 @@ mode.
|
|||
((__LENGTH__) == TIM_DMABURSTLENGTH_17TRANSFERS) || \
|
||||
((__LENGTH__) == TIM_DMABURSTLENGTH_18TRANSFERS))
|
||||
|
||||
#define IS_TIM_DMA_DATA_LENGTH(LENGTH) (((LENGTH) >= 0x1U) && ((LENGTH) < 0x10000U))
|
||||
|
||||
#define IS_TIM_IC_FILTER(__ICFILTER__) ((__ICFILTER__) <= 0xFU)
|
||||
|
||||
#define IS_TIM_DEADTIME(__DEADTIME__) ((__DEADTIME__) <= 0xFFU)
|
||||
|
|
@ -1742,11 +1799,49 @@ mode.
|
|||
((__HANDLE__)->Instance->CCER |= (((__POLARITY__) << 12U))))
|
||||
|
||||
#define TIM_RESET_CAPTUREPOLARITY(__HANDLE__, __CHANNEL__) \
|
||||
(((__CHANNEL__) == TIM_CHANNEL_1) ? ((__HANDLE__)->Instance->CCER &= ~(TIM_CCER_CC1P | TIM_CCER_CC1NP))) :\
|
||||
(((__CHANNEL__) == TIM_CHANNEL_1) ? ((__HANDLE__)->Instance->CCER &= ~(TIM_CCER_CC1P | TIM_CCER_CC1NP)) :\
|
||||
((__CHANNEL__) == TIM_CHANNEL_2) ? ((__HANDLE__)->Instance->CCER &= ~(TIM_CCER_CC2P | TIM_CCER_CC2NP)) :\
|
||||
((__CHANNEL__) == TIM_CHANNEL_3) ? ((__HANDLE__)->Instance->CCER &= ~(TIM_CCER_CC3P)) :\
|
||||
((__HANDLE__)->Instance->CCER &= ~(TIM_CCER_CC4P)))
|
||||
|
||||
#define TIM_CHANNEL_STATE_GET(__HANDLE__, __CHANNEL__)\
|
||||
(((__CHANNEL__) == TIM_CHANNEL_1) ? (__HANDLE__)->ChannelState[0] :\
|
||||
((__CHANNEL__) == TIM_CHANNEL_2) ? (__HANDLE__)->ChannelState[1] :\
|
||||
((__CHANNEL__) == TIM_CHANNEL_3) ? (__HANDLE__)->ChannelState[2] :\
|
||||
(__HANDLE__)->ChannelState[3])
|
||||
|
||||
#define TIM_CHANNEL_STATE_SET(__HANDLE__, __CHANNEL__, __CHANNEL_STATE__) \
|
||||
(((__CHANNEL__) == TIM_CHANNEL_1) ? ((__HANDLE__)->ChannelState[0] = (__CHANNEL_STATE__)) :\
|
||||
((__CHANNEL__) == TIM_CHANNEL_2) ? ((__HANDLE__)->ChannelState[1] = (__CHANNEL_STATE__)) :\
|
||||
((__CHANNEL__) == TIM_CHANNEL_3) ? ((__HANDLE__)->ChannelState[2] = (__CHANNEL_STATE__)) :\
|
||||
((__HANDLE__)->ChannelState[3] = (__CHANNEL_STATE__)))
|
||||
|
||||
#define TIM_CHANNEL_STATE_SET_ALL(__HANDLE__, __CHANNEL_STATE__) do { \
|
||||
(__HANDLE__)->ChannelState[0] = (__CHANNEL_STATE__); \
|
||||
(__HANDLE__)->ChannelState[1] = (__CHANNEL_STATE__); \
|
||||
(__HANDLE__)->ChannelState[2] = (__CHANNEL_STATE__); \
|
||||
(__HANDLE__)->ChannelState[3] = (__CHANNEL_STATE__); \
|
||||
} while(0)
|
||||
|
||||
#define TIM_CHANNEL_N_STATE_GET(__HANDLE__, __CHANNEL__)\
|
||||
(((__CHANNEL__) == TIM_CHANNEL_1) ? (__HANDLE__)->ChannelNState[0] :\
|
||||
((__CHANNEL__) == TIM_CHANNEL_2) ? (__HANDLE__)->ChannelNState[1] :\
|
||||
((__CHANNEL__) == TIM_CHANNEL_3) ? (__HANDLE__)->ChannelNState[2] :\
|
||||
(__HANDLE__)->ChannelNState[3])
|
||||
|
||||
#define TIM_CHANNEL_N_STATE_SET(__HANDLE__, __CHANNEL__, __CHANNEL_STATE__) \
|
||||
(((__CHANNEL__) == TIM_CHANNEL_1) ? ((__HANDLE__)->ChannelNState[0] = (__CHANNEL_STATE__)) :\
|
||||
((__CHANNEL__) == TIM_CHANNEL_2) ? ((__HANDLE__)->ChannelNState[1] = (__CHANNEL_STATE__)) :\
|
||||
((__CHANNEL__) == TIM_CHANNEL_3) ? ((__HANDLE__)->ChannelNState[2] = (__CHANNEL_STATE__)) :\
|
||||
((__HANDLE__)->ChannelNState[3] = (__CHANNEL_STATE__)))
|
||||
|
||||
#define TIM_CHANNEL_N_STATE_SET_ALL(__HANDLE__, __CHANNEL_STATE__) do { \
|
||||
(__HANDLE__)->ChannelNState[0] = (__CHANNEL_STATE__); \
|
||||
(__HANDLE__)->ChannelNState[1] = (__CHANNEL_STATE__); \
|
||||
(__HANDLE__)->ChannelNState[2] = (__CHANNEL_STATE__); \
|
||||
(__HANDLE__)->ChannelNState[3] = (__CHANNEL_STATE__); \
|
||||
} while(0)
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -1918,9 +2013,15 @@ HAL_StatusTypeDef HAL_TIM_SlaveConfigSynchro(TIM_HandleTypeDef *htim, TIM_SlaveC
|
|||
HAL_StatusTypeDef HAL_TIM_SlaveConfigSynchro_IT(TIM_HandleTypeDef *htim, TIM_SlaveConfigTypeDef *sSlaveConfig);
|
||||
HAL_StatusTypeDef HAL_TIM_DMABurst_WriteStart(TIM_HandleTypeDef *htim, uint32_t BurstBaseAddress,
|
||||
uint32_t BurstRequestSrc, uint32_t *BurstBuffer, uint32_t BurstLength);
|
||||
HAL_StatusTypeDef HAL_TIM_DMABurst_MultiWriteStart(TIM_HandleTypeDef *htim, uint32_t BurstBaseAddress,
|
||||
uint32_t BurstRequestSrc, uint32_t *BurstBuffer, uint32_t BurstLength,
|
||||
uint32_t DataLength);
|
||||
HAL_StatusTypeDef HAL_TIM_DMABurst_WriteStop(TIM_HandleTypeDef *htim, uint32_t BurstRequestSrc);
|
||||
HAL_StatusTypeDef HAL_TIM_DMABurst_ReadStart(TIM_HandleTypeDef *htim, uint32_t BurstBaseAddress,
|
||||
uint32_t BurstRequestSrc, uint32_t *BurstBuffer, uint32_t BurstLength);
|
||||
HAL_StatusTypeDef HAL_TIM_DMABurst_MultiReadStart(TIM_HandleTypeDef *htim, uint32_t BurstBaseAddress,
|
||||
uint32_t BurstRequestSrc, uint32_t *BurstBuffer, uint32_t BurstLength,
|
||||
uint32_t DataLength);
|
||||
HAL_StatusTypeDef HAL_TIM_DMABurst_ReadStop(TIM_HandleTypeDef *htim, uint32_t BurstRequestSrc);
|
||||
HAL_StatusTypeDef HAL_TIM_GenerateEvent(TIM_HandleTypeDef *htim, uint32_t EventSource);
|
||||
uint32_t HAL_TIM_ReadCapturedValue(TIM_HandleTypeDef *htim, uint32_t Channel);
|
||||
|
|
@ -1966,6 +2067,11 @@ HAL_TIM_StateTypeDef HAL_TIM_PWM_GetState(TIM_HandleTypeDef *htim);
|
|||
HAL_TIM_StateTypeDef HAL_TIM_IC_GetState(TIM_HandleTypeDef *htim);
|
||||
HAL_TIM_StateTypeDef HAL_TIM_OnePulse_GetState(TIM_HandleTypeDef *htim);
|
||||
HAL_TIM_StateTypeDef HAL_TIM_Encoder_GetState(TIM_HandleTypeDef *htim);
|
||||
|
||||
/* Peripheral Channel state functions ************************************************/
|
||||
HAL_TIM_ActiveChannel HAL_TIM_GetActiveChannel(TIM_HandleTypeDef *htim);
|
||||
HAL_TIM_ChannelStateTypeDef HAL_TIM_GetChannelState(TIM_HandleTypeDef *htim, uint32_t Channel);
|
||||
HAL_TIM_DMABurstStateTypeDef HAL_TIM_DMABurstState(TIM_HandleTypeDef *htim);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -1985,7 +2091,6 @@ void TIM_OC2_SetConfig(TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config);
|
|||
void TIM_ETR_SetConfig(TIM_TypeDef *TIMx, uint32_t TIM_ExtTRGPrescaler,
|
||||
uint32_t TIM_ExtTRGPolarity, uint32_t ExtTRGFilter);
|
||||
|
||||
void TIM_DMADelayPulseCplt(DMA_HandleTypeDef *hdma);
|
||||
void TIM_DMADelayPulseHalfCplt(DMA_HandleTypeDef *hdma);
|
||||
void TIM_DMAError(DMA_HandleTypeDef *hdma);
|
||||
void TIM_DMACaptureCplt(DMA_HandleTypeDef *hdma);
|
||||
|
|
|
|||
|
|
@ -223,6 +223,7 @@ void HAL_TIMEx_BreakCallback(TIM_HandleTypeDef *htim);
|
|||
*/
|
||||
/* Extended Peripheral State functions ***************************************/
|
||||
HAL_TIM_StateTypeDef HAL_TIMEx_HallSensor_GetState(TIM_HandleTypeDef *htim);
|
||||
HAL_TIM_ChannelStateTypeDef HAL_TIMEx_GetChannelNState(TIM_HandleTypeDef *htim, uint32_t ChannelN);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -537,7 +537,7 @@ typedef void (*pUART_CallbackTypeDef)(UART_HandleTypeDef *huart); /*!< pointer
|
|||
(((__INTERRUPT__) >> 28U) == UART_CR2_REG_INDEX)? ((__HANDLE__)->Instance->CR2 &= ~((__INTERRUPT__) & UART_IT_MASK)): \
|
||||
((__HANDLE__)->Instance->CR3 &= ~ ((__INTERRUPT__) & UART_IT_MASK)))
|
||||
|
||||
/** @brief Checks whether the specified UART interrupt has occurred or not.
|
||||
/** @brief Checks whether the specified UART interrupt source is enabled or not.
|
||||
* @param __HANDLE__ specifies the UART Handle.
|
||||
* UART Handle selects the USARTx or UARTy peripheral
|
||||
* (USART,UART availability and x,y values depending on device).
|
||||
|
|
@ -806,7 +806,7 @@ uint32_t HAL_UART_GetError(UART_HandleTypeDef *huart);
|
|||
|
||||
#define UART_DIV_SAMPLING16(_PCLK_, _BAUD_) (((_PCLK_)*25U)/(4U*(_BAUD_)))
|
||||
#define UART_DIVMANT_SAMPLING16(_PCLK_, _BAUD_) (UART_DIV_SAMPLING16((_PCLK_), (_BAUD_))/100U)
|
||||
#define UART_DIVFRAQ_SAMPLING16(_PCLK_, _BAUD_) (((UART_DIV_SAMPLING16((_PCLK_), (_BAUD_)) - (UART_DIVMANT_SAMPLING16((_PCLK_), (_BAUD_)) * 100U)) * 16U + 50U) / 100U)
|
||||
#define UART_DIVFRAQ_SAMPLING16(_PCLK_, _BAUD_) ((((UART_DIV_SAMPLING16((_PCLK_), (_BAUD_)) - (UART_DIVMANT_SAMPLING16((_PCLK_), (_BAUD_)) * 100U)) * 16U) + 50U) / 100U)
|
||||
/* UART BRR = mantissa + overflow + fraction
|
||||
= (UART DIVMANT << 4) + (UART DIVFRAQ & 0xF0) + (UART DIVFRAQ & 0x0FU) */
|
||||
#define UART_BRR_SAMPLING16(_PCLK_, _BAUD_) (((UART_DIVMANT_SAMPLING16((_PCLK_), (_BAUD_)) << 4U) + \
|
||||
|
|
@ -815,7 +815,7 @@ uint32_t HAL_UART_GetError(UART_HandleTypeDef *huart);
|
|||
|
||||
#define UART_DIV_SAMPLING8(_PCLK_, _BAUD_) (((_PCLK_)*25U)/(2U*(_BAUD_)))
|
||||
#define UART_DIVMANT_SAMPLING8(_PCLK_, _BAUD_) (UART_DIV_SAMPLING8((_PCLK_), (_BAUD_))/100U)
|
||||
#define UART_DIVFRAQ_SAMPLING8(_PCLK_, _BAUD_) (((UART_DIV_SAMPLING8((_PCLK_), (_BAUD_)) - (UART_DIVMANT_SAMPLING8((_PCLK_), (_BAUD_)) * 100U)) * 8U + 50U) / 100U)
|
||||
#define UART_DIVFRAQ_SAMPLING8(_PCLK_, _BAUD_) ((((UART_DIV_SAMPLING8((_PCLK_), (_BAUD_)) - (UART_DIVMANT_SAMPLING8((_PCLK_), (_BAUD_)) * 100U)) * 8U) + 50U) / 100U)
|
||||
/* UART BRR = mantissa + overflow + fraction
|
||||
= (UART DIVMANT << 4) + ((UART DIVFRAQ & 0xF8) << 1) + (UART DIVFRAQ & 0x07U) */
|
||||
#define UART_BRR_SAMPLING8(_PCLK_, _BAUD_) (((UART_DIVMANT_SAMPLING8((_PCLK_), (_BAUD_)) << 4U) + \
|
||||
|
|
|
|||
|
|
@ -607,7 +607,7 @@ uint32_t HAL_USART_GetError(USART_HandleTypeDef *husart);
|
|||
|
||||
#define USART_DIVMANT(_PCLK_, _BAUD_) (USART_DIV((_PCLK_), (_BAUD_))/100U)
|
||||
|
||||
#define USART_DIVFRAQ(_PCLK_, _BAUD_) (((USART_DIV((_PCLK_), (_BAUD_)) - (USART_DIVMANT((_PCLK_), (_BAUD_)) * 100U)) * 16U + 50U) / 100U)
|
||||
#define USART_DIVFRAQ(_PCLK_, _BAUD_) ((((USART_DIV((_PCLK_), (_BAUD_)) - (USART_DIVMANT((_PCLK_), (_BAUD_)) * 100U)) * 16U) + 50U) / 100U)
|
||||
|
||||
/* UART BRR = mantissa + overflow + fraction
|
||||
= (UART DIVMANT << 4) + ((UART DIVFRAQ & 0xF0) << 1) + (UART DIVFRAQ & 0x0FU) */
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ extern "C" {
|
|||
*/
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
|
||||
/** @defgroup WWDG_Exported_Types WWDG Exported Types
|
||||
* @{
|
||||
*/
|
||||
|
|
@ -55,7 +56,7 @@ typedef struct
|
|||
uint32_t Counter; /*!< Specifies the WWDG free-running downcounter value.
|
||||
This parameter must be a number between Min_Data = 0x40 and Max_Data = 0x7F */
|
||||
|
||||
uint32_t EWIMode ; /*!< Specifies if WWDG Early Wakeup Interupt is enable or not.
|
||||
uint32_t EWIMode ; /*!< Specifies if WWDG Early Wakeup Interrupt is enable or not.
|
||||
This parameter can be a value of @ref WWDG_EWI_Mode */
|
||||
|
||||
} WWDG_InitTypeDef;
|
||||
|
|
@ -67,16 +68,17 @@ typedef struct
|
|||
typedef struct __WWDG_HandleTypeDef
|
||||
#else
|
||||
typedef struct
|
||||
#endif
|
||||
#endif /* USE_HAL_WWDG_REGISTER_CALLBACKS */
|
||||
{
|
||||
WWDG_TypeDef *Instance; /*!< Register base address */
|
||||
|
||||
WWDG_InitTypeDef Init; /*!< WWDG required parameters */
|
||||
|
||||
#if (USE_HAL_WWDG_REGISTER_CALLBACKS == 1)
|
||||
void (* EwiCallback)(struct __WWDG_HandleTypeDef *hwwdg); /*!< WWDG Early WakeUp Interrupt callback */
|
||||
|
||||
void (* MspInitCallback)(struct __WWDG_HandleTypeDef *hwwdg); /*!< WWDG Msp Init callback */
|
||||
#endif
|
||||
#endif /* USE_HAL_WWDG_REGISTER_CALLBACKS */
|
||||
} WWDG_HandleTypeDef;
|
||||
|
||||
#if (USE_HAL_WWDG_REGISTER_CALLBACKS == 1)
|
||||
|
|
@ -85,8 +87,8 @@ typedef struct
|
|||
*/
|
||||
typedef enum
|
||||
{
|
||||
HAL_WWDG_EWI_CB_ID = 0x00u, /*!< WWDG EWI callback ID */
|
||||
HAL_WWDG_MSPINIT_CB_ID = 0x01u, /*!< WWDG MspInit callback ID */
|
||||
HAL_WWDG_EWI_CB_ID = 0x00U, /*!< WWDG EWI callback ID */
|
||||
HAL_WWDG_MSPINIT_CB_ID = 0x01U, /*!< WWDG MspInit callback ID */
|
||||
} HAL_WWDG_CallbackIDTypeDef;
|
||||
|
||||
/**
|
||||
|
|
@ -94,7 +96,7 @@ typedef enum
|
|||
*/
|
||||
typedef void (*pWWDG_CallbackTypeDef)(WWDG_HandleTypeDef *hppp); /*!< pointer to a WWDG common callback functions */
|
||||
|
||||
#endif
|
||||
#endif /* USE_HAL_WWDG_REGISTER_CALLBACKS */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -125,10 +127,10 @@ typedef void (*pWWDG_CallbackTypeDef)(WWDG_HandleTypeDef * hppp); /*!< pointer t
|
|||
/** @defgroup WWDG_Prescaler WWDG Prescaler
|
||||
* @{
|
||||
*/
|
||||
#define WWDG_PRESCALER_1 0x00000000U /*!< WWDG counter clock = (PCLK1/4096)/1 */
|
||||
#define WWDG_PRESCALER_2 WWDG_CFR_WDGTB0 /*!< WWDG counter clock = (PCLK1/4096)/2 */
|
||||
#define WWDG_PRESCALER_4 WWDG_CFR_WDGTB1 /*!< WWDG counter clock = (PCLK1/4096)/4 */
|
||||
#define WWDG_PRESCALER_8 WWDG_CFR_WDGTB /*!< WWDG counter clock = (PCLK1/4096)/8 */
|
||||
#define WWDG_PRESCALER_1 0x00000000u /*!< WWDG counter clock = (PCLK1/4096)/1 */
|
||||
#define WWDG_PRESCALER_2 WWDG_CFR_WDGTB_0 /*!< WWDG counter clock = (PCLK1/4096)/2 */
|
||||
#define WWDG_PRESCALER_4 WWDG_CFR_WDGTB_1 /*!< WWDG counter clock = (PCLK1/4096)/4 */
|
||||
#define WWDG_PRESCALER_8 (WWDG_CFR_WDGTB_1 | WWDG_CFR_WDGTB_0) /*!< WWDG counter clock = (PCLK1/4096)/8 */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -136,7 +138,7 @@ typedef void (*pWWDG_CallbackTypeDef)(WWDG_HandleTypeDef * hppp); /*!< pointer t
|
|||
/** @defgroup WWDG_EWI_Mode WWDG Early Wakeup Interrupt Mode
|
||||
* @{
|
||||
*/
|
||||
#define WWDG_EWI_DISABLE 0x00000000U /*!< EWI Disable */
|
||||
#define WWDG_EWI_DISABLE 0x00000000u /*!< EWI Disable */
|
||||
#define WWDG_EWI_ENABLE WWDG_CFR_EWI /*!< EWI Enable */
|
||||
/**
|
||||
* @}
|
||||
|
|
@ -174,14 +176,14 @@ typedef void (*pWWDG_CallbackTypeDef)(WWDG_HandleTypeDef * hppp); /*!< pointer t
|
|||
*/
|
||||
|
||||
/**
|
||||
* @brief Enables the WWDG peripheral.
|
||||
* @param __HANDLE__: WWDG handle
|
||||
* @brief Enable the WWDG peripheral.
|
||||
* @param __HANDLE__ WWDG handle
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_WWDG_ENABLE(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CR, WWDG_CR_WDGA)
|
||||
|
||||
/**
|
||||
* @brief Enables the WWDG early wakeup interrupt.
|
||||
* @brief Enable the WWDG early wakeup interrupt.
|
||||
* @param __HANDLE__: WWDG handle
|
||||
* @param __INTERRUPT__ specifies the interrupt to enable.
|
||||
* This parameter can be one of the following values:
|
||||
|
|
@ -192,7 +194,7 @@ typedef void (*pWWDG_CallbackTypeDef)(WWDG_HandleTypeDef * hppp); /*!< pointer t
|
|||
#define __HAL_WWDG_ENABLE_IT(__HANDLE__, __INTERRUPT__) SET_BIT((__HANDLE__)->Instance->CFR, (__INTERRUPT__))
|
||||
|
||||
/**
|
||||
* @brief Checks whether the selected WWDG interrupt has occurred or not.
|
||||
* @brief Check whether the selected WWDG interrupt has occurred or not.
|
||||
* @param __HANDLE__ WWDG handle
|
||||
* @param __INTERRUPT__ specifies the it to check.
|
||||
* This parameter can be one of the following values:
|
||||
|
|
@ -201,10 +203,10 @@ typedef void (*pWWDG_CallbackTypeDef)(WWDG_HandleTypeDef * hppp); /*!< pointer t
|
|||
*/
|
||||
#define __HAL_WWDG_GET_IT(__HANDLE__, __INTERRUPT__) __HAL_WWDG_GET_FLAG((__HANDLE__),(__INTERRUPT__))
|
||||
|
||||
/** @brief Clear the WWDG's interrupt pending bits
|
||||
/** @brief Clear the WWDG interrupt pending bits.
|
||||
* bits to clear the selected interrupt pending bits.
|
||||
* @param __HANDLE__: WWDG handle
|
||||
* @param __INTERRUPT__: specifies the interrupt pending bit to clear.
|
||||
* @param __HANDLE__ WWDG handle
|
||||
* @param __INTERRUPT__ specifies the interrupt pending bit to clear.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg WWDG_FLAG_EWIF: Early wakeup interrupt flag
|
||||
*/
|
||||
|
|
@ -221,29 +223,31 @@ typedef void (*pWWDG_CallbackTypeDef)(WWDG_HandleTypeDef * hppp); /*!< pointer t
|
|||
#define __HAL_WWDG_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR & (__FLAG__)) == (__FLAG__))
|
||||
|
||||
/**
|
||||
* @brief Clears the WWDG's pending flags.
|
||||
* @param __HANDLE__: WWDG handle
|
||||
* @param __FLAG__: specifies the flag to clear.
|
||||
* @brief Clear the WWDG's pending flags.
|
||||
* @param __HANDLE__ WWDG handle
|
||||
* @param __FLAG__ specifies the flag to clear.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg WWDG_FLAG_EWIF: Early wakeup interrupt flag
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_WWDG_CLEAR_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR) = ~(__FLAG__))
|
||||
#define __HAL_WWDG_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->SR = ~(__FLAG__))
|
||||
|
||||
/** @brief Checks if the specified WWDG interrupt source is enabled or disabled.
|
||||
* @param __HANDLE__: WWDG Handle.
|
||||
* @param __INTERRUPT__: specifies the WWDG interrupt source to check.
|
||||
/** @brief Check whether the specified WWDG interrupt source is enabled or not.
|
||||
* @param __HANDLE__ WWDG Handle.
|
||||
* @param __INTERRUPT__ specifies the WWDG interrupt source to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg WWDG_IT_EWI: Early Wakeup Interrupt
|
||||
* @retval state of __INTERRUPT__ (TRUE or FALSE).
|
||||
*/
|
||||
#define __HAL_WWDG_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CFR & (__INTERRUPT__)) == (__INTERRUPT__))
|
||||
#define __HAL_WWDG_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CFR\
|
||||
& (__INTERRUPT__)) == (__INTERRUPT__))
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/* Exported functions --------------------------------------------------------*/
|
||||
|
||||
/** @addtogroup WWDG_Exported_Functions
|
||||
* @{
|
||||
*/
|
||||
|
|
@ -254,12 +258,12 @@ typedef void (*pWWDG_CallbackTypeDef)(WWDG_HandleTypeDef * hppp); /*!< pointer t
|
|||
/* Initialization/de-initialization functions **********************************/
|
||||
HAL_StatusTypeDef HAL_WWDG_Init(WWDG_HandleTypeDef *hwwdg);
|
||||
void HAL_WWDG_MspInit(WWDG_HandleTypeDef *hwwdg);
|
||||
|
||||
/* Callbacks Register/UnRegister functions ***********************************/
|
||||
#if (USE_HAL_WWDG_REGISTER_CALLBACKS == 1)
|
||||
HAL_StatusTypeDef HAL_WWDG_RegisterCallback(WWDG_HandleTypeDef *hwwdg, HAL_WWDG_CallbackIDTypeDef CallbackID, pWWDG_CallbackTypeDef pCallback);
|
||||
HAL_StatusTypeDef HAL_WWDG_RegisterCallback(WWDG_HandleTypeDef *hwwdg, HAL_WWDG_CallbackIDTypeDef CallbackID,
|
||||
pWWDG_CallbackTypeDef pCallback);
|
||||
HAL_StatusTypeDef HAL_WWDG_UnRegisterCallback(WWDG_HandleTypeDef *hwwdg, HAL_WWDG_CallbackIDTypeDef CallbackID);
|
||||
#endif
|
||||
#endif /* USE_HAL_WWDG_REGISTER_CALLBACKS */
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
|
|
|||
|
|
@ -358,10 +358,10 @@ typedef struct
|
|||
/** @defgroup FSMC_NORSRAM_Bank FSMC NOR/SRAM Bank
|
||||
* @{
|
||||
*/
|
||||
#define FSMC_NORSRAM_BANK1 ((uint32_t)0x00000000U)
|
||||
#define FSMC_NORSRAM_BANK2 ((uint32_t)0x00000002U)
|
||||
#define FSMC_NORSRAM_BANK3 ((uint32_t)0x00000004U)
|
||||
#define FSMC_NORSRAM_BANK4 ((uint32_t)0x00000006U)
|
||||
#define FSMC_NORSRAM_BANK1 (0x00000000U)
|
||||
#define FSMC_NORSRAM_BANK2 (0x00000002U)
|
||||
#define FSMC_NORSRAM_BANK3 (0x00000004U)
|
||||
#define FSMC_NORSRAM_BANK4 (0x00000006U)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -369,8 +369,8 @@ typedef struct
|
|||
/** @defgroup FSMC_Data_Address_Bus_Multiplexing FSMC Data Address Bus Multiplexing
|
||||
* @{
|
||||
*/
|
||||
#define FSMC_DATA_ADDRESS_MUX_DISABLE ((uint32_t)0x00000000U)
|
||||
#define FSMC_DATA_ADDRESS_MUX_ENABLE ((uint32_t)0x00000002U)
|
||||
#define FSMC_DATA_ADDRESS_MUX_DISABLE (0x00000000U)
|
||||
#define FSMC_DATA_ADDRESS_MUX_ENABLE (0x00000002U)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -378,9 +378,9 @@ typedef struct
|
|||
/** @defgroup FSMC_Memory_Type FSMC Memory Type
|
||||
* @{
|
||||
*/
|
||||
#define FSMC_MEMORY_TYPE_SRAM ((uint32_t)0x00000000U)
|
||||
#define FSMC_MEMORY_TYPE_PSRAM ((uint32_t)0x00000004U)
|
||||
#define FSMC_MEMORY_TYPE_NOR ((uint32_t)0x00000008U)
|
||||
#define FSMC_MEMORY_TYPE_SRAM (0x00000000U)
|
||||
#define FSMC_MEMORY_TYPE_PSRAM (0x00000004U)
|
||||
#define FSMC_MEMORY_TYPE_NOR (0x00000008U)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -388,9 +388,9 @@ typedef struct
|
|||
/** @defgroup FSMC_NORSRAM_Data_Width FSMC NORSRAM Data Width
|
||||
* @{
|
||||
*/
|
||||
#define FSMC_NORSRAM_MEM_BUS_WIDTH_8 ((uint32_t)0x00000000U)
|
||||
#define FSMC_NORSRAM_MEM_BUS_WIDTH_16 ((uint32_t)0x00000010U)
|
||||
#define FSMC_NORSRAM_MEM_BUS_WIDTH_32 ((uint32_t)0x00000020U)
|
||||
#define FSMC_NORSRAM_MEM_BUS_WIDTH_8 (0x00000000U)
|
||||
#define FSMC_NORSRAM_MEM_BUS_WIDTH_16 (0x00000010U)
|
||||
#define FSMC_NORSRAM_MEM_BUS_WIDTH_32 (0x00000020U)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -398,8 +398,8 @@ typedef struct
|
|||
/** @defgroup FSMC_NORSRAM_Flash_Access FSMC NOR/SRAM Flash Access
|
||||
* @{
|
||||
*/
|
||||
#define FSMC_NORSRAM_FLASH_ACCESS_ENABLE ((uint32_t)0x00000040U)
|
||||
#define FSMC_NORSRAM_FLASH_ACCESS_DISABLE ((uint32_t)0x00000000U)
|
||||
#define FSMC_NORSRAM_FLASH_ACCESS_ENABLE (0x00000040U)
|
||||
#define FSMC_NORSRAM_FLASH_ACCESS_DISABLE (0x00000000U)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -407,8 +407,8 @@ typedef struct
|
|||
/** @defgroup FSMC_Burst_Access_Mode FSMC Burst Access Mode
|
||||
* @{
|
||||
*/
|
||||
#define FSMC_BURST_ACCESS_MODE_DISABLE ((uint32_t)0x00000000U)
|
||||
#define FSMC_BURST_ACCESS_MODE_ENABLE ((uint32_t)0x00000100U)
|
||||
#define FSMC_BURST_ACCESS_MODE_DISABLE (0x00000000U)
|
||||
#define FSMC_BURST_ACCESS_MODE_ENABLE (0x00000100U)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -416,8 +416,8 @@ typedef struct
|
|||
/** @defgroup FSMC_Wait_Signal_Polarity FSMC Wait Signal Polarity
|
||||
* @{
|
||||
*/
|
||||
#define FSMC_WAIT_SIGNAL_POLARITY_LOW ((uint32_t)0x00000000U)
|
||||
#define FSMC_WAIT_SIGNAL_POLARITY_HIGH ((uint32_t)0x00000200U)
|
||||
#define FSMC_WAIT_SIGNAL_POLARITY_LOW (0x00000000U)
|
||||
#define FSMC_WAIT_SIGNAL_POLARITY_HIGH (0x00000200U)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -425,8 +425,8 @@ typedef struct
|
|||
/** @defgroup FSMC_Wrap_Mode FSMC Wrap Mode
|
||||
* @{
|
||||
*/
|
||||
#define FSMC_WRAP_MODE_DISABLE ((uint32_t)0x00000000U)
|
||||
#define FSMC_WRAP_MODE_ENABLE ((uint32_t)0x00000400U)
|
||||
#define FSMC_WRAP_MODE_DISABLE (0x00000000U)
|
||||
#define FSMC_WRAP_MODE_ENABLE (0x00000400U)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -434,8 +434,8 @@ typedef struct
|
|||
/** @defgroup FSMC_Wait_Timing FSMC Wait Timing
|
||||
* @{
|
||||
*/
|
||||
#define FSMC_WAIT_TIMING_BEFORE_WS ((uint32_t)0x00000000U)
|
||||
#define FSMC_WAIT_TIMING_DURING_WS ((uint32_t)0x00000800U)
|
||||
#define FSMC_WAIT_TIMING_BEFORE_WS (0x00000000U)
|
||||
#define FSMC_WAIT_TIMING_DURING_WS (0x00000800U)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -443,8 +443,8 @@ typedef struct
|
|||
/** @defgroup FSMC_Write_Operation FSMC Write Operation
|
||||
* @{
|
||||
*/
|
||||
#define FSMC_WRITE_OPERATION_DISABLE ((uint32_t)0x00000000U)
|
||||
#define FSMC_WRITE_OPERATION_ENABLE ((uint32_t)0x00001000U)
|
||||
#define FSMC_WRITE_OPERATION_DISABLE (0x00000000U)
|
||||
#define FSMC_WRITE_OPERATION_ENABLE (0x00001000U)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -452,8 +452,8 @@ typedef struct
|
|||
/** @defgroup FSMC_Wait_Signal FSMC Wait Signal
|
||||
* @{
|
||||
*/
|
||||
#define FSMC_WAIT_SIGNAL_DISABLE ((uint32_t)0x00000000U)
|
||||
#define FSMC_WAIT_SIGNAL_ENABLE ((uint32_t)0x00002000U)
|
||||
#define FSMC_WAIT_SIGNAL_DISABLE (0x00000000U)
|
||||
#define FSMC_WAIT_SIGNAL_ENABLE (0x00002000U)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -461,8 +461,8 @@ typedef struct
|
|||
/** @defgroup FSMC_Extended_Mode FSMC Extended Mode
|
||||
* @{
|
||||
*/
|
||||
#define FSMC_EXTENDED_MODE_DISABLE ((uint32_t)0x00000000U)
|
||||
#define FSMC_EXTENDED_MODE_ENABLE ((uint32_t)0x00004000U)
|
||||
#define FSMC_EXTENDED_MODE_DISABLE (0x00000000U)
|
||||
#define FSMC_EXTENDED_MODE_ENABLE (0x00004000U)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -470,8 +470,8 @@ typedef struct
|
|||
/** @defgroup FSMC_AsynchronousWait FSMC Asynchronous Wait
|
||||
* @{
|
||||
*/
|
||||
#define FSMC_ASYNCHRONOUS_WAIT_DISABLE ((uint32_t)0x00000000U)
|
||||
#define FSMC_ASYNCHRONOUS_WAIT_ENABLE ((uint32_t)0x00008000U)
|
||||
#define FSMC_ASYNCHRONOUS_WAIT_DISABLE (0x00000000U)
|
||||
#define FSMC_ASYNCHRONOUS_WAIT_ENABLE (0x00008000U)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -479,11 +479,11 @@ typedef struct
|
|||
/** @defgroup FSMC_Page_Size FSMC Page Size
|
||||
* @{
|
||||
*/
|
||||
#define FSMC_PAGE_SIZE_NONE ((uint32_t)0x00000000U)
|
||||
#define FSMC_PAGE_SIZE_128 ((uint32_t)0x00010000U)
|
||||
#define FSMC_PAGE_SIZE_256 ((uint32_t)0x00020000U)
|
||||
#define FSMC_PAGE_SIZE_512 ((uint32_t)0x00030000U)
|
||||
#define FSMC_PAGE_SIZE_1024 ((uint32_t)0x00040000U)
|
||||
#define FSMC_PAGE_SIZE_NONE (0x00000000U)
|
||||
#define FSMC_PAGE_SIZE_128 (0x00010000U)
|
||||
#define FSMC_PAGE_SIZE_256 (0x00020000U)
|
||||
#define FSMC_PAGE_SIZE_512 (0x00030000U)
|
||||
#define FSMC_PAGE_SIZE_1024 (0x00040000U)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -491,8 +491,8 @@ typedef struct
|
|||
/** @defgroup FSMC_Write_Burst FSMC Write Burst
|
||||
* @{
|
||||
*/
|
||||
#define FSMC_WRITE_BURST_DISABLE ((uint32_t)0x00000000U)
|
||||
#define FSMC_WRITE_BURST_ENABLE ((uint32_t)0x00080000U)
|
||||
#define FSMC_WRITE_BURST_DISABLE (0x00000000U)
|
||||
#define FSMC_WRITE_BURST_ENABLE (0x00080000U)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -500,8 +500,8 @@ typedef struct
|
|||
/** @defgroup FSMC_Continous_Clock FSMC Continuous Clock
|
||||
* @{
|
||||
*/
|
||||
#define FSMC_CONTINUOUS_CLOCK_SYNC_ONLY ((uint32_t)0x00000000U)
|
||||
#define FSMC_CONTINUOUS_CLOCK_SYNC_ASYNC ((uint32_t)0x00100000U)
|
||||
#define FSMC_CONTINUOUS_CLOCK_SYNC_ONLY (0x00000000U)
|
||||
#define FSMC_CONTINUOUS_CLOCK_SYNC_ASYNC (0x00100000U)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -509,10 +509,10 @@ typedef struct
|
|||
/** @defgroup FSMC_Access_Mode FSMC Access Mode
|
||||
* @{
|
||||
*/
|
||||
#define FSMC_ACCESS_MODE_A ((uint32_t)0x00000000U)
|
||||
#define FSMC_ACCESS_MODE_B ((uint32_t)0x10000000U)
|
||||
#define FSMC_ACCESS_MODE_C ((uint32_t)0x20000000U)
|
||||
#define FSMC_ACCESS_MODE_D ((uint32_t)0x30000000U)
|
||||
#define FSMC_ACCESS_MODE_A (0x00000000U)
|
||||
#define FSMC_ACCESS_MODE_B (0x10000000U)
|
||||
#define FSMC_ACCESS_MODE_C (0x20000000U)
|
||||
#define FSMC_ACCESS_MODE_D (0x30000000U)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -530,8 +530,8 @@ typedef struct
|
|||
/** @defgroup FSMC_NAND_Bank FSMC NAND Bank
|
||||
* @{
|
||||
*/
|
||||
#define FSMC_NAND_BANK2 ((uint32_t)0x00000010U)
|
||||
#define FSMC_NAND_BANK3 ((uint32_t)0x00000100U)
|
||||
#define FSMC_NAND_BANK2 (0x00000010U)
|
||||
#define FSMC_NAND_BANK3 (0x00000100U)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -539,8 +539,8 @@ typedef struct
|
|||
/** @defgroup FSMC_Wait_feature FSMC Wait feature
|
||||
* @{
|
||||
*/
|
||||
#define FSMC_NAND_PCC_WAIT_FEATURE_DISABLE ((uint32_t)0x00000000U)
|
||||
#define FSMC_NAND_PCC_WAIT_FEATURE_ENABLE ((uint32_t)0x00000002U)
|
||||
#define FSMC_NAND_PCC_WAIT_FEATURE_DISABLE (0x00000000U)
|
||||
#define FSMC_NAND_PCC_WAIT_FEATURE_ENABLE (0x00000002U)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -549,9 +549,9 @@ typedef struct
|
|||
* @{
|
||||
*/
|
||||
#if defined(FSMC_BANK4)
|
||||
#define FSMC_PCR_MEMORY_TYPE_PCCARD ((uint32_t)0x00000000U)
|
||||
#define FSMC_PCR_MEMORY_TYPE_PCCARD (0x00000000U)
|
||||
#endif
|
||||
#define FSMC_PCR_MEMORY_TYPE_NAND ((uint32_t)0x00000008U)
|
||||
#define FSMC_PCR_MEMORY_TYPE_NAND (0x00000008U)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -559,8 +559,8 @@ typedef struct
|
|||
/** @defgroup FSMC_NAND_Data_Width FSMC NAND Data Width
|
||||
* @{
|
||||
*/
|
||||
#define FSMC_NAND_PCC_MEM_BUS_WIDTH_8 ((uint32_t)0x00000000U)
|
||||
#define FSMC_NAND_PCC_MEM_BUS_WIDTH_16 ((uint32_t)0x00000010U)
|
||||
#define FSMC_NAND_PCC_MEM_BUS_WIDTH_8 (0x00000000U)
|
||||
#define FSMC_NAND_PCC_MEM_BUS_WIDTH_16 (0x00000010U)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -568,8 +568,8 @@ typedef struct
|
|||
/** @defgroup FSMC_ECC FSMC ECC
|
||||
* @{
|
||||
*/
|
||||
#define FSMC_NAND_ECC_DISABLE ((uint32_t)0x00000000U)
|
||||
#define FSMC_NAND_ECC_ENABLE ((uint32_t)0x00000040U)
|
||||
#define FSMC_NAND_ECC_DISABLE (0x00000000U)
|
||||
#define FSMC_NAND_ECC_ENABLE (0x00000040U)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -577,12 +577,12 @@ typedef struct
|
|||
/** @defgroup FSMC_ECC_Page_Size FSMC ECC Page Size
|
||||
* @{
|
||||
*/
|
||||
#define FSMC_NAND_ECC_PAGE_SIZE_256BYTE ((uint32_t)0x00000000U)
|
||||
#define FSMC_NAND_ECC_PAGE_SIZE_512BYTE ((uint32_t)0x00020000U)
|
||||
#define FSMC_NAND_ECC_PAGE_SIZE_1024BYTE ((uint32_t)0x00040000U)
|
||||
#define FSMC_NAND_ECC_PAGE_SIZE_2048BYTE ((uint32_t)0x00060000U)
|
||||
#define FSMC_NAND_ECC_PAGE_SIZE_4096BYTE ((uint32_t)0x00080000U)
|
||||
#define FSMC_NAND_ECC_PAGE_SIZE_8192BYTE ((uint32_t)0x000A0000U)
|
||||
#define FSMC_NAND_ECC_PAGE_SIZE_256BYTE (0x00000000U)
|
||||
#define FSMC_NAND_ECC_PAGE_SIZE_512BYTE (0x00020000U)
|
||||
#define FSMC_NAND_ECC_PAGE_SIZE_1024BYTE (0x00040000U)
|
||||
#define FSMC_NAND_ECC_PAGE_SIZE_2048BYTE (0x00060000U)
|
||||
#define FSMC_NAND_ECC_PAGE_SIZE_4096BYTE (0x00080000U)
|
||||
#define FSMC_NAND_ECC_PAGE_SIZE_8192BYTE (0x000A0000U)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -597,9 +597,9 @@ typedef struct
|
|||
* @{
|
||||
*/
|
||||
#if defined(FSMC_BANK3)||defined(FSMC_BANK4)
|
||||
#define FSMC_IT_RISING_EDGE ((uint32_t)0x00000008U)
|
||||
#define FSMC_IT_LEVEL ((uint32_t)0x00000010U)
|
||||
#define FSMC_IT_FALLING_EDGE ((uint32_t)0x00000020U)
|
||||
#define FSMC_IT_RISING_EDGE (0x00000008U)
|
||||
#define FSMC_IT_LEVEL (0x00000010U)
|
||||
#define FSMC_IT_FALLING_EDGE (0x00000020U)
|
||||
#endif /* FSMC_BANK3 */
|
||||
/**
|
||||
* @}
|
||||
|
|
@ -609,10 +609,10 @@ typedef struct
|
|||
* @{
|
||||
*/
|
||||
#if defined(FSMC_BANK3)||defined(FSMC_BANK4)
|
||||
#define FSMC_FLAG_RISING_EDGE ((uint32_t)0x00000001U)
|
||||
#define FSMC_FLAG_LEVEL ((uint32_t)0x00000002U)
|
||||
#define FSMC_FLAG_FALLING_EDGE ((uint32_t)0x00000004U)
|
||||
#define FSMC_FLAG_FEMPT ((uint32_t)0x00000040U)
|
||||
#define FSMC_FLAG_RISING_EDGE (0x00000001U)
|
||||
#define FSMC_FLAG_LEVEL (0x00000002U)
|
||||
#define FSMC_FLAG_FALLING_EDGE (0x00000004U)
|
||||
#define FSMC_FLAG_FEMPT (0x00000040U)
|
||||
#endif /* FSMC_BANK3 */
|
||||
/**
|
||||
* @}
|
||||
|
|
@ -642,7 +642,8 @@ typedef struct
|
|||
* @param __BANK__ FSMC_NORSRAM Bank
|
||||
* @retval None
|
||||
*/
|
||||
#define __FSMC_NORSRAM_ENABLE(__INSTANCE__, __BANK__) ((__INSTANCE__)->BTCR[(__BANK__)] |= FSMC_BCRx_MBKEN)
|
||||
#define __FSMC_NORSRAM_ENABLE(__INSTANCE__, __BANK__) ((__INSTANCE__)->BTCR[(__BANK__)]\
|
||||
|= FSMC_BCRx_MBKEN)
|
||||
|
||||
/**
|
||||
* @brief Disable the NORSRAM device access.
|
||||
|
|
@ -650,7 +651,8 @@ typedef struct
|
|||
* @param __BANK__ FSMC_NORSRAM Bank
|
||||
* @retval None
|
||||
*/
|
||||
#define __FSMC_NORSRAM_DISABLE(__INSTANCE__, __BANK__) ((__INSTANCE__)->BTCR[(__BANK__)] &= ~FSMC_BCRx_MBKEN)
|
||||
#define __FSMC_NORSRAM_DISABLE(__INSTANCE__, __BANK__) ((__INSTANCE__)->BTCR[(__BANK__)]\
|
||||
&= ~FSMC_BCRx_MBKEN)
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
|
@ -859,10 +861,14 @@ typedef struct
|
|||
/** @defgroup FSMC_LL_NORSRAM_Private_Functions_Group1 NOR SRAM Initialization/de-initialization functions
|
||||
* @{
|
||||
*/
|
||||
HAL_StatusTypeDef FSMC_NORSRAM_Init(FSMC_NORSRAM_TypeDef *Device, FSMC_NORSRAM_InitTypeDef *Init);
|
||||
HAL_StatusTypeDef FSMC_NORSRAM_Timing_Init(FSMC_NORSRAM_TypeDef *Device, FSMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank);
|
||||
HAL_StatusTypeDef FSMC_NORSRAM_Extended_Timing_Init(FSMC_NORSRAM_EXTENDED_TypeDef *Device, FSMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank, uint32_t ExtendedMode);
|
||||
HAL_StatusTypeDef FSMC_NORSRAM_DeInit(FSMC_NORSRAM_TypeDef *Device, FSMC_NORSRAM_EXTENDED_TypeDef *ExDevice, uint32_t Bank);
|
||||
HAL_StatusTypeDef FSMC_NORSRAM_Init(FSMC_NORSRAM_TypeDef *Device,
|
||||
FSMC_NORSRAM_InitTypeDef *Init);
|
||||
HAL_StatusTypeDef FSMC_NORSRAM_Timing_Init(FSMC_NORSRAM_TypeDef *Device,
|
||||
FSMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank);
|
||||
HAL_StatusTypeDef FSMC_NORSRAM_Extended_Timing_Init(FSMC_NORSRAM_EXTENDED_TypeDef *Device,
|
||||
FSMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank, uint32_t ExtendedMode);
|
||||
HAL_StatusTypeDef FSMC_NORSRAM_DeInit(FSMC_NORSRAM_TypeDef *Device,
|
||||
FSMC_NORSRAM_EXTENDED_TypeDef *ExDevice, uint32_t Bank);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -888,8 +894,10 @@ HAL_StatusTypeDef FSMC_NORSRAM_WriteOperation_Disable(FSMC_NORSRAM_TypeDef *Dev
|
|||
* @{
|
||||
*/
|
||||
HAL_StatusTypeDef FSMC_NAND_Init(FSMC_NAND_TypeDef *Device, FSMC_NAND_InitTypeDef *Init);
|
||||
HAL_StatusTypeDef FSMC_NAND_CommonSpace_Timing_Init(FSMC_NAND_TypeDef *Device, FSMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank);
|
||||
HAL_StatusTypeDef FSMC_NAND_AttributeSpace_Timing_Init(FSMC_NAND_TypeDef *Device, FSMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank);
|
||||
HAL_StatusTypeDef FSMC_NAND_CommonSpace_Timing_Init(FSMC_NAND_TypeDef *Device,
|
||||
FSMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank);
|
||||
HAL_StatusTypeDef FSMC_NAND_AttributeSpace_Timing_Init(FSMC_NAND_TypeDef *Device,
|
||||
FSMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank);
|
||||
HAL_StatusTypeDef FSMC_NAND_DeInit(FSMC_NAND_TypeDef *Device, uint32_t Bank);
|
||||
/**
|
||||
* @}
|
||||
|
|
@ -900,7 +908,8 @@ HAL_StatusTypeDef FSMC_NAND_DeInit(FSMC_NAND_TypeDef *Device, uint32_t Bank);
|
|||
*/
|
||||
HAL_StatusTypeDef FSMC_NAND_ECC_Enable(FSMC_NAND_TypeDef *Device, uint32_t Bank);
|
||||
HAL_StatusTypeDef FSMC_NAND_ECC_Disable(FSMC_NAND_TypeDef *Device, uint32_t Bank);
|
||||
HAL_StatusTypeDef FSMC_NAND_GetECC(FSMC_NAND_TypeDef *Device, uint32_t *ECCval, uint32_t Bank, uint32_t Timeout);
|
||||
HAL_StatusTypeDef FSMC_NAND_GetECC(FSMC_NAND_TypeDef *Device, uint32_t *ECCval, uint32_t Bank,
|
||||
uint32_t Timeout);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -917,9 +926,12 @@ HAL_StatusTypeDef FSMC_NAND_GetECC(FSMC_NAND_TypeDef *Device, uint32_t *ECCval,
|
|||
* @{
|
||||
*/
|
||||
HAL_StatusTypeDef FSMC_PCCARD_Init(FSMC_PCCARD_TypeDef *Device, FSMC_PCCARD_InitTypeDef *Init);
|
||||
HAL_StatusTypeDef FSMC_PCCARD_CommonSpace_Timing_Init(FSMC_PCCARD_TypeDef *Device, FSMC_NAND_PCC_TimingTypeDef *Timing);
|
||||
HAL_StatusTypeDef FSMC_PCCARD_AttributeSpace_Timing_Init(FSMC_PCCARD_TypeDef *Device, FSMC_NAND_PCC_TimingTypeDef *Timing);
|
||||
HAL_StatusTypeDef FSMC_PCCARD_IOSpace_Timing_Init(FSMC_PCCARD_TypeDef *Device, FSMC_NAND_PCC_TimingTypeDef *Timing);
|
||||
HAL_StatusTypeDef FSMC_PCCARD_CommonSpace_Timing_Init(FSMC_PCCARD_TypeDef *Device,
|
||||
FSMC_NAND_PCC_TimingTypeDef *Timing);
|
||||
HAL_StatusTypeDef FSMC_PCCARD_AttributeSpace_Timing_Init(FSMC_PCCARD_TypeDef *Device,
|
||||
FSMC_NAND_PCC_TimingTypeDef *Timing);
|
||||
HAL_StatusTypeDef FSMC_PCCARD_IOSpace_Timing_Init(FSMC_PCCARD_TypeDef *Device,
|
||||
FSMC_NAND_PCC_TimingTypeDef *Timing);
|
||||
HAL_StatusTypeDef FSMC_PCCARD_DeInit(FSMC_PCCARD_TypeDef *Device);
|
||||
/**
|
||||
* @}
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@ typedef struct
|
|||
*/
|
||||
__STATIC_INLINE void LL_GPIO_SetPinMode(GPIO_TypeDef *GPIOx, uint32_t Pin, uint32_t Mode)
|
||||
{
|
||||
register uint32_t *pReg = (uint32_t *)((uint32_t)(&GPIOx->CRL) + (Pin >> 24));
|
||||
register uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&GPIOx->CRL) + (Pin >> 24)));
|
||||
MODIFY_REG(*pReg, ((GPIO_CRL_CNF0 | GPIO_CRL_MODE0) << (POSITION_VAL(Pin) * 4U)), (Mode << (POSITION_VAL(Pin) * 4U)));
|
||||
}
|
||||
|
||||
|
|
@ -381,7 +381,7 @@ __STATIC_INLINE void LL_GPIO_SetPinMode(GPIO_TypeDef *GPIOx, uint32_t Pin, uint3
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_GPIO_GetPinMode(GPIO_TypeDef *GPIOx, uint32_t Pin)
|
||||
{
|
||||
register uint32_t *pReg = (uint32_t *)((uint32_t)(&GPIOx->CRL) + (Pin >> 24));
|
||||
register uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&GPIOx->CRL) + (Pin >> 24)));
|
||||
return (READ_BIT(*pReg, ((GPIO_CRL_CNF0 | GPIO_CRL_MODE0) << (POSITION_VAL(Pin) * 4U))) >> (POSITION_VAL(Pin) * 4U));
|
||||
}
|
||||
|
||||
|
|
@ -419,7 +419,7 @@ __STATIC_INLINE uint32_t LL_GPIO_GetPinMode(GPIO_TypeDef *GPIOx, uint32_t Pin)
|
|||
*/
|
||||
__STATIC_INLINE void LL_GPIO_SetPinSpeed(GPIO_TypeDef *GPIOx, uint32_t Pin, uint32_t Speed)
|
||||
{
|
||||
register uint32_t *pReg = (uint32_t *)((uint32_t)(&GPIOx->CRL) + (Pin >> 24));
|
||||
register uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&GPIOx->CRL) + (Pin >> 24)));
|
||||
MODIFY_REG(*pReg, (GPIO_CRL_MODE0 << (POSITION_VAL(Pin) * 4U)),
|
||||
(Speed << (POSITION_VAL(Pin) * 4U)));
|
||||
}
|
||||
|
|
@ -457,7 +457,7 @@ __STATIC_INLINE void LL_GPIO_SetPinSpeed(GPIO_TypeDef *GPIOx, uint32_t Pin, uint
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_GPIO_GetPinSpeed(GPIO_TypeDef *GPIOx, uint32_t Pin)
|
||||
{
|
||||
register uint32_t *pReg = (uint32_t *)((uint32_t)(&GPIOx->CRL) + (Pin >> 24));
|
||||
register uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&GPIOx->CRL) + (Pin >> 24)));
|
||||
return (READ_BIT(*pReg, (GPIO_CRL_MODE0 << (POSITION_VAL(Pin) * 4U))) >> (POSITION_VAL(Pin) * 4U));
|
||||
}
|
||||
|
||||
|
|
@ -493,7 +493,7 @@ __STATIC_INLINE uint32_t LL_GPIO_GetPinSpeed(GPIO_TypeDef *GPIOx, uint32_t Pin)
|
|||
*/
|
||||
__STATIC_INLINE void LL_GPIO_SetPinOutputType(GPIO_TypeDef *GPIOx, uint32_t Pin, uint32_t OutputType)
|
||||
{
|
||||
register uint32_t *pReg = (uint32_t *)((uint32_t)(&GPIOx->CRL) + (Pin >> 24));
|
||||
register uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&GPIOx->CRL) + (Pin >> 24)));
|
||||
MODIFY_REG(*pReg, (GPIO_CRL_CNF0_0 << (POSITION_VAL(Pin) * 4U)),
|
||||
(OutputType << (POSITION_VAL(Pin) * 4U)));
|
||||
}
|
||||
|
|
@ -530,7 +530,7 @@ __STATIC_INLINE void LL_GPIO_SetPinOutputType(GPIO_TypeDef *GPIOx, uint32_t Pin,
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_GPIO_GetPinOutputType(GPIO_TypeDef *GPIOx, uint32_t Pin)
|
||||
{
|
||||
register uint32_t *pReg = (uint32_t *)((uint32_t)(&GPIOx->CRL) + (Pin >> 24));
|
||||
register uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&GPIOx->CRL) + (Pin >> 24)));
|
||||
return (READ_BIT(*pReg, (GPIO_CRL_CNF0_0 << (POSITION_VAL(Pin) * 4U))) >> (POSITION_VAL(Pin) * 4U));
|
||||
|
||||
}
|
||||
|
|
@ -861,7 +861,9 @@ __STATIC_INLINE void LL_GPIO_ResetOutputPin(GPIO_TypeDef *GPIOx, uint32_t PinMas
|
|||
*/
|
||||
__STATIC_INLINE void LL_GPIO_TogglePin(GPIO_TypeDef *GPIOx, uint32_t PinMask)
|
||||
{
|
||||
WRITE_REG(GPIOx->ODR, READ_REG(GPIOx->ODR) ^ ((PinMask >> GPIO_PIN_MASK_POS) & 0x0000FFFFU));
|
||||
uint32_t odr = READ_REG(GPIOx->ODR);
|
||||
uint32_t pinmask = ((PinMask >> GPIO_PIN_MASK_POS) & 0x0000FFFFU);
|
||||
WRITE_REG(GPIOx->BSRR, ((odr & pinmask) << 16u) | (~odr & pinmask));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -45,12 +45,10 @@ extern "C" {
|
|||
/** @defgroup IWDG_LL_Private_Constants IWDG Private Constants
|
||||
* @{
|
||||
*/
|
||||
|
||||
#define LL_IWDG_KEY_RELOAD 0x0000AAAAU /*!< IWDG Reload Counter Enable */
|
||||
#define LL_IWDG_KEY_ENABLE 0x0000CCCCU /*!< IWDG Peripheral Enable */
|
||||
#define LL_IWDG_KEY_WR_ACCESS_ENABLE 0x00005555U /*!< IWDG KR Write Access Enable */
|
||||
#define LL_IWDG_KEY_WR_ACCESS_DISABLE 0x00000000U /*!< IWDG KR Write Access Disable */
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -69,7 +67,6 @@ extern "C" {
|
|||
*/
|
||||
#define LL_IWDG_SR_PVU IWDG_SR_PVU /*!< Watchdog prescaler value update */
|
||||
#define LL_IWDG_SR_RVU IWDG_SR_RVU /*!< Watchdog counter reload value update */
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -143,7 +140,7 @@ extern "C" {
|
|||
*/
|
||||
__STATIC_INLINE void LL_IWDG_Enable(IWDG_TypeDef *IWDGx)
|
||||
{
|
||||
WRITE_REG(IWDG->KR, LL_IWDG_KEY_ENABLE);
|
||||
WRITE_REG(IWDGx->KR, LL_IWDG_KEY_ENABLE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -154,7 +151,7 @@ __STATIC_INLINE void LL_IWDG_Enable(IWDG_TypeDef *IWDGx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_IWDG_ReloadCounter(IWDG_TypeDef *IWDGx)
|
||||
{
|
||||
WRITE_REG(IWDG->KR, LL_IWDG_KEY_RELOAD);
|
||||
WRITE_REG(IWDGx->KR, LL_IWDG_KEY_RELOAD);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -165,7 +162,7 @@ __STATIC_INLINE void LL_IWDG_ReloadCounter(IWDG_TypeDef *IWDGx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_IWDG_EnableWriteAccess(IWDG_TypeDef *IWDGx)
|
||||
{
|
||||
WRITE_REG(IWDG->KR, LL_IWDG_KEY_WR_ACCESS_ENABLE);
|
||||
WRITE_REG(IWDGx->KR, LL_IWDG_KEY_WR_ACCESS_ENABLE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -176,7 +173,7 @@ __STATIC_INLINE void LL_IWDG_EnableWriteAccess(IWDG_TypeDef *IWDGx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_IWDG_DisableWriteAccess(IWDG_TypeDef *IWDGx)
|
||||
{
|
||||
WRITE_REG(IWDG->KR, LL_IWDG_KEY_WR_ACCESS_DISABLE);
|
||||
WRITE_REG(IWDGx->KR, LL_IWDG_KEY_WR_ACCESS_DISABLE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -213,7 +210,7 @@ __STATIC_INLINE void LL_IWDG_SetPrescaler(IWDG_TypeDef *IWDGx, uint32_t Prescale
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_IWDG_GetPrescaler(IWDG_TypeDef *IWDGx)
|
||||
{
|
||||
return (uint32_t)(READ_REG(IWDGx->PR));
|
||||
return (READ_REG(IWDGx->PR));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -236,7 +233,7 @@ __STATIC_INLINE void LL_IWDG_SetReloadCounter(IWDG_TypeDef *IWDGx, uint32_t Coun
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_IWDG_GetReloadCounter(IWDG_TypeDef *IWDGx)
|
||||
{
|
||||
return (uint32_t)(READ_REG(IWDGx->RLR));
|
||||
return (READ_REG(IWDGx->RLR));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -256,7 +253,7 @@ __STATIC_INLINE uint32_t LL_IWDG_GetReloadCounter(IWDG_TypeDef *IWDGx)
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_IWDG_IsActiveFlag_PVU(IWDG_TypeDef *IWDGx)
|
||||
{
|
||||
return (READ_BIT(IWDGx->SR, IWDG_SR_PVU) == (IWDG_SR_PVU));
|
||||
return ((READ_BIT(IWDGx->SR, IWDG_SR_PVU) == (IWDG_SR_PVU)) ? 1UL : 0UL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -267,12 +264,11 @@ __STATIC_INLINE uint32_t LL_IWDG_IsActiveFlag_PVU(IWDG_TypeDef *IWDGx)
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_IWDG_IsActiveFlag_RVU(IWDG_TypeDef *IWDGx)
|
||||
{
|
||||
return (READ_BIT(IWDGx->SR, IWDG_SR_RVU) == (IWDG_SR_RVU));
|
||||
return ((READ_BIT(IWDGx->SR, IWDG_SR_RVU) == (IWDG_SR_RVU)) ? 1UL : 0UL);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Check if all flags Prescaler, Reload & Window Value Update are reset or not
|
||||
* @brief Check if flags Prescaler & Reload Value Update are reset or not
|
||||
* @rmtoll SR PVU LL_IWDG_IsReady\n
|
||||
* SR RVU LL_IWDG_IsReady
|
||||
* @param IWDGx IWDG Instance
|
||||
|
|
@ -280,7 +276,7 @@ __STATIC_INLINE uint32_t LL_IWDG_IsActiveFlag_RVU(IWDG_TypeDef *IWDGx)
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_IWDG_IsReady(IWDG_TypeDef *IWDGx)
|
||||
{
|
||||
return (READ_BIT(IWDGx->SR, IWDG_SR_PVU | IWDG_SR_RVU) == 0U);
|
||||
return ((READ_BIT(IWDGx->SR, IWDG_SR_PVU | IWDG_SR_RVU) == 0U) ? 1UL : 0UL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -296,7 +292,7 @@ __STATIC_INLINE uint32_t LL_IWDG_IsReady(IWDG_TypeDef *IWDGx)
|
|||
* @}
|
||||
*/
|
||||
|
||||
#endif /* IWDG) */
|
||||
#endif /* IWDG */
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
|
|
|||
|
|
@ -1520,8 +1520,8 @@ __STATIC_INLINE void LL_RCC_PLL_SetMainSource(uint32_t PLLSource)
|
|||
__STATIC_INLINE uint32_t LL_RCC_PLL_GetMainSource(void)
|
||||
{
|
||||
#if defined(RCC_CFGR2_PREDIV1SRC)
|
||||
register uint32_t pllsrc = READ_BIT(RCC->CFGR, RCC_CFGR_PLLSRC);
|
||||
register uint32_t predivsrc = (uint32_t)(READ_BIT(RCC->CFGR2, RCC_CFGR2_PREDIV1SRC) << 4U);
|
||||
uint32_t pllsrc = READ_BIT(RCC->CFGR, RCC_CFGR_PLLSRC);
|
||||
uint32_t predivsrc = (uint32_t)(READ_BIT(RCC->CFGR2, RCC_CFGR2_PREDIV1SRC) << 4U);
|
||||
return (uint32_t)(pllsrc | predivsrc);
|
||||
#else
|
||||
return (uint32_t)(READ_BIT(RCC->CFGR, RCC_CFGR_PLLSRC));
|
||||
|
|
|
|||
|
|
@ -675,8 +675,8 @@ __STATIC_INLINE void LL_SPI_SetNSSMode(SPI_TypeDef *SPIx, uint32_t NSS)
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetNSSMode(SPI_TypeDef *SPIx)
|
||||
{
|
||||
register uint32_t Ssm = (READ_BIT(SPIx->CR1, SPI_CR1_SSM));
|
||||
register uint32_t Ssoe = (READ_BIT(SPIx->CR2, SPI_CR2_SSOE) << 16U);
|
||||
uint32_t Ssm = (READ_BIT(SPIx->CR1, SPI_CR1_SSM));
|
||||
uint32_t Ssoe = (READ_BIT(SPIx->CR2, SPI_CR2_SSOE) << 16U);
|
||||
return (Ssm | Ssoe);
|
||||
}
|
||||
|
||||
|
|
@ -1198,10 +1198,10 @@ typedef struct
|
|||
/** @defgroup I2S_LL_EC_DATA_FORMAT Data format
|
||||
* @{
|
||||
*/
|
||||
#define LL_I2S_DATAFORMAT_16B 0x00000000U /*!< Data length 16 bits, Channel lenght 16bit */
|
||||
#define LL_I2S_DATAFORMAT_16B_EXTENDED (SPI_I2SCFGR_CHLEN) /*!< Data length 16 bits, Channel lenght 32bit */
|
||||
#define LL_I2S_DATAFORMAT_24B (SPI_I2SCFGR_CHLEN | SPI_I2SCFGR_DATLEN_0) /*!< Data length 24 bits, Channel lenght 32bit */
|
||||
#define LL_I2S_DATAFORMAT_32B (SPI_I2SCFGR_CHLEN | SPI_I2SCFGR_DATLEN_1) /*!< Data length 16 bits, Channel lenght 32bit */
|
||||
#define LL_I2S_DATAFORMAT_16B 0x00000000U /*!< Data length 16 bits, Channel length 16bit */
|
||||
#define LL_I2S_DATAFORMAT_16B_EXTENDED (SPI_I2SCFGR_CHLEN) /*!< Data length 16 bits, Channel length 32bit */
|
||||
#define LL_I2S_DATAFORMAT_24B (SPI_I2SCFGR_CHLEN | SPI_I2SCFGR_DATLEN_0) /*!< Data length 24 bits, Channel length 32bit */
|
||||
#define LL_I2S_DATAFORMAT_32B (SPI_I2SCFGR_CHLEN | SPI_I2SCFGR_DATLEN_1) /*!< Data length 16 bits, Channel length 32bit */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -1536,7 +1536,7 @@ __STATIC_INLINE uint32_t LL_I2S_GetPrescalerParity(SPI_TypeDef *SPIx)
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Enable the master clock ouput (Pin MCK)
|
||||
* @brief Enable the master clock output (Pin MCK)
|
||||
* @rmtoll I2SPR MCKOE LL_I2S_EnableMasterClock
|
||||
* @param SPIx SPI Instance
|
||||
* @retval None
|
||||
|
|
@ -1547,7 +1547,7 @@ __STATIC_INLINE void LL_I2S_EnableMasterClock(SPI_TypeDef *SPIx)
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Disable the master clock ouput (Pin MCK)
|
||||
* @brief Disable the master clock output (Pin MCK)
|
||||
* @rmtoll I2SPR MCKOE LL_I2S_DisableMasterClock
|
||||
* @param SPIx SPI Instance
|
||||
* @retval None
|
||||
|
|
@ -1558,7 +1558,7 @@ __STATIC_INLINE void LL_I2S_DisableMasterClock(SPI_TypeDef *SPIx)
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Check if the master clock ouput (Pin MCK) is enabled
|
||||
* @brief Check if the master clock output (Pin MCK) is enabled
|
||||
* @rmtoll I2SPR MCKOE LL_I2S_IsEnabledMasterClock
|
||||
* @param SPIx SPI Instance
|
||||
* @retval State of bit (1 or 0).
|
||||
|
|
|
|||
|
|
@ -198,13 +198,14 @@ typedef struct
|
|||
|
||||
This feature can be modified afterwards using unitary function @ref LL_TIM_SetClockDivision().*/
|
||||
|
||||
uint8_t RepetitionCounter; /*!< Specifies the repetition counter value. Each time the RCR downcounter
|
||||
uint32_t RepetitionCounter; /*!< Specifies the repetition counter value. Each time the RCR downcounter
|
||||
reaches zero, an update event is generated and counting restarts
|
||||
from the RCR value (N).
|
||||
This means in PWM mode that (N+1) corresponds to:
|
||||
- the number of PWM periods in edge-aligned mode
|
||||
- the number of half PWM period in center-aligned mode
|
||||
This parameter must be a number between 0x00 and 0xFF.
|
||||
GP timers: this parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF.
|
||||
Advanced timers: this parameter must be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF.
|
||||
|
||||
This feature can be modified afterwards using unitary function @ref LL_TIM_SetRepetitionCounter().*/
|
||||
} LL_TIM_InitTypeDef;
|
||||
|
|
@ -512,8 +513,8 @@ typedef struct
|
|||
*/
|
||||
#define LL_TIM_COUNTERMODE_UP 0x00000000U /*!<Counter used as upcounter */
|
||||
#define LL_TIM_COUNTERMODE_DOWN TIM_CR1_DIR /*!< Counter used as downcounter */
|
||||
#define LL_TIM_COUNTERMODE_CENTER_UP TIM_CR1_CMS_0 /*!< The counter counts up and down alternatively. Output compare interrupt flags of output channels are set only when the counter is counting down. */
|
||||
#define LL_TIM_COUNTERMODE_CENTER_DOWN TIM_CR1_CMS_1 /*!<The counter counts up and down alternatively. Output compare interrupt flags of output channels are set only when the counter is counting up */
|
||||
#define LL_TIM_COUNTERMODE_CENTER_DOWN TIM_CR1_CMS_0 /*!< The counter counts up and down alternatively. Output compare interrupt flags of output channels are set only when the counter is counting down. */
|
||||
#define LL_TIM_COUNTERMODE_CENTER_UP TIM_CR1_CMS_1 /*!<The counter counts up and down alternatively. Output compare interrupt flags of output channels are set only when the counter is counting up */
|
||||
#define LL_TIM_COUNTERMODE_CENTER_UP_DOWN TIM_CR1_CMS /*!< The counter counts up and down alternatively. Output compare interrupt flags of output channels are set only when the counter is counting up or down. */
|
||||
/**
|
||||
* @}
|
||||
|
|
@ -1331,7 +1332,7 @@ __STATIC_INLINE uint32_t LL_TIM_GetAutoReload(TIM_TypeDef *TIMx)
|
|||
* whether or not a timer instance supports a repetition counter.
|
||||
* @rmtoll RCR REP LL_TIM_SetRepetitionCounter
|
||||
* @param TIMx Timer instance
|
||||
* @param RepetitionCounter between Min_Data=0 and Max_Data=255
|
||||
* @param RepetitionCounter between Min_Data=0 and Max_Data=255 or 65535 for advanced timer.
|
||||
* @retval None
|
||||
*/
|
||||
__STATIC_INLINE void LL_TIM_SetRepetitionCounter(TIM_TypeDef *TIMx, uint32_t RepetitionCounter)
|
||||
|
|
@ -1559,8 +1560,8 @@ __STATIC_INLINE uint32_t LL_TIM_CC_IsEnabledChannel(TIM_TypeDef *TIMx, uint32_t
|
|||
*/
|
||||
__STATIC_INLINE void LL_TIM_OC_ConfigOutput(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t Configuration)
|
||||
{
|
||||
register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
__IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
CLEAR_BIT(*pReg, (TIM_CCMR1_CC1S << SHIFT_TAB_OCxx[iChannel]));
|
||||
MODIFY_REG(TIMx->CCER, (TIM_CCER_CC1P << SHIFT_TAB_CCxP[iChannel]),
|
||||
(Configuration & TIM_CCER_CC1P) << SHIFT_TAB_CCxP[iChannel]);
|
||||
|
|
@ -1594,8 +1595,8 @@ __STATIC_INLINE void LL_TIM_OC_ConfigOutput(TIM_TypeDef *TIMx, uint32_t Channel,
|
|||
*/
|
||||
__STATIC_INLINE void LL_TIM_OC_SetMode(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t Mode)
|
||||
{
|
||||
register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
__IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
MODIFY_REG(*pReg, ((TIM_CCMR1_OC1M | TIM_CCMR1_CC1S) << SHIFT_TAB_OCxx[iChannel]), Mode << SHIFT_TAB_OCxx[iChannel]);
|
||||
}
|
||||
|
||||
|
|
@ -1623,8 +1624,8 @@ __STATIC_INLINE void LL_TIM_OC_SetMode(TIM_TypeDef *TIMx, uint32_t Channel, uint
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_TIM_OC_GetMode(TIM_TypeDef *TIMx, uint32_t Channel)
|
||||
{
|
||||
register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
return (READ_BIT(*pReg, ((TIM_CCMR1_OC1M | TIM_CCMR1_CC1S) << SHIFT_TAB_OCxx[iChannel])) >> SHIFT_TAB_OCxx[iChannel]);
|
||||
}
|
||||
|
||||
|
|
@ -1653,7 +1654,7 @@ __STATIC_INLINE uint32_t LL_TIM_OC_GetMode(TIM_TypeDef *TIMx, uint32_t Channel)
|
|||
*/
|
||||
__STATIC_INLINE void LL_TIM_OC_SetPolarity(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t Polarity)
|
||||
{
|
||||
register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
MODIFY_REG(TIMx->CCER, (TIM_CCER_CC1P << SHIFT_TAB_CCxP[iChannel]), Polarity << SHIFT_TAB_CCxP[iChannel]);
|
||||
}
|
||||
|
||||
|
|
@ -1681,7 +1682,7 @@ __STATIC_INLINE void LL_TIM_OC_SetPolarity(TIM_TypeDef *TIMx, uint32_t Channel,
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_TIM_OC_GetPolarity(TIM_TypeDef *TIMx, uint32_t Channel)
|
||||
{
|
||||
register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
return (READ_BIT(TIMx->CCER, (TIM_CCER_CC1P << SHIFT_TAB_CCxP[iChannel])) >> SHIFT_TAB_CCxP[iChannel]);
|
||||
}
|
||||
|
||||
|
|
@ -1714,7 +1715,7 @@ __STATIC_INLINE uint32_t LL_TIM_OC_GetPolarity(TIM_TypeDef *TIMx, uint32_t Chann
|
|||
*/
|
||||
__STATIC_INLINE void LL_TIM_OC_SetIdleState(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t IdleState)
|
||||
{
|
||||
register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
MODIFY_REG(TIMx->CR2, (TIM_CR2_OIS1 << SHIFT_TAB_OISx[iChannel]), IdleState << SHIFT_TAB_OISx[iChannel]);
|
||||
}
|
||||
|
||||
|
|
@ -1742,7 +1743,7 @@ __STATIC_INLINE void LL_TIM_OC_SetIdleState(TIM_TypeDef *TIMx, uint32_t Channel,
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_TIM_OC_GetIdleState(TIM_TypeDef *TIMx, uint32_t Channel)
|
||||
{
|
||||
register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
return (READ_BIT(TIMx->CR2, (TIM_CR2_OIS1 << SHIFT_TAB_OISx[iChannel])) >> SHIFT_TAB_OISx[iChannel]);
|
||||
}
|
||||
|
||||
|
|
@ -1763,8 +1764,8 @@ __STATIC_INLINE uint32_t LL_TIM_OC_GetIdleState(TIM_TypeDef *TIMx, uint32_t Chan
|
|||
*/
|
||||
__STATIC_INLINE void LL_TIM_OC_EnableFast(TIM_TypeDef *TIMx, uint32_t Channel)
|
||||
{
|
||||
register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
__IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
SET_BIT(*pReg, (TIM_CCMR1_OC1FE << SHIFT_TAB_OCxx[iChannel]));
|
||||
|
||||
}
|
||||
|
|
@ -1785,8 +1786,8 @@ __STATIC_INLINE void LL_TIM_OC_EnableFast(TIM_TypeDef *TIMx, uint32_t Channel)
|
|||
*/
|
||||
__STATIC_INLINE void LL_TIM_OC_DisableFast(TIM_TypeDef *TIMx, uint32_t Channel)
|
||||
{
|
||||
register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
__IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
CLEAR_BIT(*pReg, (TIM_CCMR1_OC1FE << SHIFT_TAB_OCxx[iChannel]));
|
||||
|
||||
}
|
||||
|
|
@ -1807,9 +1808,9 @@ __STATIC_INLINE void LL_TIM_OC_DisableFast(TIM_TypeDef *TIMx, uint32_t Channel)
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_TIM_OC_IsEnabledFast(TIM_TypeDef *TIMx, uint32_t Channel)
|
||||
{
|
||||
register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
register uint32_t bitfield = TIM_CCMR1_OC1FE << SHIFT_TAB_OCxx[iChannel];
|
||||
uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
uint32_t bitfield = TIM_CCMR1_OC1FE << SHIFT_TAB_OCxx[iChannel];
|
||||
return ((READ_BIT(*pReg, bitfield) == bitfield) ? 1UL : 0UL);
|
||||
}
|
||||
|
||||
|
|
@ -1829,8 +1830,8 @@ __STATIC_INLINE uint32_t LL_TIM_OC_IsEnabledFast(TIM_TypeDef *TIMx, uint32_t Cha
|
|||
*/
|
||||
__STATIC_INLINE void LL_TIM_OC_EnablePreload(TIM_TypeDef *TIMx, uint32_t Channel)
|
||||
{
|
||||
register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
__IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
SET_BIT(*pReg, (TIM_CCMR1_OC1PE << SHIFT_TAB_OCxx[iChannel]));
|
||||
}
|
||||
|
||||
|
|
@ -1850,8 +1851,8 @@ __STATIC_INLINE void LL_TIM_OC_EnablePreload(TIM_TypeDef *TIMx, uint32_t Channel
|
|||
*/
|
||||
__STATIC_INLINE void LL_TIM_OC_DisablePreload(TIM_TypeDef *TIMx, uint32_t Channel)
|
||||
{
|
||||
register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
__IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
CLEAR_BIT(*pReg, (TIM_CCMR1_OC1PE << SHIFT_TAB_OCxx[iChannel]));
|
||||
}
|
||||
|
||||
|
|
@ -1871,9 +1872,9 @@ __STATIC_INLINE void LL_TIM_OC_DisablePreload(TIM_TypeDef *TIMx, uint32_t Channe
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_TIM_OC_IsEnabledPreload(TIM_TypeDef *TIMx, uint32_t Channel)
|
||||
{
|
||||
register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
register uint32_t bitfield = TIM_CCMR1_OC1PE << SHIFT_TAB_OCxx[iChannel];
|
||||
uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
uint32_t bitfield = TIM_CCMR1_OC1PE << SHIFT_TAB_OCxx[iChannel];
|
||||
return ((READ_BIT(*pReg, bitfield) == bitfield) ? 1UL : 0UL);
|
||||
}
|
||||
|
||||
|
|
@ -1896,8 +1897,8 @@ __STATIC_INLINE uint32_t LL_TIM_OC_IsEnabledPreload(TIM_TypeDef *TIMx, uint32_t
|
|||
*/
|
||||
__STATIC_INLINE void LL_TIM_OC_EnableClear(TIM_TypeDef *TIMx, uint32_t Channel)
|
||||
{
|
||||
register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
__IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
SET_BIT(*pReg, (TIM_CCMR1_OC1CE << SHIFT_TAB_OCxx[iChannel]));
|
||||
}
|
||||
|
||||
|
|
@ -1919,8 +1920,8 @@ __STATIC_INLINE void LL_TIM_OC_EnableClear(TIM_TypeDef *TIMx, uint32_t Channel)
|
|||
*/
|
||||
__STATIC_INLINE void LL_TIM_OC_DisableClear(TIM_TypeDef *TIMx, uint32_t Channel)
|
||||
{
|
||||
register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
__IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
CLEAR_BIT(*pReg, (TIM_CCMR1_OC1CE << SHIFT_TAB_OCxx[iChannel]));
|
||||
}
|
||||
|
||||
|
|
@ -1944,9 +1945,9 @@ __STATIC_INLINE void LL_TIM_OC_DisableClear(TIM_TypeDef *TIMx, uint32_t Channel)
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_TIM_OC_IsEnabledClear(TIM_TypeDef *TIMx, uint32_t Channel)
|
||||
{
|
||||
register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
register uint32_t bitfield = TIM_CCMR1_OC1CE << SHIFT_TAB_OCxx[iChannel];
|
||||
uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
uint32_t bitfield = TIM_CCMR1_OC1CE << SHIFT_TAB_OCxx[iChannel];
|
||||
return ((READ_BIT(*pReg, bitfield) == bitfield) ? 1UL : 0UL);
|
||||
}
|
||||
|
||||
|
|
@ -2116,8 +2117,8 @@ __STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH4(TIM_TypeDef *TIMx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_TIM_IC_Config(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t Configuration)
|
||||
{
|
||||
register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
__IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
MODIFY_REG(*pReg, ((TIM_CCMR1_IC1F | TIM_CCMR1_IC1PSC | TIM_CCMR1_CC1S) << SHIFT_TAB_ICxx[iChannel]),
|
||||
((Configuration >> 16U) & (TIM_CCMR1_IC1F | TIM_CCMR1_IC1PSC | TIM_CCMR1_CC1S)) << SHIFT_TAB_ICxx[iChannel]);
|
||||
MODIFY_REG(TIMx->CCER, ((TIM_CCER_CC1NP | TIM_CCER_CC1P) << SHIFT_TAB_CCxP[iChannel]),
|
||||
|
|
@ -2144,8 +2145,8 @@ __STATIC_INLINE void LL_TIM_IC_Config(TIM_TypeDef *TIMx, uint32_t Channel, uint3
|
|||
*/
|
||||
__STATIC_INLINE void LL_TIM_IC_SetActiveInput(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ICActiveInput)
|
||||
{
|
||||
register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
__IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
MODIFY_REG(*pReg, ((TIM_CCMR1_CC1S) << SHIFT_TAB_ICxx[iChannel]), (ICActiveInput >> 16U) << SHIFT_TAB_ICxx[iChannel]);
|
||||
}
|
||||
|
||||
|
|
@ -2168,8 +2169,8 @@ __STATIC_INLINE void LL_TIM_IC_SetActiveInput(TIM_TypeDef *TIMx, uint32_t Channe
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_TIM_IC_GetActiveInput(TIM_TypeDef *TIMx, uint32_t Channel)
|
||||
{
|
||||
register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
return ((READ_BIT(*pReg, ((TIM_CCMR1_CC1S) << SHIFT_TAB_ICxx[iChannel])) >> SHIFT_TAB_ICxx[iChannel]) << 16U);
|
||||
}
|
||||
|
||||
|
|
@ -2194,8 +2195,8 @@ __STATIC_INLINE uint32_t LL_TIM_IC_GetActiveInput(TIM_TypeDef *TIMx, uint32_t Ch
|
|||
*/
|
||||
__STATIC_INLINE void LL_TIM_IC_SetPrescaler(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ICPrescaler)
|
||||
{
|
||||
register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
__IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
MODIFY_REG(*pReg, ((TIM_CCMR1_IC1PSC) << SHIFT_TAB_ICxx[iChannel]), (ICPrescaler >> 16U) << SHIFT_TAB_ICxx[iChannel]);
|
||||
}
|
||||
|
||||
|
|
@ -2219,8 +2220,8 @@ __STATIC_INLINE void LL_TIM_IC_SetPrescaler(TIM_TypeDef *TIMx, uint32_t Channel,
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_TIM_IC_GetPrescaler(TIM_TypeDef *TIMx, uint32_t Channel)
|
||||
{
|
||||
register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
return ((READ_BIT(*pReg, ((TIM_CCMR1_IC1PSC) << SHIFT_TAB_ICxx[iChannel])) >> SHIFT_TAB_ICxx[iChannel]) << 16U);
|
||||
}
|
||||
|
||||
|
|
@ -2257,8 +2258,8 @@ __STATIC_INLINE uint32_t LL_TIM_IC_GetPrescaler(TIM_TypeDef *TIMx, uint32_t Chan
|
|||
*/
|
||||
__STATIC_INLINE void LL_TIM_IC_SetFilter(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ICFilter)
|
||||
{
|
||||
register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
__IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
MODIFY_REG(*pReg, ((TIM_CCMR1_IC1F) << SHIFT_TAB_ICxx[iChannel]), (ICFilter >> 16U) << SHIFT_TAB_ICxx[iChannel]);
|
||||
}
|
||||
|
||||
|
|
@ -2294,8 +2295,8 @@ __STATIC_INLINE void LL_TIM_IC_SetFilter(TIM_TypeDef *TIMx, uint32_t Channel, ui
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_TIM_IC_GetFilter(TIM_TypeDef *TIMx, uint32_t Channel)
|
||||
{
|
||||
register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
|
||||
return ((READ_BIT(*pReg, ((TIM_CCMR1_IC1F) << SHIFT_TAB_ICxx[iChannel])) >> SHIFT_TAB_ICxx[iChannel]) << 16U);
|
||||
}
|
||||
|
||||
|
|
@ -2321,7 +2322,7 @@ __STATIC_INLINE uint32_t LL_TIM_IC_GetFilter(TIM_TypeDef *TIMx, uint32_t Channel
|
|||
*/
|
||||
__STATIC_INLINE void LL_TIM_IC_SetPolarity(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ICPolarity)
|
||||
{
|
||||
register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
MODIFY_REG(TIMx->CCER, ((TIM_CCER_CC1NP | TIM_CCER_CC1P) << SHIFT_TAB_CCxP[iChannel]),
|
||||
ICPolarity << SHIFT_TAB_CCxP[iChannel]);
|
||||
}
|
||||
|
|
@ -2347,7 +2348,7 @@ __STATIC_INLINE void LL_TIM_IC_SetPolarity(TIM_TypeDef *TIMx, uint32_t Channel,
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_TIM_IC_GetPolarity(TIM_TypeDef *TIMx, uint32_t Channel)
|
||||
{
|
||||
register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
|
||||
return (READ_BIT(TIMx->CCER, ((TIM_CCER_CC1NP | TIM_CCER_CC1P) << SHIFT_TAB_CCxP[iChannel])) >>
|
||||
SHIFT_TAB_CCxP[iChannel]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -377,7 +377,7 @@ typedef struct
|
|||
*/
|
||||
#define __LL_USART_DIV_SAMPLING16_100(__PERIPHCLK__, __BAUDRATE__) (((__PERIPHCLK__)*25)/(4*(__BAUDRATE__)))
|
||||
#define __LL_USART_DIVMANT_SAMPLING16(__PERIPHCLK__, __BAUDRATE__) (__LL_USART_DIV_SAMPLING16_100((__PERIPHCLK__), (__BAUDRATE__))/100)
|
||||
#define __LL_USART_DIVFRAQ_SAMPLING16(__PERIPHCLK__, __BAUDRATE__) (((__LL_USART_DIV_SAMPLING16_100((__PERIPHCLK__), (__BAUDRATE__)) - (__LL_USART_DIVMANT_SAMPLING16((__PERIPHCLK__), (__BAUDRATE__)) * 100)) * 16 + 50) / 100)
|
||||
#define __LL_USART_DIVFRAQ_SAMPLING16(__PERIPHCLK__, __BAUDRATE__) ((((__LL_USART_DIV_SAMPLING16_100((__PERIPHCLK__), (__BAUDRATE__)) - (__LL_USART_DIVMANT_SAMPLING16((__PERIPHCLK__), (__BAUDRATE__)) * 100)) * 16) + 50) / 100)
|
||||
/* USART BRR = mantissa + overflow + fraction
|
||||
= (USART DIVMANT << 4) + (USART DIVFRAQ & 0xF0) + (USART DIVFRAQ & 0x0F) */
|
||||
#define __LL_USART_DIV_SAMPLING16(__PERIPHCLK__, __BAUDRATE__) (((__LL_USART_DIVMANT_SAMPLING16((__PERIPHCLK__), (__BAUDRATE__)) << 4) + \
|
||||
|
|
@ -1050,8 +1050,8 @@ __STATIC_INLINE void LL_USART_SetBaudRate(USART_TypeDef *USARTx, uint32_t Periph
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_USART_GetBaudRate(USART_TypeDef *USARTx, uint32_t PeriphClk, uint32_t OverSampling)
|
||||
{
|
||||
register uint32_t usartdiv = 0x0U;
|
||||
register uint32_t brrresult = 0x0U;
|
||||
uint32_t usartdiv = 0x0U;
|
||||
uint32_t brrresult = 0x0U;
|
||||
|
||||
usartdiv = USARTx->BRR;
|
||||
|
||||
|
|
@ -1101,8 +1101,8 @@ __STATIC_INLINE void LL_USART_SetBaudRate(USART_TypeDef *USARTx, uint32_t Periph
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_USART_GetBaudRate(USART_TypeDef *USARTx, uint32_t PeriphClk)
|
||||
{
|
||||
register uint32_t usartdiv = 0x0U;
|
||||
register uint32_t brrresult = 0x0U;
|
||||
uint32_t usartdiv = 0x0U;
|
||||
uint32_t brrresult = 0x0U;
|
||||
|
||||
usartdiv = USARTx->BRR;
|
||||
|
||||
|
|
|
|||
|
|
@ -602,6 +602,7 @@ HAL_StatusTypeDef USB_DevInit(USB_TypeDef *USBx, USB_CfgTypeDef cfg);
|
|||
HAL_StatusTypeDef USB_EnableGlobalInt(USB_TypeDef *USBx);
|
||||
HAL_StatusTypeDef USB_DisableGlobalInt(USB_TypeDef *USBx);
|
||||
HAL_StatusTypeDef USB_SetCurrentMode(USB_TypeDef *USBx, USB_ModeTypeDef mode);
|
||||
HAL_StatusTypeDef USB_SetDevSpeed(USB_TypeDef *USBx, uint8_t speed);
|
||||
HAL_StatusTypeDef USB_FlushRxFifo(USB_TypeDef *USBx);
|
||||
HAL_StatusTypeDef USB_FlushTxFifo(USB_TypeDef *USBx, uint32_t num);
|
||||
HAL_StatusTypeDef USB_ActivateEndpoint(USB_TypeDef *USBx, USB_EPTypeDef *ep);
|
||||
|
|
@ -614,6 +615,11 @@ HAL_StatusTypeDef USB_DevConnect(USB_TypeDef *USBx);
|
|||
HAL_StatusTypeDef USB_DevDisconnect(USB_TypeDef *USBx);
|
||||
HAL_StatusTypeDef USB_StopDevice(USB_TypeDef *USBx);
|
||||
HAL_StatusTypeDef USB_EP0_OutStart(USB_TypeDef *USBx, uint8_t *psetup);
|
||||
HAL_StatusTypeDef USB_WritePacket(USB_TypeDef *USBx, uint8_t *src,
|
||||
uint8_t ch_ep_num, uint16_t len);
|
||||
|
||||
void *USB_ReadPacket(USB_TypeDef *USBx, uint8_t *dest, uint16_t len);
|
||||
|
||||
uint32_t USB_ReadInterrupts(USB_TypeDef *USBx);
|
||||
uint32_t USB_ReadDevAllOutEpInterrupt(USB_TypeDef *USBx);
|
||||
uint32_t USB_ReadDevOutEPInterrupt(USB_TypeDef *USBx, uint8_t epnum);
|
||||
|
|
|
|||
|
|
@ -236,6 +236,9 @@ void LL_mDelay(uint32_t Delay);
|
|||
*/
|
||||
|
||||
void LL_SetSystemCoreClock(uint32_t HCLKFrequency);
|
||||
#if defined(FLASH_ACR_LATENCY)
|
||||
ErrorStatus LL_SetFlashLatency(uint32_t Frequency);
|
||||
#endif /* FLASH_ACR_LATENCY */
|
||||
ErrorStatus LL_PLL_ConfigSystemClock_HSI(LL_UTILS_PLLInitTypeDef *UTILS_PLLInitStruct,
|
||||
LL_UTILS_ClkInitTypeDef *UTILS_ClkInitStruct);
|
||||
ErrorStatus LL_PLL_ConfigSystemClock_HSE(uint32_t HSEFrequency, uint32_t HSEBypass,
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ extern "C" {
|
|||
*/
|
||||
|
||||
#if defined (WWDG)
|
||||
|
||||
/** @defgroup WWDG_LL WWDG
|
||||
* @{
|
||||
*/
|
||||
|
|
@ -59,7 +60,7 @@ extern "C" {
|
|||
/** @defgroup WWDG_LL_EC_PRESCALER PRESCALER
|
||||
* @{
|
||||
*/
|
||||
#define LL_WWDG_PRESCALER_1 0x00000000U /*!< WWDG counter clock = (PCLK1/4096)/1 */
|
||||
#define LL_WWDG_PRESCALER_1 0x00000000u /*!< WWDG counter clock = (PCLK1/4096)/1 */
|
||||
#define LL_WWDG_PRESCALER_2 WWDG_CFR_WDGTB_0 /*!< WWDG counter clock = (PCLK1/4096)/2 */
|
||||
#define LL_WWDG_PRESCALER_4 WWDG_CFR_WDGTB_1 /*!< WWDG counter clock = (PCLK1/4096)/4 */
|
||||
#define LL_WWDG_PRESCALER_8 (WWDG_CFR_WDGTB_0 | WWDG_CFR_WDGTB_1) /*!< WWDG counter clock = (PCLK1/4096)/8 */
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ HAL Driver F1 | CMSIS Device F1 | CMSIS Core | Was delivered in the full MCU pac
|
|||
------------- | --------------- | ---------- | -------------------------------------
|
||||
Tag v1.1.4 | Tag v4.3.1 | Tag v5.4.0_cm3 | Tag v1.8.0 (and following, if any, till next new tag)
|
||||
Tag v1.1.5 | Tag v4.3.1 | Tag v5.4.0_cm3 | Tag v1.8.1 (and following, if any, till next new tag)
|
||||
Tag v1.1.6 | Tag v4.3.2 | Tag v5.4.0_cm3 | Tag v1.8.2 (and following, if any, till next new tag)
|
||||
|
||||
The full **STM32CubeF1** MCU package is available [here](https://github.com/STMicroelectronics/STM32CubeF1).
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ This software component is licensed by ST under BSD 3-Clause license, the “Lic
|
|||
<div class="col-sm-12 col-lg-8">
|
||||
<h1 id="update-history"><strong>Update History</strong></h1>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section1_1_5" aria-hidden="true"> <label for="collapse-section1_1_5" aria-hidden="true"><strong>V1.1.5 / 30-July-2020</strong></label>
|
||||
<input type="checkbox" id="collapse-section1_1_6" checked aria-hidden="true"> <label for="collapse-section1_1_6" aria-hidden="true"><strong>V1.1.6 / 07-September-2020</strong></label>
|
||||
<div>
|
||||
<h2 id="main-changes">Main Changes</h2>
|
||||
<ul>
|
||||
|
|
@ -46,6 +46,189 @@ This software component is licensed by ST under BSD 3-Clause license, the “Lic
|
|||
</ul>
|
||||
<h2 id="contents">Contents</h2>
|
||||
<ul>
|
||||
<li><strong>HAL/LL ADC</strong> driver
|
||||
<ul>
|
||||
<li>Update HAL_ADC_Stop_DMA() API to check if DMA state is Busy before calling HAL_DMA_Abort() API to avoid DMA internal error.</li>
|
||||
<li>update LL_ADC_REG_Init() API to avoid enabling continuous mode and discontinuous mode simultaneously.</li>
|
||||
</ul></li>
|
||||
<li><strong>HAL/LL GPIO</strong> driver
|
||||
<ul>
|
||||
<li>Update HAL_GPIO_TogglePin() API to allow multi Pin’s toggling.</li>
|
||||
<li>Update LL_GPIO_TogglePin() API to improve robustness: use BSRR register instead of ODR register.</li>
|
||||
<li>Update LL GPIO initialization sequence to avoid unwanted pulse on GPIO Pin’s</li>
|
||||
</ul></li>
|
||||
<li><strong>HAL/LL I2S</strong> driver
|
||||
<ul>
|
||||
<li>Update HAL_I2S_DMAStop() API to be more safe
|
||||
<ul>
|
||||
<li>Add a check on BSY, TXE and RXNE flags before disabling the I2S</li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
<li><strong>HAL/LL SPI</strong> driver
|
||||
<ul>
|
||||
<li>Update SPI_DMAReceiveCplt() API to handle efficiently the repeated transfers.
|
||||
<ul>
|
||||
<li>Disable TX DMA request only in bidirectional receive mode</li>
|
||||
</ul></li>
|
||||
<li>Update HAL_SPI_Init() API
|
||||
<ul>
|
||||
<li>To avoid setting the BaudRatePrescaler in case of Slave Motorola Mode</li>
|
||||
<li>Use the bit-mask for SPI configuration</li>
|
||||
</ul></li>
|
||||
<li>Update Transmit/Receive processes in half-duplex mode
|
||||
<ul>
|
||||
<li>Disable the SPI instance before setting BDIOE bit</li>
|
||||
</ul></li>
|
||||
<li>Fix wrong timeout management
|
||||
<ul>
|
||||
<li>Calculate Timeout based on a software loop to avoid blocking issue if Systick is disabled</li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
<li><strong>HAL NOR</strong> driver
|
||||
<ul>
|
||||
<li>Update address calculation in HAL_NOR_ProgramBuffer()</li>
|
||||
<li>Apply adequate commands according to the command set field value
|
||||
<ul>
|
||||
<li>command set 1 for Micron JS28F512P33</li>
|
||||
<li>command set 2 for Micron M29W128G and Cypress S29GL128P</li>
|
||||
</ul></li>
|
||||
<li>Add new commands operations:
|
||||
<ul>
|
||||
<li>NOR_CMD_READ_ARRAY</li>
|
||||
<li>NOR_CMD_WORD_PROGRAM</li>
|
||||
<li>NOR_CMD_BUFFERED_PROGRAM</li>
|
||||
<li>NOR_CMD_CONFIRM</li>
|
||||
<li>NOR_CMD_BLOCK_ERASE</li>
|
||||
<li>NOR_CMD_BLOCK_UNLOCK</li>
|
||||
<li>NOR_CMD_READ_STATUS_REG</li>
|
||||
<li>NOR_CMD_CLEAR_STATUS_REG</li>
|
||||
</ul></li>
|
||||
<li>Update some APIs in order to be compliant for memories with another command set.
|
||||
<ul>
|
||||
<li>HAL_NOR_Init()</li>
|
||||
<li>HAL_NOR_Read_ID()</li>
|
||||
<li>HAL_NOR_ReturnToReadMode()</li>
|
||||
<li>HAL_NOR_Read()</li>
|
||||
<li>HAL_NOR_Program()</li>
|
||||
<li>HAL_NOR_ReadBuffer()</li>
|
||||
<li>HAL_NOR_ProgramBuffer()</li>
|
||||
<li>HAL_NOR_Erase_Block()</li>
|
||||
<li>HAL_NOR_Erase_Chip()</li>
|
||||
<li>HAL_NOR_GetStatus()</li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
<li><strong>HAL SRAM</strong> driver
|
||||
<ul>
|
||||
<li>General update to enhance HAL SRAM driver robustness
|
||||
<ul>
|
||||
<li>Update HAL_SRAM_Init() API to avoid activation of burst access for SRAM</li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
<li><strong>HAL FSMC</strong> driver
|
||||
<ul>
|
||||
<li>Update FSMC_NORSRAM_Init() API in order to resolve compilation issue with MS Visual 2017</li>
|
||||
<li>Update FSMC_NORSRAM_Extended_Timing_Init() API in order to manage Bus turnaround phase duration FSMC_BWTR1_BUSTURN availability.</li>
|
||||
</ul></li>
|
||||
<li><strong>LL UTILS</strong> driver
|
||||
<ul>
|
||||
<li>UTILS_SetFlashLatency() API renamed to LL_SetFlashLatency() and set exportable.</li>
|
||||
</ul></li>
|
||||
<li><strong>HAL/LL IWDG</strong> driver
|
||||
<ul>
|
||||
<li>Update HAL_IWDG_DEFAULT_TIMEOUT define value to consider LSI value instead of hardcoded value.</li>
|
||||
</ul></li>
|
||||
<li><strong>HAL/LL TIM</strong> driver
|
||||
<ul>
|
||||
<li>Align HAL/LL TIM driver with latest updates and enhancements</li>
|
||||
<li>Update Encoder interface mode to keep TIM_CCER_CCxNP bits low
|
||||
<ul>
|
||||
<li>Add TIM_ENCODERINPUTPOLARITY_RISING and TIM_ENCODERINPUTPOLARITY_FALLING definitions to determine encoder input polarity.</li>
|
||||
<li>Add IS_TIM_ENCODERINPUT_POLARITY() macro to check the encoder input polarity.</li>
|
||||
<li>Update HAL_TIM_Encoder_Init() API</li>
|
||||
<li>Replace IS_TIM_IC_POLARITY() macro by IS_TIM_ENCODERINPUT_POLARITY() macro.</li>
|
||||
</ul></li>
|
||||
<li>Fix bug when using multiple DMA request to different channels of same timer
|
||||
<ul>
|
||||
<li>Introduce DMA burst state management mechanism
|
||||
<ul>
|
||||
<li>Add a new structure for DMA Burst States definition : HAL_TIM_DMABurstStateTypeDef</li>
|
||||
<li>Update __HAL_TIM_RESET_HANDLE_STATE to support DMABurstState</li>
|
||||
<li>Add a new API HAL_TIM_DMABurstState() to get the actual state of a DMA burst operation</li>
|
||||
<li>Add DMABurstState, the DMA burst operation state, in the TIM_HandleTypeDef structure</li>
|
||||
<li>Add new API TIM_DMAErrorCCxN() for TIM DMA error callback (complementary channel)</li>
|
||||
<li>Add new API TIM_DMADelayPulseNCplt() for TIM DMA Delay Pulse complete callback (complementary channel)</li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
<li>Implement TIM channel state management mechanism
|
||||
<ul>
|
||||
<li>Add new macro
|
||||
<ul>
|
||||
<li>TIM_CHANNEL_STATE_SET_ALL and TIM_CHANNEL_N_STATE_SET_ALL</li>
|
||||
<li>TIM_CHANNEL_STATE_SET and TIM_CHANNEL_N_STATE_SET</li>
|
||||
<li>TIM_CHANNEL_STATE_GET and TIM_CHANNEL_N_STATE_GET</li>
|
||||
</ul></li>
|
||||
<li>Add new API HAL_TIM_GetActiveChannel()</li>
|
||||
<li>Add new API HAL_TIM_GetChannelState() to get actual state of the TIM channel</li>
|
||||
<li>Add a new structure for TIM channel States definition : HAL_TIM_ChannelStateTypeDef</li>
|
||||
<li>Update __HAL_TIM_RESET_HANDLE_STATE to support ChannelState and ChannelNState</li>
|
||||
<li>Add a new element in the TIM_HandleTypeDef structure : ChannelState to manage TIM channel operation state</li>
|
||||
<li>Add a new element in the TIM_HandleTypeDef structure : ChannelNState to manage TIM complementary channel operation state</li>
|
||||
</ul></li>
|
||||
<li>Update HAL_TIMEx_MasterConfigSynchronization() API to avoid functional errors and assert fails when using some TIM instances as input trigger.
|
||||
<ul>
|
||||
<li>Replace IS_TIM_SYNCHRO_INSTANCE() macro by IS_TIM_MASTER_INSTANCE() macro.</li>
|
||||
<li>Add IS_TIM_SLAVE_INSTANCE() macro to check on TIM_SMCR_MSM bit.</li>
|
||||
</ul></li>
|
||||
<li>Remove ‘register’ storage class specifier from LL TIM driver.</li>
|
||||
<li>Add new API HAL_TIM_DMABurst_MultiWriteStart() allowing to configure the DMA Burst to transfer multiple Data from the memory to the TIM peripheral</li>
|
||||
<li>Add new API HAL_TIM_DMABurst_MultiReadStart() allowing to configure the DMA Burst to transfer Data from the TIM peripheral to the memory</li>
|
||||
</ul></li>
|
||||
<li><strong>HAL/LL UART</strong> driver
|
||||
<ul>
|
||||
<li>Update UART polling processes to handle efficiently the Lock mechanism
|
||||
<ul>
|
||||
<li>Move the process unlock at the top of the HAL_UART_Receive() and HAL_UART_Transmit() API.</li>
|
||||
</ul></li>
|
||||
<li>Update UART polling and interruption processes to fix issues related to accesses out of user specified buffer.
|
||||
<ul>
|
||||
<li>Update UART_Transmit_IT(), UART_Receive_IT(), HAL_UART_Transmit() and HAL_UART_Receive() APIs.</li>
|
||||
</ul></li>
|
||||
<li>Update UART interruption handler to manage correctly the overrun interrupt
|
||||
<ul>
|
||||
<li>Add in the HAL_UART_IRQHandler() API a check on USART_CR1_RXNEIE bit when an overrun interrupt occurs.</li>
|
||||
</ul></li>
|
||||
<li>Update UART BRR calculation for ROM size gain</li>
|
||||
</ul></li>
|
||||
<li><strong>HAL/LL USART</strong> driver
|
||||
<ul>
|
||||
<li>Update USART interruption handler to manage correctly the overrun interrupt
|
||||
<ul>
|
||||
<li>Add in the HAL_USART_IRQHandler() API a check on USART_CR1_RXNEIE bit when an overrun interrupt occurs.</li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
<li><strong>HAL SMARTCARD</strong> driver
|
||||
<ul>
|
||||
<li>Update SMARTCARD interruption handler to manage correctly the overrun interrupt
|
||||
<ul>
|
||||
<li>Add in the HAL_SMARTCARD_IRQHandler() API a check on USART_CR1_RXNEIE bit when an overrun interrupt occurs.</li>
|
||||
</ul></li>
|
||||
<li>Update SMARTCARD transmission and reception API to handle memory corruption
|
||||
<ul>
|
||||
<li>HAL_SMARTCARD_Transmit(), HAL_SMARTCARD_Receive(), HAL_SMARTCARD_Transmit_IT() and HAL_SMARTCARD_Receive_IT()</li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section1_1_5" aria-hidden="true"> <label for="collapse-section1_1_5" aria-hidden="true"><strong>V1.1.5 / 30-July-2020</strong></label>
|
||||
<div>
|
||||
<h2 id="main-changes-1">Main Changes</h2>
|
||||
<ul>
|
||||
<li>General updates to fix known defects and enhancements implementation</li>
|
||||
</ul>
|
||||
<h2 id="contents-1">Contents</h2>
|
||||
<ul>
|
||||
<li><strong>HAL</strong> driver
|
||||
<ul>
|
||||
<li>Enhance HAL_SetTickFreq() API robustness
|
||||
|
|
@ -97,7 +280,7 @@ This software component is licensed by ST under BSD 3-Clause license, the “Lic
|
|||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section11" aria-hidden="true"> <label for="collapse-section11" aria-hidden="true"><strong>V1.1.4 / 26-June-2019</strong></label>
|
||||
<div>
|
||||
<h2 id="main-changes-1">Main Changes</h2>
|
||||
<h2 id="main-changes-2">Main Changes</h2>
|
||||
<ul>
|
||||
<li>General updates to fix known defects and enhancements implementation</li>
|
||||
<li>Add support of HAL callback registration feature</li>
|
||||
|
|
@ -304,7 +487,7 @@ This software component is licensed by ST under BSD 3-Clause license, the “Lic
|
|||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section10" aria-hidden="true"> <label for="collapse-section10" aria-hidden="true"><strong>V1.1.3 / 09-October-2018</strong></label>
|
||||
<div>
|
||||
<h2 id="main-changes-2">Main Changes</h2>
|
||||
<h2 id="main-changes-3">Main Changes</h2>
|
||||
<ul>
|
||||
<li><strong>Maintenance release to fix known defects and enhancements implementation</strong></li>
|
||||
<li><strong>Generic drivers changes</strong></li>
|
||||
|
|
@ -347,7 +530,7 @@ This software component is licensed by ST under BSD 3-Clause license, the “Lic
|
|||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section9" aria-hidden="true"> <label for="collapse-section9" aria-hidden="true"><strong>V1.1.2 / 09-March-2018</strong></label>
|
||||
<div>
|
||||
<h2 id="main-changes-3">Main Changes</h2>
|
||||
<h2 id="main-changes-4">Main Changes</h2>
|
||||
<ul>
|
||||
<li>General updates to fix known defects and enhancements implementation</li>
|
||||
<li>Remove Date and version from header files</li>
|
||||
|
|
@ -425,7 +608,7 @@ This software component is licensed by ST under BSD 3-Clause license, the “Lic
|
|||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section8" aria-hidden="true"> <label for="collapse-section8" aria-hidden="true"><strong>V1.1.1 / 12-May-2017</strong></label>
|
||||
<div>
|
||||
<h2 id="main-changes-4">Main Changes</h2>
|
||||
<h2 id="main-changes-5">Main Changes</h2>
|
||||
<ul>
|
||||
<li>General updates to fix known defects and enhancements implementation</li>
|
||||
<li><strong>HAL Generic</strong> update
|
||||
|
|
@ -451,7 +634,7 @@ This software component is licensed by ST under BSD 3-Clause license, the “Lic
|
|||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section7" aria-hidden="true"> <label for="collapse-section7" aria-hidden="true"><strong>V1.1.0 / 14-April-2017</strong></label>
|
||||
<div>
|
||||
<h2 id="main-changes-5">Main Changes</h2>
|
||||
<h2 id="main-changes-6">Main Changes</h2>
|
||||
<ul>
|
||||
<li><strong>Add Low Layer drivers allowing performance and footprint optimization</strong>
|
||||
<ul>
|
||||
|
|
@ -733,7 +916,7 @@ This software component is licensed by ST under BSD 3-Clause license, the “Lic
|
|||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section6" aria-hidden="true"> <label for="collapse-section6" aria-hidden="true"><strong>V1.0.5 / 06-December-2016</strong></label>
|
||||
<div>
|
||||
<h2 id="main-changes-6">Main Changes</h2>
|
||||
<h2 id="main-changes-7">Main Changes</h2>
|
||||
<ul>
|
||||
<li>General updates to fix mainly known I2C defects and enhancements implementation</li>
|
||||
<li><strong>The following changes done on the HAL drivers require an update on the application code based on HAL V1.0.4</strong>
|
||||
|
|
@ -829,7 +1012,7 @@ This software component is licensed by ST under BSD 3-Clause license, the “Lic
|
|||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section5" aria-hidden="true"> <label for="collapse-section5" aria-hidden="true"><strong>V1.0.4 / 29-April-2016</strong></label>
|
||||
<div>
|
||||
<h2 id="main-changes-7">Main Changes</h2>
|
||||
<h2 id="main-changes-8">Main Changes</h2>
|
||||
<ul>
|
||||
<li>General updates to fix known defects and enhancements implementation.</li>
|
||||
<li><strong>HAL RCC</strong>
|
||||
|
|
@ -869,7 +1052,7 @@ This software component is licensed by ST under BSD 3-Clause license, the “Lic
|
|||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section4" aria-hidden="true"> <label for="collapse-section4" aria-hidden="true"><strong>V1.0.3 / 11-January-2016</strong></label>
|
||||
<div>
|
||||
<h2 id="main-changes-8">Main Changes</h2>
|
||||
<h2 id="main-changes-9">Main Changes</h2>
|
||||
<ul>
|
||||
<li>Remove the #if defined(USE_HAL_LEGACY) condition to include Legacy/stm32_hal_legacy.h by default, in stm32f1xx_hal_def.h.</li>
|
||||
</ul>
|
||||
|
|
@ -878,7 +1061,7 @@ This software component is licensed by ST under BSD 3-Clause license, the “Lic
|
|||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section3" aria-hidden="true"> <label for="collapse-section3" aria-hidden="true"><strong>V1.0.2 / 18-December-2015</strong></label>
|
||||
<div>
|
||||
<h2 id="main-changes-9">Main Changes</h2>
|
||||
<h2 id="main-changes-10">Main Changes</h2>
|
||||
<ul>
|
||||
<li>General updates to fix known defects and enhancements implementation.</li>
|
||||
<li><strong>HAL generic</strong>
|
||||
|
|
@ -964,7 +1147,7 @@ This software component is licensed by ST under BSD 3-Clause license, the “Lic
|
|||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section2" aria-hidden="true"> <label for="collapse-section2" aria-hidden="true"><strong>V1.0.1 / 31-July-2015</strong></label>
|
||||
<div>
|
||||
<h2 id="main-changes-10">Main Changes</h2>
|
||||
<h2 id="main-changes-11">Main Changes</h2>
|
||||
<ul>
|
||||
<li>General updates to fix known defects and enhancements implementation.</li>
|
||||
<li><strong>HAL generic</strong>
|
||||
|
|
@ -1066,7 +1249,7 @@ This software component is licensed by ST under BSD 3-Clause license, the “Lic
|
|||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section1" aria-hidden="true"> <label for="collapse-section1" aria-hidden="true"><strong>V1.0.0 / 15-December-2014</strong></label>
|
||||
<div>
|
||||
<h2 id="main-changes-11">Main Changes</h2>
|
||||
<h2 id="main-changes-12">Main Changes</h2>
|
||||
<ul>
|
||||
<li>First Official release of <strong>STM32F1xx HAL Drivers</strong> for all STM32F1 devices.</li>
|
||||
<li>This release is in line with <strong>STM32Cube Firmware specification Rev1.0</strong> document</li>
|
||||
|
|
|
|||
|
|
@ -53,11 +53,11 @@
|
|||
* @{
|
||||
*/
|
||||
/**
|
||||
* @brief STM32F1xx HAL Driver version number V1.1.5
|
||||
* @brief STM32F1xx HAL Driver version number V1.1.6
|
||||
*/
|
||||
#define __STM32F1xx_HAL_VERSION_MAIN (0x01U) /*!< [31:24] main version */
|
||||
#define __STM32F1xx_HAL_VERSION_SUB1 (0x01U) /*!< [23:16] sub1 version */
|
||||
#define __STM32F1xx_HAL_VERSION_SUB2 (0x05U) /*!< [15:8] sub2 version */
|
||||
#define __STM32F1xx_HAL_VERSION_SUB2 (0x06U) /*!< [15:8] sub2 version */
|
||||
#define __STM32F1xx_HAL_VERSION_RC (0x00U) /*!< [7:0] release candidate */
|
||||
#define __STM32F1xx_HAL_VERSION ((__STM32F1xx_HAL_VERSION_MAIN << 24)\
|
||||
|(__STM32F1xx_HAL_VERSION_SUB1 << 16)\
|
||||
|
|
|
|||
|
|
@ -1711,6 +1711,8 @@ HAL_StatusTypeDef HAL_ADC_Stop_DMA(ADC_HandleTypeDef* hadc)
|
|||
|
||||
/* Disable the DMA channel (in case of DMA in circular mode or stop while */
|
||||
/* DMA transfer is on going) */
|
||||
if (hadc->DMA_Handle->State == HAL_DMA_STATE_BUSY)
|
||||
{
|
||||
tmp_hal_status = HAL_DMA_Abort(hadc->DMA_Handle);
|
||||
|
||||
/* Check if DMA channel effectively disabled */
|
||||
|
|
@ -1727,6 +1729,7 @@ HAL_StatusTypeDef HAL_ADC_Stop_DMA(ADC_HandleTypeDef* hadc)
|
|||
SET_BIT(hadc->State, HAL_ADC_STATE_ERROR_DMA);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Process unlocked */
|
||||
__HAL_UNLOCK(hadc);
|
||||
|
|
|
|||
|
|
@ -486,17 +486,16 @@ void HAL_GPIO_WritePin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, GPIO_PinState Pin
|
|||
*/
|
||||
void HAL_GPIO_TogglePin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin)
|
||||
{
|
||||
uint32_t odr;
|
||||
|
||||
/* Check the parameters */
|
||||
assert_param(IS_GPIO_PIN(GPIO_Pin));
|
||||
|
||||
if ((GPIOx->ODR & GPIO_Pin) != 0x00u)
|
||||
{
|
||||
GPIOx->BRR = (uint32_t)GPIO_Pin;
|
||||
}
|
||||
else
|
||||
{
|
||||
GPIOx->BSRR = (uint32_t)GPIO_Pin;
|
||||
}
|
||||
/* get current Ouput Data Register value */
|
||||
odr = GPIOx->ODR;
|
||||
|
||||
/* Set selected pins that were at low level, and reset ones that were high */
|
||||
GPIOx->BSRR = ((odr & GPIO_Pin) << GPIO_NUMBER) | (~odr & GPIO_Pin);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -90,6 +90,10 @@
|
|||
(+) Pause the DMA Transfer using HAL_I2S_DMAPause()
|
||||
(+) Resume the DMA Transfer using HAL_I2S_DMAResume()
|
||||
(+) Stop the DMA Transfer using HAL_I2S_DMAStop()
|
||||
In Slave mode, if HAL_I2S_DMAStop is used to stop the communication, an error
|
||||
HAL_I2S_ERROR_BUSY_LINE_RX is raised as the master continue to transmit data.
|
||||
In this case __HAL_I2S_FLUSH_RX_DR macro must be used to flush the remaining data
|
||||
inside DR register and avoid using DeInit/Init process for the next transfer.
|
||||
|
||||
*** I2S HAL driver macros list ***
|
||||
===================================
|
||||
|
|
@ -101,6 +105,7 @@
|
|||
(+) __HAL_I2S_ENABLE_IT : Enable the specified I2S interrupts
|
||||
(+) __HAL_I2S_DISABLE_IT : Disable the specified I2S interrupts
|
||||
(+) __HAL_I2S_GET_FLAG: Check whether the specified I2S flag is set or not
|
||||
(+) __HAL_I2S_FLUSH_RX_DR: Read DR Register to Flush RX Data
|
||||
|
||||
[..]
|
||||
(@) You can refer to the I2S HAL driver header file for more useful macros
|
||||
|
|
@ -201,6 +206,7 @@
|
|||
|
||||
/* Private typedef -----------------------------------------------------------*/
|
||||
/* Private define ------------------------------------------------------------*/
|
||||
#define I2S_TIMEOUT_FLAG 100U /*!< Timeout 100 ms */
|
||||
/* Private macro -------------------------------------------------------------*/
|
||||
/* Private variables ---------------------------------------------------------*/
|
||||
/* Private function prototypes -----------------------------------------------*/
|
||||
|
|
@ -338,7 +344,7 @@ HAL_StatusTypeDef HAL_I2S_Init(I2S_HandleTypeDef *hi2s)
|
|||
/* I2S standard */
|
||||
if (hi2s->Init.Standard <= I2S_STANDARD_LSB)
|
||||
{
|
||||
/* In I2S standard packet lenght is multiplied by 2 */
|
||||
/* In I2S standard packet length is multiplied by 2 */
|
||||
packetlength = packetlength * 2U;
|
||||
}
|
||||
|
||||
|
|
@ -1369,10 +1375,8 @@ HAL_StatusTypeDef HAL_I2S_DMAStop(I2S_HandleTypeDef *hi2s)
|
|||
and the correspond call back is executed HAL_I2S_TxCpltCallback() or HAL_I2S_RxCpltCallback()
|
||||
*/
|
||||
|
||||
/* Disable the I2S Tx/Rx DMA requests */
|
||||
CLEAR_BIT(hi2s->Instance->CR2, SPI_CR2_TXDMAEN);
|
||||
CLEAR_BIT(hi2s->Instance->CR2, SPI_CR2_RXDMAEN);
|
||||
|
||||
if ((hi2s->Init.Mode == I2S_MODE_MASTER_TX) || (hi2s->Init.Mode == I2S_MODE_SLAVE_TX))
|
||||
{
|
||||
/* Abort the I2S DMA tx Stream/Channel */
|
||||
if (hi2s->hdmatx != NULL)
|
||||
{
|
||||
|
|
@ -1384,6 +1388,37 @@ HAL_StatusTypeDef HAL_I2S_DMAStop(I2S_HandleTypeDef *hi2s)
|
|||
}
|
||||
}
|
||||
|
||||
/* Wait until TXE flag is set */
|
||||
if (I2S_WaitFlagStateUntilTimeout(hi2s, I2S_FLAG_TXE, SET, I2S_TIMEOUT_FLAG) != HAL_OK)
|
||||
{
|
||||
/* Set the error code */
|
||||
SET_BIT(hi2s->ErrorCode, HAL_I2S_ERROR_TIMEOUT);
|
||||
hi2s->State = HAL_I2S_STATE_READY;
|
||||
errorcode = HAL_ERROR;
|
||||
}
|
||||
|
||||
/* Wait until BSY flag is Reset */
|
||||
if (I2S_WaitFlagStateUntilTimeout(hi2s, I2S_FLAG_BSY, RESET, I2S_TIMEOUT_FLAG) != HAL_OK)
|
||||
{
|
||||
/* Set the error code */
|
||||
SET_BIT(hi2s->ErrorCode, HAL_I2S_ERROR_TIMEOUT);
|
||||
hi2s->State = HAL_I2S_STATE_READY;
|
||||
errorcode = HAL_ERROR;
|
||||
}
|
||||
|
||||
/* Disable I2S peripheral */
|
||||
__HAL_I2S_DISABLE(hi2s);
|
||||
|
||||
/* Clear UDR flag */
|
||||
__HAL_I2S_CLEAR_UDRFLAG(hi2s);
|
||||
|
||||
/* Disable the I2S Tx DMA requests */
|
||||
CLEAR_BIT(hi2s->Instance->CR2, SPI_CR2_TXDMAEN);
|
||||
|
||||
}
|
||||
|
||||
else if ((hi2s->Init.Mode == I2S_MODE_MASTER_RX) || (hi2s->Init.Mode == I2S_MODE_SLAVE_RX))
|
||||
{
|
||||
/* Abort the I2S DMA rx Stream/Channel */
|
||||
if (hi2s->hdmarx != NULL)
|
||||
{
|
||||
|
|
@ -1398,6 +1433,28 @@ HAL_StatusTypeDef HAL_I2S_DMAStop(I2S_HandleTypeDef *hi2s)
|
|||
/* Disable I2S peripheral */
|
||||
__HAL_I2S_DISABLE(hi2s);
|
||||
|
||||
/* Clear OVR flag */
|
||||
__HAL_I2S_CLEAR_OVRFLAG(hi2s);
|
||||
|
||||
/* Disable the I2S Rx DMA request */
|
||||
CLEAR_BIT(hi2s->Instance->CR2, SPI_CR2_RXDMAEN);
|
||||
|
||||
if (hi2s->Init.Mode == I2S_MODE_SLAVE_RX)
|
||||
{
|
||||
/* Set the error code */
|
||||
SET_BIT(hi2s->ErrorCode, HAL_I2S_ERROR_BUSY_LINE_RX);
|
||||
|
||||
/* Set the I2S State ready */
|
||||
hi2s->State = HAL_I2S_STATE_READY;
|
||||
errorcode = HAL_ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Read DR to Flush RX Data */
|
||||
READ_REG((hi2s->Instance)->DR);
|
||||
}
|
||||
}
|
||||
|
||||
hi2s->State = HAL_I2S_STATE_READY;
|
||||
|
||||
return errorcode;
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@
|
|||
(+) The IWDG can be started by either software or hardware (configurable
|
||||
through option byte).
|
||||
|
||||
(+) The IWDG is clocked by Low-Speed clock (LSI) and thus stays active even
|
||||
if the main clock fails.
|
||||
(+) The IWDG is clocked by the Low-Speed Internal clock (LSI) and thus stays
|
||||
active even if the main clock fails.
|
||||
|
||||
(+) Once the IWDG is started, the LSI is forced ON and both cannot be
|
||||
disabled. The counter starts counting down from the reset value (0xFFF).
|
||||
|
|
@ -25,36 +25,47 @@
|
|||
generated (IWDG reset).
|
||||
|
||||
(+) Whenever the key value 0x0000 AAAA is written in the IWDG_KR register,
|
||||
the IWDG_RLR value is reloaded in the counter and the watchdog reset is
|
||||
prevented.
|
||||
the IWDG_RLR value is reloaded into the counter and the watchdog reset
|
||||
is prevented.
|
||||
|
||||
(+) The IWDG is implemented in the VDD voltage domain that is still functional
|
||||
in STOP and STANDBY mode (IWDG reset can wake-up from STANDBY).
|
||||
in STOP and STANDBY mode (IWDG reset can wake up the CPU from STANDBY).
|
||||
IWDGRST flag in RCC_CSR register can be used to inform when an IWDG
|
||||
reset occurs.
|
||||
|
||||
(+) Debug mode: When the microcontroller enters debug mode (core halted),
|
||||
the IWDG counter either continues to work normally or stops, depending
|
||||
on DBG_IWDG_STOP configuration bit in DBG module, accessible through
|
||||
__HAL_DBGMCU_FREEZE_IWDG() and __HAL_DBGMCU_UNFREEZE_IWDG() macros
|
||||
__HAL_DBGMCU_FREEZE_IWDG() and __HAL_DBGMCU_UNFREEZE_IWDG() macros.
|
||||
|
||||
[..] Min-max timeout value @32KHz (LSI): ~125us / ~32.7s
|
||||
The IWDG timeout may vary due to LSI frequency dispersion. STM32F1xx
|
||||
devices provide the capability to measure the LSI frequency (LSI clock
|
||||
connected internally to TIM5 CH4 input capture). The measured value
|
||||
can be used to have an IWDG timeout with an acceptable accuracy.
|
||||
The IWDG timeout may vary due to LSI clock frequency dispersion.
|
||||
STM32F1xx devices provide the capability to measure the LSI clock
|
||||
frequency (LSI clock is internally connected to TIM5 CH4 input capture).
|
||||
The measured value can be used to have an IWDG timeout with an
|
||||
acceptable accuracy.
|
||||
|
||||
[..] Default timeout value (necessary for IWDG_SR status register update):
|
||||
Constant LSI_VALUE is defined based on the nominal LSI clock frequency.
|
||||
This frequency being subject to variations as mentioned above, the
|
||||
default timeout value (defined through constant HAL_IWDG_DEFAULT_TIMEOUT
|
||||
below) may become too short or too long.
|
||||
In such cases, this default timeout value can be tuned by redefining
|
||||
the constant LSI_VALUE at user-application level (based, for instance,
|
||||
on the measured LSI clock frequency as explained above).
|
||||
|
||||
##### How to use this driver #####
|
||||
==============================================================================
|
||||
[..]
|
||||
(#) Use IWDG using HAL_IWDG_Init() function to :
|
||||
(++) Enable instance by writing Start keyword in IWDG_KEY register. LSI
|
||||
clock is forced ON and IWDG counter starts downcounting.
|
||||
(++) Enable write access to configuration register: IWDG_PR & IWDG_RLR.
|
||||
clock is forced ON and IWDG counter starts counting down.
|
||||
(++) Enable write access to configuration registers:
|
||||
IWDG_PR and IWDG_RLR.
|
||||
(++) Configure the IWDG prescaler and counter reload value. This reload
|
||||
value will be loaded in the IWDG counter each time the watchdog is
|
||||
reloaded, then the IWDG will start counting down from this value.
|
||||
(++) wait for status flags to be reset"
|
||||
(++) Wait for status flags to be reset.
|
||||
|
||||
(#) Then the application program must refresh the IWDG counter at regular
|
||||
intervals during normal operation to prevent an MCU reset, using
|
||||
|
|
@ -91,7 +102,7 @@
|
|||
*/
|
||||
|
||||
#ifdef HAL_IWDG_MODULE_ENABLED
|
||||
/** @defgroup IWDG IWDG
|
||||
/** @addtogroup IWDG
|
||||
* @brief IWDG HAL module driver.
|
||||
* @{
|
||||
*/
|
||||
|
|
@ -101,10 +112,14 @@
|
|||
/** @defgroup IWDG_Private_Defines IWDG Private Defines
|
||||
* @{
|
||||
*/
|
||||
/* Status register need 5 RC LSI divided by prescaler clock to be updated. With
|
||||
higher prescaler (256), and according to HSI variation, we need to wait at
|
||||
least 6 cycles so 48 ms. */
|
||||
#define HAL_IWDG_DEFAULT_TIMEOUT 48U
|
||||
/* Status register needs up to 5 LSI clock periods divided by the clock
|
||||
prescaler to be updated. The number of LSI clock periods is upper-rounded to
|
||||
6 for the timeout value calculation.
|
||||
The timeout value is also calculated using the highest prescaler (256) and
|
||||
the LSI_VALUE constant. The value of this constant can be changed by the user
|
||||
to take into account possible LSI clock period variations.
|
||||
The timeout value is multiplied by 1000 to be converted in milliseconds. */
|
||||
#define HAL_IWDG_DEFAULT_TIMEOUT ((6UL * 256UL * 1000UL) / LSI_VALUE)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -158,10 +173,11 @@ HAL_StatusTypeDef HAL_IWDG_Init(IWDG_HandleTypeDef *hiwdg)
|
|||
assert_param(IS_IWDG_PRESCALER(hiwdg->Init.Prescaler));
|
||||
assert_param(IS_IWDG_RELOAD(hiwdg->Init.Reload));
|
||||
|
||||
/* Enable IWDG. LSI is turned on automaticaly */
|
||||
/* Enable IWDG. LSI is turned on automatically */
|
||||
__HAL_IWDG_START(hiwdg);
|
||||
|
||||
/* Enable write access to IWDG_PR and IWDG_RLR registers by writing 0x5555 in KR */
|
||||
/* Enable write access to IWDG_PR and IWDG_RLR registers by writing
|
||||
0x5555 in KR */
|
||||
IWDG_ENABLE_WRITE_ACCESS(hiwdg);
|
||||
|
||||
/* Write to IWDG registers the Prescaler & Reload values to work with */
|
||||
|
|
@ -172,7 +188,7 @@ HAL_StatusTypeDef HAL_IWDG_Init(IWDG_HandleTypeDef *hiwdg)
|
|||
tickstart = HAL_GetTick();
|
||||
|
||||
/* Wait for register to be updated */
|
||||
while (hiwdg->Instance->SR != RESET)
|
||||
while (hiwdg->Instance->SR != 0x00u)
|
||||
{
|
||||
if ((HAL_GetTick() - tickstart) > HAL_IWDG_DEFAULT_TIMEOUT)
|
||||
{
|
||||
|
|
@ -191,6 +207,7 @@ HAL_StatusTypeDef HAL_IWDG_Init(IWDG_HandleTypeDef *hiwdg)
|
|||
* @}
|
||||
*/
|
||||
|
||||
|
||||
/** @addtogroup IWDG_Exported_Functions_Group2
|
||||
* @brief IO operation functions
|
||||
*
|
||||
|
|
@ -205,6 +222,7 @@ HAL_StatusTypeDef HAL_IWDG_Init(IWDG_HandleTypeDef *hiwdg)
|
|||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Refresh the IWDG.
|
||||
* @param hiwdg pointer to a IWDG_HandleTypeDef structure that contains
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -151,9 +151,35 @@
|
|||
#define NOR_CMD_DATA_BUFFER_AND_PROG_CONFIRM (uint8_t)0x29
|
||||
#define NOR_CMD_DATA_BLOCK_ERASE (uint8_t)0x30
|
||||
|
||||
#define NOR_CMD_READ_ARRAY (uint16_t)0x00FF
|
||||
#define NOR_CMD_WORD_PROGRAM (uint16_t)0x0040
|
||||
#define NOR_CMD_BUFFERED_PROGRAM (uint16_t)0x00E8
|
||||
#define NOR_CMD_CONFIRM (uint16_t)0x00D0
|
||||
#define NOR_CMD_BLOCK_ERASE (uint16_t)0x0020
|
||||
#define NOR_CMD_BLOCK_UNLOCK (uint16_t)0x0060
|
||||
#define NOR_CMD_READ_STATUS_REG (uint16_t)0x0070
|
||||
#define NOR_CMD_CLEAR_STATUS_REG (uint16_t)0x0050
|
||||
|
||||
/* Mask on NOR STATUS REGISTER */
|
||||
#define NOR_MASK_STATUS_DQ4 (uint16_t)0x0010
|
||||
#define NOR_MASK_STATUS_DQ5 (uint16_t)0x0020
|
||||
#define NOR_MASK_STATUS_DQ6 (uint16_t)0x0040
|
||||
#define NOR_MASK_STATUS_DQ7 (uint16_t)0x0080
|
||||
|
||||
/* Address of the primary command set */
|
||||
#define NOR_ADDRESS_COMMAND_SET (uint16_t)0x0013
|
||||
|
||||
/* Command set code assignment (defined in JEDEC JEP137B version may 2004) */
|
||||
#define NOR_INTEL_SHARP_EXT_COMMAND_SET (uint16_t)0x0001 /* Supported in this driver */
|
||||
#define NOR_AMD_FUJITSU_COMMAND_SET (uint16_t)0x0002 /* Supported in this driver */
|
||||
#define NOR_INTEL_STANDARD_COMMAND_SET (uint16_t)0x0003 /* Not Supported in this driver */
|
||||
#define NOR_AMD_FUJITSU_EXT_COMMAND_SET (uint16_t)0x0004 /* Not Supported in this driver */
|
||||
#define NOR_WINDBOND_STANDARD_COMMAND_SET (uint16_t)0x0006 /* Not Supported in this driver */
|
||||
#define NOR_MITSUBISHI_STANDARD_COMMAND_SET (uint16_t)0x0100 /* Not Supported in this driver */
|
||||
#define NOR_MITSUBISHI_EXT_COMMAND_SET (uint16_t)0x0101 /* Not Supported in this driver */
|
||||
#define NOR_PAGE_WRITE_COMMAND_SET (uint16_t)0x0102 /* Not Supported in this driver */
|
||||
#define NOR_INTEL_PERFORMANCE_COMMAND_SET (uint16_t)0x0200 /* Not Supported in this driver */
|
||||
#define NOR_INTEL_DATA_COMMAND_SET (uint16_t)0x0210 /* Not Supported in this driver */
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
|
@ -200,8 +226,11 @@ static uint32_t uwNORMemoryDataWidth = NOR_MEMORY_8B;
|
|||
* @param ExtTiming pointer to NOR extended mode timing structure
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_NOR_Init(NOR_HandleTypeDef *hnor, FSMC_NORSRAM_TimingTypeDef *Timing, FSMC_NORSRAM_TimingTypeDef *ExtTiming)
|
||||
HAL_StatusTypeDef HAL_NOR_Init(NOR_HandleTypeDef *hnor, FSMC_NORSRAM_TimingTypeDef *Timing,
|
||||
FSMC_NORSRAM_TimingTypeDef *ExtTiming)
|
||||
{
|
||||
uint32_t deviceaddress;
|
||||
|
||||
/* Check the NOR handle parameter */
|
||||
if (hnor == NULL)
|
||||
{
|
||||
|
|
@ -252,7 +281,29 @@ HAL_StatusTypeDef HAL_NOR_Init(NOR_HandleTypeDef *hnor, FSMC_NORSRAM_TimingTypeD
|
|||
/* Initialize the NOR controller state */
|
||||
hnor->State = HAL_NOR_STATE_READY;
|
||||
|
||||
return HAL_OK;
|
||||
/* Select the NOR device address */
|
||||
if (hnor->Init.NSBank == FSMC_NORSRAM_BANK1)
|
||||
{
|
||||
deviceaddress = NOR_MEMORY_ADRESS1;
|
||||
}
|
||||
else if (hnor->Init.NSBank == FSMC_NORSRAM_BANK2)
|
||||
{
|
||||
deviceaddress = NOR_MEMORY_ADRESS2;
|
||||
}
|
||||
else if (hnor->Init.NSBank == FSMC_NORSRAM_BANK3)
|
||||
{
|
||||
deviceaddress = NOR_MEMORY_ADRESS3;
|
||||
}
|
||||
else /* FSMC_NORSRAM_BANK4 */
|
||||
{
|
||||
deviceaddress = NOR_MEMORY_ADRESS4;
|
||||
}
|
||||
|
||||
/* Get the value of the command set */
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_FIRST_CFI), NOR_CMD_DATA_CFI);
|
||||
hnor->CommandSet = *(__IO uint16_t *) NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_ADDRESS_COMMAND_SET);
|
||||
|
||||
return HAL_NOR_ReturnToReadMode(hnor);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -367,6 +418,7 @@ HAL_StatusTypeDef HAL_NOR_Read_ID(NOR_HandleTypeDef *hnor, NOR_IDTypeDef *pNOR_I
|
|||
{
|
||||
uint32_t deviceaddress;
|
||||
HAL_NOR_StateTypeDef state;
|
||||
HAL_StatusTypeDef status = HAL_OK;
|
||||
|
||||
/* Check the NOR controller state */
|
||||
state = hnor->State;
|
||||
|
|
@ -401,15 +453,30 @@ HAL_StatusTypeDef HAL_NOR_Read_ID(NOR_HandleTypeDef *hnor, NOR_IDTypeDef *pNOR_I
|
|||
}
|
||||
|
||||
/* Send read ID command */
|
||||
if (hnor->CommandSet == NOR_AMD_FUJITSU_COMMAND_SET)
|
||||
{
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_FIRST), NOR_CMD_DATA_FIRST);
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_SECOND), NOR_CMD_DATA_SECOND);
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_THIRD), NOR_CMD_DATA_AUTO_SELECT);
|
||||
}
|
||||
else if (hnor->CommandSet == NOR_INTEL_SHARP_EXT_COMMAND_SET)
|
||||
{
|
||||
NOR_WRITE(deviceaddress, NOR_CMD_DATA_AUTO_SELECT);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Primary command set not supported by the driver */
|
||||
status = HAL_ERROR;
|
||||
}
|
||||
|
||||
if (status != HAL_ERROR)
|
||||
{
|
||||
/* Read the NOR IDs */
|
||||
pNOR_ID->Manufacturer_Code = *(__IO uint16_t *) NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, MC_ADDRESS);
|
||||
pNOR_ID->Device_Code1 = *(__IO uint16_t *) NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, DEVICE_CODE1_ADDR);
|
||||
pNOR_ID->Device_Code2 = *(__IO uint16_t *) NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, DEVICE_CODE2_ADDR);
|
||||
pNOR_ID->Device_Code3 = *(__IO uint16_t *) NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, DEVICE_CODE3_ADDR);
|
||||
}
|
||||
|
||||
/* Check the NOR controller state */
|
||||
hnor->State = state;
|
||||
|
|
@ -422,7 +489,7 @@ HAL_StatusTypeDef HAL_NOR_Read_ID(NOR_HandleTypeDef *hnor, NOR_IDTypeDef *pNOR_I
|
|||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
return HAL_OK;
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -435,6 +502,7 @@ HAL_StatusTypeDef HAL_NOR_ReturnToReadMode(NOR_HandleTypeDef *hnor)
|
|||
{
|
||||
uint32_t deviceaddress;
|
||||
HAL_NOR_StateTypeDef state;
|
||||
HAL_StatusTypeDef status = HAL_OK;
|
||||
|
||||
/* Check the NOR controller state */
|
||||
state = hnor->State;
|
||||
|
|
@ -468,7 +536,19 @@ HAL_StatusTypeDef HAL_NOR_ReturnToReadMode(NOR_HandleTypeDef *hnor)
|
|||
deviceaddress = NOR_MEMORY_ADRESS4;
|
||||
}
|
||||
|
||||
if (hnor->CommandSet == NOR_AMD_FUJITSU_COMMAND_SET)
|
||||
{
|
||||
NOR_WRITE(deviceaddress, NOR_CMD_DATA_READ_RESET);
|
||||
}
|
||||
else if (hnor->CommandSet == NOR_INTEL_SHARP_EXT_COMMAND_SET)
|
||||
{
|
||||
NOR_WRITE(deviceaddress, NOR_CMD_READ_ARRAY);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Primary command set not supported by the driver */
|
||||
status = HAL_ERROR;
|
||||
}
|
||||
|
||||
/* Check the NOR controller state */
|
||||
hnor->State = state;
|
||||
|
|
@ -481,7 +561,7 @@ HAL_StatusTypeDef HAL_NOR_ReturnToReadMode(NOR_HandleTypeDef *hnor)
|
|||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
return HAL_OK;
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -496,6 +576,7 @@ HAL_StatusTypeDef HAL_NOR_Read(NOR_HandleTypeDef *hnor, uint32_t *pAddress, uint
|
|||
{
|
||||
uint32_t deviceaddress;
|
||||
HAL_NOR_StateTypeDef state;
|
||||
HAL_StatusTypeDef status = HAL_OK;
|
||||
|
||||
/* Check the NOR controller state */
|
||||
state = hnor->State;
|
||||
|
|
@ -530,12 +611,27 @@ HAL_StatusTypeDef HAL_NOR_Read(NOR_HandleTypeDef *hnor, uint32_t *pAddress, uint
|
|||
}
|
||||
|
||||
/* Send read data command */
|
||||
if (hnor->CommandSet == NOR_AMD_FUJITSU_COMMAND_SET)
|
||||
{
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_FIRST), NOR_CMD_DATA_FIRST);
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_SECOND), NOR_CMD_DATA_SECOND);
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_THIRD), NOR_CMD_DATA_READ_RESET);
|
||||
}
|
||||
else if (hnor->CommandSet == NOR_INTEL_SHARP_EXT_COMMAND_SET)
|
||||
{
|
||||
NOR_WRITE(pAddress, NOR_CMD_READ_ARRAY);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Primary command set not supported by the driver */
|
||||
status = HAL_ERROR;
|
||||
}
|
||||
|
||||
if (status != HAL_ERROR)
|
||||
{
|
||||
/* Read the data */
|
||||
*pData = (uint16_t)(*(__IO uint32_t *)pAddress);
|
||||
}
|
||||
|
||||
/* Check the NOR controller state */
|
||||
hnor->State = state;
|
||||
|
|
@ -548,7 +644,7 @@ HAL_StatusTypeDef HAL_NOR_Read(NOR_HandleTypeDef *hnor, uint32_t *pAddress, uint
|
|||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
return HAL_OK;
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -562,6 +658,7 @@ HAL_StatusTypeDef HAL_NOR_Read(NOR_HandleTypeDef *hnor, uint32_t *pAddress, uint
|
|||
HAL_StatusTypeDef HAL_NOR_Program(NOR_HandleTypeDef *hnor, uint32_t *pAddress, uint16_t *pData)
|
||||
{
|
||||
uint32_t deviceaddress;
|
||||
HAL_StatusTypeDef status = HAL_OK;
|
||||
|
||||
/* Check the NOR controller state */
|
||||
if (hnor->State == HAL_NOR_STATE_BUSY)
|
||||
|
|
@ -595,12 +692,27 @@ HAL_StatusTypeDef HAL_NOR_Program(NOR_HandleTypeDef *hnor, uint32_t *pAddress, u
|
|||
}
|
||||
|
||||
/* Send program data command */
|
||||
if (hnor->CommandSet == NOR_AMD_FUJITSU_COMMAND_SET)
|
||||
{
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_FIRST), NOR_CMD_DATA_FIRST);
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_SECOND), NOR_CMD_DATA_SECOND);
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_THIRD), NOR_CMD_DATA_PROGRAM);
|
||||
}
|
||||
else if (hnor->CommandSet == NOR_INTEL_SHARP_EXT_COMMAND_SET)
|
||||
{
|
||||
NOR_WRITE(pAddress, NOR_CMD_WORD_PROGRAM);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Primary command set not supported by the driver */
|
||||
status = HAL_ERROR;
|
||||
}
|
||||
|
||||
if (status != HAL_ERROR)
|
||||
{
|
||||
/* Write the data */
|
||||
NOR_WRITE(pAddress, *pData);
|
||||
}
|
||||
|
||||
/* Check the NOR controller state */
|
||||
hnor->State = HAL_NOR_STATE_READY;
|
||||
|
|
@ -613,7 +725,7 @@ HAL_StatusTypeDef HAL_NOR_Program(NOR_HandleTypeDef *hnor, uint32_t *pAddress, u
|
|||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
return HAL_OK;
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -625,11 +737,15 @@ HAL_StatusTypeDef HAL_NOR_Program(NOR_HandleTypeDef *hnor, uint32_t *pAddress, u
|
|||
* @param uwBufferSize number of Half word to read.
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_NOR_ReadBuffer(NOR_HandleTypeDef *hnor, uint32_t uwAddress, uint16_t *pData, uint32_t uwBufferSize)
|
||||
HAL_StatusTypeDef HAL_NOR_ReadBuffer(NOR_HandleTypeDef *hnor, uint32_t uwAddress, uint16_t *pData,
|
||||
uint32_t uwBufferSize)
|
||||
{
|
||||
uint32_t deviceaddress, size = uwBufferSize, address = uwAddress;
|
||||
uint32_t deviceaddress;
|
||||
uint32_t size = uwBufferSize;
|
||||
uint32_t address = uwAddress;
|
||||
uint16_t *data = pData;
|
||||
HAL_NOR_StateTypeDef state;
|
||||
HAL_StatusTypeDef status = HAL_OK;
|
||||
|
||||
/* Check the NOR controller state */
|
||||
state = hnor->State;
|
||||
|
|
@ -664,10 +780,24 @@ HAL_StatusTypeDef HAL_NOR_ReadBuffer(NOR_HandleTypeDef *hnor, uint32_t uwAddress
|
|||
}
|
||||
|
||||
/* Send read data command */
|
||||
if (hnor->CommandSet == NOR_AMD_FUJITSU_COMMAND_SET)
|
||||
{
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_FIRST), NOR_CMD_DATA_FIRST);
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_SECOND), NOR_CMD_DATA_SECOND);
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_THIRD), NOR_CMD_DATA_READ_RESET);
|
||||
}
|
||||
else if (hnor->CommandSet == NOR_INTEL_SHARP_EXT_COMMAND_SET)
|
||||
{
|
||||
NOR_WRITE(deviceaddress, NOR_CMD_READ_ARRAY);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Primary command set not supported by the driver */
|
||||
status = HAL_ERROR;
|
||||
}
|
||||
|
||||
if (status != HAL_ERROR)
|
||||
{
|
||||
/* Read buffer */
|
||||
while (size > 0U)
|
||||
{
|
||||
|
|
@ -676,6 +806,7 @@ HAL_StatusTypeDef HAL_NOR_ReadBuffer(NOR_HandleTypeDef *hnor, uint32_t uwAddress
|
|||
address += 2U;
|
||||
size--;
|
||||
}
|
||||
}
|
||||
|
||||
/* Check the NOR controller state */
|
||||
hnor->State = state;
|
||||
|
|
@ -688,7 +819,7 @@ HAL_StatusTypeDef HAL_NOR_ReadBuffer(NOR_HandleTypeDef *hnor, uint32_t uwAddress
|
|||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
return HAL_OK;
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -700,12 +831,14 @@ HAL_StatusTypeDef HAL_NOR_ReadBuffer(NOR_HandleTypeDef *hnor, uint32_t uwAddress
|
|||
* @param uwBufferSize Size of the buffer to write
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_NOR_ProgramBuffer(NOR_HandleTypeDef *hnor, uint32_t uwAddress, uint16_t *pData, uint32_t uwBufferSize)
|
||||
HAL_StatusTypeDef HAL_NOR_ProgramBuffer(NOR_HandleTypeDef *hnor, uint32_t uwAddress, uint16_t *pData,
|
||||
uint32_t uwBufferSize)
|
||||
{
|
||||
uint16_t *p_currentaddress;
|
||||
const uint16_t *p_endaddress;
|
||||
uint16_t *data = pData;
|
||||
uint32_t lastloadedaddress, deviceaddress;
|
||||
uint32_t deviceaddress;
|
||||
HAL_StatusTypeDef status = HAL_OK;
|
||||
|
||||
/* Check the NOR controller state */
|
||||
if (hnor->State == HAL_NOR_STATE_BUSY)
|
||||
|
|
@ -739,31 +872,51 @@ HAL_StatusTypeDef HAL_NOR_ProgramBuffer(NOR_HandleTypeDef *hnor, uint32_t uwAddr
|
|||
}
|
||||
|
||||
/* Initialize variables */
|
||||
p_currentaddress = (uint16_t *)(uwAddress);
|
||||
p_endaddress = (const uint16_t *)(uwAddress + (uwBufferSize - 1U));
|
||||
lastloadedaddress = uwAddress;
|
||||
p_currentaddress = (uint16_t *)(deviceaddress + uwAddress);
|
||||
p_endaddress = (uint16_t *)(deviceaddress + uwAddress + (2U * (uwBufferSize - 1U)));
|
||||
|
||||
if (hnor->CommandSet == NOR_AMD_FUJITSU_COMMAND_SET)
|
||||
{
|
||||
/* Issue unlock command sequence */
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_FIRST), NOR_CMD_DATA_FIRST);
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_SECOND), NOR_CMD_DATA_SECOND);
|
||||
|
||||
/* Write Buffer Load Command */
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, uwAddress), NOR_CMD_DATA_BUFFER_AND_PROG);
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, uwAddress), (uint16_t)(uwBufferSize - 1U));
|
||||
NOR_WRITE((deviceaddress + uwAddress), NOR_CMD_DATA_BUFFER_AND_PROG);
|
||||
NOR_WRITE((deviceaddress + uwAddress), (uint16_t)(uwBufferSize - 1U));
|
||||
}
|
||||
else if (hnor->CommandSet == NOR_INTEL_SHARP_EXT_COMMAND_SET)
|
||||
{
|
||||
/* Write Buffer Load Command */
|
||||
NOR_WRITE((deviceaddress + uwAddress), NOR_CMD_BUFFERED_PROGRAM);
|
||||
NOR_WRITE((deviceaddress + uwAddress), (uint16_t)(uwBufferSize - 1U));
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Primary command set not supported by the driver */
|
||||
status = HAL_ERROR;
|
||||
}
|
||||
|
||||
if (status != HAL_ERROR)
|
||||
{
|
||||
/* Load Data into NOR Buffer */
|
||||
while (p_currentaddress <= p_endaddress)
|
||||
{
|
||||
/* Store last loaded address & data value (for polling) */
|
||||
lastloadedaddress = (uint32_t)p_currentaddress;
|
||||
|
||||
NOR_WRITE(p_currentaddress, *data);
|
||||
|
||||
data++;
|
||||
p_currentaddress ++;
|
||||
}
|
||||
|
||||
NOR_WRITE((uint32_t)(lastloadedaddress), NOR_CMD_DATA_BUFFER_AND_PROG_CONFIRM);
|
||||
if (hnor->CommandSet == NOR_AMD_FUJITSU_COMMAND_SET)
|
||||
{
|
||||
NOR_WRITE((deviceaddress + uwAddress), NOR_CMD_DATA_BUFFER_AND_PROG_CONFIRM);
|
||||
}
|
||||
else /* => hnor->CommandSet == NOR_INTEL_SHARP_EXT_COMMAND_SET */
|
||||
{
|
||||
NOR_WRITE((deviceaddress + uwAddress), NOR_CMD_CONFIRM);
|
||||
}
|
||||
}
|
||||
|
||||
/* Check the NOR controller state */
|
||||
hnor->State = HAL_NOR_STATE_READY;
|
||||
|
|
@ -776,7 +929,7 @@ HAL_StatusTypeDef HAL_NOR_ProgramBuffer(NOR_HandleTypeDef *hnor, uint32_t uwAddr
|
|||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
return HAL_OK;
|
||||
return status;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -791,6 +944,7 @@ HAL_StatusTypeDef HAL_NOR_ProgramBuffer(NOR_HandleTypeDef *hnor, uint32_t uwAddr
|
|||
HAL_StatusTypeDef HAL_NOR_Erase_Block(NOR_HandleTypeDef *hnor, uint32_t BlockAddress, uint32_t Address)
|
||||
{
|
||||
uint32_t deviceaddress;
|
||||
HAL_StatusTypeDef status = HAL_OK;
|
||||
|
||||
/* Check the NOR controller state */
|
||||
if (hnor->State == HAL_NOR_STATE_BUSY)
|
||||
|
|
@ -824,12 +978,30 @@ HAL_StatusTypeDef HAL_NOR_Erase_Block(NOR_HandleTypeDef *hnor, uint32_t BlockAdd
|
|||
}
|
||||
|
||||
/* Send block erase command sequence */
|
||||
if (hnor->CommandSet == NOR_AMD_FUJITSU_COMMAND_SET)
|
||||
{
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_FIRST), NOR_CMD_DATA_FIRST);
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_SECOND), NOR_CMD_DATA_SECOND);
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_THIRD), NOR_CMD_DATA_CHIP_BLOCK_ERASE_THIRD);
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_FOURTH), NOR_CMD_DATA_CHIP_BLOCK_ERASE_FOURTH);
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_FIFTH), NOR_CMD_DATA_CHIP_BLOCK_ERASE_FIFTH);
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_THIRD),
|
||||
NOR_CMD_DATA_CHIP_BLOCK_ERASE_THIRD);
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_FOURTH),
|
||||
NOR_CMD_DATA_CHIP_BLOCK_ERASE_FOURTH);
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_FIFTH),
|
||||
NOR_CMD_DATA_CHIP_BLOCK_ERASE_FIFTH);
|
||||
NOR_WRITE((uint32_t)(BlockAddress + Address), NOR_CMD_DATA_BLOCK_ERASE);
|
||||
}
|
||||
else if (hnor->CommandSet == NOR_INTEL_SHARP_EXT_COMMAND_SET)
|
||||
{
|
||||
NOR_WRITE((BlockAddress + Address), NOR_CMD_BLOCK_UNLOCK);
|
||||
NOR_WRITE((BlockAddress + Address), NOR_CMD_CONFIRM);
|
||||
NOR_WRITE((BlockAddress + Address), NOR_CMD_BLOCK_ERASE);
|
||||
NOR_WRITE((BlockAddress + Address), NOR_CMD_CONFIRM);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Primary command set not supported by the driver */
|
||||
status = HAL_ERROR;
|
||||
}
|
||||
|
||||
/* Check the NOR memory status and update the controller state */
|
||||
hnor->State = HAL_NOR_STATE_READY;
|
||||
|
|
@ -842,7 +1014,7 @@ HAL_StatusTypeDef HAL_NOR_Erase_Block(NOR_HandleTypeDef *hnor, uint32_t BlockAdd
|
|||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
return HAL_OK;
|
||||
return status;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -856,6 +1028,7 @@ HAL_StatusTypeDef HAL_NOR_Erase_Block(NOR_HandleTypeDef *hnor, uint32_t BlockAdd
|
|||
HAL_StatusTypeDef HAL_NOR_Erase_Chip(NOR_HandleTypeDef *hnor, uint32_t Address)
|
||||
{
|
||||
uint32_t deviceaddress;
|
||||
HAL_StatusTypeDef status = HAL_OK;
|
||||
UNUSED(Address);
|
||||
|
||||
/* Check the NOR controller state */
|
||||
|
|
@ -890,12 +1063,23 @@ HAL_StatusTypeDef HAL_NOR_Erase_Chip(NOR_HandleTypeDef *hnor, uint32_t Address)
|
|||
}
|
||||
|
||||
/* Send NOR chip erase command sequence */
|
||||
if (hnor->CommandSet == NOR_AMD_FUJITSU_COMMAND_SET)
|
||||
{
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_FIRST), NOR_CMD_DATA_FIRST);
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_SECOND), NOR_CMD_DATA_SECOND);
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_THIRD), NOR_CMD_DATA_CHIP_BLOCK_ERASE_THIRD);
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_FOURTH), NOR_CMD_DATA_CHIP_BLOCK_ERASE_FOURTH);
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_FIFTH), NOR_CMD_DATA_CHIP_BLOCK_ERASE_FIFTH);
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_THIRD),
|
||||
NOR_CMD_DATA_CHIP_BLOCK_ERASE_THIRD);
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_FOURTH),
|
||||
NOR_CMD_DATA_CHIP_BLOCK_ERASE_FOURTH);
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_FIFTH),
|
||||
NOR_CMD_DATA_CHIP_BLOCK_ERASE_FIFTH);
|
||||
NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_SIXTH), NOR_CMD_DATA_CHIP_ERASE);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Primary command set not supported by the driver */
|
||||
status = HAL_ERROR;
|
||||
}
|
||||
|
||||
/* Check the NOR memory status and update the controller state */
|
||||
hnor->State = HAL_NOR_STATE_READY;
|
||||
|
|
@ -908,7 +1092,7 @@ HAL_StatusTypeDef HAL_NOR_Erase_Chip(NOR_HandleTypeDef *hnor, uint32_t Address)
|
|||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
return HAL_OK;
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -990,7 +1174,8 @@ HAL_StatusTypeDef HAL_NOR_Read_CFI(NOR_HandleTypeDef *hnor, NOR_CFITypeDef *pNOR
|
|||
* @param pCallback : pointer to the Callback function
|
||||
* @retval status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_NOR_RegisterCallback (NOR_HandleTypeDef *hnor, HAL_NOR_CallbackIDTypeDef CallbackId, pNOR_CallbackTypeDef pCallback)
|
||||
HAL_StatusTypeDef HAL_NOR_RegisterCallback(NOR_HandleTypeDef *hnor, HAL_NOR_CallbackIDTypeDef CallbackId,
|
||||
pNOR_CallbackTypeDef pCallback)
|
||||
{
|
||||
HAL_StatusTypeDef status = HAL_OK;
|
||||
HAL_NOR_StateTypeDef state;
|
||||
|
|
@ -1207,7 +1392,8 @@ HAL_NOR_StateTypeDef HAL_NOR_GetState(NOR_HandleTypeDef *hnor)
|
|||
HAL_NOR_StatusTypeDef HAL_NOR_GetStatus(NOR_HandleTypeDef *hnor, uint32_t Address, uint32_t Timeout)
|
||||
{
|
||||
HAL_NOR_StatusTypeDef status = HAL_NOR_STATUS_ONGOING;
|
||||
uint16_t tmpSR1, tmpSR2;
|
||||
uint16_t tmpsr1;
|
||||
uint16_t tmpsr2;
|
||||
uint32_t tickstart;
|
||||
|
||||
/* Poll on NOR memory Ready/Busy signal ------------------------------------*/
|
||||
|
|
@ -1217,6 +1403,9 @@ HAL_NOR_StatusTypeDef HAL_NOR_GetStatus(NOR_HandleTypeDef *hnor, uint32_t Addres
|
|||
|
||||
/* Get tick */
|
||||
tickstart = HAL_GetTick();
|
||||
|
||||
if (hnor->CommandSet == NOR_AMD_FUJITSU_COMMAND_SET)
|
||||
{
|
||||
while ((status != HAL_NOR_STATUS_SUCCESS) && (status != HAL_NOR_STATUS_TIMEOUT))
|
||||
{
|
||||
/* Check for the Timeout */
|
||||
|
|
@ -1229,33 +1418,69 @@ HAL_NOR_StatusTypeDef HAL_NOR_GetStatus(NOR_HandleTypeDef *hnor, uint32_t Addres
|
|||
}
|
||||
|
||||
/* Read NOR status register (DQ6 and DQ5) */
|
||||
tmpSR1 = *(__IO uint16_t *)Address;
|
||||
tmpSR2 = *(__IO uint16_t *)Address;
|
||||
tmpsr1 = *(__IO uint16_t *)Address;
|
||||
tmpsr2 = *(__IO uint16_t *)Address;
|
||||
|
||||
/* If DQ6 did not toggle between the two reads then return HAL_NOR_STATUS_SUCCESS */
|
||||
if ((tmpSR1 & NOR_MASK_STATUS_DQ6) == (tmpSR2 & NOR_MASK_STATUS_DQ6))
|
||||
if ((tmpsr1 & NOR_MASK_STATUS_DQ6) == (tmpsr2 & NOR_MASK_STATUS_DQ6))
|
||||
{
|
||||
return HAL_NOR_STATUS_SUCCESS ;
|
||||
}
|
||||
|
||||
if ((tmpSR1 & NOR_MASK_STATUS_DQ5) == NOR_MASK_STATUS_DQ5)
|
||||
if ((tmpsr1 & NOR_MASK_STATUS_DQ5) == NOR_MASK_STATUS_DQ5)
|
||||
{
|
||||
status = HAL_NOR_STATUS_ONGOING;
|
||||
}
|
||||
|
||||
tmpSR1 = *(__IO uint16_t *)Address;
|
||||
tmpSR2 = *(__IO uint16_t *)Address;
|
||||
tmpsr1 = *(__IO uint16_t *)Address;
|
||||
tmpsr2 = *(__IO uint16_t *)Address;
|
||||
|
||||
/* If DQ6 did not toggle between the two reads then return HAL_NOR_STATUS_SUCCESS */
|
||||
if ((tmpSR1 & NOR_MASK_STATUS_DQ6) == (tmpSR2 & NOR_MASK_STATUS_DQ6))
|
||||
if ((tmpsr1 & NOR_MASK_STATUS_DQ6) == (tmpsr2 & NOR_MASK_STATUS_DQ6))
|
||||
{
|
||||
return HAL_NOR_STATUS_SUCCESS;
|
||||
}
|
||||
if ((tmpSR1 & NOR_MASK_STATUS_DQ5) == NOR_MASK_STATUS_DQ5)
|
||||
if ((tmpsr1 & NOR_MASK_STATUS_DQ5) == NOR_MASK_STATUS_DQ5)
|
||||
{
|
||||
return HAL_NOR_STATUS_ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (hnor->CommandSet == NOR_INTEL_SHARP_EXT_COMMAND_SET)
|
||||
{
|
||||
do
|
||||
{
|
||||
NOR_WRITE(Address, NOR_CMD_READ_STATUS_REG);
|
||||
tmpsr2 = *(__IO uint16_t *)(Address);
|
||||
|
||||
/* Check for the Timeout */
|
||||
if (Timeout != HAL_MAX_DELAY)
|
||||
{
|
||||
if (((HAL_GetTick() - tickstart) > Timeout) || (Timeout == 0U))
|
||||
{
|
||||
return HAL_NOR_STATUS_TIMEOUT;
|
||||
}
|
||||
}
|
||||
} while ((tmpsr2 & NOR_MASK_STATUS_DQ7) == 0U);
|
||||
|
||||
NOR_WRITE(Address, NOR_CMD_READ_STATUS_REG);
|
||||
tmpsr1 = *(__IO uint16_t *)(Address);
|
||||
if ((tmpsr1 & (NOR_MASK_STATUS_DQ5 | NOR_MASK_STATUS_DQ4)) != 0U)
|
||||
{
|
||||
/* Clear the Status Register */
|
||||
NOR_WRITE(Address, NOR_CMD_READ_STATUS_REG);
|
||||
status = HAL_NOR_STATUS_ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
status = HAL_NOR_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Primary command set not supported by the driver */
|
||||
status = HAL_NOR_STATUS_ERROR;
|
||||
}
|
||||
|
||||
/* Return the operation status */
|
||||
return status;
|
||||
|
|
|
|||
|
|
@ -162,7 +162,8 @@
|
|||
* @param IOSpaceTiming IO space timing structure
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_PCCARD_Init(PCCARD_HandleTypeDef *hpccard, FSMC_NAND_PCC_TimingTypeDef *ComSpaceTiming, FSMC_NAND_PCC_TimingTypeDef *AttSpaceTiming, FSMC_NAND_PCC_TimingTypeDef *IOSpaceTiming)
|
||||
HAL_StatusTypeDef HAL_PCCARD_Init(PCCARD_HandleTypeDef *hpccard, FSMC_NAND_PCC_TimingTypeDef *ComSpaceTiming,
|
||||
FSMC_NAND_PCC_TimingTypeDef *AttSpaceTiming, FSMC_NAND_PCC_TimingTypeDef *IOSpaceTiming)
|
||||
{
|
||||
/* Check the PCCARD controller state */
|
||||
if (hpccard == NULL)
|
||||
|
|
@ -334,8 +335,7 @@ HAL_StatusTypeDef HAL_PCCARD_Read_ID(PCCARD_HandleTypeDef *hpccard, uint8_t Comp
|
|||
status = *(__IO uint8_t *)(PCCARD_IO_SPACE_PRIMARY_ADDR | ATA_STATUS_CMD_ALTERNATE);
|
||||
|
||||
timeout--;
|
||||
}
|
||||
while ((status != PCCARD_STATUS_OK) && timeout);
|
||||
} while ((status != PCCARD_STATUS_OK) && timeout);
|
||||
|
||||
if (timeout == 0U)
|
||||
{
|
||||
|
|
@ -368,7 +368,8 @@ HAL_StatusTypeDef HAL_PCCARD_Read_ID(PCCARD_HandleTypeDef *hpccard, uint8_t Comp
|
|||
* @param pStatus pointer to PCCARD status
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_PCCARD_Read_Sector(PCCARD_HandleTypeDef *hpccard, uint16_t *pBuffer, uint16_t SectorAddress, uint8_t *pStatus)
|
||||
HAL_StatusTypeDef HAL_PCCARD_Read_Sector(PCCARD_HandleTypeDef *hpccard, uint16_t *pBuffer, uint16_t SectorAddress,
|
||||
uint8_t *pStatus)
|
||||
{
|
||||
uint32_t timeout = PCCARD_TIMEOUT_READ_WRITE_SECTOR, index = 0U;
|
||||
uint8_t status = 0;
|
||||
|
|
@ -398,8 +399,7 @@ HAL_StatusTypeDef HAL_PCCARD_Read_Sector(PCCARD_HandleTypeDef *hpccard, uint16_t
|
|||
/* wait till the Status = 0x80 */
|
||||
status = *(__IO uint16_t *)(PCCARD_IO_SPACE_PRIMARY_ADDR | ATA_STATUS_CMD_ALTERNATE);
|
||||
timeout--;
|
||||
}
|
||||
while ((status == 0x80U) && timeout);
|
||||
} while ((status == 0x80U) && timeout);
|
||||
|
||||
if (timeout == 0U)
|
||||
{
|
||||
|
|
@ -413,8 +413,7 @@ HAL_StatusTypeDef HAL_PCCARD_Read_Sector(PCCARD_HandleTypeDef *hpccard, uint16_t
|
|||
/* wait till the Status = PCCARD_STATUS_OK */
|
||||
status = *(__IO uint16_t *)(PCCARD_IO_SPACE_PRIMARY_ADDR | ATA_STATUS_CMD_ALTERNATE);
|
||||
timeout--;
|
||||
}
|
||||
while ((status != PCCARD_STATUS_OK) && timeout);
|
||||
} while ((status != PCCARD_STATUS_OK) && timeout);
|
||||
|
||||
if (timeout == 0U)
|
||||
{
|
||||
|
|
@ -446,7 +445,8 @@ HAL_StatusTypeDef HAL_PCCARD_Read_Sector(PCCARD_HandleTypeDef *hpccard, uint16_t
|
|||
* @param pStatus pointer to PCCARD status
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_PCCARD_Write_Sector(PCCARD_HandleTypeDef *hpccard, uint16_t *pBuffer, uint16_t SectorAddress, uint8_t *pStatus)
|
||||
HAL_StatusTypeDef HAL_PCCARD_Write_Sector(PCCARD_HandleTypeDef *hpccard, uint16_t *pBuffer, uint16_t SectorAddress,
|
||||
uint8_t *pStatus)
|
||||
{
|
||||
uint32_t timeout = PCCARD_TIMEOUT_READ_WRITE_SECTOR, index = 0U;
|
||||
uint8_t status = 0;
|
||||
|
|
@ -476,8 +476,7 @@ HAL_StatusTypeDef HAL_PCCARD_Write_Sector(PCCARD_HandleTypeDef *hpccard, uint16_
|
|||
/* Wait till the Status = PCCARD_STATUS_OK */
|
||||
status = *(__IO uint8_t *)(PCCARD_IO_SPACE_PRIMARY_ADDR | ATA_STATUS_CMD_ALTERNATE);
|
||||
timeout--;
|
||||
}
|
||||
while ((status != PCCARD_STATUS_OK) && timeout);
|
||||
} while ((status != PCCARD_STATUS_OK) && timeout);
|
||||
|
||||
if (timeout == 0U)
|
||||
{
|
||||
|
|
@ -495,8 +494,7 @@ HAL_StatusTypeDef HAL_PCCARD_Write_Sector(PCCARD_HandleTypeDef *hpccard, uint16_
|
|||
/* Wait till the Status = PCCARD_STATUS_WRITE_OK */
|
||||
status = *(__IO uint8_t *)(PCCARD_IO_SPACE_PRIMARY_ADDR | ATA_STATUS_CMD_ALTERNATE);
|
||||
timeout--;
|
||||
}
|
||||
while ((status != PCCARD_STATUS_WRITE_OK) && timeout);
|
||||
} while ((status != PCCARD_STATUS_WRITE_OK) && timeout);
|
||||
|
||||
if (timeout == 0U)
|
||||
{
|
||||
|
|
@ -703,7 +701,8 @@ __weak void HAL_PCCARD_ITCallback(PCCARD_HandleTypeDef *hpccard)
|
|||
* @param pCallback : pointer to the Callback function
|
||||
* @retval status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_PCCARD_RegisterCallback (PCCARD_HandleTypeDef *hpccard, HAL_PCCARD_CallbackIDTypeDef CallbackId, pPCCARD_CallbackTypeDef pCallback)
|
||||
HAL_StatusTypeDef HAL_PCCARD_RegisterCallback(PCCARD_HandleTypeDef *hpccard, HAL_PCCARD_CallbackIDTypeDef CallbackId,
|
||||
pPCCARD_CallbackTypeDef pCallback)
|
||||
{
|
||||
HAL_StatusTypeDef status = HAL_OK;
|
||||
|
||||
|
|
|
|||
|
|
@ -755,7 +755,7 @@ HAL_StatusTypeDef HAL_SMARTCARD_UnRegisterCallback(SMARTCARD_HandleTypeDef *hsc,
|
|||
*/
|
||||
HAL_StatusTypeDef HAL_SMARTCARD_Transmit(SMARTCARD_HandleTypeDef *hsc, uint8_t *pData, uint16_t Size, uint32_t Timeout)
|
||||
{
|
||||
uint16_t* tmp;
|
||||
uint8_t *tmp = pData;
|
||||
uint32_t tickstart = 0U;
|
||||
|
||||
if(hsc->gState == HAL_SMARTCARD_STATE_READY)
|
||||
|
|
@ -783,9 +783,8 @@ HAL_StatusTypeDef HAL_SMARTCARD_Transmit(SMARTCARD_HandleTypeDef *hsc, uint8_t *
|
|||
{
|
||||
return HAL_TIMEOUT;
|
||||
}
|
||||
tmp = (uint16_t*) pData;
|
||||
hsc->Instance->DR = (*tmp & (uint16_t)0x01FF);
|
||||
pData +=1U;
|
||||
hsc->Instance->DR = (uint8_t)(*tmp & 0xFFU);
|
||||
tmp++;
|
||||
}
|
||||
|
||||
if(SMARTCARD_WaitOnFlagUntilTimeout(hsc, SMARTCARD_FLAG_TC, RESET, tickstart, Timeout) != HAL_OK)
|
||||
|
|
@ -818,7 +817,7 @@ HAL_StatusTypeDef HAL_SMARTCARD_Transmit(SMARTCARD_HandleTypeDef *hsc, uint8_t *
|
|||
*/
|
||||
HAL_StatusTypeDef HAL_SMARTCARD_Receive(SMARTCARD_HandleTypeDef *hsc, uint8_t *pData, uint16_t Size, uint32_t Timeout)
|
||||
{
|
||||
uint16_t* tmp;
|
||||
uint8_t *tmp = pData;
|
||||
uint32_t tickstart = 0U;
|
||||
|
||||
if(hsc->RxState == HAL_SMARTCARD_STATE_READY)
|
||||
|
|
@ -848,9 +847,8 @@ HAL_StatusTypeDef HAL_SMARTCARD_Receive(SMARTCARD_HandleTypeDef *hsc, uint8_t *p
|
|||
{
|
||||
return HAL_TIMEOUT;
|
||||
}
|
||||
tmp = (uint16_t*) pData;
|
||||
*tmp = (uint8_t)(hsc->Instance->DR & (uint8_t)0xFF);
|
||||
pData +=1U;
|
||||
*tmp = (uint8_t)(hsc->Instance->DR & (uint8_t)0xFFU);
|
||||
tmp++;
|
||||
}
|
||||
|
||||
/* At end of Rx process, restore hsc->RxState to Ready */
|
||||
|
|
@ -1567,7 +1565,7 @@ void HAL_SMARTCARD_IRQHandler(SMARTCARD_HandleTypeDef *hsc)
|
|||
}
|
||||
|
||||
/* SMARTCARD Over-Run interrupt occurred -------------------------------*/
|
||||
if(((isrflags & SMARTCARD_FLAG_ORE) != RESET) && ((cr3its & USART_CR3_EIE) != RESET))
|
||||
if(((isrflags & SMARTCARD_FLAG_ORE) != RESET) && (((cr1its & USART_CR1_RXNEIE) != RESET) || ((cr3its & USART_CR3_EIE) != RESET)))
|
||||
{
|
||||
hsc->ErrorCode |= HAL_SMARTCARD_ERROR_ORE;
|
||||
}
|
||||
|
|
@ -1996,14 +1994,12 @@ static void SMARTCARD_EndRxTransfer(SMARTCARD_HandleTypeDef *hsc)
|
|||
*/
|
||||
static HAL_StatusTypeDef SMARTCARD_Transmit_IT(SMARTCARD_HandleTypeDef *hsc)
|
||||
{
|
||||
uint16_t* tmp;
|
||||
|
||||
/* Check that a Tx process is ongoing */
|
||||
if(hsc->gState == HAL_SMARTCARD_STATE_BUSY_TX)
|
||||
{
|
||||
tmp = (uint16_t*) hsc->pTxBuffPtr;
|
||||
hsc->Instance->DR = (uint16_t)(*tmp & (uint16_t)0x01FF);
|
||||
hsc->pTxBuffPtr += 1U;
|
||||
hsc->Instance->DR = (uint8_t)(*hsc->pTxBuffPtr & 0xFFU);
|
||||
hsc->pTxBuffPtr++;
|
||||
|
||||
if(--hsc->TxXferCount == 0U)
|
||||
{
|
||||
|
|
@ -2058,14 +2054,12 @@ static HAL_StatusTypeDef SMARTCARD_EndTransmit_IT(SMARTCARD_HandleTypeDef *hsc)
|
|||
*/
|
||||
static HAL_StatusTypeDef SMARTCARD_Receive_IT(SMARTCARD_HandleTypeDef *hsc)
|
||||
{
|
||||
uint16_t* tmp;
|
||||
|
||||
/* Check that a Rx process is ongoing */
|
||||
if(hsc->RxState == HAL_SMARTCARD_STATE_BUSY_RX)
|
||||
{
|
||||
tmp = (uint16_t*) hsc->pRxBuffPtr;
|
||||
*tmp = (uint8_t)(hsc->Instance->DR & (uint8_t)0x00FF);
|
||||
hsc->pRxBuffPtr += 1U;
|
||||
*hsc->pRxBuffPtr = (uint8_t)(hsc->Instance->DR & (uint8_t)0xFFU);
|
||||
hsc->pRxBuffPtr++;
|
||||
|
||||
if(--hsc->RxXferCount == 0U)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@
|
|||
DataSize = SPI_DATASIZE_8BIT:
|
||||
+----------------------------------------------------------------------------------------------+
|
||||
| | | 2Lines Fullduplex | 2Lines RxOnly | 1Line |
|
||||
| Process | Tranfert mode |---------------------|----------------------|----------------------|
|
||||
| Process | Transfer mode |---------------------|----------------------|----------------------|
|
||||
| | | Master | Slave | Master | Slave | Master | Slave |
|
||||
|==============================================================================================|
|
||||
| T | Polling | Fpclk/2 | Fpclk/2 | NA | NA | NA | NA |
|
||||
|
|
@ -156,7 +156,7 @@
|
|||
DataSize = SPI_DATASIZE_16BIT:
|
||||
+----------------------------------------------------------------------------------------------+
|
||||
| | | 2Lines Fullduplex | 2Lines RxOnly | 1Line |
|
||||
| Process | Tranfert mode |---------------------|----------------------|----------------------|
|
||||
| Process | Transfer mode |---------------------|----------------------|----------------------|
|
||||
| | | Master | Slave | Master | Slave | Master | Slave |
|
||||
|==============================================================================================|
|
||||
| T | Polling | Fpclk/2 | Fpclk/2 | NA | NA | NA | NA |
|
||||
|
|
@ -355,6 +355,24 @@ HAL_StatusTypeDef HAL_SPI_Init(SPI_HandleTypeDef *hspi)
|
|||
{
|
||||
assert_param(IS_SPI_CPOL(hspi->Init.CLKPolarity));
|
||||
assert_param(IS_SPI_CPHA(hspi->Init.CLKPhase));
|
||||
|
||||
if (hspi->Init.Mode == SPI_MODE_MASTER)
|
||||
{
|
||||
assert_param(IS_SPI_BAUDRATE_PRESCALER(hspi->Init.BaudRatePrescaler));
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Baudrate prescaler not use in Motoraola Slave mode. force to default value */
|
||||
hspi->Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
assert_param(IS_SPI_BAUDRATE_PRESCALER(hspi->Init.BaudRatePrescaler));
|
||||
|
||||
/* Force polarity and phase to TI protocaol requirements */
|
||||
hspi->Init.CLKPolarity = SPI_POLARITY_LOW;
|
||||
hspi->Init.CLKPhase = SPI_PHASE_1EDGE;
|
||||
}
|
||||
#if (USE_SPI_CRC != 0U)
|
||||
assert_param(IS_SPI_CRC_CALCULATION(hspi->Init.CRCCalculation));
|
||||
|
|
@ -403,9 +421,15 @@ HAL_StatusTypeDef HAL_SPI_Init(SPI_HandleTypeDef *hspi)
|
|||
/*----------------------- SPIx CR1 & CR2 Configuration ---------------------*/
|
||||
/* Configure : SPI Mode, Communication Mode, Data size, Clock polarity and phase, NSS management,
|
||||
Communication speed, First bit and CRC calculation state */
|
||||
WRITE_REG(hspi->Instance->CR1, (hspi->Init.Mode | hspi->Init.Direction | hspi->Init.DataSize |
|
||||
hspi->Init.CLKPolarity | hspi->Init.CLKPhase | (hspi->Init.NSS & SPI_CR1_SSM) |
|
||||
hspi->Init.BaudRatePrescaler | hspi->Init.FirstBit | hspi->Init.CRCCalculation));
|
||||
WRITE_REG(hspi->Instance->CR1, ((hspi->Init.Mode & (SPI_CR1_MSTR | SPI_CR1_SSI)) |
|
||||
(hspi->Init.Direction & (SPI_CR1_RXONLY | SPI_CR1_BIDIMODE)) |
|
||||
(hspi->Init.DataSize & SPI_CR1_DFF) |
|
||||
(hspi->Init.CLKPolarity & SPI_CR1_CPOL) |
|
||||
(hspi->Init.CLKPhase & SPI_CR1_CPHA) |
|
||||
(hspi->Init.NSS & SPI_CR1_SSM) |
|
||||
(hspi->Init.BaudRatePrescaler & SPI_CR1_BR_Msk) |
|
||||
(hspi->Init.FirstBit & SPI_CR1_LSBFIRST) |
|
||||
(hspi->Init.CRCCalculation & SPI_CR1_CRCEN)));
|
||||
|
||||
/* Configure : NSS management */
|
||||
WRITE_REG(hspi->Instance->CR2, ((hspi->Init.NSS >> 16U) & SPI_CR2_SSOE));
|
||||
|
|
@ -415,7 +439,7 @@ HAL_StatusTypeDef HAL_SPI_Init(SPI_HandleTypeDef *hspi)
|
|||
/* Configure : CRC Polynomial */
|
||||
if (hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE)
|
||||
{
|
||||
WRITE_REG(hspi->Instance->CRCPR, hspi->Init.CRCPolynomial);
|
||||
WRITE_REG(hspi->Instance->CRCPR, (hspi->Init.CRCPolynomial & SPI_CRCPR_CRCPOLY_Msk));
|
||||
}
|
||||
#endif /* USE_SPI_CRC */
|
||||
|
||||
|
|
@ -813,6 +837,8 @@ HAL_StatusTypeDef HAL_SPI_Transmit(SPI_HandleTypeDef *hspi, uint8_t *pData, uint
|
|||
/* Configure communication direction : 1Line */
|
||||
if (hspi->Init.Direction == SPI_DIRECTION_1LINE)
|
||||
{
|
||||
/* Disable SPI Peripheral before set 1Line direction (BIDIOE bit) */
|
||||
__HAL_SPI_DISABLE(hspi);
|
||||
SPI_1LINE_TX(hspi);
|
||||
}
|
||||
|
||||
|
|
@ -988,6 +1014,8 @@ HAL_StatusTypeDef HAL_SPI_Receive(SPI_HandleTypeDef *hspi, uint8_t *pData, uint1
|
|||
/* Configure communication direction: 1Line */
|
||||
if (hspi->Init.Direction == SPI_DIRECTION_1LINE)
|
||||
{
|
||||
/* Disable SPI Peripheral before set 1Line direction (BIDIOE bit) */
|
||||
__HAL_SPI_DISABLE(hspi);
|
||||
SPI_1LINE_RX(hspi);
|
||||
}
|
||||
|
||||
|
|
@ -1414,6 +1442,8 @@ HAL_StatusTypeDef HAL_SPI_Transmit_IT(SPI_HandleTypeDef *hspi, uint8_t *pData, u
|
|||
/* Configure communication direction : 1Line */
|
||||
if (hspi->Init.Direction == SPI_DIRECTION_1LINE)
|
||||
{
|
||||
/* Disable SPI Peripheral before set 1Line direction (BIDIOE bit) */
|
||||
__HAL_SPI_DISABLE(hspi);
|
||||
SPI_1LINE_TX(hspi);
|
||||
}
|
||||
|
||||
|
|
@ -1501,6 +1531,8 @@ HAL_StatusTypeDef HAL_SPI_Receive_IT(SPI_HandleTypeDef *hspi, uint8_t *pData, ui
|
|||
/* Configure communication direction : 1Line */
|
||||
if (hspi->Init.Direction == SPI_DIRECTION_1LINE)
|
||||
{
|
||||
/* Disable SPI Peripheral before set 1Line direction (BIDIOE bit) */
|
||||
__HAL_SPI_DISABLE(hspi);
|
||||
SPI_1LINE_RX(hspi);
|
||||
}
|
||||
|
||||
|
|
@ -1671,6 +1703,8 @@ HAL_StatusTypeDef HAL_SPI_Transmit_DMA(SPI_HandleTypeDef *hspi, uint8_t *pData,
|
|||
/* Configure communication direction : 1Line */
|
||||
if (hspi->Init.Direction == SPI_DIRECTION_1LINE)
|
||||
{
|
||||
/* Disable SPI Peripheral before set 1Line direction (BIDIOE bit) */
|
||||
__HAL_SPI_DISABLE(hspi);
|
||||
SPI_1LINE_TX(hspi);
|
||||
}
|
||||
|
||||
|
|
@ -1784,6 +1818,8 @@ HAL_StatusTypeDef HAL_SPI_Receive_DMA(SPI_HandleTypeDef *hspi, uint8_t *pData, u
|
|||
/* Configure communication direction : 1Line */
|
||||
if (hspi->Init.Direction == SPI_DIRECTION_1LINE)
|
||||
{
|
||||
/* Disable SPI Peripheral before set 1Line direction (BIDIOE bit) */
|
||||
__HAL_SPI_DISABLE(hspi);
|
||||
SPI_1LINE_RX(hspi);
|
||||
}
|
||||
|
||||
|
|
@ -2752,8 +2788,17 @@ static void SPI_DMAReceiveCplt(DMA_HandleTypeDef *hdma)
|
|||
}
|
||||
#endif /* USE_SPI_CRC */
|
||||
|
||||
/* Check if we are in Master RX 2 line mode */
|
||||
if ((hspi->Init.Direction == SPI_DIRECTION_2LINES) && (hspi->Init.Mode == SPI_MODE_MASTER))
|
||||
{
|
||||
/* Disable Rx/Tx DMA Request (done by default to handle the case master rx direction 2 lines) */
|
||||
CLEAR_BIT(hspi->Instance->CR2, SPI_CR2_TXDMAEN | SPI_CR2_RXDMAEN);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Normal case */
|
||||
CLEAR_BIT(hspi->Instance->CR2, SPI_CR2_RXDMAEN);
|
||||
}
|
||||
|
||||
/* Check the end of the transaction */
|
||||
if (SPI_EndRxTransaction(hspi, SPI_DEFAULT_TIMEOUT, tickstart) != HAL_OK)
|
||||
|
|
@ -3151,7 +3196,7 @@ static void SPI_2linesRxISR_8BIT(struct __SPI_HandleTypeDef *hspi)
|
|||
*/
|
||||
static void SPI_2linesRxISR_8BITCRC(struct __SPI_HandleTypeDef *hspi)
|
||||
{
|
||||
/* Read 8bit CRC to flush Data Regsiter */
|
||||
/* Read 8bit CRC to flush Data Register */
|
||||
READ_REG(*(__IO uint8_t *)&hspi->Instance->DR);
|
||||
|
||||
/* Disable RXNE and ERR interrupt */
|
||||
|
|
@ -3242,7 +3287,7 @@ static void SPI_2linesRxISR_16BIT(struct __SPI_HandleTypeDef *hspi)
|
|||
*/
|
||||
static void SPI_2linesRxISR_16BITCRC(struct __SPI_HandleTypeDef *hspi)
|
||||
{
|
||||
/* Read 16bit CRC to flush Data Regsiter */
|
||||
/* Read 16bit CRC to flush Data Register */
|
||||
READ_REG(hspi->Instance->DR);
|
||||
|
||||
/* Disable RXNE interrupt */
|
||||
|
|
@ -3468,11 +3513,22 @@ static void SPI_TxISR_16BIT(struct __SPI_HandleTypeDef *hspi)
|
|||
static HAL_StatusTypeDef SPI_WaitFlagStateUntilTimeout(SPI_HandleTypeDef *hspi, uint32_t Flag, FlagStatus State,
|
||||
uint32_t Timeout, uint32_t Tickstart)
|
||||
{
|
||||
__IO uint32_t count;
|
||||
uint32_t tmp_timeout;
|
||||
uint32_t tmp_tickstart;
|
||||
|
||||
/* Adjust Timeout value in case of end of transfer */
|
||||
tmp_timeout = Timeout - (HAL_GetTick() - Tickstart);
|
||||
tmp_tickstart = HAL_GetTick();
|
||||
|
||||
/* Calculate Timeout based on a software loop to avoid blocking issue if Systick is disabled */
|
||||
count = tmp_timeout * ((SystemCoreClock * 32U) >> 20U);
|
||||
|
||||
while ((__HAL_SPI_GET_FLAG(hspi, Flag) ? SET : RESET) != State)
|
||||
{
|
||||
if (Timeout != HAL_MAX_DELAY)
|
||||
{
|
||||
if (((HAL_GetTick() - Tickstart) >= Timeout) || (Timeout == 0U))
|
||||
if (((HAL_GetTick() - tmp_tickstart) >= tmp_timeout) || (tmp_timeout == 0U))
|
||||
{
|
||||
/* Disable the SPI and reset the CRC: the CRC value should be cleared
|
||||
on both master and slave sides in order to resynchronize the master
|
||||
|
|
@ -3501,6 +3557,12 @@ static HAL_StatusTypeDef SPI_WaitFlagStateUntilTimeout(SPI_HandleTypeDef *hspi,
|
|||
|
||||
return HAL_TIMEOUT;
|
||||
}
|
||||
/* If Systick is disabled or not incremented, deactivate timeout to go in disable loop procedure */
|
||||
if(count == 0U)
|
||||
{
|
||||
tmp_timeout = 0U;
|
||||
}
|
||||
count--;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3574,7 +3636,7 @@ static void SPI_CloseRxTx_ISR(SPI_HandleTypeDef *hspi)
|
|||
uint32_t tickstart;
|
||||
__IO uint32_t count = SPI_DEFAULT_TIMEOUT * (SystemCoreClock / 24U / 1000U);
|
||||
|
||||
/* Init tickstart for timeout managment*/
|
||||
/* Init tickstart for timeout management */
|
||||
tickstart = HAL_GetTick();
|
||||
|
||||
/* Disable ERR interrupt */
|
||||
|
|
|
|||
|
|
@ -171,10 +171,11 @@ static void SRAM_DMAError (DMA_HandleTypeDef *hdma);
|
|||
* @param ExtTiming Pointer to SRAM extended mode timing structure
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_SRAM_Init(SRAM_HandleTypeDef *hsram, FSMC_NORSRAM_TimingTypeDef *Timing, FSMC_NORSRAM_TimingTypeDef *ExtTiming)
|
||||
HAL_StatusTypeDef HAL_SRAM_Init(SRAM_HandleTypeDef *hsram, FSMC_NORSRAM_TimingTypeDef *Timing,
|
||||
FSMC_NORSRAM_TimingTypeDef *ExtTiming)
|
||||
{
|
||||
/* Check the SRAM handle parameter */
|
||||
if (hsram == NULL)
|
||||
if ((hsram == NULL) || (hsram->Init.BurstAccessMode == FSMC_BURST_ACCESS_MODE_ENABLE))
|
||||
{
|
||||
return HAL_ERROR;
|
||||
}
|
||||
|
|
@ -207,7 +208,8 @@ HAL_StatusTypeDef HAL_SRAM_Init(SRAM_HandleTypeDef *hsram, FSMC_NORSRAM_TimingTy
|
|||
(void)FSMC_NORSRAM_Timing_Init(hsram->Instance, Timing, hsram->Init.NSBank);
|
||||
|
||||
/* Initialize SRAM extended mode timing Interface */
|
||||
(void)FSMC_NORSRAM_Extended_Timing_Init(hsram->Extended, ExtTiming, hsram->Init.NSBank, hsram->Init.ExtendedMode);
|
||||
(void)FSMC_NORSRAM_Extended_Timing_Init(hsram->Extended, ExtTiming, hsram->Init.NSBank,
|
||||
hsram->Init.ExtendedMode);
|
||||
|
||||
/* Enable the NORSRAM device */
|
||||
__FSMC_NORSRAM_ENABLE(hsram->Instance, hsram->Init.NSBank);
|
||||
|
|
@ -342,7 +344,8 @@ __weak void HAL_SRAM_DMA_XferErrorCallback(DMA_HandleTypeDef *hdma)
|
|||
* @param BufferSize Size of the buffer to read from memory
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_SRAM_Read_8b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint8_t *pDstBuffer, uint32_t BufferSize)
|
||||
HAL_StatusTypeDef HAL_SRAM_Read_8b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint8_t *pDstBuffer,
|
||||
uint32_t BufferSize)
|
||||
{
|
||||
uint32_t size;
|
||||
__IO uint8_t *psramaddress = (uint8_t *)pAddress;
|
||||
|
|
@ -389,7 +392,8 @@ HAL_StatusTypeDef HAL_SRAM_Read_8b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress
|
|||
* @param BufferSize Size of the buffer to write to memory
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_SRAM_Write_8b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint8_t *pSrcBuffer, uint32_t BufferSize)
|
||||
HAL_StatusTypeDef HAL_SRAM_Write_8b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint8_t *pSrcBuffer,
|
||||
uint32_t BufferSize)
|
||||
{
|
||||
uint32_t size;
|
||||
__IO uint8_t *psramaddress = (uint8_t *)pAddress;
|
||||
|
|
@ -435,7 +439,8 @@ HAL_StatusTypeDef HAL_SRAM_Write_8b(SRAM_HandleTypeDef *hsram, uint32_t *pAddres
|
|||
* @param BufferSize Size of the buffer to read from memory
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_SRAM_Read_16b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint16_t *pDstBuffer, uint32_t BufferSize)
|
||||
HAL_StatusTypeDef HAL_SRAM_Read_16b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint16_t *pDstBuffer,
|
||||
uint32_t BufferSize)
|
||||
{
|
||||
uint32_t size;
|
||||
__IO uint32_t *psramaddress = pAddress;
|
||||
|
|
@ -452,7 +457,7 @@ HAL_StatusTypeDef HAL_SRAM_Read_16b(SRAM_HandleTypeDef *hsram, uint32_t *pAddres
|
|||
/* Update the SRAM controller state */
|
||||
hsram->State = HAL_SRAM_STATE_BUSY;
|
||||
|
||||
/* Check if the size is a 32-bits mulitple */
|
||||
/* Check if the size is a 32-bits multiple */
|
||||
limit = (((BufferSize % 2U) != 0U) ? 1U : 0U);
|
||||
|
||||
/* Read data from memory */
|
||||
|
|
@ -494,7 +499,8 @@ HAL_StatusTypeDef HAL_SRAM_Read_16b(SRAM_HandleTypeDef *hsram, uint32_t *pAddres
|
|||
* @param BufferSize Size of the buffer to write to memory
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_SRAM_Write_16b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint16_t *pSrcBuffer, uint32_t BufferSize)
|
||||
HAL_StatusTypeDef HAL_SRAM_Write_16b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint16_t *pSrcBuffer,
|
||||
uint32_t BufferSize)
|
||||
{
|
||||
uint32_t size;
|
||||
__IO uint32_t *psramaddress = pAddress;
|
||||
|
|
@ -510,7 +516,7 @@ HAL_StatusTypeDef HAL_SRAM_Write_16b(SRAM_HandleTypeDef *hsram, uint32_t *pAddre
|
|||
/* Update the SRAM controller state */
|
||||
hsram->State = HAL_SRAM_STATE_BUSY;
|
||||
|
||||
/* Check if the size is a 32-bits mulitple */
|
||||
/* Check if the size is a 32-bits multiple */
|
||||
limit = (((BufferSize % 2U) != 0U) ? 1U : 0U);
|
||||
|
||||
/* Write data to memory */
|
||||
|
|
@ -552,7 +558,8 @@ HAL_StatusTypeDef HAL_SRAM_Write_16b(SRAM_HandleTypeDef *hsram, uint32_t *pAddre
|
|||
* @param BufferSize Size of the buffer to read from memory
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_SRAM_Read_32b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pDstBuffer, uint32_t BufferSize)
|
||||
HAL_StatusTypeDef HAL_SRAM_Read_32b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pDstBuffer,
|
||||
uint32_t BufferSize)
|
||||
{
|
||||
uint32_t size;
|
||||
__IO uint32_t *psramaddress = pAddress;
|
||||
|
|
@ -599,7 +606,8 @@ HAL_StatusTypeDef HAL_SRAM_Read_32b(SRAM_HandleTypeDef *hsram, uint32_t *pAddres
|
|||
* @param BufferSize Size of the buffer to write to memory
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_SRAM_Write_32b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pSrcBuffer, uint32_t BufferSize)
|
||||
HAL_StatusTypeDef HAL_SRAM_Write_32b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pSrcBuffer,
|
||||
uint32_t BufferSize)
|
||||
{
|
||||
uint32_t size;
|
||||
__IO uint32_t *psramaddress = pAddress;
|
||||
|
|
@ -645,7 +653,8 @@ HAL_StatusTypeDef HAL_SRAM_Write_32b(SRAM_HandleTypeDef *hsram, uint32_t *pAddre
|
|||
* @param BufferSize Size of the buffer to read from memory
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_SRAM_Read_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pDstBuffer, uint32_t BufferSize)
|
||||
HAL_StatusTypeDef HAL_SRAM_Read_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pDstBuffer,
|
||||
uint32_t BufferSize)
|
||||
{
|
||||
HAL_StatusTypeDef status;
|
||||
HAL_SRAM_StateTypeDef state = hsram->State;
|
||||
|
|
@ -678,7 +687,7 @@ HAL_StatusTypeDef HAL_SRAM_Read_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddres
|
|||
}
|
||||
else
|
||||
{
|
||||
return HAL_ERROR;
|
||||
status = HAL_ERROR;
|
||||
}
|
||||
|
||||
return status;
|
||||
|
|
@ -693,7 +702,8 @@ HAL_StatusTypeDef HAL_SRAM_Read_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddres
|
|||
* @param BufferSize Size of the buffer to write to memory
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_SRAM_Write_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pSrcBuffer, uint32_t BufferSize)
|
||||
HAL_StatusTypeDef HAL_SRAM_Write_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pSrcBuffer,
|
||||
uint32_t BufferSize)
|
||||
{
|
||||
HAL_StatusTypeDef status;
|
||||
|
||||
|
|
@ -718,7 +728,7 @@ HAL_StatusTypeDef HAL_SRAM_Write_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddre
|
|||
}
|
||||
else
|
||||
{
|
||||
return HAL_ERROR;
|
||||
status = HAL_ERROR;
|
||||
}
|
||||
|
||||
return status;
|
||||
|
|
@ -736,7 +746,8 @@ HAL_StatusTypeDef HAL_SRAM_Write_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddre
|
|||
* @param pCallback : pointer to the Callback function
|
||||
* @retval status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_SRAM_RegisterCallback (SRAM_HandleTypeDef *hsram, HAL_SRAM_CallbackIDTypeDef CallbackId, pSRAM_CallbackTypeDef pCallback)
|
||||
HAL_StatusTypeDef HAL_SRAM_RegisterCallback(SRAM_HandleTypeDef *hsram, HAL_SRAM_CallbackIDTypeDef CallbackId,
|
||||
pSRAM_CallbackTypeDef pCallback)
|
||||
{
|
||||
HAL_StatusTypeDef status = HAL_OK;
|
||||
HAL_SRAM_StateTypeDef state;
|
||||
|
|
@ -858,7 +869,8 @@ HAL_StatusTypeDef HAL_SRAM_UnRegisterCallback (SRAM_HandleTypeDef *hsram, HAL_SR
|
|||
* @param pCallback : pointer to the Callback function
|
||||
* @retval status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_SRAM_RegisterDmaCallback(SRAM_HandleTypeDef *hsram, HAL_SRAM_CallbackIDTypeDef CallbackId, pSRAM_DmaCallbackTypeDef pCallback)
|
||||
HAL_StatusTypeDef HAL_SRAM_RegisterDmaCallback(SRAM_HandleTypeDef *hsram, HAL_SRAM_CallbackIDTypeDef CallbackId,
|
||||
pSRAM_DmaCallbackTypeDef pCallback)
|
||||
{
|
||||
HAL_StatusTypeDef status = HAL_OK;
|
||||
HAL_SRAM_StateTypeDef state;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -54,7 +54,7 @@
|
|||
the commutation event).
|
||||
|
||||
(#) Activate the TIM peripheral using one of the start functions:
|
||||
(++) Complementary Output Compare : HAL_TIMEx_OCN_Start(), HAL_TIMEx_OCN_Start_DMA(), HAL_TIMEx_OC_Start_IT()
|
||||
(++) Complementary Output Compare : HAL_TIMEx_OCN_Start(), HAL_TIMEx_OCN_Start_DMA(), HAL_TIMEx_OCN_Start_IT()
|
||||
(++) Complementary PWM generation : HAL_TIMEx_PWMN_Start(), HAL_TIMEx_PWMN_Start_DMA(), HAL_TIMEx_PWMN_Start_IT()
|
||||
(++) Complementary One-pulse mode output : HAL_TIMEx_OnePulseN_Start(), HAL_TIMEx_OnePulseN_Start_IT()
|
||||
(++) Hall Sensor output : HAL_TIMEx_HallSensor_Start(), HAL_TIMEx_HallSensor_Start_DMA(), HAL_TIMEx_HallSensor_Start_IT().
|
||||
|
|
@ -90,9 +90,11 @@
|
|||
|
||||
/* Private typedef -----------------------------------------------------------*/
|
||||
/* Private define ------------------------------------------------------------*/
|
||||
/* Private macro -------------------------------------------------------------*/
|
||||
/* Private macros ------------------------------------------------------------*/
|
||||
/* Private variables ---------------------------------------------------------*/
|
||||
/* Private function prototypes -----------------------------------------------*/
|
||||
static void TIM_DMADelayPulseNCplt(DMA_HandleTypeDef *hdma);
|
||||
static void TIM_DMAErrorCCxN(DMA_HandleTypeDef *hdma);
|
||||
static void TIM_CCxNChannelCmd(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ChannelNState);
|
||||
|
||||
/* Exported functions --------------------------------------------------------*/
|
||||
|
|
@ -123,6 +125,9 @@ static void TIM_CCxNChannelCmd(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t Cha
|
|||
*/
|
||||
/**
|
||||
* @brief Initializes the TIM Hall Sensor Interface and initialize the associated handle.
|
||||
* @note When the timer instance is initialized in Hall Sensor Interface mode,
|
||||
* timer channels 1 and channel 2 are reserved and cannot be used for
|
||||
* other purpose.
|
||||
* @param htim TIM Hall Sensor Interface handle
|
||||
* @param sConfig TIM Hall Sensor configuration structure
|
||||
* @retval HAL status
|
||||
|
|
@ -208,6 +213,15 @@ HAL_StatusTypeDef HAL_TIMEx_HallSensor_Init(TIM_HandleTypeDef *htim, TIM_HallSen
|
|||
htim->Instance->CR2 &= ~TIM_CR2_MMS;
|
||||
htim->Instance->CR2 |= TIM_TRGO_OC2REF;
|
||||
|
||||
/* Initialize the DMA burst operation state */
|
||||
htim->DMABurstState = HAL_DMA_BURST_STATE_READY;
|
||||
|
||||
/* Initialize the TIM channels state */
|
||||
TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY);
|
||||
TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY);
|
||||
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY);
|
||||
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY);
|
||||
|
||||
/* Initialize the TIM state*/
|
||||
htim->State = HAL_TIM_STATE_READY;
|
||||
|
||||
|
|
@ -241,6 +255,15 @@ HAL_StatusTypeDef HAL_TIMEx_HallSensor_DeInit(TIM_HandleTypeDef *htim)
|
|||
HAL_TIMEx_HallSensor_MspDeInit(htim);
|
||||
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
|
||||
|
||||
/* Change the DMA burst operation state */
|
||||
htim->DMABurstState = HAL_DMA_BURST_STATE_RESET;
|
||||
|
||||
/* Change the TIM channels state */
|
||||
TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_RESET);
|
||||
TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_RESET);
|
||||
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_RESET);
|
||||
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_RESET);
|
||||
|
||||
/* Change TIM state */
|
||||
htim->State = HAL_TIM_STATE_RESET;
|
||||
|
||||
|
|
@ -288,20 +311,46 @@ __weak void HAL_TIMEx_HallSensor_MspDeInit(TIM_HandleTypeDef *htim)
|
|||
HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start(TIM_HandleTypeDef *htim)
|
||||
{
|
||||
uint32_t tmpsmcr;
|
||||
HAL_TIM_ChannelStateTypeDef channel_1_state = TIM_CHANNEL_STATE_GET(htim, TIM_CHANNEL_1);
|
||||
HAL_TIM_ChannelStateTypeDef channel_2_state = TIM_CHANNEL_STATE_GET(htim, TIM_CHANNEL_2);
|
||||
HAL_TIM_ChannelStateTypeDef complementary_channel_1_state = TIM_CHANNEL_N_STATE_GET(htim, TIM_CHANNEL_1);
|
||||
HAL_TIM_ChannelStateTypeDef complementary_channel_2_state = TIM_CHANNEL_N_STATE_GET(htim, TIM_CHANNEL_2);
|
||||
|
||||
/* Check the parameters */
|
||||
assert_param(IS_TIM_HALL_SENSOR_INTERFACE_INSTANCE(htim->Instance));
|
||||
|
||||
/* Check the TIM channels state */
|
||||
if ((channel_1_state != HAL_TIM_CHANNEL_STATE_READY)
|
||||
|| (channel_2_state != HAL_TIM_CHANNEL_STATE_READY)
|
||||
|| (complementary_channel_1_state != HAL_TIM_CHANNEL_STATE_READY)
|
||||
|| (complementary_channel_2_state != HAL_TIM_CHANNEL_STATE_READY))
|
||||
{
|
||||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
/* Set the TIM channels state */
|
||||
TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY);
|
||||
TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_BUSY);
|
||||
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY);
|
||||
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_BUSY);
|
||||
|
||||
/* Enable the Input Capture channel 1
|
||||
(in the Hall Sensor Interface the three possible channels that can be used are TIM_CHANNEL_1, TIM_CHANNEL_2 and TIM_CHANNEL_3) */
|
||||
TIM_CCxChannelCmd(htim->Instance, TIM_CHANNEL_1, TIM_CCx_ENABLE);
|
||||
|
||||
/* Enable the Peripheral, except in trigger mode where enable is automatically done with trigger */
|
||||
if (IS_TIM_SLAVE_INSTANCE(htim->Instance))
|
||||
{
|
||||
tmpsmcr = htim->Instance->SMCR & TIM_SMCR_SMS;
|
||||
if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr))
|
||||
{
|
||||
__HAL_TIM_ENABLE(htim);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
__HAL_TIM_ENABLE(htim);
|
||||
}
|
||||
|
||||
/* Return function status */
|
||||
return HAL_OK;
|
||||
|
|
@ -324,6 +373,12 @@ HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop(TIM_HandleTypeDef *htim)
|
|||
/* Disable the Peripheral */
|
||||
__HAL_TIM_DISABLE(htim);
|
||||
|
||||
/* Set the TIM channels state */
|
||||
TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY);
|
||||
TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY);
|
||||
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY);
|
||||
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY);
|
||||
|
||||
/* Return function status */
|
||||
return HAL_OK;
|
||||
}
|
||||
|
|
@ -336,10 +391,29 @@ HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop(TIM_HandleTypeDef *htim)
|
|||
HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_IT(TIM_HandleTypeDef *htim)
|
||||
{
|
||||
uint32_t tmpsmcr;
|
||||
HAL_TIM_ChannelStateTypeDef channel_1_state = TIM_CHANNEL_STATE_GET(htim, TIM_CHANNEL_1);
|
||||
HAL_TIM_ChannelStateTypeDef channel_2_state = TIM_CHANNEL_STATE_GET(htim, TIM_CHANNEL_2);
|
||||
HAL_TIM_ChannelStateTypeDef complementary_channel_1_state = TIM_CHANNEL_N_STATE_GET(htim, TIM_CHANNEL_1);
|
||||
HAL_TIM_ChannelStateTypeDef complementary_channel_2_state = TIM_CHANNEL_N_STATE_GET(htim, TIM_CHANNEL_2);
|
||||
|
||||
/* Check the parameters */
|
||||
assert_param(IS_TIM_HALL_SENSOR_INTERFACE_INSTANCE(htim->Instance));
|
||||
|
||||
/* Check the TIM channels state */
|
||||
if ((channel_1_state != HAL_TIM_CHANNEL_STATE_READY)
|
||||
|| (channel_2_state != HAL_TIM_CHANNEL_STATE_READY)
|
||||
|| (complementary_channel_1_state != HAL_TIM_CHANNEL_STATE_READY)
|
||||
|| (complementary_channel_2_state != HAL_TIM_CHANNEL_STATE_READY))
|
||||
{
|
||||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
/* Set the TIM channels state */
|
||||
TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY);
|
||||
TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_BUSY);
|
||||
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY);
|
||||
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_BUSY);
|
||||
|
||||
/* Enable the capture compare Interrupts 1 event */
|
||||
__HAL_TIM_ENABLE_IT(htim, TIM_IT_CC1);
|
||||
|
||||
|
|
@ -348,11 +422,18 @@ HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_IT(TIM_HandleTypeDef *htim)
|
|||
TIM_CCxChannelCmd(htim->Instance, TIM_CHANNEL_1, TIM_CCx_ENABLE);
|
||||
|
||||
/* Enable the Peripheral, except in trigger mode where enable is automatically done with trigger */
|
||||
if (IS_TIM_SLAVE_INSTANCE(htim->Instance))
|
||||
{
|
||||
tmpsmcr = htim->Instance->SMCR & TIM_SMCR_SMS;
|
||||
if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr))
|
||||
{
|
||||
__HAL_TIM_ENABLE(htim);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
__HAL_TIM_ENABLE(htim);
|
||||
}
|
||||
|
||||
/* Return function status */
|
||||
return HAL_OK;
|
||||
|
|
@ -378,6 +459,12 @@ HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_IT(TIM_HandleTypeDef *htim)
|
|||
/* Disable the Peripheral */
|
||||
__HAL_TIM_DISABLE(htim);
|
||||
|
||||
/* Set the TIM channels state */
|
||||
TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY);
|
||||
TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY);
|
||||
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY);
|
||||
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY);
|
||||
|
||||
/* Return function status */
|
||||
return HAL_OK;
|
||||
}
|
||||
|
|
@ -392,29 +479,36 @@ HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_IT(TIM_HandleTypeDef *htim)
|
|||
HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_DMA(TIM_HandleTypeDef *htim, uint32_t *pData, uint16_t Length)
|
||||
{
|
||||
uint32_t tmpsmcr;
|
||||
HAL_TIM_ChannelStateTypeDef channel_1_state = TIM_CHANNEL_STATE_GET(htim, TIM_CHANNEL_1);
|
||||
HAL_TIM_ChannelStateTypeDef complementary_channel_1_state = TIM_CHANNEL_N_STATE_GET(htim, TIM_CHANNEL_1);
|
||||
|
||||
/* Check the parameters */
|
||||
assert_param(IS_TIM_HALL_SENSOR_INTERFACE_INSTANCE(htim->Instance));
|
||||
|
||||
if (htim->State == HAL_TIM_STATE_BUSY)
|
||||
/* Set the TIM channel state */
|
||||
if ((channel_1_state == HAL_TIM_CHANNEL_STATE_BUSY)
|
||||
|| (complementary_channel_1_state == HAL_TIM_CHANNEL_STATE_BUSY))
|
||||
{
|
||||
return HAL_BUSY;
|
||||
}
|
||||
else if (htim->State == HAL_TIM_STATE_READY)
|
||||
else if ((channel_1_state == HAL_TIM_CHANNEL_STATE_READY)
|
||||
&& (complementary_channel_1_state == HAL_TIM_CHANNEL_STATE_READY))
|
||||
{
|
||||
if (((uint32_t)pData == 0U) && (Length > 0U))
|
||||
if ((pData == NULL) && (Length > 0U))
|
||||
{
|
||||
return HAL_ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
htim->State = HAL_TIM_STATE_BUSY;
|
||||
TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY);
|
||||
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* nothing to do */
|
||||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
/* Enable the Input Capture channel 1
|
||||
(in the Hall Sensor Interface the three possible channels that can be used are TIM_CHANNEL_1, TIM_CHANNEL_2 and TIM_CHANNEL_3) */
|
||||
TIM_CCxChannelCmd(htim->Instance, TIM_CHANNEL_1, TIM_CCx_ENABLE);
|
||||
|
|
@ -428,17 +522,25 @@ HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_DMA(TIM_HandleTypeDef *htim, uint32
|
|||
/* Enable the DMA channel for Capture 1*/
|
||||
if (HAL_DMA_Start_IT(htim->hdma[TIM_DMA_ID_CC1], (uint32_t)&htim->Instance->CCR1, (uint32_t)pData, Length) != HAL_OK)
|
||||
{
|
||||
/* Return error status */
|
||||
return HAL_ERROR;
|
||||
}
|
||||
/* Enable the capture compare 1 Interrupt */
|
||||
__HAL_TIM_ENABLE_DMA(htim, TIM_DMA_CC1);
|
||||
|
||||
/* Enable the Peripheral, except in trigger mode where enable is automatically done with trigger */
|
||||
if (IS_TIM_SLAVE_INSTANCE(htim->Instance))
|
||||
{
|
||||
tmpsmcr = htim->Instance->SMCR & TIM_SMCR_SMS;
|
||||
if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr))
|
||||
{
|
||||
__HAL_TIM_ENABLE(htim);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
__HAL_TIM_ENABLE(htim);
|
||||
}
|
||||
|
||||
/* Return function status */
|
||||
return HAL_OK;
|
||||
|
|
@ -463,9 +565,14 @@ HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_DMA(TIM_HandleTypeDef *htim)
|
|||
__HAL_TIM_DISABLE_DMA(htim, TIM_DMA_CC1);
|
||||
|
||||
(void)HAL_DMA_Abort_IT(htim->hdma[TIM_DMA_ID_CC1]);
|
||||
|
||||
/* Disable the Peripheral */
|
||||
__HAL_TIM_DISABLE(htim);
|
||||
|
||||
/* Set the TIM channel state */
|
||||
TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY);
|
||||
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY);
|
||||
|
||||
/* Return function status */
|
||||
return HAL_OK;
|
||||
}
|
||||
|
|
@ -512,6 +619,15 @@ HAL_StatusTypeDef HAL_TIMEx_OCN_Start(TIM_HandleTypeDef *htim, uint32_t Channel)
|
|||
/* Check the parameters */
|
||||
assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, Channel));
|
||||
|
||||
/* Check the TIM complementary channel state */
|
||||
if (TIM_CHANNEL_N_STATE_GET(htim, Channel) != HAL_TIM_CHANNEL_STATE_READY)
|
||||
{
|
||||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
/* Set the TIM complementary channel state */
|
||||
TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_BUSY);
|
||||
|
||||
/* Enable the Capture compare channel N */
|
||||
TIM_CCxNChannelCmd(htim->Instance, Channel, TIM_CCxN_ENABLE);
|
||||
|
||||
|
|
@ -519,11 +635,18 @@ HAL_StatusTypeDef HAL_TIMEx_OCN_Start(TIM_HandleTypeDef *htim, uint32_t Channel)
|
|||
__HAL_TIM_MOE_ENABLE(htim);
|
||||
|
||||
/* Enable the Peripheral, except in trigger mode where enable is automatically done with trigger */
|
||||
if (IS_TIM_SLAVE_INSTANCE(htim->Instance))
|
||||
{
|
||||
tmpsmcr = htim->Instance->SMCR & TIM_SMCR_SMS;
|
||||
if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr))
|
||||
{
|
||||
__HAL_TIM_ENABLE(htim);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
__HAL_TIM_ENABLE(htim);
|
||||
}
|
||||
|
||||
/* Return function status */
|
||||
return HAL_OK;
|
||||
|
|
@ -554,6 +677,9 @@ HAL_StatusTypeDef HAL_TIMEx_OCN_Stop(TIM_HandleTypeDef *htim, uint32_t Channel)
|
|||
/* Disable the Peripheral */
|
||||
__HAL_TIM_DISABLE(htim);
|
||||
|
||||
/* Set the TIM complementary channel state */
|
||||
TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY);
|
||||
|
||||
/* Return function status */
|
||||
return HAL_OK;
|
||||
}
|
||||
|
|
@ -576,6 +702,15 @@ HAL_StatusTypeDef HAL_TIMEx_OCN_Start_IT(TIM_HandleTypeDef *htim, uint32_t Chann
|
|||
/* Check the parameters */
|
||||
assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, Channel));
|
||||
|
||||
/* Check the TIM complementary channel state */
|
||||
if (TIM_CHANNEL_N_STATE_GET(htim, Channel) != HAL_TIM_CHANNEL_STATE_READY)
|
||||
{
|
||||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
/* Set the TIM complementary channel state */
|
||||
TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_BUSY);
|
||||
|
||||
switch (Channel)
|
||||
{
|
||||
case TIM_CHANNEL_1:
|
||||
|
|
@ -614,11 +749,18 @@ HAL_StatusTypeDef HAL_TIMEx_OCN_Start_IT(TIM_HandleTypeDef *htim, uint32_t Chann
|
|||
__HAL_TIM_MOE_ENABLE(htim);
|
||||
|
||||
/* Enable the Peripheral, except in trigger mode where enable is automatically done with trigger */
|
||||
if (IS_TIM_SLAVE_INSTANCE(htim->Instance))
|
||||
{
|
||||
tmpsmcr = htim->Instance->SMCR & TIM_SMCR_SMS;
|
||||
if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr))
|
||||
{
|
||||
__HAL_TIM_ENABLE(htim);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
__HAL_TIM_ENABLE(htim);
|
||||
}
|
||||
|
||||
/* Return function status */
|
||||
return HAL_OK;
|
||||
|
|
@ -684,6 +826,9 @@ HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channe
|
|||
/* Disable the Peripheral */
|
||||
__HAL_TIM_DISABLE(htim);
|
||||
|
||||
/* Set the TIM complementary channel state */
|
||||
TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY);
|
||||
|
||||
/* Return function status */
|
||||
return HAL_OK;
|
||||
}
|
||||
|
|
@ -708,24 +853,25 @@ HAL_StatusTypeDef HAL_TIMEx_OCN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Chan
|
|||
/* Check the parameters */
|
||||
assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, Channel));
|
||||
|
||||
if (htim->State == HAL_TIM_STATE_BUSY)
|
||||
/* Set the TIM complementary channel state */
|
||||
if (TIM_CHANNEL_N_STATE_GET(htim, Channel) == HAL_TIM_CHANNEL_STATE_BUSY)
|
||||
{
|
||||
return HAL_BUSY;
|
||||
}
|
||||
else if (htim->State == HAL_TIM_STATE_READY)
|
||||
else if (TIM_CHANNEL_N_STATE_GET(htim, Channel) == HAL_TIM_CHANNEL_STATE_READY)
|
||||
{
|
||||
if (((uint32_t)pData == 0U) && (Length > 0U))
|
||||
if ((pData == NULL) && (Length > 0U))
|
||||
{
|
||||
return HAL_ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
htim->State = HAL_TIM_STATE_BUSY;
|
||||
TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_BUSY);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* nothing to do */
|
||||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
switch (Channel)
|
||||
|
|
@ -733,15 +879,16 @@ HAL_StatusTypeDef HAL_TIMEx_OCN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Chan
|
|||
case TIM_CHANNEL_1:
|
||||
{
|
||||
/* Set the DMA compare callbacks */
|
||||
htim->hdma[TIM_DMA_ID_CC1]->XferCpltCallback = TIM_DMADelayPulseCplt;
|
||||
htim->hdma[TIM_DMA_ID_CC1]->XferCpltCallback = TIM_DMADelayPulseNCplt;
|
||||
htim->hdma[TIM_DMA_ID_CC1]->XferHalfCpltCallback = TIM_DMADelayPulseHalfCplt;
|
||||
|
||||
/* Set the DMA error callback */
|
||||
htim->hdma[TIM_DMA_ID_CC1]->XferErrorCallback = TIM_DMAError ;
|
||||
htim->hdma[TIM_DMA_ID_CC1]->XferErrorCallback = TIM_DMAErrorCCxN ;
|
||||
|
||||
/* Enable the DMA channel */
|
||||
if (HAL_DMA_Start_IT(htim->hdma[TIM_DMA_ID_CC1], (uint32_t)pData, (uint32_t)&htim->Instance->CCR1, Length) != HAL_OK)
|
||||
{
|
||||
/* Return error status */
|
||||
return HAL_ERROR;
|
||||
}
|
||||
/* Enable the TIM Output Compare DMA request */
|
||||
|
|
@ -752,15 +899,16 @@ HAL_StatusTypeDef HAL_TIMEx_OCN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Chan
|
|||
case TIM_CHANNEL_2:
|
||||
{
|
||||
/* Set the DMA compare callbacks */
|
||||
htim->hdma[TIM_DMA_ID_CC2]->XferCpltCallback = TIM_DMADelayPulseCplt;
|
||||
htim->hdma[TIM_DMA_ID_CC2]->XferCpltCallback = TIM_DMADelayPulseNCplt;
|
||||
htim->hdma[TIM_DMA_ID_CC2]->XferHalfCpltCallback = TIM_DMADelayPulseHalfCplt;
|
||||
|
||||
/* Set the DMA error callback */
|
||||
htim->hdma[TIM_DMA_ID_CC2]->XferErrorCallback = TIM_DMAError ;
|
||||
htim->hdma[TIM_DMA_ID_CC2]->XferErrorCallback = TIM_DMAErrorCCxN ;
|
||||
|
||||
/* Enable the DMA channel */
|
||||
if (HAL_DMA_Start_IT(htim->hdma[TIM_DMA_ID_CC2], (uint32_t)pData, (uint32_t)&htim->Instance->CCR2, Length) != HAL_OK)
|
||||
{
|
||||
/* Return error status */
|
||||
return HAL_ERROR;
|
||||
}
|
||||
/* Enable the TIM Output Compare DMA request */
|
||||
|
|
@ -771,15 +919,16 @@ HAL_StatusTypeDef HAL_TIMEx_OCN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Chan
|
|||
case TIM_CHANNEL_3:
|
||||
{
|
||||
/* Set the DMA compare callbacks */
|
||||
htim->hdma[TIM_DMA_ID_CC3]->XferCpltCallback = TIM_DMADelayPulseCplt;
|
||||
htim->hdma[TIM_DMA_ID_CC3]->XferCpltCallback = TIM_DMADelayPulseNCplt;
|
||||
htim->hdma[TIM_DMA_ID_CC3]->XferHalfCpltCallback = TIM_DMADelayPulseHalfCplt;
|
||||
|
||||
/* Set the DMA error callback */
|
||||
htim->hdma[TIM_DMA_ID_CC3]->XferErrorCallback = TIM_DMAError ;
|
||||
htim->hdma[TIM_DMA_ID_CC3]->XferErrorCallback = TIM_DMAErrorCCxN ;
|
||||
|
||||
/* Enable the DMA channel */
|
||||
if (HAL_DMA_Start_IT(htim->hdma[TIM_DMA_ID_CC3], (uint32_t)pData, (uint32_t)&htim->Instance->CCR3, Length) != HAL_OK)
|
||||
{
|
||||
/* Return error status */
|
||||
return HAL_ERROR;
|
||||
}
|
||||
/* Enable the TIM Output Compare DMA request */
|
||||
|
|
@ -798,11 +947,18 @@ HAL_StatusTypeDef HAL_TIMEx_OCN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Chan
|
|||
__HAL_TIM_MOE_ENABLE(htim);
|
||||
|
||||
/* Enable the Peripheral, except in trigger mode where enable is automatically done with trigger */
|
||||
if (IS_TIM_SLAVE_INSTANCE(htim->Instance))
|
||||
{
|
||||
tmpsmcr = htim->Instance->SMCR & TIM_SMCR_SMS;
|
||||
if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr))
|
||||
{
|
||||
__HAL_TIM_ENABLE(htim);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
__HAL_TIM_ENABLE(htim);
|
||||
}
|
||||
|
||||
/* Return function status */
|
||||
return HAL_OK;
|
||||
|
|
@ -863,8 +1019,8 @@ HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Chann
|
|||
/* Disable the Peripheral */
|
||||
__HAL_TIM_DISABLE(htim);
|
||||
|
||||
/* Change the htim state */
|
||||
htim->State = HAL_TIM_STATE_READY;
|
||||
/* Set the TIM complementary channel state */
|
||||
TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY);
|
||||
|
||||
/* Return function status */
|
||||
return HAL_OK;
|
||||
|
|
@ -921,6 +1077,15 @@ HAL_StatusTypeDef HAL_TIMEx_PWMN_Start(TIM_HandleTypeDef *htim, uint32_t Channel
|
|||
/* Check the parameters */
|
||||
assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, Channel));
|
||||
|
||||
/* Check the TIM complementary channel state */
|
||||
if (TIM_CHANNEL_N_STATE_GET(htim, Channel) != HAL_TIM_CHANNEL_STATE_READY)
|
||||
{
|
||||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
/* Set the TIM complementary channel state */
|
||||
TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_BUSY);
|
||||
|
||||
/* Enable the complementary PWM output */
|
||||
TIM_CCxNChannelCmd(htim->Instance, Channel, TIM_CCxN_ENABLE);
|
||||
|
||||
|
|
@ -928,11 +1093,18 @@ HAL_StatusTypeDef HAL_TIMEx_PWMN_Start(TIM_HandleTypeDef *htim, uint32_t Channel
|
|||
__HAL_TIM_MOE_ENABLE(htim);
|
||||
|
||||
/* Enable the Peripheral, except in trigger mode where enable is automatically done with trigger */
|
||||
if (IS_TIM_SLAVE_INSTANCE(htim->Instance))
|
||||
{
|
||||
tmpsmcr = htim->Instance->SMCR & TIM_SMCR_SMS;
|
||||
if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr))
|
||||
{
|
||||
__HAL_TIM_ENABLE(htim);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
__HAL_TIM_ENABLE(htim);
|
||||
}
|
||||
|
||||
/* Return function status */
|
||||
return HAL_OK;
|
||||
|
|
@ -962,6 +1134,9 @@ HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop(TIM_HandleTypeDef *htim, uint32_t Channel)
|
|||
/* Disable the Peripheral */
|
||||
__HAL_TIM_DISABLE(htim);
|
||||
|
||||
/* Set the TIM complementary channel state */
|
||||
TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY);
|
||||
|
||||
/* Return function status */
|
||||
return HAL_OK;
|
||||
}
|
||||
|
|
@ -984,6 +1159,15 @@ HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_IT(TIM_HandleTypeDef *htim, uint32_t Chan
|
|||
/* Check the parameters */
|
||||
assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, Channel));
|
||||
|
||||
/* Check the TIM complementary channel state */
|
||||
if (TIM_CHANNEL_N_STATE_GET(htim, Channel) != HAL_TIM_CHANNEL_STATE_READY)
|
||||
{
|
||||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
/* Set the TIM complementary channel state */
|
||||
TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_BUSY);
|
||||
|
||||
switch (Channel)
|
||||
{
|
||||
case TIM_CHANNEL_1:
|
||||
|
|
@ -1021,11 +1205,18 @@ HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_IT(TIM_HandleTypeDef *htim, uint32_t Chan
|
|||
__HAL_TIM_MOE_ENABLE(htim);
|
||||
|
||||
/* Enable the Peripheral, except in trigger mode where enable is automatically done with trigger */
|
||||
if (IS_TIM_SLAVE_INSTANCE(htim->Instance))
|
||||
{
|
||||
tmpsmcr = htim->Instance->SMCR & TIM_SMCR_SMS;
|
||||
if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr))
|
||||
{
|
||||
__HAL_TIM_ENABLE(htim);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
__HAL_TIM_ENABLE(htim);
|
||||
}
|
||||
|
||||
/* Return function status */
|
||||
return HAL_OK;
|
||||
|
|
@ -1092,6 +1283,9 @@ HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Chann
|
|||
/* Disable the Peripheral */
|
||||
__HAL_TIM_DISABLE(htim);
|
||||
|
||||
/* Set the TIM complementary channel state */
|
||||
TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY);
|
||||
|
||||
/* Return function status */
|
||||
return HAL_OK;
|
||||
}
|
||||
|
|
@ -1116,39 +1310,42 @@ HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Cha
|
|||
/* Check the parameters */
|
||||
assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, Channel));
|
||||
|
||||
if (htim->State == HAL_TIM_STATE_BUSY)
|
||||
/* Set the TIM complementary channel state */
|
||||
if (TIM_CHANNEL_N_STATE_GET(htim, Channel) == HAL_TIM_CHANNEL_STATE_BUSY)
|
||||
{
|
||||
return HAL_BUSY;
|
||||
}
|
||||
else if (htim->State == HAL_TIM_STATE_READY)
|
||||
else if (TIM_CHANNEL_N_STATE_GET(htim, Channel) == HAL_TIM_CHANNEL_STATE_READY)
|
||||
{
|
||||
if (((uint32_t)pData == 0U) && (Length > 0U))
|
||||
if ((pData == NULL) && (Length > 0U))
|
||||
{
|
||||
return HAL_ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
htim->State = HAL_TIM_STATE_BUSY;
|
||||
TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_BUSY);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* nothing to do */
|
||||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
switch (Channel)
|
||||
{
|
||||
case TIM_CHANNEL_1:
|
||||
{
|
||||
/* Set the DMA compare callbacks */
|
||||
htim->hdma[TIM_DMA_ID_CC1]->XferCpltCallback = TIM_DMADelayPulseCplt;
|
||||
htim->hdma[TIM_DMA_ID_CC1]->XferCpltCallback = TIM_DMADelayPulseNCplt;
|
||||
htim->hdma[TIM_DMA_ID_CC1]->XferHalfCpltCallback = TIM_DMADelayPulseHalfCplt;
|
||||
|
||||
/* Set the DMA error callback */
|
||||
htim->hdma[TIM_DMA_ID_CC1]->XferErrorCallback = TIM_DMAError ;
|
||||
htim->hdma[TIM_DMA_ID_CC1]->XferErrorCallback = TIM_DMAErrorCCxN ;
|
||||
|
||||
/* Enable the DMA channel */
|
||||
if (HAL_DMA_Start_IT(htim->hdma[TIM_DMA_ID_CC1], (uint32_t)pData, (uint32_t)&htim->Instance->CCR1, Length) != HAL_OK)
|
||||
{
|
||||
/* Return error status */
|
||||
return HAL_ERROR;
|
||||
}
|
||||
/* Enable the TIM Capture/Compare 1 DMA request */
|
||||
|
|
@ -1159,15 +1356,16 @@ HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Cha
|
|||
case TIM_CHANNEL_2:
|
||||
{
|
||||
/* Set the DMA compare callbacks */
|
||||
htim->hdma[TIM_DMA_ID_CC2]->XferCpltCallback = TIM_DMADelayPulseCplt;
|
||||
htim->hdma[TIM_DMA_ID_CC2]->XferCpltCallback = TIM_DMADelayPulseNCplt;
|
||||
htim->hdma[TIM_DMA_ID_CC2]->XferHalfCpltCallback = TIM_DMADelayPulseHalfCplt;
|
||||
|
||||
/* Set the DMA error callback */
|
||||
htim->hdma[TIM_DMA_ID_CC2]->XferErrorCallback = TIM_DMAError ;
|
||||
htim->hdma[TIM_DMA_ID_CC2]->XferErrorCallback = TIM_DMAErrorCCxN ;
|
||||
|
||||
/* Enable the DMA channel */
|
||||
if (HAL_DMA_Start_IT(htim->hdma[TIM_DMA_ID_CC2], (uint32_t)pData, (uint32_t)&htim->Instance->CCR2, Length) != HAL_OK)
|
||||
{
|
||||
/* Return error status */
|
||||
return HAL_ERROR;
|
||||
}
|
||||
/* Enable the TIM Capture/Compare 2 DMA request */
|
||||
|
|
@ -1178,15 +1376,16 @@ HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Cha
|
|||
case TIM_CHANNEL_3:
|
||||
{
|
||||
/* Set the DMA compare callbacks */
|
||||
htim->hdma[TIM_DMA_ID_CC3]->XferCpltCallback = TIM_DMADelayPulseCplt;
|
||||
htim->hdma[TIM_DMA_ID_CC3]->XferCpltCallback = TIM_DMADelayPulseNCplt;
|
||||
htim->hdma[TIM_DMA_ID_CC3]->XferHalfCpltCallback = TIM_DMADelayPulseHalfCplt;
|
||||
|
||||
/* Set the DMA error callback */
|
||||
htim->hdma[TIM_DMA_ID_CC3]->XferErrorCallback = TIM_DMAError ;
|
||||
htim->hdma[TIM_DMA_ID_CC3]->XferErrorCallback = TIM_DMAErrorCCxN ;
|
||||
|
||||
/* Enable the DMA channel */
|
||||
if (HAL_DMA_Start_IT(htim->hdma[TIM_DMA_ID_CC3], (uint32_t)pData, (uint32_t)&htim->Instance->CCR3, Length) != HAL_OK)
|
||||
{
|
||||
/* Return error status */
|
||||
return HAL_ERROR;
|
||||
}
|
||||
/* Enable the TIM Capture/Compare 3 DMA request */
|
||||
|
|
@ -1205,11 +1404,18 @@ HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Cha
|
|||
__HAL_TIM_MOE_ENABLE(htim);
|
||||
|
||||
/* Enable the Peripheral, except in trigger mode where enable is automatically done with trigger */
|
||||
if (IS_TIM_SLAVE_INSTANCE(htim->Instance))
|
||||
{
|
||||
tmpsmcr = htim->Instance->SMCR & TIM_SMCR_SMS;
|
||||
if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr))
|
||||
{
|
||||
__HAL_TIM_ENABLE(htim);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
__HAL_TIM_ENABLE(htim);
|
||||
}
|
||||
|
||||
/* Return function status */
|
||||
return HAL_OK;
|
||||
|
|
@ -1270,8 +1476,8 @@ HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Chan
|
|||
/* Disable the Peripheral */
|
||||
__HAL_TIM_DISABLE(htim);
|
||||
|
||||
/* Change the htim state */
|
||||
htim->State = HAL_TIM_STATE_READY;
|
||||
/* Set the TIM complementary channel state */
|
||||
TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY);
|
||||
|
||||
/* Return function status */
|
||||
return HAL_OK;
|
||||
|
|
@ -1311,11 +1517,27 @@ HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Chan
|
|||
*/
|
||||
HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start(TIM_HandleTypeDef *htim, uint32_t OutputChannel)
|
||||
{
|
||||
uint32_t input_channel = (OutputChannel == TIM_CHANNEL_1) ? TIM_CHANNEL_2 : TIM_CHANNEL_1;
|
||||
HAL_TIM_ChannelStateTypeDef input_channel_state = TIM_CHANNEL_STATE_GET(htim, input_channel);
|
||||
HAL_TIM_ChannelStateTypeDef output_channel_state = TIM_CHANNEL_N_STATE_GET(htim, OutputChannel);
|
||||
|
||||
/* Check the parameters */
|
||||
assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, OutputChannel));
|
||||
|
||||
/* Enable the complementary One Pulse output */
|
||||
/* Check the TIM channels state */
|
||||
if ((output_channel_state != HAL_TIM_CHANNEL_STATE_READY)
|
||||
|| (input_channel_state != HAL_TIM_CHANNEL_STATE_READY))
|
||||
{
|
||||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
/* Set the TIM channels state */
|
||||
TIM_CHANNEL_N_STATE_SET(htim, OutputChannel, HAL_TIM_CHANNEL_STATE_BUSY);
|
||||
TIM_CHANNEL_STATE_SET(htim, input_channel, HAL_TIM_CHANNEL_STATE_BUSY);
|
||||
|
||||
/* Enable the complementary One Pulse output channel and the Input Capture channel */
|
||||
TIM_CCxNChannelCmd(htim->Instance, OutputChannel, TIM_CCxN_ENABLE);
|
||||
TIM_CCxChannelCmd(htim->Instance, input_channel, TIM_CCx_ENABLE);
|
||||
|
||||
/* Enable the Main Output */
|
||||
__HAL_TIM_MOE_ENABLE(htim);
|
||||
|
|
@ -1336,12 +1558,14 @@ HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start(TIM_HandleTypeDef *htim, uint32_t Ou
|
|||
*/
|
||||
HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop(TIM_HandleTypeDef *htim, uint32_t OutputChannel)
|
||||
{
|
||||
uint32_t input_channel = (OutputChannel == TIM_CHANNEL_1) ? TIM_CHANNEL_2 : TIM_CHANNEL_1;
|
||||
|
||||
/* Check the parameters */
|
||||
assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, OutputChannel));
|
||||
|
||||
/* Disable the complementary One Pulse output */
|
||||
/* Disable the complementary One Pulse output channel and the Input Capture channel */
|
||||
TIM_CCxNChannelCmd(htim->Instance, OutputChannel, TIM_CCxN_DISABLE);
|
||||
TIM_CCxChannelCmd(htim->Instance, input_channel, TIM_CCx_DISABLE);
|
||||
|
||||
/* Disable the Main Output */
|
||||
__HAL_TIM_MOE_DISABLE(htim);
|
||||
|
|
@ -1349,6 +1573,10 @@ HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop(TIM_HandleTypeDef *htim, uint32_t Out
|
|||
/* Disable the Peripheral */
|
||||
__HAL_TIM_DISABLE(htim);
|
||||
|
||||
/* Set the TIM channels state */
|
||||
TIM_CHANNEL_N_STATE_SET(htim, OutputChannel, HAL_TIM_CHANNEL_STATE_READY);
|
||||
TIM_CHANNEL_STATE_SET(htim, input_channel, HAL_TIM_CHANNEL_STATE_READY);
|
||||
|
||||
/* Return function status */
|
||||
return HAL_OK;
|
||||
}
|
||||
|
|
@ -1365,17 +1593,33 @@ HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop(TIM_HandleTypeDef *htim, uint32_t Out
|
|||
*/
|
||||
HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start_IT(TIM_HandleTypeDef *htim, uint32_t OutputChannel)
|
||||
{
|
||||
uint32_t input_channel = (OutputChannel == TIM_CHANNEL_1) ? TIM_CHANNEL_2 : TIM_CHANNEL_1;
|
||||
HAL_TIM_ChannelStateTypeDef input_channel_state = TIM_CHANNEL_STATE_GET(htim, input_channel);
|
||||
HAL_TIM_ChannelStateTypeDef output_channel_state = TIM_CHANNEL_N_STATE_GET(htim, OutputChannel);
|
||||
|
||||
/* Check the parameters */
|
||||
assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, OutputChannel));
|
||||
|
||||
/* Check the TIM channels state */
|
||||
if ((output_channel_state != HAL_TIM_CHANNEL_STATE_READY)
|
||||
|| (input_channel_state != HAL_TIM_CHANNEL_STATE_READY))
|
||||
{
|
||||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
/* Set the TIM channels state */
|
||||
TIM_CHANNEL_N_STATE_SET(htim, OutputChannel, HAL_TIM_CHANNEL_STATE_BUSY);
|
||||
TIM_CHANNEL_STATE_SET(htim, input_channel, HAL_TIM_CHANNEL_STATE_BUSY);
|
||||
|
||||
/* Enable the TIM Capture/Compare 1 interrupt */
|
||||
__HAL_TIM_ENABLE_IT(htim, TIM_IT_CC1);
|
||||
|
||||
/* Enable the TIM Capture/Compare 2 interrupt */
|
||||
__HAL_TIM_ENABLE_IT(htim, TIM_IT_CC2);
|
||||
|
||||
/* Enable the complementary One Pulse output */
|
||||
/* Enable the complementary One Pulse output channel and the Input Capture channel */
|
||||
TIM_CCxNChannelCmd(htim->Instance, OutputChannel, TIM_CCxN_ENABLE);
|
||||
TIM_CCxChannelCmd(htim->Instance, input_channel, TIM_CCx_ENABLE);
|
||||
|
||||
/* Enable the Main Output */
|
||||
__HAL_TIM_MOE_ENABLE(htim);
|
||||
|
|
@ -1396,6 +1640,8 @@ HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start_IT(TIM_HandleTypeDef *htim, uint32_t
|
|||
*/
|
||||
HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t OutputChannel)
|
||||
{
|
||||
uint32_t input_channel = (OutputChannel == TIM_CHANNEL_1) ? TIM_CHANNEL_2 : TIM_CHANNEL_1;
|
||||
|
||||
/* Check the parameters */
|
||||
assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, OutputChannel));
|
||||
|
||||
|
|
@ -1405,8 +1651,9 @@ HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t
|
|||
/* Disable the TIM Capture/Compare 2 interrupt */
|
||||
__HAL_TIM_DISABLE_IT(htim, TIM_IT_CC2);
|
||||
|
||||
/* Disable the complementary One Pulse output */
|
||||
/* Disable the complementary One Pulse output channel and the Input Capture channel */
|
||||
TIM_CCxNChannelCmd(htim->Instance, OutputChannel, TIM_CCxN_DISABLE);
|
||||
TIM_CCxChannelCmd(htim->Instance, input_channel, TIM_CCx_DISABLE);
|
||||
|
||||
/* Disable the Main Output */
|
||||
__HAL_TIM_MOE_DISABLE(htim);
|
||||
|
|
@ -1414,6 +1661,10 @@ HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t
|
|||
/* Disable the Peripheral */
|
||||
__HAL_TIM_DISABLE(htim);
|
||||
|
||||
/* Set the TIM channels state */
|
||||
TIM_CHANNEL_N_STATE_SET(htim, OutputChannel, HAL_TIM_CHANNEL_STATE_READY);
|
||||
TIM_CHANNEL_STATE_SET(htim, input_channel, HAL_TIM_CHANNEL_STATE_READY);
|
||||
|
||||
/* Return function status */
|
||||
return HAL_OK;
|
||||
}
|
||||
|
|
@ -1633,7 +1884,7 @@ HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef *htim,
|
|||
uint32_t tmpsmcr;
|
||||
|
||||
/* Check the parameters */
|
||||
assert_param(IS_TIM_SYNCHRO_INSTANCE(htim->Instance));
|
||||
assert_param(IS_TIM_MASTER_INSTANCE(htim->Instance));
|
||||
assert_param(IS_TIM_TRGO_SOURCE(sMasterConfig->MasterOutputTrigger));
|
||||
assert_param(IS_TIM_MSM_STATE(sMasterConfig->MasterSlaveMode));
|
||||
|
||||
|
|
@ -1654,16 +1905,19 @@ HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef *htim,
|
|||
/* Select the TRGO source */
|
||||
tmpcr2 |= sMasterConfig->MasterOutputTrigger;
|
||||
|
||||
/* Update TIMx CR2 */
|
||||
htim->Instance->CR2 = tmpcr2;
|
||||
|
||||
if (IS_TIM_SLAVE_INSTANCE(htim->Instance))
|
||||
{
|
||||
/* Reset the MSM Bit */
|
||||
tmpsmcr &= ~TIM_SMCR_MSM;
|
||||
/* Set master mode */
|
||||
tmpsmcr |= sMasterConfig->MasterSlaveMode;
|
||||
|
||||
/* Update TIMx CR2 */
|
||||
htim->Instance->CR2 = tmpcr2;
|
||||
|
||||
/* Update TIMx SMCR */
|
||||
htim->Instance->SMCR = tmpsmcr;
|
||||
}
|
||||
|
||||
/* Change the htim state */
|
||||
htim->State = HAL_TIM_STATE_READY;
|
||||
|
|
@ -1733,6 +1987,9 @@ HAL_StatusTypeDef HAL_TIMEx_ConfigBreakDeadTime(TIM_HandleTypeDef *htim,
|
|||
*/
|
||||
HAL_StatusTypeDef HAL_TIMEx_RemapConfig(TIM_HandleTypeDef *htim, uint32_t Remap)
|
||||
{
|
||||
/* Prevent unused argument(s) compilation warning */
|
||||
UNUSED(htim);
|
||||
UNUSED(Remap);
|
||||
|
||||
return HAL_OK;
|
||||
}
|
||||
|
|
@ -1829,6 +2086,27 @@ HAL_TIM_StateTypeDef HAL_TIMEx_HallSensor_GetState(TIM_HandleTypeDef *htim)
|
|||
return htim->State;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Return actual state of the TIM complementary channel.
|
||||
* @param htim TIM handle
|
||||
* @param ChannelN TIM Complementary channel
|
||||
* This parameter can be one of the following values:
|
||||
* @arg TIM_CHANNEL_1: TIM Channel 1
|
||||
* @arg TIM_CHANNEL_2: TIM Channel 2
|
||||
* @arg TIM_CHANNEL_3: TIM Channel 3
|
||||
* @retval TIM Complementary channel state
|
||||
*/
|
||||
HAL_TIM_ChannelStateTypeDef HAL_TIMEx_GetChannelNState(TIM_HandleTypeDef *htim, uint32_t ChannelN)
|
||||
{
|
||||
HAL_TIM_ChannelStateTypeDef channel_state;
|
||||
|
||||
/* Check the parameters */
|
||||
assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, ChannelN));
|
||||
|
||||
channel_state = TIM_CHANNEL_N_STATE_GET(htim, ChannelN);
|
||||
|
||||
return channel_state;
|
||||
}
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -1881,6 +2159,103 @@ void TIMEx_DMACommutationHalfCplt(DMA_HandleTypeDef *hdma)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief TIM DMA Delay Pulse complete callback (complementary channel).
|
||||
* @param hdma pointer to DMA handle.
|
||||
* @retval None
|
||||
*/
|
||||
static void TIM_DMADelayPulseNCplt(DMA_HandleTypeDef *hdma)
|
||||
{
|
||||
TIM_HandleTypeDef *htim = (TIM_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent;
|
||||
|
||||
if (hdma == htim->hdma[TIM_DMA_ID_CC1])
|
||||
{
|
||||
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_1;
|
||||
|
||||
if (hdma->Init.Mode == DMA_NORMAL)
|
||||
{
|
||||
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY);
|
||||
}
|
||||
}
|
||||
else if (hdma == htim->hdma[TIM_DMA_ID_CC2])
|
||||
{
|
||||
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_2;
|
||||
|
||||
if (hdma->Init.Mode == DMA_NORMAL)
|
||||
{
|
||||
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY);
|
||||
}
|
||||
}
|
||||
else if (hdma == htim->hdma[TIM_DMA_ID_CC3])
|
||||
{
|
||||
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_3;
|
||||
|
||||
if (hdma->Init.Mode == DMA_NORMAL)
|
||||
{
|
||||
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_3, HAL_TIM_CHANNEL_STATE_READY);
|
||||
}
|
||||
}
|
||||
else if (hdma == htim->hdma[TIM_DMA_ID_CC4])
|
||||
{
|
||||
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_4;
|
||||
|
||||
if (hdma->Init.Mode == DMA_NORMAL)
|
||||
{
|
||||
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_4, HAL_TIM_CHANNEL_STATE_READY);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* nothing to do */
|
||||
}
|
||||
|
||||
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
|
||||
htim->PWM_PulseFinishedCallback(htim);
|
||||
#else
|
||||
HAL_TIM_PWM_PulseFinishedCallback(htim);
|
||||
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
|
||||
|
||||
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief TIM DMA error callback (complementary channel)
|
||||
* @param hdma pointer to DMA handle.
|
||||
* @retval None
|
||||
*/
|
||||
static void TIM_DMAErrorCCxN(DMA_HandleTypeDef *hdma)
|
||||
{
|
||||
TIM_HandleTypeDef *htim = (TIM_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent;
|
||||
|
||||
if (hdma == htim->hdma[TIM_DMA_ID_CC1])
|
||||
{
|
||||
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_1;
|
||||
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY);
|
||||
}
|
||||
else if (hdma == htim->hdma[TIM_DMA_ID_CC2])
|
||||
{
|
||||
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_2;
|
||||
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY);
|
||||
}
|
||||
else if (hdma == htim->hdma[TIM_DMA_ID_CC3])
|
||||
{
|
||||
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_3;
|
||||
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_3, HAL_TIM_CHANNEL_STATE_READY);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* nothing to do */
|
||||
}
|
||||
|
||||
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
|
||||
htim->ErrorCallback(htim);
|
||||
#else
|
||||
HAL_TIM_ErrorCallback(htim);
|
||||
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
|
||||
|
||||
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Enables or disables the TIM Capture Compare Channel xN.
|
||||
* @param TIMx to select the TIM peripheral
|
||||
|
|
|
|||
|
|
@ -1026,7 +1026,8 @@ HAL_StatusTypeDef HAL_UART_UnRegisterCallback(UART_HandleTypeDef *huart, HAL_UAR
|
|||
*/
|
||||
HAL_StatusTypeDef HAL_UART_Transmit(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size, uint32_t Timeout)
|
||||
{
|
||||
uint16_t *tmp;
|
||||
uint8_t *pdata8bits;
|
||||
uint16_t *pdata16bits;
|
||||
uint32_t tickstart = 0U;
|
||||
|
||||
/* Check that a Tx process is not already ongoing */
|
||||
|
|
@ -1048,34 +1049,39 @@ HAL_StatusTypeDef HAL_UART_Transmit(UART_HandleTypeDef *huart, uint8_t *pData, u
|
|||
|
||||
huart->TxXferSize = Size;
|
||||
huart->TxXferCount = Size;
|
||||
|
||||
/* In case of 9bits/No Parity transfer, pData needs to be handled as a uint16_t pointer */
|
||||
if ((huart->Init.WordLength == UART_WORDLENGTH_9B) && (huart->Init.Parity == UART_PARITY_NONE))
|
||||
{
|
||||
pdata8bits = NULL;
|
||||
pdata16bits = (uint16_t *) pData;
|
||||
}
|
||||
else
|
||||
{
|
||||
pdata8bits = pData;
|
||||
pdata16bits = NULL;
|
||||
}
|
||||
|
||||
/* Process Unlocked */
|
||||
__HAL_UNLOCK(huart);
|
||||
|
||||
while (huart->TxXferCount > 0U)
|
||||
{
|
||||
if (UART_WaitOnFlagUntilTimeout(huart, UART_FLAG_TXE, RESET, tickstart, Timeout) != HAL_OK)
|
||||
{
|
||||
return HAL_TIMEOUT;
|
||||
}
|
||||
if (pdata8bits == NULL)
|
||||
{
|
||||
huart->Instance->DR = (uint16_t)(*pdata16bits & 0x01FFU);
|
||||
pdata16bits++;
|
||||
}
|
||||
else
|
||||
{
|
||||
huart->Instance->DR = (uint8_t)(*pdata8bits & 0xFFU);
|
||||
pdata8bits++;
|
||||
}
|
||||
huart->TxXferCount--;
|
||||
if (huart->Init.WordLength == UART_WORDLENGTH_9B)
|
||||
{
|
||||
if (UART_WaitOnFlagUntilTimeout(huart, UART_FLAG_TXE, RESET, tickstart, Timeout) != HAL_OK)
|
||||
{
|
||||
return HAL_TIMEOUT;
|
||||
}
|
||||
tmp = (uint16_t *) pData;
|
||||
huart->Instance->DR = (*tmp & (uint16_t)0x01FF);
|
||||
if (huart->Init.Parity == UART_PARITY_NONE)
|
||||
{
|
||||
pData += 2U;
|
||||
}
|
||||
else
|
||||
{
|
||||
pData += 1U;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (UART_WaitOnFlagUntilTimeout(huart, UART_FLAG_TXE, RESET, tickstart, Timeout) != HAL_OK)
|
||||
{
|
||||
return HAL_TIMEOUT;
|
||||
}
|
||||
huart->Instance->DR = (*pData++ & (uint8_t)0xFF);
|
||||
}
|
||||
}
|
||||
|
||||
if (UART_WaitOnFlagUntilTimeout(huart, UART_FLAG_TC, RESET, tickstart, Timeout) != HAL_OK)
|
||||
|
|
@ -1086,9 +1092,6 @@ HAL_StatusTypeDef HAL_UART_Transmit(UART_HandleTypeDef *huart, uint8_t *pData, u
|
|||
/* At end of Tx process, restore huart->gState to Ready */
|
||||
huart->gState = HAL_UART_STATE_READY;
|
||||
|
||||
/* Process Unlocked */
|
||||
__HAL_UNLOCK(huart);
|
||||
|
||||
return HAL_OK;
|
||||
}
|
||||
else
|
||||
|
|
@ -1111,7 +1114,8 @@ HAL_StatusTypeDef HAL_UART_Transmit(UART_HandleTypeDef *huart, uint8_t *pData, u
|
|||
*/
|
||||
HAL_StatusTypeDef HAL_UART_Receive(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size, uint32_t Timeout)
|
||||
{
|
||||
uint16_t *tmp;
|
||||
uint8_t *pdata8bits;
|
||||
uint16_t *pdata16bits;
|
||||
uint32_t tickstart = 0U;
|
||||
|
||||
/* Check that a Rx process is not already ongoing */
|
||||
|
|
@ -1134,53 +1138,51 @@ HAL_StatusTypeDef HAL_UART_Receive(UART_HandleTypeDef *huart, uint8_t *pData, ui
|
|||
huart->RxXferSize = Size;
|
||||
huart->RxXferCount = Size;
|
||||
|
||||
/* In case of 9bits/No Parity transfer, pRxData needs to be handled as a uint16_t pointer */
|
||||
if ((huart->Init.WordLength == UART_WORDLENGTH_9B) && (huart->Init.Parity == UART_PARITY_NONE))
|
||||
{
|
||||
pdata8bits = NULL;
|
||||
pdata16bits = (uint16_t *) pData;
|
||||
}
|
||||
else
|
||||
{
|
||||
pdata8bits = pData;
|
||||
pdata16bits = NULL;
|
||||
}
|
||||
|
||||
/* Process Unlocked */
|
||||
__HAL_UNLOCK(huart);
|
||||
|
||||
/* Check the remain data to be received */
|
||||
while (huart->RxXferCount > 0U)
|
||||
{
|
||||
if (UART_WaitOnFlagUntilTimeout(huart, UART_FLAG_RXNE, RESET, tickstart, Timeout) != HAL_OK)
|
||||
{
|
||||
return HAL_TIMEOUT;
|
||||
}
|
||||
if (pdata8bits == NULL)
|
||||
{
|
||||
*pdata16bits = (uint16_t)(huart->Instance->DR & 0x01FF);
|
||||
pdata16bits++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((huart->Init.WordLength == UART_WORDLENGTH_9B) || ((huart->Init.WordLength == UART_WORDLENGTH_8B) && (huart->Init.Parity == UART_PARITY_NONE)))
|
||||
{
|
||||
*pdata8bits = (uint8_t)(huart->Instance->DR & (uint8_t)0x00FF);
|
||||
}
|
||||
else
|
||||
{
|
||||
*pdata8bits = (uint8_t)(huart->Instance->DR & (uint8_t)0x007F);
|
||||
}
|
||||
pdata8bits++;
|
||||
}
|
||||
huart->RxXferCount--;
|
||||
if (huart->Init.WordLength == UART_WORDLENGTH_9B)
|
||||
{
|
||||
if (UART_WaitOnFlagUntilTimeout(huart, UART_FLAG_RXNE, RESET, tickstart, Timeout) != HAL_OK)
|
||||
{
|
||||
return HAL_TIMEOUT;
|
||||
}
|
||||
tmp = (uint16_t *) pData;
|
||||
if (huart->Init.Parity == UART_PARITY_NONE)
|
||||
{
|
||||
*tmp = (uint16_t)(huart->Instance->DR & (uint16_t)0x01FF);
|
||||
pData += 2U;
|
||||
}
|
||||
else
|
||||
{
|
||||
*tmp = (uint16_t)(huart->Instance->DR & (uint16_t)0x00FF);
|
||||
pData += 1U;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (UART_WaitOnFlagUntilTimeout(huart, UART_FLAG_RXNE, RESET, tickstart, Timeout) != HAL_OK)
|
||||
{
|
||||
return HAL_TIMEOUT;
|
||||
}
|
||||
if (huart->Init.Parity == UART_PARITY_NONE)
|
||||
{
|
||||
*pData++ = (uint8_t)(huart->Instance->DR & (uint8_t)0x00FF);
|
||||
}
|
||||
else
|
||||
{
|
||||
*pData++ = (uint8_t)(huart->Instance->DR & (uint8_t)0x007F);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/* At end of Rx process, restore huart->RxState to Ready */
|
||||
huart->RxState = HAL_UART_STATE_READY;
|
||||
|
||||
/* Process Unlocked */
|
||||
__HAL_UNLOCK(huart);
|
||||
|
||||
return HAL_OK;
|
||||
}
|
||||
else
|
||||
|
|
@ -2060,7 +2062,7 @@ void HAL_UART_IRQHandler(UART_HandleTypeDef *huart)
|
|||
}
|
||||
|
||||
/* UART Over-Run interrupt occurred --------------------------------------*/
|
||||
if (((isrflags & USART_SR_ORE) != RESET) && ((cr3its & USART_CR3_EIE) != RESET))
|
||||
if (((isrflags & USART_SR_ORE) != RESET) && (((cr1its & USART_CR1_RXNEIE) != RESET) || ((cr3its & USART_CR3_EIE) != RESET)))
|
||||
{
|
||||
huart->ErrorCode |= HAL_UART_ERROR_ORE;
|
||||
}
|
||||
|
|
@ -2924,20 +2926,13 @@ static HAL_StatusTypeDef UART_Transmit_IT(UART_HandleTypeDef *huart)
|
|||
/* Check that a Tx process is ongoing */
|
||||
if (huart->gState == HAL_UART_STATE_BUSY_TX)
|
||||
{
|
||||
if (huart->Init.WordLength == UART_WORDLENGTH_9B)
|
||||
if ((huart->Init.WordLength == UART_WORDLENGTH_9B) && (huart->Init.Parity == UART_PARITY_NONE))
|
||||
{
|
||||
tmp = (uint16_t *) huart->pTxBuffPtr;
|
||||
huart->Instance->DR = (uint16_t)(*tmp & (uint16_t)0x01FF);
|
||||
if (huart->Init.Parity == UART_PARITY_NONE)
|
||||
{
|
||||
huart->pTxBuffPtr += 2U;
|
||||
}
|
||||
else
|
||||
{
|
||||
huart->pTxBuffPtr += 1U;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
huart->Instance->DR = (uint8_t)(*huart->pTxBuffPtr++ & (uint8_t)0x00FF);
|
||||
}
|
||||
|
|
@ -2991,36 +2986,34 @@ static HAL_StatusTypeDef UART_EndTransmit_IT(UART_HandleTypeDef *huart)
|
|||
*/
|
||||
static HAL_StatusTypeDef UART_Receive_IT(UART_HandleTypeDef *huart)
|
||||
{
|
||||
uint16_t *tmp;
|
||||
uint8_t *pdata8bits;
|
||||
uint16_t *pdata16bits;
|
||||
|
||||
/* Check that a Rx process is ongoing */
|
||||
if (huart->RxState == HAL_UART_STATE_BUSY_RX)
|
||||
{
|
||||
if (huart->Init.WordLength == UART_WORDLENGTH_9B)
|
||||
if ((huart->Init.WordLength == UART_WORDLENGTH_9B) && (huart->Init.Parity == UART_PARITY_NONE))
|
||||
{
|
||||
tmp = (uint16_t *) huart->pRxBuffPtr;
|
||||
if (huart->Init.Parity == UART_PARITY_NONE)
|
||||
{
|
||||
*tmp = (uint16_t)(huart->Instance->DR & (uint16_t)0x01FF);
|
||||
pdata8bits = NULL;
|
||||
pdata16bits = (uint16_t *) huart->pRxBuffPtr;
|
||||
*pdata16bits = (uint16_t)(huart->Instance->DR & (uint16_t)0x01FF);
|
||||
huart->pRxBuffPtr += 2U;
|
||||
}
|
||||
else
|
||||
{
|
||||
*tmp = (uint16_t)(huart->Instance->DR & (uint16_t)0x00FF);
|
||||
pdata8bits = (uint8_t *) huart->pRxBuffPtr;
|
||||
pdata16bits = NULL;
|
||||
|
||||
if ((huart->Init.WordLength == UART_WORDLENGTH_9B) || ((huart->Init.WordLength == UART_WORDLENGTH_8B) && (huart->Init.Parity == UART_PARITY_NONE)))
|
||||
{
|
||||
*pdata8bits = (uint8_t)(huart->Instance->DR & (uint8_t)0x00FF);
|
||||
}
|
||||
else
|
||||
{
|
||||
*pdata8bits = (uint8_t)(huart->Instance->DR & (uint8_t)0x007F);
|
||||
}
|
||||
huart->pRxBuffPtr += 1U;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (huart->Init.Parity == UART_PARITY_NONE)
|
||||
{
|
||||
*huart->pRxBuffPtr++ = (uint8_t)(huart->Instance->DR & (uint8_t)0x00FF);
|
||||
}
|
||||
else
|
||||
{
|
||||
*huart->pRxBuffPtr++ = (uint8_t)(huart->Instance->DR & (uint8_t)0x007F);
|
||||
}
|
||||
}
|
||||
|
||||
if (--huart->RxXferCount == 0U)
|
||||
{
|
||||
|
|
@ -3099,48 +3092,28 @@ static void UART_SetConfig(UART_HandleTypeDef *huart)
|
|||
/* Configure the UART HFC: Set CTSE and RTSE bits according to huart->Init.HwFlowCtl value */
|
||||
MODIFY_REG(huart->Instance->CR3, (USART_CR3_RTSE | USART_CR3_CTSE), huart->Init.HwFlowCtl);
|
||||
|
||||
|
||||
if(huart->Instance == USART1)
|
||||
{
|
||||
pclk = HAL_RCC_GetPCLK2Freq();
|
||||
}
|
||||
else
|
||||
{
|
||||
pclk = HAL_RCC_GetPCLK1Freq();
|
||||
}
|
||||
|
||||
/*-------------------------- USART BRR Configuration ---------------------*/
|
||||
#if defined(USART_CR1_OVER8)
|
||||
/* Check the Over Sampling */
|
||||
if (huart->Init.OverSampling == UART_OVERSAMPLING_8)
|
||||
{
|
||||
/*-------------------------- USART BRR Configuration ---------------------*/
|
||||
if(huart->Instance == USART1)
|
||||
{
|
||||
pclk = HAL_RCC_GetPCLK2Freq();
|
||||
huart->Instance->BRR = UART_BRR_SAMPLING8(pclk, huart->Init.BaudRate);
|
||||
}
|
||||
else
|
||||
{
|
||||
pclk = HAL_RCC_GetPCLK1Freq();
|
||||
huart->Instance->BRR = UART_BRR_SAMPLING8(pclk, huart->Init.BaudRate);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*-------------------------- USART BRR Configuration ---------------------*/
|
||||
if(huart->Instance == USART1)
|
||||
{
|
||||
pclk = HAL_RCC_GetPCLK2Freq();
|
||||
huart->Instance->BRR = UART_BRR_SAMPLING16(pclk, huart->Init.BaudRate);
|
||||
}
|
||||
else
|
||||
{
|
||||
pclk = HAL_RCC_GetPCLK1Freq();
|
||||
huart->Instance->BRR = UART_BRR_SAMPLING16(pclk, huart->Init.BaudRate);
|
||||
}
|
||||
}
|
||||
#else
|
||||
/*-------------------------- USART BRR Configuration ---------------------*/
|
||||
if(huart->Instance == USART1)
|
||||
{
|
||||
pclk = HAL_RCC_GetPCLK2Freq();
|
||||
huart->Instance->BRR = UART_BRR_SAMPLING16(pclk, huart->Init.BaudRate);
|
||||
}
|
||||
else
|
||||
{
|
||||
pclk = HAL_RCC_GetPCLK1Freq();
|
||||
huart->Instance->BRR = UART_BRR_SAMPLING16(pclk, huart->Init.BaudRate);
|
||||
}
|
||||
#endif /* USART_CR1_OVER8 */
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -537,9 +537,9 @@ HAL_StatusTypeDef HAL_USART_RegisterCallback(USART_HandleTypeDef *husart, HAL_US
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Unregister an UART Callback
|
||||
* UART callaback is redirected to the weak predefined callback
|
||||
* @param husart uart handle
|
||||
* @brief Unregister an USART Callback
|
||||
* USART callaback is redirected to the weak predefined callback
|
||||
* @param husart usart handle
|
||||
* @param CallbackID ID of the callback to be unregistered
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref HAL_USART_TX_HALFCOMPLETE_CB_ID Tx Half Complete Callback ID
|
||||
|
|
@ -731,7 +731,7 @@ HAL_StatusTypeDef HAL_USART_UnRegisterCallback(USART_HandleTypeDef *husart, HAL_
|
|||
|
||||
/**
|
||||
* @brief Simplex Send an amount of data in blocking mode.
|
||||
* @note When UART parity is not enabled (PCE = 0), and Word Length is configured to 9 bits (M1-M0 = 01),
|
||||
* @note When USART parity is not enabled (PCE = 0), and Word Length is configured to 9 bits (M1-M0 = 01),
|
||||
* the sent data is handled as a set of u16. In this case, Size must indicate the number
|
||||
* of u16 provided through pTxData.
|
||||
* @param husart Pointer to a USART_HandleTypeDef structure that contains
|
||||
|
|
@ -816,7 +816,7 @@ HAL_StatusTypeDef HAL_USART_Transmit(USART_HandleTypeDef *husart, uint8_t *pTxDa
|
|||
/**
|
||||
* @brief Full-Duplex Receive an amount of data in blocking mode.
|
||||
* @note To receive synchronous data, dummy data are simultaneously transmitted.
|
||||
* @note When UART parity is not enabled (PCE = 0), and Word Length is configured to 9 bits (M1-M0 = 01),
|
||||
* @note When USART parity is not enabled (PCE = 0), and Word Length is configured to 9 bits (M1-M0 = 01),
|
||||
* the received data is handled as a set of u16. In this case, Size must indicate the number
|
||||
* of u16 available through pRxData.
|
||||
* @param husart Pointer to a USART_HandleTypeDef structure that contains
|
||||
|
|
@ -924,7 +924,7 @@ HAL_StatusTypeDef HAL_USART_Receive(USART_HandleTypeDef *husart, uint8_t *pRxDat
|
|||
|
||||
/**
|
||||
* @brief Full-Duplex Send and Receive an amount of data in full-duplex mode (blocking mode).
|
||||
* @note When UART parity is not enabled (PCE = 0), and Word Length is configured to 9 bits (M1-M0 = 01),
|
||||
* @note When USART parity is not enabled (PCE = 0), and Word Length is configured to 9 bits (M1-M0 = 01),
|
||||
* the sent data and the received data are handled as sets of u16. In this case, Size must indicate the number
|
||||
* of u16 available through pTxData and through pRxData.
|
||||
* @param husart Pointer to a USART_HandleTypeDef structure that contains
|
||||
|
|
@ -1042,7 +1042,7 @@ HAL_StatusTypeDef HAL_USART_TransmitReceive(USART_HandleTypeDef *husart, uint8_t
|
|||
|
||||
/**
|
||||
* @brief Simplex Send an amount of data in non-blocking mode.
|
||||
* @note When UART parity is not enabled (PCE = 0), and Word Length is configured to 9 bits (M1-M0 = 01),
|
||||
* @note When USART parity is not enabled (PCE = 0), and Word Length is configured to 9 bits (M1-M0 = 01),
|
||||
* the sent data is handled as a set of u16. In this case, Size must indicate the number
|
||||
* of u16 provided through pTxData.
|
||||
* @param husart Pointer to a USART_HandleTypeDef structure that contains
|
||||
|
|
@ -1096,7 +1096,7 @@ HAL_StatusTypeDef HAL_USART_Transmit_IT(USART_HandleTypeDef *husart, uint8_t *pT
|
|||
/**
|
||||
* @brief Simplex Receive an amount of data in non-blocking mode.
|
||||
* @note To receive synchronous data, dummy data are simultaneously transmitted.
|
||||
* @note When UART parity is not enabled (PCE = 0), and Word Length is configured to 9 bits (M1-M0 = 01),
|
||||
* @note When USART parity is not enabled (PCE = 0), and Word Length is configured to 9 bits (M1-M0 = 01),
|
||||
* the received data is handled as a set of u16. In this case, Size must indicate the number
|
||||
* of u16 available through pRxData.
|
||||
* @param husart Pointer to a USART_HandleTypeDef structure that contains
|
||||
|
|
@ -1145,7 +1145,7 @@ HAL_StatusTypeDef HAL_USART_Receive_IT(USART_HandleTypeDef *husart, uint8_t *pRx
|
|||
|
||||
/**
|
||||
* @brief Full-Duplex Send and Receive an amount of data in full-duplex mode (non-blocking).
|
||||
* @note When UART parity is not enabled (PCE = 0), and Word Length is configured to 9 bits (M1-M0 = 01),
|
||||
* @note When USART parity is not enabled (PCE = 0), and Word Length is configured to 9 bits (M1-M0 = 01),
|
||||
* the sent data and the received data are handled as sets of u16. In this case, Size must indicate the number
|
||||
* of u16 available through pTxData and through pRxData.
|
||||
* @param husart Pointer to a USART_HandleTypeDef structure that contains
|
||||
|
|
@ -1201,7 +1201,7 @@ HAL_StatusTypeDef HAL_USART_TransmitReceive_IT(USART_HandleTypeDef *husart, uint
|
|||
|
||||
/**
|
||||
* @brief Simplex Send an amount of data in DMA mode.
|
||||
* @note When UART parity is not enabled (PCE = 0), and Word Length is configured to 9 bits (M1-M0 = 01),
|
||||
* @note When USART parity is not enabled (PCE = 0), and Word Length is configured to 9 bits (M1-M0 = 01),
|
||||
* the sent data is handled as a set of u16. In this case, Size must indicate the number
|
||||
* of u16 provided through pTxData.
|
||||
* @param husart Pointer to a USART_HandleTypeDef structure that contains
|
||||
|
|
@ -1266,7 +1266,7 @@ HAL_StatusTypeDef HAL_USART_Transmit_DMA(USART_HandleTypeDef *husart, uint8_t *p
|
|||
|
||||
/**
|
||||
* @brief Full-Duplex Receive an amount of data in DMA mode.
|
||||
* @note When UART parity is not enabled (PCE = 0), and Word Length is configured to 9 bits (M1-M0 = 01),
|
||||
* @note When USART parity is not enabled (PCE = 0), and Word Length is configured to 9 bits (M1-M0 = 01),
|
||||
* the received data is handled as a set of u16. In this case, Size must indicate the number
|
||||
* of u16 available through pRxData.
|
||||
* @param husart Pointer to a USART_HandleTypeDef structure that contains
|
||||
|
|
@ -1361,7 +1361,7 @@ HAL_StatusTypeDef HAL_USART_Receive_DMA(USART_HandleTypeDef *husart, uint8_t *pR
|
|||
|
||||
/**
|
||||
* @brief Full-Duplex Transmit Receive an amount of data in DMA mode.
|
||||
* @note When UART parity is not enabled (PCE = 0), and Word Length is configured to 9 bits (M1-M0 = 01),
|
||||
* @note When USART parity is not enabled (PCE = 0), and Word Length is configured to 9 bits (M1-M0 = 01),
|
||||
* the sent data and the received data are handled as sets of u16. In this case, Size must indicate the number
|
||||
* of u16 available through pTxData and through pRxData.
|
||||
* @param husart Pointer to a USART_HandleTypeDef structure that contains
|
||||
|
|
@ -1789,7 +1789,7 @@ void HAL_USART_IRQHandler(USART_HandleTypeDef *husart)
|
|||
}
|
||||
|
||||
/* USART Over-Run interrupt occurred -----------------------------------*/
|
||||
if (((isrflags & USART_SR_ORE) != RESET) && ((cr3its & USART_CR3_EIE) != RESET))
|
||||
if (((isrflags & USART_SR_ORE) != RESET) && (((cr1its & USART_CR1_RXNEIE) != RESET) || ((cr3its & USART_CR3_EIE) != RESET)))
|
||||
{
|
||||
husart->ErrorCode |= HAL_USART_ERROR_ORE;
|
||||
}
|
||||
|
|
@ -2155,8 +2155,6 @@ static void USART_DMAReceiveCplt(DMA_HandleTypeDef *hdma)
|
|||
CLEAR_BIT(husart->Instance->CR3, USART_CR3_DMAR);
|
||||
CLEAR_BIT(husart->Instance->CR3, USART_CR3_DMAT);
|
||||
|
||||
husart->State = HAL_USART_STATE_READY;
|
||||
|
||||
/* The USART state is HAL_USART_STATE_BUSY_RX */
|
||||
if (husart->State == HAL_USART_STATE_BUSY_RX)
|
||||
{
|
||||
|
|
@ -2179,6 +2177,7 @@ static void USART_DMAReceiveCplt(DMA_HandleTypeDef *hdma)
|
|||
HAL_USART_TxRxCpltCallback(husart);
|
||||
#endif /* USE_HAL_USART_REGISTER_CALLBACKS */
|
||||
}
|
||||
husart->State = HAL_USART_STATE_READY;
|
||||
}
|
||||
/* DMA circular mode */
|
||||
else
|
||||
|
|
|
|||
|
|
@ -5,84 +5,110 @@
|
|||
* @brief WWDG HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the Window Watchdog (WWDG) peripheral:
|
||||
* + Initialization and de-initialization functions
|
||||
* + Initialization and Configuration functions
|
||||
* + IO operation functions
|
||||
* + Peripheral State functions
|
||||
@verbatim
|
||||
==============================================================================
|
||||
##### WWDG specific features #####
|
||||
##### WWDG Specific features #####
|
||||
==============================================================================
|
||||
[..]
|
||||
Once enabled the WWDG generates a system reset on expiry of a programmed
|
||||
time period, unless the program refreshes the counter (downcounter)
|
||||
time period, unless the program refreshes the counter (T[6;0] downcounter)
|
||||
before reaching 0x3F value (i.e. a reset is generated when the counter
|
||||
value rolls over from 0x40 to 0x3F).
|
||||
value rolls down from 0x40 to 0x3F).
|
||||
|
||||
(+) An MCU reset is also generated if the counter value is refreshed
|
||||
before the counter has reached the refresh window value. This
|
||||
implies that the counter must be refreshed in a limited window.
|
||||
(+) Once enabled the WWDG cannot be disabled except by a system reset.
|
||||
(+) WWDGRST flag in RCC_CSR register can be used to inform when a WWDG
|
||||
(+) If required by application, an Early Wakeup Interrupt can be triggered
|
||||
in order to be warned before WWDG expiration. The Early Wakeup Interrupt
|
||||
(EWI) can be used if specific safety operations or data logging must
|
||||
be performed before the actual reset is generated. When the downcounter
|
||||
reaches 0x40, interrupt occurs. This mechanism requires WWDG interrupt
|
||||
line to be enabled in NVIC. Once enabled, EWI interrupt cannot be
|
||||
disabled except by a system reset.
|
||||
(+) WWDGRST flag in RCC CSR register can be used to inform when a WWDG
|
||||
reset occurs.
|
||||
(+) The WWDG counter input clock is derived from the APB clock divided
|
||||
by a programmable prescaler.
|
||||
(+) WWDG clock (Hz) = PCLK1 / (4096 * Prescaler)
|
||||
(+) WWDG timeout (mS) = 1000 * Counter / WWDG clock
|
||||
(+) WWDG timeout (mS) = 1000 * (T[5;0] + 1) / WWDG clock (Hz)
|
||||
where T[5;0] are the lowest 6 bits of Counter.
|
||||
(+) WWDG Counter refresh is allowed between the following limits :
|
||||
(++) min time (mS) = 1000 * (Counter _ Window) / WWDG clock
|
||||
(++) max time (mS) = 1000 * (Counter _ 0x40) / WWDG clock
|
||||
|
||||
(+) Min-max timeout value at 36 MHz(PCLK1): 910 us / 58.25 ms
|
||||
|
||||
(+) The Early Wakeup Interrupt (EWI) can be used if specific safety
|
||||
operations or data logging must be performed before the actual reset is
|
||||
generated. When the downcounter reaches the value 0x40, an EWI interrupt
|
||||
is generated and the corresponding interrupt service routine (ISR) can
|
||||
be used to trigger specific actions (such as communications or data
|
||||
logging), before resetting the device.
|
||||
In some applications, the EWI interrupt can be used to manage a software
|
||||
system check and/or system recovery/graceful degradation, without
|
||||
generating a WWDG reset. In this case, the corresponding interrupt
|
||||
service routine (ISR) should reload the WWDG counter to avoid the WWDG
|
||||
reset, then trigger the required actions.
|
||||
Note:When the EWI interrupt cannot be served, e.g. due to a system lock
|
||||
in a higher priority task, the WWDG reset will eventually be generated.
|
||||
|
||||
(+) Debug mode : When the microcontroller enters debug mode (core halted),
|
||||
the WWDG counter either continues to work normally or stops, depending
|
||||
on DBG_WWDG_STOP configuration bit in DBG module, accessible through
|
||||
__HAL_DBGMCU_FREEZE_WWDG() and __HAL_DBGMCU_UNFREEZE_WWDG() macros
|
||||
(++) min time (mS) = 1000 * (Counter - Window) / WWDG clock
|
||||
(++) max time (mS) = 1000 * (Counter - 0x40) / WWDG clock
|
||||
(+) Typical values:
|
||||
(++) Counter min (T[5;0] = 0x00) at 36MHz (PCLK1) with zero prescaler:
|
||||
max timeout before reset: approximately 910µs
|
||||
(++) Counter max (T[5;0] = 0x3F) at 36MHz (PCLK1) with prescaler
|
||||
dividing by 8:
|
||||
max timeout before reset: approximately 58.25ms
|
||||
|
||||
##### How to use this driver #####
|
||||
==============================================================================
|
||||
|
||||
*** Common driver usage ***
|
||||
===========================
|
||||
|
||||
[..]
|
||||
(+) Enable WWDG APB1 clock using __HAL_RCC_WWDG_CLK_ENABLE().
|
||||
|
||||
(+) Set the WWDG prescaler, refresh window, counter value and Early Wakeup
|
||||
Interrupt mode using using HAL_WWDG_Init() function.
|
||||
This enables WWDG peripheral and the downcounter starts downcounting
|
||||
from given counter value.
|
||||
Init function can be called again to modify all watchdog parameters,
|
||||
however if EWI mode has been set once, it can't be clear until next
|
||||
reset.
|
||||
|
||||
(+) The application program must refresh the WWDG counter at regular
|
||||
intervals during normal operation to prevent an MCU reset using
|
||||
(+) Configure the WWDG prescaler, refresh window value, counter value and early
|
||||
interrupt status using HAL_WWDG_Init() function. This will automatically
|
||||
enable WWDG and start its downcounter. Time reference can be taken from
|
||||
function exit. Care must be taken to provide a counter value
|
||||
greater than 0x40 to prevent generation of immediate reset.
|
||||
(+) If the Early Wakeup Interrupt (EWI) feature is enabled, an interrupt is
|
||||
generated when the counter reaches 0x40. When HAL_WWDG_IRQHandler is
|
||||
triggered by the interrupt service routine, flag will be automatically
|
||||
cleared and HAL_WWDG_WakeupCallback user callback will be executed. User
|
||||
can add his own code by customization of callback HAL_WWDG_WakeupCallback.
|
||||
(+) Then the application program must refresh the WWDG counter at regular
|
||||
intervals during normal operation to prevent an MCU reset, using
|
||||
HAL_WWDG_Refresh() function. This operation must occur only when
|
||||
the counter is lower than the window value already programmed.
|
||||
the counter is lower than the refresh window value already programmed.
|
||||
|
||||
(+) if Early Wakeup Interrupt mode is enable an interrupt is generated when
|
||||
the counter reaches 0x40. User can add his own code in weak function
|
||||
HAL_WWDG_EarlyWakeupCallback().
|
||||
*** Callback registration ***
|
||||
=============================
|
||||
|
||||
[..]
|
||||
The compilation define USE_HAL_WWDG_REGISTER_CALLBACKS when set to 1 allows
|
||||
the user to configure dynamically the driver callbacks. Use Functions
|
||||
HAL_WWDG_RegisterCallback() to register a user callback.
|
||||
|
||||
(+) Function HAL_WWDG_RegisterCallback() allows to register following
|
||||
callbacks:
|
||||
(++) EwiCallback : callback for Early WakeUp Interrupt.
|
||||
(++) MspInitCallback : WWDG MspInit.
|
||||
This function takes as parameters the HAL peripheral handle, the Callback ID
|
||||
and a pointer to the user callback function.
|
||||
|
||||
(+) Use function HAL_WWDG_UnRegisterCallback() to reset a callback to
|
||||
the default weak (surcharged) function. HAL_WWDG_UnRegisterCallback()
|
||||
takes as parameters the HAL peripheral handle and the Callback ID.
|
||||
This function allows to reset following callbacks:
|
||||
(++) EwiCallback : callback for Early WakeUp Interrupt.
|
||||
(++) MspInitCallback : WWDG MspInit.
|
||||
|
||||
[..]
|
||||
When calling HAL_WWDG_Init function, callbacks are reset to the
|
||||
corresponding legacy weak (surcharged) functions:
|
||||
HAL_WWDG_EarlyWakeupCallback() and HAL_WWDG_MspInit() only if they have
|
||||
not been registered before.
|
||||
|
||||
[..]
|
||||
When compilation define USE_HAL_WWDG_REGISTER_CALLBACKS is set to 0 or
|
||||
not defined, the callback registering feature is not available
|
||||
and weak (surcharged) callbacks are used.
|
||||
|
||||
*** WWDG HAL driver macros list ***
|
||||
==================================
|
||||
===================================
|
||||
[..]
|
||||
Below the list of most used macros in WWDG HAL driver.
|
||||
|
||||
(+) __HAL_WWDG_GET_IT_SOURCE: Check the selected WWDG's interrupt source.
|
||||
(+) __HAL_WWDG_GET_FLAG: Get the selected WWDG's flag status.
|
||||
(+) __HAL_WWDG_CLEAR_FLAG: Clear the WWDG's pending flags.
|
||||
Below the list of available macros in WWDG HAL driver.
|
||||
(+) __HAL_WWDG_ENABLE: Enable the WWDG peripheral
|
||||
(+) __HAL_WWDG_GET_FLAG: Get the selected WWDG's flag status
|
||||
(+) __HAL_WWDG_CLEAR_FLAG: Clear the WWDG's pending flags
|
||||
(+) __HAL_WWDG_ENABLE_IT: Enable the WWDG early wakeup interrupt
|
||||
|
||||
@endverbatim
|
||||
******************************************************************************
|
||||
|
|
@ -179,7 +205,7 @@ HAL_StatusTypeDef HAL_WWDG_Init(WWDG_HandleTypeDef *hwwdg)
|
|||
#else
|
||||
/* Init the low level hardware */
|
||||
HAL_WWDG_MspInit(hwwdg);
|
||||
#endif
|
||||
#endif /* USE_HAL_WWDG_REGISTER_CALLBACKS */
|
||||
|
||||
/* Set WWDG Counter */
|
||||
WRITE_REG(hwwdg->Instance->CR, (WWDG_CR_WDGA | hwwdg->Init.Counter));
|
||||
|
|
@ -191,6 +217,7 @@ HAL_StatusTypeDef HAL_WWDG_Init(WWDG_HandleTypeDef *hwwdg)
|
|||
return HAL_OK;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Initialize the WWDG MSP.
|
||||
* @param hwwdg pointer to a WWDG_HandleTypeDef structure that contains
|
||||
|
|
@ -223,7 +250,8 @@ __weak void HAL_WWDG_MspInit(WWDG_HandleTypeDef *hwwdg)
|
|||
* @param pCallback pointer to the Callback function
|
||||
* @retval status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_WWDG_RegisterCallback(WWDG_HandleTypeDef *hwwdg, HAL_WWDG_CallbackIDTypeDef CallbackID, pWWDG_CallbackTypeDef pCallback)
|
||||
HAL_StatusTypeDef HAL_WWDG_RegisterCallback(WWDG_HandleTypeDef *hwwdg, HAL_WWDG_CallbackIDTypeDef CallbackID,
|
||||
pWWDG_CallbackTypeDef pCallback)
|
||||
{
|
||||
HAL_StatusTypeDef status = HAL_OK;
|
||||
|
||||
|
|
@ -284,7 +312,7 @@ HAL_StatusTypeDef HAL_WWDG_UnRegisterCallback(WWDG_HandleTypeDef *hwwdg, HAL_WWD
|
|||
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
#endif /* USE_HAL_WWDG_REGISTER_CALLBACKS */
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
|
@ -352,14 +380,15 @@ void HAL_WWDG_IRQHandler(WWDG_HandleTypeDef *hwwdg)
|
|||
#else
|
||||
/* Early Wakeup callback */
|
||||
HAL_WWDG_EarlyWakeupCallback(hwwdg);
|
||||
#endif
|
||||
#endif /* USE_HAL_WWDG_REGISTER_CALLBACKS */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief WWDG Early Wakeup callback.
|
||||
* @param hwwdg : pointer to a WWDG_HandleTypeDef structure that contains
|
||||
* @param hwwdg pointer to a WWDG_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified WWDG module.
|
||||
* @retval None
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -657,6 +657,11 @@ ErrorStatus LL_ADC_REG_Init(ADC_TypeDef *ADCx, LL_ADC_REG_InitTypeDef *ADC_REG_I
|
|||
assert_param(IS_LL_ADC_REG_CONTINUOUS_MODE(ADC_REG_InitStruct->ContinuousMode));
|
||||
assert_param(IS_LL_ADC_REG_DMA_TRANSFER(ADC_REG_InitStruct->DMATransfer));
|
||||
|
||||
/* ADC group regular continuous mode and discontinuous mode */
|
||||
/* can not be enabled simultenaeously */
|
||||
assert_param((ADC_REG_InitStruct->ContinuousMode == LL_ADC_REG_CONV_SINGLE)
|
||||
|| (ADC_REG_InitStruct->SequencerDiscont == LL_ADC_REG_SEQ_DISCONT_DISABLE));
|
||||
|
||||
/* Note: Hardware constraint (refer to description of this function): */
|
||||
/* ADC instance must be disabled. */
|
||||
if(LL_ADC_IsEnabled(ADCx) == 0U)
|
||||
|
|
|
|||
|
|
@ -203,9 +203,12 @@
|
|||
* @param Init Pointer to NORSRAM Initialization structure
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef FSMC_NORSRAM_Init(FSMC_NORSRAM_TypeDef *Device, FSMC_NORSRAM_InitTypeDef *Init)
|
||||
HAL_StatusTypeDef FSMC_NORSRAM_Init(FSMC_NORSRAM_TypeDef *Device,
|
||||
FSMC_NORSRAM_InitTypeDef *Init)
|
||||
{
|
||||
uint32_t flashaccess;
|
||||
uint32_t btcr_reg;
|
||||
uint32_t mask;
|
||||
|
||||
/* Check the parameters */
|
||||
assert_param(IS_FSMC_NORSRAM_DEVICE(Device));
|
||||
|
|
@ -237,36 +240,40 @@ HAL_StatusTypeDef FSMC_NORSRAM_Init(FSMC_NORSRAM_TypeDef *Device, FSMC_NORSRAM_
|
|||
flashaccess = FSMC_NORSRAM_FLASH_ACCESS_DISABLE;
|
||||
}
|
||||
|
||||
MODIFY_REG(Device->BTCR[Init->NSBank],
|
||||
(FSMC_BCRx_MBKEN |
|
||||
btcr_reg = (flashaccess | \
|
||||
Init->DataAddressMux | \
|
||||
Init->MemoryType | \
|
||||
Init->MemoryDataWidth | \
|
||||
Init->BurstAccessMode | \
|
||||
Init->WaitSignalPolarity | \
|
||||
Init->WaitSignalActive | \
|
||||
Init->WriteOperation | \
|
||||
Init->WaitSignal | \
|
||||
Init->ExtendedMode | \
|
||||
Init->AsynchronousWait | \
|
||||
Init->WriteBurst);
|
||||
|
||||
btcr_reg |= Init->WrapMode;
|
||||
btcr_reg |= Init->PageSize;
|
||||
|
||||
mask = (FSMC_BCRx_MBKEN |
|
||||
FSMC_BCRx_MUXEN |
|
||||
FSMC_BCRx_MTYP |
|
||||
FSMC_BCRx_MWID |
|
||||
FSMC_BCRx_FACCEN |
|
||||
FSMC_BCRx_BURSTEN |
|
||||
FSMC_BCRx_WAITPOL |
|
||||
FSMC_BCRx_WRAPMOD |
|
||||
FSMC_BCRx_WAITCFG |
|
||||
FSMC_BCRx_WREN |
|
||||
FSMC_BCRx_WAITEN |
|
||||
FSMC_BCRx_EXTMOD |
|
||||
FSMC_BCRx_ASYNCWAIT |
|
||||
FSMC_BCRx_CBURSTRW |
|
||||
0x00070000U), /* CPSIZE to be defined in CMSIS file */
|
||||
(flashaccess |
|
||||
Init->DataAddressMux |
|
||||
Init->MemoryType |
|
||||
Init->MemoryDataWidth |
|
||||
Init->BurstAccessMode |
|
||||
Init->WaitSignalPolarity |
|
||||
Init->WrapMode |
|
||||
Init->WaitSignalActive |
|
||||
Init->WriteOperation |
|
||||
Init->WaitSignal |
|
||||
Init->ExtendedMode |
|
||||
Init->AsynchronousWait |
|
||||
Init->WriteBurst |
|
||||
Init->PageSize));
|
||||
FSMC_BCRx_CBURSTRW);
|
||||
|
||||
mask |= FSMC_BCRx_WRAPMOD;
|
||||
mask |= 0x00070000U; /* CPSIZE to be defined in CMSIS file */
|
||||
|
||||
MODIFY_REG(Device->BTCR[Init->NSBank], mask, btcr_reg);
|
||||
|
||||
|
||||
return HAL_OK;
|
||||
|
|
@ -279,7 +286,8 @@ HAL_StatusTypeDef FSMC_NORSRAM_Init(FSMC_NORSRAM_TypeDef *Device, FSMC_NORSRAM_
|
|||
* @param Bank NORSRAM bank number
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef FSMC_NORSRAM_DeInit(FSMC_NORSRAM_TypeDef *Device, FSMC_NORSRAM_EXTENDED_TypeDef *ExDevice, uint32_t Bank)
|
||||
HAL_StatusTypeDef FSMC_NORSRAM_DeInit(FSMC_NORSRAM_TypeDef *Device,
|
||||
FSMC_NORSRAM_EXTENDED_TypeDef *ExDevice, uint32_t Bank)
|
||||
{
|
||||
/* Check the parameters */
|
||||
assert_param(IS_FSMC_NORSRAM_DEVICE(Device));
|
||||
|
|
@ -315,7 +323,8 @@ HAL_StatusTypeDef FSMC_NORSRAM_DeInit(FSMC_NORSRAM_TypeDef *Device, FSMC_NORSRAM
|
|||
* @param Bank NORSRAM bank number
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef FSMC_NORSRAM_Timing_Init(FSMC_NORSRAM_TypeDef *Device, FSMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank)
|
||||
HAL_StatusTypeDef FSMC_NORSRAM_Timing_Init(FSMC_NORSRAM_TypeDef *Device,
|
||||
FSMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank)
|
||||
{
|
||||
|
||||
/* Check the parameters */
|
||||
|
|
@ -353,7 +362,8 @@ HAL_StatusTypeDef FSMC_NORSRAM_Timing_Init(FSMC_NORSRAM_TypeDef *Device, FSMC_NO
|
|||
* @arg FSMC_EXTENDED_MODE_ENABLE
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef FSMC_NORSRAM_Extended_Timing_Init(FSMC_NORSRAM_EXTENDED_TypeDef *Device, FSMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank, uint32_t ExtendedMode)
|
||||
HAL_StatusTypeDef FSMC_NORSRAM_Extended_Timing_Init(FSMC_NORSRAM_EXTENDED_TypeDef *Device,
|
||||
FSMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank, uint32_t ExtendedMode)
|
||||
{
|
||||
/* Check the parameters */
|
||||
assert_param(IS_FSMC_EXTENDED_MODE(ExtendedMode));
|
||||
|
|
@ -560,7 +570,8 @@ HAL_StatusTypeDef FSMC_NAND_Init(FSMC_NAND_TypeDef *Device, FSMC_NAND_InitTypeDe
|
|||
* @param Bank NAND bank number
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef FSMC_NAND_CommonSpace_Timing_Init(FSMC_NAND_TypeDef *Device, FSMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank)
|
||||
HAL_StatusTypeDef FSMC_NAND_CommonSpace_Timing_Init(FSMC_NAND_TypeDef *Device,
|
||||
FSMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank)
|
||||
{
|
||||
/* Check the parameters */
|
||||
assert_param(IS_FSMC_NAND_DEVICE(Device));
|
||||
|
|
@ -599,7 +610,8 @@ HAL_StatusTypeDef FSMC_NAND_CommonSpace_Timing_Init(FSMC_NAND_TypeDef *Device, F
|
|||
* @param Bank NAND bank number
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef FSMC_NAND_AttributeSpace_Timing_Init(FSMC_NAND_TypeDef *Device, FSMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank)
|
||||
HAL_StatusTypeDef FSMC_NAND_AttributeSpace_Timing_Init(FSMC_NAND_TypeDef *Device,
|
||||
FSMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank)
|
||||
{
|
||||
/* Check the parameters */
|
||||
assert_param(IS_FSMC_NAND_DEVICE(Device));
|
||||
|
|
@ -746,7 +758,8 @@ HAL_StatusTypeDef FSMC_NAND_ECC_Disable(FSMC_NAND_TypeDef *Device, uint32_t Bank
|
|||
* @param Timeout Timeout wait value
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef FSMC_NAND_GetECC(FSMC_NAND_TypeDef *Device, uint32_t *ECCval, uint32_t Bank, uint32_t Timeout)
|
||||
HAL_StatusTypeDef FSMC_NAND_GetECC(FSMC_NAND_TypeDef *Device, uint32_t *ECCval, uint32_t Bank,
|
||||
uint32_t Timeout)
|
||||
{
|
||||
uint32_t tickstart;
|
||||
|
||||
|
|
@ -869,7 +882,8 @@ HAL_StatusTypeDef FSMC_PCCARD_Init(FSMC_PCCARD_TypeDef *Device, FSMC_PCCARD_Init
|
|||
* @param Timing Pointer to PCCARD timing structure
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef FSMC_PCCARD_CommonSpace_Timing_Init(FSMC_PCCARD_TypeDef *Device, FSMC_NAND_PCC_TimingTypeDef *Timing)
|
||||
HAL_StatusTypeDef FSMC_PCCARD_CommonSpace_Timing_Init(FSMC_PCCARD_TypeDef *Device,
|
||||
FSMC_NAND_PCC_TimingTypeDef *Timing)
|
||||
{
|
||||
/* Check the parameters */
|
||||
assert_param(IS_FSMC_PCCARD_DEVICE(Device));
|
||||
|
|
@ -895,7 +909,8 @@ HAL_StatusTypeDef FSMC_PCCARD_CommonSpace_Timing_Init(FSMC_PCCARD_TypeDef *Devic
|
|||
* @param Timing Pointer to PCCARD timing structure
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef FSMC_PCCARD_AttributeSpace_Timing_Init(FSMC_PCCARD_TypeDef *Device, FSMC_NAND_PCC_TimingTypeDef *Timing)
|
||||
HAL_StatusTypeDef FSMC_PCCARD_AttributeSpace_Timing_Init(FSMC_PCCARD_TypeDef *Device,
|
||||
FSMC_NAND_PCC_TimingTypeDef *Timing)
|
||||
{
|
||||
/* Check the parameters */
|
||||
assert_param(IS_FSMC_PCCARD_DEVICE(Device));
|
||||
|
|
@ -921,7 +936,8 @@ HAL_StatusTypeDef FSMC_PCCARD_AttributeSpace_Timing_Init(FSMC_PCCARD_TypeDef *De
|
|||
* @param Timing Pointer to PCCARD timing structure
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef FSMC_PCCARD_IOSpace_Timing_Init(FSMC_PCCARD_TypeDef *Device, FSMC_NAND_PCC_TimingTypeDef *Timing)
|
||||
HAL_StatusTypeDef FSMC_PCCARD_IOSpace_Timing_Init(FSMC_PCCARD_TypeDef *Device,
|
||||
FSMC_NAND_PCC_TimingTypeDef *Timing)
|
||||
{
|
||||
/* Check the parameters */
|
||||
assert_param(IS_FSMC_PCCARD_DEVICE(Device));
|
||||
|
|
@ -981,5 +997,8 @@ HAL_StatusTypeDef FSMC_PCCARD_DeInit(FSMC_PCCARD_TypeDef *Device)
|
|||
/**
|
||||
* @}
|
||||
*/
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
||||
|
|
|
|||
|
|
@ -189,12 +189,6 @@ ErrorStatus LL_GPIO_Init(GPIO_TypeDef *GPIOx, LL_GPIO_InitTypeDef *GPIO_InitStru
|
|||
assert_param(IS_LL_GPIO_MODE(GPIO_InitStruct->Mode));
|
||||
assert_param(IS_LL_GPIO_PULL(GPIO_InitStruct->Pull));
|
||||
|
||||
/* Pin Mode configuration */
|
||||
LL_GPIO_SetPinMode(GPIOx, currentpin, GPIO_InitStruct->Mode);
|
||||
|
||||
/* Pull-up Pull-down resistor configuration*/
|
||||
LL_GPIO_SetPinPull(GPIOx, currentpin, GPIO_InitStruct->Pull);
|
||||
|
||||
if ((GPIO_InitStruct->Mode == LL_GPIO_MODE_OUTPUT) || (GPIO_InitStruct->Mode == LL_GPIO_MODE_ALTERNATE))
|
||||
{
|
||||
/* Check speed and Output mode parameters */
|
||||
|
|
@ -207,6 +201,12 @@ ErrorStatus LL_GPIO_Init(GPIO_TypeDef *GPIOx, LL_GPIO_InitTypeDef *GPIO_InitStru
|
|||
/* Output mode configuration*/
|
||||
LL_GPIO_SetPinOutputType(GPIOx, currentpin, GPIO_InitStruct->OutputType);
|
||||
}
|
||||
|
||||
/* Pull-up Pull-down resistor configuration*/
|
||||
LL_GPIO_SetPinPull(GPIOx, currentpin, GPIO_InitStruct->Pull);
|
||||
|
||||
/* Pin Mode configuration */
|
||||
LL_GPIO_SetPinMode(GPIOx, currentpin, GPIO_InitStruct->Mode);
|
||||
}
|
||||
pinpos++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@ void LL_TIM_StructInit(LL_TIM_InitTypeDef *TIM_InitStruct)
|
|||
TIM_InitStruct->CounterMode = LL_TIM_COUNTERMODE_UP;
|
||||
TIM_InitStruct->Autoreload = 0xFFFFFFFFU;
|
||||
TIM_InitStruct->ClockDivision = LL_TIM_CLOCKDIVISION_DIV1;
|
||||
TIM_InitStruct->RepetitionCounter = (uint8_t)0x00;
|
||||
TIM_InitStruct->RepetitionCounter = 0x00000000U;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1894,6 +1894,46 @@ HAL_StatusTypeDef USB_DevInit(USB_TypeDef *USBx, USB_CfgTypeDef cfg)
|
|||
return HAL_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USB_FlushTxFifo : Flush a Tx FIFO
|
||||
* @param USBx : Selected device
|
||||
* @param num : FIFO number
|
||||
* This parameter can be a value from 1 to 15
|
||||
15 means Flush all Tx FIFOs
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef USB_FlushTxFifo(USB_TypeDef *USBx, uint32_t num)
|
||||
{
|
||||
/* Prevent unused argument(s) compilation warning */
|
||||
UNUSED(USBx);
|
||||
UNUSED(num);
|
||||
|
||||
/* NOTE : - This function is not required by USB Device FS peripheral, it is used
|
||||
only by USB OTG FS peripheral.
|
||||
- This function is added to ensure compatibility across platforms.
|
||||
*/
|
||||
|
||||
return HAL_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USB_FlushRxFifo : Flush Rx FIFO
|
||||
* @param USBx : Selected device
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef USB_FlushRxFifo(USB_TypeDef *USBx)
|
||||
{
|
||||
/* Prevent unused argument(s) compilation warning */
|
||||
UNUSED(USBx);
|
||||
|
||||
/* NOTE : - This function is not required by USB Device FS peripheral, it is used
|
||||
only by USB OTG FS peripheral.
|
||||
- This function is added to ensure compatibility across platforms.
|
||||
*/
|
||||
|
||||
return HAL_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Activate and configure an endpoint
|
||||
* @param USBx Selected device
|
||||
|
|
|
|||
|
|
@ -140,9 +140,6 @@
|
|||
*/
|
||||
static uint32_t UTILS_GetPLLOutputFrequency(uint32_t PLL_InputFrequency,
|
||||
LL_UTILS_PLLInitTypeDef *UTILS_PLLInitStruct);
|
||||
#if defined(FLASH_ACR_LATENCY)
|
||||
static ErrorStatus UTILS_SetFlashLatency(uint32_t Frequency);
|
||||
#endif /* FLASH_ACR_LATENCY */
|
||||
static ErrorStatus UTILS_EnablePLLAndSwitchSystem(uint32_t SYSCLK_Frequency, LL_UTILS_ClkInitTypeDef *UTILS_ClkInitStruct);
|
||||
static ErrorStatus UTILS_PLL_IsBusy(void);
|
||||
/**
|
||||
|
|
@ -246,6 +243,77 @@ void LL_SetSystemCoreClock(uint32_t HCLKFrequency)
|
|||
SystemCoreClock = HCLKFrequency;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Update number of Flash wait states in line with new frequency and current
|
||||
voltage range.
|
||||
* @param Frequency SYSCLK frequency
|
||||
* @retval An ErrorStatus enumeration value:
|
||||
* - SUCCESS: Latency has been modified
|
||||
* - ERROR: Latency cannot be modified
|
||||
*/
|
||||
#if defined(FLASH_ACR_LATENCY)
|
||||
ErrorStatus LL_SetFlashLatency(uint32_t Frequency)
|
||||
{
|
||||
uint32_t timeout;
|
||||
uint32_t getlatency;
|
||||
uint32_t latency = LL_FLASH_LATENCY_0; /* default value 0WS */
|
||||
ErrorStatus status = SUCCESS;
|
||||
|
||||
/* Frequency cannot be equal to 0 */
|
||||
if (Frequency == 0U)
|
||||
{
|
||||
status = ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Frequency > UTILS_LATENCY2_FREQ)
|
||||
{
|
||||
/* 48 < SYSCLK <= 72 => 2WS (3 CPU cycles) */
|
||||
latency = LL_FLASH_LATENCY_2;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Frequency > UTILS_LATENCY1_FREQ)
|
||||
{
|
||||
/* 24 < SYSCLK <= 48 => 1WS (2 CPU cycles) */
|
||||
latency = LL_FLASH_LATENCY_1;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* else SYSCLK < 24MHz default LL_FLASH_LATENCY_0 0WS */
|
||||
latency = LL_FLASH_LATENCY_0;
|
||||
}
|
||||
}
|
||||
|
||||
if (status != ERROR)
|
||||
{
|
||||
LL_FLASH_SetLatency(latency);
|
||||
|
||||
/* Check that the new number of wait states is taken into account to access the Flash
|
||||
memory by reading the FLASH_ACR register */
|
||||
timeout = 2;
|
||||
do
|
||||
{
|
||||
/* Wait for Flash latency to be updated */
|
||||
getlatency = LL_FLASH_GetLatency();
|
||||
timeout--;
|
||||
} while ((getlatency != latency) && (timeout > 0));
|
||||
|
||||
if(getlatency != latency)
|
||||
{
|
||||
status = ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
status = SUCCESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
#endif /* FLASH_ACR_LATENCY */
|
||||
|
||||
/**
|
||||
* @brief This function configures system clock with HSI as clock source of the PLL
|
||||
* @note The application need to ensure that PLL is disabled.
|
||||
|
|
@ -393,56 +461,6 @@ ErrorStatus LL_PLL_ConfigSystemClock_HSE(uint32_t HSEFrequency, uint32_t HSEBypa
|
|||
/** @addtogroup UTILS_LL_Private_Functions
|
||||
* @{
|
||||
*/
|
||||
/**
|
||||
* @brief Update number of Flash wait states in line with new frequency and current
|
||||
voltage range.
|
||||
* @param Frequency SYSCLK frequency
|
||||
* @retval An ErrorStatus enumeration value:
|
||||
* - SUCCESS: Latency has been modified
|
||||
* - ERROR: Latency cannot be modified
|
||||
*/
|
||||
#if defined(FLASH_ACR_LATENCY)
|
||||
static ErrorStatus UTILS_SetFlashLatency(uint32_t Frequency)
|
||||
{
|
||||
ErrorStatus status = SUCCESS;
|
||||
|
||||
uint32_t latency = LL_FLASH_LATENCY_0; /* default value 0WS */
|
||||
|
||||
/* Frequency cannot be equal to 0 */
|
||||
if (Frequency == 0U)
|
||||
{
|
||||
status = ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Frequency > UTILS_LATENCY2_FREQ)
|
||||
{
|
||||
/* 48 < SYSCLK <= 72 => 2WS (3 CPU cycles) */
|
||||
latency = LL_FLASH_LATENCY_2;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Frequency > UTILS_LATENCY1_FREQ)
|
||||
{
|
||||
/* 24 < SYSCLK <= 48 => 1WS (2 CPU cycles) */
|
||||
latency = LL_FLASH_LATENCY_1;
|
||||
}
|
||||
/* else SYSCLK < 24MHz default LL_FLASH_LATENCY_0 0WS */
|
||||
}
|
||||
|
||||
LL_FLASH_SetLatency(latency);
|
||||
|
||||
/* Check that the new number of wait states is taken into account to access the Flash
|
||||
memory by reading the FLASH_ACR register */
|
||||
if (LL_FLASH_GetLatency() != latency)
|
||||
{
|
||||
status = ERROR;
|
||||
}
|
||||
}
|
||||
return status;
|
||||
}
|
||||
#endif /* FLASH_ACR_LATENCY */
|
||||
|
||||
/**
|
||||
* @brief Function to check that PLL can be modified
|
||||
* @param PLL_InputFrequency PLL input frequency (in Hz)
|
||||
|
|
@ -535,7 +553,7 @@ static ErrorStatus UTILS_EnablePLLAndSwitchSystem(uint32_t SYSCLK_Frequency, LL_
|
|||
if (sysclk_frequency_current < SYSCLK_Frequency)
|
||||
{
|
||||
/* Set FLASH latency to highest latency */
|
||||
status = UTILS_SetFlashLatency(SYSCLK_Frequency);
|
||||
status = LL_SetFlashLatency(SYSCLK_Frequency);
|
||||
}
|
||||
#endif /* FLASH_ACR_LATENCY */
|
||||
|
||||
|
|
@ -578,7 +596,7 @@ static ErrorStatus UTILS_EnablePLLAndSwitchSystem(uint32_t SYSCLK_Frequency, LL_
|
|||
if (sysclk_frequency_current > SYSCLK_Frequency)
|
||||
{
|
||||
/* Set FLASH latency to lowest latency */
|
||||
status = UTILS_SetFlashLatency(SYSCLK_Frequency);
|
||||
status = LL_SetFlashLatency(SYSCLK_Frequency);
|
||||
}
|
||||
#endif /* FLASH_ACR_LATENCY */
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@
|
|||
<div class="col-sm-12 col-lg-8">
|
||||
<h1 id="update-history">Update History</h1>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section1_8_1" aria-hidden="true"> <label for="collapse-section1_8_1" aria-hidden="true"><strong>V1.8.1 / 30-July-2020</strong></label>
|
||||
<input type="checkbox" id="collapse-section1_8_2" aria-hidden="true"> <label for="collapse-section1_8_2" aria-hidden="true"><strong>V1.8.2 / 07-September-2020</strong></label>
|
||||
<div>
|
||||
<h1 id="maintenance-release">Maintenance release</h1>
|
||||
<h2 id="main-changes">Main Changes</h2>
|
||||
|
|
@ -73,6 +73,289 @@
|
|||
<li><p>Patch release to fix known defects and enhancements implementation</p></li>
|
||||
<li><p><strong>HAL</strong></p>
|
||||
<ul>
|
||||
<li><strong>HAL/LL ADC</strong> driver
|
||||
<ul>
|
||||
<li>Update HAL_ADC_Stop_DMA() API to check if DMA state is Busy before calling HAL_DMA_Abort() API to avoid DMA internal error.</li>
|
||||
<li>Update LL_ADC_REG_Init() API to avoid enabling continuous mode and discontinuous mode simultaneously.</li>
|
||||
</ul></li>
|
||||
<li><strong>HAL/LL GPIO</strong> driver
|
||||
<ul>
|
||||
<li>Update HAL_GPIO_TogglePin() API to allow multi Pin’s toggling.</li>
|
||||
<li>Update LL_GPIO_TogglePin() API to improve robustness: use BSRR register instead of ODR register.</li>
|
||||
<li>Update LL GPIO initialization sequence to avoid unwanted pulse on GPIO Pin’s.</li>
|
||||
</ul></li>
|
||||
<li><strong>HAL/LL I2S</strong> driver
|
||||
<ul>
|
||||
<li>Update HAL_I2S_DMAStop() API to be more safe
|
||||
<ul>
|
||||
<li>Add a check on BSY, TXE and RXNE flags before disabling the I2S</li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
<li><strong>HAL/LL SPI</strong> driver
|
||||
<ul>
|
||||
<li>Update SPI_DMAReceiveCplt() API to handle efficiently the repeated transfers.
|
||||
<ul>
|
||||
<li>Disable TX DMA request only in bidirectional receive mode</li>
|
||||
</ul></li>
|
||||
<li>Update HAL_SPI_Init() API
|
||||
<ul>
|
||||
<li>To avoid setting the BaudRatePrescaler in case of Slave Motorola Mode</li>
|
||||
<li>Use the bit-mask for SPI configuration</li>
|
||||
</ul></li>
|
||||
<li>Update Transmit/Receive processes in half-duplex mode
|
||||
<ul>
|
||||
<li>Disable the SPI instance before setting BDIOE bit</li>
|
||||
</ul></li>
|
||||
<li>Fix wrong timeout management
|
||||
<ul>
|
||||
<li>Calculate Timeout based on a software loop to avoid blocking issue if Systick is disabled</li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
<li><strong>HAL NOR</strong> driver
|
||||
<ul>
|
||||
<li>Update address calculation in HAL_NOR_ProgramBuffer()</li>
|
||||
<li>Apply adequate commands according to the command set field value
|
||||
<ul>
|
||||
<li>command set 1 for Micron JS28F512P33</li>
|
||||
<li>command set 2 for Micron M29W128G and Cypress S29GL128P</li>
|
||||
</ul></li>
|
||||
<li>Add new commands operations:
|
||||
<ul>
|
||||
<li>NOR_CMD_READ_ARRAY</li>
|
||||
<li>NOR_CMD_WORD_PROGRAM</li>
|
||||
<li>NOR_CMD_BUFFERED_PROGRAM</li>
|
||||
<li>NOR_CMD_CONFIRM</li>
|
||||
<li>NOR_CMD_BLOCK_ERASE</li>
|
||||
<li>NOR_CMD_BLOCK_UNLOCK</li>
|
||||
<li>NOR_CMD_READ_STATUS_REG</li>
|
||||
<li>NOR_CMD_CLEAR_STATUS_REG</li>
|
||||
</ul></li>
|
||||
<li>Update some APIs in order to be compliant for memories with another command set.
|
||||
<ul>
|
||||
<li>HAL_NOR_Init()</li>
|
||||
<li>HAL_NOR_Read_ID()</li>
|
||||
<li>HAL_NOR_ReturnToReadMode()</li>
|
||||
<li>HAL_NOR_Read()</li>
|
||||
<li>HAL_NOR_Program()</li>
|
||||
<li>HAL_NOR_ReadBuffer()</li>
|
||||
<li>HAL_NOR_ProgramBuffer()</li>
|
||||
<li>HAL_NOR_Erase_Block()</li>
|
||||
<li>HAL_NOR_Erase_Chip()</li>
|
||||
<li>HAL_NOR_GetStatus()</li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
<li><strong>HAL SRAM</strong> driver
|
||||
<ul>
|
||||
<li>General update to enhance HAL SRAM driver robustness
|
||||
<ul>
|
||||
<li>Update HAL_SRAM_Init() API to avoid activation of burst access for SRAM</li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
<li><strong>HAL FSMC</strong> driver
|
||||
<ul>
|
||||
<li>Update FSMC_NORSRAM_Init() API in order to resolve compilation issue with MS Visual 2017</li>
|
||||
<li>Update FSMC_NORSRAM_Extended_Timing_Init() API in order to manage Bus turnaround phase duration FSMC_BWTR1_BUSTURN availability.</li>
|
||||
</ul></li>
|
||||
<li><strong>LL UTILS</strong> driver
|
||||
<ul>
|
||||
<li>UTILS_SetFlashLatency() API renamed to LL_SetFlashLatency() and set exportable.</li>
|
||||
</ul></li>
|
||||
<li><strong>HAL/LL IWDG</strong> driver
|
||||
<ul>
|
||||
<li>Update HAL_IWDG_DEFAULT_TIMEOUT define value to consider LSI value instead of hardcoded value</li>
|
||||
</ul></li>
|
||||
<li><strong>HAL/LL TIM</strong> driver
|
||||
<ul>
|
||||
<li>Update Encoder interface mode to keep TIM_CCER_CCxNP bits low
|
||||
<ul>
|
||||
<li>Add TIM_ENCODERINPUTPOLARITY_RISING and TIM_ENCODERINPUTPOLARITY_FALLING definitions to determine encoder input polarity.</li>
|
||||
<li>Add IS_TIM_ENCODERINPUT_POLARITY() macro to check the encoder input polarity.</li>
|
||||
<li>Update HAL_TIM_Encoder_Init() API</li>
|
||||
<li>Replace IS_TIM_IC_POLARITY() macro by IS_TIM_ENCODERINPUT_POLARITY() macro.</li>
|
||||
</ul></li>
|
||||
<li>Fix bug when using multiple DMA request to different channels of same timer
|
||||
<ul>
|
||||
<li>Introduce DMA burst state management mechanism
|
||||
<ul>
|
||||
<li>Add a new structure for DMA Burst States definition : HAL_TIM_DMABurstStateTypeDef</li>
|
||||
<li>Update __HAL_TIM_RESET_HANDLE_STATE to support DMABurstState</li>
|
||||
<li>Add a new API HAL_TIM_DMABurstState() to get the actual state of a DMA burst operation</li>
|
||||
<li>Add DMABurstState, the DMA burst operation state, in the TIM_HandleTypeDef structure</li>
|
||||
<li>Add new API TIM_DMAErrorCCxN() for TIM DMA error callback (complementary channel)</li>
|
||||
<li>Add new API TIM_DMADelayPulseNCplt() for TIM DMA Delay Pulse complete callback (complementary channel)</li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
<li>Implement TIM channel state management mechanism
|
||||
<ul>
|
||||
<li>Add new macro
|
||||
<ul>
|
||||
<li>TIM_CHANNEL_STATE_SET_ALL and TIM_CHANNEL_N_STATE_SET_ALL</li>
|
||||
<li>TIM_CHANNEL_STATE_SET and TIM_CHANNEL_N_STATE_SET</li>
|
||||
<li>TIM_CHANNEL_STATE_GET and TIM_CHANNEL_N_STATE_GET</li>
|
||||
</ul></li>
|
||||
<li>Add new API HAL_TIM_GetActiveChannel()</li>
|
||||
<li>Add new API HAL_TIM_GetChannelState() to get actual state of the TIM channel</li>
|
||||
<li>Add a new structure for TIM channel States definition : HAL_TIM_ChannelStateTypeDef</li>
|
||||
<li>Update __HAL_TIM_RESET_HANDLE_STATE to support ChannelState and ChannelNState</li>
|
||||
<li>Add a new element in the TIM_HandleTypeDef structure : ChannelState to manage TIM channel operation state</li>
|
||||
<li>Add a new element in the TIM_HandleTypeDef structure : ChannelNState to manage TIM complementary channel operation state</li>
|
||||
</ul></li>
|
||||
<li>Update HAL_TIMEx_MasterConfigSynchronization() API to avoid functional errors and assert fails when using some TIM instances as input trigger.
|
||||
<ul>
|
||||
<li>Replace IS_TIM_SYNCHRO_INSTANCE() macro by IS_TIM_MASTER_INSTANCE() macro.</li>
|
||||
<li>Add IS_TIM_SLAVE_INSTANCE() macro to check on TIM_SMCR_MSM bit.</li>
|
||||
</ul></li>
|
||||
<li>Remove ‘register’ storage class specifier from LL TIM driver.</li>
|
||||
<li>Add new API HAL_TIM_DMABurst_MultiWriteStart() allowing to configure the DMA Burst to transfer multiple Data from the memory to the TIM peripheral</li>
|
||||
<li>Add new API HAL_TIM_DMABurst_MultiReadStart() allowing to configure the DMA Burst to transfer Data from the TIM peripheral to the memory</li>
|
||||
</ul></li>
|
||||
<li><strong>HAL/LL UART</strong> driver
|
||||
<ul>
|
||||
<li>Update UART polling processes to handle efficiently the Lock mechanism
|
||||
<ul>
|
||||
<li>Update UART_Transmit_IT(), UART_Receive_IT(), HAL_UART_Transmit() and HAL_UART_Receive() APIs.</li>
|
||||
</ul></li>
|
||||
<li>Update UART polling and interruption processes to fix issues related to accesses out of user specified buffer.
|
||||
<ul>
|
||||
<li>Update UART_Transmit_IT and UART_Receive_IT.</li>
|
||||
</ul></li>
|
||||
<li>Update HAL_UART_Transmit and HAL_UART_Receive.</li>
|
||||
<li>Update UART interruption handler to manage correctly the overrun interrupt
|
||||
<ul>
|
||||
<li>Add in the HAL_UART_IRQHandler() API a check on USART_CR1_RXNEIE bit when an overrun interrupt occurs.</li>
|
||||
</ul></li>
|
||||
<li>Update UART BRR calculation for ROM size gain</li>
|
||||
</ul></li>
|
||||
<li><strong>HAL/LL USART</strong> driver
|
||||
<ul>
|
||||
<li>Update USART interruption handler to manage correctly the overrun interrupt
|
||||
<ul>
|
||||
<li>Add in the HAL_USART_IRQHandler() API a check on USART_CR1_RXNEIE bit when an overrun interrupt occurs.</li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
<li><strong>HAL SMARTCARD</strong> driver
|
||||
<ul>
|
||||
<li>Update SMARTCARD interruption handler to manage correctly the overrun interrupt
|
||||
<ul>
|
||||
<li>Add in the HAL_SMARTCARD_IRQHandler() API a check on USART_CR1_RXNEIE bit when an overrun interrupt occurs.</li>
|
||||
</ul></li>
|
||||
<li>Update SMARTCARD transmission and reception API to handle memory corruption
|
||||
<ul>
|
||||
<li>HAL_SMARTCARD_Transmit(), HAL_SMARTCARD_Receive(), HAL_SMARTCARD_Transmit_IT() and HAL_SMARTCARD_Receive_IT().</li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
<li><p><strong>CMSIS</strong></p>
|
||||
<ul>
|
||||
<li>All header files
|
||||
<ul>
|
||||
<li>Remove unused IS_TIM_SYNCHRO_INSTANCE() assert macro</li>
|
||||
</ul></li>
|
||||
<li>Add missing I2SCFG and I2SPR bits difinitions for STM32F101xE and STM32F101xG</li>
|
||||
<li>Protect Vector table modification following SRAM or FLASH preprocessor directive by a generic preprocessor directive : USER_VECT_TAB_ADDRESS</li>
|
||||
<li>SystemInit(): update to don’t reset RCC registers to its reset values.</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<h2 id="contents">Contents</h2>
|
||||
<ul>
|
||||
<li>The STM32CubeF1 Firmware package comes with a rich set of examples running on STMicroelectronics boards, organized by board and provided with pre-configured projects for the main supported toolchains. The exhaustive list of projects is provided in this table <a href="Projects/STM32CubeProjectsList.html">STM32CubeProjectsList.html</a>.</li>
|
||||
<li>Projects release notes
|
||||
<ul>
|
||||
<li>STM32F103RB-Nucleo
|
||||
<ul>
|
||||
<li>Applications <a href="Projects\STM32F103RB-Nucleo\Applications\Release_Notes.html">release notes</a></li>
|
||||
<li>Demonstrations <a href="Projects\STM32F103RB-Nucleo\Demonstrations\Release_Notes.html">release notes</a></li>
|
||||
<li>Examples <a href="Projects\STM32F103RB-Nucleo\Examples\Release_Notes.html">release notes</a></li>
|
||||
<li>Examples_LL <a href="Projects\STM32F103RB-Nucleo\Examples_LL\Release_Notes.html">release notes</a></li>
|
||||
<li>Examples_MIX <a href="Projects\STM32F103RB-Nucleo\Examples_MIX\Release_Notes.html">release notes</a></li>
|
||||
<li>Templates <a href="Projects\STM32F103RB-Nucleo\Templates\Release_Notes.html">release notes</a></li>
|
||||
<li>Templates_LL <a href="Projects\STM32F103RB-Nucleo\Templates_LL\Release_Notes.html">release notes</a></li>
|
||||
</ul></li>
|
||||
<li>STM32VL-Discovery
|
||||
<ul>
|
||||
<li>Examples <a href="Projects\STM32VL-Discovery\Examples\Release_Notes.html">release notes</a></li>
|
||||
<li>Templates <a href="Projects\STM32VL-Discovery\Templates\Release_Notes.html">release notes</a></li>
|
||||
<li>Templates_LL <a href="Projects\STM32VL-Discovery\Templates_LL\Release_Notes.html">release notes</a></li>
|
||||
</ul></li>
|
||||
<li>STM3210C_EVAL
|
||||
<ul>
|
||||
<li>Applications <a href="Projects\STM3210C_EVAL\Applications\Release_Notes.html">release notes</a></li>
|
||||
<li>Examples <a href="Projects\STM3210C_EVAL\Examples\Release_Notes.html">release notes</a></li>
|
||||
<li>Templates <a href="Projects\STM3210C_EVAL\Templates\Release_Notes.html">release notes</a></li>
|
||||
<li>Templates_LL <a href="Projects\STM3210C_EVAL\Applications\Release_Notes.html">release notes</a></li>
|
||||
</ul></li>
|
||||
<li>STM3210E_EVAL
|
||||
<ul>
|
||||
<li>Applications <a href="Projects\STM3210E_EVAL\Applications\Release_Notes.html">release notes</a></li>
|
||||
<li>Examples <a href="Projects\STM3210E_EVAL\Examples\Release_Notes.html">release notes</a></li>
|
||||
<li>Examples_LL <a href="Projects\STM3210E_EVAL\Examples_LL\Release_Notes.html">release notes</a></li>
|
||||
<li>Examples_MIX <a href="Projects\STM3210E_EVAL\Examples_MIX\Release_Notes.html">release notes</a></li>
|
||||
<li>Templates <a href="Projects\STM3210E_EVAL\Templates\Release_Notes.html">release notes</a></li>
|
||||
<li>Templates_LL <a href="Projects\STM3210E_EVAL\Templates_LL\Release_Notes.html">release notes</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<table>
|
||||
<thead>
|
||||
<tr class="header">
|
||||
<th style="text-align: left;">Name</th>
|
||||
<th style="text-align: center;">Version</th>
|
||||
<th style="text-align: center;">Licence</th>
|
||||
<th style="text-align: center;">Release note</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;"><strong>STM32F1xx CMSIS</strong></td>
|
||||
<td style="text-align: center;"><strong>V4.3.2</strong></td>
|
||||
<td style="text-align: center;"><a href="https://opensource.org/licenses/Apache-2.0">Apache License 2.0</a></td>
|
||||
<td style="text-align: center;"><a href="Drivers/CMSIS/Device/ST/STM32F1xx/Release_Notes.html">release notes</a></td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td style="text-align: left;"><strong>STM32F1xx HAL</strong></td>
|
||||
<td style="text-align: center;"><strong>V1.1.6</strong></td>
|
||||
<td style="text-align: center;"><a href="https://opensource.org/licenses/BSD-3-Clause">BSD-3-Clause</a></td>
|
||||
<td style="text-align: center;"><a href="Drivers/STM32F1xx_HAL_Driver/Release_Notes.html">release notes</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></li>
|
||||
</ul>
|
||||
<h2 id="known-limitations">Known Limitations</h2>
|
||||
<ul>
|
||||
<li>SW4STM32 projects aren’t provided for STM32VL-Discovery board because it embeds STLinv1 version that is not hardware supported by SW4STM32 toolchain.</li>
|
||||
</ul>
|
||||
<h2 id="development-toolchains-and-compilers">Development Toolchains and Compilers</h2>
|
||||
<ul>
|
||||
<li>IAR Embedded Workbench for ARM (EWARM) toolchain V8.20.2+ ST-Link</li>
|
||||
<li>RealView Microcontroller Development Kit (MDK-ARM) toolchain V5.26 + ST-LINK</li>
|
||||
<li>System Workbench for STM32 (SW4STM32) toolchain V2.9 + ST-Link</li>
|
||||
</ul>
|
||||
<h2 id="supported-devices-and-eval-boards">Supported Devices and EVAL boards</h2>
|
||||
<ul>
|
||||
<li>STM32F1xx Value, Access, USB, Performance, OTG & Ethernet Lines</li>
|
||||
<li>STM3210E-Eval board RevD</li>
|
||||
<li>STM3210C-Eval board RevC</li>
|
||||
<li>STM32VL-Discovery board RevC</li>
|
||||
<li>STM32F1xx-Nucleo board RevC</li>
|
||||
</ul>
|
||||
<h2 id="backward-compatibility">Backward Compatibility</h2>
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
<h2 id="dependencies">Dependencies</h2>
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section1_8_1" aria-hidden="true"> <label for="collapse-section1_8_1" aria-hidden="true"><strong>V1.8.1 / 30-July-2020</strong></label>
|
||||
<div>
|
||||
<h1 id="maintenance-release-1">Maintenance release</h1>
|
||||
<h2 id="main-changes-1">Main Changes</h2>
|
||||
<ul>
|
||||
<li><p>Patch release to fix known defects and enhancements implementation</p></li>
|
||||
<li><p><strong>HAL</strong></p>
|
||||
<ul>
|
||||
<li><strong>HAL</strong> driver
|
||||
<ul>
|
||||
<li>Enhance HAL_SetTickFreq() API robustness
|
||||
|
|
@ -120,7 +403,7 @@
|
|||
</ul></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<h2 id="contents">Contents</h2>
|
||||
<h2 id="contents-1">Contents</h2>
|
||||
<table>
|
||||
<caption>Drivers</caption>
|
||||
<thead>
|
||||
|
|
@ -145,8 +428,8 @@
|
|||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section8" aria-hidden="true"> <label for="collapse-section8" aria-hidden="true"><strong>V1.8.0 / 26-June-2019</strong></label>
|
||||
<div>
|
||||
<h1 id="maintenance-release-1">Maintenance release</h1>
|
||||
<h2 id="main-changes-1">Main Changes</h2>
|
||||
<h1 id="maintenance-release-2">Maintenance release</h1>
|
||||
<h2 id="main-changes-2">Main Changes</h2>
|
||||
<ul>
|
||||
<li><p>General updates to fix known defects and enhancements implementation</p></li>
|
||||
<li><p>Remove support of TrueSTUDIO tool chain</p></li>
|
||||
|
|
@ -238,7 +521,7 @@
|
|||
</ul></li>
|
||||
<li><p>For the complete list of changes, please refer to the release notes of each firmware component</p></li>
|
||||
</ul>
|
||||
<h2 id="contents-1">Contents</h2>
|
||||
<h2 id="contents-2">Contents</h2>
|
||||
<ul>
|
||||
<li>The STM32CubeF1 Firmware package comes with a rich set of examples running on STMicroelectronics boards, organized by board and provided with pre-configured projects for the main supported toolchains. The exhaustive list of projects is provided in this table <a href="Projects/STM32CubeProjectsList.html">STM32CubeProjectsList.html</a>.</li>
|
||||
<li>Projects release notes
|
||||
|
|
@ -484,18 +767,18 @@
|
|||
</tbody>
|
||||
</table></li>
|
||||
</ul>
|
||||
<h2 id="known-limitations">Known Limitations</h2>
|
||||
<h2 id="known-limitations-1">Known Limitations</h2>
|
||||
<ul>
|
||||
<li>SW4STM32 projects aren’t provided for STM32VL-Discovery board because it embeds STLinv1 version that is not hardware supported by SW4STM32 toolchain.</li>
|
||||
<li>Register callback feature will be deployed on HAL I2C driver in next release</li>
|
||||
</ul>
|
||||
<h2 id="development-toolchains-and-compilers">Development Toolchains and Compilers</h2>
|
||||
<h2 id="development-toolchains-and-compilers-1">Development Toolchains and Compilers</h2>
|
||||
<ul>
|
||||
<li>IAR Embedded Workbench for ARM (EWARM) toolchain <strong>V8.20.2</strong>+ ST-Link</li>
|
||||
<li>RealView Microcontroller Development Kit (MDK-ARM) toolchain <strong>V5.26</strong> + ST-LINK</li>
|
||||
<li>System Workbench for STM32 (SW4STM32) toolchain <strong>V2.9</strong> + ST-Link</li>
|
||||
</ul>
|
||||
<h2 id="supported-devices-and-eval-boards">Supported Devices and EVAL boards</h2>
|
||||
<h2 id="supported-devices-and-eval-boards-1">Supported Devices and EVAL boards</h2>
|
||||
<ul>
|
||||
<li>STM32F1xx Value, Access, USB, Performance, OTG & Ethernet Lines</li>
|
||||
<li>STM3210E-Eval board RevD</li>
|
||||
|
|
@ -503,11 +786,11 @@
|
|||
<li>STM32VL-Discovery board RevC</li>
|
||||
<li>STM32F1xx-Nucleo board RevC</li>
|
||||
</ul>
|
||||
<h2 id="backward-compatibility">Backward Compatibility</h2>
|
||||
<h2 id="backward-compatibility-1">Backward Compatibility</h2>
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
<h2 id="dependencies">Dependencies</h2>
|
||||
<h2 id="dependencies-1">Dependencies</h2>
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
|
|
@ -516,8 +799,8 @@
|
|||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section7" aria-hidden="true"> <label for="collapse-section7" aria-hidden="true"><strong>V1.7.0 / 09-October-2018</strong></label>
|
||||
<div>
|
||||
<h1 id="maintenance-release-2">Maintenance release</h1>
|
||||
<h2 id="main-changes-2">Main Changes</h2>
|
||||
<h1 id="maintenance-release-3">Maintenance release</h1>
|
||||
<h2 id="main-changes-3">Main Changes</h2>
|
||||
<ul>
|
||||
<li>General update to fix known defects and several implementations enhancement</li>
|
||||
<li><strong>The following changes done on the HAL drivers require an update on the application code based on older HAL versions</strong>
|
||||
|
|
@ -545,7 +828,7 @@
|
|||
</ul></li>
|
||||
<li>For the complete list of changes, please refer to the release notes of each firmware component</li>
|
||||
</ul>
|
||||
<h2 id="contents-2">Contents</h2>
|
||||
<h2 id="contents-3">Contents</h2>
|
||||
<ul>
|
||||
<li>The STM32CubeF1 Firmware package comes with a rich set of examples running on STMicroelectronics boards, organized by board and provided with pre-configured projects for the main supported toolchains. The exhaustive list of projects is provided in this table <a href="Projects/STM32CubeProjectsList.html">STM32CubeProjectsList.html</a>.</li>
|
||||
<li>Projects release notes
|
||||
|
|
@ -791,18 +1074,18 @@
|
|||
</tbody>
|
||||
</table></li>
|
||||
</ul>
|
||||
<h2 id="known-limitations-1">Known Limitations</h2>
|
||||
<h2 id="known-limitations-2">Known Limitations</h2>
|
||||
<ul>
|
||||
<li>SW4STM32 projects aren’t provided for STM32VL-Discovery board because it embeds STLinv1 version that is not hardware supported by SW4STM32 toolchain.</li>
|
||||
</ul>
|
||||
<h2 id="development-toolchains-and-compilers-1">Development Toolchains and Compilers</h2>
|
||||
<h2 id="development-toolchains-and-compilers-2">Development Toolchains and Compilers</h2>
|
||||
<ul>
|
||||
<li>IAR Embedded Workbench for ARM (EWARM) toolchain V7.80.4</li>
|
||||
<li>RealView Microcontroller Development Kit (MDK-ARM) toolchain V5.23</li>
|
||||
<li>Atollic TrueSTUDIO STM32 (TrueSTUDIO) toolchain V5.5.2</li>
|
||||
<li>System Workbench for STM32 (SW4STM32) toolchain V1.13</li>
|
||||
</ul>
|
||||
<h2 id="supported-devices-and-eval-boards-1">Supported Devices and EVAL boards</h2>
|
||||
<h2 id="supported-devices-and-eval-boards-2">Supported Devices and EVAL boards</h2>
|
||||
<ul>
|
||||
<li>STM32F1xx Value, Access, USB, Performance, OTG & Ethernet Lines</li>
|
||||
<li>STM3210E-Eval board RevD</li>
|
||||
|
|
@ -810,11 +1093,11 @@
|
|||
<li>STM32VL-Discovery board RevC</li>
|
||||
<li>STM32F1xx-Nucleo board RevC</li>
|
||||
</ul>
|
||||
<h2 id="backward-compatibility-1">Backward Compatibility</h2>
|
||||
<h2 id="backward-compatibility-2">Backward Compatibility</h2>
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
<h2 id="dependencies-1">Dependencies</h2>
|
||||
<h2 id="dependencies-2">Dependencies</h2>
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
|
|
@ -823,12 +1106,12 @@
|
|||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section68" aria-hidden="true"> <label for="collapse-section68" aria-hidden="true"><strong>V1.6.1 / 09-March-2018</strong></label>
|
||||
<div>
|
||||
<h1 id="maintenance-release-3">Maintenance release</h1>
|
||||
<h2 id="main-changes-3">Main Changes</h2>
|
||||
<h1 id="maintenance-release-4">Maintenance release</h1>
|
||||
<h2 id="main-changes-4">Main Changes</h2>
|
||||
<ul>
|
||||
<li><strong>Patch release to fix issues in GPIO, RCC, SMARTCARD, I2C and Generic HAL/LL drivers</strong></li>
|
||||
</ul>
|
||||
<h2 id="contents-3">Contents</h2>
|
||||
<h2 id="contents-4">Contents</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr class="header">
|
||||
|
|
@ -850,8 +1133,8 @@
|
|||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section6" aria-hidden="true"> <label for="collapse-section6" aria-hidden="true"><strong>V1.6.0 / 12-May-2017</strong></label>
|
||||
<div>
|
||||
<h1 id="maintenance-release-4">Maintenance release</h1>
|
||||
<h2 id="main-changes-4">Main Changes</h2>
|
||||
<h1 id="maintenance-release-5">Maintenance release</h1>
|
||||
<h2 id="main-changes-5">Main Changes</h2>
|
||||
<ul>
|
||||
<li><p>General update to fix known defects and several implementations enhancement</p></li>
|
||||
<li><p><strong>HAL</strong></p>
|
||||
|
|
@ -866,7 +1149,7 @@
|
|||
</ul></li>
|
||||
<li><p>For the complete list of changes, please refer to the release notes of each firmware component</p></li>
|
||||
</ul>
|
||||
<h2 id="contents-4">Contents</h2>
|
||||
<h2 id="contents-5">Contents</h2>
|
||||
<ul>
|
||||
<li>The STM32CubeF1 Firmware package comes with a rich set of examples running on STMicroelectronics boards, organized by board and provided with pre-configured projects for the main supported toolchains. The exhaustive list of projects is provided in this table <a href="Projects/STM32CubeProjectsList.html">STM32CubeProjectsList.html</a>.</li>
|
||||
<li>Projects release notes
|
||||
|
|
@ -1112,18 +1395,18 @@
|
|||
</tbody>
|
||||
</table></li>
|
||||
</ul>
|
||||
<h2 id="known-limitations-2">Known Limitations</h2>
|
||||
<h2 id="known-limitations-3">Known Limitations</h2>
|
||||
<ul>
|
||||
<li>SW4STM32 projects aren’t provided for STM32VL-Discovery board because it embeds STLinv1 version that is not hardware supported by SW4STM32 toolchain.</li>
|
||||
</ul>
|
||||
<h2 id="development-toolchains-and-compilers-2">Development Toolchains and Compilers</h2>
|
||||
<h2 id="development-toolchains-and-compilers-3">Development Toolchains and Compilers</h2>
|
||||
<ul>
|
||||
<li>IAR Embedded Workbench for ARM (EWARM) toolchain V7.80.4</li>
|
||||
<li>RealView Microcontroller Development Kit (MDK-ARM) toolchain V5.23</li>
|
||||
<li>Atollic TrueSTUDIO STM32 (TrueSTUDIO) toolchain V5.5.2</li>
|
||||
<li>System Workbench for STM32 (SW4STM32) toolchain V1.13</li>
|
||||
</ul>
|
||||
<h2 id="supported-devices-and-eval-boards-2">Supported Devices and EVAL boards</h2>
|
||||
<h2 id="supported-devices-and-eval-boards-3">Supported Devices and EVAL boards</h2>
|
||||
<ul>
|
||||
<li>STM32F1xx Value, Access, USB, Performance, OTG & Ethernet Lines</li>
|
||||
<li>STM3210E-Eval board RevD</li>
|
||||
|
|
@ -1131,11 +1414,11 @@
|
|||
<li>STM32VL-Discovery board RevC</li>
|
||||
<li>STM32F1xx-Nucleo board RevC</li>
|
||||
</ul>
|
||||
<h2 id="backward-compatibility-2">Backward Compatibility</h2>
|
||||
<h2 id="backward-compatibility-3">Backward Compatibility</h2>
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
<h2 id="dependencies-2">Dependencies</h2>
|
||||
<h2 id="dependencies-3">Dependencies</h2>
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
|
|
@ -1144,8 +1427,8 @@
|
|||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section5" aria-hidden="true"> <label for="collapse-section5" aria-hidden="true"><strong>V1.5.0 / 14-April-2017</strong></label>
|
||||
<div>
|
||||
<h1 id="maintenance-release-5">Maintenance release</h1>
|
||||
<h2 id="main-changes-5">Main Changes</h2>
|
||||
<h1 id="maintenance-release-6">Maintenance release</h1>
|
||||
<h2 id="main-changes-6">Main Changes</h2>
|
||||
<ul>
|
||||
<li><p>Add Low Layer drivers under Drivers32F1xx_HAL_Driver</p>
|
||||
<ul>
|
||||
|
|
@ -1232,7 +1515,7 @@
|
|||
</ul></li>
|
||||
<li><p>For the complete list of changes, please refer to the release notes of each firmware component</p></li>
|
||||
</ul>
|
||||
<h2 id="contents-5">Contents</h2>
|
||||
<h2 id="contents-6">Contents</h2>
|
||||
<ul>
|
||||
<li>The STM32CubeF1 Firmware package comes with a rich set of examples running on STMicroelectronics boards, organized by board and provided with pre-configured projects for the main supported toolchains. The exhaustive list of projects is provided in this table <a href="Projects/STM32CubeProjectsList.html">STM32CubeProjectsList.html</a>.</li>
|
||||
<li>Projects release notes
|
||||
|
|
@ -1478,18 +1761,18 @@
|
|||
</tbody>
|
||||
</table></li>
|
||||
</ul>
|
||||
<h2 id="known-limitations-3">Known Limitations</h2>
|
||||
<h2 id="known-limitations-4">Known Limitations</h2>
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
<h2 id="development-toolchains-and-compilers-3">Development Toolchains and Compilers</h2>
|
||||
<h2 id="development-toolchains-and-compilers-4">Development Toolchains and Compilers</h2>
|
||||
<ul>
|
||||
<li>IAR Embedded Workbench for ARM (EWARM) toolchain V7.80.4</li>
|
||||
<li>RealView Microcontroller Development Kit (MDK-ARM) toolchain V5.23</li>
|
||||
<li>Atollic TrueSTUDIO STM32 (TrueSTUDIO) toolchain V5.5.2</li>
|
||||
<li>System Workbench for STM32 (SW4STM32) toolchain V1.13</li>
|
||||
</ul>
|
||||
<h2 id="supported-devices-and-eval-boards-3">Supported Devices and EVAL boards</h2>
|
||||
<h2 id="supported-devices-and-eval-boards-4">Supported Devices and EVAL boards</h2>
|
||||
<ul>
|
||||
<li>STM32F1xx Value, Access, USB, Performance, OTG & Ethernet Lines</li>
|
||||
<li>STM3210E-Eval board RevD</li>
|
||||
|
|
@ -1497,11 +1780,11 @@
|
|||
<li>STM32VL-Discovery board RevC</li>
|
||||
<li>STM32F1xx-Nucleo board RevC</li>
|
||||
</ul>
|
||||
<h2 id="backward-compatibility-3">Backward Compatibility</h2>
|
||||
<h2 id="backward-compatibility-4">Backward Compatibility</h2>
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
<h2 id="dependencies-3">Dependencies</h2>
|
||||
<h2 id="dependencies-4">Dependencies</h2>
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
|
|
@ -1510,8 +1793,8 @@
|
|||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section4" aria-hidden="true"> <label for="collapse-section4" aria-hidden="true"><strong>V1.4.0 / 29-April-2016</strong></label>
|
||||
<div>
|
||||
<h1 id="maintenance-release-6">Maintenance release</h1>
|
||||
<h2 id="main-changes-6">Main Changes</h2>
|
||||
<h1 id="maintenance-release-7">Maintenance release</h1>
|
||||
<h2 id="main-changes-7">Main Changes</h2>
|
||||
<ul>
|
||||
<li><p><strong>Maintenance release to fix known defects and several enhancements implementation.</strong></p></li>
|
||||
<li><p><strong>HAL</strong></p>
|
||||
|
|
@ -1577,7 +1860,7 @@
|
|||
<li>Add latest version of STM32CubeUpdater (V4.10.0).</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<h2 id="contents-6">Contents</h2>
|
||||
<h2 id="contents-7">Contents</h2>
|
||||
<ul>
|
||||
<li>The STM32CubeF1 Firmware package comes with a rich set of examples running on STMicroelectronics boards, organized by board and provided with pre-configured projects for the main supported toolchains. The exhaustive list of projects is provided in this table <a href="Projects/STM32CubeProjectsList.html">STM32CubeProjectsList.html</a>.</li>
|
||||
<li>Projects release notes
|
||||
|
|
@ -1822,18 +2105,18 @@
|
|||
</tbody>
|
||||
</table></li>
|
||||
</ul>
|
||||
<h2 id="known-limitations-4">Known Limitations</h2>
|
||||
<h2 id="known-limitations-5">Known Limitations</h2>
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
<h2 id="development-toolchains-and-compilers-4">Development Toolchains and Compilers</h2>
|
||||
<h2 id="development-toolchains-and-compilers-5">Development Toolchains and Compilers</h2>
|
||||
<ul>
|
||||
<li>IAR Embedded Workbench for ARM (EWARM) toolchain V7.20 + ST-LINK</li>
|
||||
<li>RealView Microcontroller Development Kit (MDK-ARM) toolchain V5.17 + ST-LINK</li>
|
||||
<li>Atollic TrueSTUDIO STM32 (TrueSTUDIO) toolchain V5.1.1 + ST-LINK</li>
|
||||
<li>System Workbench for STM32 (SW4STM32) toolchain V1.5.0 + ST-LINK</li>
|
||||
</ul>
|
||||
<h2 id="supported-devices-and-eval-boards-4">Supported Devices and EVAL boards</h2>
|
||||
<h2 id="supported-devices-and-eval-boards-5">Supported Devices and EVAL boards</h2>
|
||||
<ul>
|
||||
<li>STM32F1xx Value, Access, USB, Performance, OTG & Ethernet Lines</li>
|
||||
<li>STM3210E-Eval board RevD</li>
|
||||
|
|
@ -1841,11 +2124,11 @@
|
|||
<li>STM32VL-Discovery board RevC</li>
|
||||
<li>STM32F1xx-Nucleo board RevC</li>
|
||||
</ul>
|
||||
<h2 id="backward-compatibility-4">Backward Compatibility</h2>
|
||||
<h2 id="backward-compatibility-5">Backward Compatibility</h2>
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
<h2 id="dependencies-4">Dependencies</h2>
|
||||
<h2 id="dependencies-5">Dependencies</h2>
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
|
|
@ -1854,15 +2137,15 @@
|
|||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section3" aria-hidden="true"> <label for="collapse-section3" aria-hidden="true"><strong>V1.3.1 / 11-January-2016</strong></label>
|
||||
<div>
|
||||
<h1 id="maintenance-release-7">Maintenance release</h1>
|
||||
<h2 id="main-changes-7">Main Changes</h2>
|
||||
<h1 id="maintenance-release-8">Maintenance release</h1>
|
||||
<h2 id="main-changes-8">Main Changes</h2>
|
||||
<ul>
|
||||
<li><strong>Patch release to fix issue in HAL driver:</strong>
|
||||
<ul>
|
||||
<li>Remove the #if defined(USE_HAL_LEGACY) condition to include Legacy/stm32_hal_legacy.h by default, in stm32f1xx_hal_def.h.</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<h2 id="contents-7">Contents</h2>
|
||||
<h2 id="contents-8">Contents</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr class="header">
|
||||
|
|
@ -1881,18 +2164,18 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h2 id="known-limitations-5">Known Limitations</h2>
|
||||
<h2 id="known-limitations-6">Known Limitations</h2>
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
<h2 id="development-toolchains-and-compilers-5">Development Toolchains and Compilers</h2>
|
||||
<h2 id="development-toolchains-and-compilers-6">Development Toolchains and Compilers</h2>
|
||||
<ul>
|
||||
<li>IAR Embedded Workbench for ARM (EWARM) toolchain V7.20 + ST-LINK</li>
|
||||
<li>RealView Microcontroller Development Kit (MDK-ARM) toolchain V5.17 + ST-LINK</li>
|
||||
<li>Atollic TrueSTUDIO STM32 (TrueSTUDIO) toolchain V5.1.1 + ST-LINK</li>
|
||||
<li>System Workbench for STM32 (SW4STM32) toolchain V1.5.0 + ST-LINK</li>
|
||||
</ul>
|
||||
<h2 id="supported-devices-and-eval-boards-5">Supported Devices and EVAL boards</h2>
|
||||
<h2 id="supported-devices-and-eval-boards-6">Supported Devices and EVAL boards</h2>
|
||||
<ul>
|
||||
<li>STM32F1xx Value, Access, USB, Performance, OTG & Ethernet lines</li>
|
||||
<li>STM3210E-Eval board RevD</li>
|
||||
|
|
@ -1900,11 +2183,11 @@
|
|||
<li>STM32VL-Discovery board RevC</li>
|
||||
<li>STM32F1xx-Nucleo board RevC</li>
|
||||
</ul>
|
||||
<h2 id="backward-compatibility-5">Backward Compatibility</h2>
|
||||
<h2 id="backward-compatibility-6">Backward Compatibility</h2>
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
<h2 id="dependencies-5">Dependencies</h2>
|
||||
<h2 id="dependencies-6">Dependencies</h2>
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
|
|
@ -1913,8 +2196,8 @@
|
|||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section1" aria-hidden="true"> <label for="collapse-section1" aria-hidden="true"><strong>V1.3.0 / 18-December-2015</strong></label>
|
||||
<div>
|
||||
<h1 id="maintenance-release-8">Maintenance release</h1>
|
||||
<h2 id="main-changes-8">Main Changes</h2>
|
||||
<h1 id="maintenance-release-9">Maintenance release</h1>
|
||||
<h2 id="main-changes-9">Main Changes</h2>
|
||||
<ul>
|
||||
<li><p><strong>Maintenance release to fix known defects and several enhancements implementation.</strong></p></li>
|
||||
<li><p><strong>HAL</strong></p>
|
||||
|
|
@ -1947,7 +2230,7 @@
|
|||
<li>Add latest version of STM32CubeUpdater (V4.10.0).</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<h2 id="contents-8">Contents</h2>
|
||||
<h2 id="contents-9">Contents</h2>
|
||||
<ul>
|
||||
<li>The STM32CubeF1 Firmware package comes with a rich set of examples running on STMicroelectronics boards, organized by board and provided with pre-configured projects for the main supported toolchains. The exhaustive list of projects is provided in this table <a href="Projects/STM32CubeProjectsList.html">STM32CubeProjectsList.html</a>.</li>
|
||||
<li>Projects release notes
|
||||
|
|
@ -2193,18 +2476,18 @@
|
|||
</tbody>
|
||||
</table></li>
|
||||
</ul>
|
||||
<h2 id="known-limitations-6">Known Limitations</h2>
|
||||
<h2 id="known-limitations-7">Known Limitations</h2>
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
<h2 id="development-toolchains-and-compilers-6">Development Toolchains and Compilers</h2>
|
||||
<h2 id="development-toolchains-and-compilers-7">Development Toolchains and Compilers</h2>
|
||||
<ul>
|
||||
<li>IAR Embedded Workbench for ARM (EWARM) toolchain V7.20 + ST-LINK</li>
|
||||
<li>RealView Microcontroller Development Kit (MDK-ARM) toolchain V5.17 + ST-LINK</li>
|
||||
<li>Atollic TrueSTUDIO STM32 (TrueSTUDIO) toolchain V5.1.1 + ST-LINK</li>
|
||||
<li>System Workbench for STM32 (SW4STM32) toolchain V1.5.0 + ST-LINK</li>
|
||||
</ul>
|
||||
<h2 id="supported-devices-and-eval-boards-6">Supported Devices and EVAL boards</h2>
|
||||
<h2 id="supported-devices-and-eval-boards-7">Supported Devices and EVAL boards</h2>
|
||||
<ul>
|
||||
<li>STM32F1xx Value, Access, USB, Performance, OTG & Ethernet Lines</li>
|
||||
<li>STM3210E-Eval board RevD</li>
|
||||
|
|
@ -2212,11 +2495,11 @@
|
|||
<li>STM32VL-Discovery board RevC</li>
|
||||
<li>STM32F1xx-Nucleo board RevC</li>
|
||||
</ul>
|
||||
<h2 id="backward-compatibility-6">Backward Compatibility</h2>
|
||||
<h2 id="backward-compatibility-7">Backward Compatibility</h2>
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
<h2 id="dependencies-6">Dependencies</h2>
|
||||
<h2 id="dependencies-7">Dependencies</h2>
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
|
|
@ -2225,8 +2508,8 @@
|
|||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section0" aria-hidden="true"> <label for="collapse-section0" aria-hidden="true"><strong>V1.2.0 / 31-July-2015</strong></label>
|
||||
<div>
|
||||
<h1 id="maintenance-release-9">Maintenance release</h1>
|
||||
<h2 id="main-changes-9">Main Changes</h2>
|
||||
<h1 id="maintenance-release-10">Maintenance release</h1>
|
||||
<h2 id="main-changes-10">Main Changes</h2>
|
||||
<ul>
|
||||
<li><p><strong>Maintenance release.</strong></p></li>
|
||||
<li><p><strong>Fix known defects and several enhancements implementation.</strong></p></li>
|
||||
|
|
@ -2272,7 +2555,7 @@
|
|||
<li>CMSIS-RTOS V1.02 (unchanged)</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<h2 id="contents-9">Contents</h2>
|
||||
<h2 id="contents-10">Contents</h2>
|
||||
<ul>
|
||||
<li>The STM32CubeF1 Firmware package comes with a rich set of examples running on STMicroelectronics boards, organized by board and provided with pre-configured projects for the main supported toolchains. The exhaustive list of projects is provided in this table <a href="Projects/STM32CubeProjectsList.html">STM32CubeProjectsList.html</a>.</li>
|
||||
<li>Projects release notes
|
||||
|
|
@ -2511,11 +2794,11 @@
|
|||
</tbody>
|
||||
</table></li>
|
||||
</ul>
|
||||
<h2 id="known-limitations-7">Known Limitations</h2>
|
||||
<h2 id="known-limitations-8">Known Limitations</h2>
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
<h2 id="development-toolchains-and-compilers-7">Development Toolchains and Compilers</h2>
|
||||
<h2 id="development-toolchains-and-compilers-8">Development Toolchains and Compilers</h2>
|
||||
<ul>
|
||||
<li>IAR Embedded Workbench for ARM (EWARM) toolchain V7.20 + ST-LINK</li>
|
||||
<li>RealView Microcontroller Development Kit (MDK-ARM) toolchain V5.10 + ST-LINK
|
||||
|
|
@ -2525,7 +2808,7 @@
|
|||
<li>Atollic TrueSTUDIO STM32 (TrueSTUDIO) toolchain V5.1.1 + ST-LINK</li>
|
||||
<li>System Workbench for STM32 (SW4STM32) toolchain V1.2.0 + ST-LINK</li>
|
||||
</ul>
|
||||
<h2 id="supported-devices-and-eval-boards-7">Supported Devices and EVAL boards</h2>
|
||||
<h2 id="supported-devices-and-eval-boards-8">Supported Devices and EVAL boards</h2>
|
||||
<ul>
|
||||
<li>STM32F1xx Value, Access, USB, Performance, OTG & Ethernet Lines</li>
|
||||
<li>STM3210E-Eval board RevD</li>
|
||||
|
|
@ -2533,11 +2816,11 @@
|
|||
<li>STM32VL-Discovery board RevC</li>
|
||||
<li>STM32F1xx-Nucleo board RevC</li>
|
||||
</ul>
|
||||
<h2 id="backward-compatibility-7">Backward Compatibility</h2>
|
||||
<h2 id="backward-compatibility-8">Backward Compatibility</h2>
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
<h2 id="dependencies-7">Dependencies</h2>
|
||||
<h2 id="dependencies-8">Dependencies</h2>
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
|
|
@ -2546,8 +2829,8 @@
|
|||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section000" aria-hidden="true"> <label for="collapse-section000" aria-hidden="true"><strong>V1.1.0 / 05-June-2015</strong></label>
|
||||
<div>
|
||||
<h1 id="maintenance-release-10">Maintenance release</h1>
|
||||
<h2 id="main-changes-10">Main Changes</h2>
|
||||
<h1 id="maintenance-release-11">Maintenance release</h1>
|
||||
<h2 id="main-changes-11">Main Changes</h2>
|
||||
<ul>
|
||||
<li><p><strong>Add support of System Workbench for STM32 (SW4STM32) toolchain</strong></p></li>
|
||||
<li><p><strong>HAL</strong></p></li>
|
||||
|
|
@ -2559,7 +2842,7 @@
|
|||
<li><p><strong>Projects</strong></p></li>
|
||||
<li><p>Add projects for SW4STM32 toolchain</p></li>
|
||||
</ul>
|
||||
<h2 id="contents-10">Contents</h2>
|
||||
<h2 id="contents-11">Contents</h2>
|
||||
<table>
|
||||
<caption>Drivers</caption>
|
||||
<thead>
|
||||
|
|
@ -2767,18 +3050,18 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h2 id="known-limitations-8">Known Limitations</h2>
|
||||
<h2 id="known-limitations-9">Known Limitations</h2>
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
<h2 id="development-toolchains-and-compilers-8">Development Toolchains and Compilers</h2>
|
||||
<h2 id="development-toolchains-and-compilers-9">Development Toolchains and Compilers</h2>
|
||||
<ul>
|
||||
<li>IAR Embedded Workbench for ARM (EWARM) toolchain V7.20 + ST-LINK</li>
|
||||
<li>RealView Microcontroller Development Kit (MDK-ARM) toolchain V5.10 + ST-LINK</li>
|
||||
<li>Atollic TrueSTUDIO STM32 (TrueSTUDIO) toolchain V5.1.1 + ST-LINK</li>
|
||||
<li>System Workbench for STM32 (SW4STM32) toolchain V1.2.0 + ST-LINK</li>
|
||||
</ul>
|
||||
<h2 id="supported-devices-and-eval-boards-8">Supported Devices and EVAL boards</h2>
|
||||
<h2 id="supported-devices-and-eval-boards-9">Supported Devices and EVAL boards</h2>
|
||||
<ul>
|
||||
<li>STM32F1xx Value, Access, USB, Performance, OTG & Ethernet Lines</li>
|
||||
<li>STM3210E-Eval board RevD</li>
|
||||
|
|
@ -2786,11 +3069,11 @@
|
|||
<li>STM32VL-Discovery board RevC</li>
|
||||
<li>STM32F1xx-Nucleo board RevC</li>
|
||||
</ul>
|
||||
<h2 id="backward-compatibility-8">Backward Compatibility</h2>
|
||||
<h2 id="backward-compatibility-9">Backward Compatibility</h2>
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
<h2 id="dependencies-8">Dependencies</h2>
|
||||
<h2 id="dependencies-9">Dependencies</h2>
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
|
|
@ -2799,12 +3082,12 @@
|
|||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section0000" aria-hidden="true"> <label for="collapse-section0000" aria-hidden="true"><strong>V1.0.0 / 17-December-2014</strong></label>
|
||||
<div>
|
||||
<h1 id="maintenance-release-11">Maintenance release</h1>
|
||||
<h2 id="main-changes-11">Main Changes</h2>
|
||||
<h1 id="maintenance-release-12">Maintenance release</h1>
|
||||
<h2 id="main-changes-12">Main Changes</h2>
|
||||
<ul>
|
||||
<li><strong>First official release of STM32CubeF1 (STM32Cube for STM32F1 Series)</strong></li>
|
||||
</ul>
|
||||
<h2 id="contents-11">Contents</h2>
|
||||
<h2 id="contents-12">Contents</h2>
|
||||
<table>
|
||||
<caption>Drivers</caption>
|
||||
<thead>
|
||||
|
|
@ -3049,18 +3332,18 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h2 id="known-limitations-9">Known Limitations</h2>
|
||||
<h2 id="known-limitations-10">Known Limitations</h2>
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
<h2 id="development-toolchains-and-compilers-9">Development Toolchains and Compilers</h2>
|
||||
<h2 id="development-toolchains-and-compilers-10">Development Toolchains and Compilers</h2>
|
||||
<ul>
|
||||
<li>IAR Embedded Workbench for ARM (EWARM) toolchain V7.20 + ST-LINK</li>
|
||||
<li>RealView Microcontroller Development Kit (MDK-ARM) toolchain V5.10 + ST-LINK</li>
|
||||
<li>Atollic TrueSTUDIO STM32 (TrueSTUDIO) toolchain V5.1.1 + ST-LINK</li>
|
||||
<li>System Workbench for STM32 (SW4STM32) toolchain V1.2.0 + ST-LINK</li>
|
||||
</ul>
|
||||
<h2 id="supported-devices-and-eval-boards-9">Supported Devices and EVAL boards</h2>
|
||||
<h2 id="supported-devices-and-eval-boards-10">Supported Devices and EVAL boards</h2>
|
||||
<ul>
|
||||
<li>STM32F1xx Value, Access, USB, Performance, OTG & Ethernet Lines</li>
|
||||
<li>STM3210E-Eval board RevD</li>
|
||||
|
|
@ -3068,11 +3351,11 @@
|
|||
<li>STM32VL-Discovery board RevC</li>
|
||||
<li>STM32F1xx-Nucleo board RevC</li>
|
||||
</ul>
|
||||
<h2 id="backward-compatibility-9">Backward Compatibility</h2>
|
||||
<h2 id="backward-compatibility-10">Backward Compatibility</h2>
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
<h2 id="dependencies-9">Dependencies</h2>
|
||||
<h2 id="dependencies-10">Dependencies</h2>
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,3 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html><head></head>
|
||||
<body><font color="blue"><b><u>STM32CubeF1 Firmware Package V1.8.1 / 30-July-2020</u></b></font><br>
|
||||
<font color="blue"><b><u>STM32CubeF1 Firmware Package V1.8.2 / 07-September-2020</u></b></font><br>
|
||||
<br>
|
||||
<b><u>Main Changes</u></b><br><ul><li><span style="color: rgb(0, 0, 0); font-family: Verdana,sans-serif; font-size: 13.3333px; font-style: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; display: inline ! important; float: none;">Patch release to fix known defects and enhancements implementation.</span></li><ul><li><span style="color: rgb(0, 0, 0); font-style: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; font-family: Verdana,sans-serif; font-size: 10pt;">Update HAL_I2C_ER_IRQHandler() API to fix acknowledge failure issue with I2C memory IT processes.</span></li><li><span style="color: rgb(0, 0, 0); font-style: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; font-family: Verdana,sans-serif; font-size: 10pt;">Update
|
||||
I2C_DMAXferCplt(), I2C_DMAError() and I2C_DMAAbort() APIs to fix
|
||||
hardfault issue when hdmatx and hdmarx parameters in i2c handle aren't
|
||||
initialized (NULL pointer).</span></li><li><span style="color: rgb(0, 0, 0); font-style: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; font-family: Verdana,sans-serif; font-size: 10pt;">Update HAL_I2C_ER_IRQHandler() API to fix acknowledge failure issue with I2C memory IT processes.</span></li><li><span style="color: rgb(0, 0, 0); font-style: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; font-family: Verdana,sans-serif; font-size: 10pt;">Update HAL_I2C_Init() API to force software reset before setting new I2C configuration.</span></li><li><span style="color: rgb(0, 0, 0); font-style: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; font-family: Verdana,sans-serif; font-size: 10pt;">Update HAL I2C processes to report ErrorCode when wrong I2C start condition occurs.</span></li><li><span style="color: rgb(0, 0, 0); font-family: Verdana,sans-serif; font-size: 13.3333px; font-style: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; display: inline ! important; float: none;">Minor rework on USBD_Start() and USBD_Stop() APIs: stopping device will be handled by HAL_PCD_DeInit() API.</span></li></ul></ul><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 67.65pt; text-indent: -18pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif"; color: black;"><o:p></o:p></span></p>
|
||||
</body></html>
|
||||
<b><u>Main Changes</u></b><br><ul><li class="MsoNormal" style="color: black; margin-top: 4.5pt; margin-bottom: 4.5pt;"><span style="color: black; font-family: Verdana,sans-serif; font-size: 10pt;">Patch release to fix known defects and enhancements implementation.</span></li></ul><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 67.65pt; text-indent: -18pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif"; color: black;"><o:p></o:p></span></p>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
|
||||
<Package DBVersion="2.0">
|
||||
<PackDescription Release="FW.F1.1.8.0" Patch="FW.F1.1.8.1">
|
||||
<PackDescription Release="FW.F1.1.8.0" Patch="FW.F1.1.8.2">
|
||||
<Note Release="ReleaseNotes.html" Patch="ReleaseNotes_Patch.html"/>
|
||||
</PackDescription>
|
||||
</Package>
|
||||
|
|
|
|||
Loading…
Reference in New Issue