历史上的今天
今天是:2024年09月12日(星期四)
2018年09月12日 | STM32F0开发笔记4: STM32CubeF0固件架构
2018-09-12 来源:eefocus
本文介绍STM32CubeF0固件架构。
STM32CubeF0固件架构图如下图所示。
1、Board Support Package (BSP)
This layer offers a set of APIs relative to the hardware components in the hardware boards
(such as LCD, Audio, microSD and MEMS drivers). It is composed of two parts:
• Component
This is the driver relative to the external device on the board and not to the STM32. The
component driver provide specific APIs to the BSP driver external components and could be portable on any other board.
• BSP driver
It allows linking the component driver to a specific board and provides a set of user friendly APIs. The API naming rule is BSP_FUNCT_Action().Example: BSP_LED_Init(), BSP_LED_On()
The BSP is based on a modular architecture allowing an easy porting on any hardware by just implementing the low-level routines.
(大意:BSP是板级支持包的意思,分为2个部分:组件和BSP驱动。组件是线路板上扩展器件的驱动,而非STM32,组件提供了特定的API用于BSP驱动这些外部组件并且在其它板上移植。BSP驱动用于连接组件到指定的线路板,并提供一系列用户友好的API。这些API遵循BSP_FUNCT_Action的命名规则。BSP基于模块化结构,便于移植。)
2、Hardware Abstraction Layer (HAL) and Low Layer (LL)
The STM32CubeF0 HAL and LL are complementary and cover a wide range of applications
requirements: (大意:STM32CubeF0覆盖了极广泛的用户需求)
The HAL drivers offer high-level function-oriented highly-portable APIs. They hide the
MCU and peripheral complexity to end user.The HAL drivers provide generic multi-instance feature-oriented APIs which simplify user application implementation by providing ready to use process. As example, for the communication peripherals (I2S, UART…), it provides APIs allowing initializing and configuring the peripheral, managing data transfer based on polling, interrupt or DMA process, and handling communication errors that may raise during communication. The HAL driver APIs are split in two categories:
– Generic APIs which provides common and generic functions to all the STM32Series
– Extension APIs which provides specific and customized functions for a specific family or a specific part number.
(大意:HAL提供了高层、功能导向和高便捷性的API,它对最终用户隐藏了MCU和外设的复杂性。通过使用进程的方式,HAL驱动提供了多实例、特性导向的API用于简化用户的应用程序设计。例如,I2S和UART,它提供了初始化和配置外设进程,管理数据传输(轮询、中断和DMA)进程,以及在通讯过程中降低误码率的进程。HAL驱动包含2组:一般和扩展。)
The Low Layer APIs provide low-level APIs at register level, with better optimization but
less portability. They require a deep knowledge of MCU and peripheral specifications. The LL drivers are designed to offer a fast light-weight expert-oriented layer which is closer to the hardware than the HAL. Contrary to the HAL, LL APIs are not provided for peripherals where optimized access is not a key feature, or for those requiring heavy software configuration and/or complex upper-level stack (such as USB).
The LL drivers feature:
– A set of functions to initialize peripheral main features according to the parameters
specified in data structures
– A set of functions used to fill initialization data structures with the reset values
corresponding to each field
– Function for peripheral de-initialization (peripheral registers restored to their
default values)
– A set of inline functions for direct and atomic register access
– Full independence from HAL and capability to be used in standalone mode (without HAL drivers)
– Full coverage of the supported peripheral features.
(大意:底层API提供寄存器级底层API,可以用于优化系统系能但移植性较低。他们需要对MCU和外设有一个较深的理解。LL实际上是一个快速、轻量级、专家导向层更接近与硬件。)
其它的就不介绍了,理解起来应该没有什么问题。
史海拾趣
|
关于ARM中断处理的问题----《ARM嵌入式系统开发-软件设计与优化》第九章中疑问 各位过年好哦~ 呵呵,小弟这里有点疑惑相同大家讨论讨论~,这个问题是《ARM嵌入式系统开发-软件设计与优化》一书中的见下: 第九章-中断处理 9.3.2嵌套中断 在这一节中,描述了如何处理嵌套式的中断(不能单纯的在IRQ模式下打开中断允许位) ...… 查看全部问答> |
|
找了一些资料,但还是有点不明白, http://topic.eeworld.net/u/20090319/17/48afc467-5061-476c-ac41-5a0f8fdd4622.html这位仁兄也问了差不多的问题 方法是不是主要将%_WINCEROOT%\\Public\\Common\\Oak\\Drivers\\Serial\\COM16550目录复制到 ...… 查看全部问答> |
|
This file should only be compiled with iccavr or aavr with processor option -v1 #error This file should only be compiled with iccavr or aavr with processor option -v1 有人用IAR AVR遇到过这个问题吗?… 查看全部问答> |
|
ECC检验有什么优势,我不明白,请玩过Nand flash 的朋友谈谈 搞了半天都没明白ECC的原理是什么?但根据网友提供的代码,基本上知道怎么去调用它,但我有点纳闷:还不如自己写完一个Sector后,写个函数再读出这个扇区一个一个字节与原数据做比较,不一一对应,擦除再写,直到写对为止,难道ECC算法查到某位写错后,不用经 ...… 查看全部问答> |
|
家电控制板的小体积,低成本决定了在线路中不会使用高成本的材料来解决其电磁干扰问题。家电控制板的干扰主要来自三大方面:一是控制板本身产生的干扰,二是来自负载的干扰,三是来自线路上的干扰。解决这些干扰可以分别采用不同的方案来达成。 控 ...… 查看全部问答> |
|
请教,stm8a的芯片,有没有位寻址功能,我看没大量资料,没有看到有关说明,求解用过大侠们~~~~~~~~~~~~~~~~~~~~~~ ...… 查看全部问答> |
|
FPGA的I2C对摄像头配置怎么没有地址,只有数据呢。谁能解释下。///////////// Config Data LUT ////////////////////////// alwaysbegin case(LUT_INDEX) // Audio Config Data 0 : LUT_DATA <= 16\'h0000; 1 : LUT_DATA <= 16\'h1140; ...… 查看全部问答> |




