STM32F1 HAL库笔记1_HAL 驱动程序概述(2)

1、LL驱动程序概述        

        LL驱动程序旨在提供快速、轻量级、面向专家的层,它比 HAL 更接近硬件。与 HAL 相反,LL API 不适用于以下外设:不需要代码优化的外设,软件配置复杂的外设,复杂的上层堆栈(如 USB)的外设。

        LL 驱动程序特征:

        一组初始化函数,用于根据数据结构中指定的参数初始化外设主要功能

        一组初始化函数,用于用每个字段的重置值填充初始化数据结构

        执行外设去初始化的函数(外设寄存器恢复为默认值)

        一组内联函数,用于直接和原子寄存器访问

        完全独立于 HAL,因为 LL 驱动程序可以在独立模式下使用(无 HAL 驱动程序)或混合模式(有 HAL 驱动程序)

        完全覆盖了支持的外设功能。

        LL驱动程序根据 STM32 外设的可用功能提供硬件服务。这些服务完全反映了硬件功能,并提供必须按照微控制器系列参考手册中描述的编程模型调用的一次性操作。因此, LL 服务不实现任何处理,也不需要任何额外的内存资源来保存其状态、计数器或数据指针:所有操作都是通过更改相关的外设寄存器内容来执行的。

2、LL驱动程序文件

        LL驱动程序是围绕头文件/C 文件(每个支持的外设一个)和五个头文件构建的,用于一些系统和 Cortex 相关功能。

stm32f1xx_ll_bus.h 		//这是用于内核总线控制和外设时钟激活和停用的 h 源文件 示例: LL_AHB2_GRP1_EnableClock 
stm32f1xx_ll_ppp.h/.c 	//stm32f1xx_ll_ppp.c 提供外设初始化功能,如 LL_PPP_Init()、LL_PPP_StructInit()、LL_PPP_DeInit()。所有其他 API 都在 stm32f1xx_ll_ppp.h 文件中定义。底层 PPP 驱动程序是一个独立的模块。要使用它,应用程序必须将其包含在 stm32f1xx_ll_ppp.h 文件中。
stm32f1xx_ll_cortex.h 	//Cortex-M 相关的寄存器操作 API,包括 Systick、低功耗 (LL_SYSTICK_xxxxx LL_LPM_xxxxx “低功耗模式” ..
Version: 2.2.0 (2021-07-22) Keil.STM32F3xx_DFP.2.2.0.pack Updated Pack to STM32Cube_FW_F3 Firmware Package version V1.11.2: Updated HAL to version V1.5.5. External interrupts and events (EXTI) HAL Universal serial bus full-speed device interface (USB) LL Added global define USE_HAL_DRIVER and USE_FULL_LL_DRIVER to the component ::Device:STM32Cube Framework:STM32CubeMX. Added global define USE_HAL_DRIVER and USE_FULL_LL_DRIVER to the component ::Device:STM32Cube HAL:COMMON. STM32CubeMX integration: MX_Device_h.ftl: Updated parsing of USART virtual mode. Updated generation of macros: Added handling for '(' and ')' symbols. FrameworkCubeMX_gpdsc.ftl: Added support for Timebase Source TIMx. Board Examples: Terminating app_main thread with osThreadExit() to avoid endless loop. Updated RTX configuration (CMSIS 5.8.0). Updated template based files (MDK-Middleware 7.13.0). Configured MDK projects to use Arm Compiler 6. Changed Assembler option to armclang (Auto Select). Updated all USB Host/Device examples with user templates from MDK-Middleware v7.11.1. FileSystem, USB: Changed variant selection to "MDK-Plus". Updated Graphics examples to use Segger emWin version 5.50. CMSIS Driver: CAN: Corrected SetBitrate function to leave Silent and Loopback mode as they were. Corrected SetMode function to clear Silent and Loopback mode when NORMAL mode is activated. Corrected MessageSend function to only access required data for sending. Corrected abort message send functionality. I2C: Corrected pin configuration: MX_I2Cx_SMBA_GPIO_PuPdOD replaced with MX_I2Cx_yyy_GPIO_PuPdOD. Corrected usage function name USB Device: Corrected transmitted count for non-control IN endpoints. Updated USBD_EndpointConfigure function to check that maximum packet size requested fits into configured FIFO (compile time configured). Removed include of stm32f3xx_hal_pcd.h header.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值