mirror of https://github.com/ARMmbed/mbed-os.git
F7 ST CUBE V1.7.0
parent
75935b466d
commit
8058e04238
|
@ -664,7 +664,7 @@ ul
|
|||
<h1 style="margin-bottom: 0.25in; text-align: center;" align="center"><span style="font-size: 20pt; font-family: "Verdana","sans-serif"; color: rgb(51, 102, 255);">Release
|
||||
Notes for STM32F7xx HAL Drivers</span><span style="font-size: 20pt; font-family: "Verdana","sans-serif";"><o:p></o:p></span></h1>
|
||||
<p class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: "Arial","sans-serif"; color: black;">Copyright
|
||||
2016 STMicroelectronics</span><span style="color: black;"><u1:p></u1:p><o:p></o:p></span></p>
|
||||
2017 STMicroelectronics</span><span style="color: black;"><u1:p></u1:p><o:p></o:p></span></p>
|
||||
<p class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: "Arial","sans-serif"; color: black;"><img style="border: 0px solid ; width: 171px; height: 126px;" alt="" id="_x0000_i1026" src="../../_htmresc/st_logo.png"></span><span style="font-size: 10pt;"><o:p></o:p></span></p>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -675,7 +675,21 @@ Notes for STM32F7xx HAL Drivers</span><span style="font-size: 20pt; font-family:
|
|||
<tbody>
|
||||
<tr style="">
|
||||
<td style="padding: 0in;" valign="top">
|
||||
<h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><a name="History"></a><span style="font-size: 12pt; color: white;">Update History</span></h2><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.2.0 / 30-December-2016</span></h3>
|
||||
<h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><a name="History"></a><span style="font-size: 12pt; color: white;">Update History</span></h2><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.2.2 / 14-April-2017</span></h3>
|
||||
<p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
|
||||
Changes</span></u></b></p><ul style="margin-bottom: 0in; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; margin-top: 0cm;" type="square"><li class="MsoNormal" style="color: black; margin-top: 4.5pt; margin-bottom: 4.5pt;"><span style="font-family: Verdana,sans-serif; font-size: 10pt;">General updates
|
||||
to fix known defects and enhancements implementation</span></li><li class="MsoNormal" style="color: black; margin-top: 4.5pt; margin-bottom: 4.5pt;"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><span style="font-weight: bold;">HAL CAN </span>update</span></li><ul><li class="MsoNormal" style="color: black; margin-top: 4.5pt; margin-bottom: 4.5pt;"><span style="font-size: 10pt; font-family: "Verdana",sans-serif;" lang="EN-US">Add
|
||||
management of overrun error. </span></li><li class="MsoNormal" style="color: black; margin-top: 4.5pt; margin-bottom: 4.5pt;"><span style="font-size: 10pt; font-family: "Verdana",sans-serif;" lang="EN-US">Allow
|
||||
possibility to receive messages from the 2 RX FIFOs in parallel via
|
||||
interrupt.</span></li><li class="MsoNormal" style="color: black; margin-top: 4.5pt; margin-bottom: 4.5pt;"><span style="font-size: 10pt; font-family: "Verdana",sans-serif;" lang="EN-US">Fix message
|
||||
lost issue with specific sequence of transmit requests.</span></li><li class="MsoNormal" style="color: black; margin-top: 4.5pt; margin-bottom: 4.5pt;"><span style="font-size: 10pt; font-family: "Verdana",sans-serif;" lang="EN-US">Handle
|
||||
transmission failure with error callback, when NART is enabled.</span></li><li class="MsoNormal" style="color: black; margin-top: 4.5pt; margin-bottom: 4.5pt;"><span style="font-size: 10pt; font-family: "Verdana",sans-serif; color: black;" lang="EN-US">Add __HAL_CAN_CANCEL_TRANSMIT() call to abort transmission when
|
||||
timeout is reached</span></li></ul></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.2.1 / 24-March-2017</span></h3>
|
||||
<p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
|
||||
Changes</span></u></b></p><ul style="margin-top: 0cm;" type="square"><li class="MsoNormal" style="color: black; margin-top: 4.5pt; margin-bottom: 4.5pt;"><span style="color: rgb(0, 0, 0); font-family: Verdana; font-size: 13.3333px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; display: inline ! important; float: none;">Update CHM UserManuals to support LL drivers</span></li><li class="MsoNormal" style="color: black; margin-top: 4.5pt; margin-bottom: 4.5pt;"><span style="font-family: Verdana,sans-serif; font-size: 10pt;">General updates
|
||||
to fix known defects and enhancements implementation</span></li></ul><ul style="margin-top: 0cm;" type="square"><li style="margin-top: 4.5pt; margin-bottom: 4.5pt; color: black;" class="MsoNormal"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><span style="font-weight: bold;">HAL DMA </span>update</span></li><ul><li style="margin-top: 4.5pt; margin-bottom: 4.5pt; color: black;" class="MsoNormal"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;">Update HAL_DMA_Init() function to adjust the compatibility check between FIFO threshold and burst configuration</span></li></ul><li style="margin-top: 4.5pt; margin-bottom: 4.5pt; color: black;" class="MsoNormal"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><span style="font-weight: bold;">HAL MMC </span>update</span></li><ul><li style="margin-top: 4.5pt; margin-bottom: 4.5pt; color: black;" class="MsoNormal"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;">Update HAL_MMC_InitCard() function with proper initialization sequence adding a delay after MMC clock enable</span></li><li style="margin-top: 4.5pt; margin-bottom: 4.5pt; color: black;" class="MsoNormal"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;">Update MMC_DMAError() function ignore DMA FIFO error as not impacting the data transfer</span></li></ul><li style="margin-top: 4.5pt; margin-bottom: 4.5pt; color: black;" class="MsoNormal"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><span style="font-weight: bold;">HAL SD </span>update</span></li><ul><li style="margin-top: 4.5pt; margin-bottom: 4.5pt; color: black;" class="MsoNormal"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;">Update HAL_SD_InitCard() function with proper initialization sequence adding a delay after SD clock enable</span></li><li style="margin-top: 4.5pt; margin-bottom: 4.5pt; color: black;" class="MsoNormal"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;">Update SD_DMAError() function ignore DMA FIFO error as not impacting the data transfer<br></span></li></ul><li style="margin-top: 4.5pt; margin-bottom: 4.5pt; color: black;" class="MsoNormal"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><span style="font-weight: bold;">HAL NAND </span>update</span></li><ul><li style="margin-top: 4.5pt; margin-bottom: 4.5pt; color: black;" class="MsoNormal"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;">Update HAL_NAND_Address_Inc() function implementation for proper plane number check</span></li></ul><li style="margin-top: 4.5pt; margin-bottom: 4.5pt; color: black;" class="MsoNormal"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><span style="font-weight: bold;"></span></span><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><span style="font-weight: bold;">LL SDMMC </span>update</span></li><ul><li style="margin-top: 4.5pt; margin-bottom: 4.5pt; color: black;" class="MsoNormal"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;">Update SDMMC_DATATIMEOUT value with appropriate value needed by reading and writing operations of SD and MMC cards</span><span style="font-size: 10pt; font-family: 'Segoe UI'; color: rgb(0, 0, 0); direction: ltr;" dir="ltr"></span></li></ul><li style="margin-top: 4.5pt; margin-bottom: 4.5pt; color: black;" class="MsoNormal"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><span style="font-weight: bold;">LL RTC </span>update</span></li><ul><li style="margin-top: 4.5pt; margin-bottom: 4.5pt; color: black;" class="MsoNormal"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;">LL_RTC_TIME_Get() and LL_RTC_DATE_Get() inline macros optimization</span></li></ul><li style="margin-top: 4.5pt; margin-bottom: 4.5pt; color: black;" class="MsoNormal"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><span style="font-weight: bold;">LL ADC </span>update</span></li><ul><li style="margin-top: 4.5pt; margin-bottom: 4.5pt; color: black;" class="MsoNormal"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;">Fix wrong ADC group injected sequence configuration</span><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"></span></li><ul><li style="margin-top: 4.5pt; margin-bottom: 4.5pt; color: black;" class="MsoNormal"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;">LL_ADC_INJ_SetSequencerRanks()
|
||||
and LL_ADC_INJ_GetSequencerRanks() API's update to take in
|
||||
consideration the ADC number of conversions</span></li><li style="margin-top: 4.5pt; margin-bottom: 4.5pt; color: black;" class="MsoNormal"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;">Update the </span><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;">defined values for</span><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"> ADC group injected seqencer ranks <br></span></li></ul></ul></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.2.0 / 30-December-2016</span></h3>
|
||||
<p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
|
||||
Changes</span></u></b></p><ul style="margin-top: 0cm;" type="square"><li class="MsoNormal" style="color: black; margin-top: 4.5pt; margin-bottom: 4.5pt;"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;">Official release to add the support of <span style="font-weight: bold;">STM32F722xx, STM32F723xx, STM32F732xx</span> <span style="font-weight: bold;">and STM32F733xx</span> devices</span></li><li class="MsoNormal" style="color: black; margin-top: 4.5pt; margin-bottom: 4.5pt;"><span style="color: rgb(0, 0, 0); font-family: Verdana; font-size: 13.3333px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; line-height: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; display: inline ! important; float: none;">Add Low Layer drivers allowing performance and footprint optimization</span></li><ul><li class="MsoNormal" style="margin: 4.5pt 0in; font-size: 12pt; font-family: 'Times New Roman',serif; color: black;"><span style="font-size: 10pt; font-family: Verdana;">Low
|
||||
Layer drivers APIs provide register level programming: require deep
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
******************************************************************************
|
||||
* @file stm32_hal_legacy.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief This file contains aliases definition for the STM32Cube HAL constants
|
||||
* macros and functions maintained for legacy purpose.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief HAL module driver.
|
||||
* This is the common part of the HAL initialization
|
||||
*
|
||||
|
@ -23,7 +23,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
@ -68,11 +68,11 @@
|
|||
* @{
|
||||
*/
|
||||
/**
|
||||
* @brief STM32F7xx HAL Driver version number V1.2.0
|
||||
* @brief STM32F7xx HAL Driver version number V1.2.2
|
||||
*/
|
||||
#define __STM32F7xx_HAL_VERSION_MAIN (0x01) /*!< [31:24] main version */
|
||||
#define __STM32F7xx_HAL_VERSION_SUB1 (0x02) /*!< [23:16] sub1 version */
|
||||
#define __STM32F7xx_HAL_VERSION_SUB2 (0x00) /*!< [15:8] sub2 version */
|
||||
#define __STM32F7xx_HAL_VERSION_SUB2 (0x02) /*!< [15:8] sub2 version */
|
||||
#define __STM32F7xx_HAL_VERSION_RC (0x00) /*!< [7:0] release candidate */
|
||||
#define __STM32F7xx_HAL_VERSION ((__STM32F7xx_HAL_VERSION_MAIN << 24)\
|
||||
|(__STM32F7xx_HAL_VERSION_SUB1 << 16)\
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief This file contains all the functions prototypes for the HAL
|
||||
* module driver.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
@ -57,7 +57,7 @@
|
|||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
/** @defgroup SYSCFG_Exported_Constants SYSCFG Exported Constants
|
||||
/** @defgroup HAL_Exported_Constants HAL Exported Constants
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_adc.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief This file provides firmware functions to manage the following
|
||||
* functionalities of the Analog to Digital Convertor (ADC) peripheral:
|
||||
* + Initialization and de-initialization functions
|
||||
|
@ -164,7 +164,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_adc.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of ADC HAL extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
@ -490,7 +490,7 @@ typedef struct
|
|||
/** @defgroup ADC_Exported_Macros ADC Exported Macros
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/** @brief Reset ADC handle state
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @retval None
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_adc_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief This file provides firmware functions to manage the following
|
||||
* functionalities of the ADC extension peripheral:
|
||||
* + Extended features functions
|
||||
|
@ -44,7 +44,7 @@
|
|||
=================================
|
||||
[..]
|
||||
(+) Start the ADC peripheral using HAL_ADCEx_InjectedStart()
|
||||
(+) Wait for end of conversion using HAL_ADC_PollForConversion(), at this stage
|
||||
(+) Wait for end of conversion using HAL_ADCEx_InjectedPollForConversion(), at this stage
|
||||
user can specify the value of timeout according to his end application
|
||||
(+) To read the ADC converted values, use the HAL_ADCEx_InjectedGetValue() function.
|
||||
(+) Stop the ADC peripheral using HAL_ADCEx_InjectedStop()
|
||||
|
@ -86,7 +86,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_adc.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of ADC HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
@ -126,9 +126,6 @@ typedef struct
|
|||
Caution: this setting impacts the entire injected group. Therefore, call of HAL_ADCEx_InjectedConfigChannel() to
|
||||
configure a channel on injected group can impact the configuration of other channels previously set. */
|
||||
}ADC_InjectionConfTypeDef;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief ADC Configuration multi-mode structure definition
|
||||
|
@ -252,7 +249,7 @@ typedef struct
|
|||
/** @addtogroup ADCEx_Exported_Functions
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/** @addtogroup ADCEx_Exported_Functions_Group1
|
||||
* @{
|
||||
*/
|
||||
|
@ -290,7 +287,7 @@ HAL_StatusTypeDef HAL_ADCEx_MultiModeConfigChannel(ADC_HandleTypeDef* hadc, ADC_
|
|||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
/* Private macros ------------------------------------------------------------*/
|
||||
/** @defgroup ADCEx_Private_Macros ADC Private Macros
|
||||
* @{
|
||||
|
@ -333,7 +330,7 @@ HAL_StatusTypeDef HAL_ADCEx_MultiModeConfigChannel(ADC_HandleTypeDef* hadc, ADC_
|
|||
((__INJTRIG__) == ADC_EXTERNALTRIGINJECCONV_T5_TRGO) || \
|
||||
((__INJTRIG__) == ADC_EXTERNALTRIGINJECCONV_T3_CC1) || \
|
||||
((__INJTRIG__) == ADC_EXTERNALTRIGINJECCONV_T6_TRGO) || \
|
||||
((__INJTRIG__) == ADC_INJECTED_SOFTWARE_START))
|
||||
((__INJTRIG__) == ADC_INJECTED_SOFTWARE_START))
|
||||
#define IS_ADC_INJECTED_RANK(__RANK__) (((__RANK__) == ADC_INJECTED_RANK_1) || \
|
||||
((__RANK__) == ADC_INJECTED_RANK_2) || \
|
||||
((__RANK__) == ADC_INJECTED_RANK_3) || \
|
||||
|
@ -351,7 +348,7 @@ HAL_StatusTypeDef HAL_ADCEx_MultiModeConfigChannel(ADC_HandleTypeDef* hadc, ADC_
|
|||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
/* Private functions ---------------------------------------------------------*/
|
||||
/** @defgroup ADCEx_Private_Functions ADC Private Functions
|
||||
* @{
|
||||
|
@ -364,7 +361,7 @@ HAL_StatusTypeDef HAL_ADCEx_MultiModeConfigChannel(ADC_HandleTypeDef* hadc, ADC_
|
|||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_can.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief CAN HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the Controller Area Network (CAN) peripheral:
|
||||
|
@ -78,7 +78,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
@ -557,8 +557,8 @@ __weak void HAL_CAN_MspDeInit(CAN_HandleTypeDef* hcan)
|
|||
*/
|
||||
HAL_StatusTypeDef HAL_CAN_Transmit(CAN_HandleTypeDef* hcan, uint32_t Timeout)
|
||||
{
|
||||
uint32_t transmitmailbox = CAN_TXSTATUS_NOMAILBOX;
|
||||
uint32_t tickstart = 0;
|
||||
uint32_t transmitmailbox = CAN_TXSTATUS_NOMAILBOX;
|
||||
uint32_t tickstart = 0U;
|
||||
|
||||
/* Check the parameters */
|
||||
assert_param(IS_CAN_IDTYPE(hcan->pTxMsg->IDE));
|
||||
|
@ -572,15 +572,21 @@ HAL_StatusTypeDef HAL_CAN_Transmit(CAN_HandleTypeDef* hcan, uint32_t Timeout)
|
|||
/* Process locked */
|
||||
__HAL_LOCK(hcan);
|
||||
|
||||
if(hcan->State == HAL_CAN_STATE_BUSY_RX)
|
||||
/* Change CAN state */
|
||||
switch(hcan->State)
|
||||
{
|
||||
/* Change CAN state */
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX_RX;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Change CAN state */
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX;
|
||||
case(HAL_CAN_STATE_BUSY_RX0):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX_RX0;
|
||||
break;
|
||||
case(HAL_CAN_STATE_BUSY_RX1):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX_RX1;
|
||||
break;
|
||||
case(HAL_CAN_STATE_BUSY_RX0_RX1):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX_RX0_RX1;
|
||||
break;
|
||||
default: /* HAL_CAN_STATE_READY */
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Select one empty transmit mailbox */
|
||||
|
@ -596,41 +602,41 @@ HAL_StatusTypeDef HAL_CAN_Transmit(CAN_HandleTypeDef* hcan, uint32_t Timeout)
|
|||
{
|
||||
transmitmailbox = CAN_TXMAILBOX_2;
|
||||
}
|
||||
|
||||
|
||||
/* Set up the Id */
|
||||
hcan->Instance->sTxMailBox[transmitmailbox].TIR &= CAN_TI0R_TXRQ;
|
||||
if (hcan->pTxMsg->IDE == CAN_ID_STD)
|
||||
{
|
||||
assert_param(IS_CAN_STDID(hcan->pTxMsg->StdId));
|
||||
hcan->Instance->sTxMailBox[transmitmailbox].TIR |= ((hcan->pTxMsg->StdId << 21) | \
|
||||
hcan->Instance->sTxMailBox[transmitmailbox].TIR |= ((hcan->pTxMsg->StdId << 21U) | \
|
||||
hcan->pTxMsg->RTR);
|
||||
}
|
||||
else
|
||||
{
|
||||
assert_param(IS_CAN_EXTID(hcan->pTxMsg->ExtId));
|
||||
hcan->Instance->sTxMailBox[transmitmailbox].TIR |= ((hcan->pTxMsg->ExtId << 3) | \
|
||||
hcan->Instance->sTxMailBox[transmitmailbox].TIR |= ((hcan->pTxMsg->ExtId << 3U) | \
|
||||
hcan->pTxMsg->IDE | \
|
||||
hcan->pTxMsg->RTR);
|
||||
}
|
||||
|
||||
/* Set up the DLC */
|
||||
hcan->pTxMsg->DLC &= (uint8_t)0x0000000FU;
|
||||
hcan->pTxMsg->DLC &= (uint8_t)0x0000000F;
|
||||
hcan->Instance->sTxMailBox[transmitmailbox].TDTR &= (uint32_t)0xFFFFFFF0U;
|
||||
hcan->Instance->sTxMailBox[transmitmailbox].TDTR |= hcan->pTxMsg->DLC;
|
||||
|
||||
/* Set up the data field */
|
||||
hcan->Instance->sTxMailBox[transmitmailbox].TDLR = (((uint32_t)hcan->pTxMsg->Data[3] << 24) |
|
||||
((uint32_t)hcan->pTxMsg->Data[2] << 16) |
|
||||
((uint32_t)hcan->pTxMsg->Data[1] << 8) |
|
||||
((uint32_t)hcan->pTxMsg->Data[0]));
|
||||
hcan->Instance->sTxMailBox[transmitmailbox].TDHR = (((uint32_t)hcan->pTxMsg->Data[7] << 24) |
|
||||
((uint32_t)hcan->pTxMsg->Data[6] << 16) |
|
||||
((uint32_t)hcan->pTxMsg->Data[5] << 8) |
|
||||
((uint32_t)hcan->pTxMsg->Data[4]));
|
||||
hcan->Instance->sTxMailBox[transmitmailbox].TDLR = (((uint32_t)hcan->pTxMsg->Data[3U] << 24U) |
|
||||
((uint32_t)hcan->pTxMsg->Data[2U] << 16U) |
|
||||
((uint32_t)hcan->pTxMsg->Data[1U] << 8U) |
|
||||
((uint32_t)hcan->pTxMsg->Data[0U]));
|
||||
hcan->Instance->sTxMailBox[transmitmailbox].TDHR = (((uint32_t)hcan->pTxMsg->Data[7U] << 24U) |
|
||||
((uint32_t)hcan->pTxMsg->Data[6U] << 16U) |
|
||||
((uint32_t)hcan->pTxMsg->Data[5U] << 8U) |
|
||||
((uint32_t)hcan->pTxMsg->Data[4U]));
|
||||
/* Request transmission */
|
||||
hcan->Instance->sTxMailBox[transmitmailbox].TIR |= CAN_TI0R_TXRQ;
|
||||
|
||||
/* Get tick */
|
||||
/* Get tick */
|
||||
tickstart = HAL_GetTick();
|
||||
|
||||
/* Check End of transmission flag */
|
||||
|
@ -639,26 +645,36 @@ HAL_StatusTypeDef HAL_CAN_Transmit(CAN_HandleTypeDef* hcan, uint32_t Timeout)
|
|||
/* Check for the Timeout */
|
||||
if(Timeout != HAL_MAX_DELAY)
|
||||
{
|
||||
if((Timeout == 0)||((HAL_GetTick() - tickstart ) > Timeout))
|
||||
if((Timeout == 0U)||((HAL_GetTick() - tickstart ) > Timeout))
|
||||
{
|
||||
hcan->State = HAL_CAN_STATE_TIMEOUT;
|
||||
|
||||
__HAL_CAN_CANCEL_TRANSMIT(hcan, transmitmailbox);
|
||||
|
||||
/* Process unlocked */
|
||||
__HAL_UNLOCK(hcan);
|
||||
return HAL_TIMEOUT;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(hcan->State == HAL_CAN_STATE_BUSY_TX_RX)
|
||||
|
||||
/* Change CAN state */
|
||||
switch(hcan->State)
|
||||
{
|
||||
/* Change CAN state */
|
||||
hcan->State = HAL_CAN_STATE_BUSY_RX;
|
||||
case(HAL_CAN_STATE_BUSY_TX_RX0):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_RX0;
|
||||
break;
|
||||
case(HAL_CAN_STATE_BUSY_TX_RX1):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_RX1;
|
||||
break;
|
||||
case(HAL_CAN_STATE_BUSY_TX_RX0_RX1):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_RX0_RX1;
|
||||
break;
|
||||
default: /* HAL_CAN_STATE_BUSY_TX */
|
||||
hcan->State = HAL_CAN_STATE_READY;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Change CAN state */
|
||||
hcan->State = HAL_CAN_STATE_READY;
|
||||
}
|
||||
|
||||
|
||||
/* Process unlocked */
|
||||
__HAL_UNLOCK(hcan);
|
||||
|
||||
|
@ -683,7 +699,7 @@ HAL_StatusTypeDef HAL_CAN_Transmit(CAN_HandleTypeDef* hcan, uint32_t Timeout)
|
|||
*/
|
||||
HAL_StatusTypeDef HAL_CAN_Transmit_IT(CAN_HandleTypeDef* hcan)
|
||||
{
|
||||
uint32_t transmitmailbox = CAN_TXSTATUS_NOMAILBOX;
|
||||
uint32_t transmitmailbox = CAN_TXSTATUS_NOMAILBOX;
|
||||
|
||||
/* Check the parameters */
|
||||
assert_param(IS_CAN_IDTYPE(hcan->pTxMsg->IDE));
|
||||
|
@ -696,7 +712,7 @@ HAL_StatusTypeDef HAL_CAN_Transmit_IT(CAN_HandleTypeDef* hcan)
|
|||
{
|
||||
/* Process Locked */
|
||||
__HAL_LOCK(hcan);
|
||||
|
||||
|
||||
/* Select one empty transmit mailbox */
|
||||
if((hcan->Instance->TSR&CAN_TSR_TME0) == CAN_TSR_TME0)
|
||||
{
|
||||
|
@ -710,66 +726,72 @@ HAL_StatusTypeDef HAL_CAN_Transmit_IT(CAN_HandleTypeDef* hcan)
|
|||
{
|
||||
transmitmailbox = CAN_TXMAILBOX_2;
|
||||
}
|
||||
|
||||
|
||||
/* Set up the Id */
|
||||
hcan->Instance->sTxMailBox[transmitmailbox].TIR &= CAN_TI0R_TXRQ;
|
||||
if(hcan->pTxMsg->IDE == CAN_ID_STD)
|
||||
{
|
||||
assert_param(IS_CAN_STDID(hcan->pTxMsg->StdId));
|
||||
hcan->Instance->sTxMailBox[transmitmailbox].TIR |= ((hcan->pTxMsg->StdId << 21) | \
|
||||
hcan->Instance->sTxMailBox[transmitmailbox].TIR |= ((hcan->pTxMsg->StdId << 21U) | \
|
||||
hcan->pTxMsg->RTR);
|
||||
}
|
||||
else
|
||||
{
|
||||
assert_param(IS_CAN_EXTID(hcan->pTxMsg->ExtId));
|
||||
hcan->Instance->sTxMailBox[transmitmailbox].TIR |= ((hcan->pTxMsg->ExtId << 3) | \
|
||||
hcan->Instance->sTxMailBox[transmitmailbox].TIR |= ((hcan->pTxMsg->ExtId << 3U) | \
|
||||
hcan->pTxMsg->IDE | \
|
||||
hcan->pTxMsg->RTR);
|
||||
}
|
||||
|
||||
/* Set up the DLC */
|
||||
hcan->pTxMsg->DLC &= (uint8_t)0x0000000FU;
|
||||
hcan->pTxMsg->DLC &= (uint8_t)0x0000000F;
|
||||
hcan->Instance->sTxMailBox[transmitmailbox].TDTR &= (uint32_t)0xFFFFFFF0U;
|
||||
hcan->Instance->sTxMailBox[transmitmailbox].TDTR |= hcan->pTxMsg->DLC;
|
||||
|
||||
/* Set up the data field */
|
||||
hcan->Instance->sTxMailBox[transmitmailbox].TDLR = (((uint32_t)hcan->pTxMsg->Data[3] << 24) |
|
||||
((uint32_t)hcan->pTxMsg->Data[2] << 16) |
|
||||
((uint32_t)hcan->pTxMsg->Data[1] << 8) |
|
||||
((uint32_t)hcan->pTxMsg->Data[0]));
|
||||
hcan->Instance->sTxMailBox[transmitmailbox].TDHR = (((uint32_t)hcan->pTxMsg->Data[7] << 24) |
|
||||
((uint32_t)hcan->pTxMsg->Data[6] << 16) |
|
||||
((uint32_t)hcan->pTxMsg->Data[5] << 8) |
|
||||
((uint32_t)hcan->pTxMsg->Data[4]));
|
||||
|
||||
if(hcan->State == HAL_CAN_STATE_BUSY_RX)
|
||||
hcan->Instance->sTxMailBox[transmitmailbox].TDLR = (((uint32_t)hcan->pTxMsg->Data[3U] << 24U) |
|
||||
((uint32_t)hcan->pTxMsg->Data[2U] << 16U) |
|
||||
((uint32_t)hcan->pTxMsg->Data[1U] << 8U) |
|
||||
((uint32_t)hcan->pTxMsg->Data[0U]));
|
||||
hcan->Instance->sTxMailBox[transmitmailbox].TDHR = (((uint32_t)hcan->pTxMsg->Data[7U] << 24U) |
|
||||
((uint32_t)hcan->pTxMsg->Data[6U] << 16U) |
|
||||
((uint32_t)hcan->pTxMsg->Data[5U] << 8U) |
|
||||
((uint32_t)hcan->pTxMsg->Data[4U]));
|
||||
|
||||
/* Change CAN state */
|
||||
switch(hcan->State)
|
||||
{
|
||||
/* Change CAN state */
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX_RX;
|
||||
case(HAL_CAN_STATE_BUSY_RX0):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX_RX0;
|
||||
break;
|
||||
case(HAL_CAN_STATE_BUSY_RX1):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX_RX1;
|
||||
break;
|
||||
case(HAL_CAN_STATE_BUSY_RX0_RX1):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX_RX0_RX1;
|
||||
break;
|
||||
default: /* HAL_CAN_STATE_READY */
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Change CAN state */
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX;
|
||||
}
|
||||
|
||||
|
||||
/* Set CAN error code to none */
|
||||
hcan->ErrorCode = HAL_CAN_ERROR_NONE;
|
||||
|
||||
|
||||
/* Process Unlocked */
|
||||
__HAL_UNLOCK(hcan);
|
||||
|
||||
|
||||
/* Request transmission */
|
||||
hcan->Instance->sTxMailBox[transmitmailbox].TIR |= CAN_TI0R_TXRQ;
|
||||
|
||||
/* Enable Error warning, Error passive, Bus-off,
|
||||
Last error and Error Interrupts */
|
||||
Last error and Error Interrupts */
|
||||
__HAL_CAN_ENABLE_IT(hcan, CAN_IT_EWG |
|
||||
CAN_IT_EPV |
|
||||
CAN_IT_BOF |
|
||||
CAN_IT_LEC |
|
||||
CAN_IT_ERR |
|
||||
CAN_IT_TME);
|
||||
|
||||
/* Request transmission */
|
||||
hcan->Instance->sTxMailBox[transmitmailbox].TIR |= CAN_TI0R_TXRQ;
|
||||
CAN_IT_TME);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -793,35 +815,81 @@ HAL_StatusTypeDef HAL_CAN_Transmit_IT(CAN_HandleTypeDef* hcan)
|
|||
*/
|
||||
HAL_StatusTypeDef HAL_CAN_Receive(CAN_HandleTypeDef* hcan, uint8_t FIFONumber, uint32_t Timeout)
|
||||
{
|
||||
uint32_t tickstart = 0;
|
||||
|
||||
uint32_t tickstart = 0U;
|
||||
CanRxMsgTypeDef* pRxMsg = NULL;
|
||||
|
||||
/* Check the parameters */
|
||||
assert_param(IS_CAN_FIFO(FIFONumber));
|
||||
|
||||
|
||||
/* Check if CAN state is not busy for RX FIFO0 */
|
||||
if ((FIFONumber == CAN_FIFO0) && ((hcan->State == HAL_CAN_STATE_BUSY_RX0) || \
|
||||
(hcan->State == HAL_CAN_STATE_BUSY_TX_RX0) || \
|
||||
(hcan->State == HAL_CAN_STATE_BUSY_RX0_RX1) || \
|
||||
(hcan->State == HAL_CAN_STATE_BUSY_TX_RX0_RX1)))
|
||||
{
|
||||
return HAL_BUSY;
|
||||
}
|
||||
|
||||
/* Check if CAN state is not busy for RX FIFO1 */
|
||||
if ((FIFONumber == CAN_FIFO1) && ((hcan->State == HAL_CAN_STATE_BUSY_RX1) || \
|
||||
(hcan->State == HAL_CAN_STATE_BUSY_TX_RX1) || \
|
||||
(hcan->State == HAL_CAN_STATE_BUSY_RX0_RX1) || \
|
||||
(hcan->State == HAL_CAN_STATE_BUSY_TX_RX0_RX1)))
|
||||
{
|
||||
return HAL_BUSY;
|
||||
}
|
||||
|
||||
/* Process locked */
|
||||
__HAL_LOCK(hcan);
|
||||
|
||||
if(hcan->State == HAL_CAN_STATE_BUSY_TX)
|
||||
|
||||
/* Change CAN state */
|
||||
if (FIFONumber == CAN_FIFO0)
|
||||
{
|
||||
/* Change CAN state */
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX_RX;
|
||||
switch(hcan->State)
|
||||
{
|
||||
case(HAL_CAN_STATE_BUSY_TX):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX_RX0;
|
||||
break;
|
||||
case(HAL_CAN_STATE_BUSY_RX1):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_RX0_RX1;
|
||||
break;
|
||||
case(HAL_CAN_STATE_BUSY_TX_RX1):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX_RX0_RX1;
|
||||
break;
|
||||
default: /* HAL_CAN_STATE_READY */
|
||||
hcan->State = HAL_CAN_STATE_BUSY_RX0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
else /* FIFONumber == CAN_FIFO1 */
|
||||
{
|
||||
/* Change CAN state */
|
||||
hcan->State = HAL_CAN_STATE_BUSY_RX;
|
||||
switch(hcan->State)
|
||||
{
|
||||
case(HAL_CAN_STATE_BUSY_TX):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX_RX1;
|
||||
break;
|
||||
case(HAL_CAN_STATE_BUSY_RX0):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_RX0_RX1;
|
||||
break;
|
||||
case(HAL_CAN_STATE_BUSY_TX_RX0):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX_RX0_RX1;
|
||||
break;
|
||||
default: /* HAL_CAN_STATE_READY */
|
||||
hcan->State = HAL_CAN_STATE_BUSY_RX1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Get tick */
|
||||
tickstart = HAL_GetTick();
|
||||
|
||||
/* Check pending message */
|
||||
while(__HAL_CAN_MSG_PENDING(hcan, FIFONumber) == 0)
|
||||
while(__HAL_CAN_MSG_PENDING(hcan, FIFONumber) == 0U)
|
||||
{
|
||||
/* Check for the Timeout */
|
||||
if(Timeout != HAL_MAX_DELAY)
|
||||
{
|
||||
if((Timeout == 0)||((HAL_GetTick() - tickstart ) > Timeout))
|
||||
if((Timeout == 0U)||((HAL_GetTick() - tickstart ) > Timeout))
|
||||
{
|
||||
hcan->State = HAL_CAN_STATE_TIMEOUT;
|
||||
/* Process unlocked */
|
||||
|
@ -830,33 +898,45 @@ HAL_StatusTypeDef HAL_CAN_Receive(CAN_HandleTypeDef* hcan, uint8_t FIFONumber, u
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Get the Id */
|
||||
hcan->pRxMsg->IDE = (uint8_t)0x04 & hcan->Instance->sFIFOMailBox[FIFONumber].RIR;
|
||||
if (hcan->pRxMsg->IDE == CAN_ID_STD)
|
||||
|
||||
/* Set RxMsg pointer */
|
||||
if(FIFONumber == CAN_FIFO0)
|
||||
{
|
||||
hcan->pRxMsg->StdId = (uint32_t)0x000007FF & (hcan->Instance->sFIFOMailBox[FIFONumber].RIR >> 21);
|
||||
pRxMsg = hcan->pRxMsg;
|
||||
}
|
||||
else /* FIFONumber == CAN_FIFO1 */
|
||||
{
|
||||
pRxMsg = hcan->pRx1Msg;
|
||||
}
|
||||
|
||||
/* Get the Id */
|
||||
pRxMsg->IDE = (uint8_t)0x04 & hcan->Instance->sFIFOMailBox[FIFONumber].RIR;
|
||||
if (pRxMsg->IDE == CAN_ID_STD)
|
||||
{
|
||||
pRxMsg->StdId = 0x000007FFU & (hcan->Instance->sFIFOMailBox[FIFONumber].RIR >> 21U);
|
||||
}
|
||||
else
|
||||
{
|
||||
hcan->pRxMsg->ExtId = (uint32_t)0x1FFFFFFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RIR >> 3);
|
||||
pRxMsg->ExtId = 0x1FFFFFFFU & (hcan->Instance->sFIFOMailBox[FIFONumber].RIR >> 3U);
|
||||
}
|
||||
|
||||
hcan->pRxMsg->RTR = (uint8_t)0x02 & hcan->Instance->sFIFOMailBox[FIFONumber].RIR;
|
||||
pRxMsg->RTR = (uint8_t)0x02 & hcan->Instance->sFIFOMailBox[FIFONumber].RIR;
|
||||
/* Get the DLC */
|
||||
hcan->pRxMsg->DLC = (uint8_t)0x0F & hcan->Instance->sFIFOMailBox[FIFONumber].RDTR;
|
||||
pRxMsg->DLC = (uint8_t)0x0F & hcan->Instance->sFIFOMailBox[FIFONumber].RDTR;
|
||||
/* Get the FMI */
|
||||
hcan->pRxMsg->FMI = (uint8_t)0xFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RDTR >> 8);
|
||||
pRxMsg->FMI = (uint8_t)0xFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RDTR >> 8U);
|
||||
/* Get the FIFONumber */
|
||||
pRxMsg->FIFONumber = FIFONumber;
|
||||
/* Get the data field */
|
||||
hcan->pRxMsg->Data[0] = (uint8_t)0xFF & hcan->Instance->sFIFOMailBox[FIFONumber].RDLR;
|
||||
hcan->pRxMsg->Data[1] = (uint8_t)0xFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RDLR >> 8);
|
||||
hcan->pRxMsg->Data[2] = (uint8_t)0xFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RDLR >> 16);
|
||||
hcan->pRxMsg->Data[3] = (uint8_t)0xFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RDLR >> 24);
|
||||
hcan->pRxMsg->Data[4] = (uint8_t)0xFF & hcan->Instance->sFIFOMailBox[FIFONumber].RDHR;
|
||||
hcan->pRxMsg->Data[5] = (uint8_t)0xFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RDHR >> 8);
|
||||
hcan->pRxMsg->Data[6] = (uint8_t)0xFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RDHR >> 16);
|
||||
hcan->pRxMsg->Data[7] = (uint8_t)0xFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RDHR >> 24);
|
||||
|
||||
pRxMsg->Data[0] = (uint8_t)0xFF & hcan->Instance->sFIFOMailBox[FIFONumber].RDLR;
|
||||
pRxMsg->Data[1] = (uint8_t)0xFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RDLR >> 8U);
|
||||
pRxMsg->Data[2] = (uint8_t)0xFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RDLR >> 16U);
|
||||
pRxMsg->Data[3] = (uint8_t)0xFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RDLR >> 24U);
|
||||
pRxMsg->Data[4] = (uint8_t)0xFF & hcan->Instance->sFIFOMailBox[FIFONumber].RDHR;
|
||||
pRxMsg->Data[5] = (uint8_t)0xFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RDHR >> 8U);
|
||||
pRxMsg->Data[6] = (uint8_t)0xFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RDHR >> 16U);
|
||||
pRxMsg->Data[7] = (uint8_t)0xFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RDHR >> 24U);
|
||||
|
||||
/* Release the FIFO */
|
||||
if(FIFONumber == CAN_FIFO0)
|
||||
{
|
||||
|
@ -868,18 +948,45 @@ HAL_StatusTypeDef HAL_CAN_Receive(CAN_HandleTypeDef* hcan, uint8_t FIFONumber, u
|
|||
/* Release FIFO1 */
|
||||
__HAL_CAN_FIFO_RELEASE(hcan, CAN_FIFO1);
|
||||
}
|
||||
|
||||
if(hcan->State == HAL_CAN_STATE_BUSY_TX_RX)
|
||||
|
||||
/* Change CAN state */
|
||||
if (FIFONumber == CAN_FIFO0)
|
||||
{
|
||||
/* Change CAN state */
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX;
|
||||
switch(hcan->State)
|
||||
{
|
||||
case(HAL_CAN_STATE_BUSY_TX_RX0):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX;
|
||||
break;
|
||||
case(HAL_CAN_STATE_BUSY_RX0_RX1):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_RX1;
|
||||
break;
|
||||
case(HAL_CAN_STATE_BUSY_TX_RX0_RX1):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX_RX1;
|
||||
break;
|
||||
default: /* HAL_CAN_STATE_BUSY_RX0 */
|
||||
hcan->State = HAL_CAN_STATE_READY;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
else /* FIFONumber == CAN_FIFO1 */
|
||||
{
|
||||
/* Change CAN state */
|
||||
hcan->State = HAL_CAN_STATE_READY;
|
||||
switch(hcan->State)
|
||||
{
|
||||
case(HAL_CAN_STATE_BUSY_TX_RX1):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX;
|
||||
break;
|
||||
case(HAL_CAN_STATE_BUSY_RX0_RX1):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_RX0;
|
||||
break;
|
||||
case(HAL_CAN_STATE_BUSY_TX_RX0_RX1):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX_RX0;
|
||||
break;
|
||||
default: /* HAL_CAN_STATE_BUSY_RX1 */
|
||||
hcan->State = HAL_CAN_STATE_READY;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Process unlocked */
|
||||
__HAL_UNLOCK(hcan);
|
||||
|
||||
|
@ -895,60 +1002,96 @@ HAL_StatusTypeDef HAL_CAN_Receive(CAN_HandleTypeDef* hcan, uint8_t FIFONumber, u
|
|||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_CAN_Receive_IT(CAN_HandleTypeDef* hcan, uint8_t FIFONumber)
|
||||
{
|
||||
uint32_t tmp = 0;
|
||||
|
||||
{
|
||||
/* Check the parameters */
|
||||
assert_param(IS_CAN_FIFO(FIFONumber));
|
||||
|
||||
tmp = hcan->State;
|
||||
if((tmp == HAL_CAN_STATE_READY) || (tmp == HAL_CAN_STATE_BUSY_TX))
|
||||
{
|
||||
/* Process locked */
|
||||
__HAL_LOCK(hcan);
|
||||
|
||||
if(hcan->State == HAL_CAN_STATE_BUSY_TX)
|
||||
{
|
||||
/* Change CAN state */
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX_RX;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Change CAN state */
|
||||
hcan->State = HAL_CAN_STATE_BUSY_RX;
|
||||
}
|
||||
|
||||
/* Set CAN error code to none */
|
||||
hcan->ErrorCode = HAL_CAN_ERROR_NONE;
|
||||
|
||||
/* Enable Error warning, Error passive, Bus-off,
|
||||
Last error and Error Interrupts */
|
||||
__HAL_CAN_ENABLE_IT(hcan, CAN_IT_EWG |
|
||||
CAN_IT_EPV |
|
||||
CAN_IT_BOF |
|
||||
CAN_IT_LEC |
|
||||
CAN_IT_ERR);
|
||||
|
||||
/* Process unlocked */
|
||||
__HAL_UNLOCK(hcan);
|
||||
|
||||
if(FIFONumber == CAN_FIFO0)
|
||||
{
|
||||
/* Enable FIFO 0 message pending Interrupt */
|
||||
__HAL_CAN_ENABLE_IT(hcan, CAN_IT_FMP0);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Enable FIFO 1 message pending Interrupt */
|
||||
__HAL_CAN_ENABLE_IT(hcan, CAN_IT_FMP1);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
/* Check if CAN state is not busy for RX FIFO0 */
|
||||
if((FIFONumber == CAN_FIFO0) && ((hcan->State == HAL_CAN_STATE_BUSY_RX0) || \
|
||||
(hcan->State == HAL_CAN_STATE_BUSY_TX_RX0) || \
|
||||
(hcan->State == HAL_CAN_STATE_BUSY_RX0_RX1) || \
|
||||
(hcan->State == HAL_CAN_STATE_BUSY_TX_RX0_RX1)))
|
||||
{
|
||||
return HAL_BUSY;
|
||||
}
|
||||
|
||||
|
||||
/* Check if CAN state is not busy for RX FIFO1 */
|
||||
if((FIFONumber == CAN_FIFO1) && ((hcan->State == HAL_CAN_STATE_BUSY_RX1) || \
|
||||
(hcan->State == HAL_CAN_STATE_BUSY_TX_RX1) || \
|
||||
(hcan->State == HAL_CAN_STATE_BUSY_RX0_RX1) || \
|
||||
(hcan->State == HAL_CAN_STATE_BUSY_TX_RX0_RX1)))
|
||||
{
|
||||
return HAL_BUSY;
|
||||
}
|
||||
|
||||
/* Process locked */
|
||||
__HAL_LOCK(hcan);
|
||||
|
||||
/* Change CAN state */
|
||||
if(FIFONumber == CAN_FIFO0)
|
||||
{
|
||||
switch(hcan->State)
|
||||
{
|
||||
case(HAL_CAN_STATE_BUSY_TX):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX_RX0;
|
||||
break;
|
||||
case(HAL_CAN_STATE_BUSY_RX1):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_RX0_RX1;
|
||||
break;
|
||||
case(HAL_CAN_STATE_BUSY_TX_RX1):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX_RX0_RX1;
|
||||
break;
|
||||
default: /* HAL_CAN_STATE_READY */
|
||||
hcan->State = HAL_CAN_STATE_BUSY_RX0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else /* FIFONumber == CAN_FIFO1 */
|
||||
{
|
||||
switch(hcan->State)
|
||||
{
|
||||
case(HAL_CAN_STATE_BUSY_TX):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX_RX1;
|
||||
break;
|
||||
case(HAL_CAN_STATE_BUSY_RX0):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_RX0_RX1;
|
||||
break;
|
||||
case(HAL_CAN_STATE_BUSY_TX_RX0):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX_RX0_RX1;
|
||||
break;
|
||||
default: /* HAL_CAN_STATE_READY */
|
||||
hcan->State = HAL_CAN_STATE_BUSY_RX1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* Set CAN error code to none */
|
||||
hcan->ErrorCode = HAL_CAN_ERROR_NONE;
|
||||
|
||||
/* Enable interrupts: */
|
||||
/* - Enable Error warning Interrupt */
|
||||
/* - Enable Error passive Interrupt */
|
||||
/* - Enable Bus-off Interrupt */
|
||||
/* - Enable Last error code Interrupt */
|
||||
/* - Enable Error Interrupt */
|
||||
/* - Enable Transmit mailbox empty Interrupt */
|
||||
__HAL_CAN_ENABLE_IT(hcan, CAN_IT_EWG |
|
||||
CAN_IT_EPV |
|
||||
CAN_IT_BOF |
|
||||
CAN_IT_LEC |
|
||||
CAN_IT_ERR |
|
||||
CAN_IT_TME);
|
||||
|
||||
if(FIFONumber == CAN_FIFO0)
|
||||
{
|
||||
/* Enable FIFO 0 overrun and message pending Interrupt */
|
||||
__HAL_CAN_ENABLE_IT(hcan, CAN_IT_FOV0 | CAN_IT_FMP0);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Enable FIFO 1 overrun and message pending Interrupt */
|
||||
__HAL_CAN_ENABLE_IT(hcan, CAN_IT_FOV1 | CAN_IT_FMP1);
|
||||
}
|
||||
|
||||
/* Return function status */
|
||||
return HAL_OK;
|
||||
}
|
||||
|
@ -1068,8 +1211,33 @@ HAL_StatusTypeDef HAL_CAN_WakeUp(CAN_HandleTypeDef* hcan)
|
|||
*/
|
||||
void HAL_CAN_IRQHandler(CAN_HandleTypeDef* hcan)
|
||||
{
|
||||
uint32_t tmp1 = 0, tmp2 = 0, tmp3 = 0;
|
||||
|
||||
uint32_t tmp1 = 0U, tmp2 = 0U, tmp3 = 0U;
|
||||
uint32_t errorcode = HAL_CAN_ERROR_NONE;
|
||||
|
||||
/* Check Overrun flag for FIFO0 */
|
||||
tmp1 = __HAL_CAN_GET_FLAG(hcan, CAN_FLAG_FOV0);
|
||||
tmp2 = __HAL_CAN_GET_IT_SOURCE(hcan, CAN_IT_FOV0);
|
||||
if(tmp1 && tmp2)
|
||||
{
|
||||
/* Set CAN error code to FOV0 error */
|
||||
errorcode |= HAL_CAN_ERROR_FOV0;
|
||||
|
||||
/* Clear FIFO0 Overrun Flag */
|
||||
__HAL_CAN_CLEAR_FLAG(hcan, CAN_FLAG_FOV0);
|
||||
}
|
||||
/* Check Overrun flag for FIFO1 */
|
||||
tmp1 = __HAL_CAN_GET_FLAG(hcan, CAN_FLAG_FOV1);
|
||||
tmp2 = __HAL_CAN_GET_IT_SOURCE(hcan, CAN_IT_FOV1);
|
||||
|
||||
if(tmp1 && tmp2)
|
||||
{
|
||||
/* Set CAN error code to FOV1 error */
|
||||
errorcode |= HAL_CAN_ERROR_FOV1;
|
||||
|
||||
/* Clear FIFO1 Overrun Flag */
|
||||
__HAL_CAN_CLEAR_FLAG(hcan, CAN_FLAG_FOV1);
|
||||
}
|
||||
|
||||
/* Check End of transmission flag */
|
||||
if(__HAL_CAN_GET_IT_SOURCE(hcan, CAN_IT_TME))
|
||||
{
|
||||
|
@ -1078,29 +1246,48 @@ void HAL_CAN_IRQHandler(CAN_HandleTypeDef* hcan)
|
|||
tmp3 = __HAL_CAN_TRANSMIT_STATUS(hcan, CAN_TXMAILBOX_2);
|
||||
if(tmp1 || tmp2 || tmp3)
|
||||
{
|
||||
/* Call transmit function */
|
||||
CAN_Transmit_IT(hcan);
|
||||
tmp1 = __HAL_CAN_GET_FLAG(hcan, CAN_FLAG_TXOK0);
|
||||
tmp2 = __HAL_CAN_GET_FLAG(hcan, CAN_FLAG_TXOK1);
|
||||
tmp3 = __HAL_CAN_GET_FLAG(hcan, CAN_FLAG_TXOK2);
|
||||
/* Check Transmit success */
|
||||
if(tmp1 || tmp2 || tmp3)
|
||||
{
|
||||
/* Call transmit function */
|
||||
CAN_Transmit_IT(hcan);
|
||||
}
|
||||
else /* Transmit failure */
|
||||
{
|
||||
/* Set CAN error code to TXFAIL error */
|
||||
errorcode |= HAL_CAN_ERROR_TXFAIL;
|
||||
}
|
||||
|
||||
/* Clear transmission status flags (RQCPx and TXOKx) */
|
||||
SET_BIT(hcan->Instance->TSR, CAN_TSR_RQCP0 | CAN_TSR_RQCP1 | CAN_TSR_RQCP2 | \
|
||||
CAN_FLAG_TXOK0 | CAN_FLAG_TXOK1 | CAN_FLAG_TXOK2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
tmp1 = __HAL_CAN_MSG_PENDING(hcan, CAN_FIFO0);
|
||||
tmp2 = __HAL_CAN_GET_IT_SOURCE(hcan, CAN_IT_FMP0);
|
||||
/* Check End of reception flag for FIFO0 */
|
||||
if((tmp1 != 0) && tmp2)
|
||||
if((tmp1 != 0U) && tmp2)
|
||||
{
|
||||
/* Call receive function */
|
||||
CAN_Receive_IT(hcan, CAN_FIFO0);
|
||||
}
|
||||
|
||||
|
||||
tmp1 = __HAL_CAN_MSG_PENDING(hcan, CAN_FIFO1);
|
||||
tmp2 = __HAL_CAN_GET_IT_SOURCE(hcan, CAN_IT_FMP1);
|
||||
/* Check End of reception flag for FIFO1 */
|
||||
if((tmp1 != 0) && tmp2)
|
||||
if((tmp1 != 0U) && tmp2)
|
||||
{
|
||||
/* Call receive function */
|
||||
CAN_Receive_IT(hcan, CAN_FIFO1);
|
||||
}
|
||||
|
||||
|
||||
/* Set error code in handle */
|
||||
hcan->ErrorCode |= errorcode;
|
||||
|
||||
tmp1 = __HAL_CAN_GET_FLAG(hcan, CAN_FLAG_EWG);
|
||||
tmp2 = __HAL_CAN_GET_IT_SOURCE(hcan, CAN_IT_EWG);
|
||||
tmp3 = __HAL_CAN_GET_IT_SOURCE(hcan, CAN_IT_ERR);
|
||||
|
@ -1171,7 +1358,7 @@ void HAL_CAN_IRQHandler(CAN_HandleTypeDef* hcan)
|
|||
/* Clear Last error code Flag */
|
||||
hcan->Instance->ESR &= ~(CAN_ESR_LEC);
|
||||
}
|
||||
|
||||
|
||||
/* Call the Error call Back in case of Errors */
|
||||
if(hcan->ErrorCode != HAL_CAN_ERROR_NONE)
|
||||
{
|
||||
|
@ -1179,6 +1366,29 @@ void HAL_CAN_IRQHandler(CAN_HandleTypeDef* hcan)
|
|||
hcan->Instance->MSR = CAN_MSR_ERRI;
|
||||
/* Set the CAN state ready to be able to start again the process */
|
||||
hcan->State = HAL_CAN_STATE_READY;
|
||||
|
||||
/* Disable interrupts: */
|
||||
/* - Disable Error warning Interrupt */
|
||||
/* - Disable Error passive Interrupt */
|
||||
/* - Disable Bus-off Interrupt */
|
||||
/* - Disable Last error code Interrupt */
|
||||
/* - Disable Error Interrupt */
|
||||
/* - Disable FIFO 0 message pending Interrupt */
|
||||
/* - Disable FIFO 0 Overrun Interrupt */
|
||||
/* - Disable FIFO 1 message pending Interrupt */
|
||||
/* - Disable FIFO 1 Overrun Interrupt */
|
||||
/* - Disable Transmit mailbox empty Interrupt */
|
||||
__HAL_CAN_DISABLE_IT(hcan, CAN_IT_EWG |
|
||||
CAN_IT_EPV |
|
||||
CAN_IT_BOF |
|
||||
CAN_IT_LEC |
|
||||
CAN_IT_ERR |
|
||||
CAN_IT_FMP0|
|
||||
CAN_IT_FOV0|
|
||||
CAN_IT_FMP1|
|
||||
CAN_IT_FOV1|
|
||||
CAN_IT_TME);
|
||||
|
||||
/* Call Error callback function */
|
||||
HAL_CAN_ErrorCallback(hcan);
|
||||
}
|
||||
|
@ -1275,6 +1485,7 @@ uint32_t HAL_CAN_GetError(CAN_HandleTypeDef *hcan)
|
|||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Initiates and transmits a CAN frame message.
|
||||
* @param hcan: pointer to a CAN_HandleTypeDef structure that contains
|
||||
|
@ -1283,31 +1494,37 @@ uint32_t HAL_CAN_GetError(CAN_HandleTypeDef *hcan)
|
|||
*/
|
||||
static HAL_StatusTypeDef CAN_Transmit_IT(CAN_HandleTypeDef* hcan)
|
||||
{
|
||||
/* Disable Transmit mailbox empty Interrupt */
|
||||
/* Disable Transmit mailbox empty Interrupt */
|
||||
__HAL_CAN_DISABLE_IT(hcan, CAN_IT_TME);
|
||||
|
||||
if(hcan->State == HAL_CAN_STATE_BUSY_TX)
|
||||
{
|
||||
/* Disable Error warning, Error passive, Bus-off, Last error code
|
||||
and Error Interrupts */
|
||||
__HAL_CAN_DISABLE_IT(hcan, CAN_IT_EWG |
|
||||
and Error Interrupts */
|
||||
__HAL_CAN_DISABLE_IT(hcan, CAN_IT_EWG |
|
||||
CAN_IT_EPV |
|
||||
CAN_IT_BOF |
|
||||
CAN_IT_LEC |
|
||||
CAN_IT_ERR );
|
||||
}
|
||||
|
||||
if(hcan->State == HAL_CAN_STATE_BUSY_TX_RX)
|
||||
|
||||
/* Change CAN state */
|
||||
switch(hcan->State)
|
||||
{
|
||||
/* Change CAN state */
|
||||
hcan->State = HAL_CAN_STATE_BUSY_RX;
|
||||
case(HAL_CAN_STATE_BUSY_TX_RX0):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_RX0;
|
||||
break;
|
||||
case(HAL_CAN_STATE_BUSY_TX_RX1):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_RX1;
|
||||
break;
|
||||
case(HAL_CAN_STATE_BUSY_TX_RX0_RX1):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_RX0_RX1;
|
||||
break;
|
||||
default: /* HAL_CAN_STATE_BUSY_TX */
|
||||
hcan->State = HAL_CAN_STATE_READY;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Change CAN state */
|
||||
hcan->State = HAL_CAN_STATE_READY;
|
||||
}
|
||||
|
||||
|
||||
/* Transmission complete callback */
|
||||
HAL_CAN_TxCpltCallback(hcan);
|
||||
|
||||
|
@ -1324,69 +1541,112 @@ static HAL_StatusTypeDef CAN_Transmit_IT(CAN_HandleTypeDef* hcan)
|
|||
*/
|
||||
static HAL_StatusTypeDef CAN_Receive_IT(CAN_HandleTypeDef* hcan, uint8_t FIFONumber)
|
||||
{
|
||||
/* Get the Id */
|
||||
hcan->pRxMsg->IDE = (uint8_t)0x04 & hcan->Instance->sFIFOMailBox[FIFONumber].RIR;
|
||||
if (hcan->pRxMsg->IDE == CAN_ID_STD)
|
||||
uint32_t tmp1 = 0U;
|
||||
CanRxMsgTypeDef* pRxMsg = NULL;
|
||||
|
||||
/* Set RxMsg pointer */
|
||||
if(FIFONumber == CAN_FIFO0)
|
||||
{
|
||||
hcan->pRxMsg->StdId = (uint32_t)0x000007FF & (hcan->Instance->sFIFOMailBox[FIFONumber].RIR >> 21);
|
||||
pRxMsg = hcan->pRxMsg;
|
||||
}
|
||||
else /* FIFONumber == CAN_FIFO1 */
|
||||
{
|
||||
pRxMsg = hcan->pRx1Msg;
|
||||
}
|
||||
|
||||
/* Get the Id */
|
||||
pRxMsg->IDE = (uint8_t)0x04 & hcan->Instance->sFIFOMailBox[FIFONumber].RIR;
|
||||
if (pRxMsg->IDE == CAN_ID_STD)
|
||||
{
|
||||
pRxMsg->StdId = 0x000007FFU & (hcan->Instance->sFIFOMailBox[FIFONumber].RIR >> 21U);
|
||||
}
|
||||
else
|
||||
{
|
||||
hcan->pRxMsg->ExtId = (uint32_t)0x1FFFFFFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RIR >> 3);
|
||||
pRxMsg->ExtId = 0x1FFFFFFFU & (hcan->Instance->sFIFOMailBox[FIFONumber].RIR >> 3U);
|
||||
}
|
||||
|
||||
hcan->pRxMsg->RTR = (uint8_t)0x02 & hcan->Instance->sFIFOMailBox[FIFONumber].RIR;
|
||||
pRxMsg->RTR = (uint8_t)0x02 & hcan->Instance->sFIFOMailBox[FIFONumber].RIR;
|
||||
/* Get the DLC */
|
||||
hcan->pRxMsg->DLC = (uint8_t)0x0F & hcan->Instance->sFIFOMailBox[FIFONumber].RDTR;
|
||||
pRxMsg->DLC = (uint8_t)0x0F & hcan->Instance->sFIFOMailBox[FIFONumber].RDTR;
|
||||
/* Get the FIFONumber */
|
||||
pRxMsg->FIFONumber = FIFONumber;
|
||||
/* Get the FMI */
|
||||
hcan->pRxMsg->FMI = (uint8_t)0xFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RDTR >> 8);
|
||||
pRxMsg->FMI = (uint8_t)0xFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RDTR >> 8U);
|
||||
/* Get the data field */
|
||||
hcan->pRxMsg->Data[0] = (uint8_t)0xFF & hcan->Instance->sFIFOMailBox[FIFONumber].RDLR;
|
||||
hcan->pRxMsg->Data[1] = (uint8_t)0xFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RDLR >> 8);
|
||||
hcan->pRxMsg->Data[2] = (uint8_t)0xFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RDLR >> 16);
|
||||
hcan->pRxMsg->Data[3] = (uint8_t)0xFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RDLR >> 24);
|
||||
hcan->pRxMsg->Data[4] = (uint8_t)0xFF & hcan->Instance->sFIFOMailBox[FIFONumber].RDHR;
|
||||
hcan->pRxMsg->Data[5] = (uint8_t)0xFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RDHR >> 8);
|
||||
hcan->pRxMsg->Data[6] = (uint8_t)0xFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RDHR >> 16);
|
||||
hcan->pRxMsg->Data[7] = (uint8_t)0xFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RDHR >> 24);
|
||||
pRxMsg->Data[0] = (uint8_t)0xFF & hcan->Instance->sFIFOMailBox[FIFONumber].RDLR;
|
||||
pRxMsg->Data[1] = (uint8_t)0xFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RDLR >> 8U);
|
||||
pRxMsg->Data[2] = (uint8_t)0xFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RDLR >> 16U);
|
||||
pRxMsg->Data[3] = (uint8_t)0xFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RDLR >> 24U);
|
||||
pRxMsg->Data[4] = (uint8_t)0xFF & hcan->Instance->sFIFOMailBox[FIFONumber].RDHR;
|
||||
pRxMsg->Data[5] = (uint8_t)0xFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RDHR >> 8U);
|
||||
pRxMsg->Data[6] = (uint8_t)0xFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RDHR >> 16U);
|
||||
pRxMsg->Data[7] = (uint8_t)0xFF & (hcan->Instance->sFIFOMailBox[FIFONumber].RDHR >> 24U);
|
||||
/* Release the FIFO */
|
||||
/* Release FIFO0 */
|
||||
if (FIFONumber == CAN_FIFO0)
|
||||
{
|
||||
__HAL_CAN_FIFO_RELEASE(hcan, CAN_FIFO0);
|
||||
|
||||
/* Disable FIFO 0 message pending Interrupt */
|
||||
__HAL_CAN_DISABLE_IT(hcan, CAN_IT_FMP0);
|
||||
|
||||
/* Disable FIFO 0 overrun and message pending Interrupt */
|
||||
__HAL_CAN_DISABLE_IT(hcan, CAN_IT_FOV0 | CAN_IT_FMP0);
|
||||
}
|
||||
/* Release FIFO1 */
|
||||
else /* FIFONumber == CAN_FIFO1 */
|
||||
{
|
||||
__HAL_CAN_FIFO_RELEASE(hcan, CAN_FIFO1);
|
||||
|
||||
/* Disable FIFO 1 message pending Interrupt */
|
||||
__HAL_CAN_DISABLE_IT(hcan, CAN_IT_FMP1);
|
||||
|
||||
/* Disable FIFO 1 overrun and message pending Interrupt */
|
||||
__HAL_CAN_DISABLE_IT(hcan, CAN_IT_FOV1 | CAN_IT_FMP1);
|
||||
}
|
||||
|
||||
if(hcan->State == HAL_CAN_STATE_BUSY_RX)
|
||||
|
||||
tmp1 = hcan->State;
|
||||
if((tmp1 == HAL_CAN_STATE_BUSY_RX0) || (tmp1 == HAL_CAN_STATE_BUSY_RX1))
|
||||
{
|
||||
/* Disable Error warning, Error passive, Bus-off, Last error code
|
||||
and Error Interrupts */
|
||||
__HAL_CAN_DISABLE_IT(hcan, CAN_IT_EWG |
|
||||
__HAL_CAN_DISABLE_IT(hcan, CAN_IT_EWG |
|
||||
CAN_IT_EPV |
|
||||
CAN_IT_BOF |
|
||||
CAN_IT_LEC |
|
||||
CAN_IT_ERR);
|
||||
}
|
||||
|
||||
if(hcan->State == HAL_CAN_STATE_BUSY_TX_RX)
|
||||
|
||||
/* Change CAN state */
|
||||
if (FIFONumber == CAN_FIFO0)
|
||||
{
|
||||
/* Disable CAN state */
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX;
|
||||
switch(hcan->State)
|
||||
{
|
||||
case(HAL_CAN_STATE_BUSY_TX_RX0):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX;
|
||||
break;
|
||||
case(HAL_CAN_STATE_BUSY_RX0_RX1):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_RX1;
|
||||
break;
|
||||
case(HAL_CAN_STATE_BUSY_TX_RX0_RX1):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX_RX1;
|
||||
break;
|
||||
default: /* HAL_CAN_STATE_BUSY_RX0 */
|
||||
hcan->State = HAL_CAN_STATE_READY;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
else /* FIFONumber == CAN_FIFO1 */
|
||||
{
|
||||
/* Change CAN state */
|
||||
hcan->State = HAL_CAN_STATE_READY;
|
||||
switch(hcan->State)
|
||||
{
|
||||
case(HAL_CAN_STATE_BUSY_TX_RX1):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX;
|
||||
break;
|
||||
case(HAL_CAN_STATE_BUSY_RX0_RX1):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_RX0;
|
||||
break;
|
||||
case(HAL_CAN_STATE_BUSY_TX_RX0_RX1):
|
||||
hcan->State = HAL_CAN_STATE_BUSY_TX_RX0;
|
||||
break;
|
||||
default: /* HAL_CAN_STATE_BUSY_RX1 */
|
||||
hcan->State = HAL_CAN_STATE_READY;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Receive complete callback */
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_can.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of CAN HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
@ -68,9 +68,13 @@ typedef enum
|
|||
HAL_CAN_STATE_READY = 0x01U, /*!< CAN initialized and ready for use */
|
||||
HAL_CAN_STATE_BUSY = 0x02U, /*!< CAN process is ongoing */
|
||||
HAL_CAN_STATE_BUSY_TX = 0x12U, /*!< CAN process is ongoing */
|
||||
HAL_CAN_STATE_BUSY_RX = 0x22U, /*!< CAN process is ongoing */
|
||||
HAL_CAN_STATE_BUSY_TX_RX = 0x32U, /*!< CAN process is ongoing */
|
||||
HAL_CAN_STATE_TIMEOUT = 0x03U, /*!< Timeout state */
|
||||
HAL_CAN_STATE_BUSY_RX0 = 0x22U, /*!< CAN process is ongoing */
|
||||
HAL_CAN_STATE_BUSY_RX1 = 0x32U, /*!< CAN process is ongoing */
|
||||
HAL_CAN_STATE_BUSY_TX_RX0 = 0x42U, /*!< CAN process is ongoing */
|
||||
HAL_CAN_STATE_BUSY_TX_RX1 = 0x52U, /*!< CAN process is ongoing */
|
||||
HAL_CAN_STATE_BUSY_RX0_RX1 = 0x62U, /*!< CAN process is ongoing */
|
||||
HAL_CAN_STATE_BUSY_TX_RX0_RX1 = 0x72U, /*!< CAN process is ongoing */
|
||||
HAL_CAN_STATE_TIMEOUT = 0x03U, /*!< CAN in Timeout state */
|
||||
HAL_CAN_STATE_ERROR = 0x04U /*!< CAN error state */
|
||||
|
||||
}HAL_CAN_StateTypeDef;
|
||||
|
@ -220,17 +224,19 @@ typedef struct
|
|||
*/
|
||||
typedef struct
|
||||
{
|
||||
CAN_TypeDef *Instance; /*!< Register base address */
|
||||
CAN_TypeDef *Instance; /*!< Register base address */
|
||||
|
||||
CAN_InitTypeDef Init; /*!< CAN required parameters */
|
||||
CAN_InitTypeDef Init; /*!< CAN required parameters */
|
||||
|
||||
CanTxMsgTypeDef* pTxMsg; /*!< Pointer to transmit structure */
|
||||
CanTxMsgTypeDef* pTxMsg; /*!< Pointer to transmit structure */
|
||||
|
||||
CanRxMsgTypeDef* pRxMsg; /*!< Pointer to reception structure */
|
||||
CanRxMsgTypeDef* pRxMsg; /*!< Pointer to reception structure for RX FIFO0 msg */
|
||||
|
||||
__IO HAL_CAN_StateTypeDef State; /*!< CAN communication state */
|
||||
CanRxMsgTypeDef* pRx1Msg; /*!< Pointer to reception structure for RX FIFO1 msg */
|
||||
|
||||
HAL_LockTypeDef Lock; /*!< CAN locking object */
|
||||
__IO HAL_CAN_StateTypeDef State; /*!< CAN communication state */
|
||||
|
||||
HAL_LockTypeDef Lock; /*!< CAN locking object */
|
||||
|
||||
__IO uint32_t ErrorCode; /*!< CAN Error code
|
||||
This parameter can be a value of @ref CAN_Error_Code */
|
||||
|
@ -248,16 +254,19 @@ typedef struct
|
|||
/** @defgroup CAN_Error_Code CAN Error Code
|
||||
* @{
|
||||
*/
|
||||
#define HAL_CAN_ERROR_NONE 0x00U /*!< No error */
|
||||
#define HAL_CAN_ERROR_EWG 0x01U /*!< EWG error */
|
||||
#define HAL_CAN_ERROR_EPV 0x02U /*!< EPV error */
|
||||
#define HAL_CAN_ERROR_BOF 0x04U /*!< BOF error */
|
||||
#define HAL_CAN_ERROR_STF 0x08U /*!< Stuff error */
|
||||
#define HAL_CAN_ERROR_FOR 0x10U /*!< Form error */
|
||||
#define HAL_CAN_ERROR_ACK 0x20U /*!< Acknowledgment error */
|
||||
#define HAL_CAN_ERROR_BR 0x40U /*!< Bit recessive */
|
||||
#define HAL_CAN_ERROR_BD 0x80U /*!< LEC dominant */
|
||||
#define HAL_CAN_ERROR_CRC 0x100U /*!< LEC transfer error */
|
||||
#define HAL_CAN_ERROR_NONE 0x00000000U /*!< No error */
|
||||
#define HAL_CAN_ERROR_EWG 0x00000001U /*!< EWG error */
|
||||
#define HAL_CAN_ERROR_EPV 0x00000002U /*!< EPV error */
|
||||
#define HAL_CAN_ERROR_BOF 0x00000004U /*!< BOF error */
|
||||
#define HAL_CAN_ERROR_STF 0x00000008U /*!< Stuff error */
|
||||
#define HAL_CAN_ERROR_FOR 0x00000010U /*!< Form error */
|
||||
#define HAL_CAN_ERROR_ACK 0x00000020U /*!< Acknowledgment error */
|
||||
#define HAL_CAN_ERROR_BR 0x00000040U /*!< Bit recessive */
|
||||
#define HAL_CAN_ERROR_BD 0x00000080U /*!< LEC dominant */
|
||||
#define HAL_CAN_ERROR_CRC 0x00000100U /*!< LEC transfer error */
|
||||
#define HAL_CAN_ERROR_FOV0 0x00000200U /*!< FIFO0 overrun error */
|
||||
#define HAL_CAN_ERROR_FOV1 0x00000400U /*!< FIFO1 overrun error */
|
||||
#define HAL_CAN_ERROR_TXFAIL 0x00000800U /*!< Transmit failure */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_cec.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief CEC HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the High Definition Multimedia Interface
|
||||
|
@ -49,7 +49,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_cec.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of CEC HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_conf.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief HAL configuration file.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_cortex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief CORTEX HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the CORTEX:
|
||||
|
@ -70,7 +70,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_cortex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of CORTEX HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_crc.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief CRC HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the Cyclic Redundancy Check (CRC) peripheral:
|
||||
|
@ -37,7 +37,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_crc.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of CRC HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
@ -281,7 +281,6 @@ typedef struct
|
|||
* @}
|
||||
*/
|
||||
|
||||
|
||||
/* Include CRC HAL Extension module */
|
||||
#include "stm32f7xx_hal_crc_ex.h"
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_crc_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Extended CRC HAL module driver.
|
||||
*
|
||||
* This file provides firmware functions to manage the following
|
||||
|
@ -23,7 +23,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_crc_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of CRC HAL extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_cryp.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief CRYP HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the Cryptography (CRYP) peripheral:
|
||||
|
@ -70,7 +70,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_cryp.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of CRYP HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_cryp_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Extended CRYP HAL module driver
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of CRYP extension peripheral:
|
||||
|
@ -69,7 +69,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_cryp_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of CRYP HAL Extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_dac.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief DAC HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the Digital to Analog Converter (DAC) peripheral:
|
||||
|
@ -143,7 +143,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
@ -440,7 +440,7 @@ HAL_StatusTypeDef HAL_DAC_Stop(DAC_HandleTypeDef* hdac, uint32_t Channel)
|
|||
* This parameter can be one of the following values:
|
||||
* @arg DAC_CHANNEL_1: DAC Channel1 selected
|
||||
* @arg DAC_CHANNEL_2: DAC Channel2 selected
|
||||
* @param pData: The destination peripheral Buffer address.
|
||||
* @param pData: The Source memory Buffer address.
|
||||
* @param Length: The length of data to be transferred from memory to DAC peripheral
|
||||
* @param Alignment: Specifies the data alignment for DAC channel.
|
||||
* This parameter can be one of the following values:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_dac.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of DAC HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_dac_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Extended DAC HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of DAC extension peripheral:
|
||||
|
@ -25,7 +25,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_dac.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of DAC HAL Extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_dcmi.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief DCMI HAL module driver
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the Digital Camera Interface (DCMI) peripheral:
|
||||
|
@ -63,7 +63,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_dcmi.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of DCMI HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_dcmi_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Empty file; This file is no longer used to handle the Black&White
|
||||
* feature. Its content is now moved to common files
|
||||
* (stm32f7xx_hal_dcmi.c/.h) as there's no device's dependency within F7
|
||||
|
@ -12,7 +12,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_dcmi_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of DCMI Extension HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_def.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief This file contains HAL common defines, enumeration, macros and
|
||||
* structures definitions.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_dfsdm.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief This file provides firmware functions to manage the following
|
||||
* functionalities of the Digital Filter for Sigma-Delta Modulators
|
||||
* (DFSDM) peripherals:
|
||||
|
@ -161,7 +161,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_dfsdm.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of DFSDM HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_dma.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief DMA HAL module driver.
|
||||
*
|
||||
* This file provides firmware functions to manage the following
|
||||
|
@ -12,36 +12,36 @@
|
|||
* + IO operation functions
|
||||
* + Peripheral State and errors functions
|
||||
@verbatim
|
||||
==============================================================================
|
||||
==============================================================================
|
||||
##### How to use this driver #####
|
||||
==============================================================================
|
||||
==============================================================================
|
||||
[..]
|
||||
(#) Enable and configure the peripheral to be connected to the DMA Stream
|
||||
(except for internal SRAM/FLASH memories: no initialization is
|
||||
necessary) please refer to Reference manual for connection between peripherals
|
||||
and DMA requests.
|
||||
|
||||
(#) For a given Stream, program the required configuration through the following parameters:
|
||||
and DMA requests.
|
||||
|
||||
(#) For a given Stream, program the required configuration through the following parameters:
|
||||
Transfer Direction, Source and Destination data formats,
|
||||
Circular, Normal or peripheral flow control mode, Stream Priority level,
|
||||
Source and Destination Increment mode, FIFO mode and its Threshold (if needed),
|
||||
Burst mode for Source and/or Destination (if needed) using HAL_DMA_Init() function.
|
||||
|
||||
|
||||
-@- Prior to HAL_DMA_Init() the clock must be enabled for DMA through the following macros:
|
||||
__HAL_RCC_DMA1_CLK_ENABLE() or __HAL_RCC_DMA2_CLK_ENABLE().
|
||||
|
||||
|
||||
*** Polling mode IO operation ***
|
||||
=================================
|
||||
[..]
|
||||
=================================
|
||||
[..]
|
||||
(+) Use HAL_DMA_Start() to start DMA transfer after the configuration of Source
|
||||
address and destination address and the Length of data to be transferred.
|
||||
(+) Use HAL_DMA_PollForTransfer() to poll for the end of current transfer, in this
|
||||
case a fixed Timeout can be configured by User depending from his application.
|
||||
(+) Use HAL_DMA_Abort() function to abort the current transfer.
|
||||
|
||||
*** Interrupt mode IO operation ***
|
||||
===================================
|
||||
[..]
|
||||
|
||||
*** Interrupt mode IO operation ***
|
||||
===================================
|
||||
[..]
|
||||
(+) Configure the DMA interrupt priority using HAL_NVIC_SetPriority()
|
||||
(+) Enable the DMA IRQ handler using HAL_NVIC_EnableIRQ()
|
||||
(+) Use HAL_DMA_Start_IT() to start DMA transfer after the configuration of
|
||||
|
@ -50,42 +50,42 @@
|
|||
(+) Use HAL_DMA_IRQHandler() called under DMA_IRQHandler() Interrupt subroutine
|
||||
(+) At the end of data transfer HAL_DMA_IRQHandler() function is executed and user can
|
||||
add his own function by customization of function pointer XferCpltCallback and
|
||||
XferErrorCallback (i.e a member of DMA handle structure).
|
||||
[..]
|
||||
XferErrorCallback (i.e a member of DMA handle structure).
|
||||
[..]
|
||||
(#) Use HAL_DMA_GetState() function to return the DMA state and HAL_DMA_GetError() in case of error
|
||||
detection.
|
||||
|
||||
|
||||
(#) Use HAL_DMA_Abort_IT() function to abort the current transfer
|
||||
|
||||
|
||||
-@- In Memory-to-Memory transfer mode, Circular mode is not allowed.
|
||||
|
||||
|
||||
-@- The FIFO is used mainly to reduce bus usage and to allow data packing/unpacking: it is
|
||||
possible to set different Data Sizes for the Peripheral and the Memory (ie. you can set
|
||||
Half-Word data size for the peripheral to access its data register and set Word data size
|
||||
for the Memory to gain in access time. Each two half words will be packed and written in
|
||||
a single access to a Word in the Memory).
|
||||
|
||||
|
||||
-@- When FIFO is disabled, it is not allowed to configure different Data Sizes for Source
|
||||
and Destination. In this case the Peripheral Data Size will be applied to both Source
|
||||
and Destination.
|
||||
|
||||
and Destination.
|
||||
|
||||
*** DMA HAL driver macros list ***
|
||||
=============================================
|
||||
=============================================
|
||||
[..]
|
||||
Below the list of most used macros in DMA HAL driver.
|
||||
|
||||
(+) __HAL_DMA_ENABLE: Enable the specified DMA Stream.
|
||||
(+) __HAL_DMA_DISABLE: Disable the specified DMA Stream.
|
||||
(+) __HAL_DMA_GET_IT_SOURCE: Check whether the specified DMA Stream interrupt has occurred or not.
|
||||
|
||||
[..]
|
||||
(@) You can refer to the DMA HAL driver header file for more useful macros
|
||||
|
||||
|
||||
[..]
|
||||
(@) You can refer to the DMA HAL driver header file for more useful macros
|
||||
|
||||
@endverbatim
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
@ -163,17 +163,17 @@ static HAL_StatusTypeDef DMA_CheckFifoParam(DMA_HandleTypeDef *hdma);
|
|||
|
||||
/** @addtogroup DMA_Exported_Functions_Group1
|
||||
*
|
||||
@verbatim
|
||||
@verbatim
|
||||
===============================================================================
|
||||
##### Initialization and de-initialization functions #####
|
||||
===============================================================================
|
||||
===============================================================================
|
||||
[..]
|
||||
This section provides functions allowing to initialize the DMA Stream source
|
||||
and destination addresses, incrementation and data sizes, transfer direction,
|
||||
circular/normal mode selection, memory-to-memory mode selection and Stream priority value.
|
||||
[..]
|
||||
The HAL_DMA_Init() function follows the DMA configuration procedures as described in
|
||||
reference manual.
|
||||
reference manual.
|
||||
|
||||
@endverbatim
|
||||
* @{
|
||||
|
@ -277,21 +277,26 @@ HAL_StatusTypeDef HAL_DMA_Init(DMA_HandleTypeDef *hdma)
|
|||
/* Prepare the DMA Stream FIFO configuration */
|
||||
tmp |= hdma->Init.FIFOMode;
|
||||
|
||||
/* the FIFO threshold is not used when the FIFO mode is disabled */
|
||||
/* The FIFO threshold is not used when the FIFO mode is disabled */
|
||||
if(hdma->Init.FIFOMode == DMA_FIFOMODE_ENABLE)
|
||||
{
|
||||
/* Get the FIFO threshold */
|
||||
tmp |= hdma->Init.FIFOThreshold;
|
||||
|
||||
if (DMA_CheckFifoParam(hdma) != HAL_OK)
|
||||
/* Check compatibility between FIFO threshold level and size of the memory burst */
|
||||
/* for INCR4, INCR8, INCR16 bursts */
|
||||
if (hdma->Init.MemBurst != DMA_MBURST_SINGLE)
|
||||
{
|
||||
/* Update error code */
|
||||
hdma->ErrorCode = HAL_DMA_ERROR_PARAM;
|
||||
|
||||
/* Change the DMA state */
|
||||
hdma->State = HAL_DMA_STATE_READY;
|
||||
|
||||
return HAL_ERROR;
|
||||
if (DMA_CheckFifoParam(hdma) != HAL_OK)
|
||||
{
|
||||
/* Update error code */
|
||||
hdma->ErrorCode = HAL_DMA_ERROR_PARAM;
|
||||
|
||||
/* Change the DMA state */
|
||||
hdma->State = HAL_DMA_STATE_READY;
|
||||
|
||||
return HAL_ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -336,7 +341,7 @@ HAL_StatusTypeDef HAL_DMA_DeInit(DMA_HandleTypeDef *hdma)
|
|||
/* Return error status */
|
||||
return HAL_BUSY;
|
||||
}
|
||||
|
||||
|
||||
/* Check the parameters */
|
||||
assert_param(IS_DMA_STREAM_ALL_INSTANCE(hdma->Instance));
|
||||
|
||||
|
@ -404,7 +409,7 @@ HAL_StatusTypeDef HAL_DMA_DeInit(DMA_HandleTypeDef *hdma)
|
|||
/**
|
||||
* @brief Starts the DMA Transfer.
|
||||
* @param hdma : pointer to a DMA_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DMA Stream.
|
||||
* the configuration information for the specified DMA Stream.
|
||||
* @param SrcAddress: The source memory Buffer address
|
||||
* @param DstAddress: The destination memory Buffer address
|
||||
* @param DataLength: The length of data to be transferred from source to destination
|
||||
|
@ -426,7 +431,7 @@ HAL_StatusTypeDef HAL_DMA_Start(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, ui
|
|||
hdma->State = HAL_DMA_STATE_BUSY;
|
||||
|
||||
/* Initialize the error code */
|
||||
hdma->ErrorCode = HAL_DMA_ERROR_NONE;
|
||||
hdma->ErrorCode = HAL_DMA_ERROR_NONE;
|
||||
|
||||
/* Configure the source, destination address and the data length */
|
||||
DMA_SetConfig(hdma, SrcAddress, DstAddress, DataLength);
|
||||
|
@ -623,7 +628,7 @@ HAL_StatusTypeDef HAL_DMA_PollForTransfer(DMA_HandleTypeDef *hdma, HAL_DMA_Level
|
|||
|
||||
/* calculate DMA base and stream number */
|
||||
DMA_Base_Registers *regs;
|
||||
|
||||
|
||||
if(HAL_DMA_STATE_BUSY != hdma->State)
|
||||
{
|
||||
/* No transfer ongoing */
|
||||
|
@ -631,7 +636,7 @@ HAL_StatusTypeDef HAL_DMA_PollForTransfer(DMA_HandleTypeDef *hdma, HAL_DMA_Level
|
|||
__HAL_UNLOCK(hdma);
|
||||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
|
||||
/* Polling mode not supported in circular mode and double buffering mode */
|
||||
if ((hdma->Instance->CR & DMA_SxCR_CIRC) != RESET)
|
||||
{
|
||||
|
@ -673,10 +678,10 @@ HAL_StatusTypeDef HAL_DMA_PollForTransfer(DMA_HandleTypeDef *hdma, HAL_DMA_Level
|
|||
return HAL_TIMEOUT;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Get the ISR register value */
|
||||
tmpisr = regs->ISR;
|
||||
|
||||
|
||||
if((tmpisr & (DMA_FLAG_TEIF0_4 << hdma->StreamIndex)) != RESET)
|
||||
{
|
||||
/* Update error code */
|
||||
|
@ -871,17 +876,17 @@ void HAL_DMA_IRQHandler(DMA_HandleTypeDef *hdma)
|
|||
|
||||
/* Process Unlocked */
|
||||
__HAL_UNLOCK(hdma);
|
||||
|
||||
|
||||
/* Change the DMA state */
|
||||
hdma->State = HAL_DMA_STATE_READY;
|
||||
|
||||
|
||||
if(hdma->XferAbortCallback != NULL)
|
||||
{
|
||||
hdma->XferAbortCallback(hdma);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if(((hdma->Instance->CR) & (uint32_t)(DMA_SxCR_DBM)) != RESET)
|
||||
{
|
||||
/* Current memory buffer used is Memory 0 */
|
||||
|
@ -913,11 +918,11 @@ void HAL_DMA_IRQHandler(DMA_HandleTypeDef *hdma)
|
|||
|
||||
/* Process Unlocked */
|
||||
__HAL_UNLOCK(hdma);
|
||||
|
||||
|
||||
/* Change the DMA state */
|
||||
hdma->State = HAL_DMA_STATE_READY;
|
||||
}
|
||||
|
||||
|
||||
if(hdma->XferCpltCallback != NULL)
|
||||
{
|
||||
/* Transfer complete callback */
|
||||
|
@ -933,10 +938,10 @@ void HAL_DMA_IRQHandler(DMA_HandleTypeDef *hdma)
|
|||
if((hdma->ErrorCode & HAL_DMA_ERROR_TE) != RESET)
|
||||
{
|
||||
hdma->State = HAL_DMA_STATE_ABORT;
|
||||
|
||||
|
||||
/* Disable the stream */
|
||||
__HAL_DMA_DISABLE(hdma);
|
||||
|
||||
|
||||
do
|
||||
{
|
||||
if (++count > timeout)
|
||||
|
@ -952,7 +957,7 @@ void HAL_DMA_IRQHandler(DMA_HandleTypeDef *hdma)
|
|||
/* Change the DMA state */
|
||||
hdma->State = HAL_DMA_STATE_READY;
|
||||
}
|
||||
|
||||
|
||||
if(hdma->XferErrorCallback != NULL)
|
||||
{
|
||||
/* Transfer error callback */
|
||||
|
@ -986,27 +991,27 @@ HAL_StatusTypeDef HAL_DMA_RegisterCallback(DMA_HandleTypeDef *hdma, HAL_DMA_Call
|
|||
case HAL_DMA_XFER_CPLT_CB_ID:
|
||||
hdma->XferCpltCallback = pCallback;
|
||||
break;
|
||||
|
||||
|
||||
case HAL_DMA_XFER_HALFCPLT_CB_ID:
|
||||
hdma->XferHalfCpltCallback = pCallback;
|
||||
break;
|
||||
|
||||
|
||||
case HAL_DMA_XFER_M1CPLT_CB_ID:
|
||||
hdma->XferM1CpltCallback = pCallback;
|
||||
break;
|
||||
|
||||
|
||||
case HAL_DMA_XFER_M1HALFCPLT_CB_ID:
|
||||
hdma->XferM1HalfCpltCallback = pCallback;
|
||||
break;
|
||||
|
||||
|
||||
case HAL_DMA_XFER_ERROR_CB_ID:
|
||||
hdma->XferErrorCallback = pCallback;
|
||||
break;
|
||||
|
||||
|
||||
case HAL_DMA_XFER_ABORT_CB_ID:
|
||||
hdma->XferAbortCallback = pCallback;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -1175,7 +1180,7 @@ static void DMA_SetConfig(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t
|
|||
{
|
||||
/* Configure DMA Stream source address */
|
||||
hdma->Instance->PAR = SrcAddress;
|
||||
|
||||
|
||||
/* Configure DMA Stream destination address */
|
||||
hdma->Instance->M0AR = DstAddress;
|
||||
}
|
||||
|
@ -1221,32 +1226,27 @@ static HAL_StatusTypeDef DMA_CheckFifoParam(DMA_HandleTypeDef *hdma)
|
|||
uint32_t tmp = hdma->Init.FIFOThreshold;
|
||||
|
||||
/* Memory Data size equal to Byte */
|
||||
if (hdma->Init.MemDataAlignment == DMA_MDATAALIGN_BYTE)
|
||||
if(hdma->Init.MemDataAlignment == DMA_MDATAALIGN_BYTE)
|
||||
{
|
||||
switch (tmp)
|
||||
{
|
||||
case DMA_FIFO_THRESHOLD_1QUARTERFULL:
|
||||
if ((hdma->Init.MemBurst & DMA_SxCR_MBURST_1) == DMA_SxCR_MBURST_1)
|
||||
{
|
||||
status = HAL_ERROR;
|
||||
}
|
||||
break;
|
||||
case DMA_FIFO_THRESHOLD_HALFFULL:
|
||||
if (hdma->Init.MemBurst == DMA_MBURST_INC16)
|
||||
{
|
||||
status = HAL_ERROR;
|
||||
}
|
||||
break;
|
||||
case DMA_FIFO_THRESHOLD_3QUARTERSFULL:
|
||||
if ((hdma->Init.MemBurst & DMA_SxCR_MBURST_1) == DMA_SxCR_MBURST_1)
|
||||
{
|
||||
status = HAL_ERROR;
|
||||
}
|
||||
break;
|
||||
case DMA_FIFO_THRESHOLD_FULL:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
case DMA_FIFO_THRESHOLD_1QUARTERFULL:
|
||||
case DMA_FIFO_THRESHOLD_3QUARTERSFULL:
|
||||
if ((hdma->Init.MemBurst & DMA_SxCR_MBURST_1) == DMA_SxCR_MBURST_1)
|
||||
{
|
||||
status = HAL_ERROR;
|
||||
}
|
||||
break;
|
||||
case DMA_FIFO_THRESHOLD_HALFFULL:
|
||||
if (hdma->Init.MemBurst == DMA_MBURST_INC16)
|
||||
{
|
||||
status = HAL_ERROR;
|
||||
}
|
||||
break;
|
||||
case DMA_FIFO_THRESHOLD_FULL:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1255,26 +1255,24 @@ static HAL_StatusTypeDef DMA_CheckFifoParam(DMA_HandleTypeDef *hdma)
|
|||
{
|
||||
switch (tmp)
|
||||
{
|
||||
case DMA_FIFO_THRESHOLD_1QUARTERFULL:
|
||||
case DMA_FIFO_THRESHOLD_1QUARTERFULL:
|
||||
case DMA_FIFO_THRESHOLD_3QUARTERSFULL:
|
||||
status = HAL_ERROR;
|
||||
break;
|
||||
case DMA_FIFO_THRESHOLD_HALFFULL:
|
||||
if ((hdma->Init.MemBurst & DMA_SxCR_MBURST_1) == DMA_SxCR_MBURST_1)
|
||||
{
|
||||
status = HAL_ERROR;
|
||||
break;
|
||||
case DMA_FIFO_THRESHOLD_HALFFULL:
|
||||
if ((hdma->Init.MemBurst & DMA_SxCR_MBURST_1) == DMA_SxCR_MBURST_1)
|
||||
{
|
||||
status = HAL_ERROR;
|
||||
}
|
||||
break;
|
||||
case DMA_FIFO_THRESHOLD_3QUARTERSFULL:
|
||||
}
|
||||
break;
|
||||
case DMA_FIFO_THRESHOLD_FULL:
|
||||
if (hdma->Init.MemBurst == DMA_MBURST_INC16)
|
||||
{
|
||||
status = HAL_ERROR;
|
||||
break;
|
||||
case DMA_FIFO_THRESHOLD_FULL:
|
||||
if (hdma->Init.MemBurst == DMA_MBURST_INC16)
|
||||
{
|
||||
status = HAL_ERROR;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1283,19 +1281,19 @@ static HAL_StatusTypeDef DMA_CheckFifoParam(DMA_HandleTypeDef *hdma)
|
|||
{
|
||||
switch (tmp)
|
||||
{
|
||||
case DMA_FIFO_THRESHOLD_1QUARTERFULL:
|
||||
case DMA_FIFO_THRESHOLD_HALFFULL:
|
||||
case DMA_FIFO_THRESHOLD_3QUARTERSFULL:
|
||||
case DMA_FIFO_THRESHOLD_1QUARTERFULL:
|
||||
case DMA_FIFO_THRESHOLD_HALFFULL:
|
||||
case DMA_FIFO_THRESHOLD_3QUARTERSFULL:
|
||||
status = HAL_ERROR;
|
||||
break;
|
||||
case DMA_FIFO_THRESHOLD_FULL:
|
||||
if ((hdma->Init.MemBurst & DMA_SxCR_MBURST_1) == DMA_SxCR_MBURST_1)
|
||||
{
|
||||
status = HAL_ERROR;
|
||||
break;
|
||||
case DMA_FIFO_THRESHOLD_FULL:
|
||||
if ((hdma->Init.MemBurst & DMA_SxCR_MBURST_1) == DMA_SxCR_MBURST_1)
|
||||
{
|
||||
status = HAL_ERROR;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_dma.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of DMA HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_dma2d.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief DMA2D HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the DMA2D peripheral:
|
||||
|
@ -98,7 +98,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_dma2d.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of DMA2D HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_dma_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief DMA Extension HAL module driver
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the DMA Extension peripheral:
|
||||
|
@ -27,7 +27,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_dma_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of DMA HAL extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_dsi.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief DSI HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the DSI peripheral:
|
||||
|
@ -14,7 +14,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_dsi.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of DSI HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_eth.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief ETH HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the Ethernet (ETH) peripheral:
|
||||
|
@ -68,7 +68,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_eth.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of ETH HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_flash.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief FLASH HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the internal FLASH memory:
|
||||
|
@ -72,7 +72,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_flash.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of FLASH HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_flash_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Extended FLASH HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the FLASH extension peripheral:
|
||||
|
@ -44,7 +44,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_flash_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of FLASH HAL Extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_gpio.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief GPIO HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the General Purpose Input/Output (GPIO) peripheral:
|
||||
|
@ -95,7 +95,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_gpio.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of GPIO HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_gpio_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of GPIO HAL Extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_hash.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief HASH HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the HASH peripheral:
|
||||
|
@ -68,7 +68,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_hash.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of HASH HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_hash_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief HASH HAL Extension module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of HASH peripheral:
|
||||
|
@ -65,7 +65,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_hash_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of HASH HAL Extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_hcd.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief HCD HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the USB Peripheral Controller:
|
||||
|
@ -44,7 +44,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_hcd.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of HCD HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_i2c.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief I2C HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the Inter Integrated Circuit (I2C) peripheral:
|
||||
|
@ -213,7 +213,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_i2c.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of I2C HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_i2c_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief I2C Extended HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of I2C Extended peripheral:
|
||||
|
@ -33,7 +33,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_i2c_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of I2C HAL Extended module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_i2s.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief I2S HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the Integrated Interchip Sound (I2S) peripheral:
|
||||
|
@ -109,7 +109,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_i2s.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of I2S HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_irda.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief IRDA HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the IrDA (Infrared Data Association) Peripheral
|
||||
|
@ -106,7 +106,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_irda.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of IRDA HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_irda_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of IRDA HAL Extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_iwdg.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief IWDG HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the Independent Watchdog (IWDG) peripheral:
|
||||
|
@ -81,7 +81,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_iwdg.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of IWDG HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_jpeg.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief JPEG HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the JPEG encoder/decoder peripheral:
|
||||
|
@ -151,7 +151,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_jpeg.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of JPEG HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_lptim.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief LPTIM HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the Low Power Timer (LPTIM) peripheral:
|
||||
|
@ -93,7 +93,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_lptim.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of LPTIM HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_ltdc.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief LTDC HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the LTDC peripheral:
|
||||
|
@ -82,7 +82,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_ltdc.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of LTDC HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_ltdc_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief LTDC Extension HAL module driver.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_ltdc_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of LTDC HAL Extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_mdios.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief MDIOS HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the MDIOS Peripheral.
|
||||
|
@ -65,7 +65,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_mdios.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of MDIOS HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_nand.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief NAND HAL module driver.
|
||||
* This file provides a generic firmware to drive NAND memories mounted
|
||||
* as external device.
|
||||
|
@ -58,7 +58,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
@ -427,7 +427,7 @@ HAL_StatusTypeDef HAL_NAND_ConfigDevice(NAND_HandleTypeDef *hnand, NAND_DeviceC
|
|||
hnand->Config.BlockSize = pDeviceConfig->BlockSize;
|
||||
hnand->Config.BlockNbr = pDeviceConfig->BlockNbr;
|
||||
hnand->Config.PlaneSize = pDeviceConfig->PlaneSize;
|
||||
hnand->Config.PlaneNbr = pDeviceConfig->BlockNbr;
|
||||
hnand->Config.PlaneNbr = pDeviceConfig->PlaneNbr;
|
||||
hnand->Config.ExtraCommandEnable = pDeviceConfig->ExtraCommandEnable;
|
||||
|
||||
return HAL_OK;
|
||||
|
@ -1663,7 +1663,7 @@ uint32_t HAL_NAND_Address_Inc(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pA
|
|||
pAddress->Block = 0;
|
||||
pAddress->Plane++;
|
||||
|
||||
if(pAddress->Plane == (hnand->Config.PlaneSize/ hnand->Config.BlockNbr))
|
||||
if(pAddress->Plane == (hnand->Config.PlaneNbr))
|
||||
{
|
||||
status = NAND_INVALID_ADDRESS;
|
||||
}
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_nand.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of NAND HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_nor.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief NOR HAL module driver.
|
||||
* This file provides a generic firmware to drive NOR memories mounted
|
||||
* as external device.
|
||||
|
@ -55,7 +55,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_nor.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of NOR HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_pcd.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief PCD HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the USB Peripheral Controller:
|
||||
|
@ -45,7 +45,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_pcd.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of PCD HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_pcd_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief PCD HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the USB Peripheral Controller:
|
||||
|
@ -12,7 +12,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_pcd_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of PCD HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_pwr.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief PWR HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the Power Controller (PWR) peripheral:
|
||||
|
@ -13,7 +13,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_pwr.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of PWR HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_pwr_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Extended PWR HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of PWR extension peripheral:
|
||||
|
@ -12,7 +12,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_pwr_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of PWR HAL Extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_qspi.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief QSPI HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the QuadSPI interface (QSPI).
|
||||
|
@ -138,7 +138,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_qspi.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of QSPI HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_rcc.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief RCC HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the Reset and Clock Control (RCC) peripheral:
|
||||
|
@ -56,7 +56,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_rcc.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of RCC HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_rcc_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Extension RCC HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities RCC extension peripheral:
|
||||
|
@ -12,7 +12,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_rcc_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of RCC HAL Extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_rng.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief RNG HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the Random Number Generator (RNG) peripheral:
|
||||
|
@ -29,7 +29,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_rng.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of RNG HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_rtc.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief RTC HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the Real Time Clock (RTC) peripheral:
|
||||
|
@ -109,7 +109,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
******************************************************************************
|
||||
* @file stm32f7xx_hal_rtc.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.2.0
|
||||
* @date 30-December-2016
|
||||
* @version V1.2.2
|
||||
* @date 14-April-2017
|
||||
* @brief Header file of RTC HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue