| Electronic Components Datasheet Search |
|
AN4141 Datasheet(PDF) 8 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4141 Datasheet(HTML) 8 Page - STMicroelectronics |
|
8 / 42 page ![]() Why migrate from HAL to StdPeriph_Lib? AN4141 8/42 DocID023425 Rev 2 CMSIS - Files for the peripheral access layer Compiler vendor-independent files: • Cortex-M3 core and peripheral file (core_cm3.h + core_cm3.c) – Access to Cortex-M3 core and peripherals: NVIC, SysTick, etc. – Functions to access Cortex-M3 CPU registers and core peripherals • Device-specific header file (stm32w108xx.h) – Interrupt number assignment (consistent with startup file) – Peripheral register definitions (layout and base addresses) – Functions that control other chip-specific functions (optional) • Device-specific system file (system_stm32w108xx.c) – SystemInit function that initializes the physical microcontroller device – System Frequency value for system-wide timing – Other device-related features (optional) Compiler-vendor + device-specific startup file: • Compiler startup code (assembly or C) (startup_device.s) – Interrupt handler table with device-specific names (consistent with header) – Weak interrupt handler default functions (can be overwritten by user code) Note: The Weak keyword instructs the compiler to export symbols weakly. This keyword can be applied to function and variable declarations, and to function definitions. Functions defined with Weak export their symbols weakly. A weakly defined function behaves like a normally defined function unless a non-weakly defined function of the same name is linked to the same image. If both a non-weakly defined function and a weakly defined function exist in the same image, then all calls to the function resolve to call the non- weak function. If multiple weak definitions are available, the linker chooses one for use by all calls. 1.1.3 HAL versus CMSIS CMSIS provides a different implementation of some STM32W108xx FWLib components. Here are the main differences: • Use of standard C types, <stdint.h> file • For each Cortex-M3 exception and STM32 IRQ, there is: – an exception/interrupt handler with the _Handler postfix (for exceptions) or the _IRQHandler postfix (for interrupts) – a default exception/interrupt handler (weak definition) that contains an endless loop – a #define of the interrupt number with the _IRQn postfix • Startup file renamed to startup_stm32w108xx.s/.c • Only reduced NVIC and SysTick functions are available, some useful functions will be added in a new driver in the STM32W108xx standard peripheral library, named misc.h/.c • Some macro names are different from those used in the HAL firmware (Table 2). |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |