Skip to content

Commit e7a736e

Browse files
committed
system: F3: update STM32F3xx HAL Drivers to v1.5.6
Included in STM32CubeF3 FW v1.11.3 Signed-off-by: Frederic Pillon <[email protected]>
1 parent 5e72ff9 commit e7a736e

File tree

81 files changed

+3825
-2666
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+3825
-2666
lines changed

system/Drivers/STM32F3xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h

Lines changed: 177 additions & 110 deletions
Large diffs are not rendered by default.

system/Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_can.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ typedef enum
250250
HAL_CAN_RX_FIFO1_MSG_PENDING_CB_ID = 0x08U, /*!< CAN Rx FIFO 1 message pending callback ID */
251251
HAL_CAN_RX_FIFO1_FULL_CB_ID = 0x09U, /*!< CAN Rx FIFO 1 full callback ID */
252252
HAL_CAN_SLEEP_CB_ID = 0x0AU, /*!< CAN Sleep callback ID */
253-
HAL_CAN_WAKEUP_FROM_RX_MSG_CB_ID = 0x0BU, /*!< CAN Wake Up fropm Rx msg callback ID */
253+
HAL_CAN_WAKEUP_FROM_RX_MSG_CB_ID = 0x0BU, /*!< CAN Wake Up from Rx msg callback ID */
254254
HAL_CAN_ERROR_CB_ID = 0x0CU, /*!< CAN Error callback ID */
255255

256256
HAL_CAN_MSPINIT_CB_ID = 0x0DU, /*!< CAN MspInit callback ID */
@@ -290,11 +290,11 @@ typedef void (*pCAN_CallbackTypeDef)(CAN_HandleTypeDef *hcan); /*!< pointer to
290290
#define HAL_CAN_ERROR_RX_FOV0 (0x00000200U) /*!< Rx FIFO0 overrun error */
291291
#define HAL_CAN_ERROR_RX_FOV1 (0x00000400U) /*!< Rx FIFO1 overrun error */
292292
#define HAL_CAN_ERROR_TX_ALST0 (0x00000800U) /*!< TxMailbox 0 transmit failure due to arbitration lost */
293-
#define HAL_CAN_ERROR_TX_TERR0 (0x00001000U) /*!< TxMailbox 1 transmit failure due to tranmit error */
294-
#define HAL_CAN_ERROR_TX_ALST1 (0x00002000U) /*!< TxMailbox 0 transmit failure due to arbitration lost */
295-
#define HAL_CAN_ERROR_TX_TERR1 (0x00004000U) /*!< TxMailbox 1 transmit failure due to tranmit error */
296-
#define HAL_CAN_ERROR_TX_ALST2 (0x00008000U) /*!< TxMailbox 0 transmit failure due to arbitration lost */
297-
#define HAL_CAN_ERROR_TX_TERR2 (0x00010000U) /*!< TxMailbox 1 transmit failure due to tranmit error */
293+
#define HAL_CAN_ERROR_TX_TERR0 (0x00001000U) /*!< TxMailbox 0 transmit failure due to transmit error */
294+
#define HAL_CAN_ERROR_TX_ALST1 (0x00002000U) /*!< TxMailbox 1 transmit failure due to arbitration lost */
295+
#define HAL_CAN_ERROR_TX_TERR1 (0x00004000U) /*!< TxMailbox 1 transmit failure due to transmit error */
296+
#define HAL_CAN_ERROR_TX_ALST2 (0x00008000U) /*!< TxMailbox 2 transmit failure due to arbitration lost */
297+
#define HAL_CAN_ERROR_TX_TERR2 (0x00010000U) /*!< TxMailbox 2 transmit failure due to transmit error */
298298
#define HAL_CAN_ERROR_TIMEOUT (0x00020000U) /*!< Timeout error */
299299
#define HAL_CAN_ERROR_NOT_INITIALIZED (0x00040000U) /*!< Peripheral not initialized */
300300
#define HAL_CAN_ERROR_NOT_READY (0x00080000U) /*!< Peripheral not ready */

system/Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_cec.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,14 @@ typedef struct
121121
* b6 Error information
122122
* 0 : No Error
123123
* 1 : Error
124-
* b5 IP initialization status
125-
* 0 : Reset (IP not initialized)
126-
* 1 : Init done (IP initialized. HAL CEC Init function already called)
124+
* b5 CEC peripheral initialization status
125+
* 0 : Reset (peripheral not initialized)
126+
* 1 : Init done (peripheral initialized. HAL CEC Init function already called)
127127
* b4-b3 (not used)
128128
* xx : Should be set to 00
129129
* b2 Intrinsic process state
130130
* 0 : Ready
131-
* 1 : Busy (IP busy with some configuration or internal operations)
131+
* 1 : Busy (peripheral busy with some configuration or internal operations)
132132
* b1 (not used)
133133
* x : Should be set to 0
134134
* b0 Tx state
@@ -138,9 +138,9 @@ typedef struct
138138
* RxState value coding follow below described bitmap :
139139
* b7-b6 (not used)
140140
* xx : Should be set to 00
141-
* b5 IP initialization status
142-
* 0 : Reset (IP not initialized)
143-
* 1 : Init done (IP initialized)
141+
* b5 CEC peripheral initialization status
142+
* 0 : Reset (peripheral not initialized)
143+
* 1 : Init done (peripheral initialized)
144144
* b4-b2 (not used)
145145
* xxx : Should be set to 000
146146
* b1 Rx state

system/Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_crc.h

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,22 @@ typedef struct
6060
{
6161
uint8_t DefaultPolynomialUse; /*!< This parameter is a value of @ref CRC_Default_Polynomial and indicates if default polynomial is used.
6262
If set to DEFAULT_POLYNOMIAL_ENABLE, resort to default
63-
X^32 + X^26 + X^23 + X^22 + X^16 + X^12 + X^11 + X^10 +X^8 + X^7 + X^5 + X^4 + X^2+ X +1.
63+
X^32 + X^26 + X^23 + X^22 + X^16 + X^12 + X^11 + X^10 +X^8 + X^7 + X^5 +
64+
X^4 + X^2+ X +1.
6465
In that case, there is no need to set GeneratingPolynomial field.
65-
If otherwise set to DEFAULT_POLYNOMIAL_DISABLE, GeneratingPolynomial and CRCLength fields must be set. */
66+
If otherwise set to DEFAULT_POLYNOMIAL_DISABLE, GeneratingPolynomial and
67+
CRCLength fields must be set. */
6668

6769
uint8_t DefaultInitValueUse; /*!< This parameter is a value of @ref CRC_Default_InitValue_Use and indicates if default init value is used.
6870
If set to DEFAULT_INIT_VALUE_ENABLE, resort to default
69-
0xFFFFFFFF value. In that case, there is no need to set InitValue field.
70-
If otherwise set to DEFAULT_INIT_VALUE_DISABLE, InitValue field must be set. */
71+
0xFFFFFFFF value. In that case, there is no need to set InitValue field. If
72+
otherwise set to DEFAULT_INIT_VALUE_DISABLE, InitValue field must be set. */
7173

7274
uint32_t GeneratingPolynomial; /*!< Set CRC generating polynomial as a 7, 8, 16 or 32-bit long value for a polynomial degree
73-
respectively equal to 7, 8, 16 or 32. This field is written in normal representation,
74-
e.g., for a polynomial of degree 7, X^7 + X^6 + X^5 + X^2 + 1 is written 0x65.
75-
No need to specify it if DefaultPolynomialUse is set to DEFAULT_POLYNOMIAL_ENABLE. */
75+
respectively equal to 7, 8, 16 or 32. This field is written in normal,
76+
representation e.g., for a polynomial of degree 7, X^7 + X^6 + X^5 + X^2 + 1
77+
is written 0x65. No need to specify it if DefaultPolynomialUse is set to
78+
DEFAULT_POLYNOMIAL_ENABLE. */
7679

7780
uint32_t CRCLength; /*!< This parameter is a value of @ref CRC_Polynomial_Sizes and indicates CRC length.
7881
Value can be either one of
@@ -87,14 +90,18 @@ typedef struct
8790
uint32_t InputDataInversionMode; /*!< This parameter is a value of @ref CRCEx_Input_Data_Inversion and specifies input data inversion mode.
8891
Can be either one of the following values
8992
@arg @ref CRC_INPUTDATA_INVERSION_NONE no input data inversion
90-
@arg @ref CRC_INPUTDATA_INVERSION_BYTE byte-wise inversion, 0x1A2B3C4D becomes 0x58D43CB2
91-
@arg @ref CRC_INPUTDATA_INVERSION_HALFWORD halfword-wise inversion, 0x1A2B3C4D becomes 0xD458B23C
92-
@arg @ref CRC_INPUTDATA_INVERSION_WORD word-wise inversion, 0x1A2B3C4D becomes 0xB23CD458 */
93+
@arg @ref CRC_INPUTDATA_INVERSION_BYTE byte-wise inversion, 0x1A2B3C4D
94+
becomes 0x58D43CB2
95+
@arg @ref CRC_INPUTDATA_INVERSION_HALFWORD halfword-wise inversion,
96+
0x1A2B3C4D becomes 0xD458B23C
97+
@arg @ref CRC_INPUTDATA_INVERSION_WORD word-wise inversion, 0x1A2B3C4D
98+
becomes 0xB23CD458 */
9399

94100
uint32_t OutputDataInversionMode; /*!< This parameter is a value of @ref CRCEx_Output_Data_Inversion and specifies output data (i.e. CRC) inversion mode.
95101
Can be either
96102
@arg @ref CRC_OUTPUTDATA_INVERSION_DISABLE no CRC inversion,
97-
@arg @ref CRC_OUTPUTDATA_INVERSION_ENABLE CRC 0x11223344 is converted into 0x22CC4488 */
103+
@arg @ref CRC_OUTPUTDATA_INVERSION_ENABLE CRC 0x11223344 is converted
104+
into 0x22CC4488 */
98105
} CRC_InitTypeDef;
99106

