/**
**********************************************************************************************************************
* @file stm32h7rsxx_hal_i3c.c
* @author MCD Application Team
* @brief I3C HAL module driver.
* This file provides firmware functions to manage the following
* functionalities of the Improvement Inter Integrated Circuit (I3C) peripheral:
* + Initialization and de-initialization functions
* + IO operation functions
* + Peripheral State and Errors functions
*
**********************************************************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
**********************************************************************************************************************
@verbatim
======================================================================================================================
##### How to use this driver #####
======================================================================================================================
[..]
The I3C HAL driver can be used as follows:
(#) Declare a I3C_HandleTypeDef handle structure, for example:
I3C_HandleTypeDef hi3c;
(#) Declare a I3C_XferTypeDef transfer descriptor structure, for example:
I3C_XferTypeDef ContextBuffers;
(#)Initialize the I3C low level resources by implementing the HAL_I3C_MspInit() API:
(##) Enable the I3Cx interface clock
(##) I3C pins configuration
(+++) Enable the clock for the I3C GPIOs
(+++) Configure I3C pins as alternate function push-pull with no-pull
(##) NVIC configuration if you need to use interrupt process
(+++) Configure the I3Cx interrupt priority
(+++) Enable the NVIC I3C IRQ Channel
(##) DMA Configuration if you need to use DMA process
(+++) Declare a DMA_HandleTypeDef handle structure for
the Command Common Code (CCC) management channel
(+++) Declare a DMA_HandleTypeDef handle structure for
the transmit channel
(+++) Declare a DMA_HandleTypeDef handle structure for
the receive channel
(+++) Declare a DMA_HandleTypeDef handle structure for
the status channel
(+++) Enable the DMAx interface clock
(+++) Configure the DMA handle parameters
(+++) Configure the DMA Command Common Code (CCC) channel
(+++) Configure the DMA Tx channel
(+++) Configure the DMA Rx channel
(+++) Configure the DMA Status channel
(+++) Associate the initialized DMA handle to the hi3c DMA CCC, Tx, Rx or Status handle as necessary
(+++) Configure the priority and enable the NVIC for the transfer complete interrupt on
the DMA CCC, Tx, Rx or Status instance
(#) Configure the HAL I3C Communication Mode as Controller or Target in the hi3c Init structure.
(#) Configure the Controller Communication Bus characterics for Controller mode.
This mean, configure the parameters SDAHoldTime, WaitTime, SCLPPLowDuration,
SCLI3CHighDuration, SCLODLowDuration, SCLI2CHighDuration, BusFreeDuration,
BusIdleDuration in the LL_I3C_CtrlBusConfTypeDef structure through h3c Init structure.
(#) Configure the Target Communication Bus characterics for Target mode.
This mean, configure the parameter BusAvailableDuration in the LL_I3C_TgtBusConfTypeDef structure
through h3c Init structure.
All these parameters for Controller or Target can be configured directly in user code or
by using CubeMx generation.
To help the computation of the different parameters, the recommendation is to use CubeMx.
Those parameters can be modified after the hi3c initialization by using
HAL_I3C_Ctrl_BusCharacteristicConfig() for controller and
HAL_I3C_Tgt_BusCharacteristicConfig() for target.
(#) Initialize the I3C registers by calling the HAL_I3C_Init(), configures also the low level Hardware
(GPIO, CLOCK, NVIC...etc) by calling the customized HAL_I3C_MspInit(&hi3c) API.
(#) Configure the different FIFO parameters in I3C_FifoConfTypeDef structure as RxFifoThreshold, TxFifoThreshold
for Controller or Target mode.
And enable/disable the Control or Status FIFO only for Controller Mode.
Use HAL_I3C_SetConfigFifo() function to finalize the configuration, and HAL_I3C_GetConfigFifo() to retrieve
FIFO configuration.
Possibility to clear the FIFO configuration by using HAL_I3C_ClearConfigFifo() which reset the configuration
FIFO to their default hardware value
(#) Configure the different additional Controller configuration in I3C_CtrlConfTypeDef structure as DynamicAddr,
StallTime, HotJoinAllowed, ACKStallState, CCCStallState, TxStallState, RxStallState, HighKeeperSDA.
Use HAL_I3C_Ctrl_Config() function to finalize the Controller configuration.
(#) Configure the different additional Target configuration in I3C_TgtConfTypeDef structure as Identifier,
MIPIIdentifier, CtrlRoleRequest, HotJoinRequest, IBIRequest, IBIPayload, IBIPayloadSize, MaxReadDataSize,
MaxWriteDataSize, CtrlCapability, GroupAddrCapability, DataTurnAroundDuration, MaxReadTurnAround,
MaxDataSpeed, MaxSpeedLimitation, HandOffActivityState, HandOffDelay, PendingReadMDB.
Use HAL_I3C_Tgt_Config() function to finalize the Target configuration.
(#) Before initiate any IO operation, the application must launch an assignment of the different
Target dynamic address by using HAL_I3C_Ctrl_DynAddrAssign() in polling mode or
HAL_I3C_Ctrl_DynAddrAssign_IT() in interrupt mode.
This procedure is named Enter Dynamic Address Assignment (ENTDAA CCC command).
For the initiation of ENTDAA procedure from the controller, each target connected and powered on the I3C bus
must repond to this particular Command Common Code by sending its proper Payload (a amount of 48bits which
contain the target characteristics)
Each time a target responds to ENTDAA sequence, the application is informed through
HAL_I3C_TgtReqDynamicAddrCallback() of the reception of the target paylaod.
And then application must send a associated dynamic address through HAL_I3C_Ctrl_SetDynAddr().
This procedure in loop automatically in hardware side until a target respond to repeated ENTDAA sequence.
The application is informed of the end of the procedure at reception of HAL_I3C_CtrlDAACpltCallback().
Then application can easily retrieve ENTDAA payload information through HAL_I3C_Get_ENTDAA_Payload_Info()
function.
At the end of procedure, the function HAL_I3C_Ctrl_ConfigBusDevices() must be called to store in hardware
register part the target capabilities as Dynamic address, IBI support with or without additional data byte,
Controller role request support, Controller stop transfer after IBI through I3C_DeviceConfTypeDef structure.
(#) Other action to be done, before initiate any IO operation, the application must prepare the different frame
descriptor with its associated buffer allocation in their side.
Configure the different information related to CCC transfer through I3C_CCCTypeDef structure
Configure the different informati
没有合适的资源?快使用搜索试试~ 我知道了~
STM32H7R实现FreeRTOS队列集操作【支持STM32H7R系列】
共305个文件
h:160个
c:136个
txt:2个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 70 浏览量
2024-07-08
23:31:12
上传
评论
收藏 2.32MB ZIP 举报
温馨提示
STM32H7R系列FreeRTOS操作系统实战,代码可直接编译运行~
资源推荐
资源详情
资源评论
收起资源包目录
STM32H7R实现FreeRTOS队列集操作【支持STM32H7R系列】 (305个子文件)
keilkill.bat 447B
stm32h7rsxx_hal_i3c.c 358KB
stm32h7rsxx_hal_cryp.c 290KB
stm32h7rsxx_hal_tim.c 265KB
stm32h7rsxx_hal_i2c.c 256KB
tasks.c 222KB
stm32h7rsxx_hal_mmc.c 191KB
stm32h7rsxx_hal_dma_ex.c 172KB
stm32h7rsxx_hal_uart.c 166KB
stm32h7rsxx_hal_adc.c 150KB
stm32h7rsxx_hal_jpeg.c 144KB
stm32h7rsxx_hal_usart.c 135KB
stm32h7rsxx_hal_smartcard.c 128KB
stm32h7rsxx_hal_sd.c 128KB
stm32h7rsxx_hal_fdcan.c 123KB
queue.c 123KB
stm32h7rsxx_hal_lptim.c 120KB
stm32h7rsxx_hal_spi.c 119KB
stm32h7rsxx_hal_tim_ex.c 118KB
stm32h7rsxx_hal_eth.c 117KB
stm32h7rsxx_hal_rcc_ex.c 116KB
stm32h7rsxx_hal_xspi.c 116KB
stm32h7rsxx_hal_pka.c 109KB
stm32h7rsxx_hal_irda.c 107KB
stm32h7rsxx_hal_hash.c 107KB
stm32h7rsxx_hal_smbus.c 97KB
stm32h7rsxx_hal_adc_ex.c 96KB
stm32h7rsxx_hal_sai.c 93KB
stm32h7rsxx_hal_rtc_ex.c 91KB
stm32h7rsxx_hal_i2s.c 88KB
stm32h7rsxx_hal_rtc.c 82KB
stm32h7rsxx_hal_rcc.c 76KB
stm32h7rsxx_hal_dma2d.c 76KB
stm32h7rsxx_hal_nand.c 73KB
stm32h7rsxx_hal_ltdc.c 73KB
stm32h7rsxx_hal_dcmipp.c 72KB
stm32h7rsxx_hal_mdf.c 70KB
stm32h7rsxx_hal_gfxtim.c 68KB
stm32h7rsxx_ll_dma.c 65KB
stm32h7rsxx_ll_usb.c 64KB
stm32h7rsxx_hal_pcd.c 63KB
stm32h7rsxx_hal_pssi.c 62KB
stm32h7rsxx_hal_dma.c 60KB
stm32h7rsxx_ll_sdmmc.c 60KB
stm32h7rsxx_ll_rcc.c 58KB
stm32h7rsxx_hal_spdifrx.c 57KB
stm32h7rsxx_ll_tim.c 56KB
stm32h7rsxx_hal_hcd.c 55KB
sys.c 54KB
stm32h7rsxx_hal_pwr_ex.c 54KB
stm32h7rsxx_hal.c 54KB
stream_buffer.c 53KB
stm32h7rsxx_hal_nor.c 52KB
timers.c 49KB
stm32h7rsxx_ll_adc.c 49KB
stm32h7rsxx_hal_cordic.c 46KB
stm32h7rsxx_hal_sdram.c 44KB
lcd.c 42KB
stm32h7rsxx_ll_fmc.c 40KB
stm32h7rsxx_hal_flash_ex.c 40KB
lcd_ex.c 40KB
stm32h7rsxx_ll_spi.c 38KB
stm32h7rsxx_hal_sram.c 38KB
stm32h7rsxx_hal_uart_ex.c 37KB
stm32h7rsxx_ll_utils.c 36KB
stm32h7rsxx_hal_dts.c 34KB
port.c 33KB
stm32h7rsxx_hal_cryp_ex.c 33KB
stm32h7rsxx_hal_cec.c 32KB
stm32h7rsxx_hal_rng.c 32KB
stm32h7rsxx_hal_mce.c 32KB
event_groups.c 31KB
stm32h7rsxx_hal_ramecc.c 31KB
stm32h7rsxx_ll_rtc.c 30KB
stm32h7rsxx_hal_gfxmmu.c 29KB
stm32h7rsxx_hal_mdios.c 28KB
stm32h7rsxx_hal_flash.c 28KB
stm32h7rsxx_hal_eth_ex.c 27KB
stm32h7rsxx_ll_dma2d.c 26KB
stm32h7rsxx_hal_pwr.c 26KB
stm32h7rsxx_hal_gpu2d.c 24KB
stm32h7rsxx_hal_cortex.c 22KB
heap_5.c 21KB
stm32h7rsxx_hal_gpio.c 20KB
heap_4.c 19KB
stm32h7rsxx_ll_usart.c 19KB
stm32h7rsxx_hal_exti.c 18KB
stm32h7rsxx_hal_iwdg.c 18KB
stm32h7rsxx_hal_crc.c 17KB
stm32h7rsxx_hal_icache.c 16KB
stm32h7rsxx_hal_smartcard_ex.c 16KB
stm32h7rsxx_hal_usart_ex.c 16KB
croutine.c 16KB
stm32h7rsxx_hal_wwdg.c 15KB
stm32h7rsxx_hal_mmc_ex.c 14KB
stm32h7rsxx_util_i3c.c 14KB
heap_2.c 13KB
stm32h7rsxx_hal_sd_ex.c 12KB
stm32h7rsxx_ll_lpuart.c 12KB
stm32h7rsxx_ll_exti.c 12KB
共 305 条
- 1
- 2
- 3
- 4
资源评论
不脱发的程序猿
- 粉丝: 26w+
- 资源: 5887
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 核电不锈钢联箱斜45° 三通管的焊接变形控制 - .pdf
- 基于InsightFace的人脸识别全部资料+详细文档+高分项目.zip
- 核电厂反应堆压力容器接管与安全端焊接工艺 - .pdf
- 核电低压外缸与凝汽器喉部焊接变形控制- .pdf
- 核电管系的焊接自动化研究- .pdf
- 核电汽轮机焊接转子技术发展综述- .pdf
- 核电用板20HR的焊接工艺 - .pdf
- 核电站稳压器设备安全端焊接技术.pdf
- 核电站一回路主承压设备的工作条件及其焊接的质量控制 - .pdf
- 核电站水池不锈钢覆面泄漏检测及其焊接修复技术 - .pdf
- 核级阀门焊接质量控制.pdf
- 基于micropython的轻量级GUI库 供嵌入式使用详细文档+全部资料.zip
- 核用A508-III钢焊接材料的研制及应用 - .pdf
- 红沿河核电机组低压五级隔板焊接变形控制- .pdf
- 厚板钢结构焊接裂纹控制措施.pdf
- 厚板焊接残余应力的试验研究.pdf
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功