没有合适的资源?快使用搜索试试~ 我知道了~
首页STM32F4xx HAL库驱动程序介绍
STM32F4xx HAL库驱动程序介绍

"STM32 HAL库函数手册详细介绍了STM32F4xx系列微控制器的硬件抽象层(HAL)驱动程序,是STM32Cube生态系统的一部分,旨在简化开发者的工作,减少开发时间并降低成本。STM32Cube包括STM32CubeMX配置工具和一系列的嵌入式软件平台。
STM32CubeMX是一个图形化的软件配置工具,它通过图形向导生成C语言初始化代码,帮助开发者快速设置微控制器的各种参数,如时钟配置、外设连接等。这个工具极大地简化了项目启动阶段的工作。
STM32Cube平台按照系列提供,例如STM32CubeF4对应STM32F4系列。其中的核心部分是STM32CubeHAL,这是一个抽象层软件,确保了STM32产品线间的最大可移植性。STM32CubeHAL提供了一套通用的、多实例的简单应用编程接口(API),使得上层的应用、库和协议栈可以与硬件进行交互,而无需深入理解底层硬件细节。
此外,STM32Cube还包括一套完整的中间件组件,如实时操作系统(RTOS)、USB、TCP/IP协议栈、图形库等。这些中间件组件与嵌入式软件工具一起,提供了丰富的示例代码,帮助开发者快速实现各种功能。
HAL驱动层的设计基于通用架构,由基本API和扩展API组成。这种设计允许中间件层在不关心底层硬件实现的情况下,实现其功能。HAL库的主要优点在于其模块化和可扩展性,允许开发者轻松地添加或修改功能,同时保持代码的整洁和可维护性。
STM32Cube的这套解决方案不仅提供了强大的驱动支持,还强调了代码的可移植性和一致性,使得开发者能够在STM32的不同系列产品间轻松迁移项目。这对于拥有多个项目或需要跨不同硬件平台工作的团队来说,具有显著的价值。
总结来说,STM32F4xx的HAL库函数手册是STM32开发者的重要参考资料,它详细阐述了如何使用HAL库与STM32微控制器进行通信,以及如何利用STM32Cube生态系统中的其他工具和资源来优化开发流程。通过学习和掌握HAL库,开发者可以更高效地利用STM32的硬件特性,开发出功能丰富且易于维护的嵌入式系统。

Contents UM1725
16/1015 DOCID025834 Rev 3
22.3.3 Extended programming operation functions ...................................... 368
22.3.4 HAL_FLASHEx_Erase ....................................................................... 369
22.3.5 HAL_FLASHEx_Erase_IT .................................................................. 369
22.3.6 HAL_FLASHEx_OBProgram ............................................................. 369
22.3.7 HAL_FLASHEx_OBGetConfig ........................................................... 369
22.3.8 HAL_FLASHEx_AdvOBProgram ....................................................... 370
22.3.9 HAL_FLASHEx_AdvOBGetConfig ..................................................... 370
22.3.10 HAL_FLASHEx_OB_SelectPCROP ................................................. 370
22.3.11 HAL_FLASHEx_OB_DeSelectPCROP ............................................. 371
22.3.12 HAL_FLASHEx_OB_GetBank2WRP ................................................ 371
22.4 FLASHEx Firmware driver defines .................................................... 371
22.4.1 FLASHEx ............................................................................................ 371
23
HAL FLASH__RAMFUNC Generic Driver ...................................... 376
23.1 HAL FLASH__RAMFUNC Generic Driver ......................................... 376
23.2 FLASH__RAMFUNC Firmware driver API description ...................... 376
23.2.1 APIs executed from Internal RAM ...................................................... 376
23.2.2 ramfunc functions ............................................................................... 376
23.2.3 HAL_FLASHEx_StopFlashInterfaceClk ............................................. 376
23.2.4 HAL_FLASHEx_StartFlashInterfaceClk ............................................. 376
23.2.5 HAL_FLASHEx_EnableFlashSleepMode .......................................... 377
23.2.6 HAL_FLASHEx_DisableFlashSleepMode ......................................... 377
23.3 FLASH__RAMFUNC Firmware driver defines ................................... 377
23.3.1 FLASH__RAMFUNC .......................................................................... 377
24
HAL FMPI2C Generic Driver ........................................................... 377
24.1 HAL FMPI2C Generic Driver ............................................................. 377
24.2 FMPI2C Firmware driver registers structures .................................... 377
24.2.1 FMPI2C_InitTypeDef .......................................................................... 377
24.2.2 FMPI2C_HandleTypeDef ................................................................... 378
24.3 FMPI2C Firmware driver API description ..................................................... 379
24.3.1 Initialization and de-initialization functions ......................................... 379
24.3.2 IO operation functions ........................................................................ 379
24.3.3 Peripheral State and Errors functions ................................................ 381
24.3.4 HAL_FMPI2C_Init .............................................................................. 381
24.3.5 HAL_FMPI2C_DeInit ......................................................................... 381
24.3.6 HAL_FMPI2C_MspInit ....................................................................... 382
24.3.7 HAL_FMPI2C_MspDeInit ................................................................... 382
24.3.8 HAL_FMPI2C_Master_Transmit ........................................................ 382
24.3.9 HAL_FMPI2C_Master_Receive ......................................................... 382
24.3.10 HAL_FMPI2C_Slave_Transmit ......................................................... 383
24.3.11 HAL_FMPI2C_Slave_Receive .......................................................... 383
24.3.12 HAL_FMPI2C_Master_Transmit_IT.................................................. 384
24.3.13 HAL_FMPI2C_Master_Receive_IT .................................... 384
24.3.14 HAL_FMPI2C_Slave_Transmit_IT ...................................... 384
24.3.15 HAL_FMPI2C_Slave_Receive_IT .................................................... 385

UM1725 Contents
DOCID025834
Rev
3
17
/
1015
24.3.16 HAL_FMPI2C_Master_Transmit_DMA ............................................. 385
24.3.17 HAL_FMPI2C_Master_Receive_DMA .............................................. 385
24.3.18 HAL_FMPI2C_Slave_Transmit_DMA ............................................... 386
24.3.19 HAL_FMPI2C_Slave_Receive_DMA ................................................ 386
24.3.20 HAL_FMPI2C_Mem_Write ............................................................... 386
24.3.21 HAL_FMPI2C_Mem_Read ............................................................... 387
24.3.22 HAL_FMPI2C_Mem_Write_IT .......................................................... 387
24.3.23 HAL_FMPI2C_Mem_Read_IT .......................................................... 388
24.3.24 HAL_FMPI2C_Mem_Write_DMA ..................................................... 388
24.3.25 HAL_FMPI2C_Mem_Read_DMA ..................................................... 388
24.3.26 HAL_FMPI2C_IsDeviceReady ......................................................... 389
24.3.27 HAL_FMPI2C_EV_IRQHandler ........................................................ 389
24.3.28 HAL_FMPI2C_ER_IRQHandler ........................................................ 389
24.3.29 HAL_FMPI2C_MasterTxCpltCallback .............................................. 390
24.3.30 HAL_FMPI2C_MasterRxCpltCallback .............................................. 390
24.3.31 HAL_FMPI2C_SlaveTxCpltCallback ................................................ 390
24.3.32 HAL_FMPI2C_SlaveRxCpltCallback ................................................ 390
24.3.33 HAL_FMPI2C_MemTxCpltCallback ................................................. 391
24.3.34 HAL_FMPI2C_MemRxCpltCallback ................................................. 391
24.3.35 HAL_FMPI2C_ErrorCallback ............................................................ 391
24.3.36 HAL_FMPI2C_GetState ................................................................... 391
24.3.37 HAL_FMPI2C_GetError .................................................................... 391
24.4 FMPI2C Firmware driver defines ....................................................... 392
24.4.1 FMPI2C .............................................................................................. 392
25
HAL FMPI2C Extension Driver ....................................................... 398
25.1 HAL FMPI2C Extension Driver .......................................................... 398
25.2 FMPI2CEx Firmware driver API description....................................... 398
25.2.1 Extension features functions .............................................................. 398
25.2.2 HAL_FMPI2CEx_AnalogFilter_Config ............................................... 398
25.2.3 HAL_FMPI2CEx_DigitalFilter_Config ................................................ 398
25.2.4 HAL_FMPI2CEx_EnableWakeUp ...................................................... 398
25.2.5 HAL_FMPI2CEx_DisableWakeUp ..................................................... 399
25.2.6 HAL_FMPI2CEx_EnableFastModePlus............................................. 399
25.2.7 HAL_FMPI2CEx_DisableFastModePlus ............................................ 399
25.3 FMPI2CEx Firmware driver defines ................................................... 399
25.3.1 FMPI2CEx .......................................................................................... 399
26
HAL GPIO Generic Driver ............................................................... 400
26.1 HAL GPIO Generic Driver .................................................................. 400
26.2 GPIO Firmware driver registers structures ........................................ 400
26.2.1 GPIO_InitTypeDef .............................................................................. 400
26.3 GPIO Firmware driver API description ............................................... 400

Contents UM1725
18/1015 DOCID025834 Rev 3
26.3.1 GPIO Peripheral features ................................................................... 400
26.3.2 How to use this driver ......................................................................... 401
26.3.3 Initialization and de-initialization functions ......................................... 401
26.3.4 IO operation functions ........................................................................ 402
26.3.5 HAL_GPIO_Init ................................................................................... 402
26.3.6 HAL_GPIO_DeInit .............................................................................. 402
26.3.7 HAL_GPIO_ReadPin.......................................................................... 402
26.3.8 HAL_GPIO_WritePin .......................................................................... 403
26.3.9 HAL_GPIO_TogglePin........................................................................ 403
26.3.10 HAL_GPIO_LockPin ......................................................................... 403
26.3.11 HAL_GPIO_EXTI_IRQHandler ......................................................... 404
26.3.12 HAL_GPIO_EXTI_Callback .............................................................. 404
26.4 GPIO Firmware driver defines ........................................................... 404
26.4.1 GPIO .................................................................................................. 404
27
HAL GPIO Extension Driver ........................................................... 409
27.1 HAL GPIO Extension Driver .............................................................. 409
27.2 GPIOEx Firmware driver defines ....................................................... 409
27.2.1 GPIOEx .............................................................................................. 409
28
HAL HASH Generic Driver .............................................................. 410
28.1 HAL HASH Generic Driver ................................................................. 410
28.2 HASH Firmware driver registers structures ....................................... 410
28.2.1 HASH_InitTypeDef ............................................................................. 410
28.2.2 HASH_HandleTypeDef ...................................................................... 410
28.3 HASH Firmware driver API description .............................................. 411
28.3.1 How to use this driver .......................................................................... 411
28.3.2 HASH processing using polling mode functions ................................ 412
28.3.3 HASH processing using interrupt mode functions ............................. 412
28.3.4 HASH processing using DMA mode functions ................................... 412
28.3.5 HMAC processing using polling mode functions ................................ 413
28.3.6 HMAC processing using DMA mode functions .................................. 413
28.3.7 Peripheral State functions .................................................................. 413
28.3.8 Initialization and de-initialization functions ......................................... 413
28.3.9 HAL_HASH_MD5_Start ..................................................................... 414
28.3.10 HAL_HASH_MD5_Accumulate ......................................................... 414
28.3.11 HAL_HASH_SHA1_Start .................................................................. 414
28.3.12 HAL_HASH_SHA1_Accumulate ....................................................... 415
28.3.13 HAL_HASH_MD5_Start_IT ............................................................... 415
28.3.14 HAL_HASH_SHA1_Start_IT ............................................................. 415
28.3.15 HAL_HASH_IRQHandler .................................................................. 416
28.3.16 HAL_HMAC_SHA1_Start .................................................................. 416
28.3.17 HAL_HMAC_MD5_Start ................................................................... 416
28.3.18 HAL_HASH_MD5_Start_DMA .......................................................... 417
28.3.19 HAL_HASH_MD5_Finish .................................................... 417
28.3.20 HAL_HASH_SHA1_Start_DMA ........................................................ 417
28.3.21 HAL_HASH_SHA1_Finish ................................................................ 418

