stm32 can 滤波器CAN_FilterConfTypeDef 之BankNumber
来源:互联网 发布:方正幼圆字体下载 mac 编辑:程序博客网 时间:2024/06/07 07:49
/**
* @brief CAN filter configuration structure definition
*/
typedef struct
{
uint32_t FilterIdHigh; /*!< Specifies the filter identification number (MSBs for a 32-bit
configuration, first one for a 16-bit configuration).
This parameter must be a number between Min_Data = 0x0000U and Max_Data = 0xFFFFU */
uint32_t FilterIdLow; /*!< Specifies the filter identification number (LSBs for a 32-bit
configuration, second one for a 16-bit configuration).
This parameter must be a number between Min_Data = 0x0000U and Max_Data = 0xFFFFU */
uint32_t FilterMaskIdHigh; /*!< Specifies the filter mask number or identification number,
according to the mode (MSBs for a 32-bit configuration,
first one for a 16-bit configuration).
This parameter must be a number between Min_Data = 0x0000U and Max_Data = 0xFFFFU */
uint32_t FilterMaskIdLow; /*!< Specifies the filter mask number or identification number,
according to the mode (LSBs for a 32-bit configuration,
second one for a 16-bit configuration).
This parameter must be a number between Min_Data = 0x0000U and Max_Data = 0xFFFFU */
uint32_t FilterFIFOAssignment; /*!< Specifies the FIFO (0 or 1) which will be assigned to the filter.
This parameter can be a value of @ref CAN_filter_FIFO */
uint32_t FilterNumber; /*!< Specifies the filter which will be initialized.
This parameter must be a number between Min_Data = 0 and Max_Data = 27 */
uint32_t FilterMode; /*!< Specifies the filter mode to be initialized.
This parameter can be a value of @ref CAN_filter_mode */
uint32_t FilterScale; /*!< Specifies the filter scale.
This parameter can be a value of @ref CAN_filter_scale */
uint32_t FilterActivation; /*!< Enable or disable the filter.
This parameter can be set to ENABLE or DISABLE. */
uint32_t BankNumber; /*!< Select the start slave bank filter.
This parameter must be a number between Min_Data = 0 and Max_Data = 28 */
* @brief CAN filter configuration structure definition
*/
typedef struct
{
uint32_t FilterIdHigh; /*!< Specifies the filter identification number (MSBs for a 32-bit
configuration, first one for a 16-bit configuration).
This parameter must be a number between Min_Data = 0x0000U and Max_Data = 0xFFFFU */
uint32_t FilterIdLow; /*!< Specifies the filter identification number (LSBs for a 32-bit
configuration, second one for a 16-bit configuration).
This parameter must be a number between Min_Data = 0x0000U and Max_Data = 0xFFFFU */
uint32_t FilterMaskIdHigh; /*!< Specifies the filter mask number or identification number,
according to the mode (MSBs for a 32-bit configuration,
first one for a 16-bit configuration).
This parameter must be a number between Min_Data = 0x0000U and Max_Data = 0xFFFFU */
uint32_t FilterMaskIdLow; /*!< Specifies the filter mask number or identification number,
according to the mode (LSBs for a 32-bit configuration,
second one for a 16-bit configuration).
This parameter must be a number between Min_Data = 0x0000U and Max_Data = 0xFFFFU */
uint32_t FilterFIFOAssignment; /*!< Specifies the FIFO (0 or 1) which will be assigned to the filter.
This parameter can be a value of @ref CAN_filter_FIFO */
uint32_t FilterNumber; /*!< Specifies the filter which will be initialized.
This parameter must be a number between Min_Data = 0 and Max_Data = 27 */
uint32_t FilterMode; /*!< Specifies the filter mode to be initialized.
This parameter can be a value of @ref CAN_filter_mode */
uint32_t FilterScale; /*!< Specifies the filter scale.
This parameter can be a value of @ref CAN_filter_scale */
uint32_t FilterActivation; /*!< Enable or disable the filter.
This parameter can be set to ENABLE or DISABLE. */
uint32_t BankNumber; /*!< Select the start slave bank filter.
This parameter must be a number between Min_Data = 0 and Max_Data = 28 */
}CAN_FilterConfTypeDef;
sFilterConfig.FilterNumber = m; //……【1】
sFilterConfig.BankNumber = n; //……【2】
第【1】句代码就是选择某过滤器组进行初始化并配置接收过滤器。对于双CAN产品,m的值为0到27。对于单CAN产品而言,m的值为0~13。
第【2】句代码针对双CAN的STM32产品,配置CAN2可使用的过滤器组的起始编号,n取值范围为0~28.从编号为n的过滤器组到编号为27的过滤器组分配给CAN2使用。通过配置寄存器CAN2SB[5:0]@CAN_FRM确定。如果第【2】句配置不在代码中明确写出来,默认值就是14. 即硬件默认将编号为14起往后的过滤器组分配给CAN2使用。
0 0
- stm32 can 滤波器CAN_FilterConfTypeDef 之BankNumber
- STM32 CAN通信 滤波器配置总结
- STM32 CAN通信 滤波器配置总结
- 基于STM32的CAN网络开发笔记之滤波器配置和ID设置
- STM32之CAN控制器
- CAN滤波器
- STM32之CAN ---CAN ID过滤器分析
- STM32之CAN ---CAN ID过滤器分析
- STM32之CAN--CAN ID过滤器分析
- STM32之CAN ---CAN ID过滤器分析
- STM32之CAN ---CAN ID过滤器分析
- STM32之CAN ---CAN ID过滤器分析
- STM32之CAN ---CAN ID过滤器分析
- STM32之CAN ---CAN ID过滤器分析
- STM32之CAN ---CAN ID过滤器分析
- STM32之CAN ---CAN ID过滤器分析
- STM32之CAN ---CAN ID过滤器分析
- STM32之CAN ---CAN ID过滤器分析
- Sphinx参考手册(七)
- Android判断网络是否可用的方法
- Eclipse Ctrl+Alt 快捷键失效,解决办法
- HTTPClient4.5.2学习笔记(四): HTTP 身份认证
- 解决域名被封锁
- stm32 can 滤波器CAN_FilterConfTypeDef 之BankNumber
- 我的Android下拉刷新框架KKRefreshLayout
- JavaScript
- js 实现 Base64 编码的相互转换
- redis 备份删除
- C 输入数字,输出汉字
- chrome调试ionic2 App
- Machine Learning——Norm regularization(范数正则化L0、L1、L2)
- Android 源码查看错误 throw new RuntimeException("Stub!")