EasyManuals Logo

ST STM32F31xx User Manual

ST STM32F31xx
584 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #115 background imageLoading...
Page #115 background image
UM1581
Controller area network (bxCAN)
DocID023800 Rev 1
115/584
 CAN_IT_BOF: Bus-off Interrupt; If enabled, this interrupt source is pending when
CAN enters the bus-off state. The bus-off state is entered on TEC overflow,
greater than 255. This Flag is cleared only by hardware.
 CAN_IT_LEC: Last error code Interrupt; If enabled, this interrupt source is
pending when a message has been transferred (reception or transmission) with
error and the error code is hold.
 CAN_IT_ERR: Error Interrupt; If enabled, this interrupt source is pending when
an error condition is pending.
Managing the CAN controller events: The user should identify which mode will be used in
his application to manage the CAN controller events: Polling mode or Interrupt mode.
ï‚· In the Polling Mode it is advised to use the following functions:
 CAN_GetFlagStatus() : to check if flags events occur.
 CAN_ClearFlag() : to clear the flags events.
ï‚· In the Interrupt Mode it is advised to use the following functions:
 CAN_ITConfig() : to enable or disable the interrupt source.
 CAN_GetITStatus() : to check if Interrupt occurs.
 CAN_ClearITPendingBit() : to clear the Interrupt pending Bit (corresponding
Flag). This function has no impact on CAN_IT_FMP0 and CAN_IT_FMP1
Interrupts pending bits since there are cleared only by hardware.
ï‚· CAN_ITConfig()
ï‚· CAN_GetFlagStatus()
ï‚· CAN_ClearFlag()
ï‚· CAN_GetITStatus()
ï‚· CAN_ClearITPendingBit()
4.2.8 Initialization and Configuration functions
4.2.8.1 CAN_DeInit
Function Name
void CAN_DeInit ( CAN_TypeDef * CANx)
Function Description
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.
Notes
ï‚· None.
4.2.8.2 CAN_Init
Function Name
uint8_t CAN_Init ( CAN_TypeDef * CANx, CAN_InitTypeDef *
CAN_InitStruct)
Function Description
Initializes the CAN peripheral according to the specified

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM32F31xx and is the answer not in the manual?

ST STM32F31xx Specifications

General IconGeneral
BrandST
ModelSTM32F31xx
CategoryMicrocontrollers
LanguageEnglish

Related product manuals