Initialization and Configuration functions.
More...
Initialization and Configuration functions.
===============================================================================
##### Initialization and Configuration functions #####
===============================================================================
[..] This section provides functions allowing to
(+) Initialize the CAN peripherals : Prescaler, operating mode, the maximum
number of time quanta to perform resynchronization, the number of time
quanta in Bit Segment 1 and 2 and many other modes.
Refer to @ref CAN_InitTypeDef for more details.
(+) Configures the CAN reception filter.
(+) Select the start bank filter for slave CAN.
(+) Enables or disables the Debug Freeze mode for CAN
(+)Enables or disables the CAN Time Trigger Operation communication mode
void CAN_DBGFreeze |
( |
CAN_TypeDef * |
CANx, |
|
|
FunctionalState |
NewState |
|
) |
| |
Enables or disables the DBG Freeze for CAN.
- Parameters
-
CANx | where x can be 1 or 2 to to select the CAN peripheral. |
NewState | new state of the CAN peripheral. This parameter can be: ENABLE (CAN reception/transmission is frozen during debug. Reception FIFOs can still be accessed/controlled normally) or DISABLE (CAN is working during debug). |
- Return values
-
Definition at line 493 of file stm32f4xx_can.c.
void CAN_DeInit |
( |
CAN_TypeDef * |
CANx | ) |
|
Deinitializes the CAN peripheral registers to their default reset values.
- Parameters
-
CANx | where x can be 1 or 2 to select the CAN peripheral. |
- Return values
-
Definition at line 167 of file stm32f4xx_can.c.
Configures the CAN reception filter according to the specified parameters in the CAN_FilterInitStruct.
- Parameters
-
CAN_FilterInitStruct | pointer to a CAN_FilterInitTypeDef structure that contains the configuration information. |
- Return values
-
Definition at line 334 of file stm32f4xx_can.c.
Initializes the CAN peripheral according to the specified parameters in the CAN_InitStruct.
- Parameters
-
CANx | where x can be 1 or 2 to select the CAN peripheral. |
CAN_InitStruct | pointer to a CAN_InitTypeDef structure that contains the configuration information for the CAN peripheral. |
- Return values
-
Constant | indicates initialization succeed which will be CAN_InitStatus_Failed or CAN_InitStatus_Success. |
Definition at line 197 of file stm32f4xx_can.c.
void CAN_SlaveStartBank |
( |
uint8_t |
CAN_BankNumber | ) |
|
Select the start bank filter for slave CAN.
- Parameters
-
CAN_BankNumber | Select the start slave bank filter from 1..27. |
- Return values
-
Definition at line 468 of file stm32f4xx_can.c.
Fills each CAN_InitStruct member with its default value.
- Parameters
-
CAN_InitStruct | pointer to a CAN_InitTypeDef structure which ill be initialized. |
- Return values
-
Definition at line 425 of file stm32f4xx_can.c.
void CAN_TTComModeCmd |
( |
CAN_TypeDef * |
CANx, |
|
|
FunctionalState |
NewState |
|
) |
| |
Enables or disables the CAN Time TriggerOperation communication mode.
- Note
- DLC must be programmed as 8 in order Time Stamp (2 bytes) to be sent over the CAN bus.
- Parameters
-
CANx | where x can be 1 or 2 to to select the CAN peripheral. |
NewState | Mode new state. This parameter can be: ENABLE or DISABLE. When enabled, Time stamp (TIME[15:0]) value is sent in the last two data bytes of the 8-byte message: TIME[7:0] in data byte 6 and TIME[15:8] in data byte 7. |
- Return values
-
Definition at line 523 of file stm32f4xx_can.c.