/**
******************************************************************************
* @file stm32h7xx_hal_fdcan.c
* @author MCD Application Team
* @version V1.2.0
* @date 29-December-2017
* @brief FDCAN HAL module driver.
* This file provides firmware functions to manage the following
* functionalities of the Flexible DataRate Controller Area Network
* (FDCAN) peripheral:
* + Initialization and de-initialization functions
* + IO operation functions
* + Peripheral Configuration and Control functions
* + Peripheral State and Error functions
*
@verbatim
==============================================================================
##### How to use this driver #####
==============================================================================
[..]
(#) Initialize the FDCAN peripheral using HAL_FDCAN_Init function.
(#) If needed , configure the reception filters and optional features using
the following configuration functions:
(++) HAL_FDCAN_ConfigClockCalibration
(++) HAL_FDCAN_ConfigFilter
(++) HAL_FDCAN_ConfigGlobalFilter
(++) HAL_FDCAN_ConfigExtendedIdMask
(++) HAL_FDCAN_ConfigRxFifoOverwrite
(++) HAL_FDCAN_ConfigFifoWatermark
(++) HAL_FDCAN_ConfigRamWatchdog
(++) HAL_FDCAN_ConfigTimestampCounter
(++) HAL_FDCAN_EnableTimestampCounter
(++) HAL_FDCAN_DisableTimestampCounter
(++) HAL_FDCAN_ConfigTimeoutCounter
(++) HAL_FDCAN_EnableTimeoutCounter
(++) HAL_FDCAN_DisableTimeoutCounter
(++) HAL_FDCAN_ConfigTxDelayCompensation
(++) HAL_FDCAN_EnableTxDelayCompensation
(++) HAL_FDCAN_DisableTxDelayCompensation
(++) HAL_FDCAN_TT_ConfigOperation
(++) HAL_FDCAN_TT_ConfigReferenceMessage
(++) HAL_FDCAN_TT_ConfigTrigger
(#) Start the FDCAN module using HAL_FDCAN_Start function. At this level
the node is active on the bus: it can send and receive messages.
(#) The following Tx control functions can only be called when the FDCAN
module is started:
(++) HAL_FDCAN_AddMessageToTxFifoQ
(++) HAL_FDCAN_EnableTxBufferRequest
(++) HAL_FDCAN_AbortTxRequest
(#) When a message is received into the FDCAN message RAM, it can be
retrieved using the HAL_FDCAN_GetRxMessage function.
(#) Calling the HAL_FDCAN_Stop function stops the FDCAN module by entering
it to initialization mode and re-enabling access to configuration
registers through the configuration functions listed here above.
(#) All other control functions can be called any time after initialization
phase, no matter if the FDCAN module is started or stoped.
*** Polling mode operation ***
==============================
[..]
(#) Reception and transmission states can be monitored via the following
functions:
(++) HAL_FDCAN_IsRxBufferMessageAvailable
(++) HAL_FDCAN_IsTxBufferMessagePending
(++) HAL_FDCAN_GetRxFifoFillLevel
(++) HAL_FDCAN_GetTxFifoFreeLevel
*** Interrupt mode operation ***
================================
[..]
(#) There are two interrupt lines: line 0 and 1.
By default, all interrupts are assigned to line 0. Interrupt lines
can be configured using HAL_FDCAN_ConfigInterruptLines function.
(#) Notifications are activated using HAL_FDCAN_ActivateNotification
function. Then, the process can be controlled through one of the
available user callbacks: HAL_FDCAN_xxxCallback.
@endverbatim
******************************************************************************
* @attention
*
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "fdcan.h"
/** @addtogroup STM32H7xx_HAL_Driver
* @{
*/
/** @defgroup FDCAN FDCAN
* @brief FDCAN HAL module driver
* @{
*/
#ifdef HAL_FDCAN_MODULE_ENABLED
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/** @addtogroup FDCAN_Private_Constants
* @{
*/
#define FDCAN_TIMEOUT_VALUE 10
#define FDCAN_TX_EVENT_FIFO_MASK (FDCAN_IR_TEFL | FDCAN_IR_TEFF | FDCAN_IR_TEFW | FDCAN_IR_TEFN)
#define FDCAN_RX_FIFO0_MASK (FDCAN_IR_RF0L | FDCAN_IR_RF0F | FDCAN_IR_RF0W | FDCAN_IR_RF0N)
#define FDCAN_RX_FIFO1_MASK (FDCAN_IR_RF1L | FDCAN_IR_RF1F | FDCAN_IR_RF1W | FDCAN_IR_RF1N)
#define FDCAN_ERROR_MASK (FDCAN_IR_ELO | FDCAN_IR_EP | FDCAN_IR_EW | FDCAN_IR_BO | \
FDCAN_IR_WDI | FDCAN_IR_PEA | FDCAN_IR_PED | FDCAN_IR_ARA)
#define FDCAN_TT_SCHEDULE_SYNC_MASK (FDCAN_TTIR_SBC | FDCAN_TTIR_SMC | FDCAN_TTIR_CSM | FDCAN_TTIR_SOG)
#define FDCAN_TT_TIME_MARK_MASK (FDCAN_TTIR_RTMI | FDCAN_TTIR_TTMI)
#define FDCAN_TT_GLOBAL_TIME_MASK (FDCAN_TTIR_GTW | FDCAN_TTIR_GTD)
#define FDCAN_TT_DISTURBING_ERROR_MASK (FDCAN_TTIR_GTE | FDCAN_TTIR_TXU | FDCAN_TTIR_TXO | \
FDCAN_TTIR_SE1 | FDCAN_TTIR_SE2 | FDCAN_TTIR_ELC)
#define FDCAN_TT_FATAL_ERROR_MASK (FDCAN_TTIR_IWT | FDCAN_TTIR_WT | FDCAN_TTIR_AW | FDCAN_TTIR_CER)
#define FDCAN_ELEMENT_MASK_STDID ((uint32_t)0x1FFC0000U) /* Standard Identifier */
#define FDCAN_ELEMENT_MASK_EXTID ((uint32_t)0x1FFFFFFFU) /* Extended Identifier */
#define FDCAN_ELEMENT_MASK_RTR ((uint32_t)0x20000000U) /* Remote Transmission Request */
#define FDCAN_ELEMENT_MASK_XTD ((uint32_t)0x40000000U) /* Extended Identifier */
#define FDCAN_ELEMENT_MASK_ESI ((uint32_t)0x80000000U) /* Error State Indicator */
#define FDCAN_ELEMENT_MASK_TS ((uint32_t)0x0000FFFFU) /* Timestamp */
#define FDCAN_ELEMENT_MASK_DLC ((uint32_t)0x000F0000U) /* Data Length Code */
#define FDCAN_ELEMENT_MASK_BRS ((uint32_t)0
没有合适的资源?快使用搜索试试~ 我知道了~
STM32H743驱动NRF24L01 2.4G无线模块实现通信【支持STM32H7系列,寄存器驱动】.zip
共149个文件
h:85个
c:57个
uvoptx:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 72 浏览量
2023-06-26
18:52:23
上传
评论
收藏 876KB ZIP 举报
温馨提示
STM32驱动NRF24L01 2.4G无线模块实现通信。 项目代码可顺利编译运行~
资源推荐
资源详情
资源评论
收起资源包目录
STM32H743驱动NRF24L01 2.4G无线模块实现通信【支持STM32H7系列,寄存器驱动】.zip (149个子文件)
keilkill.bat 399B
stm32h7xx_hal_fdcan.c 166KB
inv_mpu.c 105KB
lcd.c 59KB
inv_mpu_dmp_motion_driver.c 57KB
data_builder.c 45KB
ml_math_func.c 25KB
ltdc.c 19KB
hal_outputs.c 18KB
results_holder.c 16KB
touch.c 15KB
usmart.c 15KB
sys.c 12KB
usmart_str.c 12KB
eMPL_outputs.c 11KB
w25qxx.c 11KB
rtc.c 9KB
gt9147.c 8KB
ft5206.c 8KB
oled.c 8KB
mpu9250.c 7KB
fdcan.c 7KB
gt9271.c 7KB
delay.c 7KB
sdram.c 7KB
storage_manager.c 7KB
24l01.c 7KB
adc.c 6KB
log_stm32.c 6KB
timer.c 6KB
qspi.c 6KB
tpad.c 4KB
remote.c 4KB
usart.c 4KB
mpu.c 4KB
24cxx.c 4KB
ds18b20.c 4KB
ctiic.c 3KB
rs485.c 3KB
spi.c 3KB
start_manager.c 3KB
test.c 3KB
dma.c 3KB
ap3216c.c 3KB
myiic.c 3KB
wkup.c 2KB
wdg.c 2KB
dht11.c 2KB
pcf8574.c 2KB
exti.c 2KB
mpl.c 2KB
message_layer.c 2KB
key.c 2KB
usmart_config.c 1KB
dac.c 1KB
rng.c 1KB
mlmath.c 1KB
led.c 788B
stm32h743xx.h 2.13MB
core_cm7.h 141KB
stm32h7xx_hal_fdcan.h 131KB
font.h 65KB
oledfont.h 34KB
cmsis_armcc.h 25KB
dmpKey.h 19KB
log.h 10KB
mltypes.h 9KB
data_builder.h 9KB
stm32h7xx_hal_def.h 8KB
dmpmap.h 7KB
stm32h7xx.h 6KB
lcd.h 6KB
cmsis_compiler.h 6KB
usmart.h 6KB
inv_mpu.h 5KB
mpu9250.h 5KB
24l01.h 5KB
ml_math_func.h 5KB
sys.h 4KB
system_stm32h7xx.h 4KB
inv_mpu_dmp_motion_driver.h 3KB
usmart_str.h 3KB
touch.h 3KB
ltdc.h 3KB
results_holder.h 3KB
w25qxx.h 3KB
mlmath.h 2KB
mlos.h 2KB
gt9271.h 2KB
ft5206.h 2KB
oled.h 2KB
hal_outputs.h 2KB
gt9147.h 2KB
mpu.h 2KB
mpu.h 2KB
packet.h 2KB
rtc.h 2KB
ctiic.h 1KB
24cxx.h 1KB
myiic.h 1KB
共 149 条
- 1
- 2
资源评论
不脱发的程序猿
- 粉丝: 24w+
- 资源: 5804
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功