100107
/**
@@ -112,12 +119,16 @@ typedef struct
112119

113120
uint32_t InputDataFormat; /*!< This parameter is a value of @ref CRC_Input_Buffer_Format and specifies input data format.
114121
Can be either
115-
@arg @ref CRC_INPUTDATA_FORMAT_BYTES input data is a stream of bytes (8-bit data)
116-
@arg @ref CRC_INPUTDATA_FORMAT_HALFWORDS input data is a stream of half-words (16-bit data)
117-
@arg @ref CRC_INPUTDATA_FORMAT_WORDS input data is a stream of words (32-bit data)
118-
119-
Note that constant CRC_INPUT_FORMAT_UNDEFINED is defined but an initialization error
120-
must occur if InputBufferFormat is not one of the three values listed above */
122+
@arg @ref CRC_INPUTDATA_FORMAT_BYTES input data is a stream of bytes
123+
(8-bit data)
124+
@arg @ref CRC_INPUTDATA_FORMAT_HALFWORDS input data is a stream of
125+
half-words (16-bit data)
126+
@arg @ref CRC_INPUTDATA_FORMAT_WORDS input data is a stream of words
127+
(32-bit data)
128+
129+
Note that constant CRC_INPUT_FORMAT_UNDEFINED is defined but an initialization
130+
error must occur if InputBufferFormat is not one of the three values listed
131+
above */
121132
} CRC_HandleTypeDef;
122133
/**
123134
* @}
@@ -199,15 +210,6 @@ typedef struct
199210
* @}
200211
*/
201212

202-
/** @defgroup CRC_Aliases CRC API aliases
203-
* @{
204-
*/
205-
#define HAL_CRC_Input_Data_Reverse HAL_CRCEx_Input_Data_Reverse /*!< Aliased to HAL_CRCEx_Input_Data_Reverse for inter STM32 series compatibility */
206-
#define HAL_CRC_Output_Data_Reverse HAL_CRCEx_Output_Data_Reverse /*!< Aliased to HAL_CRCEx_Output_Data_Reverse for inter STM32 series compatibility */
207-
/**
208-
* @}
209-
*/
210-
211213
/**
212214
* @}
213215
*/

system/Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_gpio.h

Lines changed: 46 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -106,26 +106,28 @@ typedef enum
106106