UM1725 Contents
DOCID025834
Rev
3
19
/
1015
28.3.22 HAL_HASH_SHA1_Start_IT ............................................................. 418
28.3.23 HAL_HASH_MD5_Start_IT ............................................................... 418
28.3.24 HAL_HMAC_MD5_Start ................................................................... 419
28.3.25 HAL_HMAC_SHA1_Start .................................................................. 420
28.3.26 HAL_HASH_SHA1_Start_DMA ........................................................ 420
28.3.27 HAL_HASH_SHA1_Finish ................................................................ 420
28.3.28 HAL_HASH_MD5_Start_DMA .......................................................... 421
28.3.29 HAL_HASH_MD5_Finish .................................................................. 421
28.3.30 HAL_HMAC_MD5_Start_DMA ......................................................... 421
28.3.31 HAL_HMAC_SHA1_Start_DMA ....................................................... 421
28.3.32 HAL_HASH_GetState ....................................................................... 422
28.3.33 HAL_HASH_IRQHandler .................................................................. 422
28.3.34 HAL_HASH_Init ................................................................................ 422
28.3.35 HAL_HASH_DeInit ............................................................................ 422
28.3.36 HAL_HASH_MspInit .......................................................................... 423
28.3.37 HAL_HASH_MspDeInit ..................................................................... 424
28.3.38 HAL_HASH_InCpltCallback .............................................................. 424
28.3.39 HAL_HASH_ErrorCallback ............................................................... 424
28.3.40 HAL_HASH_DgstCpltCallback ......................................................... 424
28.3.41 HAL_HASH_GetState ....................................................................... 425
28.3.42 HAL_HASH_MspInit .......................................................................... 425
28.3.43 HAL_HASH_MspDeInit ..................................................................... 425
28.3.44 HAL_HASH_InCpltCallback .............................................................. 425
28.3.45 HAL_HASH_DgstCpltCallback ......................................................... 425
28.3.46 HAL_HASH_ErrorCallback ............................................................... 426
28.4 HASH Firmware driver defines .......................................................... 426
28.4.1 HASH ................................................................................................. 426
29
HAL HASH Extension Driver .......................................................... 430
29.1 HAL HASH Extension Driver ............................................................. 430
29.2 HASHEx Firmware driver API description .......................................... 430
29.2.1 How to use this driver ......................................................................... 430
29.2.2 HASH processing using polling mode functions ................................ 431
29.2.3 HMAC processing using polling mode functions ................................ 431
29.2.4 HASH processing using interrupt functions........................................ 431
29.2.5 HASH processing using DMA functions ............................................. 431
29.2.6 HMAC processing using DMA functions ............................................ 432
29.2.7 HAL_HASHEx_SHA224_Start ........................................................... 432
29.2.8 HAL_HASHEx_SHA256_Start ........................................................... 432
29.2.9 HAL_HASHEx_SHA224_Accumulate ................................................ 433
29.2.10 HAL_HASHEx_SHA256_Accumulate ............................................... 434
29.2.11 HAL_HMACEx_SHA224_Start .......................................................... 434
29.2.12 HAL_HMACEx_SHA256_Start ......................................................... 434
29.2.13 HAL_HASHEx_SHA224_Start_IT ..................................................... 435
29.2.14 HAL_HASHEx_SHA256_Start_IT ..................................................... 435

Contents UM1725
20/1015 DOCID025834 Rev 3
29.2.15 HAL_HASHEx_IRQHandler .............................................................. 436
29.2.16 HAL_HASHEx_SHA224_Start_DMA ................................................ 436
29.2.17 HAL_HASHEx_SHA224_Finish ........................................................ 436
29.2.18 HAL_HASHEx_SHA256_Start_DMA ................................................ 436
29.2.19 HAL_HASHEx_SHA256_Finish ........................................................ 437
29.2.20 HAL_HMACEx_SHA224_Start_DMA ............................................... 438
29.2.21 HAL_HMACEx_SHA256_Start_DMA ............................................... 438
29.2.22 HAL_HASHEx_SHA224_Start .......................................................... 438
29.2.23 HAL_HASHEx_SHA256_Start .......................................................... 439
29.2.24 HAL_HASHEx_SHA224_Accumulate ............................................... 439
29.2.25 HAL_HASHEx_SHA256_Accumulate ............................................... 439
29.2.26 HAL_HMACEx_SHA224_Start ......................................................... 440
29.2.27 HAL_HMACEx_SHA256_Start ......................................................... 440
29.2.28 HAL_HASHEx_SHA224_Start_IT ..................................................... 440
29.2.29 HAL_HASHEx_SHA256_Start_IT ..................................................... 441
29.2.30 HAL_HASHEx_SHA224_Start_DMA ................................................ 441
29.2.31 HAL_HASHEx_SHA224_Finish ........................................................ 441
29.2.32 HAL_HASHEx_SHA256_Start_DMA ................................................ 441
29.2.33 HAL_HASHEx_SHA256_Finish ........................................................ 442
29.2.34 HAL_HMACEx_SHA224_Start_DMA ............................................... 442
29.2.35 HAL_HMACEx_SHA256_Start_DMA ............................................... 442
29.2.36 HAL_HASHEx_IRQHandler .............................................................. 443
29.3 HASHEx Firmware driver defines ...................................................... 443
29.3.1 HASHEx ............................................................................................. 443
30
HAL HCD Generic Driver ................................................................ 444
30.1 HAL HCD Generic Driver ................................................................... 444
30.2 HCD Firmware driver registers structures ......................................... 444
30.2.1 HCD_HandleTypeDef ......................................................................... 444
30.3 HCD Firmware driver API description ................................................ 444
30.3.1 How to use this driver ......................................................................... 444
30.3.2 Initialization and de-initialization functions ......................................... 445
30.3.3 IO operation functions ........................................................................ 445
30.3.4 Peripheral Control functions ............................................................... 445
30.3.5 Peripheral State functions .................................................................. 445
30.3.6 HAL_HCD_Init .................................................................................... 446
30.3.7 HAL_HCD_HC_Init ............................................................................. 446
30.3.8 HAL_HCD_HC_Halt ........................................................................... 446
30.3.9 HAL_HCD_DeInit ............................................................................... 446
30.3.10 HAL_HCD_MspInit ............................................................................ 447
30.3.11 HAL_HCD_MspDeInit ....................................................................... 447
30.3.12 HAL_HCD_HC_SubmitRequest ....................................................... 447
30.3.13 HAL_HCD_IRQHandler .................................................................... 447
30.3.14 HAL_HCD_SOF_Callback .................................................. 448
30.3.15 HAL_HCD_Connect_Callback ............................................ 448
30.3.16 HAL_HCD_Disconnect_Callback ...................................................... 448
剩余1014页未读,继续阅读
2828 浏览量
1381 浏览量
604 浏览量
5714 浏览量
277 浏览量
8047 浏览量
1522 浏览量
5454 浏览量
1381 浏览量

lyb1719602121
- 粉丝: 8
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助

最新资源
- AD5421源代码解析及KEIL C编程实现
- 掌握Linux下iTerm2的180种颜色主题技巧
- Struts+JDBC实现增删改查功能的实战教程
- 自动化安全报告工具bountyplz:基于markdown模板的Linux开发解决方案
- 非线性系统中最大李雅普诺夫指数的wolf方法求解
- 网络语言的三大支柱:HTML、CSS与JavaScript
- Android开发新工具:Myeclipse ADT-22插件介绍
- 使用struts2框架实现用户注册与登录功能
- JSP Servlet实现数据的增删查改操作
- RASPnmr:基于开源的蛋白质NMR主链共振快速准确分配
- Jquery颜色选择器插件:轻松自定义网页颜色
- 探索Qt中的STLOBJGCode查看器
- 逻辑门限控制下的ABS算法在汽车防抱死制动系统中的应用研究
- STM32与Protues仿真实例教程:MEGA16 EEPROM项目源码分享
- 深入探索FAT32文件系统:数据结构与读操作实现
- 基于TensorFlow的机器学习车牌识别流程
安全验证
文档复制为VIP权益,开通VIP直接复制
