STM32F37 Standard Peripheral bibliotheek  1.0
ST Microelectronics bibliotheek documentatie voor de STM32F37 Standard Peripheral Library
 All Data Structures Files Functions Variables Enumerations Enumerator Groups
Initialization and Configuration functions

Initialization and Configuration functions. More...

Functions

void CAN_DeInit (CAN_TypeDef *CANx)
 Deinitializes the CAN peripheral registers to their default reset values. More...
 
uint8_t CAN_Init (CAN_TypeDef *CANx, CAN_InitTypeDef *CAN_InitStruct)
 Initializes the CAN peripheral according to the specified parameters in the CAN_InitStruct. More...
 
void CAN_FilterInit (CAN_FilterInitTypeDef *CAN_FilterInitStruct)
 Configures the CAN reception filter according to the specified parameters in the CAN_FilterInitStruct. More...
 
void CAN_StructInit (CAN_InitTypeDef *CAN_InitStruct)
 Fills each CAN_InitStruct member with its default value. More...
 
void CAN_SlaveStartBank (uint8_t CAN_BankNumber)
 Select the start bank filter for slave CAN. More...
 
void CAN_DBGFreeze (CAN_TypeDef *CANx, FunctionalState NewState)
 Enables or disables the DBG Freeze for CAN. More...
 
void CAN_TTComModeCmd (CAN_TypeDef *CANx, FunctionalState NewState)
 Enables or disables the CAN Time TriggerOperation communication mode. More...
 

Detailed Description

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. 
         (#) 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

Function Documentation

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
None
void CAN_DeInit ( CAN_TypeDef *  CANx)

Deinitializes the CAN peripheral registers to their default reset values.

Parameters
CANx,:where x can be 1 to select the CAN1 peripheral.
Return values
None
void CAN_FilterInit ( CAN_FilterInitTypeDef CAN_FilterInitStruct)

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
None
uint8_t CAN_Init ( CAN_TypeDef *  CANx,
CAN_InitTypeDef CAN_InitStruct 
)

Initializes the CAN peripheral according to the specified parameters in the CAN_InitStruct.

Parameters
CANx,:where x can be 1 to select the CAN1 peripheral.
CAN_InitStruct,:pointer to a CAN_InitTypeDef structure that contains the configuration information for the CAN peripheral.
Return values
Constantindicates initialization succeed which will be CAN_InitStatus_Failed or CAN_InitStatus_Success.
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
None
void CAN_StructInit ( CAN_InitTypeDef CAN_InitStruct)

Fills each CAN_InitStruct member with its default value.

Parameters
CAN_InitStruct,:pointer to a CAN_InitTypeDef structure which ill be initialized.
Return values
None
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
None