107107
/** @defgroup GPIO_mode GPIO mode
108108
* @brief GPIO Configuration Mode
109-
* Elements values convention: 0xX0yz00YZ
110-
* - X : GPIO mode or EXTI Mode
111-
* - y : External IT or Event trigger detection
112-
* - z : IO configuration on External IT or Event
113-
* - Y : Output type (Push Pull or Open Drain)
114-
* - Z : IO Direction mode (Input, Output, Alternate or Analog)
109+
* Elements values convention: 0x00WX00YZ
110+
* - W : EXTI trigger detection on 3 bits
111+
* - X : EXTI mode (IT or Event) on 2 bits
112+
* - Y : Output type (Push Pull or Open Drain) on 1 bit
113+
* - Z : GPIO mode (Input, Output, Alternate or Analog) on 2 bits
115114
* @{
116115
*/
117-
#define GPIO_MODE_INPUT (0x00000000U) /*!< Input Floating Mode */
118-
#define GPIO_MODE_OUTPUT_PP (0x00000001U) /*!< Output Push Pull Mode */
119-
#define GPIO_MODE_OUTPUT_OD (0x00000011U) /*!< Output Open Drain Mode */
120-
#define GPIO_MODE_AF_PP (0x00000002U) /*!< Alternate Function Push Pull Mode */
121-
#define GPIO_MODE_AF_OD (0x00000012U) /*!< Alternate Function Open Drain Mode */
122-
#define GPIO_MODE_ANALOG (0x00000003U) /*!< Analog Mode */
123-
#define GPIO_MODE_IT_RISING (0x10110000U) /*!< External Interrupt Mode with Rising edge trigger detection */
124-
#define GPIO_MODE_IT_FALLING (0x10210000U) /*!< External Interrupt Mode with Falling edge trigger detection */
125-
#define GPIO_MODE_IT_RISING_FALLING (0x10310000U) /*!< External Interrupt Mode with Rising/Falling edge trigger detection */
126-
#define GPIO_MODE_EVT_RISING (0x10120000U) /*!< External Event Mode with Rising edge trigger detection */
127-
#define GPIO_MODE_EVT_FALLING (0x10220000U) /*!< External Event Mode with Falling edge trigger detection */
128-
#define GPIO_MODE_EVT_RISING_FALLING (0x10320000U) /*!< External Event Mode with Rising/Falling edge trigger detection */
116+
#define GPIO_MODE_INPUT MODE_INPUT /*!< Input Floating Mode */
117+
#define GPIO_MODE_OUTPUT_PP (MODE_OUTPUT | OUTPUT_PP) /*!< Output Push Pull Mode */
118+
#define GPIO_MODE_OUTPUT_OD (MODE_OUTPUT | OUTPUT_OD) /*!< Output Open Drain Mode */
119+
#define GPIO_MODE_AF_PP (MODE_AF | OUTPUT_PP) /*!< Alternate Function Push Pull Mode */
120+
#define GPIO_MODE_AF_OD (MODE_AF | OUTPUT_OD) /*!< Alternate Function Open Drain Mode */
121+
122+
#define GPIO_MODE_ANALOG MODE_ANALOG /*!< Analog Mode */
123+
124+
#define GPIO_MODE_IT_RISING (MODE_INPUT | EXTI_IT | TRIGGER_RISING) /*!< External Interrupt Mode with Rising edge trigger detection */
125+
#define GPIO_MODE_IT_FALLING (MODE_INPUT | EXTI_IT | TRIGGER_FALLING) /*!< External Interrupt Mode with Falling edge trigger detection */
126+
#define GPIO_MODE_IT_RISING_FALLING (MODE_INPUT | EXTI_IT | TRIGGER_RISING | TRIGGER_FALLING) /*!< External Interrupt Mode with Rising/Falling edge trigger detection */
127+
128+
#define GPIO_MODE_EVT_RISING (MODE_INPUT | EXTI_EVT | TRIGGER_RISING) /*!< External Event Mode with Rising edge trigger detection */
129+
#define GPIO_MODE_EVT_FALLING (MODE_INPUT | EXTI_EVT | TRIGGER_FALLING) /*!< External Event Mode with Falling edge trigger detection */
130+
#define GPIO_MODE_EVT_RISING_FALLING (MODE_INPUT | EXTI_EVT | TRIGGER_RISING | TRIGGER_FALLING) /*!< External Event Mode with Rising/Falling edge trigger detection */
129131
/**
130132
* @}
131133
*/
@@ -206,6 +208,32 @@ typedef enum
206208
*/
207209

208210
/* Private macros ------------------------------------------------------------*/
211+
/** @defgroup GPIO_Private_Constants GPIO Private Constants
212+
* @{
213+
*/
214+
#define GPIO_MODE_Pos 0u
215+
#define GPIO_MODE (0x3uL << GPIO_MODE_Pos)
216+
#define MODE_INPUT (0x0uL << GPIO_MODE_Pos)
217+
#define MODE_OUTPUT (0x1uL << GPIO_MODE_Pos)
218+
#define MODE_AF (0x2uL << GPIO_MODE_Pos)
219+
#define MODE_ANALOG (0x3uL << GPIO_MODE_Pos)
220+
#define OUTPUT_TYPE_Pos 4u
221+
#define OUTPUT_TYPE (0x1uL << OUTPUT_TYPE_Pos)
222+
#define OUTPUT_PP (0x0uL << OUTPUT_TYPE_Pos)
223+
#define OUTPUT_OD (0x1uL << OUTPUT_TYPE_Pos)
224+
#define EXTI_MODE_Pos 16u
225+
#define EXTI_MODE (0x3uL << EXTI_MODE_Pos)
226+
#define EXTI_IT (0x1uL << EXTI_MODE_Pos)
227+
#define EXTI_EVT (0x2uL << EXTI_MODE_Pos)
228+
#define TRIGGER_MODE_Pos 20u
229+
#define TRIGGER_MODE (0x7uL << TRIGGER_MODE_Pos)
230+
#define TRIGGER_RISING (0x1uL << TRIGGER_MODE_Pos)
231+
#define TRIGGER_FALLING (0x2uL << TRIGGER_MODE_Pos)
232+
#define TRIGGER_LEVEL (0x4uL << TRIGGER_MODE_Pos)
233+
/**
234+
* @}
235+
*/
236+
209237
/** @addtogroup GPIO_Private_Macros GPIO Private Macros
210238
* @{
211239
*/

0 commit comments

Comments
 (0)