Stm32f0 Hal User Manual
Stm32f0 Hal User Manual
User manual
Description of STM32F0 HAL and low-layer drivers
Introduction
TM
STMCube is an STMicroelectronics original initiative to make developers' lives easier by reducing
development effort, time and cost. STM32Cube covers the whole STM32 portfolio.
STM32Cube Version 1.x includes:
STM32CubeMX, a graphical software configuration tool that allows the generation of C initialization
code using graphical wizards.
A comprehensive embedded software platform, delivered per series (such as STM32CubeF0 for
STM32F0 series)
The STM32Cube Hardware Abstraction Layer (HAL), STM32 abstraction layer embedded
software ensuring maximized portability across the STM32 portfolio
Low-layer APIs (LL) offering a fast light-weight expert-oriented layer which is closer to the
hardware than the HAL. LL APIs are available only for a set of peripherals.
A consistent set of middleware components such as RTOS, USB, TCP/IP, Graphics
All embedded software, utilities delivered with a full set of examples.
The HAL driver layer provides a generic multi-instance simple set of APIs (application programming
interfaces) to interact with the upper layer (application, libraries and stacks).
The HAL driver APIs are split into two categories: generic APIs which provide common and generic
functions for all the STM32 series, and extension APIs which include specific and customized functions
for a given line or part number. The HAL drivers include a complete set of ready-to-use APIs which
simplify the user application implementation. As an example, the communication peripherals contain
APIs to initialize and configure the peripheral, manage data transfers in polling mode, handle interrupts
or DMA, and manage communication errors.
The HAL drivers are feature-oriented instead of IP-oriented. As an example, the timer APIs are split into
several categories following the functions offered by the IP such as basic timer, capture, or pulse width
modulation (PWM). The HAL driver layer implements run-time failure detection by checking the input
values of all functions. Such dynamic checking contributes to enhance the firmware robustness. Run-
time detection is also suitable for user application development and debugging.
The LL drivers offer hardware services based on the available features of the STM32 peripherals. These
services reflect exactly the hardware capabilities and provide atomic operations that must be called
following the programming model described in the product line reference manual. As a result, the LL
services are not based on standalone processes and do not require any additional memory resources to
save their states, counter or data pointers: all operations are performed by changing the associated
peripheral registers content. Contrary to the HAL, the LL APIs are not provided for peripherals for which
optimized access is not a key feature, or for those requiring heavy software configuration and/or
complex upper level stack (such as USB).
The HAL and LL drivers are complementary and cover a wide range of applications requirements:
The HAL offers high-level and feature-oriented APIs, with a high-portability level. They hide the
MCU and peripheral complexity to end-user.
The LL offers low-level APIs at registers level, with better optimization but less portability. They
require deep knowledge of the MCU and peripherals specifications.
HAL and LL source code is developed in Strict ANSI-C which makes it independent from the
TM
development tools. It is checked with CodeSonar static analysis tool. It is fully documented and is
MISRA-C 2004 compliant.
Contents
1 Acronyms and definitions............................................................. 24
2 Overview of HAL drivers ............................................................... 26
2.1 HAL and user-application files......................................................... 26
2.1.1 HAL driver files ................................................................................. 26
2.1.2 User-application files ........................................................................ 27
2.2 HAL data structures ........................................................................ 29
2.2.1 Peripheral handle structures ............................................................ 29
2.2.2 Initialization and configuration structure ........................................... 30
2.2.3 Specific process structures .............................................................. 30
2.3 API classification ............................................................................. 31
2.4 Devices supported by HAL drivers .................................................. 32
2.5 HAL driver rules .............................................................................. 35
2.5.1 HAL API naming rules ...................................................................... 35
2.5.2 HAL general naming rules ................................................................ 36
2.5.3 HAL interrupt handler and callback functions ................................... 37
2.6 HAL generic APIs ............................................................................ 38
2.7 HAL extension APIs ........................................................................ 39
2.7.1 HAL extension model overview ........................................................ 39
2.7.2 HAL extension model cases ............................................................. 40
2.8 File inclusion model......................................................................... 42
2.9 HAL common resources .................................................................. 43
2.10 HAL configuration............................................................................ 43
2.11 HAL system peripheral handling ..................................................... 45
2.11.1 Clock ................................................................................................. 45
2.11.2 GPIOs ............................................................................................... 45
2.11.3 Cortex NVIC and SysTick timer........................................................ 47
2.11.4 PWR ................................................................................................. 47
2.11.5 EXTI .................................................................................................. 48
2.11.6 DMA .................................................................................................. 49
2.12 How to use HAL drivers .................................................................. 50
2.12.1 HAL usage models ........................................................................... 50
2.12.2 HAL initialization ............................................................................... 51
2.12.3 HAL IO operation process ................................................................ 53
2.12.4 Timeout and error management ....................................................... 56
List of tables
Table 1: Acronyms and definitions ............................................................................................................ 24
Table 2: HAL driver files............................................................................................................................ 26
Table 3: User-application files .................................................................................................................. 27
Table 4: API classification ......................................................................................................................... 31
Table 5: List of devices supported by HAL drivers ................................................................................... 33
Table 6: HAL API naming rules ................................................................................................................ 35
Table 7: Macros handling interrupts and specific clock configurations .................................................... 36
Table 8: Callback functions ....................................................................................................................... 37
Table 9: HAL generic APIs ....................................................................................................................... 38
Table 10: HAL extension APIs .................................................................................................................. 39
Table 11: Define statements used for HAL configuration ......................................................................... 44
Table 12: Description of GPIO_InitTypeDef structure .............................................................................. 46
Table 13: Description of EXTI configuration macros ................................................................................ 48
Table 14: MSP functions ........................................................................................................................... 52
Table 15: Timeout values ......................................................................................................................... 56
Table 16: LL driver files............................................................................................................................. 60
Table 17: Common peripheral initialization functions ............................................................................... 63
Table 18: Optional peripheral initialization functions ................................................................................ 63
Table 19: Specific Interrupt, DMA request and status flags management ............................................... 65
Table 20: Available function formats......................................................................................................... 65
Table 21: Peripheral clock activation/deactivation management ............................................................. 65
Table 22: Peripheral activation/deactivation management ....................................................................... 66
Table 23: Peripheral configuration management ...................................................................................... 66
Table 24: Peripheral register management .............................................................................................. 66
Table 25: Correspondence between ADC registers and ADC low-layer driver functions .................... 1249
Table 26: Correspondence between BUS registers and BUS low-layer driver functions ..................... 1254
Table 27: Correspondence between COMP registers and COMP low-layer driver functions .............. 1259
Table 28: Correspondence between CORTEX registers and CORTEX low-layer driver functions ..... 1260
Table 29: Correspondence between CRC registers and CRC low-layer driver functions .................... 1261
Table 30: Correspondence between CRS registers and CRS low-layer driver functions .................... 1262
Table 31: Correspondence between DAC registers and DAC low-layer driver functions .................... 1263
Table 32: Correspondence between DMA registers and DMA low-layer driver functions ................... 1265
Table 33: Correspondence between EXTI registers and EXTI low-layer driver functions ................... 1269
Table 34: Correspondence between GPIO registers and GPIO low-layer driver functions ................. 1269
Table 35: Correspondence between I2C registers and I2C low-layer driver functions ........................ 1270
Table 36: Correspondence between I2S registers and I2S low-layer driver functions ......................... 1274
Table 37: Correspondence between IWDG registers and IWDG low-layer driver functions ................ 1276
Table 38: Correspondence between PWR registers and PWR low-layer driver functions ................... 1276
Table 39: Correspondence between RCC registers and RCC low-layer driver functions .................... 1278
Table 40: Correspondence between RTC registers and RTC low-layer driver functions ..................... 1281
Table 41: Correspondence between SPI registers and SPI low-layer driver functions ........................ 1288
Table 42: Correspondence between SYSTEM registers and SYSTEM low-layer driver functions ...... 1290
Table 43: Correspondence between TIM registers and TIM low-layer driver functions ....................... 1295
Table 44: Correspondence between USART registers and USART low-layer driver functions ........... 1304
Table 45: Correspondence between WWDG registers and WWDG low-layer driver functions ........... 1311
Table 46: Document revision history .................................................................................................... 1317
List of figures
Figure 1: Example of project template ...................................................................................................... 28
Figure 2: Adding device-specific functions ............................................................................................... 40
Figure 3: Adding family-specific functions ................................................................................................ 40
Figure 4: Adding new peripherals ............................................................................................................. 41
Figure 5: Updating existing APIs .............................................................................................................. 41
Figure 6: File inclusion model ................................................................................................................... 42
Figure 7: HAL driver model ....................................................................................................................... 50
Figure 8: Low-layer driver folders ............................................................................................................. 61
Figure 9: Low-layer driver CMSIS files ..................................................................................................... 62
The STM32Cube package comes with ready-to-use project templates, one for each
supported board. Each project contains the files listed above and a preconfigured project
for the supported toolchains.
Each project template provides empty main loop function and can be used as a starting
point to get familiar with project settings for STM32Cube. Their characteristics are the
following:
It contains the sources of HAL, CMSIS and BSP drivers which are the minimal
components to develop a code on a given board.
It contains the include paths for all the firmware components.
It defines the STM32 device supported, and allows configuring the CMSIS and HAL
drivers accordingly.
It provides ready to use user files preconfigured as defined below:
HAL is initialized
SysTick ISR implemented for HAL_Delay()
System clock configured with the maximum frequency of the device
1) The multi-instance feature implies that all the APIs used in the application are
re-entrant and avoid using global variables because subroutines can fail to be re-
entrant if they rely on a global variable to remain unchanged but that variable is
modified when the subroutine is recursively invoked. For this reason, the following
rules are respected:
Re-entrant code does not hold any static (or global) non-constant data: re-
entrant functions can work with global data. For example, a re-entrant
interrupt service routine can grab a piece of hardware status to work with
(e.g. serial port read buffer) which is not only global, but volatile. Still, typical
use of static variables and global data is not advised, in the sense that only
atomic read-modify-write instructions should be used in these variables. It
should not be possible for an interrupt or signal to occur during the execution
of such an instruction.
Reentrant code does not modify its own code.
3) For the shared and system peripherals, no handle or instance object is used.
The peripherals concerned by this exception are the following:
GPIO
SYSTICK
NVIC
PWR
RCC
FLASH.
The following table summarizes the location of the different categories of HAL APIs in the
driver files.
Table 4: API classification
Generic file Extension file
(1)
Common APIs X X
Family specific APIs X
Device specific APIs X
Notes:
(1)
In some cases, the implementation for a specific device part number may change . In this case the generic API
is declared as weak function in the extension file. The API is implemented again to overwrite the default function
Family specific APIs are only related to a given family. This means that if a
specific API is implemented in another family, and the arguments of this latter
family are different, additional structures and arguments might need to be added.
The IRQ handlers are used for common and family specific processes.
STM32F030xC
STM32F071xB
STM32F091xC
STM32F072xB
STM32F070x8
STM32F030x6
STM32F030x8
STM32F070x6
STM32F031x6
STM32F051x8
STM32F042x6
STM32F048xx
STM32F058xx
STM32F078xx
STM32F098xx
IP/Module
stm32f0xx_hal.c Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_adc.c Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_adc_ex.c Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_can.c No No No No No No No No Yes Yes Yes Yes No Yes Yes
stm32f0xx_hal_cec.c No No No No No No Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_comp.c No No No No No No Yes Yes Yes No Yes No Yes Yes Yes
stm32f0xx_hal_cortex.c Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_crc.c Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_crc_ex.c Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_dac.c No No No No No No Yes Yes Yes No Yes No Yes Yes Yes
stm32f0xx_hal_dac_ex.c No No No No No No Yes Yes Yes No Yes No Yes Yes Yes
stm32f0xx_hal_dma.c Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_flash.c Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_flash_ex.c Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_gpio.c Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_i2c.c Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_i2c_ex.c Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_i2s.c No No No No No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_irda.c No No No No No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_iwdg.c Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
STM32F030xC
STM32F071xB
STM32F091xC
STM32F072xB
STM32F070x8
STM32F030x6
STM32F030x8
STM32F070x6
STM32F031x6
STM32F051x8
STM32F042x6
STM32F048xx
STM32F058xx
STM32F078xx
STM32F098xx
IP/Module
stm32f0xx_hal_msp_template.c NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
stm32f0xx_hal_pcd.c No No Yes Yes No No No No No Yes Yes Yes No Yes No
stm32f0xx_hal_pcd_ex.c No No Yes Yes No No No No No Yes Yes Yes No Yes No
stm32f0xx_hal_pwr.c Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_pwr_ex.c Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No No No No
stm32f0xx_hal_rcc.c Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_rcc_ex.c Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_rtc.c Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_rtc_ex.c Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_smartcard.c No No No No No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_smartcard_ex.c No No No No No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_smbus.c Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_spi.c Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_tim.c Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_tim_ex.c Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_tsc.c No No No No No No Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_uart.c Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_uart_ex.c Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_usart.c Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
stm32f0xx_hal_wwdg.c Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
The PPP prefix refers to the peripheral functional mode and not to the peripheral itself.
For example, if the USART, PPP can be USART, IRDA, UART or SMARTCARD
depending on the peripheral mode.
The constants used in one file are defined within this file. A constant used in several
files is defined in a header file. All constants are written in uppercase, except for
peripheral driver function parameters.
typedef variable names should be suffixed with _TypeDef.
Registers are considered as constants. In most cases, their name is in uppercase and
uses the same acronyms as in the STM32F0 reference manuals.
Peripheral registers are declared in the PPP_TypeDef structure (e.g. ADC_TypeDef)
in the CMSIS header file corresponding to the selected platform: stm32f030x6.h,
stm32f030x8.h, stm32f031x6.h, stm32f038xx.h, stm32f042x6.h, stm32f048xx.h,
stm32f051x8.h, stm32f058xx.h, stm32f071xB.h, stm32f072xB.h, stm32f078xx.h,
stm32f091xC.h and stm32f098xx.h. The platform is selected by enabling the
compilation switch in the compilation toolchain directive or in the stm32f0xx.h file.
Peripheral function names are prefixed by HAL_, then the corresponding peripheral
acronym in uppercase followed by an underscore. The first letter of each word is in
uppercase (e.g. HAL_UART_Transmit()). Only one underscore is allowed in a function
name to separate the peripheral acronym from the rest of the function name.
The structure containing the PPP peripheral initialization parameters are named
PPP_InitTypeDef (e.g. ADC_InitTypeDef).
The structure containing the Specific configuration parameters for the PPP peripheral
are named PPP_xxxxConfTypeDef (e.g. ADC_ChannelConfTypeDef).
Peripheral handle structures are named PPP_HandleTypedef (e.g
DMA_HandleTypeDef)
The functions used to initialize the PPP peripheral according to parameters specified
in PPP_InitTypeDef are named HAL_PPP_Init (e.g. HAL_TIM_Init()).
The functions used to reset the PPP peripheral registers to their default values are
named PPP_DeInit, e.g. TIM_DeInit.
The macros that handle interrupts and specific clock configurations are defined in
each peripheral/module driver. These macros are exported in the peripheral driver
header files so that they can be used by the extension file. The list of these macros is
defined below: This list is not exhaustive and other macros related to peripheral
features can be added, so that they can be used in the user application.
Table 7: Macros handling interrupts and specific clock configurations
Macros Description
Enables a specific peripheral
__HAL_PPP_ENABLE_IT(__HANDLE__, __INTERRUPT__)
interrupt
Disables a specific peripheral
__HAL_PPP_DISABLE_IT(__HANDLE__, __INTERRUPT__)
interrupt
Gets a specific peripheral interrupt
__HAL_PPP_GET_IT (__HANDLE__, __ INTERRUPT __)
status
Clears a specific peripheral
__HAL_PPP_CLEAR_IT (__HANDLE__, __ INTERRUPT __)
interrupt status
Gets a specific peripheral flag
__HAL_PPP_GET_FLAG (__HANDLE__, __FLAG__)
status
Clears a specific peripheral flag
__HAL_PPP_CLEAR_FLAG (__HANDLE__, __FLAG__)
status
__HAL_PPP_ENABLE(__HANDLE__) Enables a peripheral
__HAL_PPP_DISABLE(__HANDLE__) Disables a peripheral
__HAL_PPP_XXXX (__HANDLE__, __PARAM__) Specific PPP HAL driver macro
__HAL_PPP_GET_ IT_SOURCE (__HANDLE__, __ Checks the source of specified
INTERRUPT __) interrupt
NVIC and SYSTICK are two ARM Cortex core features. The APIs related to these
features are located in the stm32f0xx_hal_cortex.c file.
Example: stm32f0xx_hal_rcc_ex.c/h
#if defined(STM32F042x6) || defined(STM32F048xx) || \
defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) || \
defined(STM32F091xC) || defined(STM32F098xx)
void HAL_RCCEx_CRSConfig(RCC_CRSInitTypeDef *pInit);
void HAL_RCCEx_CRSSoftwareSynchronizationGenerate(void);
void HAL_RCCEx_CRSGetSynchronizationInfo(RCC_CRSSynchroInfoTypeDef *pSynchroInfo);
RCC_CRSStatusTypeDef HAL_RCCEx_CRSWaitSynchronization(uint32_t Timeout);
#endif /* STM32F042x6 || STM32F048xx || */
/* STM32F071xB || STM32F072xB || STM32F078xx || */
/* STM32F091xC || STM32F098xx */
Example:xx_hal_lcd.c/h
A PPP driver is a standalone module which is used in a project. The user must enable the
corresponding USE_HAL_PPP_MODULE define statement in the configuration file.
/*********************************************************************
* @file stm32f0xx_hal_conf.h
* @author MCD Application Team
* @version VX.Y.Z * @date dd-mm-yyyy
* @brief This file contains the modules to be used
**********************************************************************
(…)
#define USE_HAL_USART_MODULE
#define USE_HAL_IRDA_MODULE
#define USE_HAL_DMA_MODULE
#define USE_HAL_RCC_MODULE
(…)
HAL Locked The HAL lock is used by all HAL APIs to prevent accessing by accident
shared resources.
typedef enum
{
HAL_UNLOCKED = 0x00, /*!<Resources unlocked */
HAL_LOCKED = 0x01 /*!< Resources locked */
} HAL_LockTypeDef;
2.11.1 Clock
Two main functions can be used to configure the system clock:
HAL_RCC_OscConfig (RCC_OscInitTypeDef *RCC_OscInitStruct). This function
configures/enables multiple clock sources (HSE, HSI, LSE, LSI, PLL).
HAL_RCC_ClockConfig (RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t
FLatency). This function
selects the system clock source
configures AHB and APB clock dividers
configures the number of Flash memory wait states
updates the SysTick configuration when HCLK clock changes.
Some peripheral clocks are not derived from the system clock (RTC, USB…). In this case,
the clock configuration is performed by an extended API defined in
stm32f0xx_hal_rcc_ex.c: HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef
*PeriphClkInit).
Additional RCC HAL driver functions are available:
HAL_RCC_DeInit() Clock de-init function that return clock configuration to reset state
Get clock functions that allow retreiving various clock configurations (system clock,
HCLK, PCLK1, …)
MCO and CSS configuration functions
A set of macros are defined in stm32f0xx_hal_rcc.h andstm32f0xx_hal_rcc_ex.h. They
allow executing elementary operations on RCC block registers, such as peripherals clock
gating/reset control:
__PPP_CLK_ENABLE/__PPP_CLK_DISABLE to enable/disable the peripheral clock
__PPP_FORCE_RESET/__PPP_RELEASE_RESET to force/release peripheral reset
__PPP_CLK_SLEEP_ENABLE/__PPP_CLK_SLEEP_DISABLE to enable/disable the
peripheral clock during low power (Sleep) mode.
2.11.2 GPIOs
GPIO HAL APIs are the following:
HAL_GPIO_Init() / HAL_GPIO_DeInit()
HAL_GPIO_ReadPin() / HAL_GPIO_WritePin()
HAL_GPIO_TogglePin ().
In addition to standard GPIO modes (input, output, analog), the pin mode can be
configured as EXTI with interrupt or event generation.
When selecting EXTI mode with interrupt generation, the user must call
HAL_GPIO_EXTI_IRQHandler() from stm32f0xx_it.c and implement
HAL_GPIO_EXTI_Callback()
The table below describes the GPIO_InitTypeDef structure field.
2.11.4 PWR
The PWR HAL driver handles power management. The features shared between all
STM32 Series are listed below:
PVD configuration, enabling/disabling and interrupt handling
HAL_PWR_PVDConfig()
HAL_PWR_EnablePVD() / HAL_PWR_DisablePVD()
HAL_PWR_PVD_IRQHandler()
HAL_PWR_PVDCallback()
Wakeup pin configuration
HAL_PWR_EnableWakeUpPin() / HAL_PWR_DisableWakeUpPin()
Low-power mode entry
HAL_PWR_EnterSLEEPMode()
HAL_PWR_EnterSTOPMode()
HAL_PWR_EnterSTANDBYMode()
Backup domain configuration
HAL_PWR_EnableBkUpAccess()/ HAL_PWR_DisableBkUpAccess()
2.11.5 EXTI
The EXTI is not considered as a standalone peripheral but rather as a service used by
other peripheral. As a result there are no EXTI APIs but each peripheral HAL driver
implements the associated EXTI configuration and EXTI function are implemented as
macros in its header file.
The first 16 EXTI lines connected to the GPIOs are managed within the GPIO driver. The
GPIO_InitTypeDef structure allows configuring an I/O as external interrupt or external
event.
The EXTI lines connected internally to the PVD, RTC, USB, and COMP are configured
within the HAL drivers of these peripheral through the macros given in the table below. The
EXTI internal connections depend on the targeted STM32 microcontroller (refer to the
product datasheet for more details):
Table 13: Description of EXTI configuration macros
Macros Description
Defines the EXTI line connected to the internal peripheral.
Example:
PPP_EXTI_LINE_FUNCTION
#define PWR_EXTI_LINE_PVD ((uint32_t)0x00010000) /*!<External
interrupt line 16 Connected to the PVD EXTI Line */
Enables a given EXTI line
__HAL_PPP_EXTI_ENABLE_IT Example:
__HAL_PWR_PVD_EXTI_ENABLE_IT()
Disables a given EXTI line.
__HAL_PPP_EXTI_DISABLE_IT Example:
__HAL_PWR_PVD_EXTI_DISABLE_IT()
Gets a given EXTI line interrupt flag pending bit status.
__HAL_PPP_EXTI_GET_FLAG Example:
__HAL_PWR_PVD_EXTI_GET_FLAG()
Clears a given EXTI line interrupt flag pending bit.
__HAL_PPP_EXTI_CLEAR_FLAG Example;
__HAL_PWR_PVD_EXTI_CLEAR_FLAG()
Generates a software interrupt for a given EXTI line.
__HAL_PPP_EXTI_GENERATE_SWIT Example:
__HAL_PWR_PVD_EXTI_GENERATE_SWIT()
Enables event on a given EXTI Line
__HAL_PPP_EXTI_ENABLE_EVENT Example:
_HAL_PWR_PVD_EXTI_ENABLE_EVENT()
Disables event on a given EXTI line
__HAL_PPP_EXTI_DISABLE_EVENT Example:
__HAL_PWR_PVD_EXTI_DISABLE_EVENT()
If the EXTI interrupt mode is selected, the user application must call
HAL_PPP_FUNCTION_IRQHandler() (for example HAL_PWR_PVD_IRQHandler()), from
stm32f0xx_it.c file, and implement HAL_PPP_FUNCTIONCallback() callback function (for
example HAL_PWR_PVDCallback().
DMA channel callbacks need to be initialized by the user application only in case
of memory-to-memory transfer. However when peripheral-to-memory transfers
are used, these callbacks are automatically initialized by calling a process API
function that uses the DMA.
Basically, the HAL driver APIs are called from user files and optionally from interrupt
handlers file when the APIs based on the DMA or the PPP peripheral dedicated interrupts
are used.
The MSP callbacks are declared empty as weak functions in each peripheral driver. The
user can use them to set the low level initialization code or omit them and use his own
initialization routine.
The HAL MSP callback is implemented inside the stm32f0xx_hal_msp.c file in the user
folders. An stm32f0xx_hal_msp_template.c file is located in the HAL folder and should be
copied to the user folder. It can be generated automatically by STM32CubeMX tool and
further modified. Note that all the routines are declared as weak functions and could be
overwritten or removed to use user low level initialization code.
stm32f0xx_hal_msp.c file contains the following functions:
Table 14: MSP functions
Routine Description
void HAL_MspInit() Global MSP initialization routine
void HAL_MspDeInit() Global MSP de-initialization routine
void HAL_PPP_MspInit() PPP MSP initialization routine
void HAL_PPP_MspDeInit() PPP MSP de-initialization routine
UART_HandleTypeDef UartHandle;
int main(void)
{
/* Set User Parameters */
UartHandle.Init.BaudRate = 9600;
UartHandle.Init.WordLength = UART_DATABITS_8;
UartHandle.Init.StopBits = UART_STOPBITS_1;
UartHandle.Init.Parity = UART_PARITY_NONE;
UartHandle.Init.HwFlowCtl = UART_HWCONTROL_NONE;
UartHandle.Init.Mode = UART_MODE_TX_RX;
UartHandle.Init.Instance = USART1;
HAL_UART_Init(&UartHandle);
HAL_UART_SendIT(&UartHandle, TxBuffer, sizeof(TxBuffer));
while (1);
}
void HAL_UART_TxCpltCallback(UART_HandleTypeDef *huart)
{
}
void HAL_UART_ErrorCallback(UART_HandleTypeDef *huart)
{
}
stm32f0xx_it.cfile:
stm32f0xx_it.c file:
extern UART_HandleTypeDef UartHandle;
void DMAx_IRQHandler(void)
{
HAL_DMA_IRQHandler(&UartHandle.DMA_Handle_tx);
}
Notes:
(1)
HAL_MAX_DELAY is defined in the stm32fxxx_hal_def.h as 0xFFFFFFFF
However, in some cases, a fixed timeout is used for system peripherals or internal HAL
driver processes. In these cases, the timeout has the same meaning and is used in the
same way, except when it is defined locally in the drivers and cannot be modified or
introduced as an argument in the user application.
Example of fixed timeout:
#define LOCAL_PROCESS_TIMEOUT 100
HAL_StatusTypeDef HAL_PPP_Process(PPP_HandleTypeDef)
{
(…)
timeout = HAL_GetTick() + LOCAL_PROCESS_TIMEOUT;
(…)
while(ProcessOngoing)
{
(…)
if(HAL_GetTick() >= timeout)
{
/* Process unlocked */
__HAL_UNLOCK(hppp);
hppp->State= HAL_PPP_STATE_TIMEOUT;
return HAL_PPP_STATE_TIMEOUT;
}
}
(…)
}
The following example shows how to use the timeout inside the polling functions:
HAL_PPP_StateTypeDef HAL_PPP_Poll (PPP_HandleTypeDef *hppp, uint32_t Timeout)
{
(…)
timeout = HAL_GetTick() + Timeout;
(…)
while(ProcessOngoing)
{
Valid handle: the PPP peripheral handle is the most important argument since it keeps
the PPP driver vital parameters. It is always checked in the beginning of the
HAL_PPP_Init() function.
HAL_StatusTypeDef HAL_PPP_Init(PPP_HandleTypeDef* hppp)
{
if (hppp == NULL) //the handle should be already allocated
{
return HAL_ERROR;
}
}
Timeout error: the following statement is used when a timeout error occurs: while
(Process ongoing)
{
timeout = HAL_GetTick() + Timeout; while (data processing is running)
{
if(timeout) { return HAL_TIMEOUT;
}
}
In all peripheral handles, a HAL_PPP_ErrorTypeDef is defined and used to store the last
error code.
typedef struct
{
PPP_TypeDef * Instance; /* PPP registers base address */
PPP_InitTypeDef Init; /* PPP initialization parameters */
HAL_LockTypeDef Lock; /* PPP locking object */
__IO HAL_PPP_StateTypeDef State; /* PPP state */
__IO HAL_PPP_ErrorTypeDef ErrorCode; /* PPP Error code */
(…)
The error state and the peripheral global state are always updated before returning an
error:
PPP->State = HAL_PPP_READY; /* Set the peripheral ready */
PP->ErrorCode = HAL_ERRORCODE ; /* Set the error code */
_HAL_UNLOCK(PPP) ; /* Unlock the PPP resources */
return HAL_ERROR; /*return with HAL error */
The assert_failed function is implemented in the main.c file or in any other user C file:
#ifdef USE_FULL_ASSERT /**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval None */
void assert_failed(uint8_t* file, uint32_t line)
{
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
/* Infinite loop */
while (1)
{
}
}
The low-layer files are located in the same HAL driver folder.
Figure 8: Low-layer driver folders
In general, low-layer drivers include only the STM32 CMSIS device file.
#include "stm32yyxx.h"
Application files have to include only the used low-layer drivers header files.
Additional functions are available for some peripherals (refer to Table 18: "Optional
peripheral initialization functions" ).
Table 18: Optional peripheral initialization functions
Return
Functions Parameters Examples
Type
Initializes peripheral features according to
the parameters specified in PPP_InitStruct.
Example:
LL_RTC_TIME_Init(RTC_TypeDef *RTCx,
uint32_t RTC_Format,
LL_RTC_TimeTypeDef *RTC_TimeStruct)
PPP_TypeDef* PPPx
LL_PPP{_CATEGOR LL_RTC_DATE_Init(RTC_TypeDef *RTCx,
LL_PPP{_CATEGORY}_I Error Y}_ InitTypeDef*
nit Status uint32_t RTC_Format,
PPP{_CATEGORY}_I LL_RTC_DateTypeDef *RTC_DateStruct)
nitStruct
LL_TIM_IC_Init(TIM_TypeDef* TIMx,
uint32_t Channel, LL_TIM_IC_InitTypeDef*
TIM_IC_InitStruct)
LL_TIM_ENCODER_Init(TIM_TypeDef*
TIMx, LL_TIM_ENCODER_InitTypeDef*
TIM_EncoderInitStruct)
Fills each PPP{_CATEGORY}_InitStruct
LL_PPP{_CATEGORY}_Ini member with its default value.
LL_PPP{_CATEGORY}_ t TypeDef*
void
StructInit PPP{_CATEGORY}_Init Example:
Struct LL_RTC_TIME_StructInit(LL_RTC_TimeTyp
eDef *RTC_TimeStruct);
BITNAME refers to the peripheral register bit name as described in the product
line reference manual.
'x' corresponds to the group index and refers to the index of the modified register
on a given bus.
The Propriety is a variable used to identify the DMA transfer direction or the data
register type.
When the BSP drivers are included, the used HAL drivers associated with the
BSP functions drivers should be included in the workspace, even if they are not
used by the application layer.
1. When the HAL Init/DeInit APIs are not used and are replaced by the low-
layer macros, the InitMsp() functions are not called and the MSP initialization
should be done in the user application.
2. When process APIs are not used and the corresponding function is
performed through the low-layer APIs, the callbacks are not called and post
processing or error management should be done by the user application.
3. When the LL APIs is used for process operations, the IRQ handler HAL APIs
cannot be called and the IRQ should be implemented by the user application.
Each LL driver implements the macros needed to read and clear the
associated interrupt flags.
HAL_Init
Function name HAL_StatusTypeDef HAL_Init (void )
Function description This function configures the Flash prefetch, Configures time base
source, NVIC and Low level hardware.
Return values HAL: status
Notes This function is called at the beginning of program after reset
and before the clock configuration
The time base configuration is based on HSI clock when
exiting from Reset. Once done, time base tick start
incrementing. In the default implementation,Systick is used as
source of time base. The tick variable is incremented each
1ms in its ISR.
HAL_DeInit
Function name HAL_StatusTypeDef HAL_DeInit (void )
Function description This function de-Initializes common part of the HAL and stops the
source of time base.
Return values HAL: status
Notes This function is optional.
HAL_MspDeInit
Function name void HAL_MspDeInit (void )
Function description DeInitializes the MSP.
Return values None
HAL_InitTick
Function name HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority)
Function description This function configures the source of the time base.
Parameters TickPriority: Tick interrupt priority.
Return values HAL: status
Notes This function is called automatically at the beginning of
program after reset by HAL_Init() or at any time when clock is
reconfigured by HAL_RCC_ClockConfig().
In the default implementation, SysTick timer is the source of
time base. It is used to generate interrupts at regular time
intervals. Care must be taken if HAL_Delay() is called from a
peripheral ISR process, The the SysTick interrupt must have
higher priority (numerically lower) than the peripheral
interrupt. Otherwise the caller ISR process will be blocked.
The function is declared as __Weak to be overwritten in case
of other implementation in user file.
HAL_IncTick
Function name void HAL_IncTick (void )
Function description This function is called to increment a global variable "uwTick" used
as application time base.
Return values None
Notes In the default implementation, this variable is incremented
each 1ms in Systick ISR.
This function is declared as __weak to be overwritten in case
of other implementations in user file.
HAL_Delay
Function name void HAL_Delay (__IO uint32_t Delay)
Function description This function provides accurate delay (in milliseconds) based on
variable incremented.
Parameters Delay: specifies the delay time length, in milliseconds.
HAL_GetTick
Function name uint32_t HAL_GetTick (void )
Function description Provides a tick value in millisecond.
Return values tick: value
Notes This function is declared as __weak to be overwritten in case
of other implementations in user file.
HAL_SuspendTick
Function name void HAL_SuspendTick (void )
Function description Suspend Tick increment.
Return values None
Notes In the default implementation , SysTick timer is the source of
time base. It is used to generate interrupts at regular time
intervals. Once HAL_SuspendTick() is called, the the SysTick
interrupt will be disabled and so Tick increment is suspended.
This function is declared as __weak to be overwritten in case
of other implementations in user file.
HAL_ResumeTick
Function name void HAL_ResumeTick (void )
Function description Resume Tick increment.
Return values None
Notes In the default implementation , SysTick timer is the source of
time base. It is used to generate interrupts at regular time
intervals. Once HAL_ResumeTick() is called, the the SysTick
interrupt will be enabled and so Tick increment is resumed.
This function is declared as __weak to be overwritten in case
of other implementations in user file.
HAL_GetHalVersion
Function name uint32_t HAL_GetHalVersion (void )
Function description This method returns the HAL revision.
Return values version: : 0xXYZR (8bits for each decimal, R for RC)
HAL_GetDEVID
Function name uint32_t HAL_GetDEVID (void )
Function description Returns the device identifier.
Return values Device: identifier
HAL_GetUIDw0
Function name uint32_t HAL_GetUIDw0 (void )
Function description Returns first word of the unique device identifier (UID based on 96
bits)
Return values Device: identifier
HAL_GetUIDw1
Function name uint32_t HAL_GetUIDw1 (void )
Function description Returns second word of the unique device identifier (UID based on
96 bits)
Return values Device: identifier
HAL_GetUIDw2
Function name uint32_t HAL_GetUIDw2 (void )
Function description Returns third word of the unique device identifier (UID based on 96
bits)
Return values Device: identifier
HAL_DBGMCU_EnableDBGStopMode
Function name void HAL_DBGMCU_EnableDBGStopMode (void )
Function description Enable the Debug Module during STOP mode.
Return values None
HAL_DBGMCU_DisableDBGStopMode
Function name void HAL_DBGMCU_DisableDBGStopMode (void )
Function description Disable the Debug Module during STOP mode.
Return values None
HAL_DBGMCU_DisableDBGStandbyMode
Function name void HAL_DBGMCU_DisableDBGStandbyMode (void )
Function description Disable the Debug Module during STANDBY mode.
Return values None
6.1.2 ADC_ChannelConfTypeDef
Data Fields
uint32_t Channel
uint32_t Rank
uint32_t SamplingTime
Field Documentation
uint32_t ADC_ChannelConfTypeDef::Channel
Specifies the channel to configure into ADC regular group. This parameter can be a
value of ADC_channels Note: Depending on devices, some channels may not be
available on package pins. Refer to device datasheet for channels availability.
uint32_t ADC_ChannelConfTypeDef::Rank
Add or remove the channel from ADC regular group sequencer. On STM32F0
devices, number of ranks in the sequence is defined by number of channels enabled,
rank of each channel is defined by channel number (channel 0 fixed on rank 0,
channel 1 fixed on rank1, ...).. Despite the channel rank is fixed, this parameter allow
an additional possibility: to remove the selected rank (selected channel) from
sequencer. This parameter can be a value of ADC_rank
uint32_t ADC_ChannelConfTypeDef::SamplingTime
Sampling time value to be set for the selected channel. Unit: ADC clock cycles
Conversion time is the addition of sampling time and processing time (12.5 ADC clock
cycles at ADC resolution 12 bits, 10.5 cycles at 10 bits, 8.5 cycles at 8 bits, 6.5 cycles
at 6 bits). This parameter can be a value of ADC_sampling_times Caution: this
setting impacts the entire regular group. Therefore, call of
HAL_ADC_ConfigChannel() to configure a channel can impact the configuration of
other channels previously set. Caution: Obsolete parameter. Use parameter
"SamplingTimeCommon" in ADC initialization structure. If parameter
"SamplingTimeCommon" is set to a valid sampling time, parameter "SamplingTime" is
discarded. Note: In case of usage of internal measurement channels
(VrefInt/Vbat/TempSensor), sampling time constraints must be respected (sampling
time can be adjusted in function of ADC clock frequency and sampling time setting)
Refer to device datasheet for timings values, parameters TS_vrefint, TS_vbat,
TS_temp (values rough order: 5us to 17us).
6.1.3 ADC_AnalogWDGConfTypeDef
Data Fields
uint32_t WatchdogMode
uint32_t Channel
uint32_t ITMode
uint32_t HighThreshold
uint32_t LowThreshold
Field Documentation
uint32_t ADC_AnalogWDGConfTypeDef::WatchdogMode
Configures the ADC analog watchdog mode: single/all/none channels. This parameter
can be a value of ADC_analog_watchdog_mode.
6.1.4 ADC_HandleTypeDef
Data Fields
ADC_TypeDef * Instance
ADC_InitTypeDef Init
DMA_HandleTypeDef * DMA_Handle
HAL_LockTypeDef Lock
__IO uint32_t State
__IO uint32_t ErrorCode
Field Documentation
ADC_TypeDef* ADC_HandleTypeDef::Instance
Register base address
ADC_InitTypeDef ADC_HandleTypeDef::Init
ADC required parameters
DMA_HandleTypeDef* ADC_HandleTypeDef::DMA_Handle
Pointer DMA Handler
HAL_LockTypeDef ADC_HandleTypeDef::Lock
ADC locking object
__IO uint32_t ADC_HandleTypeDef::State
ADC communication state (bitmap of ADC states)
__IO uint32_t ADC_HandleTypeDef::ErrorCode
ADC Error code
HAL_ADC_Init
Function name HAL_StatusTypeDef HAL_ADC_Init (ADC_HandleTypeDef *
hadc)
Function description Initializes the ADC peripheral and regular group according to
parameters specified in structure "ADC_InitTypeDef".
Parameters hadc: ADC handle
Return values HAL: status
Notes As prerequisite, ADC clock must be configured at RCC top
level depending on both possible clock sources: APB clock of
HSI clock. See commented example code below that can be
copied and uncommented into HAL_ADC_MspInit().
Possibility to update parameters on the flythis function
initializes the ADC MSP (HAL_ADC_MspInit()) only when
coming from ADC state reset. Following calls to this function
can be used to reconfigure some parameters of
ADC_InitTypeDef structure on the fly, without modifying MSP
HAL_ADC_DeInit
Function name HAL_StatusTypeDef HAL_ADC_DeInit (ADC_HandleTypeDef *
hadc)
Function description Deinitialize the ADC peripheral registers to their default reset
values, with deinitialization of the ADC MSP.
Parameters hadc: ADC handle
Return values HAL: status
Notes For devices with several ADCs: reset of ADC common
registers is done only if all ADCs sharing the same common
group are disabled. If this is not the case, reset of these
common parameters reset is bypassed without error
reporting: it can be the intended behaviour in case of reset of
a single ADC while the other ADCs sharing the same
common group is still running.
HAL_ADC_MspInit
Function name void HAL_ADC_MspInit (ADC_HandleTypeDef * hadc)
Function description Initializes the ADC MSP.
Parameters hadc: ADC handle
Return values None
HAL_ADC_MspDeInit
Function name void HAL_ADC_MspDeInit (ADC_HandleTypeDef * hadc)
Function description DeInitializes the ADC MSP.
Parameters hadc: ADC handle
Return values None
HAL_ADC_Start
Function name HAL_StatusTypeDef HAL_ADC_Start (ADC_HandleTypeDef *
hadc)
Function description Enables ADC, starts conversion of regular group.
Parameters hadc: ADC handle
Return values HAL: status
HAL_ADC_PollForConversion
Function name HAL_StatusTypeDef HAL_ADC_PollForConversion
(ADC_HandleTypeDef * hadc, uint32_t Timeout)
Function description Wait for regular group conversion to be completed.
Parameters hadc: ADC handle
Timeout: Timeout value in millisecond.
Return values HAL: status
Notes ADC conversion flags EOS (end of sequence) and EOC (end
of conversion) are cleared by this function, with an exception:
if low power feature "LowPowerAutoWait" is enabled, flags
are not cleared to not interfere with this feature until data
register is read using function HAL_ADC_GetValue().
This function cannot be used in a particular setup: ADC
configured in DMA mode and polling for end of each
conversion (ADC init parameter "EOCSelection" set to
ADC_EOC_SINGLE_CONV). In this case, DMA resets the
flag EOC and polling cannot be performed on each
conversion. Nevertheless, polling can still be performed on
the complete sequence (ADC init parameter "EOCSelection"
set to ADC_EOC_SEQ_CONV).
HAL_ADC_PollForEvent
Function name HAL_StatusTypeDef HAL_ADC_PollForEvent
(ADC_HandleTypeDef * hadc, uint32_t EventType, uint32_t
Timeout)
Function description Poll for conversion event.
Parameters hadc: ADC handle
EventType: the ADC event type. This parameter can be one
of the following values:
ADC_AWD_EVENT: ADC Analog watchdog event
ADC_OVR_EVENT: ADC Overrun event
Timeout: Timeout value in millisecond.
Return values HAL: status
HAL_ADC_Stop_IT
Function name HAL_StatusTypeDef HAL_ADC_Stop_IT (ADC_HandleTypeDef
* hadc)
Function description Stop ADC conversion of regular group, disable interruption of end-
of-conversion, disable ADC peripheral.
Parameters hadc: ADC handle
Return values HAL: status.
HAL_ADC_Start_DMA
Function name HAL_StatusTypeDef HAL_ADC_Start_DMA
(ADC_HandleTypeDef * hadc, uint32_t * pData, uint32_t
Length)
Function description Enables ADC, starts conversion of regular group and transfers
result through DMA.
HAL_ADC_Stop_DMA
Function name HAL_StatusTypeDef HAL_ADC_Stop_DMA
(ADC_HandleTypeDef * hadc)
Function description Stop ADC conversion of regular group, disable ADC DMA transfer,
disable ADC peripheral.
Parameters hadc: ADC handle
Return values HAL: status.
HAL_ADC_GetValue
Function name uint32_t HAL_ADC_GetValue (ADC_HandleTypeDef * hadc)
Function description Get ADC regular group conversion result.
Parameters hadc: ADC handle
Return values ADC: group regular conversion data
Notes Reading register DR automatically clears ADC flag EOC
(ADC group regular end of unitary conversion).
This function does not clear ADC flag EOS (ADC group
regular end of sequence conversion). Occurrence of flag EOS
rising: If sequencer is composed of 1 rank, flag EOS is
equivalent to flag EOC.If sequencer is composed of several
ranks, during the scan sequence flag EOC only is raised, at
the end of the scan sequence both flags EOC and EOS are
raised. To clear this flag, either use function: in programming
model IT: HAL_ADC_IRQHandler(), in programming model
HAL_ADC_IRQHandler
Function name void HAL_ADC_IRQHandler (ADC_HandleTypeDef * hadc)
Function description Handles ADC interrupt request.
Parameters hadc: ADC handle
Return values None
HAL_ADC_ConvCpltCallback
Function name void HAL_ADC_ConvCpltCallback (ADC_HandleTypeDef *
hadc)
Function description Conversion complete callback in non blocking mode.
Parameters hadc: ADC handle
Return values None
HAL_ADC_ConvHalfCpltCallback
Function name void HAL_ADC_ConvHalfCpltCallback (ADC_HandleTypeDef *
hadc)
Function description Conversion DMA half-transfer callback in non blocking mode.
Parameters hadc: ADC handle
Return values None
HAL_ADC_LevelOutOfWindowCallback
Function name void HAL_ADC_LevelOutOfWindowCallback
(ADC_HandleTypeDef * hadc)
Function description Analog watchdog callback in non blocking mode.
Parameters hadc: ADC handle
Return values None
HAL_ADC_ErrorCallback
Function name void HAL_ADC_ErrorCallback (ADC_HandleTypeDef * hadc)
Function description ADC error callback in non blocking mode (ADC conversion with
interruption or transfer by DMA)
Parameters hadc: ADC handle
Return values None
HAL_ADC_AnalogWDGConfig
Function name HAL_StatusTypeDef HAL_ADC_AnalogWDGConfig
(ADC_HandleTypeDef * hadc, ADC_AnalogWDGConfTypeDef *
AnalogWDGConfig)
Function description Configures the analog watchdog.
Parameters hadc: ADC handle
AnalogWDGConfig: Structure of ADC analog watchdog
configuration
Return values HAL: status
Notes Possibility to update parameters on the flythis function
initializes the selected analog watchdog, following calls to this
function can be used to reconfigure some parameters of
structure "ADC_AnalogWDGConfTypeDef" on the fly, without
reseting the ADC. The setting of these parameters is
conditioned to ADC state. For parameters constraints, see
comments of structure "ADC_AnalogWDGConfTypeDef".
HAL_ADC_GetState
Function name uint32_t HAL_ADC_GetState (ADC_HandleTypeDef * hadc)
Function description Return the ADC state.
Parameters hadc: ADC handle
Return values HAL: state
HAL_ADC_GetError
Function name uint32_t HAL_ADC_GetError (ADC_HandleTypeDef * hadc)
Function description Return the ADC error code.
Parameters hadc: ADC handle
Return values ADC: Error Code
HAL_ADCEx_Calibration_Start
Function name HAL_StatusTypeDef HAL_ADCEx_Calibration_Start
(ADC_HandleTypeDef * hadc)
Function description Perform an ADC automatic self-calibration Calibration prerequisite:
ADC must be disabled (execute this function before
HAL_ADC_Start() or after HAL_ADC_Stop() ).
Parameters hadc: ADC handle
Return values HAL: status
Notes Calibration factor can be read after calibration, using function
HAL_ADC_GetValue() (value on 7 bits: from DR[6;0]).
8.1.2 CAN_FilterConfTypeDef
Data Fields
uint32_t FilterIdHigh
uint32_t FilterIdLow
uint32_t FilterMaskIdHigh
uint32_t FilterMaskIdLow
uint32_t FilterFIFOAssignment
uint32_t FilterNumber
uint32_t FilterMode
uint32_t FilterScale
uint32_t FilterActivation
uint32_t BankNumber
Field Documentation
uint32_t CAN_FilterConfTypeDef::FilterIdHigh
Specifies the filter identification number (MSBs for a 32-bit configuration, first one for a
16-bit configuration). This parameter must be a number between Min_Data = 0x0000
and Max_Data = 0xFFFF.
uint32_t CAN_FilterConfTypeDef::FilterIdLow
Specifies the filter identification number (LSBs for a 32-bit configuration, second one
for a 16-bit configuration). This parameter must be a number between Min_Data =
0x0000 and Max_Data = 0xFFFF.
uint32_t CAN_FilterConfTypeDef::FilterMaskIdHigh
Specifies the filter mask number or identification number, according to the mode
(MSBs for a 32-bit configuration, first one for a 16-bit configuration). This parameter
must be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF.
uint32_t CAN_FilterConfTypeDef::FilterMaskIdLow
Specifies the filter mask number or identification number, according to the mode
(LSBs for a 32-bit configuration, second one for a 16-bit configuration). This parameter
must be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF.
uint32_t CAN_FilterConfTypeDef::FilterFIFOAssignment
Specifies the FIFO (0 or 1U) which will be assigned to the filter. This parameter can be
a value of CAN_filter_FIFO
uint32_t CAN_FilterConfTypeDef::FilterNumber
Specifies the filter which will be initialized. This parameter must be a number between
Min_Data = 0 and Max_Data = 27.
uint32_t CAN_FilterConfTypeDef::FilterMode
Specifies the filter mode to be initialized. This parameter can be a value of
CAN_filter_mode
uint32_t CAN_FilterConfTypeDef::FilterScale
Specifies the filter scale. This parameter can be a value of CAN_filter_scale
uint32_t CAN_FilterConfTypeDef::FilterActivation
Enable or disable the filter. This parameter can be set to ENABLE or DISABLE.
uint32_t CAN_FilterConfTypeDef::BankNumber
Select the start slave bank filter This parameter must be a number between Min_Data
= 0 and Max_Data = 28.
8.1.4 CanRxMsgTypeDef
Data Fields
uint32_t StdId
uint32_t ExtId
uint32_t IDE
uint32_t RTR
uint32_t DLC
uint8_t Data
uint32_t FMI
uint32_t FIFONumber
Field Documentation
uint32_t CanRxMsgTypeDef::StdId
Specifies the standard identifier. This parameter must be a number between Min_Data
= 0 and Max_Data = 0x7FF.
uint32_t CanRxMsgTypeDef::ExtId
Specifies the extended identifier. This parameter must be a number between
Min_Data = 0 and Max_Data = 0x1FFFFFFF.
uint32_t CanRxMsgTypeDef::IDE
Specifies the type of identifier for the message that will be received. This parameter
can be a value of CAN_identifier_type
8.1.5 CAN_HandleTypeDef
Data Fields
CAN_TypeDef * Instance
CAN_InitTypeDef Init
CanTxMsgTypeDef * pTxMsg
CanRxMsgTypeDef * pRxMsg
CanRxMsgTypeDef * pRx1Msg
HAL_LockTypeDef Lock
__IO HAL_CAN_StateTypeDef State
__IO uint32_t ErrorCode
Field Documentation
CAN_TypeDef* CAN_HandleTypeDef::Instance
Register base address
CAN_InitTypeDef CAN_HandleTypeDef::Init
CAN required parameters
CanTxMsgTypeDef* CAN_HandleTypeDef::pTxMsg
Pointer to transmit structure
CanRxMsgTypeDef* CAN_HandleTypeDef::pRxMsg
Pointer to reception structure for RX FIFO0 msg
CanRxMsgTypeDef* CAN_HandleTypeDef::pRx1Msg
Pointer to reception structure for RX FIFO1 msg
HAL_LockTypeDef CAN_HandleTypeDef::Lock
CAN locking object
__IO HAL_CAN_StateTypeDef CAN_HandleTypeDef::State
CAN communication state
__IO uint32_t CAN_HandleTypeDef::ErrorCode
CAN Error code This parameter can be a value of CAN_Error_Code
You can refer to the CAN HAL driver header file for more useful macros
HAL_CAN_Init
Function name HAL_StatusTypeDef HAL_CAN_Init (CAN_HandleTypeDef *
hcan)
Function description Initializes the CAN peripheral according to the specified
parameters in the CAN_InitStruct.
Parameters hcan: pointer to a CAN_HandleTypeDef structure that
contains the configuration information for the specified CAN.
Return values HAL: status
HAL_CAN_ConfigFilter
Function name HAL_StatusTypeDef HAL_CAN_ConfigFilter
(CAN_HandleTypeDef * hcan, CAN_FilterConfTypeDef *
sFilterConfig)
Function description Configures the CAN reception filter according to the specified
parameters in the CAN_FilterInitStruct.
Parameters hcan: pointer to a CAN_HandleTypeDef structure that
contains the configuration information for the specified CAN.
sFilterConfig: pointer to a CAN_FilterConfTypeDef structure
that contains the filter configuration information.
Return values None
HAL_CAN_DeInit
Function name HAL_StatusTypeDef HAL_CAN_DeInit (CAN_HandleTypeDef *
hcan)
Function description Deinitializes the CANx peripheral registers to their default reset
values.
Parameters hcan: pointer to a CAN_HandleTypeDef structure that
contains the configuration information for the specified CAN.
Return values HAL: status
HAL_CAN_MspDeInit
Function name void HAL_CAN_MspDeInit (CAN_HandleTypeDef * hcan)
Function description DeInitializes the CAN MSP.
Parameters hcan: pointer to a CAN_HandleTypeDef structure that
contains the configuration information for the specified CAN.
Return values None
HAL_CAN_Transmit
Function name HAL_StatusTypeDef HAL_CAN_Transmit
(CAN_HandleTypeDef * hcan, uint32_t Timeout)
Function description Initiates and transmits a CAN frame message.
Parameters hcan: pointer to a CAN_HandleTypeDef structure that
contains the configuration information for the specified CAN.
Timeout: Timeout duration.
Return values HAL: status
HAL_CAN_Transmit_IT
Function name HAL_StatusTypeDef HAL_CAN_Transmit_IT
(CAN_HandleTypeDef * hcan)
Function description Initiates and transmits a CAN frame message.
Parameters hcan: pointer to a CAN_HandleTypeDef structure that
contains the configuration information for the specified CAN.
Return values HAL: status
HAL_CAN_Receive
Function name HAL_StatusTypeDef HAL_CAN_Receive (CAN_HandleTypeDef
* hcan, uint8_t FIFONumber, uint32_t Timeout)
Function description Receives a correct CAN frame.
Parameters hcan: pointer to a CAN_HandleTypeDef structure that
contains the configuration information for the specified CAN.
FIFONumber: FIFO number.
Timeout: Timeout duration.
Return values HAL: status
HAL_CAN_Sleep
Function name HAL_StatusTypeDef HAL_CAN_Sleep (CAN_HandleTypeDef *
hcan)
Function description Enters the Sleep (low power) mode.
Parameters hcan: pointer to a CAN_HandleTypeDef structure that
contains the configuration information for the specified CAN.
Return values HAL: status.
HAL_CAN_WakeUp
Function name HAL_StatusTypeDef HAL_CAN_WakeUp
(CAN_HandleTypeDef * hcan)
Function description Wakes up the CAN peripheral from sleep mode, after that the CAN
peripheral is in the normal mode.
Parameters hcan: pointer to a CAN_HandleTypeDef structure that
contains the configuration information for the specified CAN.
Return values HAL: status.
HAL_CAN_IRQHandler
Function name void HAL_CAN_IRQHandler (CAN_HandleTypeDef * hcan)
Function description Handles CAN interrupt request.
Parameters hcan: pointer to a CAN_HandleTypeDef structure that
contains the configuration information for the specified CAN.
Return values None
HAL_CAN_TxCpltCallback
Function name void HAL_CAN_TxCpltCallback (CAN_HandleTypeDef * hcan)
Function description Transmission complete callback in non blocking mode.
Parameters hcan: pointer to a CAN_HandleTypeDef structure that
contains the configuration information for the specified CAN.
Return values None
HAL_CAN_ErrorCallback
Function name void HAL_CAN_ErrorCallback (CAN_HandleTypeDef * hcan)
Function description Error CAN callback.
Parameters hcan: pointer to a CAN_HandleTypeDef structure that
contains the configuration information for the specified CAN.
Return values None
HAL_CAN_GetError
Function name uint32_t HAL_CAN_GetError (CAN_HandleTypeDef * hcan)
Function description Return the CAN error code.
Parameters hcan: pointer to a CAN_HandleTypeDef structure that
contains the configuration information for the specified CAN.
Return values CAN: Error Code
HAL_CAN_GetState
Function name HAL_CAN_StateTypeDef HAL_CAN_GetState
(CAN_HandleTypeDef * hcan)
Function description return the CAN state
Parameters hcan: pointer to a CAN_HandleTypeDef structure that
contains the configuration information for the specified CAN.
Return values HAL: state
9.1.2 CEC_HandleTypeDef
Data Fields
CEC_TypeDef * Instance
CEC_InitTypeDef Init
uint8_t * pTxBuffPtr
uint16_t TxXferCount
uint16_t RxXferSize
HAL_LockTypeDef Lock
HAL_CEC_StateTypeDef gState
HAL_CEC_StateTypeDef RxState
uint32_t ErrorCode
Field Documentation
CEC_TypeDef* CEC_HandleTypeDef::Instance
CEC registers base address
CEC_InitTypeDef CEC_HandleTypeDef::Init
CEC communication parameters
uint8_t* CEC_HandleTypeDef::pTxBuffPtr
Pointer to CEC Tx transfer Buffer
uint16_t CEC_HandleTypeDef::TxXferCount
CEC Tx Transfer Counter
uint16_t CEC_HandleTypeDef::RxXferSize
CEC Rx Transfer size, 0: header received only
HAL_LockTypeDef CEC_HandleTypeDef::Lock
Locking object
HAL_CEC_StateTypeDef CEC_HandleTypeDef::gState
CEC state information related to global Handle management and also related to Tx
operations. This parameter can be a value of HAL_CEC_StateTypeDef
HAL_CEC_StateTypeDef CEC_HandleTypeDef::RxState
CEC state information related to Rx operations. This parameter can be a value of
HAL_CEC_StateTypeDef
This API (HAL_CEC_Init()) configures also the low level Hardware GPIO,
CLOCK, CORTEX...etc) by calling the customed HAL_CEC_MspInit() API.
HAL_CEC_Init
Function name HAL_StatusTypeDef HAL_CEC_Init (CEC_HandleTypeDef *
hcec)
Function description Initializes the CEC mode according to the specified parameters in
the CEC_InitTypeDef and creates the associated handle .
Parameters hcec: CEC handle
Return values HAL: status
HAL_CEC_DeInit
Function name HAL_StatusTypeDef HAL_CEC_DeInit (CEC_HandleTypeDef *
hcec)
Function description DeInitializes the CEC peripheral.
Parameters hcec: CEC handle
Return values HAL: status
HAL_CEC_SetDeviceAddress
Function name HAL_StatusTypeDef HAL_CEC_SetDeviceAddress
(CEC_HandleTypeDef * hcec, uint16_t CEC_OwnAddress)
Function description Initializes the Own Address of the CEC device.
Parameters hcec: CEC handle
CEC_OwnAddress: The CEC own address.
Return values HAL: status
HAL_CEC_MspDeInit
Function name void HAL_CEC_MspDeInit (CEC_HandleTypeDef * hcec)
Function description CEC MSP DeInit.
Parameters hcec: CEC handle
Return values None
HAL_CEC_Transmit_IT
Function name HAL_StatusTypeDef HAL_CEC_Transmit_IT
(CEC_HandleTypeDef * hcec, uint8_t InitiatorAddress, uint8_t
DestinationAddress, uint8_t * pData, uint32_t Size)
Function description Send data in interrupt mode.
Parameters hcec: CEC handle
InitiatorAddress: Initiator address
DestinationAddress: destination logical address
pData: pointer to input byte data buffer
Size: amount of data to be sent in bytes (without counting the
header). 0 means only the header is sent (ping operation).
Maximum TX size is 15 bytes (1 opcode and up to 14
operands).
Return values HAL: status
HAL_CEC_GetLastReceivedFrameSize
Function name uint32_t HAL_CEC_GetLastReceivedFrameSize
(CEC_HandleTypeDef * hcec)
Function description Get size of the received frame.
Parameters hcec: CEC handle
Return values Frame: size
HAL_CEC_ChangeRxBuffer
Function name void HAL_CEC_ChangeRxBuffer (CEC_HandleTypeDef * hcec,
uint8_t * Rxbuffer)
Function description Change Rx Buffer.
Parameters hcec: CEC handle
Rxbuffer: Rx Buffer
Return values Frame: size
HAL_CEC_IRQHandler
Function name void HAL_CEC_IRQHandler (CEC_HandleTypeDef * hcec)
Function description This function handles CEC interrupt requests.
Parameters hcec: CEC handle
Return values None
HAL_CEC_TxCpltCallback
Function name void HAL_CEC_TxCpltCallback (CEC_HandleTypeDef * hcec)
Function description Tx Transfer completed callback.
Parameters hcec: CEC handle
Return values None
HAL_CEC_RxCpltCallback
Function name void HAL_CEC_RxCpltCallback (CEC_HandleTypeDef * hcec,
uint32_t RxFrameSize)
Function description Rx Transfer completed callback.
Parameters hcec: CEC handle
RxFrameSize: Size of frame
Return values None
HAL_CEC_ErrorCallback
Function name void HAL_CEC_ErrorCallback (CEC_HandleTypeDef * hcec)
Function description CEC error callbacks.
Parameters hcec: CEC handle
Return values None
HAL_CEC_GetState
Function name HAL_CEC_StateTypeDef HAL_CEC_GetState
(CEC_HandleTypeDef * hcec)
Function description return the CEC state
Parameters hcec: pointer to a CEC_HandleTypeDef structure that
contains the configuration information for the specified CEC
module.
Return values HAL: state
10.1.2 COMP_HandleTypeDef
Data Fields
COMP_TypeDef * Instance
COMP_InitTypeDef Init
HAL_LockTypeDef Lock
__IO uint32_t State
Field Documentation
HAL_COMP_Init
Function name HAL_StatusTypeDef HAL_COMP_Init (COMP_HandleTypeDef
* hcomp)
Function description Initializes the COMP according to the specified parameters in the
COMP_InitTypeDef and create the associated handle.
Parameters hcomp: COMP handle
Return values HAL: status
HAL_COMP_DeInit
Function name HAL_StatusTypeDef HAL_COMP_DeInit
(COMP_HandleTypeDef * hcomp)
Function description DeInitializes the COMP peripheral.
Parameters hcomp: COMP handle
Return values HAL: status
Notes Deinitialization can't be performed if the COMP configuration
is locked. To unlock the configuration, perform a system
reset.
HAL_COMP_MspInit
Function name void HAL_COMP_MspInit (COMP_HandleTypeDef * hcomp)
Function description Initializes the COMP MSP.
Parameters hcomp: COMP handle
Return values None
HAL_COMP_MspDeInit
Function name void HAL_COMP_MspDeInit (COMP_HandleTypeDef * hcomp)
Function description DeInitializes COMP MSP.
Parameters hcomp: COMP handle
Return values None
HAL_COMP_Start
Function name HAL_StatusTypeDef HAL_COMP_Start
(COMP_HandleTypeDef * hcomp)
Function description Start the comparator.
Parameters hcomp: COMP handle
Return values HAL: status
HAL_COMP_Stop
Function name HAL_StatusTypeDef HAL_COMP_Stop
(COMP_HandleTypeDef * hcomp)
Function description Stop the comparator.
Parameters hcomp: COMP handle
Return values HAL: status
HAL_COMP_Stop_IT
Function name HAL_StatusTypeDef HAL_COMP_Stop_IT
(COMP_HandleTypeDef * hcomp)
Function description Disable the interrupt and Stop the comparator.
Parameters hcomp: COMP handle
Return values HAL: status
HAL_COMP_IRQHandler
Function name void HAL_COMP_IRQHandler (COMP_HandleTypeDef *
hcomp)
Function description Comparator IRQ Handler.
Parameters hcomp: COMP handle
Return values HAL: status
HAL_COMP_Lock
Function name HAL_StatusTypeDef HAL_COMP_Lock
(COMP_HandleTypeDef * hcomp)
Function description Lock the selected comparator configuration.
Parameters hcomp: COMP handle
Return values HAL: status
HAL_COMP_GetOutputLevel
Function name uint32_t HAL_COMP_GetOutputLevel (COMP_HandleTypeDef
* hcomp)
Function description Return the output level (high or low) of the selected comparator.
HAL_COMP_TriggerCallback
Function name void HAL_COMP_TriggerCallback (COMP_HandleTypeDef *
hcomp)
Function description Comparator callback.
Parameters hcomp: COMP handle
Return values None
HAL_NVIC_SetPriority
Function name void HAL_NVIC_SetPriority (IRQn_Type IRQn, uint32_t
PreemptPriority, uint32_t SubPriority)
Function description Sets the priority of an interrupt.
Parameters IRQn: External interrupt number . This parameter can be an
enumerator of IRQn_Type enumeration (For the complete
STM32 Devices IRQ Channels list, please refer to
stm32f0xx.h file)
PreemptPriority: The preemption priority for the IRQn
channel. This parameter can be a value between 0 and 3. A
lower priority value indicates a higher priority
SubPriority: the subpriority level for the IRQ channel. with
stm32f0xx devices, this parameter is a dummy value and it is
ignored, because no subpriority supported in Cortex M0
based products.
Return values None
HAL_NVIC_EnableIRQ
Function name void HAL_NVIC_EnableIRQ (IRQn_Type IRQn)
Function description Enables a device specific interrupt in the NVIC interrupt controller.
Parameters IRQn: External interrupt number. This parameter can be an
enumerator of IRQn_Type enumeration (For the complete
STM32 Devices IRQ Channels list, please refer to the
appropriate CMSIS device file (stm32f0xxxx.h))
Return values None
Notes To configure interrupts priority correctly, the
NVIC_PriorityGroupConfig() function should be called before.
HAL_NVIC_SystemReset
Function name void HAL_NVIC_SystemReset (void )
Function description Initiates a system reset request to reset the MCU.
Return values None
HAL_SYSTICK_Config
Function name uint32_t HAL_SYSTICK_Config (uint32_t TicksNumb)
Function description Initializes the System Timer and its interrupt, and starts the System
Tick Timer.
Parameters TicksNumb: Specifies the ticks Number of ticks between two
interrupts.
Return values status: - 0 Function succeeded.
1 Function failed.
HAL_NVIC_GetPriority
Function name uint32_t HAL_NVIC_GetPriority (IRQn_Type IRQn)
Function description Gets the priority of an interrupt.
Parameters IRQn: External interrupt number. This parameter can be an
enumerator of IRQn_Type enumeration (For the complete
STM32 Devices IRQ Channels list, please refer to the
appropriate CMSIS device file (stm32f0xxxx.h))
Return values None
HAL_NVIC_GetPendingIRQ
Function name uint32_t HAL_NVIC_GetPendingIRQ (IRQn_Type IRQn)
Function description Gets Pending Interrupt (reads the pending register in the NVIC
and returns the pending bit for the specified interrupt).
Parameters IRQn: External interrupt number. This parameter can be an
enumerator of IRQn_Type enumeration (For the complete
STM32 Devices IRQ Channels list, please refer to the
appropriate CMSIS device file (stm32f0xxxx.h))
Return values status: - 0 Interrupt status is not pending.
1 Interrupt status is pending.
HAL_NVIC_ClearPendingIRQ
Function name void HAL_NVIC_ClearPendingIRQ (IRQn_Type IRQn)
Function description Clears the pending bit of an external interrupt.
Parameters IRQn: External interrupt number. This parameter can be an
enumerator of IRQn_Type enumeration (For the complete
STM32 Devices IRQ Channels list, please refer to the
appropriate CMSIS device file (stm32f0xxxx.h))
Return values None
HAL_SYSTICK_CLKSourceConfig
Function name void HAL_SYSTICK_CLKSourceConfig (uint32_t CLKSource)
Function description Configures the SysTick clock source.
Parameters CLKSource: specifies the SysTick clock source. This
parameter can be one of the following values:
SYSTICK_CLKSOURCE_HCLK_DIV8: AHB clock
divided by 8 selected as SysTick clock source.
SYSTICK_CLKSOURCE_HCLK: AHB clock selected as
SysTick clock source.
Return values None
HAL_SYSTICK_IRQHandler
Function name void HAL_SYSTICK_IRQHandler (void )
Function description This function handles SYSTICK interrupt request.
Return values None
HAL_SYSTICK_Callback
Function name void HAL_SYSTICK_Callback (void )
Function description SYSTICK callback.
Return values None
12.1.2 CRC_HandleTypeDef
Data Fields
CRC_TypeDef * Instance
CRC_InitTypeDef Init
HAL_LockTypeDef Lock
__IO HAL_CRC_StateTypeDef State
uint32_t InputDataFormat
Field Documentation
CRC_TypeDef* CRC_HandleTypeDef::Instance
Register base address
CRC_InitTypeDef CRC_HandleTypeDef::Init
CRC configuration parameters
HAL_LockTypeDef CRC_HandleTypeDef::Lock
CRC Locking object
__IO HAL_CRC_StateTypeDef CRC_HandleTypeDef::State
CRC communication state
uint32_t CRC_HandleTypeDef::InputDataFormat
This parameter is a value of CRC_Input_Buffer_Format and specifies input data
format. Can be either CRC_INPUTDATA_FORMAT_BYTES input data is a stream of
bytes (8-bit data) CRC_INPUTDATA_FORMAT_HALFWORDS input data is a stream
of half-words (16-bit data) CRC_INPUTDATA_FORMAT_WORDS input data is a
stream of words (32-bits data) Note that constant
CRC_INPUT_FORMAT_UNDEFINED is defined but an initialization error must occur
if InputBufferFormat is not one of the three values listed above
HAL_CRC_Init
Function name HAL_StatusTypeDef HAL_CRC_Init (CRC_HandleTypeDef *
hcrc)
Function description Initialize the CRC according to the specified parameters in the
CRC_InitTypeDef and initialize the associated handle.
Parameters hcrc: CRC handle
Return values HAL: status
HAL_CRC_DeInit
Function name HAL_StatusTypeDef HAL_CRC_DeInit (CRC_HandleTypeDef *
hcrc)
Function description DeInitialize the CRC peripheral.
Parameters hcrc: CRC handle
Return values HAL: status
HAL_CRC_MspDeInit
Function name void HAL_CRC_MspDeInit (CRC_HandleTypeDef * hcrc)
Function description DeInitialize the CRC MSP.
Parameters hcrc: CRC handle
Return values None
HAL_CRC_Accumulate
Function name uint32_t HAL_CRC_Accumulate (CRC_HandleTypeDef * hcrc,
uint32_t pBuffer, uint32_t BufferLength)
Function description Compute the 7, 8, 16 or 32-bit CRC value of an 8, 16 or 32-bit data
buffer starting with the previously computed CRC as initialization
value.
Parameters hcrc: CRC handle
pBuffer: pointer to the input data buffer, exact input data
format is provided by hcrc->InputDataFormat.
BufferLength: input data buffer length (number of bytes if
pBuffer type is * uint8_t, number of half-words if pBuffer type
is * uint16_t, number of words if pBuffer type is * uint32_t).
Return values uint32_t: CRC (returned value LSBs for CRC shorter than 32
bits)
Notes By default, the API expects a uint32_t pointer as input buffer
parameter. Input buffer pointers with other types simply need
to be cast in uint32_t and the API will internally adjust its input
data processing based on the handle field hcrc-
>InputDataFormat.
HAL_CRC_Calculate
Function name uint32_t HAL_CRC_Calculate (CRC_HandleTypeDef * hcrc,
uint32_t pBuffer, uint32_t BufferLength)
Function description Compute the 7, 8, 16 or 32-bit CRC value of an 8, 16 or 32-bit data
buffer starting with hcrc->Instance->INIT as initialization value.
Parameters hcrc: CRC handle
pBuffer: pointer to the input data buffer, exact input data
format is provided by hcrc->InputDataFormat.
BufferLength: input data buffer length (number of bytes if
pBuffer type is * uint8_t, number of half-words if pBuffer type
is * uint16_t, number of words if pBuffer type is * uint32_t).
HAL_CRC_GetState
Function name HAL_CRC_StateTypeDef HAL_CRC_GetState
(CRC_HandleTypeDef * hcrc)
Function description Return the CRC handle state.
Parameters hcrc: CRC handle
Return values HAL: state
HAL_CRCEx_Init
Function name HAL_StatusTypeDef HAL_CRCEx_Init (CRC_HandleTypeDef *
hcrc)
Function description Extended initialization to set generating polynomial.
Parameters hcrc: CRC handle
Return values HAL: status
HAL_CRCEx_Input_Data_Reverse
Function name HAL_StatusTypeDef HAL_CRCEx_Input_Data_Reverse
(CRC_HandleTypeDef * hcrc, uint32_t InputReverseMode)
Function description Set the Reverse Input data mode.
Parameters hcrc: CRC handle
InputReverseMode: Input Data inversion mode This
parameter can be one of the following values:
CRC_INPUTDATA_NOINVERSION: no change in bit
order (default value)
CRC_INPUTDATA_INVERSION_BYTE: Byte-wise bit
reversal
CRC_INPUTDATA_INVERSION_HALFWORD:
HalfWord-wise bit reversal
CRC_INPUTDATA_INVERSION_WORD: Word-wise bit
HAL_CRCEx_Output_Data_Reverse
Function name HAL_StatusTypeDef HAL_CRCEx_Output_Data_Reverse
(CRC_HandleTypeDef * hcrc, uint32_t OutputReverseMode)
Function description Set the Reverse Output data mode.
Parameters hcrc: CRC handle
OutputReverseMode: Output Data inversion mode This
parameter can be one of the following values:
CRC_OUTPUTDATA_INVERSION_DISABLE: no CRC
inversion (default value)
CRC_OUTPUTDATA_INVERSION_ENABLE: bit-level
inversion (e.g for a 8-bit CRC: 0xB5 becomes 0xAD)
Return values HAL: status
HAL_CRCEx_Polynomial_Set
Function name HAL_StatusTypeDef HAL_CRCEx_Polynomial_Set
(CRC_HandleTypeDef * hcrc, uint32_t Pol, uint32_t
PolyLength)
Function description Initializes the CRC polynomial if different from default one.
Parameters hcrc: CRC handle
Pol: CRC generating polynomial (7, 8, 16 or 32-bit long) This
parameter is written in normal representation, e.g. for a
polynomial of degree 7, X^7 + X^6 + X^5 + X^2 + 1 is written
0x65 for a polynomial of degree 16, X^16 + X^12 + X^5 + 1 is
written 0x1021
PolyLength: CRC polynomial length This parameter can be
one of the following values:
CRC_POLYLENGTH_7B: 7-bit long CRC (generating
polynomial of degree 7)
CRC_POLYLENGTH_8B: 8-bit long CRC (generating
polynomial of degree 8)
CRC_POLYLENGTH_16B: 16-bit long CRC (generating
polynomial of degree 16)
CRC_POLYLENGTH_32B: 32-bit long CRC (generating
polynomial of degree 32)
Return values HAL: status
14.1.2 DAC_ChannelConfTypeDef
Data Fields
uint32_t DAC_Trigger
uint32_t DAC_OutputBuffer
Field Documentation
uint32_t DAC_ChannelConfTypeDef::DAC_Trigger
Specifies the external trigger for the selected DAC channel. This parameter can be a
value of DAC_trigger_selection
uint32_t DAC_ChannelConfTypeDef::DAC_OutputBuffer
Specifies whether the DAC channel output buffer is enabled or disabled. This
parameter can be a value of DAC_output_buffer
DAC Channels
STM32F0 devices integrates no, one or two 12-bit Digital Analog Converters. STM32F05x
devices have one converter (channel1) STM32F07x & STM32F09x devices have two
converters (i.e. channel1 & channel2) When 2 converters are present (i.e. channel1 &
channel2) they can be used independently or simultaneously (dual mode):
1. DAC channel1 with DAC_OUT1 (PA4) as output
2. DAC channel2 with DAC_OUT2 (PA5) as output
DAC Triggers
Digital to Analog conversion can be non-triggered using DAC_TRIGGER_NONE and
DAC_OUT1/DAC_OUT2 is available once writing to DHRx register.
Digital to Analog conversion can be triggered by:
1. External event: EXTI Line 9 (any GPIOx_PIN_9) using DAC_TRIGGER_EXT_IT9.
The used pin (GPIOx_PIN_9) must be configured in input mode.
2. Timers TRGO: TIM2, TIM3, TIM6, and TIM15 (DAC_TRIGGER_T2_TRGO,
DAC_TRIGGER_T3_TRGO...)
3. Software using DAC_TRIGGER_SOFTWARE
Refer to the device datasheet for more details about output impedance value with
and without output buffer.
DMA requests
A DMA1 request can be generated when an external trigger (but not a software trigger)
occurs if DMA1 requests are enabled using HAL_DAC_Start_DMA()
For Dual mode and specific signal (Triangle and noise) generation please refer to
Extended Features Driver description STM32F0 devices with one channel (one
converting capability) does not support Dual mode and specific signal (Triangle
and noise) generation.
You can refer to the DAC HAL driver header file for more useful macros
HAL_DAC_Init
Function name HAL_StatusTypeDef HAL_DAC_Init (DAC_HandleTypeDef *
hdac)
Function description Initialize the DAC peripheral according to the specified parameters
in the DAC_InitStruct and initialize the associated handle.
Parameters hdac: pointer to a DAC_HandleTypeDef structure that
contains the configuration information for the specified DAC.
Return values HAL: status
HAL_DAC_DeInit
Function name HAL_StatusTypeDef HAL_DAC_DeInit (DAC_HandleTypeDef *
hdac)
Function description Deinitialize the DAC peripheral registers to their default reset
values.
Parameters hdac: pointer to a DAC_HandleTypeDef structure that
contains the configuration information for the specified DAC.
Return values HAL: status
HAL_DAC_MspDeInit
Function name void HAL_DAC_MspDeInit (DAC_HandleTypeDef * hdac)
Function description DeInitialize the DAC MSP.
Parameters hdac: pointer to a DAC_HandleTypeDef structure that
contains the configuration information for the specified DAC.
Return values None
HAL_DAC_Start
Function name HAL_StatusTypeDef HAL_DAC_Start (DAC_HandleTypeDef *
hdac, uint32_t Channel)
Function description Enables DAC and starts conversion of channel.
Parameters hdac: pointer to a DAC_HandleTypeDef structure that
contains the configuration information for the specified DAC.
Channel: The selected DAC channel. This parameter can be
one of the following values:
DAC_CHANNEL_1: DAC Channel1 selected
DAC_CHANNEL_2: DAC Channel2 selected
Return values HAL: status
HAL_DAC_Stop
Function name HAL_StatusTypeDef HAL_DAC_Stop (DAC_HandleTypeDef *
hdac, uint32_t Channel)
Function description Disables DAC and stop conversion of channel.
Parameters hdac: pointer to a DAC_HandleTypeDef structure that
contains the configuration information for the specified DAC.
Channel: The selected DAC channel. This parameter can be
one of the following values:
DAC_CHANNEL_1: DAC Channel1 selected
DAC_CHANNEL_2: DAC Channel2 selected
Return values HAL: status
HAL_DAC_Stop_DMA
Function name HAL_StatusTypeDef HAL_DAC_Stop_DMA
(DAC_HandleTypeDef * hdac, uint32_t Channel)
Function description Disables DAC and stop conversion of channel.
Parameters hdac: pointer to a DAC_HandleTypeDef structure that
contains the configuration information for the specified DAC.
Channel: The selected DAC channel. This parameter can be
one of the following values:
DAC_CHANNEL_1: DAC Channel1 selected
DAC_CHANNEL_2: DAC Channel2 selected
Return values HAL: status
HAL_DAC_IRQHandler
Function name void HAL_DAC_IRQHandler (DAC_HandleTypeDef * hdac)
Function description Handles DAC interrupt request.
Parameters hdac: pointer to a DAC_HandleTypeDef structure that
contains the configuration information for the specified DAC.
Return values None
HAL_DAC_ConvCpltCallbackCh1
Function name void HAL_DAC_ConvCpltCallbackCh1 (DAC_HandleTypeDef *
hdac)
Function description Conversion complete callback in non blocking mode for Channel1.
Parameters hdac: pointer to a DAC_HandleTypeDef structure that
contains the configuration information for the specified DAC.
Return values None
HAL_DAC_ConvHalfCpltCallbackCh1
Function name void HAL_DAC_ConvHalfCpltCallbackCh1
(DAC_HandleTypeDef * hdac)
Function description Conversion half DMA transfer callback in non-blocking mode for
Channel1.
Parameters hdac: pointer to a DAC_HandleTypeDef structure that
contains the configuration information for the specified DAC.
Return values None
HAL_DAC_ErrorCallbackCh1
Function name void HAL_DAC_ErrorCallbackCh1 (DAC_HandleTypeDef *
hdac)
Function description Error DAC callback for Channel1.
Parameters hdac: pointer to a DAC_HandleTypeDef structure that
contains the configuration information for the specified DAC.
Return values None
HAL_DAC_GetValue
Function name uint32_t HAL_DAC_GetValue (DAC_HandleTypeDef * hdac,
uint32_t Channel)
Function description Returns the last data output value of the selected DAC channel.
Parameters hdac: pointer to a DAC_HandleTypeDef structure that
contains the configuration information for the specified DAC.
Channel: The selected DAC channel. This parameter can be
one of the following values:
DAC_CHANNEL_1: DAC Channel1 selected
DAC_CHANNEL_2: DAC Channel2 selected
Return values The: selected DAC channel data output value.
HAL_DAC_ConfigChannel
Function name HAL_StatusTypeDef HAL_DAC_ConfigChannel
(DAC_HandleTypeDef * hdac, DAC_ChannelConfTypeDef *
sConfig, uint32_t Channel)
Function description Configures the selected DAC channel.
Parameters hdac: pointer to a DAC_HandleTypeDef structure that
contains the configuration information for the specified DAC.
sConfig: DAC configuration structure.
Channel: The selected DAC channel. This parameter can be
one of the following values:
DAC_CHANNEL_1: DAC Channel1 selected
DAC_CHANNEL_2: DAC Channel2 selected
Return values HAL: status
HAL_DAC_GetState
Function name HAL_DAC_StateTypeDef HAL_DAC_GetState
(DAC_HandleTypeDef * hdac)
Function description return the DAC handle state
Parameters hdac: pointer to a DAC_HandleTypeDef structure that
contains the configuration information for the specified DAC.
Return values HAL: state
HAL_DACEx_TriangleWaveGenerate
Function name HAL_StatusTypeDef HAL_DACEx_TriangleWaveGenerate
(DAC_HandleTypeDef * hdac, uint32_t Channel, uint32_t
Amplitude)
Function description Enables or disables the selected DAC channel wave generation.
Parameters hdac: pointer to a DAC_HandleTypeDef structure that
contains the configuration information for the specified DAC.
Channel: The selected DAC channel. This parameter can be
one of the following values: DAC_CHANNEL_1 /
DAC_CHANNEL_2
Amplitude: Select max triangle amplitude. This parameter
can be one of the following values:
DAC_TRIANGLEAMPLITUDE_1: Select max triangle
amplitude of 1
DAC_TRIANGLEAMPLITUDE_3: Select max triangle
HAL_DACEx_NoiseWaveGenerate
Function name HAL_StatusTypeDef HAL_DACEx_NoiseWaveGenerate
(DAC_HandleTypeDef * hdac, uint32_t Channel, uint32_t
Amplitude)
Function description Enables or disables the selected DAC channel wave generation.
Parameters hdac: pointer to a DAC_HandleTypeDef structure that
contains the configuration information for the specified DAC.
Channel: The selected DAC channel. This parameter can be
one of the following values: DAC_CHANNEL_1 /
DAC_CHANNEL_2
Amplitude: Unmask DAC channel LFSR for noise wave
generation. This parameter can be one of the following
values:
DAC_LFSRUNMASK_BIT0: Unmask DAC channel
LFSR bit0 for noise wave generation
DAC_LFSRUNMASK_BITS1_0: Unmask DAC channel
LFSR bit[1:0] for noise wave generation
DAC_LFSRUNMASK_BITS2_0: Unmask DAC channel
LFSR bit[2:0] for noise wave generation
DAC_LFSRUNMASK_BITS3_0: Unmask DAC channel
LFSR bit[3:0] for noise wave generation
DAC_LFSRUNMASK_BITS4_0: Unmask DAC channel
LFSR bit[4:0] for noise wave generation
DAC_LFSRUNMASK_BITS5_0: Unmask DAC channel
LFSR bit[5:0] for noise wave generation
DAC_LFSRUNMASK_BITS6_0: Unmask DAC channel
LFSR bit[6:0] for noise wave generation
DAC_LFSRUNMASK_BITS7_0: Unmask DAC channel
HAL_DACEx_DualSetValue
Function name HAL_StatusTypeDef HAL_DACEx_DualSetValue
(DAC_HandleTypeDef * hdac, uint32_t Alignment, uint32_t
Data1, uint32_t Data2)
Function description Set the specified data holding register value for dual DAC channel.
Parameters hdac: pointer to a DAC_HandleTypeDef structure that
contains the configuration information for the specified DAC.
Alignment: Specifies the data alignment for dual channel
DAC. This parameter can be one of the following values:
DAC_ALIGN_8B_R: 8bit right data alignment selected
DAC_ALIGN_12B_L: 12bit left data alignment selected
DAC_ALIGN_12B_R: 12bit right data alignment selected
Data1: Data for DAC Channel2 to be loaded in the selected
data holding register.
Data2: Data for DAC Channel1 to be loaded in the selected
data holding register.
Return values HAL: status
Notes In dual mode, a unique register access is required to write in
both DAC channels at the same time.
HAL_DACEx_ConvCpltCallbackCh2
Function name void HAL_DACEx_ConvCpltCallbackCh2
(DAC_HandleTypeDef * hdac)
Function description Conversion complete callback in non blocking mode for Channel2.
Parameters hdac: pointer to a DAC_HandleTypeDef structure that
contains the configuration information for the specified DAC.
Return values None
HAL_DACEx_ErrorCallbackCh2
Function name void HAL_DACEx_ErrorCallbackCh2 (DAC_HandleTypeDef *
hdac)
Function description Error DAC callback for Channel2.
Parameters hdac: pointer to a DAC_HandleTypeDef structure that
contains the configuration information for the specified DAC.
Return values None
HAL_DACEx_DMAUnderrunCallbackCh2
Function name void HAL_DACEx_DMAUnderrunCallbackCh2
(DAC_HandleTypeDef * hdac)
Function description DMA underrun DAC callback for channel2.
Parameters hdac: pointer to a DAC_HandleTypeDef structure that
contains the configuration information for the specified DAC.
Return values None
HAL_DACEx_DualGetValue
Function name uint32_t HAL_DACEx_DualGetValue (DAC_HandleTypeDef *
hdac)
Function description Returns the last data output value of the selected DAC channel.
Parameters hdac: pointer to a DAC_HandleTypeDef structure that
contains the configuration information for the specified DAC.
Return values The: selected DAC channel data output value.
16.1.2 __DMA_HandleTypeDef
Data Fields
DMA_Channel_TypeDef * Instance
DMA_InitTypeDef Init
HAL_LockTypeDef Lock
__IO HAL_DMA_StateTypeDef State
void * Parent
void(* XferCpltCallback
void(* XferHalfCpltCallback
You can refer to the DMA HAL driver header file for more useful macros
HAL_DMA_Init
Function name HAL_StatusTypeDef HAL_DMA_Init (DMA_HandleTypeDef *
hdma)
Function description Initialize the DMA according to the specified parameters in the
DMA_InitTypeDef and initialize the associated handle.
Parameters hdma: Pointer to a DMA_HandleTypeDef structure that
contains the configuration information for the specified DMA
Channel.
Return values HAL: status
HAL_DMA_DeInit
Function name HAL_StatusTypeDef HAL_DMA_DeInit (DMA_HandleTypeDef *
hdma)
Function description DeInitialize the DMA peripheral.
Parameters hdma: pointer to a DMA_HandleTypeDef structure that
contains the configuration information for the specified DMA
Channel.
Return values HAL: status
HAL_DMA_Start
Function name HAL_StatusTypeDef HAL_DMA_Start (DMA_HandleTypeDef *
hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t
DataLength)
Function description Start the DMA Transfer.
Parameters hdma: pointer to a DMA_HandleTypeDef structure that
contains the configuration information for the specified DMA
Channel.
SrcAddress: The source memory Buffer address
DstAddress: The destination memory Buffer address
HAL_DMA_Start_IT
Function name HAL_StatusTypeDef HAL_DMA_Start_IT
(DMA_HandleTypeDef * hdma, uint32_t SrcAddress, uint32_t
DstAddress, uint32_t DataLength)
Function description Start the DMA Transfer with interrupt enabled.
Parameters hdma: pointer to a DMA_HandleTypeDef structure that
contains the configuration information for the specified DMA
Channel.
SrcAddress: The source memory Buffer address
DstAddress: The destination memory Buffer address
DataLength: The length of data to be transferred from
source to destination
Return values HAL: status
HAL_DMA_Abort
Function name HAL_StatusTypeDef HAL_DMA_Abort (DMA_HandleTypeDef *
hdma)
Function description Abort the DMA Transfer.
Parameters hdma: pointer to a DMA_HandleTypeDef structure that
contains the configuration information for the specified DMA
Channel.
Return values HAL: status
HAL_DMA_Abort_IT
Function name HAL_StatusTypeDef HAL_DMA_Abort_IT
(DMA_HandleTypeDef * hdma)
Function description Abort the DMA Transfer in Interrupt mode.
Parameters hdma: pointer to a DMA_HandleTypeDef structure that
contains the configuration information for the specified DMA
Stream.
Return values HAL: status
HAL_DMA_PollForTransfer
Function name HAL_StatusTypeDef HAL_DMA_PollForTransfer
(DMA_HandleTypeDef * hdma, uint32_t CompleteLevel,
uint32_t Timeout)
Function description Polling for transfer complete.
Parameters hdma: pointer to a DMA_HandleTypeDef structure that
contains the configuration information for the specified DMA
Channel.
HAL_DMA_IRQHandler
Function name void HAL_DMA_IRQHandler (DMA_HandleTypeDef * hdma)
Function description Handle DMA interrupt request.
Parameters hdma: pointer to a DMA_HandleTypeDef structure that
contains the configuration information for the specified DMA
Channel.
Return values None
HAL_DMA_RegisterCallback
Function name HAL_StatusTypeDef HAL_DMA_RegisterCallback
(DMA_HandleTypeDef * hdma, HAL_DMA_CallbackIDTypeDef
CallbackID, void(*)(DMA_HandleTypeDef *_hdma) pCallback)
Function description Register callbacks.
Parameters hdma: pointer to a DMA_HandleTypeDef structure that
contains the configuration information for the specified DMA
Stream.
CallbackID: User Callback identifer a
HAL_DMA_CallbackIDTypeDef ENUM as parameter.
pCallback: pointer to private callback function which has
pointer to a DMA_HandleTypeDef structure as parameter.
Return values HAL: status
HAL_DMA_UnRegisterCallback
Function name HAL_StatusTypeDef HAL_DMA_UnRegisterCallback
(DMA_HandleTypeDef * hdma, HAL_DMA_CallbackIDTypeDef
CallbackID)
Function description UnRegister callbacks.
Parameters hdma: pointer to a DMA_HandleTypeDef structure that
contains the configuration information for the specified DMA
Stream.
CallbackID: User Callback identifer a
HAL_DMA_CallbackIDTypeDef ENUM as parameter.
Return values HAL: status
HAL_DMA_GetError
Function name uint32_t HAL_DMA_GetError (DMA_HandleTypeDef * hdma)
Function description Return the DMA error code.
Parameters hdma: pointer to a DMA_HandleTypeDef structure that
contains the configuration information for the specified DMA
Channel.
Return values DMA: Error Code
HAL_FLASH_Program
Function name HAL_StatusTypeDef HAL_FLASH_Program (uint32_t
TypeProgram, uint32_t Address, uint64_t Data)
Function description Program halfword, word or double word at a specified address.
Parameters TypeProgram: Indicate the way to program at a specified
address. This parameter can be a value of FLASH Type
Program
Address: Specifie the address to be programmed.
Data: Specifie the data to be programmed
Return values HAL_StatusTypeDef: HAL Status
Notes The function HAL_FLASH_Unlock() should be called before
to unlock the FLASH interface The function
HAL_FLASH_Lock() should be called after to lock the FLASH
interface
If an erase and a program operations are requested
simultaneously, the erase operation is performed before the
program one.
FLASH should be previously erased before new
programmation (only exception to this is when 0x0000 is
programmed)
HAL_FLASH_Program_IT
Function name HAL_StatusTypeDef HAL_FLASH_Program_IT (uint32_t
TypeProgram, uint32_t Address, uint64_t Data)
Function description Program halfword, word or double word at a specified address with
interrupt enabled.
Parameters TypeProgram: Indicate the way to program at a specified
address. This parameter can be a value of FLASH Type
Program
Address: Specifie the address to be programmed.
Data: Specifie the data to be programmed
Return values HAL_StatusTypeDef: HAL Status
Notes The function HAL_FLASH_Unlock() should be called before
to unlock the FLASH interface The function
HAL_FLASH_Lock() should be called after to lock the FLASH
interface
If an erase and a program operations are requested
simultaneously, the erase operation is performed before the
program one.
HAL_FLASH_IRQHandler
Function name void HAL_FLASH_IRQHandler (void )
Function description This function handles FLASH interrupt request.
Return values None
HAL_FLASH_OperationErrorCallback
Function name void HAL_FLASH_OperationErrorCallback (uint32_t
ReturnValue)
Function description FLASH operation error interrupt callback.
Parameters ReturnValue: The value saved in this parameter depends on
the ongoing procedure
Mass Erase: No return value expected
Pages Erase: Address of the page which returned an
error
Program: Address which was selected for data program
Return values None
HAL_FLASH_Unlock
Function name HAL_StatusTypeDef HAL_FLASH_Unlock (void )
Function description Unlock the FLASH control register access.
Return values HAL: Status
HAL_FLASH_Lock
Function name HAL_StatusTypeDef HAL_FLASH_Lock (void )
Function description Locks the FLASH control register access.
Return values HAL: Status
HAL_FLASH_OB_Unlock
Function name HAL_StatusTypeDef HAL_FLASH_OB_Unlock (void )
Function description Unlock the FLASH Option Control Registers access.
Return values HAL: Status
HAL_FLASH_OB_Launch
Function name HAL_StatusTypeDef HAL_FLASH_OB_Launch (void )
Function description Launch the option byte loading.
Return values HAL: Status
Notes This function will reset automatically the MCU.
HAL_FLASH_GetError
Function name uint32_t HAL_FLASH_GetError (void )
Function description Get the specific FLASH error flag.
Return values FLASH_ErrorCode: The returned value can be: FLASH
Error Codes
FLASH_WaitForLastOperation
Function name HAL_StatusTypeDef FLASH_WaitForLastOperation (uint32_t
Timeout)
Function description Wait for a FLASH operation to complete.
Parameters Timeout: maximum flash operation timeout
Return values HAL: Status
19.1.2 FLASH_OBProgramInitTypeDef
Data Fields
uint32_t OptionType
uint32_t WRPState
uint32_t WRPPage
uint8_t RDPLevel
uint8_t USERConfig
uint32_t DATAAddress
uint8_t DATAData
Field Documentation
uint32_t FLASH_OBProgramInitTypeDef::OptionType
OptionType: Option byte to be configured. This parameter can be a value of
FLASHEx_OB_Type
uint32_t FLASH_OBProgramInitTypeDef::WRPState
WRPState: Write protection activation or deactivation. This parameter can be a value
of FLASHEx_OB_WRP_State
uint32_t FLASH_OBProgramInitTypeDef::WRPPage
WRPPage: specifies the page(s) to be write protected This parameter can be a value
of FLASHEx_OB_Write_Protection
uint8_t FLASH_OBProgramInitTypeDef::RDPLevel
RDPLevel: Set the read protection level.. This parameter can be a value of
FLASHEx_OB_Read_Protection
uint8_t FLASH_OBProgramInitTypeDef::USERConfig
USERConfig: Program the FLASH User Option Byte: IWDG / STOP / STDBY /
BOOT1 / VDDA_ANALOG / SRAM_PARITY This parameter can be a combination of
FLASHEx_OB_IWatchdog, FLASHEx_OB_nRST_STOP,
HAL_FLASHEx_Erase
Function name HAL_StatusTypeDef HAL_FLASHEx_Erase
(FLASH_EraseInitTypeDef * pEraseInit, uint32_t * PageError)
Function description Perform a mass erase or erase the specified FLASH memory
pages.
Parameters pEraseInit: pointer to an FLASH_EraseInitTypeDef structure
that contains the configuration information for the erasing.
PageError: pointer to variable that contains the configuration
information on faulty page in case of error (0xFFFFFFFF
HAL_FLASHEx_Erase_IT
Function name HAL_StatusTypeDef HAL_FLASHEx_Erase_IT
(FLASH_EraseInitTypeDef * pEraseInit)
Function description Perform a mass erase or erase the specified FLASH memory
pages with interrupt enabled.
Parameters pEraseInit: pointer to an FLASH_EraseInitTypeDef structure
that contains the configuration information for the erasing.
Return values HAL_StatusTypeDef: HAL Status
Notes To correctly run this function, the HAL_FLASH_Unlock()
function must be called before. Call the HAL_FLASH_Lock()
to disable the flash memory access (recommended to protect
the FLASH memory against possible unwanted operation)
HAL_FLASHEx_OBErase
Function name HAL_StatusTypeDef HAL_FLASHEx_OBErase (void )
Function description Erases the FLASH option bytes.
Return values HAL: status
Notes This functions erases all option bytes except the Read
protection (RDP). The function HAL_FLASH_Unlock() should
be called before to unlock the FLASH interface The function
HAL_FLASH_OB_Unlock() should be called before to unlock
the options bytes The function HAL_FLASH_OB_Launch()
should be called after to force the reload of the options bytes
(system reset will occur)
HAL_FLASHEx_OBProgram
Function name HAL_StatusTypeDef HAL_FLASHEx_OBProgram
(FLASH_OBProgramInitTypeDef * pOBInit)
Function description Program option bytes.
Parameters pOBInit: pointer to an FLASH_OBInitStruct structure that
contains the configuration information for the programming.
Return values HAL_StatusTypeDef: HAL Status
Notes The function HAL_FLASH_Unlock() should be called before
to unlock the FLASH interface The function
HAL_FLASH_OB_Unlock() should be called before to unlock
the options bytes The function HAL_FLASH_OB_Launch()
should be called after to force the reload of the options bytes
HAL_FLASHEx_OBGetConfig
Function name void HAL_FLASHEx_OBGetConfig
(FLASH_OBProgramInitTypeDef * pOBInit)
Function description Get the Option byte configuration.
Parameters pOBInit: pointer to an FLASH_OBInitStruct structure that
contains the configuration information for the programming.
Return values None
HAL_FLASHEx_OBGetUserData
Function name uint32_t HAL_FLASHEx_OBGetUserData (uint32_t
DATAAdress)
Function description Get the Option byte user data.
Parameters DATAAdress: Address of the option byte DATA This
parameter can be one of the following values:
OB_DATA_ADDRESS_DATA0
OB_DATA_ADDRESS_DATA1
Return values Value: programmed in USER data
HAL_GPIO_Init
Function name void HAL_GPIO_Init (GPIO_TypeDef * GPIOx,
GPIO_InitTypeDef * GPIO_Init)
Function description Initialize the GPIOx peripheral according to the specified
parameters in the GPIO_Init.
Parameters GPIOx: where x can be (A..F) to select the GPIO peripheral
for STM32F0 family
GPIO_Init: pointer to a GPIO_InitTypeDef structure that
contains the configuration information for the specified GPIO
peripheral.
Return values None
HAL_GPIO_DeInit
Function name void HAL_GPIO_DeInit (GPIO_TypeDef * GPIOx, uint32_t
GPIO_Pin)
Function description De-initialize the GPIOx peripheral registers to their default reset
values.
Parameters GPIOx: where x can be (A..F) to select the GPIO peripheral
for STM32F0 family
GPIO_Pin: specifies the port bit to be written. This parameter
can be one of GPIO_PIN_x where x can be (0..15).
Return values None
HAL_GPIO_ReadPin
Function name GPIO_PinState HAL_GPIO_ReadPin (GPIO_TypeDef * GPIOx,
uint16_t GPIO_Pin)
Function description Read the specified input port pin.
Parameters GPIOx: where x can be (A..F) to select the GPIO peripheral
for STM32F0 family
GPIO_Pin: specifies the port bit to read. This parameter can
be GPIO_PIN_x where x can be (0..15).
Return values The: input port pin value.
HAL_GPIO_WritePin
Function name void HAL_GPIO_WritePin (GPIO_TypeDef * GPIOx, uint16_t
GPIO_Pin, GPIO_PinState PinState)
Function description Set or clear the selected data port bit.
HAL_GPIO_TogglePin
Function name void HAL_GPIO_TogglePin (GPIO_TypeDef * GPIOx, uint16_t
GPIO_Pin)
Function description Toggle the specified GPIO pin.
Parameters GPIOx: where x can be (A..F) to select the GPIO peripheral
for STM32F0 family
GPIO_Pin: specifies the pin to be toggled.
Return values None
HAL_GPIO_LockPin
Function name HAL_StatusTypeDef HAL_GPIO_LockPin (GPIO_TypeDef *
GPIOx, uint16_t GPIO_Pin)
Function description Locks GPIO Pins configuration registers.
Parameters GPIOx: where x can be (A..F) to select the GPIO peripheral
for STM32F0 family
GPIO_Pin: specifies the port bits to be locked. This
parameter can be any combination of GPIO_Pin_x where x
can be (0..15).
Return values None
Notes The locked registers are GPIOx_MODER, GPIOx_OTYPER,
GPIOx_OSPEEDR, GPIOx_PUPDR, GPIOx_AFRL and
GPIOx_AFRH.
The configuration of the locked GPIO pins can no longer be
modified until the next reset.
HAL_GPIO_EXTI_IRQHandler
Function name void HAL_GPIO_EXTI_IRQHandler (uint16_t GPIO_Pin)
Function description Handle EXTI interrupt request.
Parameters GPIO_Pin: Specifies the port pin connected to corresponding
EXTI line.
HAL_GPIO_EXTI_Callback
Function name void HAL_GPIO_EXTI_Callback (uint16_t GPIO_Pin)
Function description EXTI line detection callback.
Parameters GPIO_Pin: Specifies the port pin connected to corresponding
EXTI line.
Return values None
22.1.2 __I2C_HandleTypeDef
Data Fields
I2C_TypeDef * Instance
I2C_InitTypeDef Init
uint8_t * pBuffPtr
uint16_t XferSize
__IO uint16_t XferCount
You can refer to the I2C HAL driver header file for more useful macros
HAL_I2C_Init
Function name HAL_StatusTypeDef HAL_I2C_Init (I2C_HandleTypeDef * hi2c)
Function description Initializes the I2C according to the specified parameters in the
I2C_InitTypeDef and initialize the associated handle.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
Return values HAL: status
HAL_I2C_DeInit
Function name HAL_StatusTypeDef HAL_I2C_DeInit (I2C_HandleTypeDef *
hi2c)
Function description DeInitialize the I2C peripheral.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
Return values HAL: status
HAL_I2C_MspInit
Function name void HAL_I2C_MspInit (I2C_HandleTypeDef * hi2c)
Function description Initialize the I2C MSP.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
Return values None
HAL_I2C_MspDeInit
Function name void HAL_I2C_MspDeInit (I2C_HandleTypeDef * hi2c)
Function description DeInitialize the I2C MSP.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
Return values None
HAL_I2C_Master_Receive
Function name HAL_StatusTypeDef HAL_I2C_Master_Receive
(I2C_HandleTypeDef * hi2c, uint16_t DevAddress, uint8_t *
pData, uint16_t Size, uint32_t Timeout)
Function description Receives in master mode an amount of data in blocking mode.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
DevAddress: Target device address: The device 7 bits
address value in datasheet must be shift at right before call
interface
pData: Pointer to data buffer
Size: Amount of data to be sent
Timeout: Timeout duration
Return values HAL: status
HAL_I2C_Slave_Transmit
Function name HAL_StatusTypeDef HAL_I2C_Slave_Transmit
(I2C_HandleTypeDef * hi2c, uint8_t * pData, uint16_t Size,
uint32_t Timeout)
Function description Transmits in slave mode an amount of data in blocking mode.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
pData: Pointer to data buffer
Size: Amount of data to be sent
Timeout: Timeout duration
Return values HAL: status
HAL_I2C_Mem_Write
Function name HAL_StatusTypeDef HAL_I2C_Mem_Write
(I2C_HandleTypeDef * hi2c, uint16_t DevAddress, uint16_t
MemAddress, uint16_t MemAddSize, uint8_t * pData, uint16_t
Size, uint32_t Timeout)
Function description Write an amount of data in blocking mode to a specific memory
address.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
DevAddress: Target device address: The device 7 bits
address value in datasheet must be shift at right before call
interface
MemAddress: Internal memory address
MemAddSize: Size of internal memory address
pData: Pointer to data buffer
Size: Amount of data to be sent
Timeout: Timeout duration
Return values HAL: status
HAL_I2C_Mem_Read
Function name HAL_StatusTypeDef HAL_I2C_Mem_Read
(I2C_HandleTypeDef * hi2c, uint16_t DevAddress, uint16_t
MemAddress, uint16_t MemAddSize, uint8_t * pData, uint16_t
Size, uint32_t Timeout)
Function description Read an amount of data in blocking mode from a specific memory
address.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
DevAddress: Target device address: The device 7 bits
address value in datasheet must be shift at right before call
interface
MemAddress: Internal memory address
MemAddSize: Size of internal memory address
pData: Pointer to data buffer
Size: Amount of data to be sent
HAL_I2C_IsDeviceReady
Function name HAL_StatusTypeDef HAL_I2C_IsDeviceReady
(I2C_HandleTypeDef * hi2c, uint16_t DevAddress, uint32_t
Trials, uint32_t Timeout)
Function description Checks if target device is ready for communication.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
DevAddress: Target device address: The device 7 bits
address value in datasheet must be shift at right before call
interface
Trials: Number of trials
Timeout: Timeout duration
Return values HAL: status
Notes This function is used with Memory devices
HAL_I2C_Master_Transmit_IT
Function name HAL_StatusTypeDef HAL_I2C_Master_Transmit_IT
(I2C_HandleTypeDef * hi2c, uint16_t DevAddress, uint8_t *
pData, uint16_t Size)
Function description Transmit in master mode an amount of data in non-blocking mode
with Interrupt.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
DevAddress: Target device address: The device 7 bits
address value in datasheet must be shift at right before call
interface
pData: Pointer to data buffer
Size: Amount of data to be sent
Return values HAL: status
HAL_I2C_Master_Receive_IT
Function name HAL_StatusTypeDef HAL_I2C_Master_Receive_IT
(I2C_HandleTypeDef * hi2c, uint16_t DevAddress, uint8_t *
pData, uint16_t Size)
Function description Receive in master mode an amount of data in non-blocking mode
with Interrupt.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
DevAddress: Target device address: The device 7 bits
address value in datasheet must be shift at right before call
interface
pData: Pointer to data buffer
HAL_I2C_Slave_Transmit_IT
Function name HAL_StatusTypeDef HAL_I2C_Slave_Transmit_IT
(I2C_HandleTypeDef * hi2c, uint8_t * pData, uint16_t Size)
Function description Transmit in slave mode an amount of data in non-blocking mode
with Interrupt.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
pData: Pointer to data buffer
Size: Amount of data to be sent
Return values HAL: status
HAL_I2C_Slave_Receive_IT
Function name HAL_StatusTypeDef HAL_I2C_Slave_Receive_IT
(I2C_HandleTypeDef * hi2c, uint8_t * pData, uint16_t Size)
Function description Receive in slave mode an amount of data in non-blocking mode
with Interrupt.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
pData: Pointer to data buffer
Size: Amount of data to be sent
Return values HAL: status
HAL_I2C_Mem_Write_IT
Function name HAL_StatusTypeDef HAL_I2C_Mem_Write_IT
(I2C_HandleTypeDef * hi2c, uint16_t DevAddress, uint16_t
MemAddress, uint16_t MemAddSize, uint8_t * pData, uint16_t
Size)
Function description Write an amount of data in non-blocking mode with Interrupt to a
specific memory address.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
DevAddress: Target device address: The device 7 bits
address value in datasheet must be shift at right before call
interface
MemAddress: Internal memory address
MemAddSize: Size of internal memory address
pData: Pointer to data buffer
Size: Amount of data to be sent
Return values HAL: status
HAL_I2C_Master_Sequential_Transmit_IT
Function name HAL_StatusTypeDef
HAL_I2C_Master_Sequential_Transmit_IT
(I2C_HandleTypeDef * hi2c, uint16_t DevAddress, uint8_t *
pData, uint16_t Size, uint32_t XferOptions)
Function description Sequential transmit in master I2C mode an amount of data in non-
blocking mode with Interrupt.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
DevAddress: Target device address: The device 7 bits
address value in datasheet must be shift at right before call
interface
pData: Pointer to data buffer
Size: Amount of data to be sent
XferOptions: Options of Transfer, value of I2C Sequential
Transfer Options
Return values HAL: status
Notes This interface allow to manage repeated start condition when
a direction change during transfer
HAL_I2C_Master_Sequential_Receive_IT
Function name HAL_StatusTypeDef HAL_I2C_Master_Sequential_Receive_IT
(I2C_HandleTypeDef * hi2c, uint16_t DevAddress, uint8_t *
pData, uint16_t Size, uint32_t XferOptions)
Function description Sequential receive in master I2C mode an amount of data in non-
blocking mode with Interrupt.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
DevAddress: Target device address: The device 7 bits
HAL_I2C_Slave_Sequential_Transmit_IT
Function name HAL_StatusTypeDef HAL_I2C_Slave_Sequential_Transmit_IT
(I2C_HandleTypeDef * hi2c, uint8_t * pData, uint16_t Size,
uint32_t XferOptions)
Function description Sequential transmit in slave/device I2C mode an amount of data in
non-blocking mode with Interrupt.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
pData: Pointer to data buffer
Size: Amount of data to be sent
XferOptions: Options of Transfer, value of I2C Sequential
Transfer Options
Return values HAL: status
Notes This interface allow to manage repeated start condition when
a direction change during transfer
HAL_I2C_Slave_Sequential_Receive_IT
Function name HAL_StatusTypeDef HAL_I2C_Slave_Sequential_Receive_IT
(I2C_HandleTypeDef * hi2c, uint8_t * pData, uint16_t Size,
uint32_t XferOptions)
Function description Sequential receive in slave/device I2C mode an amount of data in
non-blocking mode with Interrupt.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
pData: Pointer to data buffer
Size: Amount of data to be sent
XferOptions: Options of Transfer, value of I2C Sequential
Transfer Options
Return values HAL: status
Notes This interface allow to manage repeated start condition when
a direction change during transfer
HAL_I2C_EnableListen_IT
Function name HAL_StatusTypeDef HAL_I2C_EnableListen_IT
(I2C_HandleTypeDef * hi2c)
HAL_I2C_DisableListen_IT
Function name HAL_StatusTypeDef HAL_I2C_DisableListen_IT
(I2C_HandleTypeDef * hi2c)
Function description Disable the Address listen mode with Interrupt.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C
Return values HAL: status
HAL_I2C_Master_Abort_IT
Function name HAL_StatusTypeDef HAL_I2C_Master_Abort_IT
(I2C_HandleTypeDef * hi2c, uint16_t DevAddress)
Function description Abort a master I2C IT or DMA process communication with
Interrupt.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
DevAddress: Target device address: The device 7 bits
address value in datasheet must be shift at right before call
interface
Return values HAL: status
HAL_I2C_Master_Transmit_DMA
Function name HAL_StatusTypeDef HAL_I2C_Master_Transmit_DMA
(I2C_HandleTypeDef * hi2c, uint16_t DevAddress, uint8_t *
pData, uint16_t Size)
Function description Transmit in master mode an amount of data in non-blocking mode
with DMA.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
DevAddress: Target device address: The device 7 bits
address value in datasheet must be shift at right before call
interface
pData: Pointer to data buffer
Size: Amount of data to be sent
Return values HAL: status
HAL_I2C_Slave_Transmit_DMA
Function name HAL_StatusTypeDef HAL_I2C_Slave_Transmit_DMA
(I2C_HandleTypeDef * hi2c, uint8_t * pData, uint16_t Size)
Function description Transmit in slave mode an amount of data in non-blocking mode
with DMA.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
pData: Pointer to data buffer
Size: Amount of data to be sent
Return values HAL: status
HAL_I2C_Slave_Receive_DMA
Function name HAL_StatusTypeDef HAL_I2C_Slave_Receive_DMA
(I2C_HandleTypeDef * hi2c, uint8_t * pData, uint16_t Size)
Function description Receive in slave mode an amount of data in non-blocking mode
with DMA.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
pData: Pointer to data buffer
Size: Amount of data to be sent
Return values HAL: status
HAL_I2C_Mem_Write_DMA
Function name HAL_StatusTypeDef HAL_I2C_Mem_Write_DMA
(I2C_HandleTypeDef * hi2c, uint16_t DevAddress, uint16_t
MemAddress, uint16_t MemAddSize, uint8_t * pData, uint16_t
Size)
Function description Write an amount of data in non-blocking mode with DMA to a
specific memory address.
HAL_I2C_Mem_Read_DMA
Function name HAL_StatusTypeDef HAL_I2C_Mem_Read_DMA
(I2C_HandleTypeDef * hi2c, uint16_t DevAddress, uint16_t
MemAddress, uint16_t MemAddSize, uint8_t * pData, uint16_t
Size)
Function description Reads an amount of data in non-blocking mode with DMA from a
specific memory address.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
DevAddress: Target device address: The device 7 bits
address value in datasheet must be shift at right before call
interface
MemAddress: Internal memory address
MemAddSize: Size of internal memory address
pData: Pointer to data buffer
Size: Amount of data to be read
Return values HAL: status
HAL_I2C_EV_IRQHandler
Function name void HAL_I2C_EV_IRQHandler (I2C_HandleTypeDef * hi2c)
Function description This function handles I2C event interrupt request.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
Return values None
HAL_I2C_ER_IRQHandler
Function name void HAL_I2C_ER_IRQHandler (I2C_HandleTypeDef * hi2c)
Function description This function handles I2C error interrupt request.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
Return values None
HAL_I2C_MasterRxCpltCallback
Function name void HAL_I2C_MasterRxCpltCallback (I2C_HandleTypeDef *
hi2c)
Function description Master Rx Transfer completed callback.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
Return values None
HAL_I2C_SlaveTxCpltCallback
Function name void HAL_I2C_SlaveTxCpltCallback (I2C_HandleTypeDef *
hi2c)
Function description Slave Tx Transfer completed callback.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
Return values None
HAL_I2C_SlaveRxCpltCallback
Function name void HAL_I2C_SlaveRxCpltCallback (I2C_HandleTypeDef *
hi2c)
Function description Slave Rx Transfer completed callback.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
Return values None
HAL_I2C_AddrCallback
Function name void HAL_I2C_AddrCallback (I2C_HandleTypeDef * hi2c,
uint8_t TransferDirection, uint16_t AddrMatchCode)
Function description Slave Address Match callback.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
TransferDirection: Master request Transfer Direction
(Write/Read), value of I2C Transfer Direction Master Point of
View
AddrMatchCode: Address Match Code
HAL_I2C_ListenCpltCallback
Function name void HAL_I2C_ListenCpltCallback (I2C_HandleTypeDef * hi2c)
Function description Listen Complete callback.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
Return values None
HAL_I2C_MemTxCpltCallback
Function name void HAL_I2C_MemTxCpltCallback (I2C_HandleTypeDef *
hi2c)
Function description Memory Tx Transfer completed callback.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
Return values None
HAL_I2C_MemRxCpltCallback
Function name void HAL_I2C_MemRxCpltCallback (I2C_HandleTypeDef *
hi2c)
Function description Memory Rx Transfer completed callback.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
Return values None
HAL_I2C_ErrorCallback
Function name void HAL_I2C_ErrorCallback (I2C_HandleTypeDef * hi2c)
Function description I2C error callback.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
Return values None
HAL_I2C_AbortCpltCallback
Function name void HAL_I2C_AbortCpltCallback (I2C_HandleTypeDef * hi2c)
Function description I2C abort callback.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
Return values None
HAL_I2C_GetMode
Function name HAL_I2C_ModeTypeDef HAL_I2C_GetMode
(I2C_HandleTypeDef * hi2c)
Function description Returns the I2C Master, Slave, Memory or no mode.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for I2C module
Return values HAL: mode
HAL_I2C_GetError
Function name uint32_t HAL_I2C_GetError (I2C_HandleTypeDef * hi2c)
Function description Return the I2C error code.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2C.
Return values I2C: Error Code
HAL_I2CEx_ConfigAnalogFilter
Function name HAL_StatusTypeDef HAL_I2CEx_ConfigAnalogFilter
(I2C_HandleTypeDef * hi2c, uint32_t AnalogFilter)
Function description Configure I2C Analog noise filter.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2Cx peripheral.
AnalogFilter: New state of the Analog filter.
HAL_I2CEx_ConfigDigitalFilter
Function name HAL_StatusTypeDef HAL_I2CEx_ConfigDigitalFilter
(I2C_HandleTypeDef * hi2c, uint32_t DigitalFilter)
Function description Configure I2C Digital noise filter.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2Cx peripheral.
DigitalFilter: Coefficient of digital noise filter between
Min_Data=0x00 and Max_Data=0x0F.
Return values HAL: status
HAL_I2CEx_EnableWakeUp
Function name HAL_StatusTypeDef HAL_I2CEx_EnableWakeUp
(I2C_HandleTypeDef * hi2c)
Function description Enable I2C wakeup from stop mode.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2Cx peripheral.
Return values HAL: status
HAL_I2CEx_DisableWakeUp
Function name HAL_StatusTypeDef HAL_I2CEx_DisableWakeUp
(I2C_HandleTypeDef * hi2c)
Function description Disable I2C wakeup from stop mode.
Parameters hi2c: Pointer to a I2C_HandleTypeDef structure that contains
the configuration information for the specified I2Cx peripheral.
Return values HAL: status
HAL_I2CEx_EnableFastModePlus
Function name void HAL_I2CEx_EnableFastModePlus (uint32_t
ConfigFastModePlus)
Function description Enable the I2C fast mode plus driving capability.
Parameters ConfigFastModePlus: Selects the pin. This parameter can
be one of the I2C Extended Fast Mode Plus values
Return values None
Notes For I2C1, fast mode plus driving capability can be enabled on
all selected I2C1 pins using I2C_FASTMODEPLUS_I2C1
parameter or independently on each one of the following pins
PB6, PB7, PB8 and PB9.
For remaining I2C1 pins (PA14, PA15...) fast mode plus
driving capability can be enabled only by using
I2C_FASTMODEPLUS_I2C1 parameter.
For all I2C2 pins fast mode plus driving capability can be
HAL_I2CEx_DisableFastModePlus
Function name void HAL_I2CEx_DisableFastModePlus (uint32_t
ConfigFastModePlus)
Function description Disable the I2C fast mode plus driving capability.
Parameters ConfigFastModePlus: Selects the pin. This parameter can
be one of the I2C Extended Fast Mode Plus values
Return values None
Notes For I2C1, fast mode plus driving capability can be disabled on
all selected I2C1 pins using I2C_FASTMODEPLUS_I2C1
parameter or independently on each one of the following pins
PB6, PB7, PB8 and PB9.
For remaining I2C1 pins (PA14, PA15...) fast mode plus
driving capability can be disabled only by using
I2C_FASTMODEPLUS_I2C1 parameter.
For all I2C2 pins fast mode plus driving capability can be
disabled only by using I2C_FASTMODEPLUS_I2C2
parameter.
24.1.2 I2S_HandleTypeDef
Data Fields
SPI_TypeDef * Instance
I2S_InitTypeDef Init
uint16_t * pTxBuffPtr
__IO uint16_t TxXferSize
__IO uint16_t TxXferCount
uint16_t * pRxBuffPtr
__IO uint16_t RxXferSize
__IO uint16_t RxXferCount
DMA_HandleTypeDef * hdmatx
DMA_HandleTypeDef * hdmarx
__IO HAL_LockTypeDef Lock
__IO HAL_I2S_StateTypeDef State
__IO uint32_t ErrorCode
Field Documentation
You can refer to the I2S HAL driver header file for more useful macros
HAL_I2S_Init
Function name HAL_StatusTypeDef HAL_I2S_Init (I2S_HandleTypeDef * hi2s)
Function description Initializes the I2S according to the specified parameters in the
I2S_InitTypeDef and create the associated handle.
Parameters hi2s: pointer to a I2S_HandleTypeDef structure that contains
the configuration information for I2S module
Return values HAL: status
HAL_I2S_DeInit
Function name HAL_StatusTypeDef HAL_I2S_DeInit (I2S_HandleTypeDef *
hi2s)
Function description DeInitializes the I2S peripheral.
Parameters hi2s: pointer to a I2S_HandleTypeDef structure that contains
the configuration information for I2S module
Return values HAL: status
HAL_I2S_MspDeInit
Function name void HAL_I2S_MspDeInit (I2S_HandleTypeDef * hi2s)
Function description I2S MSP DeInit.
Parameters hi2s: pointer to a I2S_HandleTypeDef structure that contains
the configuration information for I2S module
Return values None
HAL_I2S_Transmit
Function name HAL_StatusTypeDef HAL_I2S_Transmit (I2S_HandleTypeDef *
hi2s, uint16_t * pData, uint16_t Size, uint32_t Timeout)
Function description Transmit an amount of data in blocking mode.
Parameters hi2s: pointer to a I2S_HandleTypeDef structure that contains
the configuration information for I2S module
pData: a 16-bit pointer to data buffer.
Size: number of data sample to be sent:
Timeout: Timeout duration
Return values HAL: status
Notes When a 16-bit data frame or a 16-bit data frame extended is
selected during the I2S configuration phase, the Size
parameter means the number of 16-bit data length in the
transaction and when a 24-bit data frame or a 32-bit data
frame is selected the Size parameter means the number of
16-bit data length.
The I2S is kept enabled at the end of transaction to avoid the
clock de-synchronization between Master and Slave(example:
audio streaming).
HAL_I2S_Receive
Function name HAL_StatusTypeDef HAL_I2S_Receive (I2S_HandleTypeDef *
hi2s, uint16_t * pData, uint16_t Size, uint32_t Timeout)
Function description Receive an amount of data in blocking mode.
Parameters hi2s: pointer to a I2S_HandleTypeDef structure that contains
the configuration information for I2S module
pData: a 16-bit pointer to data buffer.
Size: number of data sample to be sent:
Timeout: Timeout duration
HAL_I2S_Transmit_IT
Function name HAL_StatusTypeDef HAL_I2S_Transmit_IT
(I2S_HandleTypeDef * hi2s, uint16_t * pData, uint16_t Size)
Function description Transmit an amount of data in non-blocking mode with Interrupt.
Parameters hi2s: pointer to a I2S_HandleTypeDef structure that contains
the configuration information for I2S module
pData: a 16-bit pointer to data buffer.
Size: number of data sample to be sent:
Return values HAL: status
Notes When a 16-bit data frame or a 16-bit data frame extended is
selected during the I2S configuration phase, the Size
parameter means the number of 16-bit data length in the
transaction and when a 24-bit data frame or a 32-bit data
frame is selected the Size parameter means the number of
16-bit data length.
The I2S is kept enabled at the end of transaction to avoid the
clock de-synchronization between Master and Slave(example:
audio streaming).
HAL_I2S_Receive_IT
Function name HAL_StatusTypeDef HAL_I2S_Receive_IT
(I2S_HandleTypeDef * hi2s, uint16_t * pData, uint16_t Size)
Function description Receive an amount of data in non-blocking mode with Interrupt.
Parameters hi2s: pointer to a I2S_HandleTypeDef structure that contains
the configuration information for I2S module
pData: a 16-bit pointer to the Receive data buffer.
Size: number of data sample to be sent:
Return values HAL: status
Notes When a 16-bit data frame or a 16-bit data frame extended is
selected during the I2S configuration phase, the Size
parameter means the number of 16-bit data length in the
transaction and when a 24-bit data frame or a 32-bit data
frame is selected the Size parameter means the number of
16-bit data length.
HAL_I2S_IRQHandler
Function name void HAL_I2S_IRQHandler (I2S_HandleTypeDef * hi2s)
Function description This function handles I2S interrupt request.
Parameters hi2s: pointer to a I2S_HandleTypeDef structure that contains
the configuration information for I2S module
Return values None
HAL_I2S_Transmit_DMA
Function name HAL_StatusTypeDef HAL_I2S_Transmit_DMA
(I2S_HandleTypeDef * hi2s, uint16_t * pData, uint16_t Size)
Function description Transmit an amount of data in non-blocking mode with DMA.
Parameters hi2s: pointer to a I2S_HandleTypeDef structure that contains
the configuration information for I2S module
pData: a 16-bit pointer to the Transmit data buffer.
Size: number of data sample to be sent:
Return values HAL: status
Notes When a 16-bit data frame or a 16-bit data frame extended is
selected during the I2S configuration phase, the Size
parameter means the number of 16-bit data length in the
transaction and when a 24-bit data frame or a 32-bit data
frame is selected the Size parameter means the number of
16-bit data length.
The I2S is kept enabled at the end of transaction to avoid the
clock de-synchronization between Master and Slave(example:
audio streaming).
HAL_I2S_Receive_DMA
Function name HAL_StatusTypeDef HAL_I2S_Receive_DMA
(I2S_HandleTypeDef * hi2s, uint16_t * pData, uint16_t Size)
Function description Receive an amount of data in non-blocking mode with DMA.
Parameters hi2s: pointer to a I2S_HandleTypeDef structure that contains
the configuration information for I2S module
pData: a 16-bit pointer to the Receive data buffer.
Size: number of data sample to be sent:
Return values HAL: status
Notes When a 16-bit data frame or a 16-bit data frame extended is
selected during the I2S configuration phase, the Size
parameter means the number of 16-bit data length in the
HAL_I2S_DMAPause
Function name HAL_StatusTypeDef HAL_I2S_DMAPause
(I2S_HandleTypeDef * hi2s)
Function description Pauses the audio stream playing from the Media.
Parameters hi2s: pointer to a I2S_HandleTypeDef structure that contains
the configuration information for I2S module
Return values HAL: status
HAL_I2S_DMAResume
Function name HAL_StatusTypeDef HAL_I2S_DMAResume
(I2S_HandleTypeDef * hi2s)
Function description Resumes the audio stream playing from the Media.
Parameters hi2s: pointer to a I2S_HandleTypeDef structure that contains
the configuration information for I2S module
Return values HAL: status
HAL_I2S_DMAStop
Function name HAL_StatusTypeDef HAL_I2S_DMAStop (I2S_HandleTypeDef
* hi2s)
Function description Resumes the audio stream playing from the Media.
Parameters hi2s: pointer to a I2S_HandleTypeDef structure that contains
the configuration information for I2S module
Return values HAL: status
HAL_I2S_TxHalfCpltCallback
Function name void HAL_I2S_TxHalfCpltCallback (I2S_HandleTypeDef * hi2s)
Function description Tx Transfer Half completed callbacks.
Parameters hi2s: pointer to a I2S_HandleTypeDef structure that contains
the configuration information for I2S module
Return values None
HAL_I2S_RxHalfCpltCallback
Function name void HAL_I2S_RxHalfCpltCallback (I2S_HandleTypeDef * hi2s)
Function description Rx Transfer half completed callbacks.
Parameters hi2s: pointer to a I2S_HandleTypeDef structure that contains
the configuration information for I2S module
Return values None
HAL_I2S_RxCpltCallback
Function name void HAL_I2S_RxCpltCallback (I2S_HandleTypeDef * hi2s)
Function description Rx Transfer completed callbacks.
Parameters hi2s: pointer to a I2S_HandleTypeDef structure that contains
the configuration information for I2S module
Return values None
HAL_I2S_ErrorCallback
Function name void HAL_I2S_ErrorCallback (I2S_HandleTypeDef * hi2s)
Function description I2S error callbacks.
Parameters hi2s: pointer to a I2S_HandleTypeDef structure that contains
the configuration information for I2S module
Return values None
HAL_I2S_GetState
Function name HAL_I2S_StateTypeDef HAL_I2S_GetState
(I2S_HandleTypeDef * hi2s)
Function description Return the I2S state.
Parameters hi2s: pointer to a I2S_HandleTypeDef structure that contains
the configuration information for I2S module
Return values HAL: state
25.1.2 IRDA_HandleTypeDef
Data Fields
USART_TypeDef * Instance
IRDA_InitTypeDef Init
uint8_t * pTxBuffPtr
uint16_t TxXferSize
__IO uint16_t TxXferCount
uint8_t * pRxBuffPtr
uint16_t RxXferSize
__IO uint16_t RxXferCount
uint16_t Mask
DMA_HandleTypeDef * hdmatx
DMA_HandleTypeDef * hdmarx
You can refer to the IRDA HAL driver header file for more useful macros
HAL_IRDA_Init
Function name HAL_StatusTypeDef HAL_IRDA_Init (IRDA_HandleTypeDef *
hirda)
Function description Initialize the IRDA mode according to the specified parameters in
the IRDA_InitTypeDef and initialize the associated handle.
Parameters hirda: Pointer to a IRDA_HandleTypeDef structure that
contains the configuration information for the specified IRDA
module.
HAL_IRDA_DeInit
Function name HAL_StatusTypeDef HAL_IRDA_DeInit (IRDA_HandleTypeDef
* hirda)
Function description DeInitialize the IRDA peripheral.
Parameters hirda: Pointer to a IRDA_HandleTypeDef structure that
contains the configuration information for the specified IRDA
module.
Return values HAL: status
HAL_IRDA_MspInit
Function name void HAL_IRDA_MspInit (IRDA_HandleTypeDef * hirda)
Function description Initialize the IRDA MSP.
Parameters hirda: Pointer to a IRDA_HandleTypeDef structure that
contains the configuration information for the specified IRDA
module.
Return values None
HAL_IRDA_MspDeInit
Function name void HAL_IRDA_MspDeInit (IRDA_HandleTypeDef * hirda)
Function description DeInitialize the IRDA MSP.
Parameters hirda: Pointer to a IRDA_HandleTypeDef structure that
contains the configuration information for the specified IRDA
module.
Return values None
HAL_IRDA_Transmit
Function name HAL_StatusTypeDef HAL_IRDA_Transmit
(IRDA_HandleTypeDef * hirda, uint8_t * pData, uint16_t Size,
uint32_t Timeout)
Function description Send an amount of data in blocking mode.
Parameters hirda: Pointer to a IRDA_HandleTypeDef structure that
contains the configuration information for the specified IRDA
module.
pData: Pointer to data buffer.
Size: Amount of data to be sent.
Timeout: Specify timeout value.
Return values HAL: status
Notes When UART parity is not enabled (PCE = 0), and Word
Length is configured to 9 bits (M1-M0 = 01), address of user
data buffer containing data to be sent, should be aligned on a
half word frontier (16 bits) (as sent data will be handled using
HAL_IRDA_Receive
Function name HAL_StatusTypeDef HAL_IRDA_Receive
(IRDA_HandleTypeDef * hirda, uint8_t * pData, uint16_t Size,
uint32_t Timeout)
Function description Receive an amount of data in blocking mode.
Parameters hirda: Pointer to a IRDA_HandleTypeDef structure that
contains the configuration information for the specified IRDA
module.
pData: Pointer to data buffer.
Size: Amount of data to be received.
Timeout: Specify timeout value.
Return values HAL: status
Notes When UART parity is not enabled (PCE = 0), and Word
Length is configured to 9 bits (M1-M0 = 01), address of user
data buffer for storing data to be received, should be aligned
on a half word frontier (16 bits) (as received data will be
handled using u16 pointer cast). Depending on compilation
chain, use of specific alignment compilation directives or
pragmas might be required to ensure proper alignment for
pData.
HAL_IRDA_Transmit_IT
Function name HAL_StatusTypeDef HAL_IRDA_Transmit_IT
(IRDA_HandleTypeDef * hirda, uint8_t * pData, uint16_t Size)
Function description Send an amount of data in interrupt mode.
Parameters hirda: Pointer to a IRDA_HandleTypeDef structure that
contains the configuration information for the specified IRDA
module.
pData: Pointer to data buffer.
Size: Amount of data to be sent.
Return values HAL: status
Notes When UART parity is not enabled (PCE = 0), and Word
Length is configured to 9 bits (M1-M0 = 01), address of user
data buffer containing data to be sent, should be aligned on a
half word frontier (16 bits) (as sent data will be handled using
u16 pointer cast). Depending on compilation chain, use of
specific alignment compilation directives or pragmas might be
required to ensure proper alignment for pData.
HAL_IRDA_Transmit_DMA
Function name HAL_StatusTypeDef HAL_IRDA_Transmit_DMA
(IRDA_HandleTypeDef * hirda, uint8_t * pData, uint16_t Size)
Function description Send an amount of data in DMA mode.
Parameters hirda: Pointer to a IRDA_HandleTypeDef structure that
contains the configuration information for the specified IRDA
module.
pData: pointer to data buffer.
Size: amount of data to be sent.
Return values HAL: status
Notes When UART parity is not enabled (PCE = 0), and Word
Length is configured to 9 bits (M1-M0 = 01), address of user
data buffer containing data to be sent, should be aligned on a
half word frontier (16 bits) (as sent data will be handled by
DMA from halfword frontier). Depending on compilation chain,
use of specific alignment compilation directives or pragmas
might be required to ensure proper alignment for pData.
HAL_IRDA_Receive_DMA
Function name HAL_StatusTypeDef HAL_IRDA_Receive_DMA
(IRDA_HandleTypeDef * hirda, uint8_t * pData, uint16_t Size)
Function description Receive an amount of data in DMA mode.
Parameters hirda: Pointer to a IRDA_HandleTypeDef structure that
contains the configuration information for the specified IRDA
module.
pData: Pointer to data buffer.
Size: Amount of data to be received.
HAL_IRDA_DMAPause
Function name HAL_StatusTypeDef HAL_IRDA_DMAPause
(IRDA_HandleTypeDef * hirda)
Function description Pause the DMA Transfer.
Parameters hirda: Pointer to a IRDA_HandleTypeDef structure that
contains the configuration information for the specified IRDA
module.
Return values HAL: status
HAL_IRDA_DMAResume
Function name HAL_StatusTypeDef HAL_IRDA_DMAResume
(IRDA_HandleTypeDef * hirda)
Function description Resume the DMA Transfer.
Parameters hirda: Pointer to a IRDA_HandleTypeDef structure that
contains the configuration information for the specified UART
module.
Return values HAL: status
HAL_IRDA_DMAStop
Function name HAL_StatusTypeDef HAL_IRDA_DMAStop
(IRDA_HandleTypeDef * hirda)
Function description Stop the DMA Transfer.
Parameters hirda: Pointer to a IRDA_HandleTypeDef structure that
contains the configuration information for the specified UART
module.
Return values HAL: status
HAL_IRDA_AbortTransmit
Function name HAL_StatusTypeDef HAL_IRDA_AbortTransmit
(IRDA_HandleTypeDef * hirda)
Function description Abort ongoing Transmit transfer (blocking mode).
Parameters hirda: Pointer to a IRDA_HandleTypeDef structure that
contains the configuration information for the specified UART
module.
Return values HAL: status
Notes This procedure could be used for aborting any ongoing Tx
transfer started in Interrupt or DMA mode. This procedure
performs following operations : Disable IRDA Interrupts
(Tx)Disable the DMA transfer in the peripheral register (if
enabled)Abort DMA transfer by calling HAL_DMA_Abort (in
case of transfer in DMA mode)Set handle State to READY
This procedure is executed in blocking mode : when exiting
function, Abort is considered as completed.
HAL_IRDA_AbortReceive
Function name HAL_StatusTypeDef HAL_IRDA_AbortReceive
(IRDA_HandleTypeDef * hirda)
Function description Abort ongoing Receive transfer (blocking mode).
Parameters hirda: Pointer to a IRDA_HandleTypeDef structure that
contains the configuration information for the specified UART
module.
Return values HAL: status
Notes This procedure could be used for aborting any ongoing Rx
transfer started in Interrupt or DMA mode. This procedure
performs following operations : Disable IRDA Interrupts
(Rx)Disable the DMA transfer in the peripheral register (if
HAL_IRDA_Abort_IT
Function name HAL_StatusTypeDef HAL_IRDA_Abort_IT
(IRDA_HandleTypeDef * hirda)
Function description Abort ongoing transfers (Interrupt mode).
Parameters hirda: Pointer to a IRDA_HandleTypeDef structure that
contains the configuration information for the specified UART
module.
Return values HAL: status
Notes This procedure could be used for aborting any ongoing
transfer started in Interrupt or DMA mode. This procedure
performs following operations : Disable IRDA Interrupts (Tx
and Rx)Disable the DMA transfer in the peripheral register (if
enabled)Abort DMA transfer by calling HAL_DMA_Abort_IT
(in case of transfer in DMA mode)Set handle State to
READYAt abort completion, call user abort complete callback
This procedure is executed in Interrupt mode, meaning that
abort procedure could be considered as completed only when
user abort complete callback is executed (not when exiting
function).
HAL_IRDA_AbortTransmit_IT
Function name HAL_StatusTypeDef HAL_IRDA_AbortTransmit_IT
(IRDA_HandleTypeDef * hirda)
Function description Abort ongoing Transmit transfer (Interrupt mode).
Parameters hirda: Pointer to a IRDA_HandleTypeDef structure that
contains the configuration information for the specified UART
module.
Return values HAL: status
Notes This procedure could be used for aborting any ongoing Tx
transfer started in Interrupt or DMA mode. This procedure
performs following operations : Disable IRDA Interrupts
(Tx)Disable the DMA transfer in the peripheral register (if
enabled)Abort DMA transfer by calling HAL_DMA_Abort_IT
(in case of transfer in DMA mode)Set handle State to
READYAt abort completion, call user abort complete callback
This procedure is executed in Interrupt mode, meaning that
abort procedure could be considered as completed only when
user abort complete callback is executed (not when exiting
function).
HAL_IRDA_IRQHandler
Function name void HAL_IRDA_IRQHandler (IRDA_HandleTypeDef * hirda)
Function description Handle IRDA interrupt request.
Parameters hirda: Pointer to a IRDA_HandleTypeDef structure that
contains the configuration information for the specified IRDA
module.
Return values None
HAL_IRDA_TxCpltCallback
Function name void HAL_IRDA_TxCpltCallback (IRDA_HandleTypeDef *
hirda)
Function description Tx Transfer completed callback.
Parameters hirda: Pointer to a IRDA_HandleTypeDef structure that
contains the configuration information for the specified IRDA
module.
Return values None
HAL_IRDA_TxHalfCpltCallback
Function name void HAL_IRDA_TxHalfCpltCallback (IRDA_HandleTypeDef *
hirda)
Function description Tx Half Transfer completed callback.
Parameters hirda: Pointer to a IRDA_HandleTypeDef structure that
contains the configuration information for the specified
USART module.
Return values None
HAL_IRDA_RxHalfCpltCallback
Function name void HAL_IRDA_RxHalfCpltCallback (IRDA_HandleTypeDef *
hirda)
Function description Rx Half Transfer complete callback.
Parameters hirda: Pointer to a IRDA_HandleTypeDef structure that
contains the configuration information for the specified IRDA
module.
Return values None
HAL_IRDA_ErrorCallback
Function name void HAL_IRDA_ErrorCallback (IRDA_HandleTypeDef * hirda)
Function description IRDA error callback.
Parameters hirda: Pointer to a IRDA_HandleTypeDef structure that
contains the configuration information for the specified IRDA
module.
Return values None
HAL_IRDA_AbortTransmitCpltCallback
Function name void HAL_IRDA_AbortTransmitCpltCallback
(IRDA_HandleTypeDef * hirda)
Function description IRDA Abort Complete callback.
Parameters hirda: Pointer to a IRDA_HandleTypeDef structure that
contains the configuration information for the specified IRDA
module.
Return values None
HAL_IRDA_AbortReceiveCpltCallback
Function name void HAL_IRDA_AbortReceiveCpltCallback
(IRDA_HandleTypeDef * hirda)
Function description IRDA Abort Receive Complete callback.
Parameters hirda: Pointer to a IRDA_HandleTypeDef structure that
contains the configuration information for the specified IRDA
module.
Return values None
HAL_IRDA_GetState
Function name HAL_IRDA_StateTypeDef HAL_IRDA_GetState
(IRDA_HandleTypeDef * hirda)
Function description Return the IRDA handle state.
Parameters hirda: Pointer to a IRDA_HandleTypeDef structure that
contains the configuration information for the specified IRDA
module.
Return values HAL: state
HAL_IRDA_GetError
Function name uint32_t HAL_IRDA_GetError (IRDA_HandleTypeDef * hirda)
Function description Return the IRDA handle error code.
Parameters hirda: Pointer to a IRDA_HandleTypeDef structure that
contains the configuration information for the specified IRDA
module.
27.1.2 IWDG_HandleTypeDef
Data Fields
IWDG_TypeDef * Instance
IWDG_InitTypeDef Init
Field Documentation
IWDG_TypeDef* IWDG_HandleTypeDef::Instance
Register base address
IWDG_InitTypeDef IWDG_HandleTypeDef::Init
IWDG required parameters
HAL_IWDG_Init
Function name HAL_StatusTypeDef HAL_IWDG_Init (IWDG_HandleTypeDef *
hiwdg)
Function description Initialize the IWDG according to the specified parameters in the
IWDG_InitTypeDef and start watchdog.
Parameters hiwdg: pointer to a IWDG_HandleTypeDef structure that
contains the configuration information for the specified IWDG
module.
Return values HAL: status
HAL_IWDG_Refresh
Function name HAL_StatusTypeDef HAL_IWDG_Refresh
(IWDG_HandleTypeDef * hiwdg)
Function description Refresh the IWDG.
Parameters hiwdg: pointer to a IWDG_HandleTypeDef structure that
contains the configuration information for the specified IWDG
module.
Return values HAL: status
28.1.2 PCD_EPTypeDef
Data Fields
uint8_t num
uint8_t is_in
uint8_t is_stall
uint8_t type
uint16_t pmaadress
uint16_t pmaaddr0
uint16_t pmaaddr1
uint8_t doublebuffer
28.1.3 PCD_HandleTypeDef
Data Fields
PCD_TypeDef * Instance
PCD_InitTypeDef Init
__IO uint8_t USB_Address
PCD_EPTypeDef IN_ep
PCD_EPTypeDef OUT_ep
HAL_LockTypeDef Lock
__IO PCD_StateTypeDef State
uint32_t Setup
void * pData
Field Documentation
PCD_TypeDef* PCD_HandleTypeDef::Instance
Register base address
HAL_PCD_Init
Function name HAL_StatusTypeDef HAL_PCD_Init (PCD_HandleTypeDef *
hpcd)
Function description Initializes the PCD according to the specified parameters in the
PCD_InitTypeDef and create the associated handle.
Parameters hpcd: PCD handle
Return values HAL: status
HAL_PCD_MspInit
Function name void HAL_PCD_MspInit (PCD_HandleTypeDef * hpcd)
Function description Initializes the PCD MSP.
Parameters hpcd: PCD handle
Return values None
HAL_PCD_MspDeInit
Function name void HAL_PCD_MspDeInit (PCD_HandleTypeDef * hpcd)
Function description DeInitializes PCD MSP.
Parameters hpcd: PCD handle
Return values None
HAL_PCD_Start
Function name HAL_StatusTypeDef HAL_PCD_Start (PCD_HandleTypeDef *
hpcd)
Function description Start the USB device.
Parameters hpcd: PCD handle
Return values HAL: status
HAL_PCD_Stop
Function name HAL_StatusTypeDef HAL_PCD_Stop (PCD_HandleTypeDef *
hpcd)
Function description Stop the USB device.
Parameters hpcd: PCD handle
Return values HAL: status
HAL_PCD_IRQHandler
Function name void HAL_PCD_IRQHandler (PCD_HandleTypeDef * hpcd)
Function description This function handles PCD interrupt request.
Parameters hpcd: PCD handle
Return values HAL: status
HAL_PCD_DataInStageCallback
Function name void HAL_PCD_DataInStageCallback (PCD_HandleTypeDef *
hpcd, uint8_t epnum)
Function description Data IN stage callbacks.
Parameters hpcd: PCD handle
epnum: endpoint number
Return values None
HAL_PCD_SetupStageCallback
Function name void HAL_PCD_SetupStageCallback (PCD_HandleTypeDef *
hpcd)
Function description Setup stage callback.
Parameters hpcd: PCD handle
Return values None
HAL_PCD_SOFCallback
Function name void HAL_PCD_SOFCallback (PCD_HandleTypeDef * hpcd)
Function description USB Start Of Frame callbacks.
Parameters hpcd: PCD handle
Return values None
HAL_PCD_ResetCallback
Function name void HAL_PCD_ResetCallback (PCD_HandleTypeDef * hpcd)
Function description USB Reset callbacks.
Parameters hpcd: PCD handle
Return values None
HAL_PCD_SuspendCallback
Function name void HAL_PCD_SuspendCallback (PCD_HandleTypeDef *
hpcd)
Function description Suspend event callbacks.
HAL_PCD_ResumeCallback
Function name void HAL_PCD_ResumeCallback (PCD_HandleTypeDef *
hpcd)
Function description Resume event callbacks.
Parameters hpcd: PCD handle
Return values None
HAL_PCD_ISOOUTIncompleteCallback
Function name void HAL_PCD_ISOOUTIncompleteCallback
(PCD_HandleTypeDef * hpcd, uint8_t epnum)
Function description Incomplete ISO OUT callbacks.
Parameters hpcd: PCD handle
epnum: endpoint number
Return values None
HAL_PCD_ISOINIncompleteCallback
Function name void HAL_PCD_ISOINIncompleteCallback
(PCD_HandleTypeDef * hpcd, uint8_t epnum)
Function description Incomplete ISO IN callbacks.
Parameters hpcd: PCD handle
epnum: endpoint number
Return values None
HAL_PCD_ConnectCallback
Function name void HAL_PCD_ConnectCallback (PCD_HandleTypeDef *
hpcd)
Function description Connection event callbacks.
Parameters hpcd: PCD handle
Return values None
HAL_PCD_DisconnectCallback
Function name void HAL_PCD_DisconnectCallback (PCD_HandleTypeDef *
hpcd)
Function description Disconnection event callbacks.
Parameters hpcd: PCD handle
Return values None
HAL_PCD_DevDisconnect
Function name HAL_StatusTypeDef HAL_PCD_DevDisconnect
(PCD_HandleTypeDef * hpcd)
Function description Disconnect the USB device.
Parameters hpcd: PCD handle
Return values HAL: status
HAL_PCD_SetAddress
Function name HAL_StatusTypeDef HAL_PCD_SetAddress
(PCD_HandleTypeDef * hpcd, uint8_t address)
Function description Set the USB Device address.
Parameters hpcd: PCD handle
address: new device address
Return values HAL: status
HAL_PCD_EP_Open
Function name HAL_StatusTypeDef HAL_PCD_EP_Open
(PCD_HandleTypeDef * hpcd, uint8_t ep_addr, uint16_t
ep_mps, uint8_t ep_type)
Function description Open and configure an endpoint.
Parameters hpcd: PCD handle
ep_addr: endpoint address
ep_mps: endpoint max packert size
ep_type: endpoint type
Return values HAL: status
HAL_PCD_EP_Close
Function name HAL_StatusTypeDef HAL_PCD_EP_Close
(PCD_HandleTypeDef * hpcd, uint8_t ep_addr)
Function description Deactivate an endpoint.
Parameters hpcd: PCD handle
ep_addr: endpoint address
Return values HAL: status
HAL_PCD_EP_Transmit
Function name HAL_StatusTypeDef HAL_PCD_EP_Transmit
(PCD_HandleTypeDef * hpcd, uint8_t ep_addr, uint8_t * pBuf,
uint32_t len)
Function description Send an amount of data.
Parameters hpcd: PCD handle
ep_addr: endpoint address
pBuf: pointer to the transmission buffer
len: amount of data to be sent
Return values HAL: status
HAL_PCD_EP_GetRxCount
Function name uint16_t HAL_PCD_EP_GetRxCount (PCD_HandleTypeDef *
hpcd, uint8_t ep_addr)
Function description Get Received Data Size.
Parameters hpcd: PCD handle
ep_addr: endpoint address
Return values Data: Size
HAL_PCD_EP_SetStall
Function name HAL_StatusTypeDef HAL_PCD_EP_SetStall
(PCD_HandleTypeDef * hpcd, uint8_t ep_addr)
Function description Set a STALL condition over an endpoint.
Parameters hpcd: PCD handle
ep_addr: endpoint address
Return values HAL: status
HAL_PCD_EP_ClrStall
Function name HAL_StatusTypeDef HAL_PCD_EP_ClrStall
(PCD_HandleTypeDef * hpcd, uint8_t ep_addr)
Function description Clear a STALL condition over in an endpoint.
HAL_PCD_EP_Flush
Function name HAL_StatusTypeDef HAL_PCD_EP_Flush
(PCD_HandleTypeDef * hpcd, uint8_t ep_addr)
Function description Flush an endpoint.
Parameters hpcd: PCD handle
ep_addr: endpoint address
Return values HAL: status
HAL_PCD_ActivateRemoteWakeup
Function name HAL_StatusTypeDef HAL_PCD_ActivateRemoteWakeup
(PCD_HandleTypeDef * hpcd)
Function description HAL_PCD_ActivateRemoteWakeup : active remote wakeup
signalling.
Parameters hpcd: PCD handle
Return values HAL: status
HAL_PCD_DeActivateRemoteWakeup
Function name HAL_StatusTypeDef HAL_PCD_DeActivateRemoteWakeup
(PCD_HandleTypeDef * hpcd)
Function description HAL_PCD_DeActivateRemoteWakeup : de-active remote wakeup
signalling.
Parameters hpcd: PCD handle
Return values HAL: status
HAL_PCD_GetState
Function name PCD_StateTypeDef HAL_PCD_GetState (PCD_HandleTypeDef
* hpcd)
Function description Return the PCD state.
Parameters hpcd: PCD handle
Return values HAL: state
HAL_PCDEx_PMAConfig
Function name HAL_StatusTypeDef HAL_PCDEx_PMAConfig
(PCD_HandleTypeDef * hpcd, uint16_t ep_addr, uint16_t
ep_kind, uint32_t pmaadress)
Function description Configure PMA for EP.
Parameters hpcd: PCD handle
ep_addr: endpoint address
ep_kind: endpoint Kind
USB_SNG_BUF: Single Buffer used
USB_DBL_BUF: Double Buffer used
pmaadress: EP address in The PMA: In case of single buffer
endpoint this parameter is 16-bit value providing the address
in PMA allocated to endpoint. In case of double buffer
endpoint this parameter is a 32-bit value providing the
endpoint buffer 0 address in the LSB part of 32-bit value and
endpoint buffer 1 address in the MSB part of 32-bit value.
Return values status
Sleep mode
Entry: The Sleep mode is entered by using the
HAL_PWR_EnterSLEEPMode(PWR_MAINREGULATOR_ON,
PWR_SLEEPENTRY_WFx) functions with
PWR_SLEEPENTRY_WFI: enter SLEEP mode with WFI instruction
PWR_SLEEPENTRY_WFE: enter SLEEP mode with WFE instruction
Exit:
Any peripheral interrupt acknowledged by the nested vectored interrupt controller
(NVIC) can wake up the device from Sleep mode.
Standby mode
The Standby mode allows to achieve the lowest power consumption. It is based on the
Cortex-M0 deep sleep mode, with the voltage regulator disabled. The 1.8V domain is
consequently powered off. The PLL, the HSI oscillator and the HSE oscillator are also
switched off. SRAM and register contents are lost except for the RTC registers, RTC
backup registers and Standby circuitry. The voltage regulator is OFF.
Entry:
The Standby mode is entered using the HAL_PWR_EnterSTANDBYMode()
function.
Exit:
WKUP pin rising edge, RTC alarm (Alarm A), RTC wakeup, tamper event, time-
stamp event, external reset in NRST pin, IWDG reset.
HAL_PWR_DeInit
Function name void HAL_PWR_DeInit (void )
Function description Deinitializes the PWR peripheral registers to their default reset
values.
Return values None
HAL_PWR_EnableBkUpAccess
Function name void HAL_PWR_EnableBkUpAccess (void )
Function description Enables access to the backup domain (RTC registers, RTC
backup data registers when present).
Return values None
Notes If the HSE divided by 32 is used as the RTC clock, the
Backup Domain Access should be kept enabled.
HAL_PWR_DisableBkUpAccess
Function name void HAL_PWR_DisableBkUpAccess (void )
Function description Disables access to the backup domain (RTC registers, RTC
backup data registers when present).
Return values None
Notes If the HSE divided by 32 is used as the RTC clock, the
Backup Domain Access should be kept enabled.
HAL_PWR_DisableWakeUpPin
Function name void HAL_PWR_DisableWakeUpPin (uint32_t WakeUpPinx)
Function description Disables the WakeUp PINx functionality.
Parameters WakeUpPinx: Specifies the Power Wake-Up pin to disable.
This parameter can be values of : PWREx Wakeup Pins
Return values None
HAL_PWR_EnterSTOPMode
Function name void HAL_PWR_EnterSTOPMode (uint32_t Regulator, uint8_t
STOPEntry)
Function description Enters STOP mode.
Parameters Regulator: Specifies the regulator state in STOP mode. This
parameter can be one of the following values:
PWR_MAINREGULATOR_ON: STOP mode with
regulator ON
PWR_LOWPOWERREGULATOR_ON: STOP mode
with low power regulator ON
STOPEntry: specifies if STOP mode in entered with WFI or
WFE instruction. This parameter can be one of the following
values:
PWR_STOPENTRY_WFI:Enter STOP mode with WFI
instruction
PWR_STOPENTRY_WFE: Enter STOP mode with WFE
instruction
Return values None
Notes In Stop mode, all I/O pins keep the same state as in Run
mode.
When exiting Stop mode by issuing an interrupt or a wakeup
event, the HSI RC oscillator is selected as system clock.
When the voltage regulator operates in low power mode, an
additional startup delay is incurred when waking up from Stop
mode. By keeping the internal regulator ON during Stop
mode, the consumption is higher although the startup time is
reduced.
HAL_PWR_EnterSTANDBYMode
Function name void HAL_PWR_EnterSTANDBYMode (void )
Function description Enters STANDBY mode.
Return values None
Notes In Standby mode, all I/O pins are high impedance except for:
Reset pad (still available)RTC alternate function pins if
configured for tamper, time-stamp, RTC Alarm out, or RTC
clock calibration out.WKUP pins if enabled. STM32F0x8
devices, the Stop mode is available, but it is aningless to
distinguish between voltage regulator in Low power mode and
voltage regulator in Run mode because the regulator not used
and the core is supplied directly from an external source.
Consequently, the Standby mode is not available on those
devices.
HAL_PWR_EnableSleepOnExit
Function name void HAL_PWR_EnableSleepOnExit (void )
Function description Indicates Sleep-On-Exit when returning from Handler mode to
Thread mode.
Return values None
Notes Set SLEEPONEXIT bit of SCR register. When this bit is set,
the processor re-enters SLEEP mode when an interruption
handling is over. Setting this bit is useful when the processor
is expected to run only on interruptions handling.
HAL_PWR_EnableSEVOnPend
Function name void HAL_PWR_EnableSEVOnPend (void )
Function description Enables CORTEX M4 SEVONPEND bit.
Return values None
Notes Sets SEVONPEND bit of SCR register. When this bit is set,
this causes WFE to wake up when an interrupt moves from
inactive to pended.
HAL_PWR_DisableSEVOnPend
Function name void HAL_PWR_DisableSEVOnPend (void )
Function description Disables CORTEX M4 SEVONPEND bit.
Return values None
Notes Clears SEVONPEND bit of SCR register. When this bit is set,
this causes WFE to wake up when an interrupt moves from
inactive to pended.
PVD configuration
The PVD is used to monitor the VDD power supply by comparing it to a threshold
selected by the PVD Level (PLS[2:0] bits in the PWR_CR).
A PVDO flag is available to indicate if VDD/VDDA is higher or lower than the PVD
threshold. This event is internally connected to the EXTI line16 and can generate an
interrupt if enabled. This is done through HAL_PWR_ConfigPVD(),
HAL_PWR_EnablePVD() functions.
The PVD is stopped in Standby mode. PVD is not available on STM32F030x4/x6/x8
HAL_PWR_PVD_IRQHandler
Function name void HAL_PWR_PVD_IRQHandler (void )
Function description This function handles the PWR PVD interrupt request.
Return values None
Notes This API should be called under the PVD_IRQHandler() or
PVD_VDDIO2_IRQHandler().
HAL_PWR_PVDCallback
Function name void HAL_PWR_PVDCallback (void )
Function description PWR PVD interrupt callback.
Return values None
HAL_PWREx_Vddio2Monitor_IRQHandler
Function name void HAL_PWREx_Vddio2Monitor_IRQHandler (void )
Function description This function handles the PWR Vddio2 monitor interrupt request.
Return values None
Notes This API should be called under the VDDIO2_IRQHandler()
PVD_VDDIO2_IRQHandler().
HAL_PWREx_Vddio2MonitorCallback
Function name void HAL_PWREx_Vddio2MonitorCallback (void )
Function description PWR Vddio2 Monitor interrupt callback.
Return values None
HAL_PWR_ConfigPVD
Function name void HAL_PWR_ConfigPVD (PWR_PVDTypeDef * sConfigPVD)
Function description Configures the voltage threshold detected by the Power Voltage
Detector(PVD).
Parameters sConfigPVD: pointer to an PWR_PVDTypeDef structure that
contains the configuration information for the PVD.
Return values None
Notes Refer to the electrical characteristics of your device datasheet
for more details about the voltage threshold corresponding to
each detection level.
HAL_PWR_DisablePVD
Function name void HAL_PWR_DisablePVD (void )
Function description Disables the Power Voltage Detector(PVD).
Return values None
HAL_PWREx_EnableVddio2Monitor
Function name void HAL_PWREx_EnableVddio2Monitor (void )
Function description Enable VDDIO2 monitor: enable Exti 31 and falling edge detection.
Return values None
Notes If Exti 31 is enable correlty and VDDIO2 voltage goes below
Vrefint, an interrupt is generated Irq line 1. NVIS has to be
enable by user.
HAL_PWREx_DisableVddio2Monitor
Function name void HAL_PWREx_DisableVddio2Monitor (void )
Function description Disable the Vddio2 Monitor.
Return values None
32.1.2 RCC_OscInitTypeDef
Data Fields
uint32_t OscillatorType
uint32_t HSEState
uint32_t LSEState
uint32_t HSIState
uint32_t HSICalibrationValue
uint32_t HSI14State
uint32_t HSI14CalibrationValue
uint32_t LSIState
uint32_t HSI48State
RCC_PLLInitTypeDef PLL
Field Documentation
uint32_t RCC_OscInitTypeDef::OscillatorType
The oscillators to be configured. This parameter can be a value of
RCC_Oscillator_Type
uint32_t RCC_OscInitTypeDef::HSEState
The new state of the HSE. This parameter can be a value of RCC_HSE_Config
uint32_t RCC_OscInitTypeDef::LSEState
The new state of the LSE. This parameter can be a value of RCC_LSE_Config
uint32_t RCC_OscInitTypeDef::HSIState
The new state of the HSI. This parameter can be a value of RCC_HSI_Config
32.1.3 RCC_ClkInitTypeDef
Data Fields
uint32_t ClockType
uint32_t SYSCLKSource
uint32_t AHBCLKDivider
uint32_t APB1CLKDivider
Field Documentation
uint32_t RCC_ClkInitTypeDef::ClockType
The clock to be configured. This parameter can be a value of
RCC_System_Clock_Type
uint32_t RCC_ClkInitTypeDef::SYSCLKSource
The clock source (SYSCLKS) used as system clock. This parameter can be a value of
RCC_System_Clock_Source
uint32_t RCC_ClkInitTypeDef::AHBCLKDivider
The AHB clock (HCLK) divider. This clock is derived from the system clock (SYSCLK).
This parameter can be a value of RCC_AHB_Clock_Source
uint32_t RCC_ClkInitTypeDef::APB1CLKDivider
The APB1 clock (PCLK1) divider. This clock is derived from the AHB clock (HCLK).
This parameter can be a value of RCC_APB1_Clock_Source
HAL_RCC_DeInit
Function name void HAL_RCC_DeInit (void )
Function description Resets the RCC clock configuration to the default reset state.
Return values None
Notes The default reset state of the clock configuration is given
below: HSI ON and used as system clock sourceHSE and
PLL OFFAHB, APB1 prescaler set to 1.CSS and MCO1
OFFAll interrupts disabled
This function does not modify the configuration of the
Peripheral clocksLSI, LSE and RTC clocks
HAL_RCC_ClockConfig
Function name HAL_StatusTypeDef HAL_RCC_ClockConfig
(RCC_ClkInitTypeDef * RCC_ClkInitStruct, uint32_t FLatency)
Function description Initializes the CPU, AHB and APB buses clocks according to the
specified parameters in the RCC_ClkInitStruct.
Parameters RCC_ClkInitStruct: pointer to an RCC_OscInitTypeDef
structure that contains the configuration information for the
RCC peripheral.
FLatency: FLASH Latency The value of this parameter
depend on device used within the same series
Return values HAL: status
Notes The SystemCoreClock CMSIS variable is used to store
System Clock Frequency and updated by
HAL_RCC_GetHCLKFreq() function called within this function
The HSI is used (enabled by hardware) as system clock
source after start-up from Reset, wake-up from STOP and
STANDBY mode, or in case of failure of the HSE used
directly or indirectly as system clock (if the Clock Security
System CSS is enabled).
A switch from one clock source to another occurs only if the
target clock source is ready (clock stable after start-up delay
or PLL locked). If a clock source which is not yet ready is
selected, the switch will occur when the clock source will be
ready. You can use HAL_RCC_GetClockConfig() function to
know which clock is currently used as system clock source.
HAL_RCC_EnableCSS
Function name void HAL_RCC_EnableCSS (void )
Function description Enables the Clock Security System.
Return values None
Notes If a failure is detected on the HSE oscillator clock, this
oscillator is automatically disabled and an interrupt is
generated to inform the software about the failure (Clock
Security System Interrupt, CSSI), allowing the MCU to
perform rescue operations. The CSSI is linked to the Cortex-
HAL_RCC_NMI_IRQHandler
Function name void HAL_RCC_NMI_IRQHandler (void )
Function description This function handles the RCC CSS interrupt request.
Return values None
Notes This API should be called under the NMI_Handler().
HAL_RCC_CSSCallback
Function name void HAL_RCC_CSSCallback (void )
Function description RCC Clock Security System interrupt callback.
Return values None
HAL_RCC_DisableCSS
Function name void HAL_RCC_DisableCSS (void )
Function description Disables the Clock Security System.
Return values None
HAL_RCC_GetSysClockFreq
Function name uint32_t HAL_RCC_GetSysClockFreq (void )
Function description Returns the SYSCLK frequency.
Return values SYSCLK: frequency
Notes The system frequency computed by this function is not the
real frequency in the chip. It is calculated based on the
predefined constant and the selected clock source:
If SYSCLK source is HSI, function returns values based on
HSI_VALUE(*)
If SYSCLK source is HSE, function returns a value based on
HSE_VALUE divided by PREDIV factor(**)
If SYSCLK source is PLL, function returns a value based on
HSE_VALUE divided by PREDIV factor(**) or depending on
STM32F0xxxx devices either a value based on HSI_VALUE
divided by 2 or HSI_VALUE divided by PREDIV factor(*)
multiplied by the PLL factor.
(*) HSI_VALUE is a constant defined in stm32f0xx_hal_conf.h
file (default value 8 MHz) but the real value may vary
depending on the variations in voltage and temperature.
(**) HSE_VALUE is a constant defined in
stm32f0xx_hal_conf.h file (default value 8 MHz), user has to
ensure that HSE_VALUE is same as the real frequency of the
crystal used. Otherwise, this function may have wrong result.
The result of this function could be not correct when using
fractional value for HSE crystal.
This function can be used by the user application to compute
the baud-rate for the communication peripherals or configure
HAL_RCC_GetHCLKFreq
Function name uint32_t HAL_RCC_GetHCLKFreq (void )
Function description Returns the HCLK frequency.
Return values HCLK: frequency
Notes Each time HCLK changes, this function must be called to
update the right HCLK value. Otherwise, any configuration
based on this function will be incorrect.
The SystemCoreClock CMSIS variable is used to store
System Clock Frequency and updated within this function
HAL_RCC_GetPCLK1Freq
Function name uint32_t HAL_RCC_GetPCLK1Freq (void )
Function description Returns the PCLK1 frequency.
Return values PCLK1: frequency
Notes Each time PCLK1 changes, this function must be called to
update the right PCLK1 value. Otherwise, any configuration
based on this function will be incorrect.
HAL_RCC_GetOscConfig
Function name void HAL_RCC_GetOscConfig (RCC_OscInitTypeDef *
RCC_OscInitStruct)
Function description Configures the RCC_OscInitStruct according to the internal RCC
configuration registers.
Parameters RCC_OscInitStruct: pointer to an RCC_OscInitTypeDef
structure that will be configured.
Return values None
HAL_RCC_GetClockConfig
Function name void HAL_RCC_GetClockConfig (RCC_ClkInitTypeDef *
RCC_ClkInitStruct, uint32_t * pFLatency)
Function description Get the RCC_ClkInitStruct according to the internal RCC
configuration registers.
Parameters RCC_ClkInitStruct: pointer to an RCC_ClkInitTypeDef
structure that contains the current clock configuration.
pFLatency: Pointer on the Flash Latency.
Return values None
__HAL_RCC_HSI14_DISABLE Notes:
The HSI14 is stopped by hardware
when entering STOP and STANDBY
modes. HSI14 can not be stopped if it
is used as system clock source. In
this case, you have to select another
source of the system clock then stop
the HSI14. When the HSI14 is
stopped, HSI14RDY flag goes low
after 6 HSI14 oscillator clock cycles.
__HAL_RCC_HSI14ADC_ENABLE
__HAL_RCC_HSI14ADC_DISABLE
__HAL_RCC_HSI14_CALIBRATIONVALUE_ Description:
ADJUST
Macro to adjust the Internal 14Mhz
High Speed oscillator (HSI) calibration
value.
Parameters:
__HSI14CALIBRATIONVALUE__:
specifies the calibration trimming
value (default is
RCC_HSI14CALIBRATION_DEFAUL
T). This parameter must be a number
between 0 and 0x1F.
Notes:
The calibration is used to compensate
for the variations in voltage and
temperature that influence the
frequency of the internal HSI14 RC.
HSI48 Config
RCC_HSI48_OFF
RCC_HSI48_ON
HSI Config
RCC_HSI_OFF HSI clock deactivation
RCC_HSI_ON HSI clock activation
RCC_HSICALIBRATION_DEFAULT
__HAL_RCC_HSI_DISABLE
__HAL_RCC_HSI_CALIBRATIONVALUE_ Description:
ADJUST
Macro to adjust the Internal High Speed
oscillator (HSI) calibration value.
Parameters:
_HSICALIBRATIONVALUE_: specifies
the calibration trimming value. (default is
RCC_HSICALIBRATION_DEFAULT).
This parameter must be a number
between 0 and 0x1F.
Notes:
The calibration is used to compensate
for the variations in voltage and
temperature that influence the frequency
of the internal HSI RC.
RCC I2C1 Clock Source
RCC_I2C1CLKSOURCE_HSI
RCC_I2C1CLKSOURCE_SYSCLK
RCC I2Cx Clock Config
__HAL_RCC_I2C1_CONFIG Description:
Macro to configure the I2C1 clock (I2C1CLK).
Parameters:
__I2C1CLKSOURCE__: specifies the I2C1
clock source. This parameter can be one of the
following values:
RCC_I2C1CLKSOURCE_HSI HSI
selected as I2C1 clock
RCC_I2C1CLKSOURCE_SYSCLK
System Clock selected as I2C1 clock
__HAL_RCC_LSI_DISABLE Notes:
LSI can not be disabled if the IWDG is running. When
the LSI is stopped, LSIRDY flag goes low after 6 LSI
oscillator clock cycles.
__HAL_RCC_PLL_DISABLE Notes:
The main PLL can not be disabled if it is
used as system clock source
__HAL_RCC_PLL_CONFIG Description:
Macro to configure the PLL clock source,
multiplication and division factors.
Parameters:
__RCC_PLLSOURCE__: specifies the PLL
entry clock source. This parameter can be
one of the following values:
RCC_PLLSOURCE_HSI HSI oscillator
clock selected as PLL clock entry
RCC_PLLSOURCE_HSE HSE
oscillator clock selected as PLL clock
entry
__PLLMUL__: specifies the multiplication
factor for PLL VCO output clock This
parameter can be one of the following
values: This parameter must be a number
between RCC_PLL_MUL2 and
RCC_PLL_MUL16.
__PREDIV__: specifies the predivider
factor for PLL VCO input clock This
__HAL_RCC_RTC_DISABLE Notes:
These macros must be used only after the RTC
clock source was selected.
__HAL_RCC_BACKUPRESET_ Notes:
FORCE
This function resets the RTC peripheral
(including the backup registers) and the RTC
clock source selection in RCC_BDCR register.
__HAL_RCC_BACKUPRESET_
RELEASE
RTC Clock Source
RCC_RTCCLKSOURCE_NO_CLK No clock
RCC_RTCCLKSOURCE_LSE LSE oscillator clock used as RTC clock
RCC_RTCCLKSOURCE_LSI LSI oscillator clock used as RTC clock
RCC_RTCCLKSOURCE_HSE_DIV32 HSE oscillator clock divided by 32 used as RTC
clock
33.1.2 RCC_CRSInitTypeDef
Data Fields
uint32_t Prescaler
uint32_t Source
uint32_t Polarity
uint32_t ReloadValue
uint32_t ErrorLimitValue
uint32_t HSI48CalibrationValue
Field Documentation
uint32_t RCC_CRSInitTypeDef::Prescaler
Specifies the division factor of the SYNC signal. This parameter can be a value of
RCCEx_CRS_SynchroDivider
33.1.3 RCC_CRSSynchroInfoTypeDef
Data Fields
uint32_t ReloadValue
uint32_t HSI48CalibrationValue
uint32_t FreqErrorCapture
uint32_t FreqErrorDirection
Field Documentation
uint32_t RCC_CRSSynchroInfoTypeDef::ReloadValue
Specifies the value loaded in the Counter reload value. This parameter must be a
number between 0 and 0xFFFFU
uint32_t RCC_CRSSynchroInfoTypeDef::HSI48CalibrationValue
Specifies value loaded in HSI48 oscillator smooth trimming. This parameter must be a
number between 0 and 0x3FU
uint32_t RCC_CRSSynchroInfoTypeDef::FreqErrorCapture
Specifies the value loaded in the .FECAP, the frequency error counter value latched in
the time of the last SYNC event. This parameter must be a number between 0 and
0xFFFFU
uint32_t RCC_CRSSynchroInfoTypeDef::FreqErrorDirection
Specifies the value loaded in the .FEDIR, the counting direction of the frequency error
counter latched in the time of the last SYNC event. It shows whether the actual
frequency is below or above the target. This parameter must be a value of
RCCEx_CRS_FreqErrorDirection
HAL_RCCEx_PeriphCLKConfig
Function name HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig
(RCC_PeriphCLKInitTypeDef * PeriphClkInit)
Function description Initializes the RCC extended peripherals clocks according to the
specified parameters in the RCC_PeriphCLKInitTypeDef.
Parameters PeriphClkInit: pointer to an RCC_PeriphCLKInitTypeDef
structure that contains the configuration information for the
Extended Peripherals clocks (USART, RTC, I2C, CEC and
USB).
Return values HAL: status
Notes Care must be taken when HAL_RCCEx_PeriphCLKConfig() is
used to select the RTC clock source; in this case the Backup
domain will be reset in order to modify the RTC Clock source,
as consequence RTC registers (including the backup
registers) and RCC_BDCR register are set to their reset
values.
HAL_RCCEx_GetPeriphCLKFreq
Function name uint32_t HAL_RCCEx_GetPeriphCLKFreq (uint32_t PeriphClk)
Function description Returns the peripheral clock frequency.
Parameters PeriphClk: Peripheral clock identifier This parameter can be
one of the following values:
RCC_PERIPHCLK_RTC RTC peripheral clock
RCC_PERIPHCLK_USART1 USART1 peripheral clock
RCC_PERIPHCLK_I2C1 I2C1 peripheral clock
RCC_PERIPHCLK_USART2 USART2 peripheral clock
RCC_PERIPHCLK_USART3 USART2 peripheral clock
RCC_PERIPHCLK_CEC CEC peripheral clock
Return values Frequency: in Hz (0: means that no available frequency for
the peripheral)
Notes Returns 0 if peripheral clock is unknown
HAL_RCCEx_CRSConfig
Function name void HAL_RCCEx_CRSConfig (RCC_CRSInitTypeDef * pInit)
Function description Start automatic synchronization for polling mode.
Parameters pInit: Pointer on RCC_CRSInitTypeDef structure
Return values None
HAL_RCCEx_CRSSoftwareSynchronizationGenerate
Function name void HAL_RCCEx_CRSSoftwareSynchronizationGenerate
(void )
Function description Generate the software synchronization event.
Return values None
HAL_RCCEx_CRSGetSynchronizationInfo
Function name void HAL_RCCEx_CRSGetSynchronizationInfo
(RCC_CRSSynchroInfoTypeDef * pSynchroInfo)
Function description Return synchronization info.
HAL_RCCEx_CRSWaitSynchronization
Function name uint32_t HAL_RCCEx_CRSWaitSynchronization (uint32_t
Timeout)
Function description Wait for CRS Synchronization status.
Parameters Timeout: Duration of the timeout
Return values Combination: of Synchronization status This parameter can
be a combination of the following values:
RCC_CRS_TIMEOUT
RCC_CRS_SYNCOK
RCC_CRS_SYNCWARN
RCC_CRS_SYNCERR
RCC_CRS_SYNCMISS
RCC_CRS_TRIMOVF
Notes Timeout is based on the maximum time to receive a SYNC
event based on synchronization frequency.
If Timeout set to HAL_MAX_DELAY, HAL_TIMEOUT will be
never returned.
HAL_RCCEx_CRS_IRQHandler
Function name void HAL_RCCEx_CRS_IRQHandler (void )
Function description Handle the Clock Recovery System interrupt request.
Return values None
HAL_RCCEx_CRS_SyncOkCallback
Function name void HAL_RCCEx_CRS_SyncOkCallback (void )
Function description RCCEx Clock Recovery System SYNCOK interrupt callback.
Return values None
HAL_RCCEx_CRS_SyncWarnCallback
Function name void HAL_RCCEx_CRS_SyncWarnCallback (void )
Function description RCCEx Clock Recovery System SYNCWARN interrupt callback.
Return values None
HAL_RCCEx_CRS_ErrorCallback
Function name void HAL_RCCEx_CRS_ErrorCallback (uint32_t Error)
Function description RCCEx Clock Recovery System Error interrupt callback.
Parameters Error: Combination of Error status. This parameter can be a
combination of the following values:
RCC_CRS_SYNCERR
RCC_CRS_SYNCMISS
RCC_CRS_TRIMOVF
Return values None
Return value:
None
__HAL_RCC_USART2_CLK_DISABLE
__HAL_RCC_SPI2_CLK_ENABLE
__HAL_RCC_SPI2_CLK_DISABLE
__HAL_RCC_TIM2_CLK_ENABLE
__HAL_RCC_TIM2_CLK_DISABLE
__HAL_RCC_TIM6_CLK_ENABLE
__HAL_RCC_I2C2_CLK_ENABLE
__HAL_RCC_TIM6_CLK_DISABLE
__HAL_RCC_I2C2_CLK_DISABLE
__HAL_RCC_DAC1_CLK_ENABLE
__HAL_RCC_DAC1_CLK_DISABLE
__HAL_RCC_CEC_CLK_ENABLE
__HAL_RCC_CEC_CLK_DISABLE
__HAL_RCC_TIM7_CLK_ENABLE
__HAL_RCC_USART3_CLK_ENABLE
__HAL_RCC_USART4_CLK_ENABLE
__HAL_RCC_TIM7_CLK_DISABLE
__HAL_RCC_TIM15_CLK_DISABLE
__HAL_RCC_USART6_CLK_ENABLE
__HAL_RCC_USART6_CLK_DISABLE
__HAL_RCC_USART7_CLK_ENABLE
__HAL_RCC_USART8_CLK_ENABLE
__HAL_RCC_USART7_CLK_DISABLE
__HAL_RCC_USART8_CLK_DISABLE
Peripheral Clock Enable Disable Status
__HAL_RCC_GPIOD_IS_CLK_ENABLED
__HAL_RCC_GPIOD_IS_CLK_DISABLED
__HAL_RCC_GPIOE_IS_CLK_ENABLED
__HAL_RCC_GPIOE_IS_CLK_DISABLED
__HAL_RCC_TSC_IS_CLK_ENABLED
__HAL_RCC_TSC_IS_CLK_DISABLED
__HAL_RCC_DMA2_IS_CLK_ENABLED
__HAL_RCC_DMA2_IS_CLK_DISABLED
__HAL_RCC_USART2_IS_CLK_ENABLED
__HAL_RCC_USART2_IS_CLK_DISABLED
__HAL_RCC_SPI2_IS_CLK_ENABLED
__HAL_RCC_SPI2_IS_CLK_DISABLED
__HAL_RCC_TIM2_IS_CLK_ENABLED
__HAL_RCC_TIM2_IS_CLK_DISABLED
__HAL_RCC_TIM6_IS_CLK_ENABLED
34.1.2 RTC_TimeTypeDef
Data Fields
uint8_t Hours
uint8_t Minutes
uint8_t Seconds
uint8_t TimeFormat
uint32_t SubSeconds
uint32_t SecondFraction
uint32_t DayLightSaving
uint32_t StoreOperation
Field Documentation
uint8_t RTC_TimeTypeDef::Hours
Specifies the RTC Time Hour. This parameter must be a number between Min_Data =
0 and Max_Data = 12 if the RTC_HourFormat_12 is selected. This parameter must be
34.1.3 RTC_DateTypeDef
Data Fields
uint8_t WeekDay
uint8_t Month
uint8_t Date
uint8_t Year
Field Documentation
uint8_t RTC_DateTypeDef::WeekDay
Specifies the RTC Date WeekDay. This parameter can be a value of
RTC_WeekDay_Definitions
uint8_t RTC_DateTypeDef::Month
Specifies the RTC Date Month (in BCD format). This parameter can be a value of
RTC_Month_Date_Definitions
uint8_t RTC_DateTypeDef::Date
Specifies the RTC Date. This parameter must be a number between Min_Data = 1
and Max_Data = 31
uint8_t RTC_DateTypeDef::Year
Specifies the RTC Date Year. This parameter must be a number between Min_Data =
0 and Max_Data = 99
34.1.4 RTC_AlarmTypeDef
Data Fields
RTC_TimeTypeDef AlarmTime
34.1.5 RTC_HandleTypeDef
Data Fields
RTC_TypeDef * Instance
RTC_InitTypeDef Init
HAL_LockTypeDef Lock
__IO HAL_RTCStateTypeDef State
Field Documentation
RTC_TypeDef* RTC_HandleTypeDef::Instance
Register base address
RTC_InitTypeDef RTC_HandleTypeDef::Init
RTC required parameters
HAL_LockTypeDef RTC_HandleTypeDef::Lock
RTC locking object
__IO HAL_RTCStateTypeDef RTC_HandleTypeDef::State
Time communication state
Alarm configuration
To configure the RTC Alarm use the HAL_RTC_SetAlarm() function. You can also
configure the RTC Alarm with interrupt mode using the HAL_RTC_SetAlarm_IT()
function.
To read the RTC Alarm, use the HAL_RTC_GetAlarm() function.
HAL_RTC_Init
Function name HAL_StatusTypeDef HAL_RTC_Init (RTC_HandleTypeDef *
hrtc)
Function description Initialize the RTC according to the specified parameters in the
RTC_InitTypeDef structure and initialize the associated handle.
Parameters hrtc: RTC handle
Return values HAL: status
HAL_RTC_MspInit
Function name void HAL_RTC_MspInit (RTC_HandleTypeDef * hrtc)
Function description Initialize the RTC MSP.
Parameters hrtc: RTC handle
Return values None
HAL_RTC_MspDeInit
Function name void HAL_RTC_MspDeInit (RTC_HandleTypeDef * hrtc)
Function description DeInitialize the RTC MSP.
Parameters hrtc: RTC handle
Return values None
HAL_RTC_SetTime
Function name HAL_StatusTypeDef HAL_RTC_SetTime (RTC_HandleTypeDef
* hrtc, RTC_TimeTypeDef * sTime, uint32_t Format)
Function description Set RTC current time.
Parameters hrtc: RTC handle
sTime: Pointer to Time structure
Format: Specifies the format of the entered parameters. This
parameter can be one of the following values:
RTC_FORMAT_BIN: Binary data format
RTC_FORMAT_BCD: BCD data format
Return values HAL: status
HAL_RTC_GetTime
Function name HAL_StatusTypeDef HAL_RTC_GetTime (RTC_HandleTypeDef
* hrtc, RTC_TimeTypeDef * sTime, uint32_t Format)
Function description Get RTC current time.
Parameters hrtc: RTC handle
sTime: Pointer to Time structure with Hours, Minutes and
Seconds fields returned with input format (BIN or BCD), also
SubSeconds field returning the RTC_SSR register content
and SecondFraction field the Synchronous pre-scaler factor to
HAL_RTC_SetDate
Function name HAL_StatusTypeDef HAL_RTC_SetDate (RTC_HandleTypeDef
* hrtc, RTC_DateTypeDef * sDate, uint32_t Format)
Function description Set RTC current date.
Parameters hrtc: RTC handle
sDate: Pointer to date structure
Format: specifies the format of the entered parameters. This
parameter can be one of the following values:
RTC_FORMAT_BIN: Binary data format
RTC_FORMAT_BCD: BCD data format
Return values HAL: status
HAL_RTC_GetDate
Function name HAL_StatusTypeDef HAL_RTC_GetDate (RTC_HandleTypeDef
* hrtc, RTC_DateTypeDef * sDate, uint32_t Format)
Function description Get RTC current date.
Parameters hrtc: RTC handle
sDate: Pointer to Date structure
Format: Specifies the format of the entered parameters. This
parameter can be one of the following values:
RTC_FORMAT_BIN : Binary data format
RTC_FORMAT_BCD : BCD data format
Return values HAL: status
Notes You must call HAL_RTC_GetDate() after
HAL_RTC_GetTime() to unlock the values in the higher-order
calendar shadow registers to ensure consistency between the
time and date values. Reading RTC current time locks the
HAL_RTC_SetAlarm
Function name HAL_StatusTypeDef HAL_RTC_SetAlarm
(RTC_HandleTypeDef * hrtc, RTC_AlarmTypeDef * sAlarm,
uint32_t Format)
Function description Set the specified RTC Alarm.
Parameters hrtc: RTC handle
sAlarm: Pointer to Alarm structure
Format: Specifies the format of the entered parameters. This
parameter can be one of the following values:
RTC_FORMAT_BIN: Binary data format
RTC_FORMAT_BCD: BCD data format
Return values HAL: status
HAL_RTC_SetAlarm_IT
Function name HAL_StatusTypeDef HAL_RTC_SetAlarm_IT
(RTC_HandleTypeDef * hrtc, RTC_AlarmTypeDef * sAlarm,
uint32_t Format)
Function description Set the specified RTC Alarm with Interrupt.
Parameters hrtc: RTC handle
sAlarm: Pointer to Alarm structure
Format: Specifies the format of the entered parameters. This
parameter can be one of the following values:
RTC_FORMAT_BIN: Binary data format
RTC_FORMAT_BCD: BCD data format
Return values HAL: status
Notes The Alarm register can only be written when the
corresponding Alarm is disabled (Use the
HAL_RTC_DeactivateAlarm()).
The HAL_RTC_SetTime() must be called before enabling the
Alarm feature.
HAL_RTC_DeactivateAlarm
Function name HAL_StatusTypeDef HAL_RTC_DeactivateAlarm
(RTC_HandleTypeDef * hrtc, uint32_t Alarm)
Function description Deactivate the specified RTC Alarm.
Parameters hrtc: RTC handle
Alarm: Specifies the Alarm. This parameter can be one of
the following values:
RTC_ALARM_A: AlarmA
Return values HAL: status
HAL_RTC_AlarmIRQHandler
Function name void HAL_RTC_AlarmIRQHandler (RTC_HandleTypeDef * hrtc)
Function description Handle Alarm interrupt request.
Parameters hrtc: RTC handle
Return values None
HAL_RTC_PollForAlarmAEvent
Function name HAL_StatusTypeDef HAL_RTC_PollForAlarmAEvent
(RTC_HandleTypeDef * hrtc, uint32_t Timeout)
Function description Handle AlarmA Polling request.
Parameters hrtc: RTC handle
Timeout: Timeout duration
Return values HAL: status
HAL_RTC_AlarmAEventCallback
Function name void HAL_RTC_AlarmAEventCallback (RTC_HandleTypeDef *
hrtc)
Function description Alarm A callback.
Parameters hrtc: RTC handle
Return values None
HAL_RTC_WaitForSynchro
Function name HAL_StatusTypeDef HAL_RTC_WaitForSynchro
(RTC_HandleTypeDef * hrtc)
Function description Wait until the RTC Time and Date registers (RTC_TR and
RTC_DR) are synchronized with RTC APB clock.
HAL_RTC_GetState
Function name HAL_RTCStateTypeDef HAL_RTC_GetState
(RTC_HandleTypeDef * hrtc)
Function description Return the RTC handle state.
Parameters hrtc: RTC handle
Return values HAL: state
RTC_EnterInitMode
Function name HAL_StatusTypeDef RTC_EnterInitMode
(RTC_HandleTypeDef * hrtc)
Function description Enter the RTC Initialization mode.
Parameters hrtc: RTC handle
Return values HAL: status
Notes The RTC Initialization mode is write protected, use the
__HAL_RTC_WRITEPROTECTION_DISABLE() before
calling this function.
RTC_ByteToBcd2
Function name uint8_t RTC_ByteToBcd2 (uint8_t Value)
Function description Convert a 2 digit decimal to BCD format.
Parameters Value: Byte to be converted
Return values Converted: byte
RTC_Bcd2ToByte
Function name uint8_t RTC_Bcd2ToByte (uint8_t Value)
Function description Convert from 2 digit BCD to Binary.
Parameters Value: BCD value to be converted
Return values Converted: word
TimeStamp configuration
Configure the RTC_AF trigger and enable the RTC TimeStamp using the
HAL_RTCEx_SetTimeStamp() function. You can also configure the RTC TimeStamp
with interrupt mode using the HAL_RTCEx_SetTimeStamp_IT() function.
To read the RTC TimeStamp Time and Date register, use the
HAL_RTCEx_GetTimeStamp() function.
Tamper configuration
Enable the RTC Tamper and configure the Tamper filter count, trigger Edge or Level
according to the Tamper filter (if equal to 0 Edge else Level) value, sampling
frequency, precharge or discharge and Pull-UP using the HAL_RTCEx_SetTamper()
function. You can configure RTC Tamper in interrupt mode using
HAL_RTCEx_SetTamper_IT() function.
HAL_RTCEx_SetTimeStamp
Function name HAL_StatusTypeDef HAL_RTCEx_SetTimeStamp
(RTC_HandleTypeDef * hrtc, uint32_t TimeStampEdge,
uint32_t RTC_TimeStampPin)
Function description Set TimeStamp.
Parameters hrtc: RTC handle
TimeStampEdge: Specifies the pin edge on which the
TimeStamp is activated. This parameter can be one of the
following values:
RTC_TIMESTAMPEDGE_RISING: the Time stamp
event occurs on the rising edge of the related pin.
RTC_TIMESTAMPEDGE_FALLING: the Time stamp
event occurs on the falling edge of the related pin.
RTC_TimeStampPin: specifies the RTC TimeStamp Pin.
This parameter can be one of the following values:
RTC_TIMESTAMPPIN_DEFAULT: PC13 is selected as
RTC TimeStamp Pin.
Return values HAL: status
Notes This API must be called before enabling the TimeStamp
feature.
HAL_RTCEx_SetTimeStamp_IT
Function name HAL_StatusTypeDef HAL_RTCEx_SetTimeStamp_IT
(RTC_HandleTypeDef * hrtc, uint32_t TimeStampEdge,
uint32_t RTC_TimeStampPin)
Function description Set TimeStamp with Interrupt.
Parameters hrtc: RTC handle
TimeStampEdge: Specifies the pin edge on which the
TimeStamp is activated. This parameter can be one of the
following values:
RTC_TIMESTAMPEDGE_RISING: the Time stamp
event occurs on the rising edge of the related pin.
RTC_TIMESTAMPEDGE_FALLING: the Time stamp
event occurs on the falling edge of the related pin.
RTC_TimeStampPin: Specifies the RTC TimeStamp Pin.
This parameter can be one of the following values:
RTC_TIMESTAMPPIN_DEFAULT: PC13 is selected as
RTC TimeStamp Pin.
Return values HAL: status
Notes This API must be called before enabling the TimeStamp
feature.
HAL_RTCEx_GetTimeStamp
Function name HAL_StatusTypeDef HAL_RTCEx_GetTimeStamp
(RTC_HandleTypeDef * hrtc, RTC_TimeTypeDef *
sTimeStamp, RTC_DateTypeDef * sTimeStampDate, uint32_t
Format)
Function description Get the RTC TimeStamp value.
Parameters hrtc: RTC handle
sTimeStamp: Pointer to Time structure
sTimeStampDate: Pointer to Date structure
Format: specifies the format of the entered parameters. This
parameter can be one of the following values:
RTC_FORMAT_BIN: Binary data format
RTC_FORMAT_BCD: BCD data format
Return values HAL: status
HAL_RTCEx_SetTamper
Function name HAL_StatusTypeDef HAL_RTCEx_SetTamper
(RTC_HandleTypeDef * hrtc, RTC_TamperTypeDef * sTamper)
Function description Set Tamper.
Parameters hrtc: RTC handle
sTamper: Pointer to Tamper Structure.
Return values HAL: status
Notes By calling this API we disable the tamper interrupt for all
tampers.
HAL_RTCEx_SetTamper_IT
Function name HAL_StatusTypeDef HAL_RTCEx_SetTamper_IT
(RTC_HandleTypeDef * hrtc, RTC_TamperTypeDef * sTamper)
Function description Sets Tamper with interrupt.
Parameters hrtc: pointer to a RTC_HandleTypeDef structure that
contains the configuration information for RTC.
sTamper: Pointer to RTC Tamper.
Return values HAL: status
Notes By calling this API we force the tamper interrupt for all
tampers.
HAL_RTCEx_TamperTimeStampIRQHandler
Function name void HAL_RTCEx_TamperTimeStampIRQHandler
(RTC_HandleTypeDef * hrtc)
Function description Handle TimeStamp interrupt request.
Parameters hrtc: RTC handle
Return values None
HAL_RTCEx_Tamper1EventCallback
Function name void HAL_RTCEx_Tamper1EventCallback
(RTC_HandleTypeDef * hrtc)
Function description Tamper 1 callback.
Parameters hrtc: RTC handle
Return values None
HAL_RTCEx_Tamper2EventCallback
Function name void HAL_RTCEx_Tamper2EventCallback
(RTC_HandleTypeDef * hrtc)
Function description Tamper 2 callback.
Parameters hrtc: RTC handle
Return values None
HAL_RTCEx_Tamper3EventCallback
Function name void HAL_RTCEx_Tamper3EventCallback
(RTC_HandleTypeDef * hrtc)
Function description Tamper 3 callback.
Parameters hrtc: RTC handle
Return values None
HAL_RTCEx_PollForTimeStampEvent
Function name HAL_StatusTypeDef HAL_RTCEx_PollForTimeStampEvent
(RTC_HandleTypeDef * hrtc, uint32_t Timeout)
Function description Handle TimeStamp polling request.
Parameters hrtc: RTC handle
Timeout: Timeout duration
Return values HAL: status
HAL_RTCEx_PollForTamper1Event
Function name HAL_StatusTypeDef HAL_RTCEx_PollForTamper1Event
(RTC_HandleTypeDef * hrtc, uint32_t Timeout)
Function description Handle Tamper 1 Polling.
Parameters hrtc: RTC handle
Timeout: Timeout duration
Return values HAL: status
HAL_RTCEx_PollForTamper2Event
Function name HAL_StatusTypeDef HAL_RTCEx_PollForTamper2Event
(RTC_HandleTypeDef * hrtc, uint32_t Timeout)
Function description Handle Tamper 2 Polling.
Parameters hrtc: RTC handle
Timeout: Timeout duration
Return values HAL: status
HAL_RTCEx_PollForTamper3Event
Function name HAL_StatusTypeDef HAL_RTCEx_PollForTamper3Event
(RTC_HandleTypeDef * hrtc, uint32_t Timeout)
Function description Handle Tamper 3 Polling.
Parameters hrtc: RTC handle
Timeout: Timeout duration
Return values HAL: status
HAL_RTCEx_SetWakeUpTimer_IT
Function name HAL_StatusTypeDef HAL_RTCEx_SetWakeUpTimer_IT
(RTC_HandleTypeDef * hrtc, uint32_t WakeUpCounter,
uint32_t WakeUpClock)
Function description Set wake up timer with interrupt.
Parameters hrtc: RTC handle
WakeUpCounter: Wake up counter
WakeUpClock: Wake up clock
Return values HAL: status
HAL_RTCEx_DeactivateWakeUpTimer
Function name uint32_t HAL_RTCEx_DeactivateWakeUpTimer
(RTC_HandleTypeDef * hrtc)
Function description Deactivate wake up timer counter.
Parameters hrtc: RTC handle
Return values HAL: status
HAL_RTCEx_GetWakeUpTimer
Function name uint32_t HAL_RTCEx_GetWakeUpTimer (RTC_HandleTypeDef
* hrtc)
Function description Get wake up timer counter.
Parameters hrtc: RTC handle
Return values Counter: value
HAL_RTCEx_WakeUpTimerIRQHandler
Function name void HAL_RTCEx_WakeUpTimerIRQHandler
(RTC_HandleTypeDef * hrtc)
Function description Handle Wake Up Timer interrupt request.
Parameters hrtc: RTC handle
Return values None
HAL_RTCEx_PollForWakeUpTimerEvent
Function name HAL_StatusTypeDef HAL_RTCEx_PollForWakeUpTimerEvent
(RTC_HandleTypeDef * hrtc, uint32_t Timeout)
Function description Handle Wake Up Timer Polling.
Parameters hrtc: RTC handle
Timeout: Timeout duration
Return values HAL: status
HAL_RTCEx_BKUPWrite
Function name void HAL_RTCEx_BKUPWrite (RTC_HandleTypeDef * hrtc,
uint32_t BackupRegister, uint32_t Data)
Function description Write a data in a specified RTC Backup data register.
Parameters hrtc: RTC handle
BackupRegister: RTC Backup data Register number. This
parameter can be: RTC_BKP_DRx where x can be from 0 to
4 to specify the register.
Data: Data to be written in the specified RTC Backup data
register.
Return values None
HAL_RTCEx_BKUPRead
Function name uint32_t HAL_RTCEx_BKUPRead (RTC_HandleTypeDef * hrtc,
uint32_t BackupRegister)
Function description Reads data from the specified RTC Backup data Register.
Parameters hrtc: RTC handle
BackupRegister: RTC Backup data Register number. This
parameter can be: RTC_BKP_DRx where x can be from 0 to
4 to specify the register.
Return values Read: value
HAL_RTCEx_SetSmoothCalib
Function name HAL_StatusTypeDef HAL_RTCEx_SetSmoothCalib
(RTC_HandleTypeDef * hrtc, uint32_t SmoothCalibPeriod,
uint32_t SmoothCalibPlusPulses, uint32_t
SmoothCalibMinusPulsesValue)
HAL_RTCEx_SetSynchroShift
Function name HAL_StatusTypeDef HAL_RTCEx_SetSynchroShift
(RTC_HandleTypeDef * hrtc, uint32_t ShiftAdd1S, uint32_t
ShiftSubFS)
Function description Configure the Synchronization Shift Control Settings.
Parameters hrtc: RTC handle
ShiftAdd1S: Select to add or not 1 second to the time
calendar. This parameter can be one of the following values :
RTC_SHIFTADD1S_SET: Add one second to the clock
calendar.
RTC_SHIFTADD1S_RESET: No effect.
ShiftSubFS: Select the number of Second Fractions to
substitute. This parameter can be one any value from 0 to
0x7FFF.
Return values HAL: status
Notes When REFCKON is set, firmware must not write to Shift
control register.
HAL_RTCEx_DeactivateCalibrationOutPut
Function name HAL_StatusTypeDef
HAL_RTCEx_DeactivateCalibrationOutPut
(RTC_HandleTypeDef * hrtc)
Function description Deactivate the Calibration Pinout (RTC_CALIB) Selection (1Hz or
512Hz).
Parameters hrtc: RTC handle
Return values HAL: status
HAL_RTCEx_SetRefClock
Function name HAL_StatusTypeDef HAL_RTCEx_SetRefClock
(RTC_HandleTypeDef * hrtc)
Function description Enable the RTC reference clock detection.
Parameters hrtc: RTC handle
Return values HAL: status
HAL_RTCEx_DeactivateRefClock
Function name HAL_StatusTypeDef HAL_RTCEx_DeactivateRefClock
(RTC_HandleTypeDef * hrtc)
Function description Disable the RTC reference clock detection.
Parameters hrtc: RTC handle
Return values HAL: status
HAL_RTCEx_EnableBypassShadow
Function name HAL_StatusTypeDef HAL_RTCEx_EnableBypassShadow
(RTC_HandleTypeDef * hrtc)
Function description Enable the Bypass Shadow feature.
Parameters hrtc: RTC handle
HAL_RTCEx_DisableBypassShadow
Function name HAL_StatusTypeDef HAL_RTCEx_DisableBypassShadow
(RTC_HandleTypeDef * hrtc)
Function description Disable the Bypass Shadow feature.
Parameters hrtc: RTC handle
Return values HAL: status
Notes When the Bypass Shadow is enabled the calendar value are
taken directly from the Calendar counter.
36.1.2 SMARTCARD_AdvFeatureInitTypeDef
Data Fields
uint32_t AdvFeatureInit
uint32_t TxPinLevelInvert
uint32_t RxPinLevelInvert
uint32_t DataInvert
uint32_t Swap
uint32_t OverrunDisable
uint32_t DMADisableonRxError
uint32_t MSBFirst
Field Documentation
uint32_t SMARTCARD_AdvFeatureInitTypeDef::AdvFeatureInit
Specifies which advanced SMARTCARD features is initialized. Several advanced
features may be initialized at the same time. This parameter can be a value of
SMARTCARD_Advanced_Features_Initialization_Type
uint32_t SMARTCARD_AdvFeatureInitTypeDef::TxPinLevelInvert
Specifies whether the TX pin active level is inverted. This parameter can be a value of
SMARTCARD_Tx_Inv
uint32_t SMARTCARD_AdvFeatureInitTypeDef::RxPinLevelInvert
Specifies whether the RX pin active level is inverted. This parameter can be a value of
SMARTCARD_Rx_Inv
uint32_t SMARTCARD_AdvFeatureInitTypeDef::DataInvert
Specifies whether data are inverted (positive/direct logic vs negative/inverted logic).
This parameter can be a value of SMARTCARD_Data_Inv
36.1.3 SMARTCARD_HandleTypeDef
Data Fields
USART_TypeDef * Instance
SMARTCARD_InitTypeDef Init
SMARTCARD_AdvFeatureInitTypeDef AdvancedInit
uint8_t * pTxBuffPtr
uint16_t TxXferSize
__IO uint16_t TxXferCount
uint8_t * pRxBuffPtr
uint16_t RxXferSize
__IO uint16_t RxXferCount
DMA_HandleTypeDef * hdmatx
DMA_HandleTypeDef * hdmarx
HAL_LockTypeDef Lock
__IO HAL_SMARTCARD_StateTypeDef gState
__IO HAL_SMARTCARD_StateTypeDef RxState
__IO uint32_t ErrorCode
Field Documentation
USART_TypeDef* SMARTCARD_HandleTypeDef::Instance
USART registers base address
SMARTCARD_InitTypeDef SMARTCARD_HandleTypeDef::Init
SmartCard communication parameters
SMARTCARD_AdvFeatureInitTypeDef
SMARTCARD_HandleTypeDef::AdvancedInit
SmartCard advanced features initialization parameters
uint8_t* SMARTCARD_HandleTypeDef::pTxBuffPtr
Pointer to SmartCard Tx transfer Buffer
uint16_t SMARTCARD_HandleTypeDef::TxXferSize
SmartCard Tx Transfer size
__IO uint16_t SMARTCARD_HandleTypeDef::TxXferCount
SmartCard Tx Transfer Counter
uint8_t* SMARTCARD_HandleTypeDef::pRxBuffPtr
Pointer to SmartCard Rx transfer Buffer
uint16_t SMARTCARD_HandleTypeDef::RxXferSize
SmartCard Rx Transfer size
__IO uint16_t SMARTCARD_HandleTypeDef::RxXferCount
SmartCard Rx Transfer Counter
DMA_HandleTypeDef* SMARTCARD_HandleTypeDef::hdmatx
SmartCard Tx DMA Handle parameters
You can refer to the SMARTCARD HAL driver header file for more useful macros
HAL_SMARTCARD_Init
Function name HAL_StatusTypeDef HAL_SMARTCARD_Init
(SMARTCARD_HandleTypeDef * hsmartcard)
Function description Initialize the SMARTCARD mode according to the specified
parameters in the SMARTCARD_HandleTypeDef and initialize the
associated handle.
Parameters hsmartcard: Pointer to a SMARTCARD_HandleTypeDef
structure that contains the configuration information for the
specified SMARTCARD module.
Return values HAL: status
HAL_SMARTCARD_MspInit
Function name void HAL_SMARTCARD_MspInit
(SMARTCARD_HandleTypeDef * hsmartcard)
Function description Initialize the SMARTCARD MSP.
Parameters hsmartcard: Pointer to a SMARTCARD_HandleTypeDef
structure that contains the configuration information for the
specified SMARTCARD module.
Return values None
HAL_SMARTCARD_MspDeInit
Function name void HAL_SMARTCARD_MspDeInit
(SMARTCARD_HandleTypeDef * hsmartcard)
Function description DeInitialize the SMARTCARD MSP.
Parameters hsmartcard: Pointer to a SMARTCARD_HandleTypeDef
structure that contains the configuration information for the
specified SMARTCARD module.
Return values None
HAL_SMARTCARD_Transmit
Function name HAL_StatusTypeDef HAL_SMARTCARD_Transmit
(SMARTCARD_HandleTypeDef * hsmartcard, uint8_t * pData,
uint16_t Size, uint32_t Timeout)
Function description Send an amount of data in blocking mode.
Parameters hsmartcard: Pointer to a SMARTCARD_HandleTypeDef
structure that contains the configuration information for the
specified SMARTCARD module.
pData: pointer to data buffer.
Size: amount of data to be sent.
Timeout: Timeout duration.
Return values HAL: status
HAL_SMARTCARD_Receive
Function name HAL_StatusTypeDef HAL_SMARTCARD_Receive
(SMARTCARD_HandleTypeDef * hsmartcard, uint8_t * pData,
HAL_SMARTCARD_Transmit_IT
Function name HAL_StatusTypeDef HAL_SMARTCARD_Transmit_IT
(SMARTCARD_HandleTypeDef * hsmartcard, uint8_t * pData,
uint16_t Size)
Function description Send an amount of data in interrupt mode.
Parameters hsmartcard: Pointer to a SMARTCARD_HandleTypeDef
structure that contains the configuration information for the
specified SMARTCARD module.
pData: pointer to data buffer.
Size: amount of data to be sent.
Return values HAL: status
HAL_SMARTCARD_Receive_IT
Function name HAL_StatusTypeDef HAL_SMARTCARD_Receive_IT
(SMARTCARD_HandleTypeDef * hsmartcard, uint8_t * pData,
uint16_t Size)
Function description Receive an amount of data in interrupt mode.
Parameters hsmartcard: Pointer to a SMARTCARD_HandleTypeDef
structure that contains the configuration information for the
specified SMARTCARD module.
pData: pointer to data buffer.
Size: amount of data to be received.
Return values HAL: status
HAL_SMARTCARD_Transmit_DMA
Function name HAL_StatusTypeDef HAL_SMARTCARD_Transmit_DMA
(SMARTCARD_HandleTypeDef * hsmartcard, uint8_t * pData,
uint16_t Size)
Function description Send an amount of data in DMA mode.
Parameters hsmartcard: Pointer to a SMARTCARD_HandleTypeDef
structure that contains the configuration information for the
specified SMARTCARD module.
pData: pointer to data buffer.
Size: amount of data to be sent.
HAL_SMARTCARD_Receive_DMA
Function name HAL_StatusTypeDef HAL_SMARTCARD_Receive_DMA
(SMARTCARD_HandleTypeDef * hsmartcard, uint8_t * pData,
uint16_t Size)
Function description Receive an amount of data in DMA mode.
Parameters hsmartcard: Pointer to a SMARTCARD_HandleTypeDef
structure that contains the configuration information for the
specified SMARTCARD module.
pData: pointer to data buffer.
Size: amount of data to be received.
Return values HAL: status
Notes The SMARTCARD-associated USART parity is enabled (PCE
= 1), the received data contain the parity bit (MSB position).
HAL_SMARTCARD_Abort
Function name HAL_StatusTypeDef HAL_SMARTCARD_Abort
(SMARTCARD_HandleTypeDef * hsmartcard)
Function description Abort ongoing transfers (blocking mode).
Parameters hsmartcard: Pointer to a SMARTCARD_HandleTypeDef
structure that contains the configuration information for the
specified SMARTCARD module.
Return values HAL: status
Notes This procedure could be used for aborting any ongoing
transfer started in Interrupt or DMA mode. This procedure
performs following operations : Disable SMARTCARD
Interrupts (Tx and Rx)Disable the DMA transfer in the
peripheral register (if enabled)Abort DMA transfer by calling
HAL_DMA_Abort (in case of transfer in DMA mode)Set
handle State to READY
This procedure is executed in blocking mode : when exiting
function, Abort is considered as completed.
HAL_SMARTCARD_AbortTransmit
Function name HAL_StatusTypeDef HAL_SMARTCARD_AbortTransmit
(SMARTCARD_HandleTypeDef * hsmartcard)
Function description Abort ongoing Transmit transfer (blocking mode).
Parameters hsmartcard: Pointer to a SMARTCARD_HandleTypeDef
structure that contains the configuration information for the
specified SMARTCARD module.
Return values HAL: status
Notes This procedure could be used for aborting any ongoing Tx
transfer started in Interrupt or DMA mode. This procedure
performs following operations : Disable SMARTCARD
HAL_SMARTCARD_AbortReceive
Function name HAL_StatusTypeDef HAL_SMARTCARD_AbortReceive
(SMARTCARD_HandleTypeDef * hsmartcard)
Function description Abort ongoing Receive transfer (blocking mode).
Parameters hsmartcard: Pointer to a SMARTCARD_HandleTypeDef
structure that contains the configuration information for the
specified SMARTCARD module.
Return values HAL: status
Notes This procedure could be used for aborting any ongoing Rx
transfer started in Interrupt or DMA mode. This procedure
performs following operations : Disable SMARTCARD
Interrupts (Rx)Disable the DMA transfer in the peripheral
register (if enabled)Abort DMA transfer by calling
HAL_DMA_Abort (in case of transfer in DMA mode)Set
handle State to READY
This procedure is executed in blocking mode : when exiting
function, Abort is considered as completed.
HAL_SMARTCARD_Abort_IT
Function name HAL_StatusTypeDef HAL_SMARTCARD_Abort_IT
(SMARTCARD_HandleTypeDef * hsmartcard)
Function description Abort ongoing transfers (Interrupt mode).
Parameters hsmartcard: Pointer to a SMARTCARD_HandleTypeDef
structure that contains the configuration information for the
specified SMARTCARD module.
Return values HAL: status
Notes This procedure could be used for aborting any ongoing
transfer started in Interrupt or DMA mode. This procedure
performs following operations : Disable SMARTCARD
Interrupts (Tx and Rx)Disable the DMA transfer in the
peripheral register (if enabled)Abort DMA transfer by calling
HAL_DMA_Abort_IT (in case of transfer in DMA mode)Set
handle State to READYAt abort completion, call user abort
complete callback
This procedure is executed in Interrupt mode, meaning that
abort procedure could be considered as completed only when
user abort complete callback is executed (not when exiting
function).
HAL_SMARTCARD_AbortReceive_IT
Function name HAL_StatusTypeDef HAL_SMARTCARD_AbortReceive_IT
(SMARTCARD_HandleTypeDef * hsmartcard)
Function description Abort ongoing Receive transfer (Interrupt mode).
Parameters hsmartcard: Pointer to a SMARTCARD_HandleTypeDef
structure that contains the configuration information for the
specified SMARTCARD module.
Return values HAL: status
Notes This procedure could be used for aborting any ongoing Rx
transfer started in Interrupt or DMA mode. This procedure
performs following operations : Disable SMARTCARD
Interrupts (Rx)Disable the DMA transfer in the peripheral
register (if enabled)Abort DMA transfer by calling
HAL_DMA_Abort_IT (in case of transfer in DMA mode)Set
handle State to READYAt abort completion, call user abort
complete callback
This procedure is executed in Interrupt mode, meaning that
abort procedure could be considered as completed only when
user abort complete callback is executed (not when exiting
function).
HAL_SMARTCARD_IRQHandler
Function name void HAL_SMARTCARD_IRQHandler
(SMARTCARD_HandleTypeDef * hsmartcard)
Function description Handle SMARTCARD interrupt requests.
HAL_SMARTCARD_TxCpltCallback
Function name void HAL_SMARTCARD_TxCpltCallback
(SMARTCARD_HandleTypeDef * hsmartcard)
Function description Tx Transfer completed callback.
Parameters hsmartcard: Pointer to a SMARTCARD_HandleTypeDef
structure that contains the configuration information for the
specified SMARTCARD module.
Return values None
HAL_SMARTCARD_RxCpltCallback
Function name void HAL_SMARTCARD_RxCpltCallback
(SMARTCARD_HandleTypeDef * hsmartcard)
Function description Rx Transfer completed callback.
Parameters hsmartcard: Pointer to a SMARTCARD_HandleTypeDef
structure that contains the configuration information for the
specified SMARTCARD module.
Return values None
HAL_SMARTCARD_ErrorCallback
Function name void HAL_SMARTCARD_ErrorCallback
(SMARTCARD_HandleTypeDef * hsmartcard)
Function description SMARTCARD error callback.
Parameters hsmartcard: Pointer to a SMARTCARD_HandleTypeDef
structure that contains the configuration information for the
specified SMARTCARD module.
Return values None
HAL_SMARTCARD_AbortCpltCallback
Function name void HAL_SMARTCARD_AbortCpltCallback
(SMARTCARD_HandleTypeDef * hsmartcard)
Function description SMARTCARD Abort Complete callback.
Parameters hsmartcard: Pointer to a SMARTCARD_HandleTypeDef
structure that contains the configuration information for the
specified SMARTCARD module.
Return values None
HAL_SMARTCARD_AbortReceiveCpltCallback
Function name void HAL_SMARTCARD_AbortReceiveCpltCallback
(SMARTCARD_HandleTypeDef * hsmartcard)
Function description SMARTCARD Abort Receive Complete callback.
Parameters hsmartcard: Pointer to a SMARTCARD_HandleTypeDef
structure that contains the configuration information for the
specified SMARTCARD module.
Return values None
HAL_SMARTCARD_GetState
Function name HAL_SMARTCARD_StateTypeDef
HAL_SMARTCARD_GetState (SMARTCARD_HandleTypeDef *
hsmartcard)
Function description Return the SMARTCARD handle state.
Parameters hsmartcard: Pointer to a SMARTCARD_HandleTypeDef
structure that contains the configuration information for the
specified SMARTCARD module.
Return values SMARTCARD: handle state
HAL_SMARTCARD_GetError
Function name uint32_t HAL_SMARTCARD_GetError
(SMARTCARD_HandleTypeDef * hsmartcard)
Function description Return the SMARTCARD handle error code.
Parameters hsmartcard: Pointer to a SMARTCARD_HandleTypeDef
structure that contains the configuration information for the
specified SMARTCARD module.
Return values SMARTCARD: handle Error Code
Return value:
HAL_SMARTCARDEx_BlockLength_Config
Function name void HAL_SMARTCARDEx_BlockLength_Config
(SMARTCARD_HandleTypeDef * hsmartcard, uint8_t
BlockLength)
Function description Update on the fly the SMARTCARD block length in RTOR register.
Parameters hsmartcard: Pointer to a SMARTCARD_HandleTypeDef
structure that contains the configuration information for the
specified SMARTCARD module.
BlockLength: SMARTCARD block length (8-bit long at
most)
Return values None
HAL_SMARTCARDEx_EnableReceiverTimeOut
Function name HAL_StatusTypeDef
HAL_SMARTCARDEx_EnableReceiverTimeOut
(SMARTCARD_HandleTypeDef * hsmartcard)
Function description Enable the SMARTCARD receiver timeout feature.
Parameters hsmartcard: Pointer to a SMARTCARD_HandleTypeDef
structure that contains the configuration information for the
specified SMARTCARD module.
Return values HAL: status
HAL_SMARTCARDEx_DisableReceiverTimeOut
Function name HAL_StatusTypeDef
HAL_SMARTCARDEx_DisableReceiverTimeOut
(SMARTCARD_HandleTypeDef * hsmartcard)
Function description Disable the SMARTCARD receiver timeout feature.
Parameters hsmartcard: Pointer to a SMARTCARD_HandleTypeDef
structure that contains the configuration information for the
specified SMARTCARD module.
Return values HAL: status
38.1.2 SMBUS_HandleTypeDef
Data Fields
I2C_TypeDef * Instance
SMBUS_InitTypeDef Init
uint8_t * pBuffPtr
uint16_t XferSize
__IO uint16_t XferCount
__IO uint32_t XferOptions
__IO uint32_t PreviousState
HAL_LockTypeDef Lock
__IO uint32_t State
__IO uint32_t ErrorCode
Field Documentation
I2C_TypeDef* SMBUS_HandleTypeDef::Instance
SMBUS registers base address
SMBUS_InitTypeDef SMBUS_HandleTypeDef::Init
SMBUS communication parameters
uint8_t* SMBUS_HandleTypeDef::pBuffPtr
Pointer to SMBUS transfer buffer
uint16_t SMBUS_HandleTypeDef::XferSize
SMBUS transfer size
__IO uint16_t SMBUS_HandleTypeDef::XferCount
SMBUS transfer counter
__IO uint32_t SMBUS_HandleTypeDef::XferOptions
SMBUS transfer options
__IO uint32_t SMBUS_HandleTypeDef::PreviousState
SMBUS communication Previous state
HAL_LockTypeDef SMBUS_HandleTypeDef::Lock
SMBUS locking object
__IO uint32_t SMBUS_HandleTypeDef::State
SMBUS communication state
__IO uint32_t SMBUS_HandleTypeDef::ErrorCode
SMBUS Error code
You can refer to the SMBUS HAL driver header file for more useful macros
HAL_SMBUS_Init
Function name HAL_StatusTypeDef HAL_SMBUS_Init
(SMBUS_HandleTypeDef * hsmbus)
Function description Initialize the SMBUS according to the specified parameters in the
SMBUS_InitTypeDef and initialize the associated handle.
Parameters hsmbus: Pointer to a SMBUS_HandleTypeDef structure that
contains the configuration information for the specified
SMBUS.
Return values HAL: status
HAL_SMBUS_DeInit
Function name HAL_StatusTypeDef HAL_SMBUS_DeInit
(SMBUS_HandleTypeDef * hsmbus)
Function description DeInitialize the SMBUS peripheral.
Parameters hsmbus: Pointer to a SMBUS_HandleTypeDef structure that
contains the configuration information for the specified
SMBUS.
Return values HAL: status
HAL_SMBUS_MspInit
Function name void HAL_SMBUS_MspInit (SMBUS_HandleTypeDef *
hsmbus)
Function description Initialize the SMBUS MSP.
Parameters hsmbus: Pointer to a SMBUS_HandleTypeDef structure that
contains the configuration information for the specified
SMBUS.
Return values None
HAL_SMBUS_ConfigAnalogFilter
Function name HAL_StatusTypeDef HAL_SMBUS_ConfigAnalogFilter
(SMBUS_HandleTypeDef * hsmbus, uint32_t AnalogFilter)
Function description Configure Analog noise filter.
Parameters hsmbus: Pointer to a SMBUS_HandleTypeDef structure that
contains the configuration information for the specified
SMBUS.
AnalogFilter: This parameter can be one of the following
values:
SMBUS_ANALOGFILTER_ENABLE
SMBUS_ANALOGFILTER_DISABLE
Return values HAL: status
HAL_SMBUS_ConfigDigitalFilter
Function name HAL_StatusTypeDef HAL_SMBUS_ConfigDigitalFilter
(SMBUS_HandleTypeDef * hsmbus, uint32_t DigitalFilter)
Function description Configure Digital noise filter.
Parameters hsmbus: Pointer to a SMBUS_HandleTypeDef structure that
contains the configuration information for the specified
SMBUS.
DigitalFilter: Coefficient of digital noise filter between
Min_Data=0x00 and Max_Data=0x0F.
Return values HAL: status
HAL_SMBUS_IsDeviceReady
Function name HAL_StatusTypeDef HAL_SMBUS_IsDeviceReady
(SMBUS_HandleTypeDef * hsmbus, uint16_t DevAddress,
uint32_t Trials, uint32_t Timeout)
Function description Check if target device is ready for communication.
Parameters hsmbus: Pointer to a SMBUS_HandleTypeDef structure that
contains the configuration information for the specified
SMBUS.
DevAddress: Target device address: The device 7 bits
address value in datasheet must be shift at right before call
interface
Trials: Number of trials
HAL_SMBUS_Master_Transmit_IT
Function name HAL_StatusTypeDef HAL_SMBUS_Master_Transmit_IT
(SMBUS_HandleTypeDef * hsmbus, uint16_t DevAddress,
uint8_t * pData, uint16_t Size, uint32_t XferOptions)
Function description Transmit in master/host SMBUS mode an amount of data in non-
blocking mode with Interrupt.
Parameters hsmbus: Pointer to a SMBUS_HandleTypeDef structure that
contains the configuration information for the specified
SMBUS.
DevAddress: Target device address: The device 7 bits
address value in datasheet must be shift at right before call
interface
pData: Pointer to data buffer
Size: Amount of data to be sent
XferOptions: Options of Transfer, value of SMBUS
XferOptions definition
Return values HAL: status
HAL_SMBUS_Master_Receive_IT
Function name HAL_StatusTypeDef HAL_SMBUS_Master_Receive_IT
(SMBUS_HandleTypeDef * hsmbus, uint16_t DevAddress,
uint8_t * pData, uint16_t Size, uint32_t XferOptions)
Function description Receive in master/host SMBUS mode an amount of data in non-
blocking mode with Interrupt.
Parameters hsmbus: Pointer to a SMBUS_HandleTypeDef structure that
contains the configuration information for the specified
SMBUS.
DevAddress: Target device address: The device 7 bits
address value in datasheet must be shift at right before call
interface
pData: Pointer to data buffer
Size: Amount of data to be sent
XferOptions: Options of Transfer, value of SMBUS
XferOptions definition
Return values HAL: status
HAL_SMBUS_Master_Abort_IT
Function name HAL_StatusTypeDef HAL_SMBUS_Master_Abort_IT
(SMBUS_HandleTypeDef * hsmbus, uint16_t DevAddress)
Function description Abort a master/host SMBUS process communication with
Interrupt.
Parameters hsmbus: Pointer to a SMBUS_HandleTypeDef structure that
contains the configuration information for the specified
HAL_SMBUS_Slave_Transmit_IT
Function name HAL_StatusTypeDef HAL_SMBUS_Slave_Transmit_IT
(SMBUS_HandleTypeDef * hsmbus, uint8_t * pData, uint16_t
Size, uint32_t XferOptions)
Function description Transmit in slave/device SMBUS mode an amount of data in non-
blocking mode with Interrupt.
Parameters hsmbus: Pointer to a SMBUS_HandleTypeDef structure that
contains the configuration information for the specified
SMBUS.
pData: Pointer to data buffer
Size: Amount of data to be sent
XferOptions: Options of Transfer, value of SMBUS
XferOptions definition
Return values HAL: status
HAL_SMBUS_Slave_Receive_IT
Function name HAL_StatusTypeDef HAL_SMBUS_Slave_Receive_IT
(SMBUS_HandleTypeDef * hsmbus, uint8_t * pData, uint16_t
Size, uint32_t XferOptions)
Function description Receive in slave/device SMBUS mode an amount of data in non-
blocking mode with Interrupt.
Parameters hsmbus: Pointer to a SMBUS_HandleTypeDef structure that
contains the configuration information for the specified
SMBUS.
pData: Pointer to data buffer
Size: Amount of data to be sent
XferOptions: Options of Transfer, value of SMBUS
XferOptions definition
Return values HAL: status
HAL_SMBUS_EnableAlert_IT
Function name HAL_StatusTypeDef HAL_SMBUS_EnableAlert_IT
(SMBUS_HandleTypeDef * hsmbus)
Function description Enable the SMBUS alert mode with Interrupt.
Parameters hsmbus: Pointer to a SMBUS_HandleTypeDef structure that
contains the configuration information for the specified
SMBUSx peripheral.
Return values HAL: status
HAL_SMBUS_EnableListen_IT
Function name HAL_StatusTypeDef HAL_SMBUS_EnableListen_IT
(SMBUS_HandleTypeDef * hsmbus)
Function description Enable the Address listen mode with Interrupt.
Parameters hsmbus: Pointer to a SMBUS_HandleTypeDef structure that
contains the configuration information for the specified
SMBUS.
Return values HAL: status
HAL_SMBUS_DisableListen_IT
Function name HAL_StatusTypeDef HAL_SMBUS_DisableListen_IT
(SMBUS_HandleTypeDef * hsmbus)
Function description Disable the Address listen mode with Interrupt.
Parameters hsmbus: Pointer to a SMBUS_HandleTypeDef structure that
contains the configuration information for the specified
SMBUS.
Return values HAL: status
HAL_SMBUS_EV_IRQHandler
Function name void HAL_SMBUS_EV_IRQHandler (SMBUS_HandleTypeDef *
hsmbus)
Function description Handle SMBUS event interrupt request.
Parameters hsmbus: Pointer to a SMBUS_HandleTypeDef structure that
contains the configuration information for the specified
SMBUS.
Return values None
HAL_SMBUS_ER_IRQHandler
Function name void HAL_SMBUS_ER_IRQHandler (SMBUS_HandleTypeDef *
hsmbus)
Function description Handle SMBUS error interrupt request.
Parameters hsmbus: Pointer to a SMBUS_HandleTypeDef structure that
contains the configuration information for the specified
HAL_SMBUS_MasterTxCpltCallback
Function name void HAL_SMBUS_MasterTxCpltCallback
(SMBUS_HandleTypeDef * hsmbus)
Function description Master Tx Transfer completed callback.
Parameters hsmbus: Pointer to a SMBUS_HandleTypeDef structure that
contains the configuration information for the specified
SMBUS.
Return values None
HAL_SMBUS_MasterRxCpltCallback
Function name void HAL_SMBUS_MasterRxCpltCallback
(SMBUS_HandleTypeDef * hsmbus)
Function description Master Rx Transfer completed callback.
Parameters hsmbus: Pointer to a SMBUS_HandleTypeDef structure that
contains the configuration information for the specified
SMBUS.
Return values None
HAL_SMBUS_SlaveTxCpltCallback
Function name void HAL_SMBUS_SlaveTxCpltCallback
(SMBUS_HandleTypeDef * hsmbus)
Function description Slave Tx Transfer completed callback.
Parameters hsmbus: Pointer to a SMBUS_HandleTypeDef structure that
contains the configuration information for the specified
SMBUS.
Return values None
HAL_SMBUS_SlaveRxCpltCallback
Function name void HAL_SMBUS_SlaveRxCpltCallback
(SMBUS_HandleTypeDef * hsmbus)
Function description Slave Rx Transfer completed callback.
Parameters hsmbus: Pointer to a SMBUS_HandleTypeDef structure that
contains the configuration information for the specified
SMBUS.
Return values None
HAL_SMBUS_ListenCpltCallback
Function name void HAL_SMBUS_ListenCpltCallback
(SMBUS_HandleTypeDef * hsmbus)
Function description Listen Complete callback.
Parameters hsmbus: Pointer to a SMBUS_HandleTypeDef structure that
contains the configuration information for the specified
SMBUS.
Return values None
HAL_SMBUS_ErrorCallback
Function name void HAL_SMBUS_ErrorCallback (SMBUS_HandleTypeDef *
hsmbus)
Function description SMBUS error callback.
Parameters hsmbus: Pointer to a SMBUS_HandleTypeDef structure that
contains the configuration information for the specified
SMBUS.
Return values None
HAL_SMBUS_GetState
Function name uint32_t HAL_SMBUS_GetState (SMBUS_HandleTypeDef *
hsmbus)
Function description Return the SMBUS handle state.
Parameters hsmbus: Pointer to a SMBUS_HandleTypeDef structure that
contains the configuration information for the specified
SMBUS.
Return values HAL: state
39.1.2 __SPI_HandleTypeDef
Data Fields
SPI_TypeDef * Instance
SPI_InitTypeDef Init
uint8_t * pTxBuffPtr
uint16_t TxXferSize
__IO uint16_t TxXferCount
uint8_t * pRxBuffPtr
uint16_t RxXferSize
__IO uint16_t RxXferCount
uint32_t CRCSize
void(* RxISR
void(* TxISR
DMA_HandleTypeDef * hdmatx
DMA_HandleTypeDef * hdmarx
HAL_LockTypeDef Lock
__IO HAL_SPI_StateTypeDef State
__IO uint32_t ErrorCode
Field Documentation
SPI_TypeDef* __SPI_HandleTypeDef::Instance
SPI registers base address
SPI_InitTypeDef __SPI_HandleTypeDef::Init
SPI communication parameters
uint8_t* __SPI_HandleTypeDef::pTxBuffPtr
Pointer to SPI Tx transfer Buffer
uint16_t __SPI_HandleTypeDef::TxXferSize
SPI Tx Transfer size
__IO uint16_t __SPI_HandleTypeDef::TxXferCount
SPI Tx Transfer Counter
uint8_t* __SPI_HandleTypeDef::pRxBuffPtr
Pointer to SPI Rx transfer Buffer
uint16_t __SPI_HandleTypeDef::RxXferSize
SPI Rx Transfer size
__IO uint16_t __SPI_HandleTypeDef::RxXferCount
SPI Rx Transfer Counter
HAL_SPI_Init
Function name HAL_StatusTypeDef HAL_SPI_Init (SPI_HandleTypeDef * hspi)
Function description Initialize the SPI according to the specified parameters in the
SPI_InitTypeDef and initialize the associated handle.
Parameters hspi: pointer to a SPI_HandleTypeDef structure that contains
the configuration information for SPI module.
Return values HAL: status
HAL_SPI_DeInit
Function name HAL_StatusTypeDef HAL_SPI_DeInit (SPI_HandleTypeDef *
hspi)
Function description De-Initialize the SPI peripheral.
Parameters hspi: pointer to a SPI_HandleTypeDef structure that contains
the configuration information for SPI module.
Return values HAL: status
HAL_SPI_MspInit
Function name void HAL_SPI_MspInit (SPI_HandleTypeDef * hspi)
Function description Initialize the SPI MSP.
Parameters hspi: pointer to a SPI_HandleTypeDef structure that contains
the configuration information for SPI module.
Return values None
HAL_SPI_MspDeInit
Function name void HAL_SPI_MspDeInit (SPI_HandleTypeDef * hspi)
Function description De-Initialize the SPI MSP.
Parameters hspi: pointer to a SPI_HandleTypeDef structure that contains
the configuration information for SPI module.
Return values None
HAL_SPI_Transmit
Function name HAL_StatusTypeDef HAL_SPI_Transmit (SPI_HandleTypeDef *
hspi, uint8_t * pData, uint16_t Size, uint32_t Timeout)
Function description Transmit an amount of data in blocking mode.
Parameters hspi: pointer to a SPI_HandleTypeDef structure that contains
the configuration information for SPI module.
HAL_SPI_Receive
Function name HAL_StatusTypeDef HAL_SPI_Receive (SPI_HandleTypeDef *
hspi, uint8_t * pData, uint16_t Size, uint32_t Timeout)
Function description Receive an amount of data in blocking mode.
Parameters hspi: pointer to a SPI_HandleTypeDef structure that contains
the configuration information for SPI module.
pData: pointer to data buffer
Size: amount of data to be received
Timeout: Timeout duration
Return values HAL: status
HAL_SPI_TransmitReceive
Function name HAL_StatusTypeDef HAL_SPI_TransmitReceive
(SPI_HandleTypeDef * hspi, uint8_t * pTxData, uint8_t *
pRxData, uint16_t Size, uint32_t Timeout)
Function description Transmit and Receive an amount of data in blocking mode.
Parameters hspi: pointer to a SPI_HandleTypeDef structure that contains
the configuration information for SPI module.
pTxData: pointer to transmission data buffer
pRxData: pointer to reception data buffer
Size: amount of data to be sent and received
Timeout: Timeout duration
Return values HAL: status
HAL_SPI_Transmit_IT
Function name HAL_StatusTypeDef HAL_SPI_Transmit_IT
(SPI_HandleTypeDef * hspi, uint8_t * pData, uint16_t Size)
Function description Transmit an amount of data in non-blocking mode with Interrupt.
Parameters hspi: pointer to a SPI_HandleTypeDef structure that contains
the configuration information for SPI module.
pData: pointer to data buffer
Size: amount of data to be sent
Return values HAL: status
HAL_SPI_Receive_IT
Function name HAL_StatusTypeDef HAL_SPI_Receive_IT
(SPI_HandleTypeDef * hspi, uint8_t * pData, uint16_t Size)
Function description Receive an amount of data in non-blocking mode with Interrupt.
HAL_SPI_TransmitReceive_IT
Function name HAL_StatusTypeDef HAL_SPI_TransmitReceive_IT
(SPI_HandleTypeDef * hspi, uint8_t * pTxData, uint8_t *
pRxData, uint16_t Size)
Function description Transmit and Receive an amount of data in non-blocking mode
with Interrupt.
Parameters hspi: pointer to a SPI_HandleTypeDef structure that contains
the configuration information for SPI module.
pTxData: pointer to transmission data buffer
pRxData: pointer to reception data buffer
Size: amount of data to be sent and received
Return values HAL: status
HAL_SPI_Transmit_DMA
Function name HAL_StatusTypeDef HAL_SPI_Transmit_DMA
(SPI_HandleTypeDef * hspi, uint8_t * pData, uint16_t Size)
Function description Transmit an amount of data in non-blocking mode with DMA.
Parameters hspi: pointer to a SPI_HandleTypeDef structure that contains
the configuration information for SPI module.
pData: pointer to data buffer
Size: amount of data to be sent
Return values HAL: status
HAL_SPI_Receive_DMA
Function name HAL_StatusTypeDef HAL_SPI_Receive_DMA
(SPI_HandleTypeDef * hspi, uint8_t * pData, uint16_t Size)
Function description Receive an amount of data in non-blocking mode with DMA.
Parameters hspi: pointer to a SPI_HandleTypeDef structure that contains
the configuration information for SPI module.
pData: pointer to data buffer
Size: amount of data to be sent
Return values HAL: status
Notes In case of MASTER mode and SPI_DIRECTION_2LINES
direction, hdmatx shall be defined.
When the CRC feature is enabled the pData Length must be
Size + 1.
HAL_SPI_DMAPause
Function name HAL_StatusTypeDef HAL_SPI_DMAPause
(SPI_HandleTypeDef * hspi)
Function description Pause the DMA Transfer.
Parameters hspi: pointer to a SPI_HandleTypeDef structure that contains
the configuration information for the specified SPI module.
Return values HAL: status
HAL_SPI_DMAResume
Function name HAL_StatusTypeDef HAL_SPI_DMAResume
(SPI_HandleTypeDef * hspi)
Function description Resume the DMA Transfer.
Parameters hspi: pointer to a SPI_HandleTypeDef structure that contains
the configuration information for the specified SPI module.
Return values HAL: status
HAL_SPI_DMAStop
Function name HAL_StatusTypeDef HAL_SPI_DMAStop (SPI_HandleTypeDef
* hspi)
Function description Stop the DMA Transfer.
Parameters hspi: pointer to a SPI_HandleTypeDef structure that contains
the configuration information for the specified SPI module.
Return values HAL: status
HAL_SPI_Abort_IT
Function name HAL_StatusTypeDef HAL_SPI_Abort_IT (SPI_HandleTypeDef *
hspi)
Function description Abort ongoing transfer (Interrupt mode).
Parameters hspi: SPI handle.
Return values HAL: status
Notes This procedure could be used for aborting any ongoing
transfer (Tx and Rx), started in Interrupt or DMA mode. This
procedure performs following operations : Disable SPI
Interrupts (depending of transfer direction)Disable the DMA
transfer in the peripheral register (if enabled)Abort DMA
transfer by calling HAL_DMA_Abort_IT (in case of transfer in
DMA mode)Set handle State to READYAt abort completion,
call user abort complete callback
This procedure is executed in Interrupt mode, meaning that
abort procedure could be considered as completed only when
user abort complete callback is executed (not when exiting
function).
HAL_SPI_IRQHandler
Function name void HAL_SPI_IRQHandler (SPI_HandleTypeDef * hspi)
Function description Handle SPI interrupt request.
Parameters hspi: pointer to a SPI_HandleTypeDef structure that contains
the configuration information for the specified SPI module.
Return values None
HAL_SPI_RxCpltCallback
Function name void HAL_SPI_RxCpltCallback (SPI_HandleTypeDef * hspi)
Function description Rx Transfer completed callback.
Parameters hspi: pointer to a SPI_HandleTypeDef structure that contains
the configuration information for SPI module.
Return values None
HAL_SPI_TxRxCpltCallback
Function name void HAL_SPI_TxRxCpltCallback (SPI_HandleTypeDef * hspi)
Function description Tx and Rx Transfer completed callback.
Parameters hspi: pointer to a SPI_HandleTypeDef structure that contains
the configuration information for SPI module.
Return values None
HAL_SPI_TxHalfCpltCallback
Function name void HAL_SPI_TxHalfCpltCallback (SPI_HandleTypeDef * hspi)
Function description Tx Half Transfer completed callback.
Parameters hspi: pointer to a SPI_HandleTypeDef structure that contains
the configuration information for SPI module.
Return values None
HAL_SPI_RxHalfCpltCallback
Function name void HAL_SPI_RxHalfCpltCallback (SPI_HandleTypeDef *
hspi)
Function description Rx Half Transfer completed callback.
Parameters hspi: pointer to a SPI_HandleTypeDef structure that contains
the configuration information for SPI module.
Return values None
HAL_SPI_ErrorCallback
Function name void HAL_SPI_ErrorCallback (SPI_HandleTypeDef * hspi)
Function description SPI error callback.
Parameters hspi: pointer to a SPI_HandleTypeDef structure that contains
the configuration information for SPI module.
Return values None
HAL_SPI_AbortCpltCallback
Function name void HAL_SPI_AbortCpltCallback (SPI_HandleTypeDef * hspi)
Function description SPI Abort Complete callback.
Parameters hspi: SPI handle.
Return values None
HAL_SPI_GetState
Function name HAL_SPI_StateTypeDef HAL_SPI_GetState
(SPI_HandleTypeDef * hspi)
Function description Return the SPI handle state.
Parameters hspi: pointer to a SPI_HandleTypeDef structure that contains
the configuration information for SPI module.
Return values SPI: state
HAL_SPI_GetError
Function name uint32_t HAL_SPI_GetError (SPI_HandleTypeDef * hspi)
Function description Return the SPI error code.
Parameters hspi: pointer to a SPI_HandleTypeDef structure that contains
the configuration information for SPI module.
Return values SPI: error code in bitmap format
HAL_SPIEx_FlushRxFifo
Function name HAL_StatusTypeDef HAL_SPIEx_FlushRxFifo
(SPI_HandleTypeDef * hspi)
Function description Flush the RX fifo.
Parameters hspi: pointer to a SPI_HandleTypeDef structure that contains
the configuration information for the specified SPI module.
Return values HAL: status
41.1.2 TIM_OC_InitTypeDef
Data Fields
uint32_t OCMode
uint32_t Pulse
uint32_t OCPolarity
uint32_t OCNPolarity
uint32_t OCFastMode
uint32_t OCIdleState
uint32_t OCNIdleState
41.1.3 TIM_OnePulse_InitTypeDef
Data Fields
uint32_t OCMode
uint32_t Pulse
uint32_t OCPolarity
uint32_t OCNPolarity
uint32_t OCIdleState
uint32_t OCNIdleState
uint32_t ICPolarity
uint32_t ICSelection
uint32_t ICFilter
Field Documentation
uint32_t TIM_OnePulse_InitTypeDef::OCMode
Specifies the TIM mode. This parameter can be a value of
TIM_Output_Compare_and_PWM_modes
uint32_t TIM_OnePulse_InitTypeDef::Pulse
Specifies the pulse value to be loaded into the Capture Compare Register. This
parameter can be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF
uint32_t TIM_OnePulse_InitTypeDef::OCPolarity
Specifies the output polarity. This parameter can be a value of
TIM_Output_Compare_Polarity
uint32_t TIM_OnePulse_InitTypeDef::OCNPolarity
Specifies the complementary output polarity. This parameter can be a value of
TIM_Output_Compare_N_Polarity
Note:This parameter is valid only for TIM1 and TIM8.
41.1.4 TIM_IC_InitTypeDef
Data Fields
uint32_t ICPolarity
uint32_t ICSelection
uint32_t ICPrescaler
uint32_t ICFilter
Field Documentation
uint32_t TIM_IC_InitTypeDef::ICPolarity
Specifies the active edge of the input signal. This parameter can be a value of
TIM_Input_Capture_Polarity
uint32_t TIM_IC_InitTypeDef::ICSelection
Specifies the input. This parameter can be a value of TIM_Input_Capture_Selection
uint32_t TIM_IC_InitTypeDef::ICPrescaler
Specifies the Input Capture Prescaler. This parameter can be a value of
TIM_Input_Capture_Prescaler
uint32_t TIM_IC_InitTypeDef::ICFilter
Specifies the input capture filter. This parameter can be a number between Min_Data
= 0x0 and Max_Data = 0xF
41.1.5 TIM_Encoder_InitTypeDef
Data Fields
uint32_t EncoderMode
uint32_t IC1Polarity
uint32_t IC1Selection
uint32_t IC1Prescaler
uint32_t IC1Filter
uint32_t IC2Polarity
uint32_t IC2Selection
uint32_t IC2Prescaler
uint32_t IC2Filter
41.1.6 TIM_ClockConfigTypeDef
Data Fields
uint32_t ClockSource
uint32_t ClockPolarity
uint32_t ClockPrescaler
uint32_t ClockFilter
Field Documentation
uint32_t TIM_ClockConfigTypeDef::ClockSource
TIM clock sources This parameter can be a value of TIM_Clock_Source
uint32_t TIM_ClockConfigTypeDef::ClockPolarity
TIM clock polarity This parameter can be a value of TIM_Clock_Polarity
uint32_t TIM_ClockConfigTypeDef::ClockPrescaler
TIM clock prescaler This parameter can be a value of TIM_Clock_Prescaler
uint32_t TIM_ClockConfigTypeDef::ClockFilter
TIM clock filter This parameter can be a number between Min_Data = 0x0 and
Max_Data = 0xF
41.1.7 TIM_ClearInputConfigTypeDef
Data Fields
uint32_t ClearInputState
uint32_t ClearInputSource
uint32_t ClearInputPolarity
uint32_t ClearInputPrescaler
41.1.8 TIM_SlaveConfigTypeDef
Data Fields
uint32_t SlaveMode
uint32_t InputTrigger
uint32_t TriggerPolarity
uint32_t TriggerPrescaler
uint32_t TriggerFilter
Field Documentation
uint32_t TIM_SlaveConfigTypeDef::SlaveMode
Slave mode selection This parameter can be a value of TIM_Slave_Mode
uint32_t TIM_SlaveConfigTypeDef::InputTrigger
Input Trigger source This parameter can be a value of TIM_Trigger_Selection
uint32_t TIM_SlaveConfigTypeDef::TriggerPolarity
Input Trigger polarity This parameter can be a value of TIM_Trigger_Polarity
uint32_t TIM_SlaveConfigTypeDef::TriggerPrescaler
Input trigger prescaler This parameter can be a value of TIM_Trigger_Prescaler
uint32_t TIM_SlaveConfigTypeDef::TriggerFilter
Input trigger filter This parameter can be a number between Min_Data = 0x0 and
Max_Data = 0xF
41.1.9 TIM_HandleTypeDef
Data Fields
TIM_TypeDef * Instance
TIM_Base_InitTypeDef Init
HAL_TIM_ActiveChannel Channel
DMA_HandleTypeDef * hdma
HAL_LockTypeDef Lock
__IO HAL_TIM_StateTypeDef State
Field Documentation
TIM_TypeDef* TIM_HandleTypeDef::Instance
Register base address
TIM_Base_InitTypeDef TIM_HandleTypeDef::Init
TIM Time Base required parameters
TIM_Base_SetConfig
Function name void TIM_Base_SetConfig (TIM_TypeDef * TIMx,
TIM_Base_InitTypeDef * Structure)
Function description Time Base configuration.
Parameters TIMx: TIM periheral
Structure: TIM Base configuration structure
Return values None
TIM_TI1_SetConfig
Function name void TIM_TI1_SetConfig (TIM_TypeDef * TIMx, uint32_t
TIM_ICPolarity, uint32_t TIM_ICSelection, uint32_t
TIM_ICFilter)
Function description Configure the TI1 as Input.
Parameters TIMx: to select the TIM peripheral.
TIM_ICPolarity: The Input Polarity. This parameter can be
one of the following values:
TIM_ICPOLARITY_RISING
TIM_ICPOLARITY_FALLING
TIM_ICPOLARITY_BOTHEDGE
TIM_ICSelection: specifies the input to be used. This
parameter can be one of the following values:
TIM_ICSELECTION_DIRECTTI : TIM Input 1 is selected
to be connected to IC1.
TIM_ICSELECTION_INDIRECTTI : TIM Input 1 is
selected to be connected to IC2.
TIM_ICSELECTION_TRC : TIM Input 1 is selected to be
connected to TRC.
TIM_ICFilter: Specifies the Input Capture Filter. This
parameter must be a value between 0x00 and 0x0F.
Return values None
Notes TIM_ICFilter and TIM_ICPolarity are not used in INDIRECT
mode as TI2FP1 (on channel2 path) is used as the input
signal. Therefore CCMR1 must be protected against un-
initialized filter and polarity values.
TIM_DMADelayPulseCplt
Function name void TIM_DMADelayPulseCplt (DMA_HandleTypeDef * hdma)
Function description TIM DMA Delay Pulse complete callback.
Parameters hdma: pointer to DMA handle.
Return values None
TIM_DMAError
Function name void TIM_DMAError (DMA_HandleTypeDef * hdma)
Function description TIM DMA error callback.
Parameters hdma: pointer to DMA handle.
Return values None
TIM_DMACaptureCplt
Function name void TIM_DMACaptureCplt (DMA_HandleTypeDef * hdma)
Function description TIM DMA Capture complete callback.
Parameters hdma: pointer to DMA handle.
Return values None
TIM_CCxChannelCmd
Function name void TIM_CCxChannelCmd (TIM_TypeDef * TIMx, uint32_t
Channel, uint32_t ChannelState)
Function description Enables or disables the TIM Capture Compare Channel x.
Parameters TIMx: to select the TIM peripheral
Channel: specifies the TIM Channel This parameter can be
one of the following values:
TIM_CHANNEL_1 : TIM Channel 1
TIM_CHANNEL_2 : TIM Channel 2
TIM_CHANNEL_3 : TIM Channel 3
TIM_CHANNEL_4 : TIM Channel 4
ChannelState: specifies the TIM Channel CCxE bit new
state. This parameter can be: TIM_CCx_ENABLE or
TIM_CCx_Disable.
Return values None
HAL_TIM_Base_DeInit
Function name HAL_StatusTypeDef HAL_TIM_Base_DeInit
(TIM_HandleTypeDef * htim)
Function description DeInitializes the TIM Base peripheral.
Parameters htim: TIM Base handle
Return values HAL: status
HAL_TIM_Base_MspInit
Function name void HAL_TIM_Base_MspInit (TIM_HandleTypeDef * htim)
Function description Initializes the TIM Base MSP.
Parameters htim: TIM handle
Return values None
HAL_TIM_Base_MspDeInit
Function name void HAL_TIM_Base_MspDeInit (TIM_HandleTypeDef * htim)
Function description DeInitializes TIM Base MSP.
Parameters htim: TIM handle
Return values None
HAL_TIM_Base_Start
Function name HAL_StatusTypeDef HAL_TIM_Base_Start
(TIM_HandleTypeDef * htim)
Function description Starts the TIM Base generation.
Parameters htim: TIM handle
Return values HAL: status
HAL_TIM_Base_Stop
Function name HAL_StatusTypeDef HAL_TIM_Base_Stop
(TIM_HandleTypeDef * htim)
Function description Stops the TIM Base generation.
HAL_TIM_Base_Start_IT
Function name HAL_StatusTypeDef HAL_TIM_Base_Start_IT
(TIM_HandleTypeDef * htim)
Function description Starts the TIM Base generation in interrupt mode.
Parameters htim: TIM handle
Return values HAL: status
HAL_TIM_Base_Stop_IT
Function name HAL_StatusTypeDef HAL_TIM_Base_Stop_IT
(TIM_HandleTypeDef * htim)
Function description Stops the TIM Base generation in interrupt mode.
Parameters htim: TIM handle
Return values HAL: status
HAL_TIM_Base_Start_DMA
Function name HAL_StatusTypeDef HAL_TIM_Base_Start_DMA
(TIM_HandleTypeDef * htim, uint32_t * pData, uint16_t Length)
Function description Starts the TIM Base generation in DMA mode.
Parameters htim: TIM handle
pData: The source Buffer address.
Length: The length of data to be transferred from memory to
peripheral.
Return values HAL: status
HAL_TIM_Base_Stop_DMA
Function name HAL_StatusTypeDef HAL_TIM_Base_Stop_DMA
(TIM_HandleTypeDef * htim)
Function description Stops the TIM Base generation in DMA mode.
Parameters htim: TIM handle
Return values HAL: status
HAL_TIM_OC_Init
Function name HAL_StatusTypeDef HAL_TIM_OC_Init (TIM_HandleTypeDef *
htim)
Function description Initializes the TIM Output Compare according to the specified
parameters in the TIM_HandleTypeDef and create the associated
handle.
HAL_TIM_OC_DeInit
Function name HAL_StatusTypeDef HAL_TIM_OC_DeInit
(TIM_HandleTypeDef * htim)
Function description DeInitializes the TIM peripheral.
Parameters htim: TIM Output Compare handle
Return values HAL: status
HAL_TIM_OC_MspInit
Function name void HAL_TIM_OC_MspInit (TIM_HandleTypeDef * htim)
Function description Initializes the TIM Output Compare MSP.
Parameters htim: TIM handle
Return values None
HAL_TIM_OC_MspDeInit
Function name void HAL_TIM_OC_MspDeInit (TIM_HandleTypeDef * htim)
Function description DeInitializes TIM Output Compare MSP.
Parameters htim: TIM handle
Return values None
HAL_TIM_OC_Start
Function name HAL_StatusTypeDef HAL_TIM_OC_Start (TIM_HandleTypeDef
* htim, uint32_t Channel)
Function description Starts the TIM Output Compare signal generation.
Parameters htim: TIM Output Compare handle
Channel: TIM Channel to be enabled This parameter can be
one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_3: TIM Channel 3 selected
TIM_CHANNEL_4: TIM Channel 4 selected
Return values HAL: status
HAL_TIM_OC_Stop
Function name HAL_StatusTypeDef HAL_TIM_OC_Stop (TIM_HandleTypeDef
* htim, uint32_t Channel)
Function description Stops the TIM Output Compare signal generation.
Parameters htim: TIM handle
Channel: TIM Channel to be disabled This parameter can be
HAL_TIM_OC_Start_IT
Function name HAL_StatusTypeDef HAL_TIM_OC_Start_IT
(TIM_HandleTypeDef * htim, uint32_t Channel)
Function description Starts the TIM Output Compare signal generation in interrupt
mode.
Parameters htim: TIM OC handle
Channel: TIM Channel to be enabled This parameter can be
one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_3: TIM Channel 3 selected
TIM_CHANNEL_4: TIM Channel 4 selected
Return values HAL: status
HAL_TIM_OC_Stop_IT
Function name HAL_StatusTypeDef HAL_TIM_OC_Stop_IT
(TIM_HandleTypeDef * htim, uint32_t Channel)
Function description Stops the TIM Output Compare signal generation in interrupt
mode.
Parameters htim: TIM Output Compare handle
Channel: TIM Channel to be disabled This parameter can be
one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_3: TIM Channel 3 selected
TIM_CHANNEL_4: TIM Channel 4 selected
Return values HAL: status
HAL_TIM_OC_Start_DMA
Function name HAL_StatusTypeDef HAL_TIM_OC_Start_DMA
(TIM_HandleTypeDef * htim, uint32_t Channel, uint32_t *
pData, uint16_t Length)
Function description Starts the TIM Output Compare signal generation in DMA mode.
Parameters htim: TIM Output Compare handle
Channel: TIM Channel to be enabled This parameter can be
one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_3: TIM Channel 3 selected
HAL_TIM_OC_Stop_DMA
Function name HAL_StatusTypeDef HAL_TIM_OC_Stop_DMA
(TIM_HandleTypeDef * htim, uint32_t Channel)
Function description Stops the TIM Output Compare signal generation in DMA mode.
Parameters htim: TIM Output Compare handle
Channel: TIM Channel to be disabled This parameter can be
one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_3: TIM Channel 3 selected
TIM_CHANNEL_4: TIM Channel 4 selected
Return values HAL: status
HAL_TIM_PWM_Init
Function name HAL_StatusTypeDef HAL_TIM_PWM_Init (TIM_HandleTypeDef
* htim)
Function description Initializes the TIM PWM Time Base according to the specified
parameters in the TIM_HandleTypeDef and create the associated
handle.
Parameters htim: TIM handle
Return values HAL: status
HAL_TIM_PWM_DeInit
Function name HAL_StatusTypeDef HAL_TIM_PWM_DeInit
(TIM_HandleTypeDef * htim)
Function description DeInitializes the TIM peripheral.
Parameters htim: TIM handle
Return values HAL: status
HAL_TIM_PWM_MspInit
Function name void HAL_TIM_PWM_MspInit (TIM_HandleTypeDef * htim)
Function description Initializes the TIM PWM MSP.
Parameters htim: TIM handle
Return values None
HAL_TIM_PWM_Start
Function name HAL_StatusTypeDef HAL_TIM_PWM_Start
(TIM_HandleTypeDef * htim, uint32_t Channel)
Function description Starts the PWM signal generation.
Parameters htim: TIM handle
Channel: TIM Channels to be enabled This parameter can
be one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_3: TIM Channel 3 selected
TIM_CHANNEL_4: TIM Channel 4 selected
Return values HAL: status
HAL_TIM_PWM_Stop
Function name HAL_StatusTypeDef HAL_TIM_PWM_Stop
(TIM_HandleTypeDef * htim, uint32_t Channel)
Function description Stops the PWM signal generation.
Parameters htim: TIM handle
Channel: TIM Channels to be disabled This parameter can
be one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_3: TIM Channel 3 selected
TIM_CHANNEL_4: TIM Channel 4 selected
Return values HAL: status
HAL_TIM_PWM_Start_IT
Function name HAL_StatusTypeDef HAL_TIM_PWM_Start_IT
(TIM_HandleTypeDef * htim, uint32_t Channel)
Function description Starts the PWM signal generation in interrupt mode.
Parameters htim: TIM handle
Channel: TIM Channel to be enabled This parameter can be
one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_3: TIM Channel 3 selected
TIM_CHANNEL_4: TIM Channel 4 selected
HAL_TIM_PWM_Stop_IT
Function name HAL_StatusTypeDef HAL_TIM_PWM_Stop_IT
(TIM_HandleTypeDef * htim, uint32_t Channel)
Function description Stops the PWM signal generation in interrupt mode.
Parameters htim: TIM handle
Channel: TIM Channels to be disabled This parameter can
be one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_3: TIM Channel 3 selected
TIM_CHANNEL_4: TIM Channel 4 selected
Return values HAL: status
HAL_TIM_PWM_Start_DMA
Function name HAL_StatusTypeDef HAL_TIM_PWM_Start_DMA
(TIM_HandleTypeDef * htim, uint32_t Channel, uint32_t *
pData, uint16_t Length)
Function description Starts the TIM PWM signal generation in DMA mode.
Parameters htim: TIM handle
Channel: TIM Channels to be enabled This parameter can
be one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_3: TIM Channel 3 selected
TIM_CHANNEL_4: TIM Channel 4 selected
pData: The source Buffer address.
Length: The length of data to be transferred from memory to
TIM peripheral
Return values HAL: status
HAL_TIM_PWM_Stop_DMA
Function name HAL_StatusTypeDef HAL_TIM_PWM_Stop_DMA
(TIM_HandleTypeDef * htim, uint32_t Channel)
Function description Stops the TIM PWM signal generation in DMA mode.
Parameters htim: TIM handle
Channel: TIM Channels to be disabled This parameter can
be one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_3: TIM Channel 3 selected
TIM_CHANNEL_4: TIM Channel 4 selected
Return values HAL: status
HAL_TIM_IC_DeInit
Function name HAL_StatusTypeDef HAL_TIM_IC_DeInit (TIM_HandleTypeDef
* htim)
Function description DeInitializes the TIM peripheral.
Parameters htim: TIM Input Capture handle
Return values HAL: status
HAL_TIM_IC_MspInit
Function name void HAL_TIM_IC_MspInit (TIM_HandleTypeDef * htim)
Function description Initializes the TIM Input Capture MSP.
Parameters htim: TIM handle
Return values None
HAL_TIM_IC_MspDeInit
Function name void HAL_TIM_IC_MspDeInit (TIM_HandleTypeDef * htim)
Function description DeInitializes TIM Input Capture MSP.
Parameters htim: TIM handle
Return values None
HAL_TIM_IC_Start
Function name HAL_StatusTypeDef HAL_TIM_IC_Start (TIM_HandleTypeDef *
htim, uint32_t Channel)
Function description Starts the TIM Input Capture measurement.
Parameters htim: TIM Input Capture handle
Channel: TIM Channels to be enabled This parameter can
be one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_3: TIM Channel 3 selected
TIM_CHANNEL_4: TIM Channel 4 selected
Return values HAL: status
HAL_TIM_IC_Start_IT
Function name HAL_StatusTypeDef HAL_TIM_IC_Start_IT
(TIM_HandleTypeDef * htim, uint32_t Channel)
Function description Starts the TIM Input Capture measurement in interrupt mode.
Parameters htim: TIM Input Capture handle
Channel: TIM Channels to be enabled This parameter can
be one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_3: TIM Channel 3 selected
TIM_CHANNEL_4: TIM Channel 4 selected
Return values HAL: status
HAL_TIM_IC_Stop_IT
Function name HAL_StatusTypeDef HAL_TIM_IC_Stop_IT
(TIM_HandleTypeDef * htim, uint32_t Channel)
Function description Stops the TIM Input Capture measurement in interrupt mode.
Parameters htim: TIM handle
Channel: TIM Channels to be disabled This parameter can
be one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_3: TIM Channel 3 selected
TIM_CHANNEL_4: TIM Channel 4 selected
Return values HAL: status
HAL_TIM_IC_Start_DMA
Function name HAL_StatusTypeDef HAL_TIM_IC_Start_DMA
(TIM_HandleTypeDef * htim, uint32_t Channel, uint32_t *
pData, uint16_t Length)
Function description Starts the TIM Input Capture measurement in DMA mode.
HAL_TIM_IC_Stop_DMA
Function name HAL_StatusTypeDef HAL_TIM_IC_Stop_DMA
(TIM_HandleTypeDef * htim, uint32_t Channel)
Function description Stops the TIM Input Capture measurement in DMA mode.
Parameters htim: TIM Input Capture handle
Channel: TIM Channels to be disabled This parameter can
be one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_3: TIM Channel 3 selected
TIM_CHANNEL_4: TIM Channel 4 selected
Return values HAL: status
HAL_TIM_OnePulse_Init
Function name HAL_StatusTypeDef HAL_TIM_OnePulse_Init
(TIM_HandleTypeDef * htim, uint32_t OnePulseMode)
Function description Initializes the TIM One Pulse Time Base according to the specified
parameters in the TIM_HandleTypeDef and create the associated
handle.
Parameters htim: TIM OnePulse handle
OnePulseMode: Select the One pulse mode. This parameter
can be one of the following values:
TIM_OPMODE_SINGLE: Only one pulse will be
generated.
TIM_OPMODE_REPETITIVE: Repetitive pulses wil be
generated.
Return values HAL: status
HAL_TIM_OnePulse_DeInit
Function name HAL_StatusTypeDef HAL_TIM_OnePulse_DeInit
(TIM_HandleTypeDef * htim)
Function description DeInitializes the TIM One Pulse.
Parameters htim: TIM One Pulse handle
HAL_TIM_OnePulse_MspInit
Function name void HAL_TIM_OnePulse_MspInit (TIM_HandleTypeDef * htim)
Function description Initializes the TIM One Pulse MSP.
Parameters htim: TIM handle
Return values None
HAL_TIM_OnePulse_MspDeInit
Function name void HAL_TIM_OnePulse_MspDeInit (TIM_HandleTypeDef *
htim)
Function description DeInitializes TIM One Pulse MSP.
Parameters htim: TIM handle
Return values None
HAL_TIM_OnePulse_Start
Function name HAL_StatusTypeDef HAL_TIM_OnePulse_Start
(TIM_HandleTypeDef * htim, uint32_t OutputChannel)
Function description Starts the TIM One Pulse signal generation.
Parameters htim: TIM One Pulse handle
OutputChannel: TIM Channels to be enabled This
parameter can be one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
Return values HAL: status
HAL_TIM_OnePulse_Stop
Function name HAL_StatusTypeDef HAL_TIM_OnePulse_Stop
(TIM_HandleTypeDef * htim, uint32_t OutputChannel)
Function description Stops the TIM One Pulse signal generation.
Parameters htim: TIM One Pulse handle
OutputChannel: TIM Channels to be disable This parameter
can be one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
Return values HAL: status
HAL_TIM_OnePulse_Start_IT
Function name HAL_StatusTypeDef HAL_TIM_OnePulse_Start_IT
(TIM_HandleTypeDef * htim, uint32_t OutputChannel)
Function description Starts the TIM One Pulse signal generation in interrupt mode.
HAL_TIM_OnePulse_Stop_IT
Function name HAL_StatusTypeDef HAL_TIM_OnePulse_Stop_IT
(TIM_HandleTypeDef * htim, uint32_t OutputChannel)
Function description Stops the TIM One Pulse signal generation in interrupt mode.
Parameters htim: TIM One Pulse handle
OutputChannel: TIM Channels to be enabled This
parameter can be one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
Return values HAL: status
HAL_TIM_Encoder_Init
Function name HAL_StatusTypeDef HAL_TIM_Encoder_Init
(TIM_HandleTypeDef * htim, TIM_Encoder_InitTypeDef *
sConfig)
Function description Initializes the TIM Encoder Interface and create the associated
handle.
Parameters htim: TIM Encoder Interface handle
sConfig: TIM Encoder Interface configuration structure
Return values HAL: status
HAL_TIM_Encoder_DeInit
Function name HAL_StatusTypeDef HAL_TIM_Encoder_DeInit
(TIM_HandleTypeDef * htim)
Function description DeInitializes the TIM Encoder interface.
Parameters htim: TIM Encoder handle
Return values HAL: status
HAL_TIM_Encoder_MspInit
Function name void HAL_TIM_Encoder_MspInit (TIM_HandleTypeDef * htim)
Function description Initializes the TIM Encoder Interface MSP.
Parameters htim: TIM handle
Return values None
HAL_TIM_Encoder_Start
Function name HAL_StatusTypeDef HAL_TIM_Encoder_Start
(TIM_HandleTypeDef * htim, uint32_t Channel)
Function description Starts the TIM Encoder Interface.
Parameters htim: TIM Encoder Interface handle
Channel: TIM Channels to be enabled This parameter can
be one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_ALL: TIM Channel 1 and TIM Channel 2
are selected
Return values HAL: status
HAL_TIM_Encoder_Stop
Function name HAL_StatusTypeDef HAL_TIM_Encoder_Stop
(TIM_HandleTypeDef * htim, uint32_t Channel)
Function description Stops the TIM Encoder Interface.
Parameters htim: TIM Encoder Interface handle
Channel: TIM Channels to be disabled This parameter can
be one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_ALL: TIM Channel 1 and TIM Channel 2
are selected
Return values HAL: status
HAL_TIM_Encoder_Start_IT
Function name HAL_StatusTypeDef HAL_TIM_Encoder_Start_IT
(TIM_HandleTypeDef * htim, uint32_t Channel)
Function description Starts the TIM Encoder Interface in interrupt mode.
Parameters htim: TIM Encoder Interface handle
Channel: TIM Channels to be enabled This parameter can
be one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_ALL: TIM Channel 1 and TIM Channel 2
are selected
HAL_TIM_Encoder_Stop_IT
Function name HAL_StatusTypeDef HAL_TIM_Encoder_Stop_IT
(TIM_HandleTypeDef * htim, uint32_t Channel)
Function description Stops the TIM Encoder Interface in interrupt mode.
Parameters htim: TIM Encoder Interface handle
Channel: TIM Channels to be disabled This parameter can
be one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_ALL: TIM Channel 1 and TIM Channel 2
are selected
Return values HAL: status
HAL_TIM_Encoder_Start_DMA
Function name HAL_StatusTypeDef HAL_TIM_Encoder_Start_DMA
(TIM_HandleTypeDef * htim, uint32_t Channel, uint32_t *
pData1, uint32_t * pData2, uint16_t Length)
Function description Starts the TIM Encoder Interface in DMA mode.
Parameters htim: TIM Encoder Interface handle
Channel: TIM Channels to be enabled This parameter can
be one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_ALL: TIM Channel 1 and TIM Channel 2
are selected
pData1: The destination Buffer address for IC1.
pData2: The destination Buffer address for IC2.
Length: The length of data to be transferred from TIM
peripheral to memory.
Return values HAL: status
HAL_TIM_Encoder_Stop_DMA
Function name HAL_StatusTypeDef HAL_TIM_Encoder_Stop_DMA
(TIM_HandleTypeDef * htim, uint32_t Channel)
Function description Stops the TIM Encoder Interface in DMA mode.
Parameters htim: TIM Encoder Interface handle
Channel: TIM Channels to be enabled This parameter can
be one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_ALL: TIM Channel 1 and TIM Channel 2
are selected
Return values HAL: status
HAL_TIM_OC_ConfigChannel
Function name HAL_StatusTypeDef HAL_TIM_OC_ConfigChannel
(TIM_HandleTypeDef * htim, TIM_OC_InitTypeDef * sConfig,
uint32_t Channel)
Function description Initializes the TIM Output Compare Channels according to the
specified parameters in the TIM_OC_InitTypeDef.
Parameters htim: TIM Output Compare handle
sConfig: TIM Output Compare configuration structure
Channel: TIM Channels to be enabled This parameter can
be one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_3: TIM Channel 3 selected
TIM_CHANNEL_4: TIM Channel 4 selected
Return values HAL: status
HAL_TIM_PWM_ConfigChannel
Function name HAL_StatusTypeDef HAL_TIM_PWM_ConfigChannel
(TIM_HandleTypeDef * htim, TIM_OC_InitTypeDef * sConfig,
uint32_t Channel)
Function description Initializes the TIM PWM channels according to the specified
parameters in the TIM_OC_InitTypeDef.
Parameters htim: TIM handle
sConfig: TIM PWM configuration structure
Channel: TIM Channels to be enabled This parameter can
be one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_3: TIM Channel 3 selected
TIM_CHANNEL_4: TIM Channel 4 selected
Return values HAL: status
HAL_TIM_IC_ConfigChannel
Function name HAL_StatusTypeDef HAL_TIM_IC_ConfigChannel
(TIM_HandleTypeDef * htim, TIM_IC_InitTypeDef * sConfig,
uint32_t Channel)
Function description Initializes the TIM Input Capture Channels according to the
specified parameters in the TIM_IC_InitTypeDef.
HAL_TIM_OnePulse_ConfigChannel
Function name HAL_StatusTypeDef HAL_TIM_OnePulse_ConfigChannel
(TIM_HandleTypeDef * htim, TIM_OnePulse_InitTypeDef *
sConfig, uint32_t OutputChannel, uint32_t InputChannel)
Function description Initializes the TIM One Pulse Channels according to the specified
parameters in the TIM_OnePulse_InitTypeDef.
Parameters htim: TIM One Pulse handle
sConfig: TIM One Pulse configuration structure
OutputChannel: TIM Channels to be enabled This
parameter can be one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
InputChannel: TIM Channels to be enabled This parameter
can be one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
Return values HAL: status
HAL_TIM_ConfigOCrefClear
Function name HAL_StatusTypeDef HAL_TIM_ConfigOCrefClear
(TIM_HandleTypeDef * htim, TIM_ClearInputConfigTypeDef *
sClearInputConfig, uint32_t Channel)
Function description Configures the OCRef clear feature.
Parameters htim: TIM handle
sClearInputConfig: pointer to a
TIM_ClearInputConfigTypeDef structure that contains the
OCREF clear feature and parameters for the TIM peripheral.
Channel: specifies the TIM Channel This parameter can be
one of the following values:
TIM_CHANNEL_1: TIM Channel 1
TIM_CHANNEL_2: TIM Channel 2
TIM_CHANNEL_3: TIM Channel 3
TIM_CHANNEL_4: TIM Channel 4
htim: TIM handle
sClearInputConfig: pointer to a
TIM_ClearInputConfigTypeDef structure that contains the
OCREF clear feature and parameters for the TIM peripheral.
Channel: specifies the TIM Channel This parameter can be
HAL_TIM_ConfigClockSource
Function name HAL_StatusTypeDef HAL_TIM_ConfigClockSource
(TIM_HandleTypeDef * htim, TIM_ClockConfigTypeDef *
sClockSourceConfig)
Function description Configures the clock source to be used.
Parameters htim: TIM handle
sClockSourceConfig: pointer to a TIM_ClockConfigTypeDef
structure that contains the clock source information for the
TIM peripheral.
Return values HAL: status
HAL_TIM_ConfigTI1Input
Function name HAL_StatusTypeDef HAL_TIM_ConfigTI1Input
(TIM_HandleTypeDef * htim, uint32_t TI1_Selection)
Function description Selects the signal connected to the TI1 input: direct from
CH1_input or a XOR combination between CH1_input, CH2_input
& CH3_input.
Parameters htim: TIM handle.
TI1_Selection: Indicate whether or not channel 1 is
connected to the output of a XOR gate. This parameter can
be one of the following values:
TIM_TI1SELECTION_CH1: The TIMx_CH1 pin is
connected to TI1 input
TIM_TI1SELECTION_XORCOMBINATION: The
TIMx_CH1, CH2 and CH3 pins are connected to the TI1
input (XOR combination)
Return values HAL: status
HAL_TIM_SlaveConfigSynchronization
Function name HAL_StatusTypeDef HAL_TIM_SlaveConfigSynchronization
(TIM_HandleTypeDef * htim, TIM_SlaveConfigTypeDef *
sSlaveConfig)
Function description Configures the TIM in Slave mode.
Parameters htim: TIM handle.
sSlaveConfig: pointer to a TIM_SlaveConfigTypeDef
structure that contains the selected trigger (internal trigger
input, filtered timer input or external trigger input) and the )
HAL_TIM_SlaveConfigSynchronization_IT
Function name HAL_StatusTypeDef
HAL_TIM_SlaveConfigSynchronization_IT
(TIM_HandleTypeDef * htim, TIM_SlaveConfigTypeDef *
sSlaveConfig)
Function description Configures the TIM in Slave mode in interrupt mode.
Parameters htim: TIM handle.
sSlaveConfig: pointer to a TIM_SlaveConfigTypeDef
structure that contains the selected trigger (internal trigger
input, filtered timer input or external trigger input) and the )
and the Slave mode (Disable, Reset, Gated, Trigger, External
clock mode 1).
Return values HAL: status
HAL_TIM_DMABurst_WriteStart
Function name HAL_StatusTypeDef HAL_TIM_DMABurst_WriteStart
(TIM_HandleTypeDef * htim, uint32_t BurstBaseAddress,
uint32_t BurstRequestSrc, uint32_t * BurstBuffer, uint32_t
BurstLength)
Function description Configure the DMA Burst to transfer Data from the memory to the
TIM peripheral.
Parameters htim: TIM handle
BurstBaseAddress: TIM Base address from where the DMA
will start the Data write This parameter can be one of the
following values:
TIM_DMABASE_CR1
TIM_DMABASE_CR2
TIM_DMABASE_SMCR
TIM_DMABASE_DIER
TIM_DMABASE_SR
TIM_DMABASE_EGR
TIM_DMABASE_CCMR1
TIM_DMABASE_CCMR2
TIM_DMABASE_CCER
TIM_DMABASE_CNT
TIM_DMABASE_PSC
TIM_DMABASE_ARR
TIM_DMABASE_RCR
TIM_DMABASE_CCR1
TIM_DMABASE_CCR2
TIM_DMABASE_CCR3
TIM_DMABASE_CCR4
TIM_DMABASE_BDTR
TIM_DMABASE_DCR
HAL_TIM_DMABurst_MultiWriteStart
Function name HAL_StatusTypeDef HAL_TIM_DMABurst_MultiWriteStart
(TIM_HandleTypeDef * htim, uint32_t BurstBaseAddress,
uint32_t BurstRequestSrc, uint32_t * BurstBuffer, uint32_t
BurstLength, uint32_t DataLength)
Function description Configure the DMA Burst to transfer multiple Data from the
memory to the TIM peripheral.
Parameters htim: TIM handle
BurstBaseAddress: TIM Base address from where the DMA
will start the Data write This parameter can be one of the
following values:
TIM_DMABASE_CR1
TIM_DMABASE_CR2
TIM_DMABASE_SMCR
TIM_DMABASE_DIER
TIM_DMABASE_SR
TIM_DMABASE_EGR
TIM_DMABASE_CCMR1
TIM_DMABASE_CCMR2
TIM_DMABASE_CCER
TIM_DMABASE_CNT
TIM_DMABASE_PSC
TIM_DMABASE_ARR
TIM_DMABASE_RCR
TIM_DMABASE_CCR1
TIM_DMABASE_CCR2
TIM_DMABASE_CCR3
TIM_DMABASE_CCR4
TIM_DMABASE_BDTR
TIM_DMABASE_DCR
BurstRequestSrc: TIM DMA Request sources This
parameter can be one of the following values:
TIM_DMA_UPDATE: TIM update Interrupt source
TIM_DMA_CC1: TIM Capture Compare 1 DMA source
TIM_DMA_CC2: TIM Capture Compare 2 DMA source
HAL_TIM_DMABurst_WriteStop
Function name HAL_StatusTypeDef HAL_TIM_DMABurst_WriteStop
(TIM_HandleTypeDef * htim, uint32_t BurstRequestSrc)
Function description Stops the TIM DMA Burst mode.
Parameters htim: TIM handle
BurstRequestSrc: TIM DMA Request sources to disable
Return values HAL: status
HAL_TIM_DMABurst_ReadStart
Function name HAL_StatusTypeDef HAL_TIM_DMABurst_ReadStart
(TIM_HandleTypeDef * htim, uint32_t BurstBaseAddress,
uint32_t BurstRequestSrc, uint32_t * BurstBuffer, uint32_t
BurstLength)
Function description Configure the DMA Burst to transfer Data from the TIM peripheral
to the memory.
Parameters htim: TIM handle
BurstBaseAddress: TIM Base address from where the DMA
will starts the Data read This parameter can be one of the
following values:
TIM_DMABASE_CR1
TIM_DMABASE_CR2
TIM_DMABASE_SMCR
TIM_DMABASE_DIER
TIM_DMABASE_SR
TIM_DMABASE_EGR
TIM_DMABASE_CCMR1
TIM_DMABASE_CCMR2
TIM_DMABASE_CCER
TIM_DMABASE_CNT
TIM_DMABASE_PSC
TIM_DMABASE_ARR
TIM_DMABASE_RCR
TIM_DMABASE_CCR1
TIM_DMABASE_CCR2
TIM_DMABASE_CCR3
TIM_DMABASE_CCR4
HAL_TIM_DMABurst_MultiReadStart
Function name HAL_StatusTypeDef HAL_TIM_DMABurst_MultiReadStart
(TIM_HandleTypeDef * htim, uint32_t BurstBaseAddress,
uint32_t BurstRequestSrc, uint32_t * BurstBuffer, uint32_t
BurstLength, uint32_t DataLength)
Function description Configure the DMA Burst to transfer multiple Data from the TIM
peripheral to the memory.
Parameters htim: TIM handle
BurstBaseAddress: TIM Base address from where the DMA
will starts the Data read This parameter can be one of the
following values:
TIM_DMABASE_CR1
TIM_DMABASE_CR2
TIM_DMABASE_SMCR
TIM_DMABASE_DIER
TIM_DMABASE_SR
TIM_DMABASE_EGR
TIM_DMABASE_CCMR1
TIM_DMABASE_CCMR2
TIM_DMABASE_CCER
TIM_DMABASE_CNT
TIM_DMABASE_PSC
TIM_DMABASE_ARR
TIM_DMABASE_RCR
TIM_DMABASE_CCR1
TIM_DMABASE_CCR2
TIM_DMABASE_CCR3
TIM_DMABASE_CCR4
TIM_DMABASE_BDTR
TIM_DMABASE_DCR
BurstRequestSrc: TIM DMA Request sources This
parameter can be one of the following values:
TIM_DMA_UPDATE: TIM update Interrupt source
HAL_TIM_DMABurst_ReadStop
Function name HAL_StatusTypeDef HAL_TIM_DMABurst_ReadStop
(TIM_HandleTypeDef * htim, uint32_t BurstRequestSrc)
Function description Stop the DMA burst reading.
Parameters htim: TIM handle
BurstRequestSrc: TIM DMA Request sources to disable.
Return values HAL: status
HAL_TIM_GenerateEvent
Function name HAL_StatusTypeDef HAL_TIM_GenerateEvent
(TIM_HandleTypeDef * htim, uint32_t EventSource)
Function description Generate a software event.
Parameters htim: TIM handle
EventSource: specifies the event source. This parameter
can be one of the following values:
TIM_EVENTSOURCE_UPDATE: Timer update Event
source
TIM_EVENTSOURCE_CC1: Timer Capture Compare 1
Event source
TIM_EVENTSOURCE_CC2: Timer Capture Compare 2
Event source
TIM_EVENTSOURCE_CC3: Timer Capture Compare 3
Event source
TIM_EVENTSOURCE_CC4: Timer Capture Compare 4
Event source
TIM_EVENTSOURCE_COM: Timer COM event source
TIM_EVENTSOURCE_TRIGGER: Timer Trigger Event
source
TIM_EVENTSOURCE_BREAK: Timer Break event
source
Return values HAL: status
Notes TIM6 and TIM7 can only generate an update event.
TIM_EVENTSOURCE_COM and
HAL_TIM_ReadCapturedValue
Function name uint32_t HAL_TIM_ReadCapturedValue (TIM_HandleTypeDef *
htim, uint32_t Channel)
Function description Read the captured value from Capture Compare unit.
Parameters htim: TIM handle.
Channel: TIM Channels to be enabled This parameter can
be one of the following values:
TIM_CHANNEL_1 : TIM Channel 1 selected
TIM_CHANNEL_2 : TIM Channel 2 selected
TIM_CHANNEL_3 : TIM Channel 3 selected
TIM_CHANNEL_4 : TIM Channel 4 selected
Return values Captured: value
HAL_TIM_PeriodElapsedCallback
Function name void HAL_TIM_PeriodElapsedCallback (TIM_HandleTypeDef *
htim)
Function description Period elapsed callback in non blocking mode.
Parameters htim: TIM handle
Return values None
HAL_TIM_OC_DelayElapsedCallback
Function name void HAL_TIM_OC_DelayElapsedCallback
(TIM_HandleTypeDef * htim)
Function description Output Compare callback in non blocking mode.
Parameters htim: TIM OC handle
Return values None
HAL_TIM_IC_CaptureCallback
Function name void HAL_TIM_IC_CaptureCallback (TIM_HandleTypeDef *
htim)
Function description Input Capture callback in non blocking mode.
Parameters htim: TIM IC handle
Return values None
HAL_TIM_PWM_PulseFinishedCallback
Function name void HAL_TIM_PWM_PulseFinishedCallback
(TIM_HandleTypeDef * htim)
Function description PWM Pulse finished callback in non blocking mode.
HAL_TIM_TriggerCallback
Function name void HAL_TIM_TriggerCallback (TIM_HandleTypeDef * htim)
Function description Hall Trigger detection callback in non blocking mode.
Parameters htim: TIM handle
Return values None
HAL_TIM_ErrorCallback
Function name void HAL_TIM_ErrorCallback (TIM_HandleTypeDef * htim)
Function description Timer error callback in non blocking mode.
Parameters htim: TIM handle
Return values None
HAL_TIM_Base_GetState
Function name HAL_TIM_StateTypeDef HAL_TIM_Base_GetState
(TIM_HandleTypeDef * htim)
Function description Return the TIM Base state.
Parameters htim: TIM Base handle
Return values HAL: state
HAL_TIM_OC_GetState
Function name HAL_TIM_StateTypeDef HAL_TIM_OC_GetState
(TIM_HandleTypeDef * htim)
Function description Return the TIM OC state.
Parameters htim: TIM Ouput Compare handle
Return values HAL: state
HAL_TIM_PWM_GetState
Function name HAL_TIM_StateTypeDef HAL_TIM_PWM_GetState
(TIM_HandleTypeDef * htim)
Function description Return the TIM PWM state.
Parameters htim: TIM handle
Return values HAL: state
HAL_TIM_IC_GetState
Function name HAL_TIM_StateTypeDef HAL_TIM_IC_GetState
(TIM_HandleTypeDef * htim)
HAL_TIM_OnePulse_GetState
Function name HAL_TIM_StateTypeDef HAL_TIM_OnePulse_GetState
(TIM_HandleTypeDef * htim)
Function description Return the TIM One Pulse Mode state.
Parameters htim: TIM OPM handle
Return values HAL: state
HAL_TIM_Encoder_GetState
Function name HAL_TIM_StateTypeDef HAL_TIM_Encoder_GetState
(TIM_HandleTypeDef * htim)
Function description Return the TIM Encoder Mode state.
Parameters htim: TIM Encoder handle
Return values HAL: state
TIM_ETR_SetConfig
Function name void TIM_ETR_SetConfig (TIM_TypeDef * TIMx, uint32_t
TIM_ExtTRGPrescaler, uint32_t TIM_ExtTRGPolarity, uint32_t
ExtTRGFilter)
Function description Configures the TIMx External Trigger (ETR).
Parameters TIMx: to select the TIM peripheral
TIM_ExtTRGPrescaler: The external Trigger Prescaler. This
parameter can be one of the following values:
TIM_ETRPRESCALER_DIV1 : ETRP Prescaler OFF.
TIM_ETRPRESCALER_DIV2 : ETRP frequency divided
by 2.
TIM_ETRPRESCALER_DIV4 : ETRP frequency divided
by 4.
TIM_ETRPRESCALER_DIV8 : ETRP frequency divided
by 8.
TIM_ExtTRGPolarity: The external Trigger Polarity. This
parameter can be one of the following values:
TIM_ETRPOLARITY_INVERTED : active low or falling
edge active.
TIM_ETRPOLARITY_NONINVERTED : active high or
rising edge active.
ExtTRGFilter: External Trigger Filter. This parameter must
be a value between 0x00 and 0x0F
Return values None
42.1.2 TIM_MasterConfigTypeDef
Data Fields
uint32_t MasterOutputTrigger
uint32_t MasterSlaveMode
Field Documentation
uint32_t TIM_MasterConfigTypeDef::MasterOutputTrigger
Trigger output (TRGO) selection This parameter can be a value of
TIM_Master_Mode_Selection
uint32_t TIM_MasterConfigTypeDef::MasterSlaveMode
Master/slave mode selection This parameter can be a value of
TIM_Master_Slave_Mode
42.1.3 TIM_BreakDeadTimeConfigTypeDef
Data Fields
uint32_t OffStateRunMode
uint32_t OffStateIDLEMode
uint32_t LockLevel
uint32_t DeadTime
uint32_t BreakState
uint32_t BreakPolarity
uint32_t AutomaticOutput
HAL_TIMEx_HallSensor_Init
Function name HAL_StatusTypeDef HAL_TIMEx_HallSensor_Init
(TIM_HandleTypeDef * htim, TIM_HallSensor_InitTypeDef *
sConfig)
Function description Initializes the TIM Hall Sensor Interface and create the associated
handle.
Parameters htim: TIM Encoder Interface handle
sConfig: TIM Hall Sensor configuration structure
Return values HAL: status
HAL_TIMEx_HallSensor_DeInit
Function name HAL_StatusTypeDef HAL_TIMEx_HallSensor_DeInit
(TIM_HandleTypeDef * htim)
Function description DeInitializes the TIM Hall Sensor interface.
Parameters htim: TIM Hall Sensor handle
Return values HAL: status
HAL_TIMEx_HallSensor_MspDeInit
Function name void HAL_TIMEx_HallSensor_MspDeInit (TIM_HandleTypeDef
* htim)
Function description DeInitializes TIM Hall Sensor MSP.
Parameters htim: TIM handle
Return values None
HAL_TIMEx_HallSensor_Start
Function name HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start
(TIM_HandleTypeDef * htim)
Function description Starts the TIM Hall Sensor Interface.
Parameters htim: TIM Hall Sensor handle
Return values HAL: status
HAL_TIMEx_HallSensor_Stop
Function name HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop
(TIM_HandleTypeDef * htim)
Function description Stops the TIM Hall sensor Interface.
Parameters htim: TIM Hall Sensor handle
Return values HAL: status
HAL_TIMEx_HallSensor_Start_IT
Function name HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_IT
(TIM_HandleTypeDef * htim)
Function description Starts the TIM Hall Sensor Interface in interrupt mode.
Parameters htim: TIM Hall Sensor handle
Return values HAL: status
HAL_TIMEx_HallSensor_Stop_IT
Function name HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_IT
(TIM_HandleTypeDef * htim)
Function description Stops the TIM Hall Sensor Interface in interrupt mode.
HAL_TIMEx_HallSensor_Start_DMA
Function name HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_DMA
(TIM_HandleTypeDef * htim, uint32_t * pData, uint16_t Length)
Function description Starts the TIM Hall Sensor Interface in DMA mode.
Parameters htim: TIM Hall Sensor handle
pData: The destination Buffer address.
Length: The length of data to be transferred from TIM
peripheral to memory.
Return values HAL: status
HAL_TIMEx_HallSensor_Stop_DMA
Function name HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_DMA
(TIM_HandleTypeDef * htim)
Function description Stops the TIM Hall Sensor Interface in DMA mode.
Parameters htim: TIM handle
Return values HAL: status
HAL_TIMEx_OCN_Start
Function name HAL_StatusTypeDef HAL_TIMEx_OCN_Start
(TIM_HandleTypeDef * htim, uint32_t Channel)
Function description Starts the TIM Output Compare signal generation on the
complementary output.
Parameters htim: TIM Output Compare handle
Channel: TIM Channel to be enabled This parameter can be
one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_3: TIM Channel 3 selected
TIM_CHANNEL_4: TIM Channel 4 selected
Return values HAL: status
HAL_TIMEx_OCN_Stop
Function name HAL_StatusTypeDef HAL_TIMEx_OCN_Stop
(TIM_HandleTypeDef * htim, uint32_t Channel)
Function description Stops the TIM Output Compare signal generation on the
complementary output.
Parameters htim: TIM handle
Channel: TIM Channel to be disabled This parameter can be
one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
HAL_TIMEx_OCN_Start_IT
Function name HAL_StatusTypeDef HAL_TIMEx_OCN_Start_IT
(TIM_HandleTypeDef * htim, uint32_t Channel)
Function description Starts the TIM Output Compare signal generation in interrupt
mode on the complementary output.
Parameters htim: TIM OC handle
Channel: TIM Channel to be enabled This parameter can be
one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_3: TIM Channel 3 selected
TIM_CHANNEL_4: TIM Channel 4 selected
Return values HAL: status
HAL_TIMEx_OCN_Stop_IT
Function name HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_IT
(TIM_HandleTypeDef * htim, uint32_t Channel)
Function description Stops the TIM Output Compare signal generation in interrupt mode
on the complementary output.
Parameters htim: TIM Output Compare handle
Channel: TIM Channel to be disabled This parameter can be
one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_3: TIM Channel 3 selected
TIM_CHANNEL_4: TIM Channel 4 selected
Return values HAL: status
HAL_TIMEx_OCN_Start_DMA
Function name HAL_StatusTypeDef HAL_TIMEx_OCN_Start_DMA
(TIM_HandleTypeDef * htim, uint32_t Channel, uint32_t *
pData, uint16_t Length)
Function description Starts the TIM Output Compare signal generation in DMA mode on
the complementary output.
Parameters htim: TIM Output Compare handle
Channel: TIM Channel to be enabled This parameter can be
one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_3: TIM Channel 3 selected
TIM_CHANNEL_4: TIM Channel 4 selected
HAL_TIMEx_OCN_Stop_DMA
Function name HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_DMA
(TIM_HandleTypeDef * htim, uint32_t Channel)
Function description Stops the TIM Output Compare signal generation in DMA mode on
the complementary output.
Parameters htim: TIM Output Compare handle
Channel: TIM Channel to be disabled This parameter can be
one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_3: TIM Channel 3 selected
TIM_CHANNEL_4: TIM Channel 4 selected
Return values HAL: status
HAL_TIMEx_PWMN_Start
Function name HAL_StatusTypeDef HAL_TIMEx_PWMN_Start
(TIM_HandleTypeDef * htim, uint32_t Channel)
Function description Starts the PWM signal generation on the complementary output.
Parameters htim: TIM handle
Channel: TIM Channel to be enabled This parameter can be
one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_3: TIM Channel 3 selected
TIM_CHANNEL_4: TIM Channel 4 selected
Return values HAL: status
HAL_TIMEx_PWMN_Stop
Function name HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop
(TIM_HandleTypeDef * htim, uint32_t Channel)
Function description Stops the PWM signal generation on the complementary output.
Parameters htim: TIM handle
Channel: TIM Channel to be disabled This parameter can be
one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_3: TIM Channel 3 selected
TIM_CHANNEL_4: TIM Channel 4 selected
Return values HAL: status
HAL_TIMEx_PWMN_Stop_IT
Function name HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_IT
(TIM_HandleTypeDef * htim, uint32_t Channel)
Function description Stops the PWM signal generation in interrupt mode on the
complementary output.
Parameters htim: TIM handle
Channel: TIM Channel to be disabled This parameter can be
one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_3: TIM Channel 3 selected
TIM_CHANNEL_4: TIM Channel 4 selected
Return values HAL: status
HAL_TIMEx_PWMN_Start_DMA
Function name HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_DMA
(TIM_HandleTypeDef * htim, uint32_t Channel, uint32_t *
pData, uint16_t Length)
Function description Starts the TIM PWM signal generation in DMA mode on the
complementary output.
Parameters htim: TIM handle
Channel: TIM Channel to be enabled This parameter can be
one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
TIM_CHANNEL_3: TIM Channel 3 selected
TIM_CHANNEL_4: TIM Channel 4 selected
pData: The source Buffer address.
Length: The length of data to be transferred from memory to
TIM peripheral
Return values HAL: status
HAL_TIMEx_OnePulseN_Start
Function name HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start
(TIM_HandleTypeDef * htim, uint32_t OutputChannel)
Function description Starts the TIM One Pulse signal generation on the complemetary
output.
Parameters htim: TIM One Pulse handle
OutputChannel: TIM Channel to be enabled This parameter
can be one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
Return values HAL: status
HAL_TIMEx_OnePulseN_Stop
Function name HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop
(TIM_HandleTypeDef * htim, uint32_t OutputChannel)
Function description Stops the TIM One Pulse signal generation on the complementary
output.
Parameters htim: TIM One Pulse handle
OutputChannel: TIM Channel to be disabled This parameter
can be one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
Return values HAL: status
HAL_TIMEx_OnePulseN_Start_IT
Function name HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start_IT
(TIM_HandleTypeDef * htim, uint32_t OutputChannel)
Function description Starts the TIM One Pulse signal generation in interrupt mode on
the complementary channel.
Parameters htim: TIM One Pulse handle
HAL_TIMEx_OnePulseN_Stop_IT
Function name HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop_IT
(TIM_HandleTypeDef * htim, uint32_t OutputChannel)
Function description Stops the TIM One Pulse signal generation in interrupt mode on
the complementary channel.
Parameters htim: TIM One Pulse handle
OutputChannel: TIM Channel to be disabled This parameter
can be one of the following values:
TIM_CHANNEL_1: TIM Channel 1 selected
TIM_CHANNEL_2: TIM Channel 2 selected
Return values HAL: status
HAL_TIMEx_ConfigCommutationEvent
Function name HAL_StatusTypeDef HAL_TIMEx_ConfigCommutationEvent
(TIM_HandleTypeDef * htim, uint32_t InputTrigger, uint32_t
CommutationSource)
Function description Configure the TIM commutation event sequence.
Parameters htim: TIM handle
InputTrigger: the Internal trigger corresponding to the Timer
Interfacing with the Hall sensor This parameter can be one of
the following values:
TIM_TS_ITR0: Internal trigger 0 selected
TIM_TS_ITR1: Internal trigger 1 selected
TIM_TS_ITR2: Internal trigger 2 selected
TIM_TS_ITR3: Internal trigger 3 selected
TIM_TS_NONE No trigger is needed
CommutationSource: the Commutation Event source This
parameter can be one of the following values:
TIM_COMMUTATION_TRGI: Commutation source is the
TRGI of the Interface Timer
TIM_COMMUTATION_SOFTWARE: Commutation
source is set by software using the COMG bit
Return values HAL: status
Notes this function is mandatory to use the commutation event in
order to update the configuration at each commutation
detection on the TRGI input of the Timer, the typical use of
this feature is with the use of another Timer(interface Timer)
configured in Hall sensor interface, this interface Timer will
generate the commutation at its TRGO output (connected to
Timer used in this function) each time the TI1 of the Interface
Timer detect a commutation at its input TI1.
HAL_TIMEx_ConfigCommutationEvent_DMA
Function name HAL_StatusTypeDef
HAL_TIMEx_ConfigCommutationEvent_DMA
(TIM_HandleTypeDef * htim, uint32_t InputTrigger, uint32_t
CommutationSource)
Function description Configure the TIM commutation event sequence with DMA.
Parameters htim: TIM handle
InputTrigger: the Internal trigger corresponding to the Timer
Interfacing with the Hall sensor This parameter can be one of
the following values:
TIM_TS_ITR0: Internal trigger 0 selected
TIM_TS_ITR1: Internal trigger 1 selected
TIM_TS_ITR2: Internal trigger 2 selected
TIM_TS_ITR3: Internal trigger 3 selected
TIM_TS_NONE No trigger is needed
CommutationSource: the Commutation Event source This
parameter can be one of the following values:
TIM_COMMUTATION_TRGI: Commutation source is the
HAL_TIMEx_MasterConfigSynchronization
Function name HAL_StatusTypeDef
HAL_TIMEx_MasterConfigSynchronization
(TIM_HandleTypeDef * htim, TIM_MasterConfigTypeDef *
sMasterConfig)
Function description Configures the TIM in master mode.
Parameters htim: TIM handle.
sMasterConfig: pointer to a TIM_MasterConfigTypeDef
structure that contains the selected trigger output (TRGO) and
the Master/Slave mode.
Return values HAL: status
HAL_TIMEx_ConfigBreakDeadTime
Function name HAL_StatusTypeDef HAL_TIMEx_ConfigBreakDeadTime
(TIM_HandleTypeDef * htim,
TIM_BreakDeadTimeConfigTypeDef * sBreakDeadTimeConfig)
Function description Configures the Break feature, dead time, Lock level, OSSI/OSSR
State and the AOE(automatic output enable).
Parameters htim: TIM handle
sBreakDeadTimeConfig: pointer to a
TIM_ConfigBreakDeadConfigTypeDef structure that contains
the BDTR Register configuration information for the TIM
peripheral.
Return values HAL: status
HAL_TIMEx_RemapConfig
Function name HAL_StatusTypeDef HAL_TIMEx_RemapConfig
(TIM_HandleTypeDef * htim, uint32_t Remap)
Function description Configures the TIM14 Remapping input capabilities.
Parameters htim: TIM handle.
Remap: specifies the TIM remapping source. This parameter
HAL_TIMEx_CommutationCallback
Function name void HAL_TIMEx_CommutationCallback (TIM_HandleTypeDef
* htim)
Function description Hall commutation changed callback in non blocking mode.
Parameters htim: TIM handle
Return values None
HAL_TIMEx_BreakCallback
Function name void HAL_TIMEx_BreakCallback (TIM_HandleTypeDef * htim)
Function description Hall Break detection callback in non blocking mode.
Parameters htim: TIM handle
Return values None
HAL_TIMEx_HallSensor_GetState
Function name HAL_TIM_StateTypeDef HAL_TIMEx_HallSensor_GetState
(TIM_HandleTypeDef * htim)
Function description Return the TIM Hall Sensor interface state.
Parameters htim: TIM Hall Sensor handle
Return values HAL: state
TIMEx_DMACommutationCplt
Function name void TIMEx_DMACommutationCplt (DMA_HandleTypeDef *
hdma)
Function description TIM DMA Commutation callback.
Parameters hdma: pointer to DMA handle.
Return values None
43.1.3 TSC_HandleTypeDef
Data Fields
TSC_TypeDef * Instance
TSC_InitTypeDef Init
__IO HAL_TSC_StateTypeDef State
HAL_LockTypeDef Lock
Field Documentation
TSC_TypeDef* TSC_HandleTypeDef::Instance
Register base address
TSC_InitTypeDef TSC_HandleTypeDef::Init
Initialization parameters
__IO HAL_TSC_StateTypeDef TSC_HandleTypeDef::State
Peripheral state
HAL_LockTypeDef TSC_HandleTypeDef::Lock
Lock feature
Acquisition sequence
Discharge all IOs using HAL_TSC_IODischarge() function.
Wait a certain time allowing a good discharge of all capacitors. This delay depends of
the sampling capacitor and electrodes design.
Select the channel IOs to be acquired using HAL_TSC_IOConfig() function.
Launch the acquisition using either HAL_TSC_Start() or HAL_TSC_Start_IT()
function. If the synchronized mode is selected, the acquisition will start as soon as the
signal is received on the synchro pin.
Wait the end of acquisition using either HAL_TSC_PollForAcquisition() or
HAL_TSC_GetState() function or using WFI instruction for example.
Check the group acquisition status using HAL_TSC_GroupGetStatus() function.
Read the acquisition value using HAL_TSC_GroupGetValue() function.
HAL_TSC_Init
Function name HAL_StatusTypeDef HAL_TSC_Init (TSC_HandleTypeDef *
htsc)
Function description Initializes the TSC peripheral according to the specified
parameters in the TSC_InitTypeDef structure.
Parameters htsc: TSC handle
Return values HAL: status
HAL_TSC_DeInit
Function name HAL_StatusTypeDef HAL_TSC_DeInit (TSC_HandleTypeDef *
htsc)
Function description Deinitializes the TSC peripheral registers to their default reset
values.
Parameters htsc: TSC handle
Return values HAL: status
HAL_TSC_MspInit
Function name void HAL_TSC_MspInit (TSC_HandleTypeDef * htsc)
Function description Initializes the TSC MSP.
Parameters htsc: pointer to a TSC_HandleTypeDef structure that
contains the configuration information for the specified TSC.
Return values None
HAL_TSC_MspDeInit
Function name void HAL_TSC_MspDeInit (TSC_HandleTypeDef * htsc)
Function description DeInitializes the TSC MSP.
Parameters htsc: pointer to a TSC_HandleTypeDef structure that
contains the configuration information for the specified TSC.
Return values None
HAL_TSC_Start_IT
Function name HAL_StatusTypeDef HAL_TSC_Start_IT (TSC_HandleTypeDef
* htsc)
Function description Enables the interrupt and starts the acquisition.
Parameters htsc: pointer to a TSC_HandleTypeDef structure that
contains the configuration information for the specified TSC.
Return values HAL: status.
HAL_TSC_Stop
Function name HAL_StatusTypeDef HAL_TSC_Stop (TSC_HandleTypeDef *
htsc)
Function description Stops the acquisition previously launched in polling mode.
Parameters htsc: pointer to a TSC_HandleTypeDef structure that
contains the configuration information for the specified TSC.
Return values HAL: status
HAL_TSC_Stop_IT
Function name HAL_StatusTypeDef HAL_TSC_Stop_IT (TSC_HandleTypeDef
* htsc)
Function description Stops the acquisition previously launched in interrupt mode.
Parameters htsc: pointer to a TSC_HandleTypeDef structure that
contains the configuration information for the specified TSC.
Return values HAL: status
HAL_TSC_GroupGetStatus
Function name TSC_GroupStatusTypeDef HAL_TSC_GroupGetStatus
(TSC_HandleTypeDef * htsc, uint32_t gx_index)
Function description Gets the acquisition status for a group.
Parameters htsc: pointer to a TSC_HandleTypeDef structure that
contains the configuration information for the specified TSC.
gx_index: Index of the group
Return values Group: status
HAL_TSC_IOConfig
Function name HAL_StatusTypeDef HAL_TSC_IOConfig
(TSC_HandleTypeDef * htsc, TSC_IOConfigTypeDef * config)
Function description Configures TSC IOs.
Parameters htsc: pointer to a TSC_HandleTypeDef structure that
contains the configuration information for the specified TSC.
config: pointer to the configuration structure.
Return values HAL: status
HAL_TSC_IODischarge
Function name HAL_StatusTypeDef HAL_TSC_IODischarge
(TSC_HandleTypeDef * htsc, uint32_t choice)
Function description Discharge TSC IOs.
Parameters htsc: pointer to a TSC_HandleTypeDef structure that
contains the configuration information for the specified TSC.
choice: enable or disable
Return values HAL: status
HAL_TSC_GetState
Function name HAL_TSC_StateTypeDef HAL_TSC_GetState
(TSC_HandleTypeDef * htsc)
Function description Return the TSC state.
Parameters htsc: pointer to a TSC_HandleTypeDef structure that
contains the configuration information for the specified TSC.
Return values HAL: state
HAL_TSC_PollForAcquisition
Function name HAL_StatusTypeDef HAL_TSC_PollForAcquisition
(TSC_HandleTypeDef * htsc)
Function description Start acquisition and wait until completion.
Parameters htsc: pointer to a TSC_HandleTypeDef structure that
contains the configuration information for the specified TSC.
HAL_TSC_IRQHandler
Function name void HAL_TSC_IRQHandler (TSC_HandleTypeDef * htsc)
Function description Handles TSC interrupt request.
Parameters htsc: pointer to a TSC_HandleTypeDef structure that
contains the configuration information for the specified TSC.
Return values None
HAL_TSC_ConvCpltCallback
Function name void HAL_TSC_ConvCpltCallback (TSC_HandleTypeDef *
htsc)
Function description Acquisition completed callback in non blocking mode.
Parameters htsc: pointer to a TSC_HandleTypeDef structure that
contains the configuration information for the specified TSC.
Return values None
HAL_TSC_ErrorCallback
Function name void HAL_TSC_ErrorCallback (TSC_HandleTypeDef * htsc)
Function description Error callback in non blocking mode.
Parameters htsc: pointer to a TSC_HandleTypeDef structure that
contains the configuration information for the specified TSC.
Return values None
44.1.3 UART_HandleTypeDef
Data Fields
USART_TypeDef * Instance
UART_InitTypeDef Init
UART_AdvFeatureInitTypeDef AdvancedInit
uint8_t * pTxBuffPtr
You can refer to the UART HAL driver header file for more useful macros
HAL_UART_Init
Function name HAL_StatusTypeDef HAL_UART_Init (UART_HandleTypeDef *
huart)
Function description Initialize the UART mode according to the specified parameters in
the UART_InitTypeDef and initialize the associated handle.
HAL_HalfDuplex_Init
Function name HAL_StatusTypeDef HAL_HalfDuplex_Init
(UART_HandleTypeDef * huart)
Function description Initialize the half-duplex mode according to the specified
parameters in the UART_InitTypeDef and creates the associated
handle.
Parameters huart: UART handle.
Return values HAL: status
HAL_MultiProcessor_Init
Function name HAL_StatusTypeDef HAL_MultiProcessor_Init
(UART_HandleTypeDef * huart, uint8_t Address, uint32_t
WakeUpMethod)
Function description Initialize the multiprocessor mode according to the specified
parameters in the UART_InitTypeDef and initialize the associated
handle.
Parameters huart: UART handle.
Address: UART node address (4-, 6-, 7- or 8-bit long).
WakeUpMethod: specifies the UART wakeup method. This
parameter can be one of the following values:
UART_WAKEUPMETHOD_IDLELINE WakeUp by an
idle line detection
UART_WAKEUPMETHOD_ADDRESSMARK WakeUp
by an address mark
Return values HAL: status
Notes If the user resorts to idle line detection wake up, the Address
parameter is useless and ignored by the initialization function.
If the user resorts to address mark wake up, the address
length detection is configured by default to 4 bits only. For the
UART to be able to manage 6-, 7- or 8-bit long addresses
detection, the API
HAL_MultiProcessorEx_AddressLength_Set() must be called
after HAL_MultiProcessor_Init().
HAL_UART_DeInit
Function name HAL_StatusTypeDef HAL_UART_DeInit
(UART_HandleTypeDef * huart)
Function description DeInitialize the UART peripheral.
Parameters huart: UART handle.
Return values HAL: status
HAL_UART_MspDeInit
Function name void HAL_UART_MspDeInit (UART_HandleTypeDef * huart)
Function description DeInitialize the UART MSP.
Parameters huart: UART handle.
Return values None
HAL_UART_Transmit
Function name HAL_StatusTypeDef HAL_UART_Transmit
(UART_HandleTypeDef * huart, uint8_t * pData, uint16_t Size,
uint32_t Timeout)
Function description Send an amount of data in blocking mode.
Parameters huart: UART handle.
pData: Pointer to data buffer.
Size: Amount of data to be sent.
Timeout: Timeout duration.
Return values HAL: status
Notes When UART parity is not enabled (PCE = 0), and Word
Length is configured to 9 bits (M1-M0 = 01), address of user
data buffer containing data to be sent, should be aligned on a
half word frontier (16 bits) (as sent data will be handled using
u16 pointer cast). Depending on compilation chain, use of
specific alignment compilation directives or pragmas might be
required to ensure proper alignment for pData.
HAL_UART_Receive
Function name HAL_StatusTypeDef HAL_UART_Receive
(UART_HandleTypeDef * huart, uint8_t * pData, uint16_t Size,
uint32_t Timeout)
Function description Receive an amount of data in blocking mode.
Parameters huart: UART handle.
pData: pointer to data buffer.
Size: amount of data to be received.
Timeout: Timeout duration.
Return values HAL: status
Notes When UART parity is not enabled (PCE = 0), and Word
Length is configured to 9 bits (M1-M0 = 01), address of user
data buffer for storing data to be received, should be aligned
HAL_UART_Transmit_IT
Function name HAL_StatusTypeDef HAL_UART_Transmit_IT
(UART_HandleTypeDef * huart, uint8_t * pData, uint16_t Size)
Function description Send an amount of data in interrupt mode.
Parameters huart: UART handle.
pData: pointer to data buffer.
Size: amount of data to be sent.
Return values HAL: status
Notes When UART parity is not enabled (PCE = 0), and Word
Length is configured to 9 bits (M1-M0 = 01), address of user
data buffer containing data to be sent, should be aligned on a
half word frontier (16 bits) (as sent data will be handled using
u16 pointer cast). Depending on compilation chain, use of
specific alignment compilation directives or pragmas might be
required to ensure proper alignment for pData.
HAL_UART_Receive_IT
Function name HAL_StatusTypeDef HAL_UART_Receive_IT
(UART_HandleTypeDef * huart, uint8_t * pData, uint16_t Size)
Function description Receive an amount of data in interrupt mode.
Parameters huart: UART handle.
pData: pointer to data buffer.
Size: amount of data to be received.
Return values HAL: status
Notes When UART parity is not enabled (PCE = 0), and Word
Length is configured to 9 bits (M1-M0 = 01), address of user
data buffer for storing data to be received, should be aligned
on a half word frontier (16 bits) (as received data will be
handled using u16 pointer cast). Depending on compilation
chain, use of specific alignment compilation directives or
pragmas might be required to ensure proper alignment for
pData.
HAL_UART_Transmit_DMA
Function name HAL_StatusTypeDef HAL_UART_Transmit_DMA
(UART_HandleTypeDef * huart, uint8_t * pData, uint16_t Size)
Function description Send an amount of data in DMA mode.
Parameters huart: UART handle.
pData: pointer to data buffer.
HAL_UART_Receive_DMA
Function name HAL_StatusTypeDef HAL_UART_Receive_DMA
(UART_HandleTypeDef * huart, uint8_t * pData, uint16_t Size)
Function description Receive an amount of data in DMA mode.
Parameters huart: UART handle.
pData: pointer to data buffer.
Size: amount of data to be received.
Return values HAL: status
Notes When UART parity is not enabled (PCE = 0), and Word
Length is configured to 9 bits (M1-M0 = 01), address of user
data buffer for storing data to be received, should be aligned
on a half word frontier (16 bits) (as received data will be
handled by DMA from halfword frontier). Depending on
compilation chain, use of specific alignment compilation
directives or pragmas might be required to ensure proper
alignment for pData.
HAL_UART_DMAPause
Function name HAL_StatusTypeDef HAL_UART_DMAPause
(UART_HandleTypeDef * huart)
Function description Pause the DMA Transfer.
Parameters huart: UART handle.
Return values HAL: status
HAL_UART_DMAResume
Function name HAL_StatusTypeDef HAL_UART_DMAResume
(UART_HandleTypeDef * huart)
Function description Resume the DMA Transfer.
Parameters huart: UART handle.
Return values HAL: status
HAL_UART_DMAStop
Function name HAL_StatusTypeDef HAL_UART_DMAStop
HAL_UART_Abort
Function name HAL_StatusTypeDef HAL_UART_Abort
(UART_HandleTypeDef * huart)
Function description Abort ongoing transfers (blocking mode).
Parameters huart: UART handle.
Return values HAL: status
Notes This procedure could be used for aborting any ongoing
transfer started in Interrupt or DMA mode. This procedure
performs following operations : Disable UART Interrupts (Tx
and Rx)Disable the DMA transfer in the peripheral register (if
enabled)Abort DMA transfer by calling HAL_DMA_Abort (in
case of transfer in DMA mode)Set handle State to READY
This procedure is executed in blocking mode : when exiting
function, Abort is considered as completed.
HAL_UART_AbortTransmit
Function name HAL_StatusTypeDef HAL_UART_AbortTransmit
(UART_HandleTypeDef * huart)
Function description Abort ongoing Transmit transfer (blocking mode).
Parameters huart: UART handle.
Return values HAL: status
Notes This procedure could be used for aborting any ongoing Tx
transfer started in Interrupt or DMA mode. This procedure
performs following operations : Disable UART Interrupts
(Tx)Disable the DMA transfer in the peripheral register (if
enabled)Abort DMA transfer by calling HAL_DMA_Abort (in
case of transfer in DMA mode)Set handle State to READY
This procedure is executed in blocking mode : when exiting
function, Abort is considered as completed.
HAL_UART_AbortReceive
Function name HAL_StatusTypeDef HAL_UART_AbortReceive
(UART_HandleTypeDef * huart)
Function description Abort ongoing Receive transfer (blocking mode).
Parameters huart: UART handle.
Return values HAL: status
Notes This procedure could be used for aborting any ongoing Rx
transfer started in Interrupt or DMA mode. This procedure
HAL_UART_Abort_IT
Function name HAL_StatusTypeDef HAL_UART_Abort_IT
(UART_HandleTypeDef * huart)
Function description Abort ongoing transfers (Interrupt mode).
Parameters huart: UART handle.
Return values HAL: status
Notes This procedure could be used for aborting any ongoing
transfer started in Interrupt or DMA mode. This procedure
performs following operations : Disable UART Interrupts (Tx
and Rx)Disable the DMA transfer in the peripheral register (if
enabled)Abort DMA transfer by calling HAL_DMA_Abort_IT
(in case of transfer in DMA mode)Set handle State to
READYAt abort completion, call user abort complete callback
This procedure is executed in Interrupt mode, meaning that
abort procedure could be considered as completed only when
user abort complete callback is executed (not when exiting
function).
HAL_UART_AbortTransmit_IT
Function name HAL_StatusTypeDef HAL_UART_AbortTransmit_IT
(UART_HandleTypeDef * huart)
Function description Abort ongoing Transmit transfer (Interrupt mode).
Parameters huart: UART handle.
Return values HAL: status
Notes This procedure could be used for aborting any ongoing Tx
transfer started in Interrupt or DMA mode. This procedure
performs following operations : Disable UART Interrupts
(Tx)Disable the DMA transfer in the peripheral register (if
enabled)Abort DMA transfer by calling HAL_DMA_Abort_IT
(in case of transfer in DMA mode)Set handle State to
READYAt abort completion, call user abort complete callback
This procedure is executed in Interrupt mode, meaning that
abort procedure could be considered as completed only when
user abort complete callback is executed (not when exiting
function).
HAL_UART_IRQHandler
Function name void HAL_UART_IRQHandler (UART_HandleTypeDef * huart)
Function description Handle UART interrupt request.
Parameters huart: UART handle.
Return values None
HAL_UART_TxCpltCallback
Function name void HAL_UART_TxCpltCallback (UART_HandleTypeDef *
huart)
Function description Tx Transfer completed callback.
Parameters huart: UART handle.
Return values None
HAL_UART_TxHalfCpltCallback
Function name void HAL_UART_TxHalfCpltCallback (UART_HandleTypeDef *
huart)
Function description Tx Half Transfer completed callback.
Parameters huart: UART handle.
Return values None
HAL_UART_RxCpltCallback
Function name void HAL_UART_RxCpltCallback (UART_HandleTypeDef *
huart)
Function description Rx Transfer completed callback.
HAL_UART_RxHalfCpltCallback
Function name void HAL_UART_RxHalfCpltCallback (UART_HandleTypeDef *
huart)
Function description Rx Half Transfer completed callback.
Parameters huart: UART handle.
Return values None
HAL_UART_ErrorCallback
Function name void HAL_UART_ErrorCallback (UART_HandleTypeDef *
huart)
Function description UART error callback.
Parameters huart: UART handle.
Return values None
HAL_UART_AbortCpltCallback
Function name void HAL_UART_AbortCpltCallback (UART_HandleTypeDef *
huart)
Function description UART Abort Complete callback.
Parameters huart: UART handle.
Return values None
HAL_UART_AbortTransmitCpltCallback
Function name void HAL_UART_AbortTransmitCpltCallback
(UART_HandleTypeDef * huart)
Function description UART Abort Complete callback.
Parameters huart: UART handle.
Return values None
HAL_UART_AbortReceiveCpltCallback
Function name void HAL_UART_AbortReceiveCpltCallback
(UART_HandleTypeDef * huart)
Function description UART Abort Receive Complete callback.
Parameters huart: UART handle.
Return values None
HAL_MultiProcessor_DisableMuteMode
Function name HAL_StatusTypeDef HAL_MultiProcessor_DisableMuteMode
(UART_HandleTypeDef * huart)
Function description Disable UART mute mode (does not mean the UART actually exits
mute mode as it may not have been in mute mode at this very
moment).
Parameters huart: UART handle.
Return values HAL: status
HAL_MultiProcessor_EnterMuteMode
Function name void HAL_MultiProcessor_EnterMuteMode
(UART_HandleTypeDef * huart)
Function description Enter UART mute mode (means UART actually enters mute
mode).
Parameters huart: UART handle.
Return values None
Notes To exit from mute mode,
HAL_MultiProcessor_DisableMuteMode() API must be called.
HAL_HalfDuplex_EnableTransmitter
Function name HAL_StatusTypeDef HAL_HalfDuplex_EnableTransmitter
(UART_HandleTypeDef * huart)
Function description Enable the UART transmitter and disable the UART receiver.
Parameters huart: UART handle.
Return values HAL: status
HAL_HalfDuplex_EnableReceiver
Function name HAL_StatusTypeDef HAL_HalfDuplex_EnableReceiver
(UART_HandleTypeDef * huart)
Function description Enable the UART receiver and disable the UART transmitter.
Parameters huart: UART handle.
Return values HAL: status.
HAL_UART_GetError
Function name uint32_t HAL_UART_GetError (UART_HandleTypeDef * huart)
Function description Return the UART handle error code.
Parameters huart: Pointer to a UART_HandleTypeDef structure that
contains the configuration information for the specified UART.
Return values UART: Error Code
UART_AdvFeatureConfig
Function name void UART_AdvFeatureConfig (UART_HandleTypeDef * huart)
Function description Configure the UART peripheral advanced features.
Parameters huart: UART handle.
Return values None
UART_CheckIdleState
Function name HAL_StatusTypeDef UART_CheckIdleState
(UART_HandleTypeDef * huart)
Function description Check the UART Idle State.
Parameters huart: UART handle.
Return values HAL: status
UART_SetConfig
Function name HAL_StatusTypeDef UART_SetConfig (UART_HandleTypeDef
* huart)
Function description Configure the UART peripheral.
Parameters huart: UART handle.
Return values HAL: status
UART_Transmit_IT
Function name HAL_StatusTypeDef UART_Transmit_IT
(UART_HandleTypeDef * huart)
Function description Send an amount of data in interrupt mode.
UART_EndTransmit_IT
Function name HAL_StatusTypeDef UART_EndTransmit_IT
(UART_HandleTypeDef * huart)
Function description Wrap up transmission in non-blocking mode.
Parameters huart: pointer to a UART_HandleTypeDef structure that
contains the configuration information for the specified UART
module.
Return values HAL: status
UART_Receive_IT
Function name HAL_StatusTypeDef UART_Receive_IT
(UART_HandleTypeDef * huart)
Function description Receive an amount of data in interrupt mode.
Parameters huart: UART handle.
Return values HAL: status
Notes Function is called under interruption only, once interruptions
have been enabled by HAL_UART_Receive_IT()
UART_WaitOnFlagUntilTimeout
Function name HAL_StatusTypeDef UART_WaitOnFlagUntilTimeout
(UART_HandleTypeDef * huart, uint32_t Flag, FlagStatus
Status, uint32_t Tickstart, uint32_t Timeout)
Function description Handle UART Communication Timeout.
Parameters huart: UART handle.
Flag: Specifies the UART flag to check
Status: Flag status (SET or RESET)
Tickstart: Tick start value
Timeout: Timeout duration
Return values HAL: status
HAL_RS485Ex_Init
Function name HAL_StatusTypeDef HAL_RS485Ex_Init
(UART_HandleTypeDef * huart, uint32_t Polarity, uint32_t
AssertionTime, uint32_t DeassertionTime)
Function description Initialize the RS485 Driver enable feature according to the
specified parameters in the UART_InitTypeDef and creates the
associated handle.
Parameters huart: UART handle.
Polarity: select the driver enable polarity. This parameter
can be one of the following values:
UART_DE_POLARITY_HIGH DE signal is active high
UART_DE_POLARITY_LOW DE signal is active low
AssertionTime: Driver Enable assertion time: 5-bit value
HAL_LIN_Init
Function name HAL_StatusTypeDef HAL_LIN_Init (UART_HandleTypeDef *
huart, uint32_t BreakDetectLength)
Function description Initialize the LIN mode according to the specified parameters in the
UART_InitTypeDef and creates the associated handle .
Parameters huart: UART handle.
BreakDetectLength: specifies the LIN break detection
length. This parameter can be one of the following values:
UART_LINBREAKDETECTLENGTH_10B 10-bit break
detection
UART_LINBREAKDETECTLENGTH_11B 11-bit break
detection
Return values HAL: status
HAL_UARTEx_WakeupCallback
Function name void HAL_UARTEx_WakeupCallback (UART_HandleTypeDef *
huart)
Function description UART wakeup from Stop mode callback.
Parameters huart: UART handle.
Return values None
HAL_MultiProcessorEx_AddressLength_Set
Function name HAL_StatusTypeDef
HAL_MultiProcessorEx_AddressLength_Set
(UART_HandleTypeDef * huart, uint32_t AddressLength)
Function description By default in multiprocessor mode, when the wake up method is
set to address mark, the UART handles only 4-bit long addresses
detection; this API allows to enable longer addresses detection (6-,
7- or 8-bit long).
Parameters huart: UART handle.
AddressLength: this parameter can be one of the following
values:
UART_ADDRESS_DETECT_4B 4-bit long address
UART_ADDRESS_DETECT_7B 6-, 7- or 8-bit long
address
HAL_UARTEx_StopModeWakeUpSourceConfig
Function name HAL_StatusTypeDef
HAL_UARTEx_StopModeWakeUpSourceConfig
(UART_HandleTypeDef * huart, UART_WakeUpTypeDef
WakeUpSelection)
Function description Set Wakeup from Stop mode interrupt flag selection.
Parameters huart: UART handle.
WakeUpSelection: address match, Start Bit detection or
RXNE bit status. This parameter can be one of the following
values:
UART_WAKEUP_ON_ADDRESS
UART_WAKEUP_ON_STARTBIT
UART_WAKEUP_ON_READDATA_NONEMPTY
Return values HAL: status
HAL_UARTEx_EnableStopMode
Function name HAL_StatusTypeDef HAL_UARTEx_EnableStopMode
(UART_HandleTypeDef * huart)
Function description Enable UART Stop Mode.
Parameters huart: UART handle.
Return values HAL: status
Notes The UART is able to wake up the MCU from Stop 1 mode as
long as UART clock is HSI or LSE.
HAL_UARTEx_DisableStopMode
Function name HAL_StatusTypeDef HAL_UARTEx_DisableStopMode
(UART_HandleTypeDef * huart)
Function description Disable UART Stop Mode.
Parameters huart: UART handle.
Return values HAL: status
HAL_LIN_SendBreak
Function name HAL_StatusTypeDef HAL_LIN_SendBreak
(UART_HandleTypeDef * huart)
Function description Transmit break characters.
Parameters huart: UART handle.
Return values HAL: status
46.1.2 USART_HandleTypeDef
Data Fields
USART_TypeDef * Instance
USART_InitTypeDef Init
You can refer to the USART HAL driver header file for more useful macros
To configure and enable/disable the USART to wake up the MCU from stop
mode, resort to UART API's HAL_UARTEx_StopModeWakeUpSourceConfig(),
HAL_UARTEx_EnableStopMode() and HAL_UARTEx_DisableStopMode() in
casting the USART handle to UART type UART_HandleTypeDef.
HAL_USART_Init
Function name HAL_StatusTypeDef HAL_USART_Init
(USART_HandleTypeDef * husart)
Function description Initialize the USART mode according to the specified parameters
in the USART_InitTypeDef and initialize the associated handle.
Parameters husart: USART handle.
Return values HAL: status
HAL_USART_DeInit
Function name HAL_StatusTypeDef HAL_USART_DeInit
(USART_HandleTypeDef * husart)
Function description DeInitialize the USART peripheral.
Parameters husart: USART handle.
Return values HAL: status
HAL_USART_MspInit
Function name void HAL_USART_MspInit (USART_HandleTypeDef * husart)
Function description Initialize the USART MSP.
Parameters husart: USART handle.
Return values None
HAL_USART_MspDeInit
Function name void HAL_USART_MspDeInit (USART_HandleTypeDef *
husart)
Function description DeInitialize the USART MSP.
Parameters husart: USART handle.
Return values None
HAL_USART_Transmit
Function name HAL_StatusTypeDef HAL_USART_Transmit
(USART_HandleTypeDef * husart, uint8_t * pTxData, uint16_t
Size, uint32_t Timeout)
Function description Simplex send an amount of data in blocking mode.
Parameters husart: USART handle.
pTxData: Pointer to data buffer.
Size: Amount of data to be sent.
HAL_USART_Receive
Function name HAL_StatusTypeDef HAL_USART_Receive
(USART_HandleTypeDef * husart, uint8_t * pRxData, uint16_t
Size, uint32_t Timeout)
Function description Receive an amount of data in blocking mode.
Parameters husart: USART handle.
pRxData: Pointer to data buffer.
Size: Amount of data to be received.
Timeout: Timeout duration.
Return values HAL: status
Notes To receive synchronous data, dummy data are
simultaneously transmitted.
When UART parity is not enabled (PCE = 0), and Word
Length is configured to 9 bits (M1-M0 = 01), address of user
data buffer for storing data to be received, should be aligned
on a half word frontier (16 bits) (as received data will be
handled using u16 pointer cast). Depending on compilation
chain, use of specific alignment compilation directives or
pragmas might be required to ensure proper alignment for
pRxData.
HAL_USART_TransmitReceive
Function name HAL_StatusTypeDef HAL_USART_TransmitReceive
(USART_HandleTypeDef * husart, uint8_t * pTxData, uint8_t *
pRxData, uint16_t Size, uint32_t Timeout)
Function description Full-Duplex Send and Receive an amount of data in blocking
mode.
Parameters husart: USART handle.
pTxData: pointer to TX data buffer.
pRxData: pointer to RX data buffer.
Size: amount of data to be sent (same amount to be
received).
Timeout: Timeout duration.
Return values HAL: status
Notes When UART parity is not enabled (PCE = 0), and Word
Length is configured to 9 bits (M1-M0 = 01), address of user
data buffers containing data to be sent/received, should be
HAL_USART_Transmit_IT
Function name HAL_StatusTypeDef HAL_USART_Transmit_IT
(USART_HandleTypeDef * husart, uint8_t * pTxData, uint16_t
Size)
Function description Send an amount of data in interrupt mode.
Parameters husart: USART handle.
pTxData: pointer to data buffer.
Size: amount of data to be sent.
Return values HAL: status
Notes When UART parity is not enabled (PCE = 0), and Word
Length is configured to 9 bits (M1-M0 = 01), address of user
data buffer containing data to be sent, should be aligned on a
half word frontier (16 bits) (as sent data will be handled using
u16 pointer cast). Depending on compilation chain, use of
specific alignment compilation directives or pragmas might be
required to ensure proper alignment for pTxData.
HAL_USART_Receive_IT
Function name HAL_StatusTypeDef HAL_USART_Receive_IT
(USART_HandleTypeDef * husart, uint8_t * pRxData, uint16_t
Size)
Function description Receive an amount of data in interrupt mode.
Parameters husart: USART handle.
pRxData: pointer to data buffer.
Size: amount of data to be received.
Return values HAL: status
Notes To receive synchronous data, dummy data are
simultaneously transmitted.
When UART parity is not enabled (PCE = 0), and Word
Length is configured to 9 bits (M1-M0 = 01), address of user
data buffer for storing data to be received, should be aligned
on a half word frontier (16 bits) (as received data will be
handled using u16 pointer cast). Depending on compilation
chain, use of specific alignment compilation directives or
pragmas might be required to ensure proper alignment for
pRxData.
HAL_USART_Transmit_DMA
Function name HAL_StatusTypeDef HAL_USART_Transmit_DMA
(USART_HandleTypeDef * husart, uint8_t * pTxData, uint16_t
Size)
Function description Send an amount of data in DMA mode.
Parameters husart: USART handle.
pTxData: pointer to data buffer.
Size: amount of data to be sent.
Return values HAL: status
Notes When UART parity is not enabled (PCE = 0), and Word
Length is configured to 9 bits (M1-M0 = 01), address of user
data buffer containing data to be sent, should be aligned on a
half word frontier (16 bits) (as sent data will be handled by
DMA from halfword frontier). Depending on compilation chain,
use of specific alignment compilation directives or pragmas
might be required to ensure proper alignment for pTxData.
HAL_USART_Receive_DMA
Function name HAL_StatusTypeDef HAL_USART_Receive_DMA
(USART_HandleTypeDef * husart, uint8_t * pRxData, uint16_t
Size)
Function description Receive an amount of data in DMA mode.
Parameters husart: USART handle.
pRxData: pointer to data buffer.
Size: amount of data to be received.
HAL_USART_TransmitReceive_DMA
Function name HAL_StatusTypeDef HAL_USART_TransmitReceive_DMA
(USART_HandleTypeDef * husart, uint8_t * pTxData, uint8_t *
pRxData, uint16_t Size)
Function description Full-Duplex Transmit Receive an amount of data in non-blocking
mode.
Parameters husart: USART handle.
pTxData: pointer to TX data buffer.
pRxData: pointer to RX data buffer.
Size: amount of data to be received/sent.
Return values HAL: status
Notes When UART parity is not enabled (PCE = 0), and Word
Length is configured to 9 bits (M1-M0 = 01), address of user
data buffers containing data to be sent/received, should be
aligned on a half word frontier (16 bits) (as sent/received data
will be handled by DMA from halfword frontier). Depending on
compilation chain, use of specific alignment compilation
directives or pragmas might be required to ensure proper
alignment for pTxData and pRxData.
HAL_USART_DMAPause
Function name HAL_StatusTypeDef HAL_USART_DMAPause
(USART_HandleTypeDef * husart)
Function description Pause the DMA Transfer.
Parameters husart: USART handle.
Return values HAL: status
HAL_USART_DMAResume
Function name HAL_StatusTypeDef HAL_USART_DMAResume
(USART_HandleTypeDef * husart)
Function description Resume the DMA Transfer.
Parameters husart: USART handle.
Return values HAL: status
HAL_USART_Abort
Function name HAL_StatusTypeDef HAL_USART_Abort
(USART_HandleTypeDef * husart)
Function description Abort ongoing transfers (blocking mode).
Parameters husart: USART handle.
Return values HAL: status
Notes This procedure could be used for aborting any ongoing
transfer started in Interrupt or DMA mode. This procedure
performs following operations : Disable USART Interrupts (Tx
and Rx)Disable the DMA transfer in the peripheral register (if
enabled)Abort DMA transfer by calling HAL_DMA_Abort (in
case of transfer in DMA mode)Set handle State to READY
This procedure is executed in blocking mode : when exiting
function, Abort is considered as completed.
HAL_USART_Abort_IT
Function name HAL_StatusTypeDef HAL_USART_Abort_IT
(USART_HandleTypeDef * husart)
Function description Abort ongoing transfers (Interrupt mode).
Parameters husart: USART handle.
Return values HAL: status
Notes This procedure could be used for aborting any ongoing
transfer started in Interrupt or DMA mode. This procedure
performs following operations : Disable USART Interrupts (Tx
and Rx)Disable the DMA transfer in the peripheral register (if
enabled)Abort DMA transfer by calling HAL_DMA_Abort_IT
(in case of transfer in DMA mode)Set handle State to
READYAt abort completion, call user abort complete callback
This procedure is executed in Interrupt mode, meaning that
abort procedure could be considered as completed only when
user abort complete callback is executed (not when exiting
function).
HAL_USART_IRQHandler
Function name void HAL_USART_IRQHandler (USART_HandleTypeDef *
husart)
Function description Handle USART interrupt request.
HAL_USART_TxCpltCallback
Function name void HAL_USART_TxCpltCallback (USART_HandleTypeDef *
husart)
Function description Tx Transfer completed callback.
Parameters husart: USART handle.
Return values None
HAL_USART_RxCpltCallback
Function name void HAL_USART_RxCpltCallback (USART_HandleTypeDef *
husart)
Function description Rx Transfer completed callback.
Parameters husart: USART handle.
Return values None
HAL_USART_TxHalfCpltCallback
Function name void HAL_USART_TxHalfCpltCallback
(USART_HandleTypeDef * husart)
Function description Tx Half Transfer completed callback.
Parameters husart: USART handle.
Return values None
HAL_USART_RxHalfCpltCallback
Function name void HAL_USART_RxHalfCpltCallback
(USART_HandleTypeDef * husart)
Function description Rx Half Transfer completed callback.
Parameters husart: USART handle.
Return values None
HAL_USART_TxRxCpltCallback
Function name void HAL_USART_TxRxCpltCallback (USART_HandleTypeDef
* husart)
Function description Tx/Rx Transfers completed callback for the non-blocking process.
Parameters husart: USART handle.
Return values None
HAL_USART_AbortCpltCallback
Function name void HAL_USART_AbortCpltCallback (USART_HandleTypeDef
* husart)
Function description USART Abort Complete callback.
Parameters husart: USART handle.
Return values None
HAL_USART_GetState
Function name HAL_USART_StateTypeDef HAL_USART_GetState
(USART_HandleTypeDef * husart)
Function description Return the USART handle state.
Parameters husart: pointer to a USART_HandleTypeDef structure that
contains the configuration information for the specified
USART.
Return values USART: handle state
HAL_USART_GetError
Function name uint32_t HAL_USART_GetError (USART_HandleTypeDef *
husart)
Function description Return the USART error code.
Parameters husart: pointer to a USART_HandleTypeDef structure that
contains the configuration information for the specified
USART.
Return values USART: handle Error Code
48.1.2 WWDG_HandleTypeDef
Data Fields
WWDG_TypeDef * Instance
WWDG_InitTypeDef Init
Field Documentation
WWDG_TypeDef* WWDG_HandleTypeDef::Instance
Register base address
WWDG_InitTypeDef WWDG_HandleTypeDef::Init
WWDG required parameters
HAL_WWDG_Init
Function name HAL_StatusTypeDef HAL_WWDG_Init
(WWDG_HandleTypeDef * hwwdg)
Function description Initialize the WWDG according to the specified.
Parameters hwwdg: pointer to a WWDG_HandleTypeDef structure that
contains the configuration information for the specified
WWDG module.
Return values HAL: status
HAL_WWDG_MspInit
Function name void HAL_WWDG_MspInit (WWDG_HandleTypeDef * hwwdg)
Function description Initialize the WWDG MSP.
Parameters hwwdg: pointer to a WWDG_HandleTypeDef structure that
contains the configuration information for the specified
WWDG module.
Return values None
Notes When rewriting this function in user file, mechanism may be
added to avoid multiple initialize when HAL_WWDG_Init
function is called again to change parameters.
HAL_WWDG_Refresh
Function name HAL_StatusTypeDef HAL_WWDG_Refresh
(WWDG_HandleTypeDef * hwwdg)
Function description Refresh the WWDG.
Parameters hwwdg: pointer to a WWDG_HandleTypeDef structure that
contains the configuration information for the specified
WWDG module.
Return values HAL: status
HAL_WWDG_EarlyWakeupCallback
Function name void HAL_WWDG_EarlyWakeupCallback
(WWDG_HandleTypeDef * hwwdg)
Function description WWDG Early Wakeup callback.
Parameters hwwdg: pointer to a WWDG_HandleTypeDef structure that
contains the configuration information for the specified
WWDG module.
Return values None
49.1.2 LL_ADC_REG_InitTypeDef
Data Fields
uint32_t TriggerSource
uint32_t SequencerDiscont
uint32_t ContinuousMode
uint32_t DMATransfer
uint32_t Overrun
Field Documentation
uint32_t LL_ADC_REG_InitTypeDef::TriggerSource
Set ADC group regular conversion trigger source: internal (SW start) or from external
IP (timer event, external interrupt line). This parameter can be a value of
ADC_LL_EC_REG_TRIGGER_SOURCE
Note:On this STM32 serie, setting trigger source to external trigger also set trigger
polarity to rising edge (default setting for compatibility with some ADC on other STM32
LL_ADC_DMA_GetRegAddr
Function name __STATIC_INLINE uint32_t LL_ADC_DMA_GetRegAddr
(ADC_TypeDef * ADCx, uint32_t Register)
Function description Function to help to configure DMA transfer from ADC: retrieve the
ADC register address from ADC instance and a list of ADC
registers intended to be used (most commonly) with DMA transfer.
Parameters ADCx: ADC instance
Register: This parameter can be one of the following values:
LL_ADC_DMA_REG_REGULAR_DATA
Return values ADC: register address
Notes These ADC registers are data registers: when ADC
conversion data is available in ADC data registers, ADC
generates a DMA transfer request.
This macro is intended to be used with LL DMA driver, refer to
function "LL_DMA_ConfigAddresses()". Example:
LL_DMA_ConfigAddresses(DMA1, LL_DMA_CHANNEL_1,
LL_ADC_DMA_GetRegAddr(ADC1,
LL_ADC_DMA_REG_REGULAR_DATA), (uint32_t)&< array
or variable >,
LL_ADC_SetCommonPathInternalCh
Function name __STATIC_INLINE void LL_ADC_SetCommonPathInternalCh
(ADC_Common_TypeDef * ADCxy_COMMON, uint32_t
PathInternal)
Function description Set parameter common to several ADC: measurement path to
internal channels (VrefInt, temperature sensor, ...).
Parameters ADCxy_COMMON: ADC common instance (can be set
directly from CMSIS definition or by using helper macro
__LL_ADC_COMMON_INSTANCE() )
PathInternal: This parameter can be a combination of the
following values: (1) On STM32F0, parameter not available
on all devices: all devices except STM32F030x6,
STM32F030x8, STM32F030xC, STM32F070x6,
STM32F070xB.
LL_ADC_PATH_INTERNAL_NONE
LL_ADC_PATH_INTERNAL_VREFINT
LL_ADC_PATH_INTERNAL_TEMPSENSOR
LL_ADC_PATH_INTERNAL_VBAT (1)
Return values None
Notes One or several values can be selected. Example:
(LL_ADC_PATH_INTERNAL_VREFINT |
LL_ADC_PATH_INTERNAL_TEMPSENSOR)
Stabilization time of measurement path to internal channel:
After enabling internal paths, before starting ADC conversion,
a delay is required for internal voltage reference and
temperature sensor stabilization time. Refer to device
datasheet. Refer to literal
LL_ADC_DELAY_VREFINT_STAB_US. Refer to literal
LL_ADC_DELAY_TEMPSENSOR_STAB_US.
ADC internal channel sampling time constraint: For ADC
conversion of internal channels, a sampling time minimum
value is required. Refer to device datasheet.
On this STM32 serie, setting of this feature is conditioned to
ADC state: All ADC instances of the ADC common group
must be disabled. This check can be done with function
LL_ADC_IsEnabled() for each ADC instance or by using
helper macro helper macro
__LL_ADC_IS_ENABLED_ALL_COMMON_INSTANCE().
Reference Manual to CCR VREFEN LL_ADC_SetCommonPathInternalCh
LL API cross CCR TSEN LL_ADC_SetCommonPathInternalCh
reference: CCR VBATEN LL_ADC_SetCommonPathInternalCh
LL_ADC_SetClock
Function name __STATIC_INLINE void LL_ADC_SetClock (ADC_TypeDef *
ADCx, uint32_t ClockSource)
Function description Set ADC instance clock source and prescaler.
Parameters ADCx: ADC instance
ClockSource: This parameter can be one of the following
values: (1) On this STM32 serie, synchronous clock has no
prescaler.
LL_ADC_CLOCK_SYNC_PCLK_DIV4
LL_ADC_CLOCK_SYNC_PCLK_DIV2
LL_ADC_CLOCK_ASYNC (1)
Return values None
Notes On this STM32 serie, setting of this feature is conditioned to
ADC state: ADC must be disabled.
Reference Manual to CFGR2 CKMODE LL_ADC_SetClock
LL API cross
reference:
LL_ADC_SetResolution
Function name __STATIC_INLINE void LL_ADC_SetResolution
(ADC_TypeDef * ADCx, uint32_t Resolution)
Function description Set ADC resolution.
Parameters ADCx: ADC instance
Resolution: This parameter can be one of the following
values:
LL_ADC_RESOLUTION_12B
LL_ADC_RESOLUTION_10B
LL_ADC_RESOLUTION_8B
LL_ADC_RESOLUTION_6B
Return values None
Notes On this STM32 serie, setting of this feature is conditioned to
ADC state: ADC must be disabled or enabled without
conversion on going on group regular.
Reference Manual to CFGR1 RES LL_ADC_SetResolution
LL API cross
reference:
LL_ADC_GetResolution
Function name __STATIC_INLINE uint32_t LL_ADC_GetResolution
(ADC_TypeDef * ADCx)
Function description Get ADC resolution.
Parameters ADCx: ADC instance
Return values Returned: value can be one of the following values:
LL_ADC_RESOLUTION_12B
LL_ADC_RESOLUTION_10B
LL_ADC_RESOLUTION_8B
LL_ADC_RESOLUTION_6B
LL_ADC_SetDataAlignment
Function name __STATIC_INLINE void LL_ADC_SetDataAlignment
(ADC_TypeDef * ADCx, uint32_t DataAlignment)
Function description Set ADC conversion data alignment.
Parameters ADCx: ADC instance
DataAlignment: This parameter can be one of the following
values:
LL_ADC_DATA_ALIGN_RIGHT
LL_ADC_DATA_ALIGN_LEFT
Return values None
Notes Refer to reference manual for alignments formats
dependencies to ADC resolutions.
On this STM32 serie, setting of this feature is conditioned to
ADC state: ADC must be disabled or enabled without
conversion on going on group regular.
Reference Manual to CFGR1 ALIGN LL_ADC_SetDataAlignment
LL API cross
reference:
LL_ADC_GetDataAlignment
Function name __STATIC_INLINE uint32_t LL_ADC_GetDataAlignment
(ADC_TypeDef * ADCx)
Function description Get ADC conversion data alignment.
Parameters ADCx: ADC instance
Return values Returned: value can be one of the following values:
LL_ADC_DATA_ALIGN_RIGHT
LL_ADC_DATA_ALIGN_LEFT
Notes Refer to reference manual for alignments formats
dependencies to ADC resolutions.
Reference Manual to CFGR1 ALIGN LL_ADC_GetDataAlignment
LL API cross
reference:
LL_ADC_SetLowPowerMode
Function name __STATIC_INLINE void LL_ADC_SetLowPowerMode
(ADC_TypeDef * ADCx, uint32_t LowPowerMode)
Function description Set ADC low power mode.
Parameters ADCx: ADC instance
LowPowerMode: This parameter can be one of the following
values:
LL_ADC_LP_MODE_NONE
LL_ADC_GetLowPowerMode
Function name __STATIC_INLINE uint32_t LL_ADC_GetLowPowerMode
(ADC_TypeDef * ADCx)
Function description Get ADC low power mode:
Parameters ADCx: ADC instance
Return values Returned: value can be one of the following values:
LL_ADC_LP_MODE_NONE
LL_ADC_LP_AUTOWAIT
LL_ADC_LP_AUTOPOWEROFF
LL_ADC_SetSamplingTimeCommonChannels
Function name __STATIC_INLINE void
LL_ADC_SetSamplingTimeCommonChannels (ADC_TypeDef
* ADCx, uint32_t SamplingTime)
Function description Set sampling time common to a group of channels.
Parameters ADCx: ADC instance
SamplingTime: This parameter can be one of the following
values:
LL_ADC_SAMPLINGTIME_1CYCLE_5
LL_ADC_SAMPLINGTIME_7CYCLES_5
LL_ADC_SAMPLINGTIME_13CYCLES_5
LL_ADC_SAMPLINGTIME_28CYCLES_5
LL_ADC_SAMPLINGTIME_41CYCLES_5
LL_ADC_SAMPLINGTIME_55CYCLES_5
LL_ADC_SAMPLINGTIME_71CYCLES_5
LL_ADC_SAMPLINGTIME_239CYCLES_5
LL_ADC_GetSamplingTimeCommonChannels
Function name __STATIC_INLINE uint32_t
LL_ADC_GetSamplingTimeCommonChannels (ADC_TypeDef
* ADCx)
Function description Get sampling time common to a group of channels.
Parameters ADCx: ADC instance
Return values Returned: value can be one of the following values:
LL_ADC_SAMPLINGTIME_1CYCLE_5
LL_ADC_SAMPLINGTIME_7CYCLES_5
LL_ADC_SAMPLINGTIME_13CYCLES_5
LL_ADC_SAMPLINGTIME_28CYCLES_5
LL_ADC_SAMPLINGTIME_41CYCLES_5
LL_ADC_SAMPLINGTIME_55CYCLES_5
LL_ADC_SAMPLINGTIME_71CYCLES_5
LL_ADC_SAMPLINGTIME_239CYCLES_5
Notes Unit: ADC clock cycles.
On this STM32 serie, sampling time scope is on ADC
instance: Sampling time common to all channels. (on some
other STM32 families, sampling time is channel wise)
Conversion time is the addition of sampling time and
processing time. Refer to reference manual for ADC
processing time of this STM32 serie.
LL_ADC_REG_SetTriggerSource
Function name __STATIC_INLINE void LL_ADC_REG_SetTriggerSource
(ADC_TypeDef * ADCx, uint32_t TriggerSource)
Function description Set ADC group regular conversion trigger source: internal (SW
start) or from external IP (timer event, external interrupt line).
Parameters ADCx: ADC instance
TriggerSource: This parameter can be one of the following
values: (1) On STM32F0, parameter not available on all
devices
LL_ADC_REG_TRIG_SOFTWARE
LL_ADC_REG_TRIG_EXT_TIM1_TRGO
LL_ADC_REG_TRIG_EXT_TIM1_CH4
LL_ADC_REG_TRIG_EXT_TIM2_TRGO (1)
LL_ADC_REG_TRIG_EXT_TIM3_TRGO
LL_ADC_REG_TRIG_EXT_TIM15_TRGO (1)
Return values None
Notes On this STM32 serie, setting trigger source to external trigger
also set trigger polarity to rising edge (default setting for
compatibility with some ADC on other STM32 families having
this setting set by HW default value). In case of need to
modify trigger edge, use function
LL_ADC_REG_SetTriggerEdge().
Availability of parameters of trigger sources from timer
depends on timers availability on the selected device.
On this STM32 serie, setting of this feature is conditioned to
ADC state: ADC must be disabled or enabled without
conversion on going on group regular.
Reference Manual to CFGR1 EXTSEL LL_ADC_REG_SetTriggerSource
LL API cross CFGR1 EXTEN LL_ADC_REG_SetTriggerSource
reference:
LL_ADC_REG_GetTriggerSource
Function name __STATIC_INLINE uint32_t LL_ADC_REG_GetTriggerSource
(ADC_TypeDef * ADCx)
Function description Get ADC group regular conversion trigger source: internal (SW
start) or from external IP (timer event, external interrupt line).
Parameters ADCx: ADC instance
Return values Returned: value can be one of the following values: (1) On
STM32F0, parameter not available on all devices
LL_ADC_REG_TRIG_SOFTWARE
LL_ADC_REG_TRIG_EXT_TIM1_TRGO
LL_ADC_REG_TRIG_EXT_TIM1_CH4
LL_ADC_REG_TRIG_EXT_TIM2_TRGO (1)
LL_ADC_REG_TRIG_EXT_TIM3_TRGO
LL_ADC_REG_IsTriggerSourceSWStart
Function name __STATIC_INLINE uint32_t
LL_ADC_REG_IsTriggerSourceSWStart (ADC_TypeDef *
ADCx)
Function description Get ADC group regular conversion trigger source internal (SW
start) or external.
Parameters ADCx: ADC instance
Return values Value: "0" if trigger source external trigger Value "1" if trigger
source SW start.
Notes In case of group regular trigger source set to external trigger,
to determine which peripheral is selected as external trigger,
use function LL_ADC_REG_GetTriggerSource().
Reference Manual to CFGR1 EXTEN LL_ADC_REG_IsTriggerSourceSWStart
LL API cross
reference:
LL_ADC_REG_SetTriggerEdge
Function name __STATIC_INLINE void LL_ADC_REG_SetTriggerEdge
(ADC_TypeDef * ADCx, uint32_t ExternalTriggerEdge)
Function description Set ADC group regular conversion trigger polarity.
Parameters ADCx: ADC instance
ExternalTriggerEdge: This parameter can be one of the
following values:
LL_ADC_REG_TRIG_EXT_RISING
LL_ADC_REG_TRIG_EXT_FALLING
LL_ADC_REG_TRIG_EXT_RISINGFALLING
Return values None
Notes Applicable only for trigger source set to external trigger.
On this STM32 serie, setting of this feature is conditioned to
ADC state: ADC must be disabled or enabled without
conversion on going on group regular.
LL_ADC_REG_GetTriggerEdge
Function name __STATIC_INLINE uint32_t LL_ADC_REG_GetTriggerEdge
(ADC_TypeDef * ADCx)
Function description Get ADC group regular conversion trigger polarity.
Parameters ADCx: ADC instance
Return values Returned: value can be one of the following values:
LL_ADC_REG_TRIG_EXT_RISING
LL_ADC_REG_TRIG_EXT_FALLING
LL_ADC_REG_TRIG_EXT_RISINGFALLING
Notes Applicable only for trigger source set to external trigger.
Reference Manual to CFGR1 EXTEN LL_ADC_REG_GetTriggerEdge
LL API cross
reference:
LL_ADC_REG_SetSequencerScanDirection
Function name __STATIC_INLINE void
LL_ADC_REG_SetSequencerScanDirection (ADC_TypeDef *
ADCx, uint32_t ScanDirection)
Function description Set ADC group regular sequencer scan direction.
Parameters ADCx: ADC instance
ScanDirection: This parameter can be one of the following
values:
LL_ADC_REG_SEQ_SCAN_DIR_FORWARD
LL_ADC_REG_SEQ_SCAN_DIR_BACKWARD
Return values None
Notes On some other STM32 families, this setting is not available
and the default scan direction is forward.
On this STM32 serie, setting of this feature is conditioned to
ADC state: ADC must be disabled or enabled without
conversion on going on group regular.
Reference Manual to CFGR1 SCANDIR
LL API cross LL_ADC_REG_SetSequencerScanDirection
reference:
LL_ADC_REG_GetSequencerScanDirection
Function name __STATIC_INLINE uint32_t
LL_ADC_REG_GetSequencerScanDirection (ADC_TypeDef *
ADCx)
Function description Get ADC group regular sequencer scan direction.
LL_ADC_REG_SetSequencerDiscont
Function name __STATIC_INLINE void LL_ADC_REG_SetSequencerDiscont
(ADC_TypeDef * ADCx, uint32_t SeqDiscont)
Function description Set ADC group regular sequencer discontinuous mode: sequence
subdivided and scan conversions interrupted every selected
number of ranks.
Parameters ADCx: ADC instance
SeqDiscont: This parameter can be one of the following
values:
LL_ADC_REG_SEQ_DISCONT_DISABLE
LL_ADC_REG_SEQ_DISCONT_1RANK
Return values None
Notes It is not possible to enable both ADC group regular
continuous mode and sequencer discontinuous mode.
On this STM32 serie, setting of this feature is conditioned to
ADC state: ADC must be disabled or enabled without
conversion on going on group regular.
Reference Manual to CFGR1 DISCEN LL_ADC_REG_SetSequencerDiscont
LL API cross
reference:
LL_ADC_REG_GetSequencerDiscont
Function name __STATIC_INLINE uint32_t
LL_ADC_REG_GetSequencerDiscont (ADC_TypeDef * ADCx)
Function description Get ADC group regular sequencer discontinuous mode: sequence
subdivided and scan conversions interrupted every selected
number of ranks.
Parameters ADCx: ADC instance
Return values Returned: value can be one of the following values:
LL_ADC_REG_SEQ_DISCONT_DISABLE
LL_ADC_REG_SEQ_DISCONT_1RANK
Reference Manual to CFGR1 DISCEN LL_ADC_REG_GetSequencerDiscont
LL API cross
reference:
LL_ADC_REG_SetSequencerChAdd
Function name __STATIC_INLINE void LL_ADC_REG_SetSequencerChAdd
(ADC_TypeDef * ADCx, uint32_t Channel)
Function description Add channel to ADC group regular sequence: channel on rank
corresponding to channel number.
Parameters ADCx: ADC instance
Channel: This parameter can be a combination of the
following values: (1) On STM32F0, parameter not available
on all devices: all devices except STM32F030x6,
STM32F030x8, STM32F030xC, STM32F070x6,
STM32F070xB.
LL_ADC_CHANNEL_0
LL_ADC_CHANNEL_1
LL_ADC_CHANNEL_2
LL_ADC_CHANNEL_3
LL_ADC_CHANNEL_4
LL_ADC_CHANNEL_5
LL_ADC_CHANNEL_6
LL_ADC_CHANNEL_7
LL_ADC_CHANNEL_8
LL_ADC_CHANNEL_9
LL_ADC_CHANNEL_10
LL_ADC_CHANNEL_11
LL_ADC_CHANNEL_12
LL_ADC_CHANNEL_13
LL_ADC_CHANNEL_14
LL_ADC_CHANNEL_15
LL_ADC_REG_GetSequencerChannels
Function name __STATIC_INLINE uint32_t
LL_ADC_REG_GetSequencerChannels (ADC_TypeDef *
ADCx)
Function description Get ADC group regular sequence: channel on rank corresponding
to channel number.
Parameters ADCx: ADC instance
Return values Returned: value can be a combination of the following
values: (1) On STM32F0, parameter not available on all
devices: all devices except STM32F030x6, STM32F030x8,
STM32F030xC, STM32F070x6, STM32F070xB.
LL_ADC_CHANNEL_0
LL_ADC_CHANNEL_1
LL_ADC_CHANNEL_2
LL_ADC_CHANNEL_3
LL_ADC_CHANNEL_4
LL_ADC_CHANNEL_5
LL_ADC_CHANNEL_6
LL_ADC_CHANNEL_7
LL_ADC_CHANNEL_8
LL_ADC_CHANNEL_9
LL_ADC_CHANNEL_10
LL_ADC_CHANNEL_11
LL_ADC_CHANNEL_12
LL_ADC_CHANNEL_13
LL_ADC_CHANNEL_14
LL_ADC_CHANNEL_15
LL_ADC_REG_SetContinuousMode
Function name __STATIC_INLINE void LL_ADC_REG_SetContinuousMode
(ADC_TypeDef * ADCx, uint32_t Continuous)
Function description Set ADC continuous conversion mode on ADC group regular.
Parameters ADCx: ADC instance
LL_ADC_REG_GetContinuousMode
Function name __STATIC_INLINE uint32_t
LL_ADC_REG_GetContinuousMode (ADC_TypeDef * ADCx)
Function description Get ADC continuous conversion mode on ADC group regular.
Parameters ADCx: ADC instance
Return values Returned: value can be one of the following values:
LL_ADC_REG_CONV_SINGLE
LL_ADC_REG_CONV_CONTINUOUS
Notes Description of ADC continuous conversion mode: single
mode: one conversion per triggercontinuous mode: after the
first trigger, following conversions launched successively
automatically.
Reference Manual to CFGR1 CONT LL_ADC_REG_GetContinuousMode
LL API cross
reference:
LL_ADC_REG_SetDMATransfer
Function name __STATIC_INLINE void LL_ADC_REG_SetDMATransfer
(ADC_TypeDef * ADCx, uint32_t DMATransfer)
Function description Set ADC group regular conversion data transfer: no transfer or
transfer by DMA, and DMA requests mode.
Parameters ADCx: ADC instance
DMATransfer: This parameter can be one of the following
values:
LL_ADC_REG_DMA_TRANSFER_NONE
LL_ADC_REG_DMA_TRANSFER_LIMITED
LL_ADC_REG_DMA_TRANSFER_UNLIMITED
Return values None
LL_ADC_REG_GetDMATransfer
Function name __STATIC_INLINE uint32_t LL_ADC_REG_GetDMATransfer
(ADC_TypeDef * ADCx)
Function description Get ADC group regular conversion data transfer: no transfer or
transfer by DMA, and DMA requests mode.
Parameters ADCx: ADC instance
Return values Returned: value can be one of the following values:
LL_ADC_REG_DMA_TRANSFER_NONE
LL_ADC_REG_DMA_TRANSFER_LIMITED
LL_ADC_REG_DMA_TRANSFER_UNLIMITED
Notes If transfer by DMA selected, specifies the DMA requests
mode: Limited mode (One shot mode): DMA transfer requests
are stopped when number of DMA data transfers (number of
ADC conversions) is reached. This ADC mode is intended to
be used with DMA mode non-circular.Unlimited mode: DMA
transfer requests are unlimited, whatever number of DMA
data transfers (number of ADC conversions). This ADC mode
is intended to be used with DMA mode circular.
If ADC DMA requests mode is set to unlimited and DMA is set
to mode non-circular: when DMA transfers size will be
reached, DMA will stop transfers of ADC conversions data
ADC will raise an overrun error (overrun flag and interruption
if enabled).
To configure DMA source address (peripheral address), use
function LL_ADC_DMA_GetRegAddr().
Reference Manual to CFGR1 DMAEN LL_ADC_REG_GetDMATransfer
LL API cross CFGR1 DMACFG LL_ADC_REG_GetDMATransfer
reference:
LL_ADC_REG_GetOverrun
Function name __STATIC_INLINE uint32_t LL_ADC_REG_GetOverrun
(ADC_TypeDef * ADCx)
Function description Get ADC group regular behavior in case of overrun: data
preserved or overwritten.
Parameters ADCx: ADC instance
Return values Returned: value can be one of the following values:
LL_ADC_REG_OVR_DATA_PRESERVED
LL_ADC_REG_OVR_DATA_OVERWRITTEN
Reference Manual to CFGR1 OVRMOD LL_ADC_REG_GetOverrun
LL API cross
reference:
LL_ADC_SetAnalogWDMonitChannels
Function name __STATIC_INLINE void LL_ADC_SetAnalogWDMonitChannels
(ADC_TypeDef * ADCx, uint32_t AWDChannelGroup)
Function description Set ADC analog watchdog monitored channels: a single channel
or all channels, on ADC group regular.
Parameters ADCx: ADC instance
AWDChannelGroup: This parameter can be one of the
following values: (1) On STM32F0, parameter not available
on all devices: all devices except STM32F030x6,
STM32F030x8, STM32F030xC, STM32F070x6,
STM32F070xB.
LL_ADC_GetAnalogWDMonitChannels
Function name __STATIC_INLINE uint32_t
LL_ADC_GetAnalogWDMonitChannels (ADC_TypeDef *
ADCx)
Function description Get ADC analog watchdog monitored channel.
Parameters ADCx: ADC instance
LL_ADC_ConfigAnalogWDThresholds
Function name __STATIC_INLINE void LL_ADC_ConfigAnalogWDThresholds
(ADC_TypeDef * ADCx, uint32_t AWDThresholdHighValue,
uint32_t AWDThresholdLowValue)
Function description Set ADC analog watchdog thresholds value of both thresholds
LL_ADC_SetAnalogWDThresholds
Function name __STATIC_INLINE void LL_ADC_SetAnalogWDThresholds
(ADC_TypeDef * ADCx, uint32_t AWDThresholdsHighLow,
uint32_t AWDThresholdValue)
Function description Set ADC analog watchdog threshold value of threshold high or
low.
Parameters ADCx: ADC instance
AWDThresholdsHighLow: This parameter can be one of
the following values:
LL_ADC_AWD_THRESHOLD_HIGH
LL_ADC_AWD_THRESHOLD_LOW
AWDThresholdValue: Value between Min_Data=0x000 and
Max_Data=0xFFF
Return values None
Notes If values of both thresholds high or low must be set, use
function LL_ADC_ConfigAnalogWDThresholds().
In case of ADC resolution different of 12 bits, analog
watchdog thresholds data require a specific shift. Use helper
macro
__LL_ADC_ANALOGWD_SET_THRESHOLD_RESOLUTIO
N().
On this STM32 serie, there is only 1 kind of analog watchdog
instance: AWD standard (instance AWD1): channels
LL_ADC_GetAnalogWDThresholds
Function name __STATIC_INLINE uint32_t LL_ADC_GetAnalogWDThresholds
(ADC_TypeDef * ADCx, uint32_t AWDThresholdsHighLow)
Function description Get ADC analog watchdog threshold value of threshold high,
threshold low or raw data with ADC thresholds high and low
concatenated.
Parameters ADCx: ADC instance
AWDThresholdsHighLow: This parameter can be one of
the following values:
LL_ADC_AWD_THRESHOLD_HIGH
LL_ADC_AWD_THRESHOLD_LOW
LL_ADC_AWD_THRESHOLDS_HIGH_LOW
Return values Value: between Min_Data=0x000 and Max_Data=0xFFF
Notes If raw data with ADC thresholds high and low is retrieved, the
data of each threshold high or low can be isolated using
helper macro:
__LL_ADC_ANALOGWD_THRESHOLDS_HIGH_LOW().
In case of ADC resolution different of 12 bits, analog
watchdog thresholds data require a specific shift. Use helper
macro
__LL_ADC_ANALOGWD_GET_THRESHOLD_RESOLUTIO
N().
Reference Manual to TR1 HT1 LL_ADC_GetAnalogWDThresholds
LL API cross TR2 HT2 LL_ADC_GetAnalogWDThresholds
reference: TR3 HT3 LL_ADC_GetAnalogWDThresholds
TR1 LT1 LL_ADC_GetAnalogWDThresholds
TR2 LT2 LL_ADC_GetAnalogWDThresholds
TR3 LT3 LL_ADC_GetAnalogWDThresholds
LL_ADC_Enable
Function name __STATIC_INLINE void LL_ADC_Enable (ADC_TypeDef *
ADCx)
Function description Enable the selected ADC instance.
Parameters ADCx: ADC instance
Return values None
Notes On this STM32 serie, after ADC enable, a delay for ADC
internal analog stabilization is required before performing a
LL_ADC_Disable
Function name __STATIC_INLINE void LL_ADC_Disable (ADC_TypeDef *
ADCx)
Function description Disable the selected ADC instance.
Parameters ADCx: ADC instance
Return values None
Notes On this STM32 serie, setting of this feature is conditioned to
ADC state: ADC must be not disabled. Must be enabled
without conversion on going on group regular.
Reference Manual to CR ADDIS LL_ADC_Disable
LL API cross
reference:
LL_ADC_IsEnabled
Function name __STATIC_INLINE uint32_t LL_ADC_IsEnabled (ADC_TypeDef
* ADCx)
Function description Get the selected ADC instance enable state.
Parameters ADCx: ADC instance
Return values 0: ADC is disabled, 1: ADC is enabled.
Notes On this STM32 serie, flag LL_ADC_FLAG_ADRDY is raised
when the ADC is enabled and when conversion clock is
active. (not only core clock: this ADC has a dual clock
domain)
Reference Manual to CR ADEN LL_ADC_IsEnabled
LL API cross
reference:
LL_ADC_IsDisableOngoing
Function name __STATIC_INLINE uint32_t LL_ADC_IsDisableOngoing
(ADC_TypeDef * ADCx)
Function description Get the selected ADC instance disable state.
LL_ADC_StartCalibration
Function name __STATIC_INLINE void LL_ADC_StartCalibration
(ADC_TypeDef * ADCx)
Function description Start ADC calibration in the mode single-ended or differential (for
devices with differential mode available).
Parameters ADCx: ADC instance
Return values None
Notes On this STM32 serie, a minimum number of ADC clock cycles
are required between ADC end of calibration and ADC
enable. Refer to literal
LL_ADC_DELAY_CALIB_ENABLE_ADC_CYCLES.
In case of usage of ADC with DMA transfer: On this STM32
serie, ADC DMA transfer request should be disabled during
calibration: Calibration factor is available in data register and
also transfered by DMA. To not insert ADC calibration factor
among ADC conversion data in array variable, DMA transfer
must be disabled during calibration. (DMA transfer setting
backup and disable before calibration, DMA transfer setting
restore after calibration. Refer to functions
LL_ADC_REG_GetDMATransfer(),
LL_ADC_REG_SetDMATransfer() ).
On this STM32 serie, setting of this feature is conditioned to
ADC state: ADC must be ADC disabled.
Reference Manual to CR ADCAL LL_ADC_StartCalibration
LL API cross
reference:
LL_ADC_IsCalibrationOnGoing
Function name __STATIC_INLINE uint32_t LL_ADC_IsCalibrationOnGoing
(ADC_TypeDef * ADCx)
Function description Get ADC calibration state.
Parameters ADCx: ADC instance
Return values 0: calibration complete, 1: calibration in progress.
Reference Manual to CR ADCAL LL_ADC_IsCalibrationOnGoing
LL API cross
reference:
LL_ADC_REG_StopConversion
Function name __STATIC_INLINE void LL_ADC_REG_StopConversion
(ADC_TypeDef * ADCx)
Function description Stop ADC group regular conversion.
Parameters ADCx: ADC instance
Return values None
Notes On this STM32 serie, setting of this feature is conditioned to
ADC state: ADC must be enabled with conversion on going
on group regular, without ADC disable command on going.
Reference Manual to CR ADSTP LL_ADC_REG_StopConversion
LL API cross
reference:
LL_ADC_REG_IsConversionOngoing
Function name __STATIC_INLINE uint32_t
LL_ADC_REG_IsConversionOngoing (ADC_TypeDef * ADCx)
Function description Get ADC group regular conversion state.
Parameters ADCx: ADC instance
Return values 0: no conversion is on going on ADC group regular.
Reference Manual to CR ADSTART LL_ADC_REG_IsConversionOngoing
LL API cross
reference:
LL_ADC_REG_ReadConversionData32
Function name __STATIC_INLINE uint32_t
LL_ADC_REG_ReadConversionData32 (ADC_TypeDef *
ADCx)
Function description Get ADC group regular conversion data, range fit for all ADC
configurations: all ADC resolutions and all oversampling increased
data width (for devices with feature oversampling).
Parameters ADCx: ADC instance
Return values Value: between Min_Data=0x00000000 and
Max_Data=0xFFFFFFFF
Reference Manual to DR DATA LL_ADC_REG_ReadConversionData32
LL API cross
reference:
LL_ADC_REG_ReadConversionData12
Function name __STATIC_INLINE uint16_t
LL_ADC_REG_ReadConversionData12 (ADC_TypeDef *
ADCx)
Function description Get ADC group regular conversion data, range fit for ADC
resolution 12 bits.
Parameters ADCx: ADC instance
Return values Value: between Min_Data=0x000 and Max_Data=0xFFF
Notes For devices with feature oversampling: Oversampling can
increase data width, function for extended range may be
needed: LL_ADC_REG_ReadConversionData32.
Reference Manual to DR DATA LL_ADC_REG_ReadConversionData12
LL API cross
reference:
LL_ADC_REG_ReadConversionData8
Function name __STATIC_INLINE uint8_t
LL_ADC_REG_ReadConversionData8 (ADC_TypeDef * ADCx)
Function description Get ADC group regular conversion data, range fit for ADC
resolution 8 bits.
Parameters ADCx: ADC instance
Return values Value: between Min_Data=0x00 and Max_Data=0xFF
Notes For devices with feature oversampling: Oversampling can
increase data width, function for extended range may be
needed: LL_ADC_REG_ReadConversionData32.
Reference Manual to DR DATA LL_ADC_REG_ReadConversionData8
LL API cross
reference:
LL_ADC_REG_ReadConversionData6
Function name __STATIC_INLINE uint8_t
LL_ADC_REG_ReadConversionData6 (ADC_TypeDef * ADCx)
Function description Get ADC group regular conversion data, range fit for ADC
resolution 6 bits.
Parameters ADCx: ADC instance
Return values Value: between Min_Data=0x00 and Max_Data=0x3F
Notes For devices with feature oversampling: Oversampling can
increase data width, function for extended range may be
needed: LL_ADC_REG_ReadConversionData32.
Reference Manual to DR DATA LL_ADC_REG_ReadConversionData6
LL API cross
reference:
LL_ADC_IsActiveFlag_EOC
Function name __STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_EOC
(ADC_TypeDef * ADCx)
Function description Get flag ADC group regular end of unitary conversion.
Parameters ADCx: ADC instance
Return values State: of bit (1 or 0).
Reference Manual to ISR EOC LL_ADC_IsActiveFlag_EOC
LL API cross
reference:
LL_ADC_IsActiveFlag_EOS
Function name __STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_EOS
(ADC_TypeDef * ADCx)
Function description Get flag ADC group regular end of sequence conversions.
Parameters ADCx: ADC instance
Return values State: of bit (1 or 0).
Reference Manual to ISR EOSEQ LL_ADC_IsActiveFlag_EOS
LL API cross
reference:
LL_ADC_IsActiveFlag_OVR
Function name __STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_OVR
(ADC_TypeDef * ADCx)
Function description Get flag ADC group regular overrun.
Parameters ADCx: ADC instance
Return values State: of bit (1 or 0).
LL_ADC_IsActiveFlag_EOSMP
Function name __STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_EOSMP
(ADC_TypeDef * ADCx)
Function description Get flag ADC group regular end of sampling phase.
Parameters ADCx: ADC instance
Return values State: of bit (1 or 0).
Reference Manual to ISR EOSMP LL_ADC_IsActiveFlag_EOSMP
LL API cross
reference:
LL_ADC_IsActiveFlag_AWD1
Function name __STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_AWD1
(ADC_TypeDef * ADCx)
Function description Get flag ADC analog watchdog 1 flag.
Parameters ADCx: ADC instance
Return values State: of bit (1 or 0).
Reference Manual to ISR AWD LL_ADC_IsActiveFlag_AWD1
LL API cross
reference:
LL_ADC_ClearFlag_ADRDY
Function name __STATIC_INLINE void LL_ADC_ClearFlag_ADRDY
(ADC_TypeDef * ADCx)
Function description Clear flag ADC ready.
Parameters ADCx: ADC instance
Return values None
Notes On this STM32 serie, flag LL_ADC_FLAG_ADRDY is raised
when the ADC is enabled and when conversion clock is
active. (not only core clock: this ADC has a dual clock
domain)
Reference Manual to ISR ADRDY LL_ADC_ClearFlag_ADRDY
LL API cross
reference:
LL_ADC_ClearFlag_EOC
Function name __STATIC_INLINE void LL_ADC_ClearFlag_EOC
(ADC_TypeDef * ADCx)
Function description Clear flag ADC group regular end of unitary conversion.
LL_ADC_ClearFlag_EOS
Function name __STATIC_INLINE void LL_ADC_ClearFlag_EOS
(ADC_TypeDef * ADCx)
Function description Clear flag ADC group regular end of sequence conversions.
Parameters ADCx: ADC instance
Return values None
Reference Manual to ISR EOSEQ LL_ADC_ClearFlag_EOS
LL API cross
reference:
LL_ADC_ClearFlag_OVR
Function name __STATIC_INLINE void LL_ADC_ClearFlag_OVR
(ADC_TypeDef * ADCx)
Function description Clear flag ADC group regular overrun.
Parameters ADCx: ADC instance
Return values None
Reference Manual to ISR OVR LL_ADC_ClearFlag_OVR
LL API cross
reference:
LL_ADC_ClearFlag_EOSMP
Function name __STATIC_INLINE void LL_ADC_ClearFlag_EOSMP
(ADC_TypeDef * ADCx)
Function description Clear flag ADC group regular end of sampling phase.
Parameters ADCx: ADC instance
Return values None
Reference Manual to ISR EOSMP LL_ADC_ClearFlag_EOSMP
LL API cross
reference:
LL_ADC_ClearFlag_AWD1
Function name __STATIC_INLINE void LL_ADC_ClearFlag_AWD1
(ADC_TypeDef * ADCx)
Function description Clear flag ADC analog watchdog 1.
Parameters ADCx: ADC instance
LL_ADC_EnableIT_ADRDY
Function name __STATIC_INLINE void LL_ADC_EnableIT_ADRDY
(ADC_TypeDef * ADCx)
Function description Enable ADC ready.
Parameters ADCx: ADC instance
Return values None
Reference Manual to IER ADRDYIE LL_ADC_EnableIT_ADRDY
LL API cross
reference:
LL_ADC_EnableIT_EOC
Function name __STATIC_INLINE void LL_ADC_EnableIT_EOC
(ADC_TypeDef * ADCx)
Function description Enable interruption ADC group regular end of unitary conversion.
Parameters ADCx: ADC instance
Return values None
Reference Manual to IER EOCIE LL_ADC_EnableIT_EOC
LL API cross
reference:
LL_ADC_EnableIT_EOS
Function name __STATIC_INLINE void LL_ADC_EnableIT_EOS
(ADC_TypeDef * ADCx)
Function description Enable interruption ADC group regular end of sequence
conversions.
Parameters ADCx: ADC instance
Return values None
Reference Manual to IER EOSEQIE LL_ADC_EnableIT_EOS
LL API cross
reference:
LL_ADC_EnableIT_OVR
Function name __STATIC_INLINE void LL_ADC_EnableIT_OVR
(ADC_TypeDef * ADCx)
Function description Enable ADC group regular interruption overrun.
Parameters ADCx: ADC instance
LL_ADC_EnableIT_EOSMP
Function name __STATIC_INLINE void LL_ADC_EnableIT_EOSMP
(ADC_TypeDef * ADCx)
Function description Enable interruption ADC group regular end of sampling.
Parameters ADCx: ADC instance
Return values None
Reference Manual to IER EOSMPIE LL_ADC_EnableIT_EOSMP
LL API cross
reference:
LL_ADC_EnableIT_AWD1
Function name __STATIC_INLINE void LL_ADC_EnableIT_AWD1
(ADC_TypeDef * ADCx)
Function description Enable interruption ADC analog watchdog 1.
Parameters ADCx: ADC instance
Return values None
Reference Manual to IER AWDIE LL_ADC_EnableIT_AWD1
LL API cross
reference:
LL_ADC_DisableIT_ADRDY
Function name __STATIC_INLINE void LL_ADC_DisableIT_ADRDY
(ADC_TypeDef * ADCx)
Function description Disable interruption ADC ready.
Parameters ADCx: ADC instance
Return values None
Reference Manual to IER ADRDYIE LL_ADC_DisableIT_ADRDY
LL API cross
reference:
LL_ADC_DisableIT_EOC
Function name __STATIC_INLINE void LL_ADC_DisableIT_EOC
(ADC_TypeDef * ADCx)
Function description Disable interruption ADC group regular end of unitary conversion.
Parameters ADCx: ADC instance
Return values None
LL_ADC_DisableIT_EOS
Function name __STATIC_INLINE void LL_ADC_DisableIT_EOS
(ADC_TypeDef * ADCx)
Function description Disable interruption ADC group regular end of sequence
conversions.
Parameters ADCx: ADC instance
Return values None
Reference Manual to IER EOSEQIE LL_ADC_DisableIT_EOS
LL API cross
reference:
LL_ADC_DisableIT_OVR
Function name __STATIC_INLINE void LL_ADC_DisableIT_OVR
(ADC_TypeDef * ADCx)
Function description Disable interruption ADC group regular overrun.
Parameters ADCx: ADC instance
Return values None
Reference Manual to IER OVRIE LL_ADC_DisableIT_OVR
LL API cross
reference:
LL_ADC_DisableIT_EOSMP
Function name __STATIC_INLINE void LL_ADC_DisableIT_EOSMP
(ADC_TypeDef * ADCx)
Function description Disable interruption ADC group regular end of sampling.
Parameters ADCx: ADC instance
Return values None
Reference Manual to IER EOSMPIE LL_ADC_DisableIT_EOSMP
LL API cross
reference:
LL_ADC_DisableIT_AWD1
Function name __STATIC_INLINE void LL_ADC_DisableIT_AWD1
(ADC_TypeDef * ADCx)
Function description Disable interruption ADC analog watchdog 1.
Parameters ADCx: ADC instance
Return values None
LL_ADC_IsEnabledIT_ADRDY
Function name __STATIC_INLINE uint32_t LL_ADC_IsEnabledIT_ADRDY
(ADC_TypeDef * ADCx)
Function description Get state of interruption ADC ready (0: interrupt disabled, 1:
interrupt enabled).
Parameters ADCx: ADC instance
Return values State: of bit (1 or 0).
Reference Manual to IER ADRDYIE LL_ADC_IsEnabledIT_ADRDY
LL API cross
reference:
LL_ADC_IsEnabledIT_EOC
Function name __STATIC_INLINE uint32_t LL_ADC_IsEnabledIT_EOC
(ADC_TypeDef * ADCx)
Function description Get state of interruption ADC group regular end of unitary
conversion (0: interrupt disabled, 1: interrupt enabled).
Parameters ADCx: ADC instance
Return values State: of bit (1 or 0).
Reference Manual to IER EOCIE LL_ADC_IsEnabledIT_EOC
LL API cross
reference:
LL_ADC_IsEnabledIT_EOS
Function name __STATIC_INLINE uint32_t LL_ADC_IsEnabledIT_EOS
(ADC_TypeDef * ADCx)
Function description Get state of interruption ADC group regular end of sequence
conversions (0: interrupt disabled, 1: interrupt enabled).
Parameters ADCx: ADC instance
Return values State: of bit (1 or 0).
Reference Manual to IER EOSEQIE LL_ADC_IsEnabledIT_EOS
LL API cross
reference:
LL_ADC_IsEnabledIT_OVR
Function name __STATIC_INLINE uint32_t LL_ADC_IsEnabledIT_OVR
(ADC_TypeDef * ADCx)
Function description Get state of interruption ADC group regular overrun (0: interrupt
disabled, 1: interrupt enabled).
Parameters ADCx: ADC instance
LL_ADC_IsEnabledIT_EOSMP
Function name __STATIC_INLINE uint32_t LL_ADC_IsEnabledIT_EOSMP
(ADC_TypeDef * ADCx)
Function description Get state of interruption ADC group regular end of sampling (0:
interrupt disabled, 1: interrupt enabled).
Parameters ADCx: ADC instance
Return values State: of bit (1 or 0).
Reference Manual to IER EOSMPIE LL_ADC_IsEnabledIT_EOSMP
LL API cross
reference:
LL_ADC_IsEnabledIT_AWD1
Function name __STATIC_INLINE uint32_t LL_ADC_IsEnabledIT_AWD1
(ADC_TypeDef * ADCx)
Function description Get state of interruption ADC analog watchdog 1 (0: interrupt
disabled, 1: interrupt enabled).
Parameters ADCx: ADC instance
Return values State: of bit (1 or 0).
Reference Manual to IER AWDIE LL_ADC_IsEnabledIT_AWD1
LL API cross
reference:
LL_ADC_CommonDeInit
Function name ErrorStatus LL_ADC_CommonDeInit (ADC_Common_TypeDef
* ADCxy_COMMON)
Function description De-initialize registers of all ADC instances belonging to the same
ADC common instance to their default reset values.
Parameters ADCxy_COMMON: ADC common instance (can be set
directly from CMSIS definition or by using helper macro
__LL_ADC_COMMON_INSTANCE() )
Return values An: ErrorStatus enumeration value:
SUCCESS: ADC common registers are de-initialized
ERROR: not applicable
Notes This function is performing a hard reset, using high level clock
source RCC ADC reset.
LL_ADC_Init
Function name ErrorStatus LL_ADC_Init (ADC_TypeDef * ADCx,
LL_ADC_InitTypeDef * ADC_InitStruct)
Function description Initialize some features of ADC instance.
Parameters ADCx: ADC instance
ADC_InitStruct: Pointer to a LL_ADC_REG_InitTypeDef
structure
Return values An: ErrorStatus enumeration value:
SUCCESS: ADC registers are initialized
ERROR: ADC registers are not initialized
Notes These parameters have an impact on ADC scope: ADC
instance. Refer to corresponding unitary functions into
Configuration of ADC hierarchical scope: ADC instance .
The setting of these parameters by function LL_ADC_Init() is
conditioned to ADC state: ADC instance must be disabled.
This condition is applied to all ADC features, for efficiency and
compatibility over all STM32 families. However, the different
features can be set under different ADC state conditions
(setting possible with ADC enabled without conversion on
going, ADC enabled with conversion on going, ...) Each
feature can be updated afterwards with a unitary function and
potentially with ADC in a different state than disabled, refer to
description of each function for setting conditioned to ADC
state.
After using this function, some other features must be
configured using LL unitary functions. The minimum
configuration remaining to be done is: Set ADC group regular
sequencer: map channel on rank corresponding to channel
number. Refer to function
LL_ADC_REG_SetSequencerChannels();Set ADC channel
sampling time Refer to function
LL_ADC_SetChannelSamplingTime();
LL_ADC_REG_Init
Function name ErrorStatus LL_ADC_REG_Init (ADC_TypeDef * ADCx,
LL_ADC_REG_InitTypeDef * ADC_REG_InitStruct)
Function description Initialize some features of ADC group regular.
Parameters ADCx: ADC instance
ADC_REG_InitStruct: Pointer to a
LL_ADC_REG_InitTypeDef structure
Return values An: ErrorStatus enumeration value:
SUCCESS: ADC registers are initialized
ERROR: ADC registers are not initialized
Notes These parameters have an impact on ADC scope: ADC group
regular. Refer to corresponding unitary functions into
Configuration of ADC hierarchical scope: group regular
(functions with prefix "REG").
The setting of these parameters by function LL_ADC_Init() is
conditioned to ADC state: ADC instance must be disabled.
This condition is applied to all ADC features, for efficiency and
compatibility over all STM32 families. However, the different
features can be set under different ADC state conditions
(setting possible with ADC enabled without conversion on
going, ADC enabled with conversion on going, ...) Each
feature can be updated afterwards with a unitary function and
potentially with ADC in a different state than disabled, refer to
description of each function for setting conditioned to ADC
state.
After using this function, other features must be configured
using LL unitary functions. The minimum configuration
remaining to be done is: Set ADC group regular sequencer:
map channel on rank corresponding to channel number.
Refer to function
LL_ADC_REG_SetSequencerChannels();Set ADC channel
sampling time Refer to function
LL_ADC_SetChannelSamplingTime();
LL_ADC_REG_StructInit
Function name void LL_ADC_REG_StructInit (LL_ADC_REG_InitTypeDef *
ADC_REG_InitStruct)
Function description Set each LL_ADC_REG_InitTypeDef field to default value.
Parameters ADC_REG_InitStruct: Pointer to a
LL_AHB1_GRP1_EnableClock
Function name __STATIC_INLINE void LL_AHB1_GRP1_EnableClock
(uint32_t Periphs)
Function description Enable AHB1 peripherals clock.
Parameters Periphs: This parameter can be a combination of the
following values: (*) value not defined in all devices.
LL_AHB1_GRP1_PERIPH_DMA1
LL_AHB1_GRP1_PERIPH_DMA2 (*)
LL_AHB1_GRP1_PERIPH_SRAM
LL_AHB1_GRP1_PERIPH_FLASH
LL_AHB1_GRP1_PERIPH_CRC
LL_AHB1_GRP1_PERIPH_GPIOA
LL_AHB1_GRP1_PERIPH_GPIOB
LL_AHB1_GRP1_PERIPH_GPIOC
LL_AHB1_GRP1_PERIPH_GPIOD (*)
LL_AHB1_GRP1_PERIPH_GPIOE (*)
LL_AHB1_GRP1_PERIPH_GPIOF
LL_AHB1_GRP1_PERIPH_TSC (*)
Return values None
Reference Manual to AHBENR DMA1EN LL_AHB1_GRP1_EnableClock
LL API cross AHBENR DMA2EN LL_AHB1_GRP1_EnableClock
reference: AHBENR SRAMEN LL_AHB1_GRP1_EnableClock
AHBENR FLITFEN LL_AHB1_GRP1_EnableClock
AHBENR CRCEN LL_AHB1_GRP1_EnableClock
AHBENR GPIOAEN LL_AHB1_GRP1_EnableClock
AHBENR GPIOBEN LL_AHB1_GRP1_EnableClock
AHBENR GPIOCEN LL_AHB1_GRP1_EnableClock
AHBENR GPIODEN LL_AHB1_GRP1_EnableClock
AHBENR GPIOEEN LL_AHB1_GRP1_EnableClock
AHBENR GPIOFEN LL_AHB1_GRP1_EnableClock
AHBENR TSCEN LL_AHB1_GRP1_EnableClock
LL_AHB1_GRP1_IsEnabledClock
Function name __STATIC_INLINE uint32_t LL_AHB1_GRP1_IsEnabledClock
(uint32_t Periphs)
Function description Check if AHB1 peripheral clock is enabled or not.
Parameters Periphs: This parameter can be a combination of the
following values: (*) value not defined in all devices.
LL_AHB1_GRP1_PERIPH_DMA1
LL_AHB1_GRP1_PERIPH_DMA2 (*)
LL_AHB1_GRP1_DisableClock
Function name __STATIC_INLINE void LL_AHB1_GRP1_DisableClock
(uint32_t Periphs)
Function description Disable AHB1 peripherals clock.
Parameters Periphs: This parameter can be a combination of the
following values: (*) value not defined in all devices.
LL_AHB1_GRP1_PERIPH_DMA1
LL_AHB1_GRP1_PERIPH_DMA2 (*)
LL_AHB1_GRP1_PERIPH_SRAM
LL_AHB1_GRP1_PERIPH_FLASH
LL_AHB1_GRP1_PERIPH_CRC
LL_AHB1_GRP1_PERIPH_GPIOA
LL_AHB1_GRP1_PERIPH_GPIOB
LL_AHB1_GRP1_PERIPH_GPIOC
LL_AHB1_GRP1_PERIPH_GPIOD (*)
LL_AHB1_GRP1_PERIPH_GPIOE (*)
LL_AHB1_GRP1_PERIPH_GPIOF
LL_AHB1_GRP1_PERIPH_TSC (*)
Return values None
Reference Manual to AHBENR DMA1EN LL_AHB1_GRP1_DisableClock
LL API cross AHBENR DMA2EN LL_AHB1_GRP1_DisableClock
reference: AHBENR SRAMEN LL_AHB1_GRP1_DisableClock
AHBENR FLITFEN LL_AHB1_GRP1_DisableClock
AHBENR CRCEN LL_AHB1_GRP1_DisableClock
AHBENR GPIOAEN LL_AHB1_GRP1_DisableClock
LL_AHB1_GRP1_ForceReset
Function name __STATIC_INLINE void LL_AHB1_GRP1_ForceReset (uint32_t
Periphs)
Function description Force AHB1 peripherals reset.
Parameters Periphs: This parameter can be a combination of the
following values: (*) value not defined in all devices.
LL_AHB1_GRP1_PERIPH_ALL
LL_AHB1_GRP1_PERIPH_GPIOA
LL_AHB1_GRP1_PERIPH_GPIOB
LL_AHB1_GRP1_PERIPH_GPIOC
LL_AHB1_GRP1_PERIPH_GPIOD (*)
LL_AHB1_GRP1_PERIPH_GPIOE (*)
LL_AHB1_GRP1_PERIPH_GPIOF
LL_AHB1_GRP1_PERIPH_TSC (*)
Return values None
Reference Manual to AHBRSTR GPIOARST LL_AHB1_GRP1_ForceReset
LL API cross AHBRSTR GPIOBRST LL_AHB1_GRP1_ForceReset
reference: AHBRSTR GPIOCRST LL_AHB1_GRP1_ForceReset
AHBRSTR GPIODRST LL_AHB1_GRP1_ForceReset
AHBRSTR GPIOERST LL_AHB1_GRP1_ForceReset
AHBRSTR GPIOFRST LL_AHB1_GRP1_ForceReset
AHBRSTR TSCRST LL_AHB1_GRP1_ForceReset
LL_AHB1_GRP1_ReleaseReset
Function name __STATIC_INLINE void LL_AHB1_GRP1_ReleaseReset
(uint32_t Periphs)
Function description Release AHB1 peripherals reset.
Parameters Periphs: This parameter can be a combination of the
following values: (*) value not defined in all devices.
LL_AHB1_GRP1_PERIPH_ALL
LL_AHB1_GRP1_PERIPH_GPIOA
LL_AHB1_GRP1_PERIPH_GPIOB
LL_AHB1_GRP1_PERIPH_GPIOC
LL_AHB1_GRP1_PERIPH_GPIOD (*)
LL_AHB1_GRP1_PERIPH_GPIOE (*)
LL_AHB1_GRP1_PERIPH_GPIOF
LL_AHB1_GRP1_PERIPH_TSC (*)
Return values None
Reference Manual to AHBRSTR GPIOARST LL_AHB1_GRP1_ReleaseReset
LL API cross AHBRSTR GPIOBRST LL_AHB1_GRP1_ReleaseReset
LL_APB1_GRP1_EnableClock
Function name __STATIC_INLINE void LL_APB1_GRP1_EnableClock
(uint32_t Periphs)
Function description Enable APB1 peripherals clock (available in register 1).
Parameters Periphs: This parameter can be a combination of the
following values: (*) value not defined in all devices.
LL_APB1_GRP1_PERIPH_TIM2 (*)
LL_APB1_GRP1_PERIPH_TIM3
LL_APB1_GRP1_PERIPH_TIM6 (*)
LL_APB1_GRP1_PERIPH_TIM7 (*)
LL_APB1_GRP1_PERIPH_TIM14
LL_APB1_GRP1_PERIPH_WWDG
LL_APB1_GRP1_PERIPH_SPI2 (*)
LL_APB1_GRP1_PERIPH_USART2 (*)
LL_APB1_GRP1_PERIPH_USART3 (*)
LL_APB1_GRP1_PERIPH_USART4 (*)
LL_APB1_GRP1_PERIPH_USART5 (*)
LL_APB1_GRP1_PERIPH_I2C1
LL_APB1_GRP1_PERIPH_I2C2 (*)
LL_APB1_GRP1_PERIPH_USB (*)
LL_APB1_GRP1_PERIPH_CAN (*)
LL_APB1_GRP1_PERIPH_CRS (*)
LL_APB1_GRP1_PERIPH_PWR
LL_APB1_GRP1_PERIPH_DAC1 (*)
LL_APB1_GRP1_PERIPH_CEC (*)
Return values None
Reference Manual to APB1ENR TIM2EN LL_APB1_GRP1_EnableClock
LL API cross APB1ENR TIM3EN LL_APB1_GRP1_EnableClock
reference: APB1ENR TIM6EN LL_APB1_GRP1_EnableClock
APB1ENR TIM7EN LL_APB1_GRP1_EnableClock
APB1ENR TIM14EN LL_APB1_GRP1_EnableClock
APB1ENR WWDGEN LL_APB1_GRP1_EnableClock
APB1ENR SPI2EN LL_APB1_GRP1_EnableClock
APB1ENR USART2EN LL_APB1_GRP1_EnableClock
APB1ENR USART3EN LL_APB1_GRP1_EnableClock
APB1ENR USART4EN LL_APB1_GRP1_EnableClock
APB1ENR USART5EN LL_APB1_GRP1_EnableClock
APB1ENR I2C1EN LL_APB1_GRP1_EnableClock
APB1ENR I2C2EN LL_APB1_GRP1_EnableClock
APB1ENR USBEN LL_APB1_GRP1_EnableClock
APB1ENR CANEN LL_APB1_GRP1_EnableClock
APB1ENR CRSEN LL_APB1_GRP1_EnableClock
APB1ENR PWREN LL_APB1_GRP1_EnableClock
APB1ENR DACEN LL_APB1_GRP1_EnableClock
LL_APB1_GRP1_IsEnabledClock
Function name __STATIC_INLINE uint32_t LL_APB1_GRP1_IsEnabledClock
(uint32_t Periphs)
Function description Check if APB1 peripheral clock is enabled or not (available in
register 1).
Parameters Periphs: This parameter can be a combination of the
following values: (*) value not defined in all devices.
LL_APB1_GRP1_PERIPH_TIM2 (*)
LL_APB1_GRP1_PERIPH_TIM3
LL_APB1_GRP1_PERIPH_TIM6 (*)
LL_APB1_GRP1_PERIPH_TIM7 (*)
LL_APB1_GRP1_PERIPH_TIM14
LL_APB1_GRP1_PERIPH_WWDG
LL_APB1_GRP1_PERIPH_SPI2 (*)
LL_APB1_GRP1_PERIPH_USART2 (*)
LL_APB1_GRP1_PERIPH_USART3 (*)
LL_APB1_GRP1_PERIPH_USART4 (*)
LL_APB1_GRP1_PERIPH_USART5 (*)
LL_APB1_GRP1_PERIPH_I2C1
LL_APB1_GRP1_PERIPH_I2C2 (*)
LL_APB1_GRP1_PERIPH_USB (*)
LL_APB1_GRP1_PERIPH_CAN (*)
LL_APB1_GRP1_PERIPH_CRS (*)
LL_APB1_GRP1_PERIPH_PWR
LL_APB1_GRP1_PERIPH_DAC1 (*)
LL_APB1_GRP1_PERIPH_CEC (*)
Return values State: of Periphs (1 or 0).
Reference Manual to APB1ENR TIM2EN LL_APB1_GRP1_IsEnabledClock
LL API cross APB1ENR TIM3EN LL_APB1_GRP1_IsEnabledClock
reference: APB1ENR TIM6EN LL_APB1_GRP1_IsEnabledClock
APB1ENR TIM7EN LL_APB1_GRP1_IsEnabledClock
APB1ENR TIM14EN LL_APB1_GRP1_IsEnabledClock
APB1ENR WWDGEN LL_APB1_GRP1_IsEnabledClock
APB1ENR SPI2EN LL_APB1_GRP1_IsEnabledClock
APB1ENR USART2EN LL_APB1_GRP1_IsEnabledClock
APB1ENR USART3EN LL_APB1_GRP1_IsEnabledClock
APB1ENR USART4EN LL_APB1_GRP1_IsEnabledClock
APB1ENR USART5EN LL_APB1_GRP1_IsEnabledClock
APB1ENR I2C1EN LL_APB1_GRP1_IsEnabledClock
APB1ENR I2C2EN LL_APB1_GRP1_IsEnabledClock
APB1ENR USBEN LL_APB1_GRP1_IsEnabledClock
APB1ENR CANEN LL_APB1_GRP1_IsEnabledClock
APB1ENR CRSEN LL_APB1_GRP1_IsEnabledClock
APB1ENR PWREN LL_APB1_GRP1_IsEnabledClock
APB1ENR DACEN LL_APB1_GRP1_IsEnabledClock
APB1ENR CECEN LL_APB1_GRP1_IsEnabledClock
LL_APB1_GRP2_IsEnabledClock
Function name __STATIC_INLINE uint32_t LL_APB1_GRP2_IsEnabledClock
(uint32_t Periphs)
Function description Check if APB1 peripheral clock is enabled or not (available in
register 2).
Parameters Periphs: This parameter can be a combination of the
following values: (*) value not defined in all devices.
LL_APB1_GRP2_PERIPH_SYSCFG
LL_APB1_GRP2_PERIPH_ADC1
LL_APB1_GRP2_PERIPH_USART8 (*)
LL_APB1_GRP2_PERIPH_USART7 (*)
LL_APB1_GRP2_PERIPH_USART6 (*)
LL_APB1_GRP2_PERIPH_TIM1
LL_APB1_GRP2_PERIPH_SPI1
LL_APB1_GRP2_PERIPH_USART1
LL_APB1_GRP2_PERIPH_TIM15 (*)
LL_APB1_GRP2_DisableClock
Function name __STATIC_INLINE void LL_APB1_GRP2_DisableClock
(uint32_t Periphs)
Function description Disable APB1 peripherals clock (available in register 2).
Parameters Periphs: This parameter can be a combination of the
following values: (*) value not defined in all devices.
LL_APB1_GRP2_PERIPH_SYSCFG
LL_APB1_GRP2_PERIPH_ADC1
LL_APB1_GRP2_PERIPH_USART8 (*)
LL_APB1_GRP2_PERIPH_USART7 (*)
LL_APB1_GRP2_PERIPH_USART6 (*)
LL_APB1_GRP2_PERIPH_TIM1
LL_APB1_GRP2_PERIPH_SPI1
LL_APB1_GRP2_PERIPH_USART1
LL_APB1_GRP2_PERIPH_TIM15 (*)
LL_APB1_GRP2_PERIPH_TIM16
LL_APB1_GRP2_PERIPH_TIM17
LL_APB1_GRP2_PERIPH_DBGMCU
Return values None
Reference Manual to APB2ENR SYSCFGEN LL_APB1_GRP2_DisableClock
LL API cross APB2ENR ADC1EN LL_APB1_GRP2_DisableClock
reference: APB2ENR USART8EN LL_APB1_GRP2_DisableClock
APB2ENR USART7EN LL_APB1_GRP2_DisableClock
APB2ENR USART6EN LL_APB1_GRP2_DisableClock
APB2ENR TIM1EN LL_APB1_GRP2_DisableClock
APB2ENR SPI1EN LL_APB1_GRP2_DisableClock
APB2ENR USART1EN LL_APB1_GRP2_DisableClock
APB2ENR TIM15EN LL_APB1_GRP2_DisableClock
APB2ENR TIM16EN LL_APB1_GRP2_DisableClock
APB2ENR TIM17EN LL_APB1_GRP2_DisableClock
APB2ENR DBGMCUEN LL_APB1_GRP2_DisableClock
LL_APB1_GRP2_ReleaseReset
Function name __STATIC_INLINE void LL_APB1_GRP2_ReleaseReset
(uint32_t Periphs)
Function description Release APB1 peripherals reset (available in register 2).
Parameters Periphs: This parameter can be a combination of the
following values: (*) value not defined in all devices.
LL_APB1_GRP2_PERIPH_ALL
LL_APB1_GRP2_PERIPH_SYSCFG
LL_APB1_GRP2_PERIPH_ADC1
LL_APB1_GRP2_PERIPH_USART8 (*)
LL_APB1_GRP2_PERIPH_USART7 (*)
LL_APB1_GRP2_PERIPH_USART6 (*)
LL_APB1_GRP2_PERIPH_TIM1
LL_APB1_GRP2_PERIPH_SPI1
LL_APB1_GRP2_PERIPH_USART1
LL_COMP_SetCommonWindowMode
Function __STATIC_INLINE void LL_COMP_SetCommonWindowMode
name (COMP_Common_TypeDef * COMPxy_COMMON, uint32_t
WindowMode)
Function Set window mode of a pair of comparators instances (2 consecutive COMP
description instances odd and even COMP<x> and COMP<x+1>).
Parameters COMPxy_COMMON: Comparator common instance (can be set
directly from CMSIS definition or by using helper macro
__LL_COMP_COMMON_INSTANCE() )
WindowMode: This parameter can be one of the following values:
LL_COMP_WINDOWMODE_DISABLE
LL_COMP_WINDOWMODE_COMP1_INPUT_PLUS_COMMON
Return None
values
Reference CSR WNDWEN LL_COMP_SetCommonWindowMode
Manual to
LL API
cross
reference:
LL_COMP_GetCommonWindowMode
Function __STATIC_INLINE uint32_t LL_COMP_GetCommonWindowMode
name (COMP_Common_TypeDef * COMPxy_COMMON)
Function Get window mode of a pair of comparators instances (2 consecutive COMP
description instances odd and even COMP<x> and COMP<x+1>).
Parameters COMPxy_COMMON: Comparator common instance (can be set
directly from CMSIS definition or by using helper macro
__LL_COMP_COMMON_INSTANCE() )
Return Returned: value can be one of the following values:
values LL_COMP_WINDOWMODE_DISABLE
LL_COMP_WINDOWMODE_COMP1_INPUT_PLUS_COMMON
Reference CSR WNDWEN LL_COMP_GetCommonWindowMode
Manual to
LL API cross
reference:
LL_COMP_SetPowerMode
Function name __STATIC_INLINE void LL_COMP_SetPowerMode
(COMP_TypeDef * COMPx, uint32_t PowerMode)
Function description Set comparator instance operating mode to adjust power and
speed.
Parameters COMPx: Comparator instance
LL_COMP_GetPowerMode
Function name __STATIC_INLINE uint32_t LL_COMP_GetPowerMode
(COMP_TypeDef * COMPx)
Function description Get comparator instance operating mode to adjust power and
speed.
Parameters COMPx: Comparator instance
Return values Returned: value can be one of the following values:
LL_COMP_POWERMODE_HIGHSPEED
LL_COMP_POWERMODE_MEDIUMSPEED
LL_COMP_POWERMODE_LOWPOWER
LL_COMP_POWERMODE_ULTRALOWPOWER
Reference Manual to CSR COMP1MODE LL_COMP_GetPowerMode
LL API cross COMP2MODE LL_COMP_GetPowerMode
reference:
LL_COMP_ConfigInputs
Function name __STATIC_INLINE void LL_COMP_ConfigInputs
(COMP_TypeDef * COMPx, uint32_t InputMinus, uint32_t
InputPlus)
Function description Set comparator inputs minus (inverting) and plus (non-inverting).
Parameters COMPx: Comparator instance
InputMinus: This parameter can be one of the following
values:
LL_COMP_INPUT_MINUS_1_4VREFINT
LL_COMP_INPUT_MINUS_1_2VREFINT
LL_COMP_INPUT_MINUS_3_4VREFINT
LL_COMP_INPUT_MINUS_VREFINT
LL_COMP_INPUT_MINUS_DAC1_CH1
LL_COMP_INPUT_MINUS_DAC1_CH2
LL_COMP_INPUT_MINUS_IO1
InputPlus: This parameter can be one of the following
values: (1) Parameter available only on COMP instance:
COMP1.
LL_COMP_INPUT_PLUS_IO1
LL_COMP_INPUT_PLUS_DAC1_CH1 (1)
LL_COMP_SetInputPlus
Function name __STATIC_INLINE void LL_COMP_SetInputPlus
(COMP_TypeDef * COMPx, uint32_t InputPlus)
Function description Set comparator input plus (non-inverting).
Parameters COMPx: Comparator instance
InputPlus: This parameter can be one of the following
values: (1) Parameter available only on COMP instance:
COMP1.
LL_COMP_INPUT_PLUS_IO1
LL_COMP_INPUT_PLUS_DAC1_CH1 (1)
Return values None
Notes In case of comparator input selected to be connected to IO:
GPIO pins are specific to each comparator instance. Refer to
description of parameters or to reference manual.
Reference Manual to CSR COMP1INSEL LL_COMP_SetInputPlus
LL API cross CSR COMP2INSEL LL_COMP_SetInputPlus
reference:
LL_COMP_GetInputPlus
Function name __STATIC_INLINE uint32_t LL_COMP_GetInputPlus
(COMP_TypeDef * COMPx)
Function description Get comparator input plus (non-inverting).
Parameters COMPx: Comparator instance
Return values Returned: value can be one of the following values: (1)
Parameter available only on COMP instance: COMP1.
LL_COMP_INPUT_PLUS_IO1
LL_COMP_INPUT_PLUS_DAC1_CH1 (1)
Notes In case of comparator input selected to be connected to IO:
GPIO pins are specific to each comparator instance. Refer to
description of parameters or to reference manual.
Reference Manual to CSR COMP1INSEL LL_COMP_GetInputPlus
LL API cross CSR COMP2INSEL LL_COMP_GetInputPlus
reference:
LL_COMP_GetInputMinus
Function name __STATIC_INLINE uint32_t LL_COMP_GetInputMinus
(COMP_TypeDef * COMPx)
Function description Get comparator input minus (inverting).
Parameters COMPx: Comparator instance
Return values Returned: value can be one of the following values:
LL_COMP_INPUT_MINUS_1_4VREFINT
LL_COMP_INPUT_MINUS_1_2VREFINT
LL_COMP_INPUT_MINUS_3_4VREFINT
LL_COMP_INPUT_MINUS_VREFINT
LL_COMP_INPUT_MINUS_DAC1_CH1
LL_COMP_INPUT_MINUS_DAC1_CH2
LL_COMP_INPUT_MINUS_IO1
Notes In case of comparator input selected to be connected to IO:
GPIO pins are specific to each comparator instance. Refer to
description of parameters or to reference manual.
Reference Manual to CSR COMP1SW1 LL_COMP_GetInputMinus
LL API cross
reference:
LL_COMP_GetInputHysteresis
Function name __STATIC_INLINE uint32_t LL_COMP_GetInputHysteresis
(COMP_TypeDef * COMPx)
Function description Get comparator instance hysteresis mode of the minus (inverting)
input.
Parameters COMPx: Comparator instance
Return values Returned: value can be one of the following values:
LL_COMP_HYSTERESIS_NONE
LL_COMP_HYSTERESIS_LOW
LL_COMP_HYSTERESIS_MEDIUM
LL_COMP_HYSTERESIS_HIGH
Reference Manual to CSR COMP1HYST LL_COMP_GetInputHysteresis
LL API cross COMP2HYST LL_COMP_GetInputHysteresis
reference:
LL_COMP_SetOutputSelection
Function name __STATIC_INLINE void LL_COMP_SetOutputSelection
(COMP_TypeDef * COMPx, uint32_t OutputSelection)
Function description Set comparator output selection.
Parameters COMPx: Comparator instance
OutputSelection: This parameter can be one of the
following values: (1) Parameter availability depending on
timer availability on the selected device.
LL_COMP_OUTPUT_NONE
LL_COMP_OUTPUT_TIM1_BKIN (1)
LL_COMP_OUTPUT_TIM1_IC1 (1)
LL_COMP_OUTPUT_TIM1_OCCLR (1)
LL_COMP_OUTPUT_TIM2_IC4 (1)
LL_COMP_OUTPUT_TIM2_OCCLR (1)
LL_COMP_GetOutputSelection
Function name __STATIC_INLINE uint32_t LL_COMP_GetOutputSelection
(COMP_TypeDef * COMPx)
Function description Get comparator output selection.
Parameters COMPx: Comparator instance
Return values Returned: value can be one of the following values: (1)
Parameter availability depending on timer availability on the
selected device.
LL_COMP_OUTPUT_NONE
LL_COMP_OUTPUT_TIM1_BKIN (1)
LL_COMP_OUTPUT_TIM1_IC1 (1)
LL_COMP_OUTPUT_TIM1_OCCLR (1)
LL_COMP_OUTPUT_TIM2_IC4 (1)
LL_COMP_OUTPUT_TIM2_OCCLR (1)
LL_COMP_OUTPUT_TIM3_IC1 (1)
LL_COMP_OUTPUT_TIM3_OCCLR (1)
Notes Availability of parameters of output selection to timer depends
on timers availability on the selected device.
Reference Manual to CSR COMP1OUTSEL LL_COMP_GetOutputSelection
LL API cross COMP2OUTSEL LL_COMP_GetOutputSelection
reference:
LL_COMP_SetOutputPolarity
Function name __STATIC_INLINE void LL_COMP_SetOutputPolarity
(COMP_TypeDef * COMPx, uint32_t OutputPolarity)
Function description Set comparator instance output polarity.
Parameters COMPx: Comparator instance
OutputPolarity: This parameter can be one of the following
values:
LL_COMP_OUTPUTPOL_NONINVERTED
LL_COMP_OUTPUTPOL_INVERTED
Return values None
Reference Manual to CSR COMP1POL LL_COMP_SetOutputPolarity
LL API cross COMP2POL LL_COMP_SetOutputPolarity
reference:
LL_COMP_Enable
Function name __STATIC_INLINE void LL_COMP_Enable (COMP_TypeDef *
COMPx)
Function description Enable comparator instance.
Parameters COMPx: Comparator instance
Return values None
Notes After enable from off state, comparator requires a delay to
reach reach propagation delay specification. Refer to device
datasheet, parameter "tSTART".
Reference Manual to CSR COMP1EN LL_COMP_Enable
LL API cross CSR COMP2EN LL_COMP_Enable
reference:
LL_COMP_Disable
Function name __STATIC_INLINE void LL_COMP_Disable (COMP_TypeDef *
COMPx)
Function description Disable comparator instance.
Parameters COMPx: Comparator instance
Return values None
Reference Manual to CSR COMP1EN LL_COMP_Disable
LL API cross CSR COMP2EN LL_COMP_Disable
reference:
LL_COMP_IsEnabled
Function name __STATIC_INLINE uint32_t LL_COMP_IsEnabled
(COMP_TypeDef * COMPx)
Function description Get comparator enable state (0: COMP is disabled, 1: COMP is
enabled)
Parameters COMPx: Comparator instance
Return values State: of bit (1 or 0).
LL_COMP_Lock
Function name __STATIC_INLINE void LL_COMP_Lock (COMP_TypeDef *
COMPx)
Function description Lock comparator instance.
Parameters COMPx: Comparator instance
Return values None
Notes Once locked, comparator configuration can be accessed in
read-only.
The only way to unlock the comparator is a device hardware
reset.
Reference Manual to CSR COMP1LOCK LL_COMP_Lock
LL API cross CSR COMP2LOCK LL_COMP_Lock
reference:
LL_COMP_IsLocked
Function name __STATIC_INLINE uint32_t LL_COMP_IsLocked
(COMP_TypeDef * COMPx)
Function description Get comparator lock state (0: COMP is unlocked, 1: COMP is
locked).
Parameters COMPx: Comparator instance
Return values State: of bit (1 or 0).
Notes Once locked, comparator configuration can be accessed in
read-only.
The only way to unlock the comparator is a device hardware
reset.
Reference Manual to CSR COMP1LOCK LL_COMP_IsLocked
LL API cross CSR COMP2LOCK LL_COMP_IsLocked
reference:
LL_COMP_ReadOutputLevel
Function name __STATIC_INLINE uint32_t LL_COMP_ReadOutputLevel
(COMP_TypeDef * COMPx)
Function description Read comparator instance output level.
Parameters COMPx: Comparator instance
Return values Returned: value can be one of the following values:
LL_COMP_OUTPUT_LEVEL_LOW
LL_COMP_OUTPUT_LEVEL_HIGH
Notes The comparator output level depends on the selected polarity
(Refer to function LL_COMP_SetOutputPolarity()). If the
comparator polarity is not inverted: Comparator output is low
LL_COMP_DeInit
Function name ErrorStatus LL_COMP_DeInit (COMP_TypeDef * COMPx)
Function description De-initialize registers of the selected COMP instance to their
default reset values.
Parameters COMPx: COMP instance
Return values An: ErrorStatus enumeration value:
SUCCESS: COMP registers are de-initialized
ERROR: COMP registers are not de-initialized
Notes If comparator is locked, de-initialization by software is not
possible. The only way to unlock the comparator is a device
hardware reset.
LL_COMP_Init
Function name ErrorStatus LL_COMP_Init (COMP_TypeDef * COMPx,
LL_COMP_InitTypeDef * COMP_InitStruct)
Function description Initialize some features of COMP instance.
Parameters COMPx: COMP instance
COMP_InitStruct: Pointer to a LL_COMP_InitTypeDef
structure
Return values An: ErrorStatus enumeration value:
SUCCESS: COMP registers are initialized
ERROR: COMP registers are not initialized
Notes This function configures features of the selected COMP
instance. Some features are also available at scope COMP
common instance (common to several COMP instances).
Refer to functions having argument "COMPxy_COMMON" as
parameter.
LL_COMP_StructInit
Function name void LL_COMP_StructInit (LL_COMP_InitTypeDef *
COMP_InitStruct)
Function description Set each LL_COMP_InitTypeDef field to default value.
Parameters COMP_InitStruct: pointer to a LL_COMP_InitTypeDef
structure whose fields will be set to default values.
LL_SYSTICK_IsActiveCounterFlag
Function name __STATIC_INLINE uint32_t LL_SYSTICK_IsActiveCounterFlag
(void )
Function description This function checks if the Systick counter flag is active or not.
Return values State: of bit (1 or 0).
Notes It can be used in timeout function on application side.
Reference Manual to STK_CTRL COUNTFLAG LL_SYSTICK_IsActiveCounterFlag
LL API cross
reference:
LL_SYSTICK_SetClkSource
Function name __STATIC_INLINE void LL_SYSTICK_SetClkSource (uint32_t
Source)
Function description Configures the SysTick clock source.
Parameters Source: This parameter can be one of the following values:
LL_SYSTICK_CLKSOURCE_HCLK_DIV8
LL_SYSTICK_CLKSOURCE_HCLK
Return values None
Reference Manual to STK_CTRL CLKSOURCE LL_SYSTICK_SetClkSource
LL API cross
reference:
LL_SYSTICK_GetClkSource
Function name __STATIC_INLINE uint32_t LL_SYSTICK_GetClkSource (void )
Function description Get the SysTick clock source.
Return values Returned: value can be one of the following values:
LL_SYSTICK_CLKSOURCE_HCLK_DIV8
LL_SYSTICK_CLKSOURCE_HCLK
Reference Manual to STK_CTRL CLKSOURCE LL_SYSTICK_GetClkSource
LL API cross
reference:
LL_SYSTICK_EnableIT
Function name __STATIC_INLINE void LL_SYSTICK_EnableIT (void )
Function description Enable SysTick exception request.
LL_SYSTICK_DisableIT
Function name __STATIC_INLINE void LL_SYSTICK_DisableIT (void )
Function description Disable SysTick exception request.
Return values None
Reference Manual to STK_CTRL TICKINT LL_SYSTICK_DisableIT
LL API cross
reference:
LL_SYSTICK_IsEnabledIT
Function name __STATIC_INLINE uint32_t LL_SYSTICK_IsEnabledIT (void )
Function description Checks if the SYSTICK interrupt is enabled or disabled.
Return values State: of bit (1 or 0).
Reference Manual to STK_CTRL TICKINT LL_SYSTICK_IsEnabledIT
LL API cross
reference:
LL_LPM_EnableSleep
Function name __STATIC_INLINE void LL_LPM_EnableSleep (void )
Function description Processor uses sleep as its low power mode.
Return values None
Reference Manual to SCB_SCR SLEEPDEEP LL_LPM_EnableSleep
LL API cross
reference:
LL_LPM_EnableDeepSleep
Function name __STATIC_INLINE void LL_LPM_EnableDeepSleep (void )
Function description Processor uses deep sleep as its low power mode.
Return values None
Reference Manual to SCB_SCR SLEEPDEEP LL_LPM_EnableDeepSleep
LL API cross
reference:
LL_LPM_EnableSleepOnExit
Function name __STATIC_INLINE void LL_LPM_EnableSleepOnExit (void )
Function description Configures sleep-on-exit when returning from Handler mode to
Thread mode.
LL_LPM_DisableSleepOnExit
Function name __STATIC_INLINE void LL_LPM_DisableSleepOnExit (void )
Function description Do not sleep when returning to Thread mode.
Return values None
Reference Manual to SCB_SCR SLEEPONEXIT LL_LPM_DisableSleepOnExit
LL API cross
reference:
LL_LPM_EnableEventOnPend
Function name __STATIC_INLINE void LL_LPM_EnableEventOnPend (void )
Function description Enabled events and all interrupts, including disabled interrupts,
can wakeup the processor.
Return values None
Reference Manual to SCB_SCR SEVEONPEND LL_LPM_EnableEventOnPend
LL API cross
reference:
LL_LPM_DisableEventOnPend
Function name __STATIC_INLINE void LL_LPM_DisableEventOnPend (void )
Function description Only enabled interrupts or events can wakeup the processor,
disabled interrupts are excluded.
Return values None
Reference Manual to SCB_SCR SEVEONPEND LL_LPM_DisableEventOnPend
LL API cross
reference:
LL_CPUID_GetImplementer
Function name __STATIC_INLINE uint32_t LL_CPUID_GetImplementer (void )
Function description Get Implementer code.
Return values Value: should be equal to 0x41 for ARM
Reference Manual to SCB_CPUID IMPLEMENTER LL_CPUID_GetImplementer
LL API cross
reference:
LL_CPUID_GetArchitecture
Function name __STATIC_INLINE uint32_t LL_CPUID_GetArchitecture (void )
Function description Get Architecture number.
Return values Value: should be equal to 0xC for Cortex-M0 devices
Reference Manual to SCB_CPUID ARCHITECTURE LL_CPUID_GetArchitecture
LL API cross
reference:
LL_CPUID_GetParNo
Function name __STATIC_INLINE uint32_t LL_CPUID_GetParNo (void )
Function description Get Part number.
Return values Value: should be equal to 0xC20 for Cortex-M0
Reference Manual to SCB_CPUID PARTNO LL_CPUID_GetParNo
LL API cross
reference:
LL_CPUID_GetRevision
Function name __STATIC_INLINE uint32_t LL_CPUID_GetRevision (void )
Function description Get Revision number (The p value in the rnpn product revision
identifier, indicates patch release)
Return values Value: between 0 and 255 (0x1: patch 1)
Reference Manual to SCB_CPUID REVISION LL_CPUID_GetRevision
LL API cross
reference:
LL_CRC_ResetCRCCalculationUnit
Function name __STATIC_INLINE void LL_CRC_ResetCRCCalculationUnit
(CRC_TypeDef * CRCx)
Function description Reset the CRC calculation unit.
Parameters CRCx: CRC Instance
Return values None
Notes If Programmable Initial CRC value feature is available, also
set the Data Register to the value stored in the CRC_INIT
register, otherwise, reset Data Register to its default value.
Reference Manual to CR RESET LL_CRC_ResetCRCCalculationUnit
LL API cross
reference:
LL_CRC_SetPolynomialSize
Function name __STATIC_INLINE void LL_CRC_SetPolynomialSize
(CRC_TypeDef * CRCx, uint32_t PolySize)
Function description Configure size of the polynomial.
Parameters CRCx: CRC Instance
PolySize: This parameter can be one of the following values:
LL_CRC_POLYLENGTH_32B
LL_CRC_POLYLENGTH_16B
LL_CRC_POLYLENGTH_8B
LL_CRC_POLYLENGTH_7B
Return values None
Notes This function is available only on devices supporting
Programmable Polynomial feature.
Reference Manual to CR POLYSIZE LL_CRC_SetPolynomialSize
LL API cross
reference:
LL_CRC_GetPolynomialSize
Function name __STATIC_INLINE uint32_t LL_CRC_GetPolynomialSize
(CRC_TypeDef * CRCx)
Function description Return size of the polynomial.
Parameters CRCx: CRC Instance
LL_CRC_SetInputDataReverseMode
Function name __STATIC_INLINE void LL_CRC_SetInputDataReverseMode
(CRC_TypeDef * CRCx, uint32_t ReverseMode)
Function description Configure the reversal of the bit order of the input data.
Parameters CRCx: CRC Instance
ReverseMode: This parameter can be one of the following
values:
LL_CRC_INDATA_REVERSE_NONE
LL_CRC_INDATA_REVERSE_BYTE
LL_CRC_INDATA_REVERSE_HALFWORD
LL_CRC_INDATA_REVERSE_WORD
Return values None
Reference Manual to CR REV_IN LL_CRC_SetInputDataReverseMode
LL API cross
reference:
LL_CRC_GetInputDataReverseMode
Function name __STATIC_INLINE uint32_t
LL_CRC_GetInputDataReverseMode (CRC_TypeDef * CRCx)
Function description Return type of reversal for input data bit order.
Parameters CRCx: CRC Instance
Return values Returned: value can be one of the following values:
LL_CRC_INDATA_REVERSE_NONE
LL_CRC_INDATA_REVERSE_BYTE
LL_CRC_INDATA_REVERSE_HALFWORD
LL_CRC_INDATA_REVERSE_WORD
Reference Manual to CR REV_IN LL_CRC_GetInputDataReverseMode
LL API cross
reference:
LL_CRC_SetOutputDataReverseMode
Function name __STATIC_INLINE void LL_CRC_SetOutputDataReverseMode
(CRC_TypeDef * CRCx, uint32_t ReverseMode)
Function description Configure the reversal of the bit order of the Output data.
LL_CRC_GetOutputDataReverseMode
Function name __STATIC_INLINE uint32_t
LL_CRC_GetOutputDataReverseMode (CRC_TypeDef * CRCx)
Function description Configure the reversal of the bit order of the Output data.
Parameters CRCx: CRC Instance
Return values Returned: value can be one of the following values:
LL_CRC_OUTDATA_REVERSE_NONE
LL_CRC_OUTDATA_REVERSE_BIT
Reference Manual to CR REV_OUT LL_CRC_GetOutputDataReverseMode
LL API cross
reference:
LL_CRC_SetInitialData
Function name __STATIC_INLINE void LL_CRC_SetInitialData (CRC_TypeDef
* CRCx, uint32_t InitCrc)
Function description Initialize the Programmable initial CRC value.
Parameters CRCx: CRC Instance
InitCrc: Value to be programmed in Programmable initial
CRC value register
Return values None
Notes If the CRC size is less than 32 bits, the least significant bits
are used to write the correct value
LL_CRC_DEFAULT_CRC_INITVALUE could be used as
value for InitCrc parameter.
Reference Manual to INIT INIT LL_CRC_SetInitialData
LL API cross
reference:
LL_CRC_GetInitialData
Function name __STATIC_INLINE uint32_t LL_CRC_GetInitialData
(CRC_TypeDef * CRCx)
Function description Return current Initial CRC value.
Parameters CRCx: CRC Instance
LL_CRC_SetPolynomialCoef
Function name __STATIC_INLINE void LL_CRC_SetPolynomialCoef
(CRC_TypeDef * CRCx, uint32_t PolynomCoef)
Function description Initialize the Programmable polynomial value (coefficients of the
polynomial to be used for CRC calculation).
Parameters CRCx: CRC Instance
PolynomCoef: Value to be programmed in Programmable
Polynomial value register
Return values None
Notes This function is available only on devices supporting
Programmable Polynomial feature.
LL_CRC_DEFAULT_CRC32_POLY could be used as value
for PolynomCoef parameter.
Please check Reference Manual and existing Errata Sheets,
regarding possible limitations for Polynomial values usage.
For example, for a polynomial of degree 7, X^7 + X^6 + X^5 +
X^2 + 1 is written 0x65
Reference Manual to POL POL LL_CRC_SetPolynomialCoef
LL API cross
reference:
LL_CRC_GetPolynomialCoef
Function name __STATIC_INLINE uint32_t LL_CRC_GetPolynomialCoef
(CRC_TypeDef * CRCx)
Function description Return current Programmable polynomial value.
Parameters CRCx: CRC Instance
Return values Value: programmed in Programmable Polynomial value
register
Notes This function is available only on devices supporting
Programmable Polynomial feature.
Please check Reference Manual and existing Errata Sheets,
regarding possible limitations for Polynomial values usage.
For example, for a polynomial of degree 7, X^7 + X^6 + X^5 +
X^2 + 1 is written 0x65
Reference Manual to POL POL LL_CRC_GetPolynomialCoef
LL API cross
reference:
LL_CRC_FeedData16
Function name __STATIC_INLINE void LL_CRC_FeedData16 (CRC_TypeDef *
CRCx, uint16_t InData)
Function description Write given 16-bit data to the CRC calculator.
Parameters CRCx: CRC Instance
InData: 16 bit value to be provided to CRC calculator
between between Min_Data=0 and Max_Data=0xFFFF
Return values None
Reference Manual to DR DR LL_CRC_FeedData16
LL API cross
reference:
LL_CRC_FeedData8
Function name __STATIC_INLINE void LL_CRC_FeedData8 (CRC_TypeDef *
CRCx, uint8_t InData)
Function description Write given 8-bit data to the CRC calculator.
Parameters CRCx: CRC Instance
InData: 8 bit value to be provided to CRC calculator between
between Min_Data=0 and Max_Data=0xFF
Return values None
Reference Manual to DR DR LL_CRC_FeedData8
LL API cross
reference:
LL_CRC_ReadData32
Function name __STATIC_INLINE uint32_t LL_CRC_ReadData32
(CRC_TypeDef * CRCx)
Function description Return current CRC calculation result.
Parameters CRCx: CRC Instance
Return values Current: CRC calculation result as stored in CRC_DR
LL_CRC_ReadData16
Function name __STATIC_INLINE uint16_t LL_CRC_ReadData16
(CRC_TypeDef * CRCx)
Function description Return current CRC calculation result.
Parameters CRCx: CRC Instance
Return values Current: CRC calculation result as stored in CRC_DR
register (16 bits).
Notes This function is expected to be used in a 16 bits CRC
polynomial size context.
This function is available only on devices supporting
Programmable Polynomial feature.
Reference Manual to DR DR LL_CRC_ReadData16
LL API cross
reference:
LL_CRC_ReadData8
Function name __STATIC_INLINE uint8_t LL_CRC_ReadData8 (CRC_TypeDef
* CRCx)
Function description Return current CRC calculation result.
Parameters CRCx: CRC Instance
Return values Current: CRC calculation result as stored in CRC_DR
register (8 bits).
Notes This function is expected to be used in a 8 bits CRC
polynomial size context.
This function is available only on devices supporting
Programmable Polynomial feature.
Reference Manual to DR DR LL_CRC_ReadData8
LL API cross
reference:
LL_CRC_ReadData7
Function name __STATIC_INLINE uint8_t LL_CRC_ReadData7 (CRC_TypeDef
* CRCx)
Function description Return current CRC calculation result.
Parameters CRCx: CRC Instance
Return values Current: CRC calculation result as stored in CRC_DR
register (7 bits).
Notes This function is expected to be used in a 7 bits CRC
LL_CRC_Read_IDR
Function name __STATIC_INLINE uint32_t LL_CRC_Read_IDR (CRC_TypeDef
* CRCx)
Function description Return data stored in the Independent Data(IDR) register.
Parameters CRCx: CRC Instance
Return values Value: stored in CRC_IDR register (General-purpose 8-bit
data register).
Notes This register can be used as a temporary storage location for
one byte.
Reference Manual to IDR IDR LL_CRC_Read_IDR
LL API cross
reference:
LL_CRC_Write_IDR
Function name __STATIC_INLINE void LL_CRC_Write_IDR (CRC_TypeDef *
CRCx, uint32_t InData)
Function description Store data in the Independent Data(IDR) register.
Parameters CRCx: CRC Instance
InData: value to be stored in CRC_IDR register (8-bit)
between between Min_Data=0 and Max_Data=0xFF
Return values None
Notes This register can be used as a temporary storage location for
one byte.
Reference Manual to IDR IDR LL_CRC_Write_IDR
LL API cross
reference:
LL_CRC_DeInit
Function name ErrorStatus LL_CRC_DeInit (CRC_TypeDef * CRCx)
Function description De-initialize CRC registers (Registers restored to their default
values).
Parameters CRCx: CRC Instance
Return values An: ErrorStatus enumeration value:
SUCCESS: CRC registers are de-initialized
ERROR: CRC registers are not de-initialized
LL_CRS_EnableFreqErrorCounter
Function name __STATIC_INLINE void LL_CRS_EnableFreqErrorCounter
(void )
Function description Enable Frequency error counter.
Return values None
Notes When this bit is set, the CRS_CFGR register is write-
protected and cannot be modified
Reference Manual to CR CEN LL_CRS_EnableFreqErrorCounter
LL API cross
reference:
LL_CRS_DisableFreqErrorCounter
Function name __STATIC_INLINE void LL_CRS_DisableFreqErrorCounter
(void )
Function description Disable Frequency error counter.
Return values None
Reference Manual to CR CEN LL_CRS_DisableFreqErrorCounter
LL API cross
reference:
LL_CRS_IsEnabledFreqErrorCounter
Function name __STATIC_INLINE uint32_t
LL_CRS_IsEnabledFreqErrorCounter (void )
Function description Check if Frequency error counter is enabled or not.
Return values State: of bit (1 or 0).
Reference Manual to CR CEN LL_CRS_IsEnabledFreqErrorCounter
LL API cross
reference:
LL_CRS_EnableAutoTrimming
Function name __STATIC_INLINE void LL_CRS_EnableAutoTrimming (void )
Function description Enable Automatic trimming counter.
Return values None
Reference Manual to CR AUTOTRIMEN LL_CRS_EnableAutoTrimming
LL API cross
LL_CRS_DisableAutoTrimming
Function name __STATIC_INLINE void LL_CRS_DisableAutoTrimming (void )
Function description Disable Automatic trimming counter.
Return values None
Reference Manual to CR AUTOTRIMEN LL_CRS_DisableAutoTrimming
LL API cross
reference:
LL_CRS_IsEnabledAutoTrimming
Function name __STATIC_INLINE uint32_t LL_CRS_IsEnabledAutoTrimming
(void )
Function description Check if Automatic trimming is enabled or not.
Return values State: of bit (1 or 0).
Reference Manual to CR AUTOTRIMEN LL_CRS_IsEnabledAutoTrimming
LL API cross
reference:
LL_CRS_SetHSI48SmoothTrimming
Function name __STATIC_INLINE void LL_CRS_SetHSI48SmoothTrimming
(uint32_t Value)
Function description Set HSI48 oscillator smooth trimming.
Parameters Value: a number between Min_Data = 0 and Max_Data = 63
Return values None
Notes When the AUTOTRIMEN bit is set, this field is controlled by
hardware and is read-only
Default value can be set thanks to
LL_CRS_HSI48CALIBRATION_DEFAULT
Reference Manual to CR TRIM LL_CRS_SetHSI48SmoothTrimming
LL API cross
reference:
LL_CRS_GetHSI48SmoothTrimming
Function name __STATIC_INLINE uint32_t
LL_CRS_GetHSI48SmoothTrimming (void )
Function description Get HSI48 oscillator smooth trimming.
Return values a: number between Min_Data = 0 and Max_Data = 63
Reference Manual to CR TRIM LL_CRS_GetHSI48SmoothTrimming
LL API cross
reference:
LL_CRS_GetReloadCounter
Function name __STATIC_INLINE uint32_t LL_CRS_GetReloadCounter (void )
Function description Get counter reload value.
Return values a: number between Min_Data = 0 and Max_Data = 0xFFFF
Reference Manual to CFGR RELOAD LL_CRS_GetReloadCounter
LL API cross
reference:
LL_CRS_SetFreqErrorLimit
Function name __STATIC_INLINE void LL_CRS_SetFreqErrorLimit (uint32_t
Value)
Function description Set frequency error limit.
Parameters Value: a number between Min_Data = 0 and Max_Data =
255
Return values None
Notes Default value can be set thanks to
LL_CRS_ERRORLIMIT_DEFAULT
Reference Manual to CFGR FELIM LL_CRS_SetFreqErrorLimit
LL API cross
reference:
LL_CRS_GetFreqErrorLimit
Function name __STATIC_INLINE uint32_t LL_CRS_GetFreqErrorLimit (void )
Function description Get frequency error limit.
Return values A: number between Min_Data = 0 and Max_Data = 255
Reference Manual to CFGR FELIM LL_CRS_GetFreqErrorLimit
LL API cross
LL_CRS_SetSyncDivider
Function name __STATIC_INLINE void LL_CRS_SetSyncDivider (uint32_t
Divider)
Function description Set division factor for SYNC signal.
Parameters Divider: This parameter can be one of the following values:
LL_CRS_SYNC_DIV_1
LL_CRS_SYNC_DIV_2
LL_CRS_SYNC_DIV_4
LL_CRS_SYNC_DIV_8
LL_CRS_SYNC_DIV_16
LL_CRS_SYNC_DIV_32
LL_CRS_SYNC_DIV_64
LL_CRS_SYNC_DIV_128
Return values None
Reference Manual to CFGR SYNCDIV LL_CRS_SetSyncDivider
LL API cross
reference:
LL_CRS_GetSyncDivider
Function name __STATIC_INLINE uint32_t LL_CRS_GetSyncDivider (void )
Function description Get division factor for SYNC signal.
Return values Returned: value can be one of the following values:
LL_CRS_SYNC_DIV_1
LL_CRS_SYNC_DIV_2
LL_CRS_SYNC_DIV_4
LL_CRS_SYNC_DIV_8
LL_CRS_SYNC_DIV_16
LL_CRS_SYNC_DIV_32
LL_CRS_SYNC_DIV_64
LL_CRS_SYNC_DIV_128
Reference Manual to CFGR SYNCDIV LL_CRS_GetSyncDivider
LL API cross
reference:
LL_CRS_SetSyncSignalSource
Function name __STATIC_INLINE void LL_CRS_SetSyncSignalSource
(uint32_t Source)
Function description Set SYNC signal source.
Parameters Source: This parameter can be one of the following values:
LL_CRS_SYNC_SOURCE_GPIO
LL_CRS_SYNC_SOURCE_LSE
LL_CRS_SYNC_SOURCE_USB
Return values None
LL_CRS_GetSyncSignalSource
Function name __STATIC_INLINE uint32_t LL_CRS_GetSyncSignalSource
(void )
Function description Get SYNC signal source.
Return values Returned: value can be one of the following values:
LL_CRS_SYNC_SOURCE_GPIO
LL_CRS_SYNC_SOURCE_LSE
LL_CRS_SYNC_SOURCE_USB
Reference Manual to CFGR SYNCSRC LL_CRS_GetSyncSignalSource
LL API cross
reference:
LL_CRS_SetSyncPolarity
Function name __STATIC_INLINE void LL_CRS_SetSyncPolarity (uint32_t
Polarity)
Function description Set input polarity for the SYNC signal source.
Parameters Polarity: This parameter can be one of the following values:
LL_CRS_SYNC_POLARITY_RISING
LL_CRS_SYNC_POLARITY_FALLING
Return values None
Reference Manual to CFGR SYNCPOL LL_CRS_SetSyncPolarity
LL API cross
reference:
LL_CRS_GetSyncPolarity
Function name __STATIC_INLINE uint32_t LL_CRS_GetSyncPolarity (void )
Function description Get input polarity for the SYNC signal source.
Return values Returned: value can be one of the following values:
LL_CRS_SYNC_POLARITY_RISING
LL_CRS_SYNC_POLARITY_FALLING
Reference Manual to CFGR SYNCPOL LL_CRS_GetSyncPolarity
LL API cross
reference:
LL_CRS_ConfigSynchronization
Function name __STATIC_INLINE void LL_CRS_ConfigSynchronization
(uint32_t HSI48CalibrationValue, uint32_t ErrorLimitValue,
uint32_t ReloadValue, uint32_t Settings)
Function description Configure CRS for the synchronization.
LL_CRS_GenerateEvent_SWSYNC
Function name __STATIC_INLINE void LL_CRS_GenerateEvent_SWSYNC
(void )
Function description Generate software SYNC event.
Return values None
Reference Manual to CR SWSYNC LL_CRS_GenerateEvent_SWSYNC
LL API cross
reference:
LL_CRS_GetFreqErrorDirection
Function name __STATIC_INLINE uint32_t LL_CRS_GetFreqErrorDirection
(void )
Function description Get the frequency error direction latched in the time of the last
SYNC event.
Return values Returned: value can be one of the following values:
LL_CRS_FREQ_ERROR_DIR_UP
LL_CRS_FREQ_ERROR_DIR_DOWN
Reference Manual to ISR FEDIR LL_CRS_GetFreqErrorDirection
LL API cross
reference:
LL_CRS_IsActiveFlag_SYNCOK
Function name __STATIC_INLINE uint32_t LL_CRS_IsActiveFlag_SYNCOK
(void )
Function description Check if SYNC event OK signal occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to ISR SYNCOKF LL_CRS_IsActiveFlag_SYNCOK
LL API cross
reference:
LL_CRS_IsActiveFlag_SYNCWARN
Function name __STATIC_INLINE uint32_t
LL_CRS_IsActiveFlag_SYNCWARN (void )
Function description Check if SYNC warning signal occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to ISR SYNCWARNF LL_CRS_IsActiveFlag_SYNCWARN
LL API cross
reference:
LL_CRS_IsActiveFlag_ERR
Function name __STATIC_INLINE uint32_t LL_CRS_IsActiveFlag_ERR (void )
Function description Check if Synchronization or trimming error signal occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to ISR ERRF LL_CRS_IsActiveFlag_ERR
LL API cross
reference:
LL_CRS_IsActiveFlag_ESYNC
Function name __STATIC_INLINE uint32_t LL_CRS_IsActiveFlag_ESYNC
(void )
Function description Check if Expected SYNC signal occurred or not.
Return values State: of bit (1 or 0).
LL_CRS_IsActiveFlag_SYNCERR
Function name __STATIC_INLINE uint32_t LL_CRS_IsActiveFlag_SYNCERR
(void )
Function description Check if SYNC error signal occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to ISR SYNCERR LL_CRS_IsActiveFlag_SYNCERR
LL API cross
reference:
LL_CRS_IsActiveFlag_SYNCMISS
Function name __STATIC_INLINE uint32_t LL_CRS_IsActiveFlag_SYNCMISS
(void )
Function description Check if SYNC missed error signal occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to ISR SYNCMISS LL_CRS_IsActiveFlag_SYNCMISS
LL API cross
reference:
LL_CRS_IsActiveFlag_TRIMOVF
Function name __STATIC_INLINE uint32_t LL_CRS_IsActiveFlag_TRIMOVF
(void )
Function description Check if Trimming overflow or underflow occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to ISR TRIMOVF LL_CRS_IsActiveFlag_TRIMOVF
LL API cross
reference:
LL_CRS_ClearFlag_SYNCOK
Function name __STATIC_INLINE void LL_CRS_ClearFlag_SYNCOK (void )
Function description Clear the SYNC event OK flag.
Return values None
Reference Manual to ICR SYNCOKC LL_CRS_ClearFlag_SYNCOK
LL API cross
reference:
LL_CRS_ClearFlag_SYNCWARN
Function name __STATIC_INLINE void LL_CRS_ClearFlag_SYNCWARN (void
)
LL_CRS_ClearFlag_ERR
Function name __STATIC_INLINE void LL_CRS_ClearFlag_ERR (void )
Function description Clear TRIMOVF, SYNCMISS and SYNCERR bits and
consequently also the ERR flag.
Return values None
Reference Manual to ICR ERRC LL_CRS_ClearFlag_ERR
LL API cross
reference:
LL_CRS_ClearFlag_ESYNC
Function name __STATIC_INLINE void LL_CRS_ClearFlag_ESYNC (void )
Function description Clear Expected SYNC flag.
Return values None
Reference Manual to ICR ESYNCC LL_CRS_ClearFlag_ESYNC
LL API cross
reference:
LL_CRS_EnableIT_SYNCOK
Function name __STATIC_INLINE void LL_CRS_EnableIT_SYNCOK (void )
Function description Enable SYNC event OK interrupt.
Return values None
Reference Manual to CR SYNCOKIE LL_CRS_EnableIT_SYNCOK
LL API cross
reference:
LL_CRS_DisableIT_SYNCOK
Function name __STATIC_INLINE void LL_CRS_DisableIT_SYNCOK (void )
Function description Disable SYNC event OK interrupt.
Return values None
Reference Manual to CR SYNCOKIE LL_CRS_DisableIT_SYNCOK
LL API cross
reference:
LL_CRS_EnableIT_SYNCWARN
Function name __STATIC_INLINE void LL_CRS_EnableIT_SYNCWARN (void )
Function description Enable SYNC warning interrupt.
Return values None
Reference Manual to CR SYNCWARNIE LL_CRS_EnableIT_SYNCWARN
LL API cross
reference:
LL_CRS_DisableIT_SYNCWARN
Function name __STATIC_INLINE void LL_CRS_DisableIT_SYNCWARN (void
)
Function description Disable SYNC warning interrupt.
Return values None
Reference Manual to CR SYNCWARNIE LL_CRS_DisableIT_SYNCWARN
LL API cross
reference:
LL_CRS_IsEnabledIT_SYNCWARN
Function name __STATIC_INLINE uint32_t LL_CRS_IsEnabledIT_SYNCWARN
(void )
Function description Check if SYNC warning interrupt is enabled or not.
Return values State: of bit (1 or 0).
Reference Manual to CR SYNCWARNIE LL_CRS_IsEnabledIT_SYNCWARN
LL API cross
reference:
LL_CRS_EnableIT_ERR
Function name __STATIC_INLINE void LL_CRS_EnableIT_ERR (void )
Function description Enable Synchronization or trimming error interrupt.
Return values None
Reference Manual to CR ERRIE LL_CRS_EnableIT_ERR
LL API cross
reference:
LL_CRS_IsEnabledIT_ERR
Function name __STATIC_INLINE uint32_t LL_CRS_IsEnabledIT_ERR (void )
Function description Check if Synchronization or trimming error interrupt is enabled or
not.
Return values State: of bit (1 or 0).
Reference Manual to CR ERRIE LL_CRS_IsEnabledIT_ERR
LL API cross
reference:
LL_CRS_EnableIT_ESYNC
Function name __STATIC_INLINE void LL_CRS_EnableIT_ESYNC (void )
Function description Enable Expected SYNC interrupt.
Return values None
Reference Manual to CR ESYNCIE LL_CRS_EnableIT_ESYNC
LL API cross
reference:
LL_CRS_DisableIT_ESYNC
Function name __STATIC_INLINE void LL_CRS_DisableIT_ESYNC (void )
Function description Disable Expected SYNC interrupt.
Return values None
Reference Manual to CR ESYNCIE LL_CRS_DisableIT_ESYNC
LL API cross
reference:
LL_CRS_IsEnabledIT_ESYNC
Function name __STATIC_INLINE uint32_t LL_CRS_IsEnabledIT_ESYNC
(void )
Function description Check if Expected SYNC interrupt is enabled or not.
Return values State: of bit (1 or 0).
Reference Manual to CR ESYNCIE LL_CRS_IsEnabledIT_ESYNC
LL API cross
reference:
LL_CRS_ERRORLIMIT_DEFAULT
LL_CRS_HSI48CALIBRATION_DEFAULT Notes:
The default value is 32, which
corresponds to the middle of the
trimming interval. The trimming step is
around 67 kHz between two consecutive
TRIM steps. A higher TRIM value
corresponds to a higher output frequency
LL_DAC_SetTriggerSource
Function name __STATIC_INLINE void LL_DAC_SetTriggerSource
(DAC_TypeDef * DACx, uint32_t DAC_Channel, uint32_t
TriggerSource)
Function description Set the conversion trigger source for the selected DAC channel.
Parameters DACx: DAC instance
DAC_Channel: This parameter can be one of the following
LL_DAC_GetTriggerSource
Function name __STATIC_INLINE uint32_t LL_DAC_GetTriggerSource
(DAC_TypeDef * DACx, uint32_t DAC_Channel)
Function description Get the conversion trigger source for the selected DAC channel.
Parameters DACx: DAC instance
DAC_Channel: This parameter can be one of the following
values: (1) On this STM32 serie, parameter not available on
all devices. Refer to device datasheet for channels
availability.
LL_DAC_CHANNEL_1
LL_DAC_CHANNEL_2 (1)
Return values Returned: value can be one of the following values:
LL_DAC_TRIG_SOFTWARE
LL_DAC_TRIG_EXT_TIM2_TRGO
LL_DAC_TRIG_EXT_TIM3_TRGO
LL_DAC_TRIG_EXT_TIM4_TRGO
LL_DAC_TRIG_EXT_TIM6_TRGO
LL_DAC_TRIG_EXT_TIM7_TRGO
LL_DAC_TRIG_EXT_TIM15_TRGO
LL_DAC_TRIG_EXT_EXTI_LINE9
Notes For conversion trigger source to be effective, DAC trigger
must be enabled using function LL_DAC_EnableTrigger().
Availability of parameters of trigger sources from timer
LL_DAC_SetWaveAutoGeneration
Function name __STATIC_INLINE void LL_DAC_SetWaveAutoGeneration
(DAC_TypeDef * DACx, uint32_t DAC_Channel, uint32_t
WaveAutoGeneration)
Function description Set the waveform automatic generation mode for the selected DAC
channel.
Parameters DACx: DAC instance
DAC_Channel: This parameter can be one of the following
values: (1) On this STM32 serie, parameter not available on
all devices. Refer to device datasheet for channels availability.
LL_DAC_CHANNEL_1
LL_DAC_CHANNEL_2 (1)
WaveAutoGeneration: This parameter can be one of the
following values:
LL_DAC_WAVE_AUTO_GENERATION_NONE
LL_DAC_WAVE_AUTO_GENERATION_NOISE
LL_DAC_WAVE_AUTO_GENERATION_TRIANGLE
Return values None
Reference Manual to CR WAVE1 LL_DAC_SetWaveAutoGeneration
LL API cross CR WAVE2 LL_DAC_SetWaveAutoGeneration
reference:
LL_DAC_GetWaveAutoGeneration
Function name __STATIC_INLINE uint32_t LL_DAC_GetWaveAutoGeneration
(DAC_TypeDef * DACx, uint32_t DAC_Channel)
Function description Get the waveform automatic generation mode for the selected DAC
channel.
Parameters DACx: DAC instance
DAC_Channel: This parameter can be one of the following
values: (1) On this STM32 serie, parameter not available on
all devices. Refer to device datasheet for channels availability.
LL_DAC_CHANNEL_1
LL_DAC_CHANNEL_2 (1)
Return values Returned: value can be one of the following values:
LL_DAC_WAVE_AUTO_GENERATION_NONE
LL_DAC_WAVE_AUTO_GENERATION_NOISE
LL_DAC_WAVE_AUTO_GENERATION_TRIANGLE
Reference Manual to CR WAVE1 LL_DAC_GetWaveAutoGeneration
LL API cross CR WAVE2 LL_DAC_GetWaveAutoGeneration
reference:
LL_DAC_GetWaveNoiseLFSR
Function name __STATIC_INLINE uint32_t LL_DAC_GetWaveNoiseLFSR
(DAC_TypeDef * DACx, uint32_t DAC_Channel)
Function description Set the noise waveform generation for the selected DAC channel:
Noise mode and parameters LFSR (linear feedback shift register).
Parameters DACx: DAC instance
DAC_Channel: This parameter can be one of the following
values: (1) On this STM32 serie, parameter not available on
all devices. Refer to device datasheet for channels
availability.
LL_DAC_CHANNEL_1
LL_DAC_SetWaveTriangleAmplitude
Function name __STATIC_INLINE void LL_DAC_SetWaveTriangleAmplitude
(DAC_TypeDef * DACx, uint32_t DAC_Channel, uint32_t
TriangleAmplitude)
Function description Set the triangle waveform generation for the selected DAC
channel: triangle mode and amplitude.
Parameters DACx: DAC instance
DAC_Channel: This parameter can be one of the following
values: (1) On this STM32 serie, parameter not available on
all devices. Refer to device datasheet for channels
availability.
LL_DAC_CHANNEL_1
LL_DAC_CHANNEL_2 (1)
TriangleAmplitude: This parameter can be one of the
following values:
LL_DAC_TRIANGLE_AMPLITUDE_1
LL_DAC_TRIANGLE_AMPLITUDE_3
LL_DAC_TRIANGLE_AMPLITUDE_7
LL_DAC_TRIANGLE_AMPLITUDE_15
LL_DAC_TRIANGLE_AMPLITUDE_31
LL_DAC_TRIANGLE_AMPLITUDE_63
LL_DAC_TRIANGLE_AMPLITUDE_127
LL_DAC_TRIANGLE_AMPLITUDE_255
LL_DAC_TRIANGLE_AMPLITUDE_511
LL_DAC_TRIANGLE_AMPLITUDE_1023
LL_DAC_TRIANGLE_AMPLITUDE_2047
LL_DAC_TRIANGLE_AMPLITUDE_4095
Return values None
Notes For wave generation to be effective, DAC channel wave
generation mode must be enabled using function
LL_DAC_SetWaveAutoGeneration().
LL_DAC_GetWaveTriangleAmplitude
Function name __STATIC_INLINE uint32_t
LL_DAC_GetWaveTriangleAmplitude (DAC_TypeDef * DACx,
uint32_t DAC_Channel)
Function description Set the triangle waveform generation for the selected DAC
channel: triangle mode and amplitude.
Parameters DACx: DAC instance
DAC_Channel: This parameter can be one of the following
values: (1) On this STM32 serie, parameter not available on
all devices. Refer to device datasheet for channels
availability.
LL_DAC_CHANNEL_1
LL_DAC_CHANNEL_2 (1)
Return values Returned: value can be one of the following values:
LL_DAC_TRIANGLE_AMPLITUDE_1
LL_DAC_TRIANGLE_AMPLITUDE_3
LL_DAC_TRIANGLE_AMPLITUDE_7
LL_DAC_TRIANGLE_AMPLITUDE_15
LL_DAC_TRIANGLE_AMPLITUDE_31
LL_DAC_TRIANGLE_AMPLITUDE_63
LL_DAC_TRIANGLE_AMPLITUDE_127
LL_DAC_TRIANGLE_AMPLITUDE_255
LL_DAC_TRIANGLE_AMPLITUDE_511
LL_DAC_TRIANGLE_AMPLITUDE_1023
LL_DAC_TRIANGLE_AMPLITUDE_2047
LL_DAC_TRIANGLE_AMPLITUDE_4095
Reference Manual to CR MAMP1 LL_DAC_GetWaveTriangleAmplitude
LL API cross CR MAMP2 LL_DAC_GetWaveTriangleAmplitude
reference:
LL_DAC_SetOutputBuffer
Function name __STATIC_INLINE void LL_DAC_SetOutputBuffer
(DAC_TypeDef * DACx, uint32_t DAC_Channel, uint32_t
OutputBuffer)
Function description Set the output buffer for the selected DAC channel.
Parameters DACx: DAC instance
DAC_Channel: This parameter can be one of the following
values: (1) On this STM32 serie, parameter not available on
all devices. Refer to device datasheet for channels
availability.
LL_DAC_CHANNEL_1
LL_DAC_CHANNEL_2 (1)
LL_DAC_GetOutputBuffer
Function name __STATIC_INLINE uint32_t LL_DAC_GetOutputBuffer
(DAC_TypeDef * DACx, uint32_t DAC_Channel)
Function description Get the output buffer state for the selected DAC channel.
Parameters DACx: DAC instance
DAC_Channel: This parameter can be one of the following
values: (1) On this STM32 serie, parameter not available on
all devices. Refer to device datasheet for channels
availability.
LL_DAC_CHANNEL_1
LL_DAC_CHANNEL_2 (1)
Return values Returned: value can be one of the following values:
LL_DAC_OUTPUT_BUFFER_ENABLE
LL_DAC_OUTPUT_BUFFER_DISABLE
Reference Manual to CR BOFF1 LL_DAC_GetOutputBuffer
LL API cross CR BOFF2 LL_DAC_GetOutputBuffer
reference:
LL_DAC_EnableDMAReq
Function name __STATIC_INLINE void LL_DAC_EnableDMAReq
(DAC_TypeDef * DACx, uint32_t DAC_Channel)
Function description Enable DAC DMA transfer request of the selected channel.
Parameters DACx: DAC instance
DAC_Channel: This parameter can be one of the following
values: (1) On this STM32 serie, parameter not available on
all devices. Refer to device datasheet for channels
availability.
LL_DAC_CHANNEL_1
LL_DAC_CHANNEL_2 (1)
Return values None
Notes To configure DMA source address (peripheral address), use
function LL_DAC_DMA_GetRegAddr().
Reference Manual to CR DMAEN1 LL_DAC_EnableDMAReq
LL API cross CR DMAEN2 LL_DAC_EnableDMAReq
reference:
LL_DAC_IsDMAReqEnabled
Function name __STATIC_INLINE uint32_t LL_DAC_IsDMAReqEnabled
(DAC_TypeDef * DACx, uint32_t DAC_Channel)
Function description Get DAC DMA transfer request state of the selected channel.
Parameters DACx: DAC instance
DAC_Channel: This parameter can be one of the following
values: (1) On this STM32 serie, parameter not available on
all devices. Refer to device datasheet for channels
availability.
LL_DAC_CHANNEL_1
LL_DAC_CHANNEL_2 (1)
Return values State: of bit (1 or 0).
Reference Manual to CR DMAEN1 LL_DAC_IsDMAReqEnabled
LL API cross CR DMAEN2 LL_DAC_IsDMAReqEnabled
reference:
LL_DAC_DMA_GetRegAddr
Function name __STATIC_INLINE uint32_t LL_DAC_DMA_GetRegAddr
(DAC_TypeDef * DACx, uint32_t DAC_Channel, uint32_t Register)
Function Function to help to configure DMA transfer to DAC: retrieve the DAC
description register address from DAC instance and a list of DAC registers
intended to be used (most commonly) with DMA transfer.
Parameters DACx: DAC instance
DAC_Channel: This parameter can be one of the following
values: (1) On this STM32 serie, parameter not available on all
devices. Refer to device datasheet for channels availability.
LL_DAC_CHANNEL_1
LL_DAC_CHANNEL_2 (1)
LL_DAC_Enable
Function name __STATIC_INLINE void LL_DAC_Enable (DAC_TypeDef *
DACx, uint32_t DAC_Channel)
Function description Enable DAC selected channel.
Parameters DACx: DAC instance
DAC_Channel: This parameter can be one of the following
values: (1) On this STM32 serie, parameter not available on
all devices. Refer to device datasheet for channels
availability.
LL_DAC_CHANNEL_1
LL_DAC_CHANNEL_2 (1)
Return values None
Notes After enable from off state, DAC channel requires a delay for
output voltage to reach accuracy +/- 1 LSB. Refer to device
datasheet, parameter "tWAKEUP".
Reference Manual to CR EN1 LL_DAC_Enable
LL API cross CR EN2 LL_DAC_Enable
reference:
LL_DAC_Disable
Function name __STATIC_INLINE void LL_DAC_Disable (DAC_TypeDef *
DACx, uint32_t DAC_Channel)
Function description Disable DAC selected channel.
Parameters DACx: DAC instance
DAC_Channel: This parameter can be one of the following
LL_DAC_IsEnabled
Function name __STATIC_INLINE uint32_t LL_DAC_IsEnabled (DAC_TypeDef
* DACx, uint32_t DAC_Channel)
Function description Get DAC enable state of the selected channel.
Parameters DACx: DAC instance
DAC_Channel: This parameter can be one of the following
values: (1) On this STM32 serie, parameter not available on
all devices. Refer to device datasheet for channels
availability.
LL_DAC_CHANNEL_1
LL_DAC_CHANNEL_2 (1)
Return values State: of bit (1 or 0).
Reference Manual to CR EN1 LL_DAC_IsEnabled
LL API cross CR EN2 LL_DAC_IsEnabled
reference:
LL_DAC_EnableTrigger
Function name __STATIC_INLINE void LL_DAC_EnableTrigger
(DAC_TypeDef * DACx, uint32_t DAC_Channel)
Function description Enable DAC trigger of the selected channel.
Parameters DACx: DAC instance
DAC_Channel: This parameter can be one of the following
values: (1) On this STM32 serie, parameter not available on
all devices. Refer to device datasheet for channels
availability.
LL_DAC_CHANNEL_1
LL_DAC_CHANNEL_2 (1)
Return values None
Notes - If DAC trigger is disabled, DAC conversion is performed
automatically once the data holding register is updated, using
functions "LL_DAC_ConvertData{8; 12}{Right; Left}
Aligned()": LL_DAC_ConvertData12RightAligned(), ... If DAC
trigger is enabled, DAC conversion is performed only when a
hardware of software trigger event is occurring. Select trigger
source using function LL_DAC_SetTriggerSource().
Reference Manual to CR TEN1 LL_DAC_EnableTrigger
LL API cross
LL_DAC_DisableTrigger
Function name __STATIC_INLINE void LL_DAC_DisableTrigger
(DAC_TypeDef * DACx, uint32_t DAC_Channel)
Function description Disable DAC trigger of the selected channel.
Parameters DACx: DAC instance
DAC_Channel: This parameter can be one of the following
values: (1) On this STM32 serie, parameter not available on
all devices. Refer to device datasheet for channels
availability.
LL_DAC_CHANNEL_1
LL_DAC_CHANNEL_2 (1)
Return values None
Reference Manual to CR TEN1 LL_DAC_DisableTrigger
LL API cross CR TEN2 LL_DAC_DisableTrigger
reference:
LL_DAC_IsTriggerEnabled
Function name __STATIC_INLINE uint32_t LL_DAC_IsTriggerEnabled
(DAC_TypeDef * DACx, uint32_t DAC_Channel)
Function description Get DAC trigger state of the selected channel.
Parameters DACx: DAC instance
DAC_Channel: This parameter can be one of the following
values: (1) On this STM32 serie, parameter not available on
all devices. Refer to device datasheet for channels
availability.
LL_DAC_CHANNEL_1
LL_DAC_CHANNEL_2 (1)
Return values State: of bit (1 or 0).
Reference Manual to CR TEN1 LL_DAC_IsTriggerEnabled
LL API cross CR TEN2 LL_DAC_IsTriggerEnabled
reference:
LL_DAC_TrigSWConversion
Function name __STATIC_INLINE void LL_DAC_TrigSWConversion
(DAC_TypeDef * DACx, uint32_t DAC_Channel)
Function description Trig DAC conversion by software for the selected DAC channel.
Parameters DACx: DAC instance
DAC_Channel: This parameter can a combination of the
following values: (1) On this STM32 serie, parameter not
available on all devices. Refer to device datasheet for
channels availability.
LL_DAC_CHANNEL_1
LL_DAC_CHANNEL_2 (1)
LL_DAC_ConvertData12RightAligned
Function name __STATIC_INLINE void LL_DAC_ConvertData12RightAligned
(DAC_TypeDef * DACx, uint32_t DAC_Channel, uint32_t Data)
Function description Set the data to be loaded in the data holding register in format 12
bits left alignment (LSB aligned on bit 0), for the selected DAC
channel.
Parameters DACx: DAC instance
DAC_Channel: This parameter can be one of the following
values: (1) On this STM32 serie, parameter not available on
all devices. Refer to device datasheet for channels
availability.
LL_DAC_CHANNEL_1
LL_DAC_CHANNEL_2 (1)
Data: Value between Min_Data=0x000 and
Max_Data=0xFFF
Return values None
Reference Manual to DHR12R1 DACC1DHR LL_DAC_ConvertData12RightAligned
LL API cross DHR12R2 DACC2DHR
reference: LL_DAC_ConvertData12RightAligned
LL_DAC_ConvertData12LeftAligned
Function name __STATIC_INLINE void LL_DAC_ConvertData12LeftAligned
(DAC_TypeDef * DACx, uint32_t DAC_Channel, uint32_t Data)
Function description Set the data to be loaded in the data holding register in format 12
bits left alignment (MSB aligned on bit 15), for the selected DAC
channel.
Parameters DACx: DAC instance
DAC_Channel: This parameter can be one of the following
values: (1) On this STM32 serie, parameter not available on
all devices. Refer to device datasheet for channels
availability.
LL_DAC_CHANNEL_1
LL_DAC_CHANNEL_2 (1)
Data: Value between Min_Data=0x000 and
LL_DAC_ConvertData8RightAligned
Function name __STATIC_INLINE void LL_DAC_ConvertData8RightAligned
(DAC_TypeDef * DACx, uint32_t DAC_Channel, uint32_t Data)
Function description Set the data to be loaded in the data holding register in format 8
bits left alignment (LSB aligned on bit 0), for the selected DAC
channel.
Parameters DACx: DAC instance
DAC_Channel: This parameter can be one of the following
values: (1) On this STM32 serie, parameter not available on
all devices. Refer to device datasheet for channels
availability.
LL_DAC_CHANNEL_1
LL_DAC_CHANNEL_2 (1)
Data: Value between Min_Data=0x00 and Max_Data=0xFF
Return values None
Reference Manual to DHR8R1 DACC1DHR LL_DAC_ConvertData8RightAligned
LL API cross DHR8R2 DACC2DHR LL_DAC_ConvertData8RightAligned
reference:
LL_DAC_ConvertDualData12RightAligned
Function name __STATIC_INLINE void
LL_DAC_ConvertDualData12RightAligned (DAC_TypeDef *
DACx, uint32_t DataChannel1, uint32_t DataChannel2)
Function description Set the data to be loaded in the data holding register in format 12
bits left alignment (LSB aligned on bit 0), for both DAC channels.
Parameters DACx: DAC instance
DataChannel1: Value between Min_Data=0x000 and
Max_Data=0xFFF
DataChannel2: Value between Min_Data=0x000 and
Max_Data=0xFFF
Return values None
Reference Manual to DHR12RD DACC1DHR
LL API cross LL_DAC_ConvertDualData12RightAligned
reference: DHR12RD DACC2DHR
LL_DAC_ConvertDualData12RightAligned
LL_DAC_ConvertDualData8RightAligned
Function name __STATIC_INLINE void
LL_DAC_ConvertDualData8RightAligned (DAC_TypeDef *
DACx, uint32_t DataChannel1, uint32_t DataChannel2)
Function description Set the data to be loaded in the data holding register in format 8
bits left alignment (LSB aligned on bit 0), for both DAC channels.
Parameters DACx: DAC instance
DataChannel1: Value between Min_Data=0x00 and
Max_Data=0xFF
DataChannel2: Value between Min_Data=0x00 and
Max_Data=0xFF
Return values None
Reference Manual to DHR8RD DACC1DHR
LL API cross LL_DAC_ConvertDualData8RightAligned
reference: DHR8RD DACC2DHR
LL_DAC_ConvertDualData8RightAligned
LL_DAC_RetrieveOutputData
Function name __STATIC_INLINE uint32_t LL_DAC_RetrieveOutputData
(DAC_TypeDef * DACx, uint32_t DAC_Channel)
Function description Retrieve output data currently generated for the selected DAC
channel.
Parameters DACx: DAC instance
DAC_Channel: This parameter can be one of the following
values: (1) On this STM32 serie, parameter not available on
all devices. Refer to device datasheet for channels
availability.
LL_DAC_CHANNEL_1
LL_DAC_CHANNEL_2 (1)
LL_DAC_IsActiveFlag_DMAUDR1
Function name __STATIC_INLINE uint32_t LL_DAC_IsActiveFlag_DMAUDR1
(DAC_TypeDef * DACx)
Function description Get DAC underrun flag for DAC channel 1.
Parameters DACx: DAC instance
Return values State: of bit (1 or 0).
Reference Manual to SR DMAUDR1 LL_DAC_IsActiveFlag_DMAUDR1
LL API cross
reference:
LL_DAC_IsActiveFlag_DMAUDR2
Function name __STATIC_INLINE uint32_t LL_DAC_IsActiveFlag_DMAUDR2
(DAC_TypeDef * DACx)
Function description Get DAC underrun flag for DAC channel 2.
Parameters DACx: DAC instance
Return values State: of bit (1 or 0).
Reference Manual to SR DMAUDR2 LL_DAC_IsActiveFlag_DMAUDR2
LL API cross
reference:
LL_DAC_ClearFlag_DMAUDR1
Function name __STATIC_INLINE void LL_DAC_ClearFlag_DMAUDR1
(DAC_TypeDef * DACx)
Function description Clear DAC underrun flag for DAC channel 1.
Parameters DACx: DAC instance
Return values None
Reference Manual to SR DMAUDR1 LL_DAC_ClearFlag_DMAUDR1
LL API cross
reference:
LL_DAC_EnableIT_DMAUDR1
Function name __STATIC_INLINE void LL_DAC_EnableIT_DMAUDR1
(DAC_TypeDef * DACx)
Function description Enable DMA underrun interrupt for DAC channel 1.
Parameters DACx: DAC instance
Return values None
Reference Manual to CR DMAUDRIE1 LL_DAC_EnableIT_DMAUDR1
LL API cross
reference:
LL_DAC_EnableIT_DMAUDR2
Function name __STATIC_INLINE void LL_DAC_EnableIT_DMAUDR2
(DAC_TypeDef * DACx)
Function description Enable DMA underrun interrupt for DAC channel 2.
Parameters DACx: DAC instance
Return values None
Reference Manual to CR DMAUDRIE2 LL_DAC_EnableIT_DMAUDR2
LL API cross
reference:
LL_DAC_DisableIT_DMAUDR1
Function name __STATIC_INLINE void LL_DAC_DisableIT_DMAUDR1
(DAC_TypeDef * DACx)
Function description Disable DMA underrun interrupt for DAC channel 1.
Parameters DACx: DAC instance
Return values None
Reference Manual to CR DMAUDRIE1 LL_DAC_DisableIT_DMAUDR1
LL API cross
reference:
LL_DAC_IsEnabledIT_DMAUDR1
Function name __STATIC_INLINE uint32_t LL_DAC_IsEnabledIT_DMAUDR1
(DAC_TypeDef * DACx)
Function description Get DMA underrun interrupt for DAC channel 1.
Parameters DACx: DAC instance
Return values State: of bit (1 or 0).
Reference Manual to CR DMAUDRIE1 LL_DAC_IsEnabledIT_DMAUDR1
LL API cross
reference:
LL_DAC_IsEnabledIT_DMAUDR2
Function name __STATIC_INLINE uint32_t LL_DAC_IsEnabledIT_DMAUDR2
(DAC_TypeDef * DACx)
Function description Get DMA underrun interrupt for DAC channel 2.
Parameters DACx: DAC instance
Return values State: of bit (1 or 0).
Reference Manual to CR DMAUDRIE2 LL_DAC_IsEnabledIT_DMAUDR2
LL API cross
reference:
LL_DAC_DeInit
Function name ErrorStatus LL_DAC_DeInit (DAC_TypeDef * DACx)
Function description De-initialize registers of the selected DAC instance to their default
reset values.
Parameters DACx: DAC instance
Return values An: ErrorStatus enumeration value:
SUCCESS: DAC registers are de-initialized
ERROR: not applicable
LL_DAC_StructInit
Function name void LL_DAC_StructInit (LL_DAC_InitTypeDef *
DAC_InitStruct)
Function description Set each LL_DAC_InitTypeDef field to default value.
Parameters DAC_InitStruct: pointer to a LL_DAC_InitTypeDef structure
whose fields will be set to default values.
Return values None
LL_DMA_EnableChannel
Function name __STATIC_INLINE void LL_DMA_EnableChannel
(DMA_TypeDef * DMAx, uint32_t Channel)
Function description Enable DMA channel.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
Return values None
Reference Manual to CCR EN LL_DMA_EnableChannel
LL API cross
reference:
LL_DMA_DisableChannel
Function name __STATIC_INLINE void LL_DMA_DisableChannel
(DMA_TypeDef * DMAx, uint32_t Channel)
Function description Disable DMA channel.
LL_DMA_IsEnabledChannel
Function name __STATIC_INLINE uint32_t LL_DMA_IsEnabledChannel
(DMA_TypeDef * DMAx, uint32_t Channel)
Function description Check if DMA channel is enabled or disabled.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
Return values State: of bit (1 or 0).
Reference Manual to CCR EN LL_DMA_IsEnabledChannel
LL API cross
reference:
LL_DMA_ConfigTransfer
Function name __STATIC_INLINE void LL_DMA_ConfigTransfer
(DMA_TypeDef * DMAx, uint32_t Channel, uint32_t
Configuration)
Function description Configure all parameters link to DMA transfer.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
LL_DMA_SetDataTransferDirection
Function name __STATIC_INLINE void LL_DMA_SetDataTransferDirection
(DMA_TypeDef * DMAx, uint32_t Channel, uint32_t Direction)
Function description Set Data transfer direction (read from peripheral or from memory).
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
Direction: This parameter can be one of the following
values:
LL_DMA_DIRECTION_PERIPH_TO_MEMORY
LL_DMA_DIRECTION_MEMORY_TO_PERIPH
LL_DMA_GetDataTransferDirection
Function name __STATIC_INLINE uint32_t
LL_DMA_GetDataTransferDirection (DMA_TypeDef * DMAx,
uint32_t Channel)
Function description Get Data transfer direction (read from peripheral or from memory).
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
Return values Returned: value can be one of the following values:
LL_DMA_DIRECTION_PERIPH_TO_MEMORY
LL_DMA_DIRECTION_MEMORY_TO_PERIPH
LL_DMA_DIRECTION_MEMORY_TO_MEMORY
Reference Manual to CCR DIR LL_DMA_GetDataTransferDirection
LL API cross CCR MEM2MEM LL_DMA_GetDataTransferDirection
reference:
LL_DMA_SetMode
Function name __STATIC_INLINE void LL_DMA_SetMode (DMA_TypeDef *
DMAx, uint32_t Channel, uint32_t Mode)
Function description Set DMA mode circular or normal.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
Mode: This parameter can be one of the following values:
LL_DMA_MODE_NORMAL
LL_DMA_MODE_CIRCULAR
Return values None
Notes The circular buffer mode cannot be used if the memory-to-
LL_DMA_GetMode
Function name __STATIC_INLINE uint32_t LL_DMA_GetMode (DMA_TypeDef
* DMAx, uint32_t Channel)
Function description Get DMA mode circular or normal.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
Return values Returned: value can be one of the following values:
LL_DMA_MODE_NORMAL
LL_DMA_MODE_CIRCULAR
Reference Manual to CCR CIRC LL_DMA_GetMode
LL API cross
reference:
LL_DMA_SetPeriphIncMode
Function name __STATIC_INLINE void LL_DMA_SetPeriphIncMode
(DMA_TypeDef * DMAx, uint32_t Channel, uint32_t
PeriphOrM2MSrcIncMode)
Function description Set Peripheral increment mode.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
PeriphOrM2MSrcIncMode: This parameter can be one of
the following values:
LL_DMA_PERIPH_INCREMENT
LL_DMA_PERIPH_NOINCREMENT
Return values None
Reference Manual to CCR PINC LL_DMA_SetPeriphIncMode
LL API cross
LL_DMA_GetPeriphIncMode
Function name __STATIC_INLINE uint32_t LL_DMA_GetPeriphIncMode
(DMA_TypeDef * DMAx, uint32_t Channel)
Function description Get Peripheral increment mode.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
Return values Returned: value can be one of the following values:
LL_DMA_PERIPH_INCREMENT
LL_DMA_PERIPH_NOINCREMENT
Reference Manual to CCR PINC LL_DMA_GetPeriphIncMode
LL API cross
reference:
LL_DMA_SetMemoryIncMode
Function name __STATIC_INLINE void LL_DMA_SetMemoryIncMode
(DMA_TypeDef * DMAx, uint32_t Channel, uint32_t
MemoryOrM2MDstIncMode)
Function description Set Memory increment mode.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
MemoryOrM2MDstIncMode: This parameter can be one of
the following values:
LL_DMA_MEMORY_INCREMENT
LL_DMA_MEMORY_NOINCREMENT
Return values None
Reference Manual to CCR MINC LL_DMA_SetMemoryIncMode
LL API cross
reference:
LL_DMA_SetPeriphSize
Function name __STATIC_INLINE void LL_DMA_SetPeriphSize
(DMA_TypeDef * DMAx, uint32_t Channel, uint32_t
PeriphOrM2MSrcDataSize)
Function description Set Peripheral size.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
PeriphOrM2MSrcDataSize: This parameter can be one of
the following values:
LL_DMA_PDATAALIGN_BYTE
LL_DMA_PDATAALIGN_HALFWORD
LL_DMA_PDATAALIGN_WORD
Return values None
Reference Manual to CCR PSIZE LL_DMA_SetPeriphSize
LL API cross
reference:
LL_DMA_SetMemorySize
Function name __STATIC_INLINE void LL_DMA_SetMemorySize
(DMA_TypeDef * DMAx, uint32_t Channel, uint32_t
MemoryOrM2MDstDataSize)
Function description Set Memory size.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
MemoryOrM2MDstDataSize: This parameter can be one of
the following values:
LL_DMA_MDATAALIGN_BYTE
LL_DMA_MDATAALIGN_HALFWORD
LL_DMA_MDATAALIGN_WORD
Return values None
Reference Manual to CCR MSIZE LL_DMA_SetMemorySize
LL API cross
reference:
LL_DMA_SetChannelPriorityLevel
Function name __STATIC_INLINE void LL_DMA_SetChannelPriorityLevel
(DMA_TypeDef * DMAx, uint32_t Channel, uint32_t Priority)
Function description Set Channel priority level.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
Priority: This parameter can be one of the following values:
LL_DMA_PRIORITY_LOW
LL_DMA_PRIORITY_MEDIUM
LL_DMA_PRIORITY_HIGH
LL_DMA_PRIORITY_VERYHIGH
Return values None
Reference Manual to CCR PL LL_DMA_SetChannelPriorityLevel
LL API cross
reference:
LL_DMA_SetDataLength
Function name __STATIC_INLINE void LL_DMA_SetDataLength
(DMA_TypeDef * DMAx, uint32_t Channel, uint32_t NbData)
Function description Set Number of data to transfer.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
NbData: Between Min_Data = 0 and Max_Data =
0x0000FFFF
Return values None
Notes This action has no effect if channel is enabled.
Reference Manual to CNDTR NDT LL_DMA_SetDataLength
LL API cross
reference:
LL_DMA_ConfigAddresses
Function name __STATIC_INLINE void LL_DMA_ConfigAddresses
(DMA_TypeDef * DMAx, uint32_t Channel, uint32_t
SrcAddress, uint32_t DstAddress, uint32_t Direction)
Function description Configure the Source and Destination addresses.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
SrcAddress: Between Min_Data = 0 and Max_Data =
0xFFFFFFFF
DstAddress: Between Min_Data = 0 and Max_Data =
0xFFFFFFFF
Direction: This parameter can be one of the following
values:
LL_DMA_DIRECTION_PERIPH_TO_MEMORY
LL_DMA_DIRECTION_MEMORY_TO_PERIPH
LL_DMA_DIRECTION_MEMORY_TO_MEMORY
Return values None
Notes This API must not be called when the DMA channel is
enabled.
Each IP using DMA provides an API to get directly the
LL_DMA_SetMemoryAddress
Function name __STATIC_INLINE void LL_DMA_SetMemoryAddress
(DMA_TypeDef * DMAx, uint32_t Channel, uint32_t
MemoryAddress)
Function description Set the Memory address.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
MemoryAddress: Between Min_Data = 0 and Max_Data =
0xFFFFFFFF
Return values None
Notes Interface used for direction
LL_DMA_DIRECTION_PERIPH_TO_MEMORY or
LL_DMA_DIRECTION_MEMORY_TO_PERIPH only.
This API must not be called when the DMA channel is
enabled.
Reference Manual to CMAR MA LL_DMA_SetMemoryAddress
LL API cross
reference:
LL_DMA_SetPeriphAddress
Function name __STATIC_INLINE void LL_DMA_SetPeriphAddress
(DMA_TypeDef * DMAx, uint32_t Channel, uint32_t
PeriphAddress)
Function description Set the Peripheral address.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
PeriphAddress: Between Min_Data = 0 and Max_Data =
0xFFFFFFFF
LL_DMA_GetMemoryAddress
Function name __STATIC_INLINE uint32_t LL_DMA_GetMemoryAddress
(DMA_TypeDef * DMAx, uint32_t Channel)
Function description Get Memory address.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
Return values Between: Min_Data = 0 and Max_Data = 0xFFFFFFFF
Notes Interface used for direction
LL_DMA_DIRECTION_PERIPH_TO_MEMORY or
LL_DMA_DIRECTION_MEMORY_TO_PERIPH only.
Reference Manual to CMAR MA LL_DMA_GetMemoryAddress
LL API cross
reference:
LL_DMA_GetPeriphAddress
Function name __STATIC_INLINE uint32_t LL_DMA_GetPeriphAddress
(DMA_TypeDef * DMAx, uint32_t Channel)
Function description Get Peripheral address.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
Return values Between: Min_Data = 0 and Max_Data = 0xFFFFFFFF
LL_DMA_SetM2MSrcAddress
Function name __STATIC_INLINE void LL_DMA_SetM2MSrcAddress
(DMA_TypeDef * DMAx, uint32_t Channel, uint32_t
MemoryAddress)
Function description Set the Memory to Memory Source address.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
MemoryAddress: Between Min_Data = 0 and Max_Data =
0xFFFFFFFF
Return values None
Notes Interface used for direction
LL_DMA_DIRECTION_MEMORY_TO_MEMORY only.
This API must not be called when the DMA channel is
enabled.
Reference Manual to CPAR PA LL_DMA_SetM2MSrcAddress
LL API cross
reference:
LL_DMA_SetM2MDstAddress
Function name __STATIC_INLINE void LL_DMA_SetM2MDstAddress
(DMA_TypeDef * DMAx, uint32_t Channel, uint32_t
MemoryAddress)
Function description Set the Memory to Memory Destination address.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
MemoryAddress: Between Min_Data = 0 and Max_Data =
LL_DMA_GetM2MSrcAddress
Function name __STATIC_INLINE uint32_t LL_DMA_GetM2MSrcAddress
(DMA_TypeDef * DMAx, uint32_t Channel)
Function description Get the Memory to Memory Source address.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
Return values Between: Min_Data = 0 and Max_Data = 0xFFFFFFFF
Notes Interface used for direction
LL_DMA_DIRECTION_MEMORY_TO_MEMORY only.
Reference Manual to CPAR PA LL_DMA_GetM2MSrcAddress
LL API cross
reference:
LL_DMA_GetM2MDstAddress
Function name __STATIC_INLINE uint32_t LL_DMA_GetM2MDstAddress
(DMA_TypeDef * DMAx, uint32_t Channel)
Function description Get the Memory to Memory Destination address.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
Return values Between: Min_Data = 0 and Max_Data = 0xFFFFFFFF
Notes Interface used for direction
LL_DMA_SetPeriphRequest
Function name __STATIC_INLINE void LL_DMA_SetPeriphRequest
(DMA_TypeDef * DMAx, uint32_t Channel, uint32_t
PeriphRequest)
Function description Set DMA request for DMA instance on Channel x.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
PeriphRequest: This parameter can be one of the following
values:
LL_DMA_REQUEST_0
LL_DMA_REQUEST_1
LL_DMA_REQUEST_2
LL_DMA_REQUEST_3
LL_DMA_REQUEST_4
LL_DMA_REQUEST_5
LL_DMA_REQUEST_6
LL_DMA_REQUEST_7
LL_DMA_REQUEST_8
LL_DMA_REQUEST_9
LL_DMA_REQUEST_10
LL_DMA_REQUEST_11
LL_DMA_REQUEST_12
LL_DMA_REQUEST_13
LL_DMA_REQUEST_14
LL_DMA_REQUEST_15
Return values None
Notes Please refer to Reference Manual to get the available
mapping of Request value link to Channel Selection.
Reference Manual to CSELR C1S LL_DMA_SetPeriphRequest
LL API cross CSELR C2S LL_DMA_SetPeriphRequest
reference: CSELR C3S LL_DMA_SetPeriphRequest
CSELR C4S LL_DMA_SetPeriphRequest
CSELR C5S LL_DMA_SetPeriphRequest
CSELR C6S LL_DMA_SetPeriphRequest
CSELR C7S LL_DMA_SetPeriphRequest
LL_DMA_IsActiveFlag_GI1
Function name __STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_GI1
(DMA_TypeDef * DMAx)
Function description Get Channel 1 global interrupt flag.
Parameters DMAx: DMAx Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR GIF1 LL_DMA_IsActiveFlag_GI1
LL API cross
reference:
LL_DMA_IsActiveFlag_GI3
Function name __STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_GI3
(DMA_TypeDef * DMAx)
Function description Get Channel 3 global interrupt flag.
Parameters DMAx: DMAx Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR GIF3 LL_DMA_IsActiveFlag_GI3
LL API cross
reference:
LL_DMA_IsActiveFlag_GI4
Function name __STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_GI4
(DMA_TypeDef * DMAx)
Function description Get Channel 4 global interrupt flag.
Parameters DMAx: DMAx Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR GIF4 LL_DMA_IsActiveFlag_GI4
LL API cross
reference:
LL_DMA_IsActiveFlag_GI5
Function name __STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_GI5
(DMA_TypeDef * DMAx)
Function description Get Channel 5 global interrupt flag.
Parameters DMAx: DMAx Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR GIF5 LL_DMA_IsActiveFlag_GI5
LL API cross
reference:
LL_DMA_IsActiveFlag_GI7
Function name __STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_GI7
(DMA_TypeDef * DMAx)
Function description Get Channel 7 global interrupt flag.
Parameters DMAx: DMAx Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR GIF7 LL_DMA_IsActiveFlag_GI7
LL API cross
reference:
LL_DMA_IsActiveFlag_TC1
Function name __STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_TC1
(DMA_TypeDef * DMAx)
Function description Get Channel 1 transfer complete flag.
Parameters DMAx: DMAx Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR TCIF1 LL_DMA_IsActiveFlag_TC1
LL API cross
reference:
LL_DMA_IsActiveFlag_TC2
Function name __STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_TC2
(DMA_TypeDef * DMAx)
Function description Get Channel 2 transfer complete flag.
Parameters DMAx: DMAx Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR TCIF2 LL_DMA_IsActiveFlag_TC2
LL API cross
reference:
LL_DMA_IsActiveFlag_TC4
Function name __STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_TC4
(DMA_TypeDef * DMAx)
Function description Get Channel 4 transfer complete flag.
Parameters DMAx: DMAx Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR TCIF4 LL_DMA_IsActiveFlag_TC4
LL API cross
reference:
LL_DMA_IsActiveFlag_TC5
Function name __STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_TC5
(DMA_TypeDef * DMAx)
Function description Get Channel 5 transfer complete flag.
Parameters DMAx: DMAx Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR TCIF5 LL_DMA_IsActiveFlag_TC5
LL API cross
reference:
LL_DMA_IsActiveFlag_TC6
Function name __STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_TC6
(DMA_TypeDef * DMAx)
Function description Get Channel 6 transfer complete flag.
Parameters DMAx: DMAx Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR TCIF6 LL_DMA_IsActiveFlag_TC6
LL API cross
reference:
LL_DMA_IsActiveFlag_HT1
Function name __STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_HT1
(DMA_TypeDef * DMAx)
Function description Get Channel 1 half transfer flag.
Parameters DMAx: DMAx Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR HTIF1 LL_DMA_IsActiveFlag_HT1
LL API cross
reference:
LL_DMA_IsActiveFlag_HT2
Function name __STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_HT2
(DMA_TypeDef * DMAx)
Function description Get Channel 2 half transfer flag.
Parameters DMAx: DMAx Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR HTIF2 LL_DMA_IsActiveFlag_HT2
LL API cross
reference:
LL_DMA_IsActiveFlag_HT3
Function name __STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_HT3
(DMA_TypeDef * DMAx)
Function description Get Channel 3 half transfer flag.
Parameters DMAx: DMAx Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR HTIF3 LL_DMA_IsActiveFlag_HT3
LL API cross
reference:
LL_DMA_IsActiveFlag_HT5
Function name __STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_HT5
(DMA_TypeDef * DMAx)
Function description Get Channel 5 half transfer flag.
Parameters DMAx: DMAx Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR HTIF5 LL_DMA_IsActiveFlag_HT5
LL API cross
reference:
LL_DMA_IsActiveFlag_HT6
Function name __STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_HT6
(DMA_TypeDef * DMAx)
Function description Get Channel 6 half transfer flag.
Parameters DMAx: DMAx Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR HTIF6 LL_DMA_IsActiveFlag_HT6
LL API cross
reference:
LL_DMA_IsActiveFlag_HT7
Function name __STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_HT7
(DMA_TypeDef * DMAx)
Function description Get Channel 7 half transfer flag.
Parameters DMAx: DMAx Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR HTIF7 LL_DMA_IsActiveFlag_HT7
LL API cross
reference:
LL_DMA_IsActiveFlag_TE2
Function name __STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_TE2
(DMA_TypeDef * DMAx)
Function description Get Channel 2 transfer error flag.
Parameters DMAx: DMAx Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR TEIF2 LL_DMA_IsActiveFlag_TE2
LL API cross
reference:
LL_DMA_IsActiveFlag_TE3
Function name __STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_TE3
(DMA_TypeDef * DMAx)
Function description Get Channel 3 transfer error flag.
Parameters DMAx: DMAx Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR TEIF3 LL_DMA_IsActiveFlag_TE3
LL API cross
reference:
LL_DMA_IsActiveFlag_TE4
Function name __STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_TE4
(DMA_TypeDef * DMAx)
Function description Get Channel 4 transfer error flag.
Parameters DMAx: DMAx Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR TEIF4 LL_DMA_IsActiveFlag_TE4
LL API cross
reference:
LL_DMA_IsActiveFlag_TE6
Function name __STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_TE6
(DMA_TypeDef * DMAx)
Function description Get Channel 6 transfer error flag.
Parameters DMAx: DMAx Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR TEIF6 LL_DMA_IsActiveFlag_TE6
LL API cross
reference:
LL_DMA_IsActiveFlag_TE7
Function name __STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_TE7
(DMA_TypeDef * DMAx)
Function description Get Channel 7 transfer error flag.
Parameters DMAx: DMAx Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR TEIF7 LL_DMA_IsActiveFlag_TE7
LL API cross
reference:
LL_DMA_ClearFlag_GI1
Function name __STATIC_INLINE void LL_DMA_ClearFlag_GI1
(DMA_TypeDef * DMAx)
Function description Clear Channel 1 global interrupt flag.
Parameters DMAx: DMAx Instance
Return values None
Reference Manual to IFCR CGIF1 LL_DMA_ClearFlag_GI1
LL API cross
reference:
LL_DMA_ClearFlag_GI3
Function name __STATIC_INLINE void LL_DMA_ClearFlag_GI3
(DMA_TypeDef * DMAx)
Function description Clear Channel 3 global interrupt flag.
Parameters DMAx: DMAx Instance
Return values None
Reference Manual to IFCR CGIF3 LL_DMA_ClearFlag_GI3
LL API cross
reference:
LL_DMA_ClearFlag_GI4
Function name __STATIC_INLINE void LL_DMA_ClearFlag_GI4
(DMA_TypeDef * DMAx)
Function description Clear Channel 4 global interrupt flag.
Parameters DMAx: DMAx Instance
Return values None
Reference Manual to IFCR CGIF4 LL_DMA_ClearFlag_GI4
LL API cross
reference:
LL_DMA_ClearFlag_GI5
Function name __STATIC_INLINE void LL_DMA_ClearFlag_GI5
(DMA_TypeDef * DMAx)
Function description Clear Channel 5 global interrupt flag.
Parameters DMAx: DMAx Instance
Return values None
Reference Manual to IFCR CGIF5 LL_DMA_ClearFlag_GI5
LL API cross
reference:
LL_DMA_ClearFlag_GI7
Function name __STATIC_INLINE void LL_DMA_ClearFlag_GI7
(DMA_TypeDef * DMAx)
Function description Clear Channel 7 global interrupt flag.
Parameters DMAx: DMAx Instance
Return values None
Reference Manual to IFCR CGIF7 LL_DMA_ClearFlag_GI7
LL API cross
reference:
LL_DMA_ClearFlag_TC1
Function name __STATIC_INLINE void LL_DMA_ClearFlag_TC1
(DMA_TypeDef * DMAx)
Function description Clear Channel 1 transfer complete flag.
Parameters DMAx: DMAx Instance
Return values None
Reference Manual to IFCR CTCIF1 LL_DMA_ClearFlag_TC1
LL API cross
reference:
LL_DMA_ClearFlag_TC2
Function name __STATIC_INLINE void LL_DMA_ClearFlag_TC2
(DMA_TypeDef * DMAx)
Function description Clear Channel 2 transfer complete flag.
Parameters DMAx: DMAx Instance
Return values None
Reference Manual to IFCR CTCIF2 LL_DMA_ClearFlag_TC2
LL API cross
reference:
LL_DMA_ClearFlag_TC4
Function name __STATIC_INLINE void LL_DMA_ClearFlag_TC4
(DMA_TypeDef * DMAx)
Function description Clear Channel 4 transfer complete flag.
Parameters DMAx: DMAx Instance
Return values None
Reference Manual to IFCR CTCIF4 LL_DMA_ClearFlag_TC4
LL API cross
reference:
LL_DMA_ClearFlag_TC5
Function name __STATIC_INLINE void LL_DMA_ClearFlag_TC5
(DMA_TypeDef * DMAx)
Function description Clear Channel 5 transfer complete flag.
Parameters DMAx: DMAx Instance
Return values None
Reference Manual to IFCR CTCIF5 LL_DMA_ClearFlag_TC5
LL API cross
reference:
LL_DMA_ClearFlag_TC6
Function name __STATIC_INLINE void LL_DMA_ClearFlag_TC6
(DMA_TypeDef * DMAx)
Function description Clear Channel 6 transfer complete flag.
Parameters DMAx: DMAx Instance
Return values None
Reference Manual to IFCR CTCIF6 LL_DMA_ClearFlag_TC6
LL API cross
reference:
LL_DMA_ClearFlag_HT1
Function name __STATIC_INLINE void LL_DMA_ClearFlag_HT1
(DMA_TypeDef * DMAx)
Function description Clear Channel 1 half transfer flag.
Parameters DMAx: DMAx Instance
Return values None
Reference Manual to IFCR CHTIF1 LL_DMA_ClearFlag_HT1
LL API cross
reference:
LL_DMA_ClearFlag_HT2
Function name __STATIC_INLINE void LL_DMA_ClearFlag_HT2
(DMA_TypeDef * DMAx)
Function description Clear Channel 2 half transfer flag.
Parameters DMAx: DMAx Instance
Return values None
Reference Manual to IFCR CHTIF2 LL_DMA_ClearFlag_HT2
LL API cross
reference:
LL_DMA_ClearFlag_HT3
Function name __STATIC_INLINE void LL_DMA_ClearFlag_HT3
(DMA_TypeDef * DMAx)
Function description Clear Channel 3 half transfer flag.
Parameters DMAx: DMAx Instance
Return values None
Reference Manual to IFCR CHTIF3 LL_DMA_ClearFlag_HT3
LL API cross
reference:
LL_DMA_ClearFlag_HT5
Function name __STATIC_INLINE void LL_DMA_ClearFlag_HT5
(DMA_TypeDef * DMAx)
Function description Clear Channel 5 half transfer flag.
Parameters DMAx: DMAx Instance
Return values None
Reference Manual to IFCR CHTIF5 LL_DMA_ClearFlag_HT5
LL API cross
reference:
LL_DMA_ClearFlag_HT6
Function name __STATIC_INLINE void LL_DMA_ClearFlag_HT6
(DMA_TypeDef * DMAx)
Function description Clear Channel 6 half transfer flag.
Parameters DMAx: DMAx Instance
Return values None
Reference Manual to IFCR CHTIF6 LL_DMA_ClearFlag_HT6
LL API cross
reference:
LL_DMA_ClearFlag_HT7
Function name __STATIC_INLINE void LL_DMA_ClearFlag_HT7
(DMA_TypeDef * DMAx)
Function description Clear Channel 7 half transfer flag.
Parameters DMAx: DMAx Instance
Return values None
Reference Manual to IFCR CHTIF7 LL_DMA_ClearFlag_HT7
LL API cross
reference:
LL_DMA_ClearFlag_TE2
Function name __STATIC_INLINE void LL_DMA_ClearFlag_TE2
(DMA_TypeDef * DMAx)
Function description Clear Channel 2 transfer error flag.
Parameters DMAx: DMAx Instance
Return values None
Reference Manual to IFCR CTEIF2 LL_DMA_ClearFlag_TE2
LL API cross
reference:
LL_DMA_ClearFlag_TE3
Function name __STATIC_INLINE void LL_DMA_ClearFlag_TE3
(DMA_TypeDef * DMAx)
Function description Clear Channel 3 transfer error flag.
Parameters DMAx: DMAx Instance
Return values None
Reference Manual to IFCR CTEIF3 LL_DMA_ClearFlag_TE3
LL API cross
reference:
LL_DMA_ClearFlag_TE4
Function name __STATIC_INLINE void LL_DMA_ClearFlag_TE4
(DMA_TypeDef * DMAx)
Function description Clear Channel 4 transfer error flag.
Parameters DMAx: DMAx Instance
Return values None
Reference Manual to IFCR CTEIF4 LL_DMA_ClearFlag_TE4
LL API cross
reference:
LL_DMA_ClearFlag_TE6
Function name __STATIC_INLINE void LL_DMA_ClearFlag_TE6
(DMA_TypeDef * DMAx)
Function description Clear Channel 6 transfer error flag.
Parameters DMAx: DMAx Instance
Return values None
Reference Manual to IFCR CTEIF6 LL_DMA_ClearFlag_TE6
LL API cross
reference:
LL_DMA_ClearFlag_TE7
Function name __STATIC_INLINE void LL_DMA_ClearFlag_TE7
(DMA_TypeDef * DMAx)
Function description Clear Channel 7 transfer error flag.
Parameters DMAx: DMAx Instance
Return values None
Reference Manual to IFCR CTEIF7 LL_DMA_ClearFlag_TE7
LL API cross
reference:
LL_DMA_EnableIT_TC
Function name __STATIC_INLINE void LL_DMA_EnableIT_TC (DMA_TypeDef
* DMAx, uint32_t Channel)
Function description Enable Transfer complete interrupt.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
LL_DMA_EnableIT_HT
Function name __STATIC_INLINE void LL_DMA_EnableIT_HT (DMA_TypeDef
* DMAx, uint32_t Channel)
Function description Enable Half transfer interrupt.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
Return values None
Reference Manual to CCR HTIE LL_DMA_EnableIT_HT
LL API cross
reference:
LL_DMA_EnableIT_TE
Function name __STATIC_INLINE void LL_DMA_EnableIT_TE (DMA_TypeDef
* DMAx, uint32_t Channel)
Function description Enable Transfer error interrupt.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
Return values None
Reference Manual to CCR TEIE LL_DMA_EnableIT_TE
LL API cross
reference:
LL_DMA_DisableIT_TC
Function name __STATIC_INLINE void LL_DMA_DisableIT_TC (DMA_TypeDef
* DMAx, uint32_t Channel)
Function description Disable Transfer complete interrupt.
LL_DMA_DisableIT_HT
Function name __STATIC_INLINE void LL_DMA_DisableIT_HT (DMA_TypeDef
* DMAx, uint32_t Channel)
Function description Disable Half transfer interrupt.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
Return values None
Reference Manual to CCR HTIE LL_DMA_DisableIT_HT
LL API cross
reference:
LL_DMA_DisableIT_TE
Function name __STATIC_INLINE void LL_DMA_DisableIT_TE (DMA_TypeDef
* DMAx, uint32_t Channel)
Function description Disable Transfer error interrupt.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
Return values None
LL_DMA_IsEnabledIT_TC
Function name __STATIC_INLINE uint32_t LL_DMA_IsEnabledIT_TC
(DMA_TypeDef * DMAx, uint32_t Channel)
Function description Check if Transfer complete Interrupt is enabled.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
Return values State: of bit (1 or 0).
Reference Manual to CCR TCIE LL_DMA_IsEnabledIT_TC
LL API cross
reference:
LL_DMA_IsEnabledIT_HT
Function name __STATIC_INLINE uint32_t LL_DMA_IsEnabledIT_HT
(DMA_TypeDef * DMAx, uint32_t Channel)
Function description Check if Half transfer Interrupt is enabled.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6
LL_DMA_CHANNEL_7
Return values State: of bit (1 or 0).
Reference Manual to CCR HTIE LL_DMA_IsEnabledIT_HT
LL API cross
reference:
LL_DMA_IsEnabledIT_TE
Function name __STATIC_INLINE uint32_t LL_DMA_IsEnabledIT_TE
(DMA_TypeDef * DMAx, uint32_t Channel)
Function description Check if Transfer error Interrupt is enabled.
Parameters DMAx: DMAx Instance
LL_DMA_Init
Function name uint32_t LL_DMA_Init (DMA_TypeDef * DMAx, uint32_t
Channel, LL_DMA_InitTypeDef * DMA_InitStruct)
Function description Initialize the DMA registers according to the specified parameters
in DMA_InitStruct.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
(*) value not defined in all devices
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_CHANNEL_5
LL_DMA_CHANNEL_6 (*)
LL_DMA_CHANNEL_7 (*)
DMA_InitStruct: pointer to a LL_DMA_InitTypeDef structure.
Return values An: ErrorStatus enumeration value:
SUCCESS: DMA registers are initialized
ERROR: Not applicable
Notes To convert DMAx_Channely Instance to DMAx Instance and
Channely, use helper macros : __LL_DMA_GET_INSTANCE
__LL_DMA_GET_CHANNEL
LL_DMA_DeInit
Function name uint32_t LL_DMA_DeInit (DMA_TypeDef * DMAx, uint32_t
Channel)
Function description De-initialize the DMA registers to their default reset values.
Parameters DMAx: DMAx Instance
Channel: This parameter can be one of the following values:
(*) value not defined in all devices
LL_DMA_CHANNEL_1
LL_DMA_CHANNEL_2
LL_DMA_CHANNEL_3
LL_DMA_CHANNEL_4
LL_DMA_StructInit
Function name void LL_DMA_StructInit (LL_DMA_InitTypeDef *
DMA_InitStruct)
Function description Set each LL_DMA_InitTypeDef field to default value.
Parameters DMA_InitStruct: Pointer to a LL_DMA_InitTypeDef
structure.
Return values None
LL_EXTI_EnableIT_0_31
Function name __STATIC_INLINE void LL_EXTI_EnableIT_0_31 (uint32_t
ExtiLine)
Function description Enable ExtiLine Interrupt request for Lines in range 0 to 31.
Parameters ExtiLine: This parameter can be one of the following values:
LL_EXTI_LINE_0
LL_EXTI_LINE_1
LL_EXTI_LINE_2
LL_EXTI_LINE_3
LL_EXTI_LINE_4
LL_EXTI_LINE_5
LL_EXTI_LINE_6
LL_EXTI_LINE_7
LL_EXTI_LINE_8
LL_EXTI_LINE_9
LL_EXTI_LINE_10
LL_EXTI_LINE_11
LL_EXTI_LINE_12
LL_EXTI_LINE_13
LL_EXTI_DisableIT_0_31
Function name __STATIC_INLINE void LL_EXTI_DisableIT_0_31 (uint32_t
ExtiLine)
Function description Disable ExtiLine Interrupt request for Lines in range 0 to 31.
Parameters ExtiLine: This parameter can be one of the following values:
LL_EXTI_LINE_0
LL_EXTI_LINE_1
LL_EXTI_LINE_2
LL_EXTI_LINE_3
LL_EXTI_LINE_4
LL_EXTI_LINE_5
LL_EXTI_LINE_6
LL_EXTI_LINE_7
LL_EXTI_LINE_8
LL_EXTI_LINE_9
LL_EXTI_LINE_10
LL_EXTI_LINE_11
LL_EXTI_LINE_12
LL_EXTI_LINE_13
LL_EXTI_LINE_14
LL_EXTI_IsEnabledIT_0_31
Function name __STATIC_INLINE uint32_t LL_EXTI_IsEnabledIT_0_31
(uint32_t ExtiLine)
Function description Indicate if ExtiLine Interrupt request is enabled for Lines in range 0
to 31.
Parameters ExtiLine: This parameter can be one of the following values:
LL_EXTI_LINE_0
LL_EXTI_LINE_1
LL_EXTI_LINE_2
LL_EXTI_LINE_3
LL_EXTI_LINE_4
LL_EXTI_LINE_5
LL_EXTI_LINE_6
LL_EXTI_LINE_7
LL_EXTI_LINE_8
LL_EXTI_LINE_9
LL_EXTI_LINE_10
LL_EXTI_LINE_11
LL_EXTI_LINE_12
LL_EXTI_LINE_13
LL_EXTI_LINE_14
LL_EXTI_EnableEvent_0_31
Function name __STATIC_INLINE void LL_EXTI_EnableEvent_0_31 (uint32_t
ExtiLine)
Function description Enable ExtiLine Event request for Lines in range 0 to 31.
Parameters ExtiLine: This parameter can be one of the following values:
LL_EXTI_LINE_0
LL_EXTI_LINE_1
LL_EXTI_LINE_2
LL_EXTI_LINE_3
LL_EXTI_LINE_4
LL_EXTI_LINE_5
LL_EXTI_LINE_6
LL_EXTI_LINE_7
LL_EXTI_LINE_8
LL_EXTI_LINE_9
LL_EXTI_LINE_10
LL_EXTI_LINE_11
LL_EXTI_LINE_12
LL_EXTI_LINE_13
LL_EXTI_LINE_14
LL_EXTI_LINE_15
LL_EXTI_DisableEvent_0_31
Function name __STATIC_INLINE void LL_EXTI_DisableEvent_0_31 (uint32_t
ExtiLine)
Function description Disable ExtiLine Event request for Lines in range 0 to 31.
Parameters ExtiLine: This parameter can be one of the following values:
LL_EXTI_LINE_0
LL_EXTI_LINE_1
LL_EXTI_LINE_2
LL_EXTI_LINE_3
LL_EXTI_LINE_4
LL_EXTI_LINE_5
LL_EXTI_LINE_6
LL_EXTI_LINE_7
LL_EXTI_LINE_8
LL_EXTI_LINE_9
LL_EXTI_LINE_10
LL_EXTI_LINE_11
LL_EXTI_LINE_12
LL_EXTI_LINE_13
LL_EXTI_LINE_14
LL_EXTI_LINE_15
LL_EXTI_LINE_16
LL_EXTI_LINE_17
LL_EXTI_LINE_18
LL_EXTI_LINE_19
LL_EXTI_IsEnabledEvent_0_31
Function name __STATIC_INLINE uint32_t LL_EXTI_IsEnabledEvent_0_31
(uint32_t ExtiLine)
Function description Indicate if ExtiLine Event request is enabled for Lines in range 0 to
31.
Parameters ExtiLine: This parameter can be one of the following values:
LL_EXTI_LINE_0
LL_EXTI_LINE_1
LL_EXTI_LINE_2
LL_EXTI_LINE_3
LL_EXTI_LINE_4
LL_EXTI_LINE_5
LL_EXTI_LINE_6
LL_EXTI_LINE_7
LL_EXTI_LINE_8
LL_EXTI_LINE_9
LL_EXTI_LINE_10
LL_EXTI_LINE_11
LL_EXTI_LINE_12
LL_EXTI_LINE_13
LL_EXTI_LINE_14
LL_EXTI_LINE_15
LL_EXTI_LINE_16
LL_EXTI_LINE_17
LL_EXTI_LINE_18
LL_EXTI_LINE_19
LL_EXTI_LINE_20
LL_EXTI_LINE_21
LL_EXTI_LINE_22
LL_EXTI_EnableRisingTrig_0_31
Function name __STATIC_INLINE void LL_EXTI_EnableRisingTrig_0_31
(uint32_t ExtiLine)
Function description Enable ExtiLine Rising Edge Trigger for Lines in range 0 to 31.
Parameters ExtiLine: This parameter can be a combination of the
following values:
LL_EXTI_LINE_0
LL_EXTI_LINE_1
LL_EXTI_LINE_2
LL_EXTI_LINE_3
LL_EXTI_LINE_4
LL_EXTI_LINE_5
LL_EXTI_LINE_6
LL_EXTI_LINE_7
LL_EXTI_LINE_8
LL_EXTI_LINE_9
LL_EXTI_LINE_10
LL_EXTI_LINE_11
LL_EXTI_LINE_12
LL_EXTI_LINE_13
LL_EXTI_LINE_14
LL_EXTI_LINE_15
LL_EXTI_LINE_16
LL_EXTI_LINE_18
LL_EXTI_LINE_19
LL_EXTI_LINE_20
LL_EXTI_LINE_21
LL_EXTI_LINE_22
LL_EXTI_LINE_29
LL_EXTI_LINE_30
LL_EXTI_LINE_31
LL_EXTI_DisableRisingTrig_0_31
Function name __STATIC_INLINE void LL_EXTI_DisableRisingTrig_0_31
(uint32_t ExtiLine)
Function description Disable ExtiLine Rising Edge Trigger for Lines in range 0 to 31.
Parameters ExtiLine: This parameter can be a combination of the
following values:
LL_EXTI_LINE_0
LL_EXTI_LINE_1
LL_EXTI_LINE_2
LL_EXTI_LINE_3
LL_EXTI_LINE_4
LL_EXTI_LINE_5
LL_EXTI_LINE_6
LL_EXTI_LINE_7
LL_EXTI_LINE_8
LL_EXTI_LINE_9
LL_EXTI_LINE_10
LL_EXTI_LINE_11
LL_EXTI_LINE_12
LL_EXTI_LINE_13
LL_EXTI_LINE_14
LL_EXTI_LINE_15
LL_EXTI_LINE_16
LL_EXTI_LINE_18
LL_EXTI_LINE_19
LL_EXTI_LINE_20
LL_EXTI_LINE_21
LL_EXTI_LINE_22
LL_EXTI_LINE_29
LL_EXTI_LINE_30
LL_EXTI_LINE_31
Return values None
Notes The configurable wakeup lines are edge-triggered. No glitch
must be generated on these lines. If a rising edge on a
configurable interrupt line occurs during a write operation in
the EXTI_RTSR register, the pending bit is not set. Rising and
LL_EXTI_IsEnabledRisingTrig_0_31
Function name __STATIC_INLINE uint32_t
LL_EXTI_IsEnabledRisingTrig_0_31 (uint32_t ExtiLine)
Function description Check if rising edge trigger is enabled for Lines in range 0 to 31.
Parameters ExtiLine: This parameter can be a combination of the
following values:
LL_EXTI_LINE_0
LL_EXTI_LINE_1
LL_EXTI_LINE_2
LL_EXTI_LINE_3
LL_EXTI_LINE_4
LL_EXTI_LINE_5
LL_EXTI_LINE_6
LL_EXTI_LINE_7
LL_EXTI_LINE_8
LL_EXTI_LINE_9
LL_EXTI_LINE_10
LL_EXTI_LINE_11
LL_EXTI_LINE_12
LL_EXTI_LINE_13
LL_EXTI_LINE_14
LL_EXTI_LINE_15
LL_EXTI_LINE_16
LL_EXTI_LINE_18
LL_EXTI_LINE_19
LL_EXTI_LINE_20
LL_EXTI_LINE_21
LL_EXTI_LINE_22
LL_EXTI_LINE_29
LL_EXTI_LINE_30
LL_EXTI_LINE_31
Return values State: of bit (1 or 0).
Notes Please check each device line mapping for EXTI Line
availability
Reference Manual to RTSR RTx LL_EXTI_IsEnabledRisingTrig_0_31
LL API cross
reference:
LL_EXTI_GenerateSWI_0_31
Function name __STATIC_INLINE void LL_EXTI_GenerateSWI_0_31 (uint32_t
ExtiLine)
Function description Generate a software Interrupt Event for Lines in range 0 to 31.
Parameters ExtiLine: This parameter can be a combination of the
following values:
LL_EXTI_LINE_0
LL_EXTI_LINE_1
LL_EXTI_LINE_2
LL_EXTI_LINE_3
LL_EXTI_IsActiveFlag_0_31
Function name __STATIC_INLINE uint32_t LL_EXTI_IsActiveFlag_0_31
(uint32_t ExtiLine)
Function description Check if the ExtLine Flag is set or not for Lines in range 0 to 31.
Parameters ExtiLine: This parameter can be a combination of the
following values:
LL_EXTI_LINE_0
LL_EXTI_LINE_1
LL_EXTI_LINE_2
LL_EXTI_LINE_3
LL_EXTI_LINE_4
LL_EXTI_LINE_5
LL_EXTI_LINE_6
LL_EXTI_LINE_7
LL_EXTI_LINE_8
LL_EXTI_LINE_9
LL_EXTI_LINE_10
LL_EXTI_ReadFlag_0_31
Function name __STATIC_INLINE uint32_t LL_EXTI_ReadFlag_0_31 (uint32_t
ExtiLine)
Function description Read ExtLine Combination Flag for Lines in range 0 to 31.
Parameters ExtiLine: This parameter can be a combination of the
following values:
LL_EXTI_LINE_0
LL_EXTI_LINE_1
LL_EXTI_LINE_2
LL_EXTI_LINE_3
LL_EXTI_LINE_4
LL_EXTI_LINE_5
LL_EXTI_LINE_6
LL_EXTI_LINE_7
LL_EXTI_LINE_8
LL_EXTI_LINE_9
LL_EXTI_LINE_10
LL_EXTI_LINE_11
LL_EXTI_LINE_12
LL_EXTI_LINE_13
LL_EXTI_LINE_14
LL_EXTI_LINE_15
LL_EXTI_LINE_16
LL_EXTI_LINE_18
LL_EXTI_LINE_19
LL_EXTI_LINE_20
LL_EXTI_ClearFlag_0_31
Function name __STATIC_INLINE void LL_EXTI_ClearFlag_0_31 (uint32_t
ExtiLine)
Function description Clear ExtLine Flags for Lines in range 0 to 31.
Parameters ExtiLine: This parameter can be a combination of the
following values:
LL_EXTI_LINE_0
LL_EXTI_LINE_1
LL_EXTI_LINE_2
LL_EXTI_LINE_3
LL_EXTI_LINE_4
LL_EXTI_LINE_5
LL_EXTI_LINE_6
LL_EXTI_LINE_7
LL_EXTI_LINE_8
LL_EXTI_LINE_9
LL_EXTI_LINE_10
LL_EXTI_LINE_11
LL_EXTI_LINE_12
LL_EXTI_LINE_13
LL_EXTI_LINE_14
LL_EXTI_LINE_15
LL_EXTI_LINE_16
LL_EXTI_LINE_18
LL_EXTI_LINE_19
LL_EXTI_LINE_20
LL_EXTI_LINE_21
LL_EXTI_LINE_22
LL_EXTI_LINE_29
LL_EXTI_LINE_30
LL_EXTI_LINE_31
Return values None
Notes This bit is set when the selected edge event arrives on the
LL_EXTI_Init
Function name uint32_t LL_EXTI_Init (LL_EXTI_InitTypeDef * EXTI_InitStruct)
Function description Initialize the EXTI registers according to the specified parameters
in EXTI_InitStruct.
Parameters EXTI_InitStruct: pointer to a LL_EXTI_InitTypeDef structure.
Return values An: ErrorStatus enumeration value:
SUCCESS: EXTI registers are initialized
ERROR: not applicable
LL_EXTI_DeInit
Function name uint32_t LL_EXTI_DeInit (void )
Function description De-initialize the EXTI registers to their default reset values.
Return values An: ErrorStatus enumeration value:
SUCCESS: EXTI registers are de-initialized
ERROR: not applicable
LL_EXTI_StructInit
Function name void LL_EXTI_StructInit (LL_EXTI_InitTypeDef *
EXTI_InitStruct)
Function description Set each LL_EXTI_InitTypeDef field to default value.
Parameters EXTI_InitStruct: Pointer to a LL_EXTI_InitTypeDef structure.
Return values None
LL_GPIO_SetPinMode
Function name __STATIC_INLINE void LL_GPIO_SetPinMode (GPIO_TypeDef
* GPIOx, uint32_t Pin, uint32_t Mode)
Function description Configure gpio mode for a dedicated pin on dedicated port.
Parameters GPIOx: GPIO Port
Pin: This parameter can be one of the following values:
LL_GPIO_GetPinMode
Function name __STATIC_INLINE uint32_t LL_GPIO_GetPinMode
(GPIO_TypeDef * GPIOx, uint32_t Pin)
Function description Return gpio mode for a dedicated pin on dedicated port.
Parameters GPIOx: GPIO Port
Pin: This parameter can be one of the following values:
LL_GPIO_PIN_0
LL_GPIO_PIN_1
LL_GPIO_PIN_2
LL_GPIO_PIN_3
LL_GPIO_PIN_4
LL_GPIO_PIN_5
LL_GPIO_PIN_6
LL_GPIO_PIN_7
LL_GPIO_PIN_8
LL_GPIO_PIN_9
LL_GPIO_PIN_10
LL_GPIO_PIN_11
LL_GPIO_PIN_12
LL_GPIO_PIN_13
LL_GPIO_SetPinOutputType
Function name __STATIC_INLINE void LL_GPIO_SetPinOutputType
(GPIO_TypeDef * GPIOx, uint32_t PinMask, uint32_t
OutputType)
Function description Configure gpio output type for several pins on dedicated port.
Parameters GPIOx: GPIO Port
PinMask: This parameter can be a combination of the
following values:
LL_GPIO_PIN_0
LL_GPIO_PIN_1
LL_GPIO_PIN_2
LL_GPIO_PIN_3
LL_GPIO_PIN_4
LL_GPIO_PIN_5
LL_GPIO_PIN_6
LL_GPIO_PIN_7
LL_GPIO_PIN_8
LL_GPIO_PIN_9
LL_GPIO_PIN_10
LL_GPIO_PIN_11
LL_GPIO_PIN_12
LL_GPIO_PIN_13
LL_GPIO_PIN_14
LL_GPIO_PIN_15
LL_GPIO_PIN_ALL
OutputType: This parameter can be one of the following
values:
LL_GPIO_OUTPUT_PUSHPULL
LL_GPIO_OUTPUT_OPENDRAIN
Return values None
Notes Output type as to be set when gpio pin is in output or
alternate modes. Possible type are Push-pull or Open-drain.
Reference Manual to OTYPER OTy LL_GPIO_SetPinOutputType
LL API cross
LL_GPIO_GetPinOutputType
Function name __STATIC_INLINE uint32_t LL_GPIO_GetPinOutputType
(GPIO_TypeDef * GPIOx, uint32_t Pin)
Function description Return gpio output type for several pins on dedicated port.
Parameters GPIOx: GPIO Port
Pin: This parameter can be one of the following values:
LL_GPIO_PIN_0
LL_GPIO_PIN_1
LL_GPIO_PIN_2
LL_GPIO_PIN_3
LL_GPIO_PIN_4
LL_GPIO_PIN_5
LL_GPIO_PIN_6
LL_GPIO_PIN_7
LL_GPIO_PIN_8
LL_GPIO_PIN_9
LL_GPIO_PIN_10
LL_GPIO_PIN_11
LL_GPIO_PIN_12
LL_GPIO_PIN_13
LL_GPIO_PIN_14
LL_GPIO_PIN_15
LL_GPIO_PIN_ALL
Return values Returned: value can be one of the following values:
LL_GPIO_OUTPUT_PUSHPULL
LL_GPIO_OUTPUT_OPENDRAIN
Notes Output type as to be set when gpio pin is in output or
alternate modes. Possible type are Push-pull or Open-drain.
Warning: only one pin can be passed as parameter.
Reference Manual to OTYPER OTy LL_GPIO_GetPinOutputType
LL API cross
reference:
LL_GPIO_SetPinSpeed
Function name __STATIC_INLINE void LL_GPIO_SetPinSpeed
(GPIO_TypeDef * GPIOx, uint32_t Pin, uint32_t Speed)
Function description Configure gpio speed for a dedicated pin on dedicated port.
Parameters GPIOx: GPIO Port
Pin: This parameter can be one of the following values:
LL_GPIO_PIN_0
LL_GPIO_PIN_1
LL_GPIO_PIN_2
LL_GPIO_PIN_3
LL_GPIO_PIN_4
LL_GPIO_PIN_5
LL_GPIO_GetPinSpeed
Function name __STATIC_INLINE uint32_t LL_GPIO_GetPinSpeed
(GPIO_TypeDef * GPIOx, uint32_t Pin)
Function description Return gpio speed for a dedicated pin on dedicated port.
Parameters GPIOx: GPIO Port
Pin: This parameter can be one of the following values:
LL_GPIO_PIN_0
LL_GPIO_PIN_1
LL_GPIO_PIN_2
LL_GPIO_PIN_3
LL_GPIO_PIN_4
LL_GPIO_PIN_5
LL_GPIO_PIN_6
LL_GPIO_PIN_7
LL_GPIO_PIN_8
LL_GPIO_PIN_9
LL_GPIO_PIN_10
LL_GPIO_PIN_11
LL_GPIO_PIN_12
LL_GPIO_PIN_13
LL_GPIO_PIN_14
LL_GPIO_PIN_15
Return values Returned: value can be one of the following values:
LL_GPIO_SPEED_FREQ_LOW
LL_GPIO_SPEED_FREQ_MEDIUM
LL_GPIO_SetPinPull
Function name __STATIC_INLINE void LL_GPIO_SetPinPull (GPIO_TypeDef *
GPIOx, uint32_t Pin, uint32_t Pull)
Function description Configure gpio pull-up or pull-down for a dedicated pin on a
dedicated port.
Parameters GPIOx: GPIO Port
Pin: This parameter can be one of the following values:
LL_GPIO_PIN_0
LL_GPIO_PIN_1
LL_GPIO_PIN_2
LL_GPIO_PIN_3
LL_GPIO_PIN_4
LL_GPIO_PIN_5
LL_GPIO_PIN_6
LL_GPIO_PIN_7
LL_GPIO_PIN_8
LL_GPIO_PIN_9
LL_GPIO_PIN_10
LL_GPIO_PIN_11
LL_GPIO_PIN_12
LL_GPIO_PIN_13
LL_GPIO_PIN_14
LL_GPIO_PIN_15
Pull: This parameter can be one of the following values:
LL_GPIO_PULL_NO
LL_GPIO_PULL_UP
LL_GPIO_PULL_DOWN
Return values None
Notes Warning: only one pin can be passed as parameter.
Reference Manual to PUPDR PUPDy LL_GPIO_SetPinPull
LL API cross
reference:
LL_GPIO_GetPinPull
Function name __STATIC_INLINE uint32_t LL_GPIO_GetPinPull
(GPIO_TypeDef * GPIOx, uint32_t Pin)
Function description Return gpio pull-up or pull-down for a dedicated pin on a dedicated
port.
LL_GPIO_SetAFPin_0_7
Function name __STATIC_INLINE void LL_GPIO_SetAFPin_0_7
(GPIO_TypeDef * GPIOx, uint32_t Pin, uint32_t Alternate)
Function description Configure gpio alternate function of a dedicated pin from 0 to 7 for
a dedicated port.
Parameters GPIOx: GPIO Port
Pin: This parameter can be one of the following values:
LL_GPIO_PIN_0
LL_GPIO_PIN_1
LL_GPIO_PIN_2
LL_GPIO_PIN_3
LL_GPIO_PIN_4
LL_GPIO_PIN_5
LL_GPIO_PIN_6
LL_GPIO_PIN_7
Alternate: This parameter can be one of the following
values:
LL_GPIO_AF_0
LL_GPIO_AF_1
LL_GPIO_AF_2
LL_GPIO_AF_3
LL_GPIO_AF_4
LL_GPIO_GetAFPin_0_7
Function name __STATIC_INLINE uint32_t LL_GPIO_GetAFPin_0_7
(GPIO_TypeDef * GPIOx, uint32_t Pin)
Function description Return gpio alternate function of a dedicated pin from 0 to 7 for a
dedicated port.
Parameters GPIOx: GPIO Port
Pin: This parameter can be one of the following values:
LL_GPIO_PIN_0
LL_GPIO_PIN_1
LL_GPIO_PIN_2
LL_GPIO_PIN_3
LL_GPIO_PIN_4
LL_GPIO_PIN_5
LL_GPIO_PIN_6
LL_GPIO_PIN_7
Return values Returned: value can be one of the following values:
LL_GPIO_AF_0
LL_GPIO_AF_1
LL_GPIO_AF_2
LL_GPIO_AF_3
LL_GPIO_AF_4
LL_GPIO_AF_5
LL_GPIO_AF_6
LL_GPIO_AF_7
Reference Manual to AFRL AFSELy LL_GPIO_GetAFPin_0_7
LL API cross
reference:
LL_GPIO_SetAFPin_8_15
Function name __STATIC_INLINE void LL_GPIO_SetAFPin_8_15
(GPIO_TypeDef * GPIOx, uint32_t Pin, uint32_t Alternate)
Function description Configure gpio alternate function of a dedicated pin from 8 to 15
for a dedicated port.
Parameters GPIOx: GPIO Port
Pin: This parameter can be one of the following values:
LL_GPIO_PIN_8
LL_GPIO_PIN_9
LL_GPIO_GetAFPin_8_15
Function name __STATIC_INLINE uint32_t LL_GPIO_GetAFPin_8_15
(GPIO_TypeDef * GPIOx, uint32_t Pin)
Function description Return gpio alternate function of a dedicated pin from 8 to 15 for a
dedicated port.
Parameters GPIOx: GPIO Port
Pin: This parameter can be one of the following values:
LL_GPIO_PIN_8
LL_GPIO_PIN_9
LL_GPIO_PIN_10
LL_GPIO_PIN_11
LL_GPIO_PIN_12
LL_GPIO_PIN_13
LL_GPIO_PIN_14
LL_GPIO_PIN_15
Return values Returned: value can be one of the following values:
LL_GPIO_AF_0
LL_GPIO_AF_1
LL_GPIO_AF_2
LL_GPIO_AF_3
LL_GPIO_AF_4
LL_GPIO_AF_5
LL_GPIO_AF_6
LL_GPIO_AF_7
Notes Possible values are from AF0 to AF7 depending on target.
LL_GPIO_LockPin
Function name __STATIC_INLINE void LL_GPIO_LockPin (GPIO_TypeDef *
GPIOx, uint32_t PinMask)
Function description Lock configuration of several pins for a dedicated port.
Parameters GPIOx: GPIO Port
PinMask: This parameter can be a combination of the
following values:
LL_GPIO_PIN_0
LL_GPIO_PIN_1
LL_GPIO_PIN_2
LL_GPIO_PIN_3
LL_GPIO_PIN_4
LL_GPIO_PIN_5
LL_GPIO_PIN_6
LL_GPIO_PIN_7
LL_GPIO_PIN_8
LL_GPIO_PIN_9
LL_GPIO_PIN_10
LL_GPIO_PIN_11
LL_GPIO_PIN_12
LL_GPIO_PIN_13
LL_GPIO_PIN_14
LL_GPIO_PIN_15
LL_GPIO_PIN_ALL
Return values None
Notes When the lock sequence has been applied on a port bit, the
value of this port bit can no longer be modified until the next
reset.
Each lock bit freezes a specific configuration register (control
and alternate function registers).
Reference Manual to LCKR LCKK LL_GPIO_LockPin
LL API cross
reference:
LL_GPIO_IsPinLocked
Function name __STATIC_INLINE uint32_t LL_GPIO_IsPinLocked
(GPIO_TypeDef * GPIOx, uint32_t PinMask)
Function description Return 1 if all pins passed as parameter, of a dedicated port, are
locked.
Parameters GPIOx: GPIO Port
PinMask: This parameter can be a combination of the
following values:
LL_GPIO_PIN_0
LL_GPIO_PIN_1
LL_GPIO_IsAnyPinLocked
Function name __STATIC_INLINE uint32_t LL_GPIO_IsAnyPinLocked
(GPIO_TypeDef * GPIOx)
Function description Return 1 if one of the pin of a dedicated port is locked.
Parameters GPIOx: GPIO Port
Return values State: of bit (1 or 0).
Reference Manual to LCKR LCKK LL_GPIO_IsAnyPinLocked
LL API cross
reference:
LL_GPIO_ReadInputPort
Function name __STATIC_INLINE uint32_t LL_GPIO_ReadInputPort
(GPIO_TypeDef * GPIOx)
Function description Return full input data register value for a dedicated port.
Parameters GPIOx: GPIO Port
Return values Input: data register value of port
Reference Manual to IDR IDy LL_GPIO_ReadInputPort
LL API cross
reference:
LL_GPIO_IsInputPinSet
Function name __STATIC_INLINE uint32_t LL_GPIO_IsInputPinSet
(GPIO_TypeDef * GPIOx, uint32_t PinMask)
Function description Return if input data level for several pins of dedicated port is high
LL_GPIO_WriteOutputPort
Function name __STATIC_INLINE void LL_GPIO_WriteOutputPort
(GPIO_TypeDef * GPIOx, uint32_t PortValue)
Function description Write output data register for the port.
Parameters GPIOx: GPIO Port
PortValue: Level value for each pin of the port
Return values None
Reference Manual to ODR ODy LL_GPIO_WriteOutputPort
LL API cross
reference:
LL_GPIO_ReadOutputPort
Function name __STATIC_INLINE uint32_t LL_GPIO_ReadOutputPort
(GPIO_TypeDef * GPIOx)
Function description Return full output data register value for a dedicated port.
Parameters GPIOx: GPIO Port
Return values Output: data register value of port
Reference Manual to ODR ODy LL_GPIO_ReadOutputPort
LL API cross
LL_GPIO_IsOutputPinSet
Function name __STATIC_INLINE uint32_t LL_GPIO_IsOutputPinSet
(GPIO_TypeDef * GPIOx, uint32_t PinMask)
Function description Return if input data level for several pins of dedicated port is high
or low.
Parameters GPIOx: GPIO Port
PinMask: This parameter can be a combination of the
following values:
LL_GPIO_PIN_0
LL_GPIO_PIN_1
LL_GPIO_PIN_2
LL_GPIO_PIN_3
LL_GPIO_PIN_4
LL_GPIO_PIN_5
LL_GPIO_PIN_6
LL_GPIO_PIN_7
LL_GPIO_PIN_8
LL_GPIO_PIN_9
LL_GPIO_PIN_10
LL_GPIO_PIN_11
LL_GPIO_PIN_12
LL_GPIO_PIN_13
LL_GPIO_PIN_14
LL_GPIO_PIN_15
LL_GPIO_PIN_ALL
Return values State: of bit (1 or 0).
Reference Manual to ODR ODy LL_GPIO_IsOutputPinSet
LL API cross
reference:
LL_GPIO_SetOutputPin
Function name __STATIC_INLINE void LL_GPIO_SetOutputPin
(GPIO_TypeDef * GPIOx, uint32_t PinMask)
Function description Set several pins to high level on dedicated gpio port.
Parameters GPIOx: GPIO Port
PinMask: This parameter can be a combination of the
following values:
LL_GPIO_PIN_0
LL_GPIO_PIN_1
LL_GPIO_PIN_2
LL_GPIO_PIN_3
LL_GPIO_PIN_4
LL_GPIO_PIN_5
LL_GPIO_PIN_6
LL_GPIO_PIN_7
LL_GPIO_PIN_8
LL_GPIO_ResetOutputPin
Function name __STATIC_INLINE void LL_GPIO_ResetOutputPin
(GPIO_TypeDef * GPIOx, uint32_t PinMask)
Function description Set several pins to low level on dedicated gpio port.
Parameters GPIOx: GPIO Port
PinMask: This parameter can be a combination of the
following values:
LL_GPIO_PIN_0
LL_GPIO_PIN_1
LL_GPIO_PIN_2
LL_GPIO_PIN_3
LL_GPIO_PIN_4
LL_GPIO_PIN_5
LL_GPIO_PIN_6
LL_GPIO_PIN_7
LL_GPIO_PIN_8
LL_GPIO_PIN_9
LL_GPIO_PIN_10
LL_GPIO_PIN_11
LL_GPIO_PIN_12
LL_GPIO_PIN_13
LL_GPIO_PIN_14
LL_GPIO_PIN_15
LL_GPIO_PIN_ALL
Return values None
Reference Manual to BRR BRy LL_GPIO_ResetOutputPin
LL API cross
reference:
LL_GPIO_TogglePin
Function name __STATIC_INLINE void LL_GPIO_TogglePin (GPIO_TypeDef *
GPIOx, uint32_t PinMask)
Function description Toggle data value for several pin of dedicated port.
Parameters GPIOx: GPIO Port
LL_GPIO_DeInit
Function name ErrorStatus LL_GPIO_DeInit (GPIO_TypeDef * GPIOx)
Function description De-initialize GPIO registers (Registers restored to their default
values).
Parameters GPIOx: GPIO Port
Return values An: ErrorStatus enumeration value:
SUCCESS: GPIO registers are de-initialized
ERROR: Wrong GPIO Port
LL_GPIO_Init
Function name ErrorStatus LL_GPIO_Init (GPIO_TypeDef * GPIOx,
LL_GPIO_InitTypeDef * GPIO_InitStruct)
Function description Initialize GPIO registers according to the specified parameters in
GPIO_InitStruct.
Parameters GPIOx: GPIO Port
GPIO_InitStruct: pointer to a LL_GPIO_InitTypeDef
structure that contains the configuration information for the
specified GPIO peripheral.
Return values An: ErrorStatus enumeration value:
SUCCESS: GPIO registers are initialized according to
GPIO_InitStruct content
ERROR: Not applicable
LL_I2C_Enable
Function name __STATIC_INLINE void LL_I2C_Enable (I2C_TypeDef * I2Cx)
Function description Enable I2C peripheral (PE = 1).
Parameters I2Cx: I2C Instance.
Return values None
Reference Manual to CR1 PE LL_I2C_Enable
LL API cross
reference:
LL_I2C_Disable
Function name __STATIC_INLINE void LL_I2C_Disable (I2C_TypeDef * I2Cx)
Function description Disable I2C peripheral (PE = 0).
Parameters I2Cx: I2C Instance.
Return values None
Notes When PE = 0, the I2C SCL and SDA lines are released.
Internal state machines and status bits are put back to their
reset value. When cleared, PE must be kept low for at least 3
APB clock cycles.
Reference Manual to CR1 PE LL_I2C_Disable
LL API cross
reference:
LL_I2C_IsEnabled
Function name __STATIC_INLINE uint32_t LL_I2C_IsEnabled (I2C_TypeDef *
I2Cx)
Function description Check if the I2C peripheral is enabled or disabled.
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Reference Manual to CR1 PE LL_I2C_IsEnabled
LL API cross
reference:
LL_I2C_ConfigFilters
Function name __STATIC_INLINE void LL_I2C_ConfigFilters (I2C_TypeDef *
I2Cx, uint32_t AnalogFilter, uint32_t DigitalFilter)
Function description Configure Noise Filters (Analog and Digital).
Parameters I2Cx: I2C Instance.
AnalogFilter: This parameter can be one of the following
LL_I2C_SetDigitalFilter
Function name __STATIC_INLINE void LL_I2C_SetDigitalFilter (I2C_TypeDef *
I2Cx, uint32_t DigitalFilter)
Function description Configure Digital Noise Filter.
Parameters I2Cx: I2C Instance.
DigitalFilter: This parameter must be a value between
Min_Data=0x00 (Digital filter disabled) and Max_Data=0x0F
(Digital filter enabled and filtering capability up to 15*ti2cclk).
This parameter is used to configure the digital noise filter on
SDA and SCL input. The digital filter will filter spikes with a
length of up to DNF[3:0]*ti2cclk.
Return values None
Notes If the analog filter is also enabled, the digital filter is added to
analog filter. This filter can only be programmed when the I2C
is disabled (PE = 0).
Reference Manual to CR1 DNF LL_I2C_SetDigitalFilter
LL API cross
reference:
LL_I2C_GetDigitalFilter
Function name __STATIC_INLINE uint32_t LL_I2C_GetDigitalFilter
(I2C_TypeDef * I2Cx)
Function description Get the current Digital Noise Filter configuration.
Parameters I2Cx: I2C Instance.
Return values Value: between Min_Data=0x0 and Max_Data=0xF
Reference Manual to CR1 DNF LL_I2C_GetDigitalFilter
LL API cross
reference:
LL_I2C_DisableAnalogFilter
Function name __STATIC_INLINE void LL_I2C_DisableAnalogFilter
(I2C_TypeDef * I2Cx)
Function description Disable Analog Noise Filter.
Parameters I2Cx: I2C Instance.
Return values None
Notes This filter can only be programmed when the I2C is disabled
(PE = 0).
Reference Manual to CR1 ANFOFF LL_I2C_DisableAnalogFilter
LL API cross
reference:
LL_I2C_IsEnabledAnalogFilter
Function name __STATIC_INLINE uint32_t LL_I2C_IsEnabledAnalogFilter
(I2C_TypeDef * I2Cx)
Function description Check if Analog Noise Filter is enabled or disabled.
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Reference Manual to CR1 ANFOFF LL_I2C_IsEnabledAnalogFilter
LL API cross
reference:
LL_I2C_EnableDMAReq_TX
Function name __STATIC_INLINE void LL_I2C_EnableDMAReq_TX
(I2C_TypeDef * I2Cx)
Function description Enable DMA transmission requests.
Parameters I2Cx: I2C Instance.
Return values None
Reference Manual to CR1 TXDMAEN LL_I2C_EnableDMAReq_TX
LL_I2C_DisableDMAReq_TX
Function name __STATIC_INLINE void LL_I2C_DisableDMAReq_TX
(I2C_TypeDef * I2Cx)
Function description Disable DMA transmission requests.
Parameters I2Cx: I2C Instance.
Return values None
Reference Manual to CR1 TXDMAEN LL_I2C_DisableDMAReq_TX
LL API cross
reference:
LL_I2C_IsEnabledDMAReq_TX
Function name __STATIC_INLINE uint32_t LL_I2C_IsEnabledDMAReq_TX
(I2C_TypeDef * I2Cx)
Function description Check if DMA transmission requests are enabled or disabled.
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Reference Manual to CR1 TXDMAEN LL_I2C_IsEnabledDMAReq_TX
LL API cross
reference:
LL_I2C_EnableDMAReq_RX
Function name __STATIC_INLINE void LL_I2C_EnableDMAReq_RX
(I2C_TypeDef * I2Cx)
Function description Enable DMA reception requests.
Parameters I2Cx: I2C Instance.
Return values None
Reference Manual to CR1 RXDMAEN LL_I2C_EnableDMAReq_RX
LL API cross
reference:
LL_I2C_DisableDMAReq_RX
Function name __STATIC_INLINE void LL_I2C_DisableDMAReq_RX
(I2C_TypeDef * I2Cx)
Function description Disable DMA reception requests.
Parameters I2Cx: I2C Instance.
Return values None
Reference Manual to CR1 RXDMAEN LL_I2C_DisableDMAReq_RX
LL API cross
LL_I2C_IsEnabledDMAReq_RX
Function name __STATIC_INLINE uint32_t LL_I2C_IsEnabledDMAReq_RX
(I2C_TypeDef * I2Cx)
Function description Check if DMA reception requests are enabled or disabled.
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Reference Manual to CR1 RXDMAEN LL_I2C_IsEnabledDMAReq_RX
LL API cross
reference:
LL_I2C_DMA_GetRegAddr
Function name __STATIC_INLINE uint32_t LL_I2C_DMA_GetRegAddr
(I2C_TypeDef * I2Cx, uint32_t Direction)
Function description Get the data register address used for DMA transfer.
Parameters I2Cx: I2C Instance
Direction: This parameter can be one of the following
values:
LL_I2C_DMA_REG_DATA_TRANSMIT
LL_I2C_DMA_REG_DATA_RECEIVE
Return values Address: of data register
Reference Manual to TXDR TXDATA LL_I2C_DMA_GetRegAddr
LL API cross RXDR RXDATA LL_I2C_DMA_GetRegAddr
reference:
LL_I2C_EnableClockStretching
Function name __STATIC_INLINE void LL_I2C_EnableClockStretching
(I2C_TypeDef * I2Cx)
Function description Enable Clock stretching.
Parameters I2Cx: I2C Instance.
Return values None
Notes This bit can only be programmed when the I2C is disabled
(PE = 0).
Reference Manual to CR1 NOSTRETCH LL_I2C_EnableClockStretching
LL API cross
reference:
LL_I2C_DisableClockStretching
Function name __STATIC_INLINE void LL_I2C_DisableClockStretching
(I2C_TypeDef * I2Cx)
Function description Disable Clock stretching.
LL_I2C_IsEnabledClockStretching
Function name __STATIC_INLINE uint32_t LL_I2C_IsEnabledClockStretching
(I2C_TypeDef * I2Cx)
Function description Check if Clock stretching is enabled or disabled.
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Reference Manual to CR1 NOSTRETCH LL_I2C_IsEnabledClockStretching
LL API cross
reference:
LL_I2C_EnableSlaveByteControl
Function name __STATIC_INLINE void LL_I2C_EnableSlaveByteControl
(I2C_TypeDef * I2Cx)
Function description Enable hardware byte control in slave mode.
Parameters I2Cx: I2C Instance.
Return values None
Reference Manual to CR1 SBC LL_I2C_EnableSlaveByteControl
LL API cross
reference:
LL_I2C_DisableSlaveByteControl
Function name __STATIC_INLINE void LL_I2C_DisableSlaveByteControl
(I2C_TypeDef * I2Cx)
Function description Disable hardware byte control in slave mode.
Parameters I2Cx: I2C Instance.
Return values None
Reference Manual to CR1 SBC LL_I2C_DisableSlaveByteControl
LL API cross
reference:
LL_I2C_EnableWakeUpFromStop
Function name __STATIC_INLINE void LL_I2C_EnableWakeUpFromStop
(I2C_TypeDef * I2Cx)
Function description Enable Wakeup from STOP.
Parameters I2Cx: I2C Instance.
Return values None
Notes Macro IS_I2C_WAKEUP_FROMSTOP_INSTANCE(I2Cx) can
be used to check whether or not WakeUpFromStop feature is
supported by the I2Cx Instance.
This bit can only be programmed when Digital Filter is
disabled.
Reference Manual to CR1 WUPEN LL_I2C_EnableWakeUpFromStop
LL API cross
reference:
LL_I2C_DisableWakeUpFromStop
Function name __STATIC_INLINE void LL_I2C_DisableWakeUpFromStop
(I2C_TypeDef * I2Cx)
Function description Disable Wakeup from STOP.
Parameters I2Cx: I2C Instance.
Return values None
Notes Macro IS_I2C_WAKEUP_FROMSTOP_INSTANCE(I2Cx) can
be used to check whether or not WakeUpFromStop feature is
supported by the I2Cx Instance.
Reference Manual to CR1 WUPEN LL_I2C_DisableWakeUpFromStop
LL API cross
reference:
LL_I2C_IsEnabledWakeUpFromStop
Function name __STATIC_INLINE uint32_t
LL_I2C_IsEnabledWakeUpFromStop (I2C_TypeDef * I2Cx)
LL_I2C_EnableGeneralCall
Function name __STATIC_INLINE void LL_I2C_EnableGeneralCall
(I2C_TypeDef * I2Cx)
Function description Enable General Call.
Parameters I2Cx: I2C Instance.
Return values None
Notes When enabled the Address 0x00 is ACKed.
Reference Manual to CR1 GCEN LL_I2C_EnableGeneralCall
LL API cross
reference:
LL_I2C_DisableGeneralCall
Function name __STATIC_INLINE void LL_I2C_DisableGeneralCall
(I2C_TypeDef * I2Cx)
Function description Disable General Call.
Parameters I2Cx: I2C Instance.
Return values None
Notes When disabled the Address 0x00 is NACKed.
Reference Manual to CR1 GCEN LL_I2C_DisableGeneralCall
LL API cross
reference:
LL_I2C_IsEnabledGeneralCall
Function name __STATIC_INLINE uint32_t LL_I2C_IsEnabledGeneralCall
(I2C_TypeDef * I2Cx)
Function description Check if General Call is enabled or disabled.
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Reference Manual to CR1 GCEN LL_I2C_IsEnabledGeneralCall
LL API cross
reference:
LL_I2C_GetMasterAddressingMode
Function name __STATIC_INLINE uint32_t
LL_I2C_GetMasterAddressingMode (I2C_TypeDef * I2Cx)
Function description Get the Master addressing mode.
Parameters I2Cx: I2C Instance.
Return values Returned: value can be one of the following values:
LL_I2C_ADDRESSING_MODE_7BIT
LL_I2C_ADDRESSING_MODE_10BIT
Reference Manual to CR2 ADD10 LL_I2C_GetMasterAddressingMode
LL API cross
reference:
LL_I2C_SetOwnAddress1
Function name __STATIC_INLINE void LL_I2C_SetOwnAddress1
(I2C_TypeDef * I2Cx, uint32_t OwnAddress1, uint32_t
OwnAddrSize)
Function description Set the Own Address1.
Parameters I2Cx: I2C Instance.
OwnAddress1: This parameter must be a value between
Min_Data=0 and Max_Data=0x3FF.
OwnAddrSize: This parameter can be one of the following
values:
LL_I2C_OWNADDRESS1_7BIT
LL_I2C_OWNADDRESS1_10BIT
Return values None
Reference Manual to OAR1 OA1 LL_I2C_SetOwnAddress1
LL API cross OAR1 OA1MODE LL_I2C_SetOwnAddress1
reference:
LL_I2C_DisableOwnAddress1
Function name __STATIC_INLINE void LL_I2C_DisableOwnAddress1
(I2C_TypeDef * I2Cx)
Function description Disable acknowledge on Own Address1 match address.
Parameters I2Cx: I2C Instance.
Return values None
Reference Manual to OAR1 OA1EN LL_I2C_DisableOwnAddress1
LL API cross
reference:
LL_I2C_IsEnabledOwnAddress1
Function name __STATIC_INLINE uint32_t LL_I2C_IsEnabledOwnAddress1
(I2C_TypeDef * I2Cx)
Function description Check if Own Address1 acknowledge is enabled or disabled.
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Reference Manual to OAR1 OA1EN LL_I2C_IsEnabledOwnAddress1
LL API cross
reference:
LL_I2C_SetOwnAddress2
Function name __STATIC_INLINE void LL_I2C_SetOwnAddress2
(I2C_TypeDef * I2Cx, uint32_t OwnAddress2, uint32_t
OwnAddrMask)
Function description Set the 7bits Own Address2.
Parameters I2Cx: I2C Instance.
OwnAddress2: Value between Min_Data=0 and
Max_Data=0x7F.
OwnAddrMask: This parameter can be one of the following
values:
LL_I2C_OWNADDRESS2_NOMASK
LL_I2C_OWNADDRESS2_MASK01
LL_I2C_OWNADDRESS2_MASK02
LL_I2C_EnableOwnAddress2
Function name __STATIC_INLINE void LL_I2C_EnableOwnAddress2
(I2C_TypeDef * I2Cx)
Function description Enable acknowledge on Own Address2 match address.
Parameters I2Cx: I2C Instance.
Return values None
Reference Manual to OAR2 OA2EN LL_I2C_EnableOwnAddress2
LL API cross
reference:
LL_I2C_DisableOwnAddress2
Function name __STATIC_INLINE void LL_I2C_DisableOwnAddress2
(I2C_TypeDef * I2Cx)
Function description Disable acknowledge on Own Address2 match address.
Parameters I2Cx: I2C Instance.
Return values None
Reference Manual to OAR2 OA2EN LL_I2C_DisableOwnAddress2
LL API cross
reference:
LL_I2C_IsEnabledOwnAddress2
Function name __STATIC_INLINE uint32_t LL_I2C_IsEnabledOwnAddress2
(I2C_TypeDef * I2Cx)
Function description Check if Own Address1 acknowledge is enabled or disabled.
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Reference Manual to OAR2 OA2EN LL_I2C_IsEnabledOwnAddress2
LL API cross
reference:
LL_I2C_GetTimingPrescaler
Function name __STATIC_INLINE uint32_t LL_I2C_GetTimingPrescaler
(I2C_TypeDef * I2Cx)
Function description Get the Timing Prescaler setting.
Parameters I2Cx: I2C Instance.
Return values Value: between Min_Data=0x0 and Max_Data=0xF
Reference Manual to TIMINGR PRESC LL_I2C_GetTimingPrescaler
LL API cross
reference:
LL_I2C_GetClockLowPeriod
Function name __STATIC_INLINE uint32_t LL_I2C_GetClockLowPeriod
(I2C_TypeDef * I2Cx)
Function description Get the SCL low period setting.
Parameters I2Cx: I2C Instance.
Return values Value: between Min_Data=0x00 and Max_Data=0xFF
Reference Manual to TIMINGR SCLL LL_I2C_GetClockLowPeriod
LL API cross
reference:
LL_I2C_GetClockHighPeriod
Function name __STATIC_INLINE uint32_t LL_I2C_GetClockHighPeriod
(I2C_TypeDef * I2Cx)
Function description Get the SCL high period setting.
Parameters I2Cx: I2C Instance.
Return values Value: between Min_Data=0x00 and Max_Data=0xFF
LL_I2C_GetDataHoldTime
Function name __STATIC_INLINE uint32_t LL_I2C_GetDataHoldTime
(I2C_TypeDef * I2Cx)
Function description Get the SDA hold time.
Parameters I2Cx: I2C Instance.
Return values Value: between Min_Data=0x0 and Max_Data=0xF
Reference Manual to TIMINGR SDADEL LL_I2C_GetDataHoldTime
LL API cross
reference:
LL_I2C_GetDataSetupTime
Function name __STATIC_INLINE uint32_t LL_I2C_GetDataSetupTime
(I2C_TypeDef * I2Cx)
Function description Get the SDA setup time.
Parameters I2Cx: I2C Instance.
Return values Value: between Min_Data=0x0 and Max_Data=0xF
Reference Manual to TIMINGR SCLDEL LL_I2C_GetDataSetupTime
LL API cross
reference:
LL_I2C_SetMode
Function name __STATIC_INLINE void LL_I2C_SetMode (I2C_TypeDef * I2Cx,
uint32_t PeripheralMode)
Function description Configure peripheral mode.
Parameters I2Cx: I2C Instance.
PeripheralMode: This parameter can be one of the following
values:
LL_I2C_MODE_I2C
LL_I2C_MODE_SMBUS_HOST
LL_I2C_MODE_SMBUS_DEVICE
LL_I2C_MODE_SMBUS_DEVICE_ARP
Return values None
Notes Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to
check whether or not SMBus feature is supported by the I2Cx
Instance.
Reference Manual to CR1 SMBHEN LL_I2C_SetMode
LL API cross CR1 SMBDEN LL_I2C_SetMode
reference:
LL_I2C_EnableSMBusAlert
Function name __STATIC_INLINE void LL_I2C_EnableSMBusAlert
(I2C_TypeDef * I2Cx)
Function description Enable SMBus alert (Host or Device mode)
Parameters I2Cx: I2C Instance.
Return values None
Notes Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to
check whether or not SMBus feature is supported by the I2Cx
Instance.
SMBus Device mode: SMBus Alert pin is drived low and Alert
Response Address Header acknowledge is enabled. SMBus
Host mode:SMBus Alert pin management is supported.
Reference Manual to CR1 ALERTEN LL_I2C_EnableSMBusAlert
LL API cross
reference:
LL_I2C_DisableSMBusAlert
Function name __STATIC_INLINE void LL_I2C_DisableSMBusAlert
(I2C_TypeDef * I2Cx)
Function description Disable SMBus alert (Host or Device mode)
Parameters I2Cx: I2C Instance.
Return values None
Notes Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to
check whether or not SMBus feature is supported by the I2Cx
Instance.
SMBus Device mode: SMBus Alert pin is not drived (can be
used as a standard GPIO) and Alert Response Address
LL_I2C_IsEnabledSMBusAlert
Function name __STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusAlert
(I2C_TypeDef * I2Cx)
Function description Check if SMBus alert (Host or Device mode) is enabled or
disabled.
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Notes Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to
check whether or not SMBus feature is supported by the I2Cx
Instance.
Reference Manual to CR1 ALERTEN LL_I2C_IsEnabledSMBusAlert
LL API cross
reference:
LL_I2C_EnableSMBusPEC
Function name __STATIC_INLINE void LL_I2C_EnableSMBusPEC
(I2C_TypeDef * I2Cx)
Function description Enable SMBus Packet Error Calculation (PEC).
Parameters I2Cx: I2C Instance.
Return values None
Notes Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to
check whether or not SMBus feature is supported by the I2Cx
Instance.
Reference Manual to CR1 PECEN LL_I2C_EnableSMBusPEC
LL API cross
reference:
LL_I2C_DisableSMBusPEC
Function name __STATIC_INLINE void LL_I2C_DisableSMBusPEC
(I2C_TypeDef * I2Cx)
Function description Disable SMBus Packet Error Calculation (PEC).
Parameters I2Cx: I2C Instance.
Return values None
Notes Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to
check whether or not SMBus feature is supported by the I2Cx
Instance.
LL_I2C_IsEnabledSMBusPEC
Function name __STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusPEC
(I2C_TypeDef * I2Cx)
Function description Check if SMBus Packet Error Calculation (PEC) is enabled or
disabled.
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Notes Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to
check whether or not SMBus feature is supported by the I2Cx
Instance.
Reference Manual to CR1 PECEN LL_I2C_IsEnabledSMBusPEC
LL API cross
reference:
LL_I2C_ConfigSMBusTimeout
Function name __STATIC_INLINE void LL_I2C_ConfigSMBusTimeout
(I2C_TypeDef * I2Cx, uint32_t TimeoutA, uint32_t TimeoutAMode,
uint32_t TimeoutB)
Function Configure the SMBus Clock Timeout.
description
Parameters I2Cx: I2C Instance.
TimeoutA: This parameter must be a value between
Min_Data=0 and Max_Data=0xFFF.
TimeoutAMode: This parameter can be one of the following
values:
LL_I2C_SMBUS_TIMEOUTA_MODE_SCL_LOW
LL_I2C_SMBUS_TIMEOUTA_MODE_SDA_SCL_HIGH
TimeoutB:
Return values None
Notes Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check
whether or not SMBus feature is supported by the I2Cx Instance.
This configuration can only be programmed when associated
Timeout is disabled (TimeoutA and/orTimeoutB).
Reference TIMEOUTR TIMEOUTA LL_I2C_ConfigSMBusTimeout
Manual to LL API TIMEOUTR TIDLE LL_I2C_ConfigSMBusTimeout
cross reference: TIMEOUTR TIMEOUTB LL_I2C_ConfigSMBusTimeout
LL_I2C_SetSMBusTimeoutA
Function name __STATIC_INLINE void LL_I2C_SetSMBusTimeoutA
(I2C_TypeDef * I2Cx, uint32_t TimeoutA)
Function description Configure the SMBus Clock TimeoutA (SCL low timeout or SCL
LL_I2C_GetSMBusTimeoutA
Function name __STATIC_INLINE uint32_t LL_I2C_GetSMBusTimeoutA
(I2C_TypeDef * I2Cx)
Function description Get the SMBus Clock TimeoutA setting.
Parameters I2Cx: I2C Instance.
Return values Value: between Min_Data=0 and Max_Data=0xFFF
Notes Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to
check whether or not SMBus feature is supported by the I2Cx
Instance.
Reference Manual to TIMEOUTR TIMEOUTA LL_I2C_GetSMBusTimeoutA
LL API cross
reference:
LL_I2C_SetSMBusTimeoutAMode
Function name __STATIC_INLINE void LL_I2C_SetSMBusTimeoutAMode
(I2C_TypeDef * I2Cx, uint32_t TimeoutAMode)
Function Set the SMBus Clock TimeoutA mode.
description
Parameters I2Cx: I2C Instance.
TimeoutAMode: This parameter can be one of the following
values:
LL_I2C_SMBUS_TIMEOUTA_MODE_SCL_LOW
LL_I2C_SMBUS_TIMEOUTA_MODE_SDA_SCL_HIGH
Return values None
Notes Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check
whether or not SMBus feature is supported by the I2Cx Instance.
This bit can only be programmed when TimeoutA is disabled.
Reference TIMEOUTR TIDLE LL_I2C_SetSMBusTimeoutAMode
Manual to LL API
cross reference:
LL_I2C_SetSMBusTimeoutB
Function name __STATIC_INLINE void LL_I2C_SetSMBusTimeoutB
(I2C_TypeDef * I2Cx, uint32_t TimeoutB)
Function description Configure the SMBus Extended Cumulative Clock TimeoutB
(Master or Slave mode).
Parameters I2Cx: I2C Instance.
TimeoutB: This parameter must be a value between
Min_Data=0 and Max_Data=0xFFF.
Return values None
Notes Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to
check whether or not SMBus feature is supported by the I2Cx
Instance.
These bits can only be programmed when TimeoutB is
disabled.
Reference Manual to TIMEOUTR TIMEOUTB LL_I2C_SetSMBusTimeoutB
LL API cross
reference:
LL_I2C_GetSMBusTimeoutB
Function name __STATIC_INLINE uint32_t LL_I2C_GetSMBusTimeoutB
(I2C_TypeDef * I2Cx)
Function description Get the SMBus Extented Cumulative Clock TimeoutB setting.
Parameters I2Cx: I2C Instance.
Return values Value: between Min_Data=0 and Max_Data=0xFFF
Notes Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to
check whether or not SMBus feature is supported by the I2Cx
Instance.
Reference Manual to TIMEOUTR TIMEOUTB LL_I2C_GetSMBusTimeoutB
LL API cross
LL_I2C_EnableSMBusTimeout
Function name __STATIC_INLINE void LL_I2C_EnableSMBusTimeout
(I2C_TypeDef * I2Cx, uint32_t ClockTimeout)
Function description Enable the SMBus Clock Timeout.
Parameters I2Cx: I2C Instance.
ClockTimeout: This parameter can be one of the following
values:
LL_I2C_SMBUS_TIMEOUTA
LL_I2C_SMBUS_TIMEOUTB
LL_I2C_SMBUS_ALL_TIMEOUT
Return values None
Notes Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to
check whether or not SMBus feature is supported by the I2Cx
Instance.
Reference Manual to TIMEOUTR TIMOUTEN LL_I2C_EnableSMBusTimeout
LL API cross TIMEOUTR TEXTEN LL_I2C_EnableSMBusTimeout
reference:
LL_I2C_DisableSMBusTimeout
Function name __STATIC_INLINE void LL_I2C_DisableSMBusTimeout
(I2C_TypeDef * I2Cx, uint32_t ClockTimeout)
Function description Disable the SMBus Clock Timeout.
Parameters I2Cx: I2C Instance.
ClockTimeout: This parameter can be one of the following
values:
LL_I2C_SMBUS_TIMEOUTA
LL_I2C_SMBUS_TIMEOUTB
LL_I2C_SMBUS_ALL_TIMEOUT
Return values None
Notes Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to
check whether or not SMBus feature is supported by the I2Cx
Instance.
Reference Manual to TIMEOUTR TIMOUTEN LL_I2C_DisableSMBusTimeout
LL API cross TIMEOUTR TEXTEN LL_I2C_DisableSMBusTimeout
reference:
LL_I2C_IsEnabledSMBusTimeout
Function name __STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusTimeout
(I2C_TypeDef * I2Cx, uint32_t ClockTimeout)
Function description Check if the SMBus Clock Timeout is enabled or disabled.
Parameters I2Cx: I2C Instance.
ClockTimeout: This parameter can be one of the following
values:
LL_I2C_EnableIT_TX
Function name __STATIC_INLINE void LL_I2C_EnableIT_TX (I2C_TypeDef *
I2Cx)
Function description Enable TXIS interrupt.
Parameters I2Cx: I2C Instance.
Return values None
Reference Manual to CR1 TXIE LL_I2C_EnableIT_TX
LL API cross
reference:
LL_I2C_DisableIT_TX
Function name __STATIC_INLINE void LL_I2C_DisableIT_TX (I2C_TypeDef *
I2Cx)
Function description Disable TXIS interrupt.
Parameters I2Cx: I2C Instance.
Return values None
Reference Manual to CR1 TXIE LL_I2C_DisableIT_TX
LL API cross
reference:
LL_I2C_IsEnabledIT_TX
Function name __STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_TX
(I2C_TypeDef * I2Cx)
Function description Check if the TXIS Interrupt is enabled or disabled.
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Reference Manual to CR1 TXIE LL_I2C_IsEnabledIT_TX
LL API cross
reference:
LL_I2C_DisableIT_RX
Function name __STATIC_INLINE void LL_I2C_DisableIT_RX (I2C_TypeDef *
I2Cx)
Function description Disable RXNE interrupt.
Parameters I2Cx: I2C Instance.
Return values None
Reference Manual to CR1 RXIE LL_I2C_DisableIT_RX
LL API cross
reference:
LL_I2C_IsEnabledIT_RX
Function name __STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_RX
(I2C_TypeDef * I2Cx)
Function description Check if the RXNE Interrupt is enabled or disabled.
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Reference Manual to CR1 RXIE LL_I2C_IsEnabledIT_RX
LL API cross
reference:
LL_I2C_EnableIT_ADDR
Function name __STATIC_INLINE void LL_I2C_EnableIT_ADDR (I2C_TypeDef
* I2Cx)
Function description Enable Address match interrupt (slave mode only).
Parameters I2Cx: I2C Instance.
Return values None
Reference Manual to CR1 ADDRIE LL_I2C_EnableIT_ADDR
LL API cross
reference:
LL_I2C_IsEnabledIT_ADDR
Function name __STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_ADDR
(I2C_TypeDef * I2Cx)
Function description Check if Address match interrupt is enabled or disabled.
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Reference Manual to CR1 ADDRIE LL_I2C_IsEnabledIT_ADDR
LL API cross
reference:
LL_I2C_EnableIT_NACK
Function name __STATIC_INLINE void LL_I2C_EnableIT_NACK (I2C_TypeDef
* I2Cx)
Function description Enable Not acknowledge received interrupt.
Parameters I2Cx: I2C Instance.
Return values None
Reference Manual to CR1 NACKIE LL_I2C_EnableIT_NACK
LL API cross
reference:
LL_I2C_DisableIT_NACK
Function name __STATIC_INLINE void LL_I2C_DisableIT_NACK (I2C_TypeDef
* I2Cx)
Function description Disable Not acknowledge received interrupt.
Parameters I2Cx: I2C Instance.
Return values None
Reference Manual to CR1 NACKIE LL_I2C_DisableIT_NACK
LL API cross
reference:
LL_I2C_EnableIT_STOP
Function name __STATIC_INLINE void LL_I2C_EnableIT_STOP (I2C_TypeDef
* I2Cx)
Function description Enable STOP detection interrupt.
Parameters I2Cx: I2C Instance.
Return values None
Reference Manual to CR1 STOPIE LL_I2C_EnableIT_STOP
LL API cross
reference:
LL_I2C_DisableIT_STOP
Function name __STATIC_INLINE void LL_I2C_DisableIT_STOP (I2C_TypeDef
* I2Cx)
Function description Disable STOP detection interrupt.
Parameters I2Cx: I2C Instance.
Return values None
Reference Manual to CR1 STOPIE LL_I2C_DisableIT_STOP
LL API cross
reference:
LL_I2C_IsEnabledIT_STOP
Function name __STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_STOP
(I2C_TypeDef * I2Cx)
Function description Check if STOP detection interrupt is enabled or disabled.
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Reference Manual to CR1 STOPIE LL_I2C_IsEnabledIT_STOP
LL API cross
reference:
LL_I2C_DisableIT_TC
Function name __STATIC_INLINE void LL_I2C_DisableIT_TC (I2C_TypeDef *
I2Cx)
Function description Disable Transfer Complete interrupt.
Parameters I2Cx: I2C Instance.
Return values None
Notes Any of these events will generate interrupt : Transfer
Complete (TC) Transfer Complete Reload (TCR)
Reference Manual to CR1 TCIE LL_I2C_DisableIT_TC
LL API cross
reference:
LL_I2C_IsEnabledIT_TC
Function name __STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_TC
(I2C_TypeDef * I2Cx)
Function description Check if Transfer Complete interrupt is enabled or disabled.
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Reference Manual to CR1 TCIE LL_I2C_IsEnabledIT_TC
LL API cross
reference:
LL_I2C_EnableIT_ERR
Function name __STATIC_INLINE void LL_I2C_EnableIT_ERR (I2C_TypeDef *
I2Cx)
Function description Enable Error interrupts.
Parameters I2Cx: I2C Instance.
Return values None
Notes Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to
LL_I2C_DisableIT_ERR
Function name __STATIC_INLINE void LL_I2C_DisableIT_ERR (I2C_TypeDef *
I2Cx)
Function description Disable Error interrupts.
Parameters I2Cx: I2C Instance.
Return values None
Notes Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to
check whether or not SMBus feature is supported by the I2Cx
Instance.
Any of these errors will generate interrupt : Arbitration Loss
(ARLO) Bus Error detection (BERR) Overrun/Underrun (OVR)
SMBus Timeout detection (TIMEOUT) SMBus PEC error
detection (PECERR) SMBus Alert pin event detection
(ALERT)
Reference Manual to CR1 ERRIE LL_I2C_DisableIT_ERR
LL API cross
reference:
LL_I2C_IsEnabledIT_ERR
Function name __STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_ERR
(I2C_TypeDef * I2Cx)
Function description Check if Error interrupts are enabled or disabled.
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Reference Manual to CR1 ERRIE LL_I2C_IsEnabledIT_ERR
LL API cross
reference:
LL_I2C_IsActiveFlag_TXE
Function name __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TXE
(I2C_TypeDef * I2Cx)
Function description Indicate the status of Transmit data register empty flag.
Parameters I2Cx: I2C Instance.
LL_I2C_IsActiveFlag_TXIS
Function name __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TXIS
(I2C_TypeDef * I2Cx)
Function description Indicate the status of Transmit interrupt flag.
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Notes RESET: When next data is written in Transmit data register.
SET: When Transmit data register is empty.
Reference Manual to ISR TXIS LL_I2C_IsActiveFlag_TXIS
LL API cross
reference:
LL_I2C_IsActiveFlag_RXNE
Function name __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_RXNE
(I2C_TypeDef * I2Cx)
Function description Indicate the status of Receive data register not empty flag.
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Notes RESET: When Receive data register is read. SET: When the
received data is copied in Receive data register.
Reference Manual to ISR RXNE LL_I2C_IsActiveFlag_RXNE
LL API cross
reference:
LL_I2C_IsActiveFlag_ADDR
Function name __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_ADDR
(I2C_TypeDef * I2Cx)
Function description Indicate the status of Address matched flag (slave mode).
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Notes RESET: Clear default value. SET: When the received slave
address matched with one of the enabled slave address.
Reference Manual to ISR ADDR LL_I2C_IsActiveFlag_ADDR
LL API cross
reference:
LL_I2C_IsActiveFlag_STOP
Function name __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_STOP
(I2C_TypeDef * I2Cx)
Function description Indicate the status of Stop detection flag.
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Notes RESET: Clear default value. SET: When a Stop condition is
detected.
Reference Manual to ISR STOPF LL_I2C_IsActiveFlag_STOP
LL API cross
reference:
LL_I2C_IsActiveFlag_TC
Function name __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TC
(I2C_TypeDef * I2Cx)
Function description Indicate the status of Transfer complete flag (master mode).
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Notes RESET: Clear default value. SET: When RELOAD=0,
AUTOEND=0 and NBYTES date have been transferred.
Reference Manual to ISR TC LL_I2C_IsActiveFlag_TC
LL API cross
reference:
LL_I2C_IsActiveFlag_TCR
Function name __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TCR
(I2C_TypeDef * I2Cx)
Function description Indicate the status of Transfer complete flag (master mode).
Parameters I2Cx: I2C Instance.
LL_I2C_IsActiveFlag_BERR
Function name __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_BERR
(I2C_TypeDef * I2Cx)
Function description Indicate the status of Bus error flag.
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Notes RESET: Clear default value. SET: When a misplaced Start or
Stop condition is detected.
Reference Manual to ISR BERR LL_I2C_IsActiveFlag_BERR
LL API cross
reference:
LL_I2C_IsActiveFlag_ARLO
Function name __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_ARLO
(I2C_TypeDef * I2Cx)
Function description Indicate the status of Arbitration lost flag.
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Notes RESET: Clear default value. SET: When arbitration lost.
Reference Manual to ISR ARLO LL_I2C_IsActiveFlag_ARLO
LL API cross
reference:
LL_I2C_IsActiveFlag_OVR
Function name __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_OVR
(I2C_TypeDef * I2Cx)
Function description Indicate the status of Overrun/Underrun flag (slave mode).
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Notes RESET: Clear default value. SET: When an overrun/underrun
error occurs (Clock Stretching Disabled).
Reference Manual to ISR OVR LL_I2C_IsActiveFlag_OVR
LL API cross
reference:
LL_I2C_IsActiveSMBusFlag_TIMEOUT
Function name __STATIC_INLINE uint32_t
LL_I2C_IsActiveSMBusFlag_TIMEOUT (I2C_TypeDef * I2Cx)
Function description Indicate the status of SMBus Timeout detection flag.
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Notes Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to
check whether or not SMBus feature is supported by the I2Cx
Instance.
RESET: Clear default value. SET: When a timeout or
extended clock timeout occurs.
Reference Manual to ISR TIMEOUT LL_I2C_IsActiveSMBusFlag_TIMEOUT
LL API cross
reference:
LL_I2C_IsActiveSMBusFlag_ALERT
Function name __STATIC_INLINE uint32_t
LL_I2C_IsActiveSMBusFlag_ALERT (I2C_TypeDef * I2Cx)
Function description Indicate the status of SMBus alert flag.
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Notes Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to
check whether or not SMBus feature is supported by the I2Cx
Instance.
RESET: Clear default value. SET: When SMBus host
configuration, SMBus alert enabled and a falling edge event
occurs on SMBA pin.
Reference Manual to ISR ALERT LL_I2C_IsActiveSMBusFlag_ALERT
LL API cross
LL_I2C_IsActiveFlag_BUSY
Function name __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_BUSY
(I2C_TypeDef * I2Cx)
Function description Indicate the status of Bus Busy flag.
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Notes RESET: Clear default value. SET: When a Start condition is
detected.
Reference Manual to ISR BUSY LL_I2C_IsActiveFlag_BUSY
LL API cross
reference:
LL_I2C_ClearFlag_ADDR
Function name __STATIC_INLINE void LL_I2C_ClearFlag_ADDR
(I2C_TypeDef * I2Cx)
Function description Clear Address Matched flag.
Parameters I2Cx: I2C Instance.
Return values None
Reference Manual to ICR ADDRCF LL_I2C_ClearFlag_ADDR
LL API cross
reference:
LL_I2C_ClearFlag_NACK
Function name __STATIC_INLINE void LL_I2C_ClearFlag_NACK
(I2C_TypeDef * I2Cx)
Function description Clear Not Acknowledge flag.
Parameters I2Cx: I2C Instance.
Return values None
Reference Manual to ICR NACKCF LL_I2C_ClearFlag_NACK
LL API cross
reference:
LL_I2C_ClearFlag_STOP
Function name __STATIC_INLINE void LL_I2C_ClearFlag_STOP (I2C_TypeDef
* I2Cx)
Function description Clear Stop detection flag.
Parameters I2Cx: I2C Instance.
Return values None
Reference Manual to ICR STOPCF LL_I2C_ClearFlag_STOP
LL_I2C_ClearFlag_TXE
Function name __STATIC_INLINE void LL_I2C_ClearFlag_TXE (I2C_TypeDef *
I2Cx)
Function description Clear Transmit data register empty flag (TXE).
Parameters I2Cx: I2C Instance.
Return values None
Notes This bit can be clear by software in order to flush the transmit
data register (TXDR).
Reference Manual to ISR TXE LL_I2C_ClearFlag_TXE
LL API cross
reference:
LL_I2C_ClearFlag_BERR
Function name __STATIC_INLINE void LL_I2C_ClearFlag_BERR
(I2C_TypeDef * I2Cx)
Function description Clear Bus error flag.
Parameters I2Cx: I2C Instance.
Return values None
Reference Manual to ICR BERRCF LL_I2C_ClearFlag_BERR
LL API cross
reference:
LL_I2C_ClearFlag_ARLO
Function name __STATIC_INLINE void LL_I2C_ClearFlag_ARLO
(I2C_TypeDef * I2Cx)
Function description Clear Arbitration lost flag.
Parameters I2Cx: I2C Instance.
Return values None
Reference Manual to ICR ARLOCF LL_I2C_ClearFlag_ARLO
LL API cross
reference:
LL_I2C_ClearFlag_OVR
Function name __STATIC_INLINE void LL_I2C_ClearFlag_OVR (I2C_TypeDef
* I2Cx)
Function description Clear Overrun/Underrun flag.
Parameters I2Cx: I2C Instance.
Return values None
LL_I2C_ClearSMBusFlag_PECERR
Function name __STATIC_INLINE void LL_I2C_ClearSMBusFlag_PECERR
(I2C_TypeDef * I2Cx)
Function description Clear SMBus PEC error flag.
Parameters I2Cx: I2C Instance.
Return values None
Notes Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to
check whether or not SMBus feature is supported by the I2Cx
Instance.
Reference Manual to ICR PECCF LL_I2C_ClearSMBusFlag_PECERR
LL API cross
reference:
LL_I2C_ClearSMBusFlag_TIMEOUT
Function name __STATIC_INLINE void LL_I2C_ClearSMBusFlag_TIMEOUT
(I2C_TypeDef * I2Cx)
Function description Clear SMBus Timeout detection flag.
Parameters I2Cx: I2C Instance.
Return values None
Notes Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to
check whether or not SMBus feature is supported by the I2Cx
Instance.
Reference Manual to ICR TIMOUTCF LL_I2C_ClearSMBusFlag_TIMEOUT
LL API cross
reference:
LL_I2C_ClearSMBusFlag_ALERT
Function name __STATIC_INLINE void LL_I2C_ClearSMBusFlag_ALERT
(I2C_TypeDef * I2Cx)
Function description Clear SMBus Alert flag.
Parameters I2Cx: I2C Instance.
Return values None
Notes Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to
check whether or not SMBus feature is supported by the I2Cx
Instance.
Reference Manual to ICR ALERTCF LL_I2C_ClearSMBusFlag_ALERT
LL API cross
reference:
LL_I2C_DisableAutoEndMode
Function name __STATIC_INLINE void LL_I2C_DisableAutoEndMode
(I2C_TypeDef * I2Cx)
Function description Disable automatic STOP condition generation (master mode).
Parameters I2Cx: I2C Instance.
Return values None
Notes Software end mode : TC flag is set when NBYTES data are
transferre, stretching SCL low.
Reference Manual to CR2 AUTOEND LL_I2C_DisableAutoEndMode
LL API cross
reference:
LL_I2C_IsEnabledAutoEndMode
Function name __STATIC_INLINE uint32_t LL_I2C_IsEnabledAutoEndMode
(I2C_TypeDef * I2Cx)
Function description Check if automatic STOP condition is enabled or disabled.
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Reference Manual to CR2 AUTOEND LL_I2C_IsEnabledAutoEndMode
LL API cross
reference:
LL_I2C_EnableReloadMode
Function name __STATIC_INLINE void LL_I2C_EnableReloadMode
(I2C_TypeDef * I2Cx)
Function description Enable reload mode (master mode).
Parameters I2Cx: I2C Instance.
Return values None
LL_I2C_DisableReloadMode
Function name __STATIC_INLINE void LL_I2C_DisableReloadMode
(I2C_TypeDef * I2Cx)
Function description Disable reload mode (master mode).
Parameters I2Cx: I2C Instance.
Return values None
Notes The transfer is completed after the NBYTES data
transfer(STOP or RESTART will follow).
Reference Manual to CR2 RELOAD LL_I2C_DisableReloadMode
LL API cross
reference:
LL_I2C_IsEnabledReloadMode
Function name __STATIC_INLINE uint32_t LL_I2C_IsEnabledReloadMode
(I2C_TypeDef * I2Cx)
Function description Check if reload mode is enabled or disabled.
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Reference Manual to CR2 RELOAD LL_I2C_IsEnabledReloadMode
LL API cross
reference:
LL_I2C_SetTransferSize
Function name __STATIC_INLINE void LL_I2C_SetTransferSize (I2C_TypeDef
* I2Cx, uint32_t TransferSize)
Function description Configure the number of bytes for transfer.
Parameters I2Cx: I2C Instance.
TransferSize: This parameter must be a value between
Min_Data=0x00 and Max_Data=0xFF.
Return values None
Notes Changing these bits when START bit is set is not allowed.
Reference Manual to CR2 NBYTES LL_I2C_SetTransferSize
LL API cross
reference:
LL_I2C_AcknowledgeNextData
Function name __STATIC_INLINE void LL_I2C_AcknowledgeNextData
(I2C_TypeDef * I2Cx, uint32_t TypeAcknowledge)
Function description Prepare the generation of a ACKnowledge or Non ACKnowledge
condition after the address receive match code or next received
byte.
Parameters I2Cx: I2C Instance.
TypeAcknowledge: This parameter can be one of the
following values:
LL_I2C_ACK
LL_I2C_NACK
Return values None
Notes Usage in Slave mode only.
Reference Manual to CR2 NACK LL_I2C_AcknowledgeNextData
LL API cross
reference:
LL_I2C_GenerateStartCondition
Function name __STATIC_INLINE void LL_I2C_GenerateStartCondition
(I2C_TypeDef * I2Cx)
Function description Generate a START or RESTART condition.
Parameters I2Cx: I2C Instance.
Return values None
Notes The START bit can be set even if bus is BUSY or I2C is in
slave mode. This action has no effect when RELOAD is set.
Reference Manual to CR2 START LL_I2C_GenerateStartCondition
LL API cross
reference:
LL_I2C_GenerateStopCondition
Function name __STATIC_INLINE void LL_I2C_GenerateStopCondition
(I2C_TypeDef * I2Cx)
LL_I2C_EnableAuto10BitRead
Function name __STATIC_INLINE void LL_I2C_EnableAuto10BitRead
(I2C_TypeDef * I2Cx)
Function description Enable automatic RESTART Read request condition for 10bit
address header (master mode).
Parameters I2Cx: I2C Instance.
Return values None
Notes The master sends the complete 10bit slave address read
sequence : Start + 2 bytes 10bit address in Write direction +
Restart + first 7 bits of 10bit address in Read direction.
Reference Manual to CR2 HEAD10R LL_I2C_EnableAuto10BitRead
LL API cross
reference:
LL_I2C_DisableAuto10BitRead
Function name __STATIC_INLINE void LL_I2C_DisableAuto10BitRead
(I2C_TypeDef * I2Cx)
Function description Disable automatic RESTART Read request condition for 10bit
address header (master mode).
Parameters I2Cx: I2C Instance.
Return values None
Notes The master only sends the first 7 bits of 10bit address in Read
direction.
Reference Manual to CR2 HEAD10R LL_I2C_DisableAuto10BitRead
LL API cross
reference:
LL_I2C_IsEnabledAuto10BitRead
Function name __STATIC_INLINE uint32_t LL_I2C_IsEnabledAuto10BitRead
(I2C_TypeDef * I2Cx)
Function description Check if automatic RESTART Read request condition for 10bit
address header is enabled or disabled.
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
LL_I2C_SetTransferRequest
Function name __STATIC_INLINE void LL_I2C_SetTransferRequest
(I2C_TypeDef * I2Cx, uint32_t TransferRequest)
Function description Configure the transfer direction (master mode).
Parameters I2Cx: I2C Instance.
TransferRequest: This parameter can be one of the
following values:
LL_I2C_REQUEST_WRITE
LL_I2C_REQUEST_READ
Return values None
Notes Changing these bits when START bit is set is not allowed.
Reference Manual to CR2 RD_WRN LL_I2C_SetTransferRequest
LL API cross
reference:
LL_I2C_GetTransferRequest
Function name __STATIC_INLINE uint32_t LL_I2C_GetTransferRequest
(I2C_TypeDef * I2Cx)
Function description Get the transfer direction requested (master mode).
Parameters I2Cx: I2C Instance.
Return values Returned: value can be one of the following values:
LL_I2C_REQUEST_WRITE
LL_I2C_REQUEST_READ
Reference Manual to CR2 RD_WRN LL_I2C_GetTransferRequest
LL API cross
reference:
LL_I2C_SetSlaveAddr
Function name __STATIC_INLINE void LL_I2C_SetSlaveAddr (I2C_TypeDef *
I2Cx, uint32_t SlaveAddr)
Function description Configure the slave address for transfer (master mode).
Parameters I2Cx: I2C Instance.
SlaveAddr: This parameter must be a value between
Min_Data=0x00 and Max_Data=0x3F.
Return values None
Notes Changing these bits when START bit is set is not allowed.
Reference Manual to CR2 SADD LL_I2C_SetSlaveAddr
LL API cross
reference:
LL_I2C_HandleTransfer
Function name __STATIC_INLINE void LL_I2C_HandleTransfer (I2C_TypeDef
* I2Cx, uint32_t SlaveAddr, uint32_t SlaveAddrSize, uint32_t
TransferSize, uint32_t EndMode, uint32_t Request)
Function description Handles I2Cx communication when starting transfer or during
transfer (TC or TCR flag are set).
Parameters I2Cx: I2C Instance.
SlaveAddr: Specifies the slave address to be programmed.
SlaveAddrSize: This parameter can be one of the following
values:
LL_I2C_ADDRSLAVE_7BIT
LL_I2C_ADDRSLAVE_10BIT
TransferSize: Specifies the number of bytes to be
programmed. This parameter must be a value between
Min_Data=0 and Max_Data=255.
EndMode: This parameter can be one of the following
values:
LL_I2C_MODE_RELOAD
LL_I2C_MODE_AUTOEND
LL_I2C_MODE_SOFTEND
LL_I2C_MODE_SMBUS_RELOAD
LL_I2C_MODE_SMBUS_AUTOEND_NO_PEC
LL_I2C_MODE_SMBUS_SOFTEND_NO_PEC
LL_I2C_MODE_SMBUS_AUTOEND_WITH_PEC
LL_I2C_MODE_SMBUS_SOFTEND_WITH_PEC
Request: This parameter can be one of the following values:
LL_I2C_GENERATE_NOSTARTSTOP
LL_I2C_GENERATE_STOP
LL_I2C_GENERATE_START_READ
LL_I2C_GENERATE_START_WRITE
LL_I2C_GENERATE_RESTART_7BIT_READ
LL_I2C_GENERATE_RESTART_7BIT_WRITE
LL_I2C_GENERATE_RESTART_10BIT_READ
LL_I2C_GENERATE_RESTART_10BIT_WRITE
Return values None
Reference Manual to CR2 SADD LL_I2C_HandleTransfer
LL API cross CR2 ADD10 LL_I2C_HandleTransfer
CR2 RD_WRN LL_I2C_HandleTransfer
LL_I2C_GetTransferDirection
Function name __STATIC_INLINE uint32_t LL_I2C_GetTransferDirection
(I2C_TypeDef * I2Cx)
Function description Indicate the value of transfer direction (slave mode).
Parameters I2Cx: I2C Instance.
Return values Returned: value can be one of the following values:
LL_I2C_DIRECTION_WRITE
LL_I2C_DIRECTION_READ
Notes RESET: Write transfer, Slave enters in receiver mode. SET:
Read transfer, Slave enters in transmitter mode.
Reference Manual to ISR DIR LL_I2C_GetTransferDirection
LL API cross
reference:
LL_I2C_GetAddressMatchCode
Function name __STATIC_INLINE uint32_t LL_I2C_GetAddressMatchCode
(I2C_TypeDef * I2Cx)
Function description Return the slave matched address.
Parameters I2Cx: I2C Instance.
Return values Value: between Min_Data=0x00 and Max_Data=0x3F
Reference Manual to ISR ADDCODE LL_I2C_GetAddressMatchCode
LL API cross
reference:
LL_I2C_EnableSMBusPECCompare
Function name __STATIC_INLINE void LL_I2C_EnableSMBusPECCompare
(I2C_TypeDef * I2Cx)
Function description Enable internal comparison of the SMBus Packet Error byte
(transmission or reception mode).
Parameters I2Cx: I2C Instance.
Return values None
Notes Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to
check whether or not SMBus feature is supported by the I2Cx
Instance.
This feature is cleared by hardware when the PEC byte is
transferred, or when a STOP condition or an Address
Matched is received. This bit has no effect when RELOAD bit
LL_I2C_IsEnabledSMBusPECCompare
Function name __STATIC_INLINE uint32_t
LL_I2C_IsEnabledSMBusPECCompare (I2C_TypeDef * I2Cx)
Function description Check if the SMBus Packet Error byte internal comparison is
requested or not.
Parameters I2Cx: I2C Instance.
Return values State: of bit (1 or 0).
Notes Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to
check whether or not SMBus feature is supported by the I2Cx
Instance.
Reference Manual to CR2 PECBYTE LL_I2C_IsEnabledSMBusPECCompare
LL API cross
reference:
LL_I2C_GetSMBusPEC
Function name __STATIC_INLINE uint32_t LL_I2C_GetSMBusPEC
(I2C_TypeDef * I2Cx)
Function description Get the SMBus Packet Error byte calculated.
Parameters I2Cx: I2C Instance.
Return values Value: between Min_Data=0x00 and Max_Data=0xFF
Notes Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to
check whether or not SMBus feature is supported by the I2Cx
Instance.
Reference Manual to PECR PEC LL_I2C_GetSMBusPEC
LL API cross
reference:
LL_I2C_ReceiveData8
Function name __STATIC_INLINE uint8_t LL_I2C_ReceiveData8 (I2C_TypeDef
* I2Cx)
Function description Read Receive Data register.
Parameters I2Cx: I2C Instance.
Return values Value: between Min_Data=0x00 and Max_Data=0xFF
Reference Manual to RXDR RXDATA LL_I2C_ReceiveData8
LL API cross
reference:
LL_I2C_Init
Function name uint32_t LL_I2C_Init (I2C_TypeDef * I2Cx, LL_I2C_InitTypeDef
* I2C_InitStruct)
Function description Initialize the I2C registers according to the specified parameters in
I2C_InitStruct.
Parameters I2Cx: I2C Instance.
I2C_InitStruct: pointer to a LL_I2C_InitTypeDef structure.
Return values An: ErrorStatus enumeration value:
SUCCESS: I2C registers are initialized
ERROR: Not applicable
LL_I2C_DeInit
Function name uint32_t LL_I2C_DeInit (I2C_TypeDef * I2Cx)
Function description De-initialize the I2C registers to their default reset values.
Parameters I2Cx: I2C Instance.
Return values An: ErrorStatus enumeration value:
SUCCESS: I2C registers are de-initialized
ERROR: I2C registers are not de-initialized
LL_I2C_StructInit
Function name void LL_I2C_StructInit (LL_I2C_InitTypeDef * I2C_InitStruct)
Function description Set each LL_I2C_InitTypeDef field to default value.
Parameters I2C_InitStruct: Pointer to a LL_I2C_InitTypeDef structure.
Return values None
LL_I2S_Enable
Function name __STATIC_INLINE void LL_I2S_Enable (SPI_TypeDef * SPIx)
Function description Select I2S mode and Enable I2S peripheral.
Parameters SPIx: SPI Instance
LL_I2S_Disable
Function name __STATIC_INLINE void LL_I2S_Disable (SPI_TypeDef * SPIx)
Function description Disable I2S peripheral.
Parameters SPIx: SPI Instance
Return values None
Reference Manual to I2SCFGR I2SE LL_I2S_Disable
LL API cross
reference:
LL_I2S_IsEnabled
Function name __STATIC_INLINE uint32_t LL_I2S_IsEnabled (SPI_TypeDef *
SPIx)
Function description Check if I2S peripheral is enabled.
Parameters SPIx: SPI Instance
Return values State: of bit (1 or 0).
Reference Manual to I2SCFGR I2SE LL_I2S_IsEnabled
LL API cross
reference:
LL_I2S_SetDataFormat
Function name __STATIC_INLINE void LL_I2S_SetDataFormat (SPI_TypeDef *
SPIx, uint32_t DataFormat)
Function description Set I2S data frame length.
Parameters SPIx: SPI Instance
DataFormat: This parameter can be one of the following
values:
LL_I2S_DATAFORMAT_16B
LL_I2S_DATAFORMAT_16B_EXTENDED
LL_I2S_DATAFORMAT_24B
LL_I2S_DATAFORMAT_32B
Return values None
Reference Manual to I2SCFGR DATLEN LL_I2S_SetDataFormat
LL API cross I2SCFGR CHLEN LL_I2S_SetDataFormat
reference:
LL_I2S_GetDataFormat
Function name __STATIC_INLINE uint32_t LL_I2S_GetDataFormat
(SPI_TypeDef * SPIx)
LL_I2S_SetClockPolarity
Function name __STATIC_INLINE void LL_I2S_SetClockPolarity
(SPI_TypeDef * SPIx, uint32_t ClockPolarity)
Function description Set I2S clock polarity.
Parameters SPIx: SPI Instance
ClockPolarity: This parameter can be one of the following
values:
LL_I2S_POLARITY_LOW
LL_I2S_POLARITY_HIGH
Return values None
Reference Manual to I2SCFGR CKPOL LL_I2S_SetClockPolarity
LL API cross
reference:
LL_I2S_GetClockPolarity
Function name __STATIC_INLINE uint32_t LL_I2S_GetClockPolarity
(SPI_TypeDef * SPIx)
Function description Get I2S clock polarity.
Parameters SPIx: SPI Instance
Return values Returned: value can be one of the following values:
LL_I2S_POLARITY_LOW
LL_I2S_POLARITY_HIGH
Reference Manual to I2SCFGR CKPOL LL_I2S_GetClockPolarity
LL API cross
reference:
LL_I2S_SetStandard
Function name __STATIC_INLINE void LL_I2S_SetStandard (SPI_TypeDef *
SPIx, uint32_t Standard)
Function description Set I2S standard protocol.
Parameters SPIx: SPI Instance
Standard: This parameter can be one of the following
values:
LL_I2S_GetStandard
Function name __STATIC_INLINE uint32_t LL_I2S_GetStandard (SPI_TypeDef
* SPIx)
Function description Get I2S standard protocol.
Parameters SPIx: SPI Instance
Return values Returned: value can be one of the following values:
LL_I2S_STANDARD_PHILIPS
LL_I2S_STANDARD_MSB
LL_I2S_STANDARD_LSB
LL_I2S_STANDARD_PCM_SHORT
LL_I2S_STANDARD_PCM_LONG
Reference Manual to I2SCFGR I2SSTD LL_I2S_GetStandard
LL API cross I2SCFGR PCMSYNC LL_I2S_GetStandard
reference:
LL_I2S_SetTransferMode
Function name __STATIC_INLINE void LL_I2S_SetTransferMode
(SPI_TypeDef * SPIx, uint32_t Mode)
Function description Set I2S transfer mode.
Parameters SPIx: SPI Instance
Mode: This parameter can be one of the following values:
LL_I2S_MODE_SLAVE_TX
LL_I2S_MODE_SLAVE_RX
LL_I2S_MODE_MASTER_TX
LL_I2S_MODE_MASTER_RX
Return values None
Reference Manual to I2SCFGR I2SCFG LL_I2S_SetTransferMode
LL API cross
reference:
LL_I2S_GetTransferMode
Function name __STATIC_INLINE uint32_t LL_I2S_GetTransferMode
(SPI_TypeDef * SPIx)
Function description Get I2S transfer mode.
LL_I2S_SetPrescalerLinear
Function name __STATIC_INLINE void LL_I2S_SetPrescalerLinear
(SPI_TypeDef * SPIx, uint8_t PrescalerLinear)
Function description Set I2S linear prescaler.
Parameters SPIx: SPI Instance
PrescalerLinear: Value between Min_Data=0x02 and
Max_Data=0xFF
Return values None
Reference Manual to I2SPR I2SDIV LL_I2S_SetPrescalerLinear
LL API cross
reference:
LL_I2S_GetPrescalerLinear
Function name __STATIC_INLINE uint32_t LL_I2S_GetPrescalerLinear
(SPI_TypeDef * SPIx)
Function description Get I2S linear prescaler.
Parameters SPIx: SPI Instance
Return values PrescalerLinear: Value between Min_Data=0x02 and
Max_Data=0xFF
Reference Manual to I2SPR I2SDIV LL_I2S_GetPrescalerLinear
LL API cross
reference:
LL_I2S_SetPrescalerParity
Function name __STATIC_INLINE void LL_I2S_SetPrescalerParity
(SPI_TypeDef * SPIx, uint32_t PrescalerParity)
Function description Set I2S parity prescaler.
Parameters SPIx: SPI Instance
PrescalerParity: This parameter can be one of the following
values:
LL_I2S_PRESCALER_PARITY_EVEN
LL_I2S_PRESCALER_PARITY_ODD
Return values None
LL_I2S_GetPrescalerParity
Function name __STATIC_INLINE uint32_t LL_I2S_GetPrescalerParity
(SPI_TypeDef * SPIx)
Function description Get I2S parity prescaler.
Parameters SPIx: SPI Instance
Return values Returned: value can be one of the following values:
LL_I2S_PRESCALER_PARITY_EVEN
LL_I2S_PRESCALER_PARITY_ODD
Reference Manual to I2SPR ODD LL_I2S_GetPrescalerParity
LL API cross
reference:
LL_I2S_EnableMasterClock
Function name __STATIC_INLINE void LL_I2S_EnableMasterClock
(SPI_TypeDef * SPIx)
Function description Enable the master clock ouput (Pin MCK)
Parameters SPIx: SPI Instance
Return values None
Reference Manual to I2SPR MCKOE LL_I2S_EnableMasterClock
LL API cross
reference:
LL_I2S_DisableMasterClock
Function name __STATIC_INLINE void LL_I2S_DisableMasterClock
(SPI_TypeDef * SPIx)
Function description Disable the master clock ouput (Pin MCK)
Parameters SPIx: SPI Instance
Return values None
Reference Manual to I2SPR MCKOE LL_I2S_DisableMasterClock
LL API cross
reference:
LL_I2S_IsEnabledMasterClock
Function name __STATIC_INLINE uint32_t LL_I2S_IsEnabledMasterClock
(SPI_TypeDef * SPIx)
Function description Check if the master clock ouput (Pin MCK) is enabled.
Parameters SPIx: SPI Instance
Return values State: of bit (1 or 0).
LL_I2S_IsActiveFlag_RXNE
Function name __STATIC_INLINE uint32_t LL_I2S_IsActiveFlag_RXNE
(SPI_TypeDef * SPIx)
Function description Check if Rx buffer is not empty.
Parameters SPIx: SPI Instance
Return values State: of bit (1 or 0).
Reference Manual to SR RXNE LL_I2S_IsActiveFlag_RXNE
LL API cross
reference:
LL_I2S_IsActiveFlag_TXE
Function name __STATIC_INLINE uint32_t LL_I2S_IsActiveFlag_TXE
(SPI_TypeDef * SPIx)
Function description Check if Tx buffer is empty.
Parameters SPIx: SPI Instance
Return values State: of bit (1 or 0).
Reference Manual to SR TXE LL_I2S_IsActiveFlag_TXE
LL API cross
reference:
LL_I2S_IsActiveFlag_BSY
Function name __STATIC_INLINE uint32_t LL_I2S_IsActiveFlag_BSY
(SPI_TypeDef * SPIx)
Function description Get busy flag.
Parameters SPIx: SPI Instance
Return values State: of bit (1 or 0).
Reference Manual to SR BSY LL_I2S_IsActiveFlag_BSY
LL API cross
reference:
LL_I2S_IsActiveFlag_OVR
Function name __STATIC_INLINE uint32_t LL_I2S_IsActiveFlag_OVR
(SPI_TypeDef * SPIx)
Function description Get overrun error flag.
Parameters SPIx: SPI Instance
Return values State: of bit (1 or 0).
Reference Manual to SR OVR LL_I2S_IsActiveFlag_OVR
LL API cross
LL_I2S_IsActiveFlag_UDR
Function name __STATIC_INLINE uint32_t LL_I2S_IsActiveFlag_UDR
(SPI_TypeDef * SPIx)
Function description Get underrun error flag.
Parameters SPIx: SPI Instance
Return values State: of bit (1 or 0).
Reference Manual to SR UDR LL_I2S_IsActiveFlag_UDR
LL API cross
reference:
LL_I2S_IsActiveFlag_FRE
Function name __STATIC_INLINE uint32_t LL_I2S_IsActiveFlag_FRE
(SPI_TypeDef * SPIx)
Function description Get frame format error flag.
Parameters SPIx: SPI Instance
Return values State: of bit (1 or 0).
Reference Manual to SR FRE LL_I2S_IsActiveFlag_FRE
LL API cross
reference:
LL_I2S_IsActiveFlag_CHSIDE
Function name __STATIC_INLINE uint32_t LL_I2S_IsActiveFlag_CHSIDE
(SPI_TypeDef * SPIx)
Function description Get channel side flag.
Parameters SPIx: SPI Instance
Return values State: of bit (1 or 0).
Notes 0: Channel Left has to be transmitted or has been received 1:
Channel Right has to be transmitted or has been received It
has no significance in PCM mode.
Reference Manual to SR CHSIDE LL_I2S_IsActiveFlag_CHSIDE
LL API cross
reference:
LL_I2S_ClearFlag_OVR
Function name __STATIC_INLINE void LL_I2S_ClearFlag_OVR (SPI_TypeDef
* SPIx)
Function description Clear overrun error flag.
Parameters SPIx: SPI Instance
Return values None
LL_I2S_ClearFlag_UDR
Function name __STATIC_INLINE void LL_I2S_ClearFlag_UDR (SPI_TypeDef
* SPIx)
Function description Clear underrun error flag.
Parameters SPIx: SPI Instance
Return values None
Reference Manual to SR UDR LL_I2S_ClearFlag_UDR
LL API cross
reference:
LL_I2S_ClearFlag_FRE
Function name __STATIC_INLINE void LL_I2S_ClearFlag_FRE (SPI_TypeDef *
SPIx)
Function description Clear frame format error flag.
Parameters SPIx: SPI Instance
Return values None
Reference Manual to SR FRE LL_I2S_ClearFlag_FRE
LL API cross
reference:
LL_I2S_EnableIT_ERR
Function name __STATIC_INLINE void LL_I2S_EnableIT_ERR (SPI_TypeDef *
SPIx)
Function description Enable error IT.
Parameters SPIx: SPI Instance
Return values None
Notes This bit controls the generation of an interrupt when an error
condition occurs (OVR, UDR and FRE in I2S mode).
Reference Manual to CR2 ERRIE LL_I2S_EnableIT_ERR
LL API cross
reference:
LL_I2S_EnableIT_RXNE
Function name __STATIC_INLINE void LL_I2S_EnableIT_RXNE (SPI_TypeDef
* SPIx)
Function description Enable Rx buffer not empty IT.
Parameters SPIx: SPI Instance
LL_I2S_EnableIT_TXE
Function name __STATIC_INLINE void LL_I2S_EnableIT_TXE (SPI_TypeDef *
SPIx)
Function description Enable Tx buffer empty IT.
Parameters SPIx: SPI Instance
Return values None
Reference Manual to CR2 TXEIE LL_I2S_EnableIT_TXE
LL API cross
reference:
LL_I2S_DisableIT_ERR
Function name __STATIC_INLINE void LL_I2S_DisableIT_ERR (SPI_TypeDef *
SPIx)
Function description Disable error IT.
Parameters SPIx: SPI Instance
Return values None
Notes This bit controls the generation of an interrupt when an error
condition occurs (OVR, UDR and FRE in I2S mode).
Reference Manual to CR2 ERRIE LL_I2S_DisableIT_ERR
LL API cross
reference:
LL_I2S_DisableIT_RXNE
Function name __STATIC_INLINE void LL_I2S_DisableIT_RXNE (SPI_TypeDef
* SPIx)
Function description Disable Rx buffer not empty IT.
Parameters SPIx: SPI Instance
Return values None
Reference Manual to CR2 RXNEIE LL_I2S_DisableIT_RXNE
LL API cross
reference:
LL_I2S_DisableIT_TXE
Function name __STATIC_INLINE void LL_I2S_DisableIT_TXE (SPI_TypeDef *
SPIx)
Function description Disable Tx buffer empty IT.
LL_I2S_IsEnabledIT_ERR
Function name __STATIC_INLINE uint32_t LL_I2S_IsEnabledIT_ERR
(SPI_TypeDef * SPIx)
Function description Check if ERR IT is enabled.
Parameters SPIx: SPI Instance
Return values State: of bit (1 or 0).
Reference Manual to CR2 ERRIE LL_I2S_IsEnabledIT_ERR
LL API cross
reference:
LL_I2S_IsEnabledIT_RXNE
Function name __STATIC_INLINE uint32_t LL_I2S_IsEnabledIT_RXNE
(SPI_TypeDef * SPIx)
Function description Check if RXNE IT is enabled.
Parameters SPIx: SPI Instance
Return values State: of bit (1 or 0).
Reference Manual to CR2 RXNEIE LL_I2S_IsEnabledIT_RXNE
LL API cross
reference:
LL_I2S_IsEnabledIT_TXE
Function name __STATIC_INLINE uint32_t LL_I2S_IsEnabledIT_TXE
(SPI_TypeDef * SPIx)
Function description Check if TXE IT is enabled.
Parameters SPIx: SPI Instance
Return values State: of bit (1 or 0).
Reference Manual to CR2 TXEIE LL_I2S_IsEnabledIT_TXE
LL API cross
reference:
LL_I2S_EnableDMAReq_RX
Function name __STATIC_INLINE void LL_I2S_EnableDMAReq_RX
(SPI_TypeDef * SPIx)
Function description Enable DMA Rx.
Parameters SPIx: SPI Instance
LL_I2S_DisableDMAReq_RX
Function name __STATIC_INLINE void LL_I2S_DisableDMAReq_RX
(SPI_TypeDef * SPIx)
Function description Disable DMA Rx.
Parameters SPIx: SPI Instance
Return values None
Reference Manual to CR2 RXDMAEN LL_I2S_DisableDMAReq_RX
LL API cross
reference:
LL_I2S_IsEnabledDMAReq_RX
Function name __STATIC_INLINE uint32_t LL_I2S_IsEnabledDMAReq_RX
(SPI_TypeDef * SPIx)
Function description Check if DMA Rx is enabled.
Parameters SPIx: SPI Instance
Return values State: of bit (1 or 0).
Reference Manual to CR2 RXDMAEN LL_I2S_IsEnabledDMAReq_RX
LL API cross
reference:
LL_I2S_EnableDMAReq_TX
Function name __STATIC_INLINE void LL_I2S_EnableDMAReq_TX
(SPI_TypeDef * SPIx)
Function description Enable DMA Tx.
Parameters SPIx: SPI Instance
Return values None
Reference Manual to CR2 TXDMAEN LL_I2S_EnableDMAReq_TX
LL API cross
reference:
LL_I2S_DisableDMAReq_TX
Function name __STATIC_INLINE void LL_I2S_DisableDMAReq_TX
(SPI_TypeDef * SPIx)
Function description Disable DMA Tx.
Parameters SPIx: SPI Instance
Return values None
LL_I2S_IsEnabledDMAReq_TX
Function name __STATIC_INLINE uint32_t LL_I2S_IsEnabledDMAReq_TX
(SPI_TypeDef * SPIx)
Function description Check if DMA Tx is enabled.
Parameters SPIx: SPI Instance
Return values State: of bit (1 or 0).
Reference Manual to CR2 TXDMAEN LL_I2S_IsEnabledDMAReq_TX
LL API cross
reference:
LL_I2S_ReceiveData16
Function name __STATIC_INLINE uint16_t LL_I2S_ReceiveData16
(SPI_TypeDef * SPIx)
Function description Read 16-Bits in data register.
Parameters SPIx: SPI Instance
Return values RxData: Value between Min_Data=0x0000 and
Max_Data=0xFFFF
Reference Manual to DR DR LL_I2S_ReceiveData16
LL API cross
reference:
LL_I2S_TransmitData16
Function name __STATIC_INLINE void LL_I2S_TransmitData16 (SPI_TypeDef
* SPIx, uint16_t TxData)
Function description Write 16-Bits in data register.
Parameters SPIx: SPI Instance
TxData: Value between Min_Data=0x0000 and
Max_Data=0xFFFF
Return values None
Reference Manual to DR DR LL_I2S_TransmitData16
LL API cross
reference:
LL_I2S_DeInit
Function name ErrorStatus LL_I2S_DeInit (SPI_TypeDef * SPIx)
Function description De-initialize the SPI/I2S registers to their default reset values.
Parameters SPIx: SPI Instance
Return values An: ErrorStatus enumeration value:
LL_I2S_Init
Function name ErrorStatus LL_I2S_Init (SPI_TypeDef * SPIx,
LL_I2S_InitTypeDef * I2S_InitStruct)
Function description Initializes the SPI/I2S registers according to the specified
parameters in I2S_InitStruct.
Parameters SPIx: SPI Instance
I2S_InitStruct: pointer to a LL_I2S_InitTypeDef structure
Return values An: ErrorStatus enumeration value:
SUCCESS: SPI registers are Initialized
ERROR: SPI registers are not Initialized
Notes As some bits in SPI configuration registers can only be written
when the SPI is disabled (SPI_CR1_SPE bit =0), SPI IP
should be in disabled state prior calling this function.
Otherwise, ERROR result will be returned.
LL_I2S_StructInit
Function name void LL_I2S_StructInit (LL_I2S_InitTypeDef * I2S_InitStruct)
Function description Set each LL_I2S_InitTypeDef field to default value.
Parameters I2S_InitStruct: pointer to a LL_I2S_InitTypeDef structure
whose fields will be set to default values.
Return values None
LL_I2S_ConfigPrescaler
Function name void LL_I2S_ConfigPrescaler (SPI_TypeDef * SPIx, uint32_t
PrescalerLinear, uint32_t PrescalerParity)
Function description Set linear and parity prescaler.
Parameters SPIx: SPI Instance
PrescalerLinear: value: Min_Data=0x02 and
Max_Data=0xFF.
PrescalerParity: This parameter can be one of the following
values:
LL_I2S_PRESCALER_PARITY_EVEN
LL_I2S_PRESCALER_PARITY_ODD
Return values None
Notes To calculate value of PrescalerLinear(I2SDIV[7:0] bits) and
PrescalerParity(ODD bit) Check Audio frequency table and
formulas inside Reference Manual (SPI/I2S).
LL_IWDG_Enable
Function name __STATIC_INLINE void LL_IWDG_Enable (IWDG_TypeDef *
IWDGx)
Function description Start the Independent Watchdog.
Parameters IWDGx: IWDG Instance
Return values None
Notes Except if the hardware watchdog option is selected
Reference Manual to KR KEY LL_IWDG_Enable
LL API cross
reference:
LL_IWDG_ReloadCounter
Function name __STATIC_INLINE void LL_IWDG_ReloadCounter
(IWDG_TypeDef * IWDGx)
Function description Reloads IWDG counter with value defined in the reload register.
Parameters IWDGx: IWDG Instance
Return values None
Reference Manual to KR KEY LL_IWDG_ReloadCounter
LL API cross
reference:
LL_IWDG_EnableWriteAccess
Function name __STATIC_INLINE void LL_IWDG_EnableWriteAccess
(IWDG_TypeDef * IWDGx)
Function description Enable write access to IWDG_PR, IWDG_RLR and IWDG_WINR
registers.
Parameters IWDGx: IWDG Instance
Return values None
Reference Manual to KR KEY LL_IWDG_EnableWriteAccess
LL API cross
reference:
LL_IWDG_DisableWriteAccess
Function name __STATIC_INLINE void LL_IWDG_DisableWriteAccess
LL_IWDG_SetPrescaler
Function name __STATIC_INLINE void LL_IWDG_SetPrescaler
(IWDG_TypeDef * IWDGx, uint32_t Prescaler)
Function description Select the prescaler of the IWDG.
Parameters IWDGx: IWDG Instance
Prescaler: This parameter can be one of the following
values:
LL_IWDG_PRESCALER_4
LL_IWDG_PRESCALER_8
LL_IWDG_PRESCALER_16
LL_IWDG_PRESCALER_32
LL_IWDG_PRESCALER_64
LL_IWDG_PRESCALER_128
LL_IWDG_PRESCALER_256
Return values None
Reference Manual to PR PR LL_IWDG_SetPrescaler
LL API cross
reference:
LL_IWDG_GetPrescaler
Function name __STATIC_INLINE uint32_t LL_IWDG_GetPrescaler
(IWDG_TypeDef * IWDGx)
Function description Get the selected prescaler of the IWDG.
Parameters IWDGx: IWDG Instance
Return values Returned: value can be one of the following values:
LL_IWDG_PRESCALER_4
LL_IWDG_PRESCALER_8
LL_IWDG_PRESCALER_16
LL_IWDG_PRESCALER_32
LL_IWDG_PRESCALER_64
LL_IWDG_PRESCALER_128
LL_IWDG_PRESCALER_256
Reference Manual to PR PR LL_IWDG_GetPrescaler
LL API cross
reference:
LL_IWDG_GetReloadCounter
Function name __STATIC_INLINE uint32_t LL_IWDG_GetReloadCounter
(IWDG_TypeDef * IWDGx)
Function description Get the specified IWDG down-counter reload value.
Parameters IWDGx: IWDG Instance
Return values Value: between Min_Data=0 and Max_Data=0x0FFF
Reference Manual to RLR RL LL_IWDG_GetReloadCounter
LL API cross
reference:
LL_IWDG_SetWindow
Function name __STATIC_INLINE void LL_IWDG_SetWindow (IWDG_TypeDef
* IWDGx, uint32_t Window)
Function description Specify high limit of the window value to be compared to the down-
counter.
Parameters IWDGx: IWDG Instance
Window: Value between Min_Data=0 and
Max_Data=0x0FFF
Return values None
Reference Manual to WINR WIN LL_IWDG_SetWindow
LL API cross
reference:
LL_IWDG_GetWindow
Function name __STATIC_INLINE uint32_t LL_IWDG_GetWindow
(IWDG_TypeDef * IWDGx)
Function description Get the high limit of the window value specified.
Parameters IWDGx: IWDG Instance
Return values Value: between Min_Data=0 and Max_Data=0x0FFF
Reference Manual to WINR WIN LL_IWDG_GetWindow
LL_IWDG_IsActiveFlag_PVU
Function name __STATIC_INLINE uint32_t LL_IWDG_IsActiveFlag_PVU
(IWDG_TypeDef * IWDGx)
Function description Check if flag Prescaler Value Update is set or not.
Parameters IWDGx: IWDG Instance
Return values State: of bit (1 or 0).
Reference Manual to SR PVU LL_IWDG_IsActiveFlag_PVU
LL API cross
reference:
LL_IWDG_IsActiveFlag_RVU
Function name __STATIC_INLINE uint32_t LL_IWDG_IsActiveFlag_RVU
(IWDG_TypeDef * IWDGx)
Function description Check if flag Reload Value Update is set or not.
Parameters IWDGx: IWDG Instance
Return values State: of bit (1 or 0).
Reference Manual to SR RVU LL_IWDG_IsActiveFlag_RVU
LL API cross
reference:
LL_IWDG_IsActiveFlag_WVU
Function name __STATIC_INLINE uint32_t LL_IWDG_IsActiveFlag_WVU
(IWDG_TypeDef * IWDGx)
Function description Check if flag Window Value Update is set or not.
Parameters IWDGx: IWDG Instance
Return values State: of bit (1 or 0).
Reference Manual to SR WVU LL_IWDG_IsActiveFlag_WVU
LL API cross
reference:
LL_IWDG_IsReady
Function name __STATIC_INLINE uint32_t LL_IWDG_IsReady
(IWDG_TypeDef * IWDGx)
Function description Check if all flags Prescaler, Reload & Window Value Update are
reset or not.
Parameters IWDGx: IWDG Instance
Return values State: of bits (1 or 0).
Reference Manual to SR PVU LL_IWDG_IsReady
LL API cross SR WVU LL_IWDG_IsReady
LL_PWR_EnableBkUpAccess
Function name __STATIC_INLINE void LL_PWR_EnableBkUpAccess (void )
Function description Enable access to the backup domain.
Return values None
Reference Manual to CR DBP LL_PWR_EnableBkUpAccess
LL API cross
reference:
LL_PWR_DisableBkUpAccess
Function name __STATIC_INLINE void LL_PWR_DisableBkUpAccess (void )
Function description Disable access to the backup domain.
Return values None
Reference Manual to CR DBP LL_PWR_DisableBkUpAccess
LL API cross
reference:
LL_PWR_IsEnabledBkUpAccess
Function name __STATIC_INLINE uint32_t LL_PWR_IsEnabledBkUpAccess
(void )
Function description Check if the backup domain is enabled.
Return values State: of bit (1 or 0).
Reference Manual to CR DBP LL_PWR_IsEnabledBkUpAccess
LL API cross
reference:
LL_PWR_SetRegulModeDS
Function name __STATIC_INLINE void LL_PWR_SetRegulModeDS (uint32_t
RegulMode)
Function description Set voltage Regulator mode during deep sleep mode.
Parameters RegulMode: This parameter can be one of the following
values:
LL_PWR_REGU_DSMODE_MAIN
LL_PWR_REGU_DSMODE_LOW_POWER
Return values None
LL_PWR_GetRegulModeDS
Function name __STATIC_INLINE uint32_t LL_PWR_GetRegulModeDS (void )
Function description Get voltage Regulator mode during deep sleep mode.
Return values Returned: value can be one of the following values:
LL_PWR_REGU_DSMODE_MAIN
LL_PWR_REGU_DSMODE_LOW_POWER
Reference Manual to CR LPDS LL_PWR_GetRegulModeDS
LL API cross
reference:
LL_PWR_SetPowerMode
Function name __STATIC_INLINE void LL_PWR_SetPowerMode (uint32_t
PDMode)
Function description Set Power Down mode when CPU enters deepsleep.
Parameters PDMode: This parameter can be one of the following values:
LL_PWR_MODE_STOP_MAINREGU
LL_PWR_MODE_STOP_LPREGU
LL_PWR_MODE_STANDBY
Return values None
Reference Manual to CR PDDS LL_PWR_SetPowerMode
LL API cross
reference: CR LPDS LL_PWR_SetPowerMode
LL_PWR_GetPowerMode
Function name __STATIC_INLINE uint32_t LL_PWR_GetPowerMode (void )
Function description Get Power Down mode when CPU enters deepsleep.
Return values Returned: value can be one of the following values:
LL_PWR_MODE_STOP_MAINREGU
LL_PWR_MODE_STOP_LPREGU
LL_PWR_MODE_STANDBY
Reference Manual to CR PDDS LL_PWR_GetPowerMode
LL API cross
reference: CR LPDS LL_PWR_GetPowerMode
LL_PWR_SetPVDLevel
Function name __STATIC_INLINE void LL_PWR_SetPVDLevel (uint32_t
PVDLevel)
Function description Configure the voltage threshold detected by the Power Voltage
Detector.
LL_PWR_GetPVDLevel
Function name __STATIC_INLINE uint32_t LL_PWR_GetPVDLevel (void )
Function description Get the voltage threshold detection.
Return values Returned: value can be one of the following values:
LL_PWR_PVDLEVEL_0
LL_PWR_PVDLEVEL_1
LL_PWR_PVDLEVEL_2
LL_PWR_PVDLEVEL_3
LL_PWR_PVDLEVEL_4
LL_PWR_PVDLEVEL_5
LL_PWR_PVDLEVEL_6
LL_PWR_PVDLEVEL_7
Reference Manual to CR PLS LL_PWR_GetPVDLevel
LL API cross
reference:
LL_PWR_EnablePVD
Function name __STATIC_INLINE void LL_PWR_EnablePVD (void )
Function description Enable Power Voltage Detector.
Return values None
Reference Manual to CR PVDE LL_PWR_EnablePVD
LL API cross
reference:
LL_PWR_DisablePVD
Function name __STATIC_INLINE void LL_PWR_DisablePVD (void )
Function description Disable Power Voltage Detector.
Return values None
Reference Manual to CR PVDE LL_PWR_DisablePVD
LL API cross
LL_PWR_IsEnabledPVD
Function name __STATIC_INLINE uint32_t LL_PWR_IsEnabledPVD (void )
Function description Check if Power Voltage Detector is enabled.
Return values State: of bit (1 or 0).
Reference Manual to CR PVDE LL_PWR_IsEnabledPVD
LL API cross
reference:
LL_PWR_EnableWakeUpPin
Function name __STATIC_INLINE void LL_PWR_EnableWakeUpPin (uint32_t
WakeUpPin)
Function description Enable the WakeUp PINx functionality.
Parameters WakeUpPin: This parameter can be one of the following
values: (*) not available on all devices
LL_PWR_WAKEUP_PIN1
LL_PWR_WAKEUP_PIN2
LL_PWR_WAKEUP_PIN3 (*)
LL_PWR_WAKEUP_PIN4 (*)
LL_PWR_WAKEUP_PIN5 (*)
LL_PWR_WAKEUP_PIN6 (*)
LL_PWR_WAKEUP_PIN7 (*)
LL_PWR_WAKEUP_PIN8 (*)
Return values None
Reference Manual to CSR EWUP1 LL_PWR_EnableWakeUpPin
LL API cross
reference: CSR EWUP2 LL_PWR_EnableWakeUpPin
LL_PWR_DisableWakeUpPin
Function name __STATIC_INLINE void LL_PWR_DisableWakeUpPin (uint32_t
WakeUpPin)
Function description Disable the WakeUp PINx functionality.
LL_PWR_IsEnabledWakeUpPin
Function name __STATIC_INLINE uint32_t LL_PWR_IsEnabledWakeUpPin
(uint32_t WakeUpPin)
Function description Check if the WakeUp PINx functionality is enabled.
Parameters WakeUpPin: This parameter can be one of the following
values: (*) not available on all devices
LL_PWR_WAKEUP_PIN1
LL_PWR_WAKEUP_PIN2
LL_PWR_WAKEUP_PIN3 (*)
LL_PWR_WAKEUP_PIN4 (*)
LL_PWR_WAKEUP_PIN5 (*)
LL_PWR_WAKEUP_PIN6 (*)
LL_PWR_WAKEUP_PIN7 (*)
LL_PWR_WAKEUP_PIN8 (*)
Return values State: of bit (1 or 0).
Reference Manual to CSR EWUP1 LL_PWR_IsEnabledWakeUpPin
LL API cross
reference: CSR EWUP2 LL_PWR_IsEnabledWakeUpPin
LL_PWR_IsActiveFlag_WU
Function name __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU (void )
Function description Get Wake-up Flag.
Return values State: of bit (1 or 0).
Reference Manual to CSR WUF LL_PWR_IsActiveFlag_WU
LL API cross
reference:
LL_PWR_IsActiveFlag_SB
Function name __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_SB (void )
Function description Get Standby Flag.
Return values State: of bit (1 or 0).
Reference Manual to CSR SBF LL_PWR_IsActiveFlag_SB
LL API cross
reference:
LL_PWR_IsActiveFlag_PVDO
Function name __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_PVDO (void
)
Function description Indicate whether VDD voltage is below the selected PVD
threshold.
Return values State: of bit (1 or 0).
Reference Manual to CSR PVDO LL_PWR_IsActiveFlag_PVDO
LL API cross
reference:
LL_PWR_IsActiveFlag_VREFINTRDY
Function name __STATIC_INLINE uint32_t
LL_PWR_IsActiveFlag_VREFINTRDY (void )
Function description Get Internal Reference VrefInt Flag.
Return values State: of bit (1 or 0).
Reference Manual to CSR VREFINTRDYF LL_PWR_IsActiveFlag_VREFINTRDY
LL API cross
reference:
LL_PWR_ClearFlag_WU
Function name __STATIC_INLINE void LL_PWR_ClearFlag_WU (void )
Function description Clear Wake-up Flags.
Return values None
Reference Manual to CR CWUF LL_PWR_ClearFlag_WU
LL API cross
reference:
LL_PWR_DeInit
Function name ErrorStatus LL_PWR_DeInit (void )
Function description De-initialize the PWR registers to their default reset values.
Return values An: ErrorStatus enumeration value:
SUCCESS: PWR registers are de-initialized
ERROR: not applicable
LL_RCC_HSE_EnableCSS
Function name __STATIC_INLINE void LL_RCC_HSE_EnableCSS (void )
Function description Enable the Clock Security System.
Return values None
Reference Manual to CR CSSON LL_RCC_HSE_EnableCSS
LL API cross
reference:
LL_RCC_HSE_DisableCSS
Function name __STATIC_INLINE void LL_RCC_HSE_DisableCSS (void )
Function description Disable the Clock Security System.
Return values None
Notes Cannot be disabled in HSE is ready (only by hardware)
Reference Manual to CR CSSON LL_RCC_HSE_DisableCSS
LL API cross
reference:
LL_RCC_HSE_EnableBypass
Function name __STATIC_INLINE void LL_RCC_HSE_EnableBypass (void )
Function description Enable HSE external oscillator (HSE Bypass)
LL_RCC_HSE_DisableBypass
Function name __STATIC_INLINE void LL_RCC_HSE_DisableBypass (void )
Function description Disable HSE external oscillator (HSE Bypass)
Return values None
Reference Manual to CR HSEBYP LL_RCC_HSE_DisableBypass
LL API cross
reference:
LL_RCC_HSE_Enable
Function name __STATIC_INLINE void LL_RCC_HSE_Enable (void )
Function description Enable HSE crystal oscillator (HSE ON)
Return values None
Reference Manual to CR HSEON LL_RCC_HSE_Enable
LL API cross
reference:
LL_RCC_HSE_Disable
Function name __STATIC_INLINE void LL_RCC_HSE_Disable (void )
Function description Disable HSE crystal oscillator (HSE ON)
Return values None
Reference Manual to CR HSEON LL_RCC_HSE_Disable
LL API cross
reference:
LL_RCC_HSE_IsReady
Function name __STATIC_INLINE uint32_t LL_RCC_HSE_IsReady (void )
Function description Check if HSE oscillator Ready.
Return values State: of bit (1 or 0).
Reference Manual to CR HSERDY LL_RCC_HSE_IsReady
LL API cross
reference:
LL_RCC_HSI_Enable
Function name __STATIC_INLINE void LL_RCC_HSI_Enable (void )
Function description Enable HSI oscillator.
Return values None
LL_RCC_HSI_Disable
Function name __STATIC_INLINE void LL_RCC_HSI_Disable (void )
Function description Disable HSI oscillator.
Return values None
Reference Manual to CR HSION LL_RCC_HSI_Disable
LL API cross
reference:
LL_RCC_HSI_IsReady
Function name __STATIC_INLINE uint32_t LL_RCC_HSI_IsReady (void )
Function description Check if HSI clock is ready.
Return values State: of bit (1 or 0).
Reference Manual to CR HSIRDY LL_RCC_HSI_IsReady
LL API cross
reference:
LL_RCC_HSI_GetCalibration
Function name __STATIC_INLINE uint32_t LL_RCC_HSI_GetCalibration (void
)
Function description Get HSI Calibration value.
Return values Between: Min_Data = 0x00 and Max_Data = 0xFF
Notes When HSITRIM is written, HSICAL is updated with the sum of
HSITRIM and the factory trim value
Reference Manual to CR HSICAL LL_RCC_HSI_GetCalibration
LL API cross
reference:
LL_RCC_HSI_SetCalibTrimming
Function name __STATIC_INLINE void LL_RCC_HSI_SetCalibTrimming
(uint32_t Value)
Function description Set HSI Calibration trimming.
Parameters Value: between Min_Data = 0x00 and Max_Data = 0x1F
Return values None
Notes user-programmable trimming value that is added to the
HSICAL
Default value is 16, which, when added to the HSICAL value,
should trim the HSI to 16 MHz +/- 1 %
LL_RCC_HSI_GetCalibTrimming
Function name __STATIC_INLINE uint32_t LL_RCC_HSI_GetCalibTrimming
(void )
Function description Get HSI Calibration trimming.
Return values Between: Min_Data = 0x00 and Max_Data = 0x1F
Reference Manual to CR HSITRIM LL_RCC_HSI_GetCalibTrimming
LL API cross
reference:
LL_RCC_HSI48_Enable
Function name __STATIC_INLINE void LL_RCC_HSI48_Enable (void )
Function description Enable HSI48.
Return values None
Reference Manual to CR2 HSI48ON LL_RCC_HSI48_Enable
LL API cross
reference:
LL_RCC_HSI48_Disable
Function name __STATIC_INLINE void LL_RCC_HSI48_Disable (void )
Function description Disable HSI48.
Return values None
Reference Manual to CR2 HSI48ON LL_RCC_HSI48_Disable
LL API cross
reference:
LL_RCC_HSI48_IsReady
Function name __STATIC_INLINE uint32_t LL_RCC_HSI48_IsReady (void )
Function description Check if HSI48 oscillator Ready.
Return values State: of bit (1 or 0).
Reference Manual to CR2 HSI48RDY LL_RCC_HSI48_IsReady
LL API cross
reference:
LL_RCC_HSI48_GetCalibration
Function name __STATIC_INLINE uint32_t LL_RCC_HSI48_GetCalibration
(void )
Function description Get HSI48 Calibration value.
LL_RCC_HSI14_Enable
Function name __STATIC_INLINE void LL_RCC_HSI14_Enable (void )
Function description Enable HSI14.
Return values None
Reference Manual to CR2 HSI14ON LL_RCC_HSI14_Enable
LL API cross
reference:
LL_RCC_HSI14_Disable
Function name __STATIC_INLINE void LL_RCC_HSI14_Disable (void )
Function description Disable HSI14.
Return values None
Reference Manual to CR2 HSI14ON LL_RCC_HSI14_Disable
LL API cross
reference:
LL_RCC_HSI14_IsReady
Function name __STATIC_INLINE uint32_t LL_RCC_HSI14_IsReady (void )
Function description Check if HSI14 oscillator Ready.
Return values State: of bit (1 or 0).
Reference Manual to CR2 HSI14RDY LL_RCC_HSI14_IsReady
LL API cross
reference:
LL_RCC_HSI14_EnableADCControl
Function name __STATIC_INLINE void LL_RCC_HSI14_EnableADCControl
(void )
Function description ADC interface can turn on the HSI14 oscillator.
Return values None
Reference Manual to CR2 HSI14DIS LL_RCC_HSI14_EnableADCControl
LL API cross
reference:
LL_RCC_HSI14_SetCalibTrimming
Function name __STATIC_INLINE void LL_RCC_HSI14_SetCalibTrimming
(uint32_t Value)
Function description Set HSI14 Calibration trimming.
Parameters Value: between Min_Data = 0x00 and Max_Data = 0xFF
Return values None
Notes user-programmable trimming value that is added to the
HSI14CAL
Default value is 16, which, when added to the HSI14CAL
value, should trim the HSI14 to 14 MHz +/- 1 %
Reference Manual to CR2 HSI14TRIM LL_RCC_HSI14_SetCalibTrimming
LL API cross
reference:
LL_RCC_HSI14_GetCalibTrimming
Function name __STATIC_INLINE uint32_t LL_RCC_HSI14_GetCalibTrimming
(void )
Function description Get HSI14 Calibration value.
Return values Between: Min_Data = 0x00 and Max_Data = 0x1F
Notes When HSI14TRIM is written, HSI14CAL is updated with the
sum of HSI14TRIM and the factory trim value
Reference Manual to CR2 HSI14TRIM LL_RCC_HSI14_GetCalibTrimming
LL API cross
reference:
LL_RCC_HSI14_GetCalibration
Function name __STATIC_INLINE uint32_t LL_RCC_HSI14_GetCalibration
(void )
Function description Get HSI14 Calibration trimming.
Return values Between: Min_Data = 0x00 and Max_Data = 0x1F
Reference Manual to CR2 HSI14CAL LL_RCC_HSI14_GetCalibration
LL API cross
reference:
LL_RCC_LSE_Disable
Function name __STATIC_INLINE void LL_RCC_LSE_Disable (void )
Function description Disable Low Speed External (LSE) crystal.
Return values None
Reference Manual to BDCR LSEON LL_RCC_LSE_Disable
LL API cross
reference:
LL_RCC_LSE_EnableBypass
Function name __STATIC_INLINE void LL_RCC_LSE_EnableBypass (void )
Function description Enable external clock source (LSE bypass).
Return values None
Reference Manual to BDCR LSEBYP LL_RCC_LSE_EnableBypass
LL API cross
reference:
LL_RCC_LSE_DisableBypass
Function name __STATIC_INLINE void LL_RCC_LSE_DisableBypass (void )
Function description Disable external clock source (LSE bypass).
Return values None
Reference Manual to BDCR LSEBYP LL_RCC_LSE_DisableBypass
LL API cross
reference:
LL_RCC_LSE_SetDriveCapability
Function name __STATIC_INLINE void LL_RCC_LSE_SetDriveCapability
(uint32_t LSEDrive)
Function description Set LSE oscillator drive capability.
Parameters LSEDrive: This parameter can be one of the following
values:
LL_RCC_LSEDRIVE_LOW
LL_RCC_LSEDRIVE_MEDIUMLOW
LL_RCC_LSEDRIVE_MEDIUMHIGH
LL_RCC_LSEDRIVE_HIGH
LL_RCC_LSE_GetDriveCapability
Function name __STATIC_INLINE uint32_t LL_RCC_LSE_GetDriveCapability
(void )
Function description Get LSE oscillator drive capability.
Return values Returned: value can be one of the following values:
LL_RCC_LSEDRIVE_LOW
LL_RCC_LSEDRIVE_MEDIUMLOW
LL_RCC_LSEDRIVE_MEDIUMHIGH
LL_RCC_LSEDRIVE_HIGH
Reference Manual to BDCR LSEDRV LL_RCC_LSE_GetDriveCapability
LL API cross
reference:
LL_RCC_LSE_IsReady
Function name __STATIC_INLINE uint32_t LL_RCC_LSE_IsReady (void )
Function description Check if LSE oscillator Ready.
Return values State: of bit (1 or 0).
Reference Manual to BDCR LSERDY LL_RCC_LSE_IsReady
LL API cross
reference:
LL_RCC_LSI_Enable
Function name __STATIC_INLINE void LL_RCC_LSI_Enable (void )
Function description Enable LSI Oscillator.
Return values None
Reference Manual to CSR LSION LL_RCC_LSI_Enable
LL API cross
reference:
LL_RCC_LSI_Disable
Function name __STATIC_INLINE void LL_RCC_LSI_Disable (void )
Function description Disable LSI Oscillator.
Return values None
Reference Manual to CSR LSION LL_RCC_LSI_Disable
LL API cross
reference:
LL_RCC_SetSysClkSource
Function name __STATIC_INLINE void LL_RCC_SetSysClkSource (uint32_t
Source)
Function description Configure the system clock source.
Parameters Source: This parameter can be one of the following values:
(*) value not defined in all devices
LL_RCC_SYS_CLKSOURCE_HSI
LL_RCC_SYS_CLKSOURCE_HSE
LL_RCC_SYS_CLKSOURCE_PLL
LL_RCC_SYS_CLKSOURCE_HSI48 (*)
Return values None
Reference Manual to CFGR SW LL_RCC_SetSysClkSource
LL API cross
reference:
LL_RCC_GetSysClkSource
Function name __STATIC_INLINE uint32_t LL_RCC_GetSysClkSource (void )
Function description Get the system clock source.
Return values Returned: value can be one of the following values: (*)
value not defined in all devices
LL_RCC_SYS_CLKSOURCE_STATUS_HSI
LL_RCC_SYS_CLKSOURCE_STATUS_HSE
LL_RCC_SYS_CLKSOURCE_STATUS_PLL
LL_RCC_SYS_CLKSOURCE_STATUS_HSI48 (*)
Reference Manual to CFGR SWS LL_RCC_GetSysClkSource
LL API cross
reference:
LL_RCC_SetAHBPrescaler
Function name __STATIC_INLINE void LL_RCC_SetAHBPrescaler (uint32_t
Prescaler)
Function description Set AHB prescaler.
Parameters Prescaler: This parameter can be one of the following
values:
LL_RCC_SYSCLK_DIV_1
LL_RCC_SYSCLK_DIV_2
LL_RCC_SetAPB1Prescaler
Function name __STATIC_INLINE void LL_RCC_SetAPB1Prescaler (uint32_t
Prescaler)
Function description Set APB1 prescaler.
Parameters Prescaler: This parameter can be one of the following
values:
LL_RCC_APB1_DIV_1
LL_RCC_APB1_DIV_2
LL_RCC_APB1_DIV_4
LL_RCC_APB1_DIV_8
LL_RCC_APB1_DIV_16
Return values None
Reference Manual to CFGR PPRE LL_RCC_SetAPB1Prescaler
LL API cross
reference:
LL_RCC_GetAHBPrescaler
Function name __STATIC_INLINE uint32_t LL_RCC_GetAHBPrescaler (void )
Function description Get AHB prescaler.
Return values Returned: value can be one of the following values:
LL_RCC_SYSCLK_DIV_1
LL_RCC_SYSCLK_DIV_2
LL_RCC_SYSCLK_DIV_4
LL_RCC_SYSCLK_DIV_8
LL_RCC_SYSCLK_DIV_16
LL_RCC_SYSCLK_DIV_64
LL_RCC_SYSCLK_DIV_128
LL_RCC_SYSCLK_DIV_256
LL_RCC_SYSCLK_DIV_512
Reference Manual to CFGR HPRE LL_RCC_GetAHBPrescaler
LL API cross
reference:
LL_RCC_ConfigMCO
Function name __STATIC_INLINE void LL_RCC_ConfigMCO (uint32_t
MCOxSource, uint32_t MCOxPrescaler)
Function description Configure MCOx.
Parameters MCOxSource: This parameter can be one of the following
values: (*) value not defined in all devices
LL_RCC_MCO1SOURCE_NOCLOCK
LL_RCC_MCO1SOURCE_HSI14
LL_RCC_MCO1SOURCE_SYSCLK
LL_RCC_MCO1SOURCE_HSI
LL_RCC_MCO1SOURCE_HSE
LL_RCC_MCO1SOURCE_LSI
LL_RCC_MCO1SOURCE_LSE
LL_RCC_MCO1SOURCE_HSI48 (*)
LL_RCC_MCO1SOURCE_PLLCLK (*)
LL_RCC_MCO1SOURCE_PLLCLK_DIV_2
MCOxPrescaler: This parameter can be one of the following
values: (*) value not defined in all devices
LL_RCC_MCO1_DIV_1
LL_RCC_MCO1_DIV_2 (*)
LL_RCC_MCO1_DIV_4 (*)
LL_RCC_MCO1_DIV_8 (*)
LL_RCC_MCO1_DIV_16 (*)
LL_RCC_MCO1_DIV_32 (*)
LL_RCC_MCO1_DIV_64 (*)
LL_RCC_MCO1_DIV_128 (*)
Return values None
Reference Manual to CFGR MCO LL_RCC_ConfigMCO
LL API cross CFGR MCOPRE LL_RCC_ConfigMCO
reference: CFGR PLLNODIV LL_RCC_ConfigMCO
LL_RCC_SetI2CClockSource
Function name __STATIC_INLINE void LL_RCC_SetI2CClockSource (uint32_t
I2CxSource)
Function description Configure I2Cx clock source.
Parameters I2CxSource: This parameter can be one of the following
values:
LL_RCC_I2C1_CLKSOURCE_HSI
LL_RCC_I2C1_CLKSOURCE_SYSCLK
Return values None
Reference Manual to CFGR3 I2C1SW LL_RCC_SetI2CClockSource
LL API cross
reference:
LL_RCC_SetCECClockSource
Function name __STATIC_INLINE void LL_RCC_SetCECClockSource
(uint32_t CECxSource)
Function description Configure CEC clock source.
Parameters CECxSource: This parameter can be one of the following
values:
LL_RCC_CEC_CLKSOURCE_HSI_DIV244
LL_RCC_CEC_CLKSOURCE_LSE
Return values None
LL_RCC_GetUSARTClockSource
Function name __STATIC_INLINE uint32_t LL_RCC_GetUSARTClockSource
(uint32_t USARTx)
Function description Get USARTx clock source.
Parameters USARTx: This parameter can be one of the following values:
(*) value not defined in all devices.
LL_RCC_USART1_CLKSOURCE
LL_RCC_USART2_CLKSOURCE (*)
LL_RCC_USART3_CLKSOURCE (*)
Return values Returned: value can be one of the following values: (*)
value not defined in all devices.
LL_RCC_USART1_CLKSOURCE_PCLK1
LL_RCC_USART1_CLKSOURCE_SYSCLK
LL_RCC_USART1_CLKSOURCE_LSE
LL_RCC_USART1_CLKSOURCE_HSI
LL_RCC_USART2_CLKSOURCE_PCLK1 (*)
LL_RCC_USART2_CLKSOURCE_SYSCLK (*)
LL_RCC_USART2_CLKSOURCE_LSE (*)
LL_RCC_USART2_CLKSOURCE_HSI (*)
LL_RCC_USART3_CLKSOURCE_PCLK1 (*)
LL_RCC_USART3_CLKSOURCE_SYSCLK (*)
LL_RCC_USART3_CLKSOURCE_LSE (*)
LL_RCC_USART3_CLKSOURCE_HSI (*)
Reference Manual to CFGR3 USART1SW LL_RCC_GetUSARTClockSource
LL API cross CFGR3 USART2SW LL_RCC_GetUSARTClockSource
reference: CFGR3 USART3SW LL_RCC_GetUSARTClockSource
LL_RCC_GetI2CClockSource
Function name __STATIC_INLINE uint32_t LL_RCC_GetI2CClockSource
(uint32_t I2Cx)
Function description Get I2Cx clock source.
Parameters I2Cx: This parameter can be one of the following values:
LL_RCC_I2C1_CLKSOURCE
Return values Returned: value can be one of the following values:
LL_RCC_I2C1_CLKSOURCE_HSI
LL_RCC_I2C1_CLKSOURCE_SYSCLK
Reference Manual to CFGR3 I2C1SW LL_RCC_GetI2CClockSource
LL API cross
reference:
LL_RCC_SetRTCClockSource
Function name __STATIC_INLINE void LL_RCC_SetRTCClockSource
(uint32_t Source)
Function description Set RTC Clock Source.
Parameters Source: This parameter can be one of the following values:
LL_RCC_RTC_CLKSOURCE_NONE
LL_RCC_RTC_CLKSOURCE_LSE
LL_RCC_RTC_CLKSOURCE_LSI
LL_RCC_RTC_CLKSOURCE_HSE_DIV32
Return values None
Notes Once the RTC clock source has been selected, it cannot be
changed any more unless the Backup domain is reset. The
BDRST bit can be used to reset them.
Reference Manual to BDCR RTCSEL LL_RCC_SetRTCClockSource
LL API cross
reference:
LL_RCC_GetRTCClockSource
Function name __STATIC_INLINE uint32_t LL_RCC_GetRTCClockSource
(void )
Function description Get RTC Clock Source.
Return values Returned: value can be one of the following values:
LL_RCC_RTC_CLKSOURCE_NONE
LL_RCC_RTC_CLKSOURCE_LSE
LL_RCC_RTC_CLKSOURCE_LSI
LL_RCC_RTC_CLKSOURCE_HSE_DIV32
Reference Manual to BDCR RTCSEL LL_RCC_GetRTCClockSource
LL API cross
reference:
LL_RCC_DisableRTC
Function name __STATIC_INLINE void LL_RCC_DisableRTC (void )
Function description Disable RTC.
Return values None
Reference Manual to BDCR RTCEN LL_RCC_DisableRTC
LL API cross
reference:
LL_RCC_IsEnabledRTC
Function name __STATIC_INLINE uint32_t LL_RCC_IsEnabledRTC (void )
Function description Check if RTC has been enabled or not.
Return values State: of bit (1 or 0).
Reference Manual to BDCR RTCEN LL_RCC_IsEnabledRTC
LL API cross
reference:
LL_RCC_ForceBackupDomainReset
Function name __STATIC_INLINE void LL_RCC_ForceBackupDomainReset
(void )
Function description Force the Backup domain reset.
Return values None
Reference Manual to BDCR BDRST LL_RCC_ForceBackupDomainReset
LL API cross
reference:
LL_RCC_ReleaseBackupDomainReset
Function name __STATIC_INLINE void LL_RCC_ReleaseBackupDomainReset
(void )
Function description Release the Backup domain reset.
Return values None
Reference Manual to BDCR BDRST LL_RCC_ReleaseBackupDomainReset
LL API cross
reference:
LL_RCC_PLL_Disable
Function name __STATIC_INLINE void LL_RCC_PLL_Disable (void )
Function description Disable PLL.
Return values None
Notes Cannot be disabled if the PLL clock is used as the system
clock
Reference Manual to CR PLLON LL_RCC_PLL_Disable
LL API cross
reference:
LL_RCC_PLL_IsReady
Function name __STATIC_INLINE uint32_t LL_RCC_PLL_IsReady (void )
Function description Check if PLL Ready.
Return values State: of bit (1 or 0).
Reference Manual to CR PLLRDY LL_RCC_PLL_IsReady
LL API cross
reference:
LL_RCC_PLL_ConfigDomain_SYS
Function name __STATIC_INLINE void LL_RCC_PLL_ConfigDomain_SYS
(uint32_t Source, uint32_t PLLMul, uint32_t PLLDiv)
Function description Configure PLL used for SYSCLK Domain.
Parameters Source: This parameter can be one of the following values:
(*) value not defined in all devices
LL_RCC_PLLSOURCE_HSI
LL_RCC_PLLSOURCE_HSE
LL_RCC_PLLSOURCE_HSI48 (*)
PLLMul: This parameter can be one of the following values:
LL_RCC_PLL_MUL_2
LL_RCC_PLL_MUL_3
LL_RCC_PLL_MUL_4
LL_RCC_PLL_MUL_5
LL_RCC_PLL_MUL_6
LL_RCC_PLL_MUL_7
LL_RCC_PLL_MUL_8
LL_RCC_PLL_MUL_9
LL_RCC_PLL_GetMainSource
Function name __STATIC_INLINE uint32_t LL_RCC_PLL_GetMainSource
(void )
Function description Get the oscillator used as PLL clock source.
Return values Returned: value can be one of the following values: (*)
value not defined in all devices
LL_RCC_PLLSOURCE_HSI (*)
LL_RCC_PLLSOURCE_HSI_DIV_2 (*)
LL_RCC_PLLSOURCE_HSE
LL_RCC_PLLSOURCE_HSI48 (*)
Reference Manual to CFGR PLLSRC LL_RCC_PLL_GetMainSource
LL API cross
reference:
LL_RCC_PLL_GetMultiplicator
Function name __STATIC_INLINE uint32_t LL_RCC_PLL_GetMultiplicator
(void )
Function description Get PLL multiplication Factor.
LL_RCC_PLL_GetPrediv
Function name __STATIC_INLINE uint32_t LL_RCC_PLL_GetPrediv (void )
Function description Get PREDIV division factor for the main PLL.
Return values Returned: value can be one of the following values:
LL_RCC_PREDIV_DIV_1
LL_RCC_PREDIV_DIV_2
LL_RCC_PREDIV_DIV_3
LL_RCC_PREDIV_DIV_4
LL_RCC_PREDIV_DIV_5
LL_RCC_PREDIV_DIV_6
LL_RCC_PREDIV_DIV_7
LL_RCC_PREDIV_DIV_8
LL_RCC_PREDIV_DIV_9
LL_RCC_PREDIV_DIV_10
LL_RCC_PREDIV_DIV_11
LL_RCC_PREDIV_DIV_12
LL_RCC_PREDIV_DIV_13
LL_RCC_PREDIV_DIV_14
LL_RCC_PREDIV_DIV_15
LL_RCC_PREDIV_DIV_16
Notes They can be written only when the PLL is disabled
Reference Manual to CFGR2 PREDIV LL_RCC_PLL_GetPrediv
LL API cross
reference:
LL_RCC_ClearFlag_LSERDY
Function name __STATIC_INLINE void LL_RCC_ClearFlag_LSERDY (void )
Function description Clear LSE ready interrupt flag.
Return values None
Reference Manual to CIR LSERDYC LL_RCC_ClearFlag_LSERDY
LL API cross
reference:
LL_RCC_ClearFlag_HSIRDY
Function name __STATIC_INLINE void LL_RCC_ClearFlag_HSIRDY (void )
Function description Clear HSI ready interrupt flag.
Return values None
Reference Manual to CIR HSIRDYC LL_RCC_ClearFlag_HSIRDY
LL API cross
reference:
LL_RCC_ClearFlag_HSERDY
Function name __STATIC_INLINE void LL_RCC_ClearFlag_HSERDY (void )
Function description Clear HSE ready interrupt flag.
Return values None
Reference Manual to CIR HSERDYC LL_RCC_ClearFlag_HSERDY
LL API cross
reference:
LL_RCC_ClearFlag_PLLRDY
Function name __STATIC_INLINE void LL_RCC_ClearFlag_PLLRDY (void )
Function description Clear PLL ready interrupt flag.
Return values None
Reference Manual to CIR PLLRDYC LL_RCC_ClearFlag_PLLRDY
LL API cross
reference:
LL_RCC_ClearFlag_HSI48RDY
Function name __STATIC_INLINE void LL_RCC_ClearFlag_HSI48RDY (void )
Function description Clear HSI48 ready interrupt flag.
Return values None
Reference Manual to CIR HSI48RDYC LL_RCC_ClearFlag_HSI48RDY
LL API cross
reference:
LL_RCC_ClearFlag_HSECSS
Function name __STATIC_INLINE void LL_RCC_ClearFlag_HSECSS (void )
Function description Clear Clock security system interrupt flag.
Return values None
Reference Manual to CIR CSSC LL_RCC_ClearFlag_HSECSS
LL API cross
reference:
LL_RCC_IsActiveFlag_LSIRDY
Function name __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_LSIRDY
(void )
Function description Check if LSI ready interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to CIR LSIRDYF LL_RCC_IsActiveFlag_LSIRDY
LL API cross
reference:
LL_RCC_IsActiveFlag_LSERDY
Function name __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_LSERDY
(void )
Function description Check if LSE ready interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to CIR LSERDYF LL_RCC_IsActiveFlag_LSERDY
LL API cross
reference:
LL_RCC_IsActiveFlag_HSERDY
Function name __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_HSERDY
(void )
Function description Check if HSE ready interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to CIR HSERDYF LL_RCC_IsActiveFlag_HSERDY
LL API cross
reference:
LL_RCC_IsActiveFlag_PLLRDY
Function name __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_PLLRDY
(void )
Function description Check if PLL ready interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to CIR PLLRDYF LL_RCC_IsActiveFlag_PLLRDY
LL API cross
reference:
LL_RCC_IsActiveFlag_HSI14RDY
Function name __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_HSI14RDY
(void )
Function description Check if HSI14 ready interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to CIR HSI14RDYF LL_RCC_IsActiveFlag_HSI14RDY
LL API cross
reference:
LL_RCC_IsActiveFlag_HSI48RDY
Function name __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_HSI48RDY
(void )
Function description Check if HSI48 ready interrupt occurred or not.
Return values State: of bit (1 or 0).
LL_RCC_IsActiveFlag_HSECSS
Function name __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_HSECSS
(void )
Function description Check if Clock security system interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to CIR CSSF LL_RCC_IsActiveFlag_HSECSS
LL API cross
reference:
LL_RCC_IsActiveFlag_IWDGRST
Function name __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_IWDGRST
(void )
Function description Check if RCC flag Independent Watchdog reset is set or not.
Return values State: of bit (1 or 0).
Reference Manual to CSR IWDGRSTF LL_RCC_IsActiveFlag_IWDGRST
LL API cross
reference:
LL_RCC_IsActiveFlag_LPWRRST
Function name __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_LPWRRST
(void )
Function description Check if RCC flag Low Power reset is set or not.
Return values State: of bit (1 or 0).
Reference Manual to CSR LPWRRSTF LL_RCC_IsActiveFlag_LPWRRST
LL API cross
reference:
LL_RCC_IsActiveFlag_OBLRST
Function name __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_OBLRST
(void )
Function description Check if RCC flag is set or not.
Return values State: of bit (1 or 0).
Reference Manual to CSR OBLRSTF LL_RCC_IsActiveFlag_OBLRST
LL API cross
reference:
LL_RCC_IsActiveFlag_PORRST
Function name __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_PORRST
(void )
Function description Check if RCC flag POR/PDR reset is set or not.
Return values State: of bit (1 or 0).
Reference Manual to CSR PORRSTF LL_RCC_IsActiveFlag_PORRST
LL API cross
reference:
LL_RCC_IsActiveFlag_SFTRST
Function name __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_SFTRST
(void )
Function description Check if RCC flag Software reset is set or not.
Return values State: of bit (1 or 0).
Reference Manual to CSR SFTRSTF LL_RCC_IsActiveFlag_SFTRST
LL API cross
reference:
LL_RCC_IsActiveFlag_WWDGRST
Function name __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_WWDGRST
(void )
Function description Check if RCC flag Window Watchdog reset is set or not.
Return values State: of bit (1 or 0).
Reference Manual to CSR WWDGRSTF LL_RCC_IsActiveFlag_WWDGRST
LL API cross
reference:
LL_RCC_IsActiveFlag_V18PWRRST
Function name __STATIC_INLINE uint32_t
LL_RCC_IsActiveFlag_V18PWRRST (void )
Function description Check if RCC Reset flag of the 1.8 V domain is set or not.
Return values State: of bit (1 or 0).
LL_RCC_ClearResetFlags
Function name __STATIC_INLINE void LL_RCC_ClearResetFlags (void )
Function description Set RMVF bit to clear the reset flags.
Return values None
Reference Manual to CSR RMVF LL_RCC_ClearResetFlags
LL API cross
reference:
LL_RCC_EnableIT_LSIRDY
Function name __STATIC_INLINE void LL_RCC_EnableIT_LSIRDY (void )
Function description Enable LSI ready interrupt.
Return values None
Reference Manual to CIR LSIRDYIE LL_RCC_EnableIT_LSIRDY
LL API cross
reference:
LL_RCC_EnableIT_LSERDY
Function name __STATIC_INLINE void LL_RCC_EnableIT_LSERDY (void )
Function description Enable LSE ready interrupt.
Return values None
Reference Manual to CIR LSERDYIE LL_RCC_EnableIT_LSERDY
LL API cross
reference:
LL_RCC_EnableIT_HSIRDY
Function name __STATIC_INLINE void LL_RCC_EnableIT_HSIRDY (void )
Function description Enable HSI ready interrupt.
Return values None
Reference Manual to CIR HSIRDYIE LL_RCC_EnableIT_HSIRDY
LL API cross
reference:
LL_RCC_EnableIT_PLLRDY
Function name __STATIC_INLINE void LL_RCC_EnableIT_PLLRDY (void )
Function description Enable PLL ready interrupt.
Return values None
Reference Manual to CIR PLLRDYIE LL_RCC_EnableIT_PLLRDY
LL API cross
reference:
LL_RCC_EnableIT_HSI14RDY
Function name __STATIC_INLINE void LL_RCC_EnableIT_HSI14RDY (void )
Function description Enable HSI14 ready interrupt.
Return values None
Reference Manual to CIR HSI14RDYIE LL_RCC_EnableIT_HSI14RDY
LL API cross
reference:
LL_RCC_EnableIT_HSI48RDY
Function name __STATIC_INLINE void LL_RCC_EnableIT_HSI48RDY (void )
Function description Enable HSI48 ready interrupt.
Return values None
Reference Manual to CIR HSI48RDYIE LL_RCC_EnableIT_HSI48RDY
LL API cross
reference:
LL_RCC_DisableIT_LSIRDY
Function name __STATIC_INLINE void LL_RCC_DisableIT_LSIRDY (void )
Function description Disable LSI ready interrupt.
Return values None
Reference Manual to CIR LSIRDYIE LL_RCC_DisableIT_LSIRDY
LL API cross
reference:
LL_RCC_DisableIT_HSIRDY
Function name __STATIC_INLINE void LL_RCC_DisableIT_HSIRDY (void )
Function description Disable HSI ready interrupt.
Return values None
Reference Manual to CIR HSIRDYIE LL_RCC_DisableIT_HSIRDY
LL API cross
reference:
LL_RCC_DisableIT_HSERDY
Function name __STATIC_INLINE void LL_RCC_DisableIT_HSERDY (void )
Function description Disable HSE ready interrupt.
Return values None
Reference Manual to CIR HSERDYIE LL_RCC_DisableIT_HSERDY
LL API cross
reference:
LL_RCC_DisableIT_PLLRDY
Function name __STATIC_INLINE void LL_RCC_DisableIT_PLLRDY (void )
Function description Disable PLL ready interrupt.
Return values None
Reference Manual to CIR PLLRDYIE LL_RCC_DisableIT_PLLRDY
LL API cross
reference:
LL_RCC_DisableIT_HSI14RDY
Function name __STATIC_INLINE void LL_RCC_DisableIT_HSI14RDY (void )
Function description Disable HSI14 ready interrupt.
Return values None
Reference Manual to CIR HSI14RDYIE LL_RCC_DisableIT_HSI14RDY
LL API cross
reference:
LL_RCC_IsEnabledIT_LSIRDY
Function name __STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_LSIRDY
(void )
Function description Checks if LSI ready interrupt source is enabled or disabled.
Return values State: of bit (1 or 0).
Reference Manual to CIR LSIRDYIE LL_RCC_IsEnabledIT_LSIRDY
LL API cross
reference:
LL_RCC_IsEnabledIT_LSERDY
Function name __STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_LSERDY
(void )
Function description Checks if LSE ready interrupt source is enabled or disabled.
Return values State: of bit (1 or 0).
Reference Manual to CIR LSERDYIE LL_RCC_IsEnabledIT_LSERDY
LL API cross
reference:
LL_RCC_IsEnabledIT_HSIRDY
Function name __STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_HSIRDY
(void )
Function description Checks if HSI ready interrupt source is enabled or disabled.
Return values State: of bit (1 or 0).
Reference Manual to CIR HSIRDYIE LL_RCC_IsEnabledIT_HSIRDY
LL API cross
reference:
LL_RCC_IsEnabledIT_PLLRDY
Function name __STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_PLLRDY
(void )
Function description Checks if PLL ready interrupt source is enabled or disabled.
Return values State: of bit (1 or 0).
Reference Manual to CIR PLLRDYIE LL_RCC_IsEnabledIT_PLLRDY
LL API cross
reference:
LL_RCC_IsEnabledIT_HSI14RDY
Function name __STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_HSI14RDY
(void )
Function description Checks if HSI14 ready interrupt source is enabled or disabled.
Return values State: of bit (1 or 0).
Reference Manual to CIR HSI14RDYIE LL_RCC_IsEnabledIT_HSI14RDY
LL API cross
reference:
LL_RCC_IsEnabledIT_HSI48RDY
Function name __STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_HSI48RDY
(void )
Function description Checks if HSI48 ready interrupt source is enabled or disabled.
Return values State: of bit (1 or 0).
Reference Manual to CIR HSI48RDYIE LL_RCC_IsEnabledIT_HSI48RDY
LL API cross
reference:
LL_RCC_DeInit
Function name ErrorStatus LL_RCC_DeInit (void )
Function description Reset the RCC clock configuration to the default reset state.
Return values An: ErrorStatus enumeration value:
SUCCESS: RCC registers are de-initialized
ERROR: not applicable
LL_RCC_GetSystemClocksFreq
Function name void LL_RCC_GetSystemClocksFreq
(LL_RCC_ClocksTypeDef * RCC_Clocks)
Function description Return the frequencies of different on chip clocks; System, AHB
and APB1 buses clocks.
Parameters RCC_Clocks: pointer to a LL_RCC_ClocksTypeDef
structure which will hold the clocks frequencies
Return values None
Notes Each time SYSCLK, HCLK and/or PCLK1 clock changes, this
function must be called to update structure fields. Otherwise,
any configuration based on this function will be incorrect.
LL_RCC_GetUSARTClockFreq
Function name uint32_t LL_RCC_GetUSARTClockFreq (uint32_t
USARTxSource)
Function description Return USARTx clock frequency.
Parameters USARTxSource: This parameter can be one of the following
values: (*) value not defined in all devices.
LL_RCC_USART1_CLKSOURCE
LL_RCC_USART2_CLKSOURCE (*)
LL_RCC_USART3_CLKSOURCE (*)
Return values USART: clock frequency (in Hz)
LL_RCC_PERIPH_FREQUENCY_NO indicates that
oscillator (HSI or LSE) is not ready
LL_RCC_GetI2CClockFreq
Function name uint32_t LL_RCC_GetI2CClockFreq (uint32_t I2CxSource)
Function description Return I2Cx clock frequency.
Parameters I2CxSource: This parameter can be one of the following
values:
LL_RCC_I2C1_CLKSOURCE
Return values I2C: clock frequency (in Hz)
LL_RCC_PERIPH_FREQUENCY_NO indicates that HSI
oscillator is not ready
64.1.2 LL_RTC_TimeTypeDef
Data Fields
uint32_t TimeFormat
uint8_t Hours
uint8_t Minutes
uint8_t Seconds
Field Documentation
uint32_t LL_RTC_TimeTypeDef::TimeFormat
Specifies the RTC AM/PM Time. This parameter can be a value of
RTC_LL_EC_TIME_FORMATThis feature can be modified afterwards using unitary
function LL_RTC_TIME_SetFormat().
uint8_t LL_RTC_TimeTypeDef::Hours
Specifies the RTC Time Hours. This parameter must be a number between Min_Data
= 0 and Max_Data = 12 if the LL_RTC_TIME_FORMAT_PM is selected. This
parameter must be a number between Min_Data = 0 and Max_Data = 23 if the
LL_RTC_TIME_FORMAT_AM_OR_24 is selected.This feature can be modified
afterwards using unitary function LL_RTC_TIME_SetHour().
uint8_t LL_RTC_TimeTypeDef::Minutes
Specifies the RTC Time Minutes. This parameter must be a number between
Min_Data = 0 and Max_Data = 59This feature can be modified afterwards using
unitary function LL_RTC_TIME_SetMinute().
uint8_t LL_RTC_TimeTypeDef::Seconds
Specifies the RTC Time Seconds. This parameter must be a number between
64.1.3 LL_RTC_DateTypeDef
Data Fields
uint8_t WeekDay
uint8_t Month
uint8_t Day
uint8_t Year
Field Documentation
uint8_t LL_RTC_DateTypeDef::WeekDay
Specifies the RTC Date WeekDay. This parameter can be a value of
RTC_LL_EC_WEEKDAYThis feature can be modified afterwards using unitary
function LL_RTC_DATE_SetWeekDay().
uint8_t LL_RTC_DateTypeDef::Month
Specifies the RTC Date Month. This parameter can be a value of
RTC_LL_EC_MONTHThis feature can be modified afterwards using unitary function
LL_RTC_DATE_SetMonth().
uint8_t LL_RTC_DateTypeDef::Day
Specifies the RTC Date Day. This parameter must be a number between Min_Data =
1 and Max_Data = 31This feature can be modified afterwards using unitary function
LL_RTC_DATE_SetDay().
uint8_t LL_RTC_DateTypeDef::Year
Specifies the RTC Date Year. This parameter must be a number between Min_Data =
0 and Max_Data = 99This feature can be modified afterwards using unitary function
LL_RTC_DATE_SetYear().
64.1.4 LL_RTC_AlarmTypeDef
Data Fields
LL_RTC_TimeTypeDef AlarmTime
uint32_t AlarmMask
uint32_t AlarmDateWeekDaySel
uint8_t AlarmDateWeekDay
Field Documentation
LL_RTC_TimeTypeDef LL_RTC_AlarmTypeDef::AlarmTime
Specifies the RTC Alarm Time members.
uint32_t LL_RTC_AlarmTypeDef::AlarmMask
Specifies the RTC Alarm Masks.This parameter can be a value of
RTC_LL_EC_ALMA_MASK This feature can be modified afterwards using unitary
function LL_RTC_ALMA_SetMask() for ALARM A.
uint32_t LL_RTC_AlarmTypeDef::AlarmDateWeekDaySel
Specifies the RTC Alarm is on day or WeekDay. This parameter can be a value of
RTC_LL_EC_ALMA_WEEKDAY_SELECTIONThis feature can be modified
afterwards using unitary function LL_RTC_ALMA_EnableWeekday() or
LL_RTC_ALMA_DisableWeekday()
uint8_t LL_RTC_AlarmTypeDef::AlarmDateWeekDay
Specifies the RTC Alarm Day/WeekDay. If AlarmDateWeekDaySel set to day, this
parameter must be a number between Min_Data = 1 and Max_Data = 31.This feature
can be modified afterwards using unitary function LL_RTC_ALMA_SetDay()If
AlarmDateWeekDaySel set to Weekday, this parameter can be a value of
LL_RTC_SetHourFormat
Function name __STATIC_INLINE void LL_RTC_SetHourFormat
(RTC_TypeDef * RTCx, uint32_t HourFormat)
Function description Set Hours format (24 hour/day or AM/PM hour format)
Parameters RTCx: RTC Instance
HourFormat: This parameter can be one of the following
values:
LL_RTC_HOURFORMAT_24HOUR
LL_RTC_HOURFORMAT_AMPM
Return values None
Notes Bit is write-protected. LL_RTC_DisableWriteProtection
function should be called before.
It can be written in initialization mode only
(LL_RTC_EnableInitMode function)
Reference Manual to CR FMT LL_RTC_SetHourFormat
LL API cross
reference:
LL_RTC_GetHourFormat
Function name __STATIC_INLINE uint32_t LL_RTC_GetHourFormat
(RTC_TypeDef * RTCx)
Function description Get Hours format (24 hour/day or AM/PM hour format)
Parameters RTCx: RTC Instance
Return values Returned: value can be one of the following values:
LL_RTC_HOURFORMAT_24HOUR
LL_RTC_HOURFORMAT_AMPM
Reference Manual to CR FMT LL_RTC_GetHourFormat
LL API cross
reference:
LL_RTC_SetAlarmOutEvent
Function name __STATIC_INLINE void LL_RTC_SetAlarmOutEvent
(RTC_TypeDef * RTCx, uint32_t AlarmOutput)
Function description Select the flag to be routed to RTC_ALARM output.
Parameters RTCx: RTC Instance
AlarmOutput: This parameter can be one of the following
values:
LL_RTC_ALARMOUT_DISABLE
LL_RTC_GetAlarmOutEvent
Function name __STATIC_INLINE uint32_t LL_RTC_GetAlarmOutEvent
(RTC_TypeDef * RTCx)
Function description Get the flag to be routed to RTC_ALARM output.
Parameters RTCx: RTC Instance
Return values Returned: value can be one of the following values:
LL_RTC_ALARMOUT_DISABLE
LL_RTC_ALARMOUT_ALMA
LL_RTC_ALARMOUT_ALMB
LL_RTC_ALARMOUT_WAKEUP
Reference Manual to CR OSEL LL_RTC_GetAlarmOutEvent
LL API cross
reference:
LL_RTC_SetAlarmOutputType
Function name __STATIC_INLINE void LL_RTC_SetAlarmOutputType
(RTC_TypeDef * RTCx, uint32_t Output)
Function description Set RTC_ALARM output type (ALARM in push-pull or open-drain
output)
Parameters RTCx: RTC Instance
Output: This parameter can be one of the following values:
LL_RTC_ALARM_OUTPUTTYPE_OPENDRAIN
LL_RTC_ALARM_OUTPUTTYPE_PUSHPULL
Return values None
Notes Used only when RTC_ALARM is mapped on PC13
If all RTC alternate functions are disabled and PC13MODE =
1, PC13VALUE configures the PC13 output data
Reference Manual to TAFCR ALARMOUTTYPE LL_RTC_SetAlarmOutputType
LL API cross
reference:
LL_RTC_GetAlarmOutputType
Function name __STATIC_INLINE uint32_t LL_RTC_GetAlarmOutputType
(RTC_TypeDef * RTCx)
LL_RTC_EnablePushPullMode
Function name __STATIC_INLINE void LL_RTC_EnablePushPullMode
(RTC_TypeDef * RTCx, uint32_t PinMask)
Function description Enable push-pull output on PC13, PC14 and/or PC15.
Parameters RTCx: RTC Instance
PinMask: This parameter can be a combination of the
following values:
LL_RTC_PIN_PC13
LL_RTC_PIN_PC14
LL_RTC_PIN_PC15
Return values None
Notes PC13 forced to push-pull output if all RTC alternate functions
are disabled
PC14 and PC15 forced to push-pull output if LSE is disabled
Reference Manual to TAFCR PC13MODE LL_RTC_EnablePushPullMode
LL API cross
reference: TAFCR PC14MODE LL_RTC_EnablePushPullMode
LL_RTC_DisablePushPullMode
Function name __STATIC_INLINE void LL_RTC_DisablePushPullMode
(RTC_TypeDef * RTCx, uint32_t PinMask)
Function description Disable push-pull output on PC13, PC14 and/or PC15.
Parameters RTCx: RTC Instance
PinMask: This parameter can be a combination of the
following values:
LL_RTC_PIN_PC13
LL_RTC_PIN_PC14
LL_RTC_PIN_PC15
Return values None
LL_RTC_SetOutputPin
Function name __STATIC_INLINE void LL_RTC_SetOutputPin (RTC_TypeDef
* RTCx, uint32_t PinMask)
Function description Set PC14 and/or PC15 to high level.
Parameters RTCx: RTC Instance
PinMask: This parameter can be a combination of the
following values:
LL_RTC_PIN_PC14
LL_RTC_PIN_PC15
Return values None
Notes Output data configuration is possible if the LSE is disabled
and PushPull output is enabled (through
LL_RTC_EnablePushPullMode)
Reference Manual to TAFCR PC14VALUE LL_RTC_SetOutputPin
LL API cross TAFCR PC15VALUE LL_RTC_SetOutputPin
reference:
LL_RTC_ResetOutputPin
Function name __STATIC_INLINE void LL_RTC_ResetOutputPin
(RTC_TypeDef * RTCx, uint32_t PinMask)
Function description Set PC14 and/or PC15 to low level.
Parameters RTCx: RTC Instance
PinMask: This parameter can be a combination of the
following values:
LL_RTC_PIN_PC14
LL_RTC_PIN_PC15
Return values None
Notes Output data configuration is possible if the LSE is disabled
and PushPull output is enabled (through
LL_RTC_EnablePushPullMode)
Reference Manual to TAFCR PC14VALUE LL_RTC_ResetOutputPin
LL API cross TAFCR PC15VALUE LL_RTC_ResetOutputPin
reference:
LL_RTC_DisableInitMode
Function name __STATIC_INLINE void LL_RTC_DisableInitMode
(RTC_TypeDef * RTCx)
Function description Disable initialization mode (Free running mode)
Parameters RTCx: RTC Instance
Return values None
Reference Manual to ISR INIT LL_RTC_DisableInitMode
LL API cross
reference:
LL_RTC_SetOutputPolarity
Function name __STATIC_INLINE void LL_RTC_SetOutputPolarity
(RTC_TypeDef * RTCx, uint32_t Polarity)
Function description Set Output polarity (pin is low when ALRAF/ALRBF/WUTF is
asserted)
Parameters RTCx: RTC Instance
Polarity: This parameter can be one of the following values:
LL_RTC_OUTPUTPOLARITY_PIN_HIGH
LL_RTC_OUTPUTPOLARITY_PIN_LOW
Return values None
Notes Bit is write-protected. LL_RTC_DisableWriteProtection
function should be called before.
Reference Manual to CR POL LL_RTC_SetOutputPolarity
LL API cross
reference:
LL_RTC_EnableShadowRegBypass
Function name __STATIC_INLINE void LL_RTC_EnableShadowRegBypass
(RTC_TypeDef * RTCx)
Function description Enable Bypass the shadow registers.
Parameters RTCx: RTC Instance
Return values None
Notes Bit is write-protected. LL_RTC_DisableWriteProtection
function should be called before.
Reference Manual to CR BYPSHAD LL_RTC_EnableShadowRegBypass
LL API cross
reference:
LL_RTC_DisableShadowRegBypass
Function name __STATIC_INLINE void LL_RTC_DisableShadowRegBypass
(RTC_TypeDef * RTCx)
Function description Disable Bypass the shadow registers.
Parameters RTCx: RTC Instance
Return values None
Reference Manual to CR BYPSHAD LL_RTC_DisableShadowRegBypass
LL API cross
reference:
LL_RTC_IsShadowRegBypassEnabled
Function name __STATIC_INLINE uint32_t
LL_RTC_IsShadowRegBypassEnabled (RTC_TypeDef * RTCx)
Function description Check if Shadow registers bypass is enabled or not.
Parameters RTCx: RTC Instance
Return values State: of bit (1 or 0).
Reference Manual to CR BYPSHAD LL_RTC_IsShadowRegBypassEnabled
LL API cross
LL_RTC_EnableRefClock
Function name __STATIC_INLINE void LL_RTC_EnableRefClock
(RTC_TypeDef * RTCx)
Function description Enable RTC_REFIN reference clock detection (50 or 60 Hz)
Parameters RTCx: RTC Instance
Return values None
Notes Bit is write-protected. LL_RTC_DisableWriteProtection
function should be called before.
It can be written in initialization mode only
(LL_RTC_EnableInitMode function)
Reference Manual to CR REFCKON LL_RTC_EnableRefClock
LL API cross
reference:
LL_RTC_DisableRefClock
Function name __STATIC_INLINE void LL_RTC_DisableRefClock
(RTC_TypeDef * RTCx)
Function description Disable RTC_REFIN reference clock detection (50 or 60 Hz)
Parameters RTCx: RTC Instance
Return values None
Notes Bit is write-protected. LL_RTC_DisableWriteProtection
function should be called before.
It can be written in initialization mode only
(LL_RTC_EnableInitMode function)
Reference Manual to CR REFCKON LL_RTC_DisableRefClock
LL API cross
reference:
LL_RTC_SetAsynchPrescaler
Function name __STATIC_INLINE void LL_RTC_SetAsynchPrescaler
(RTC_TypeDef * RTCx, uint32_t AsynchPrescaler)
Function description Set Asynchronous prescaler factor.
Parameters RTCx: RTC Instance
AsynchPrescaler: Value between Min_Data = 0 and
Max_Data = 0x7F
Return values None
Reference Manual to PRER PREDIV_A LL_RTC_SetAsynchPrescaler
LL API cross
reference:
LL_RTC_GetAsynchPrescaler
Function name __STATIC_INLINE uint32_t LL_RTC_GetAsynchPrescaler
(RTC_TypeDef * RTCx)
Function description Get Asynchronous prescaler factor.
Parameters RTCx: RTC Instance
Return values Value: between Min_Data = 0 and Max_Data = 0x7F
Reference Manual to PRER PREDIV_A LL_RTC_GetAsynchPrescaler
LL API cross
reference:
LL_RTC_GetSynchPrescaler
Function name __STATIC_INLINE uint32_t LL_RTC_GetSynchPrescaler
(RTC_TypeDef * RTCx)
Function description Get Synchronous prescaler factor.
Parameters RTCx: RTC Instance
Return values Value: between Min_Data = 0 and Max_Data = 0x7FFF
Reference Manual to PRER PREDIV_S LL_RTC_GetSynchPrescaler
LL API cross
reference:
LL_RTC_EnableWriteProtection
Function name __STATIC_INLINE void LL_RTC_EnableWriteProtection
(RTC_TypeDef * RTCx)
Function description Enable the write protection for RTC registers.
Parameters RTCx: RTC Instance
Return values None
Reference Manual to WPR KEY LL_RTC_EnableWriteProtection
LL API cross
reference:
LL_RTC_TIME_SetFormat
Function name __STATIC_INLINE void LL_RTC_TIME_SetFormat
(RTC_TypeDef * RTCx, uint32_t TimeFormat)
Function description Set time format (AM/24-hour or PM notation)
Parameters RTCx: RTC Instance
TimeFormat: This parameter can be one of the following
values:
LL_RTC_TIME_FORMAT_AM_OR_24
LL_RTC_TIME_FORMAT_PM
Return values None
Notes Bit is write-protected. LL_RTC_DisableWriteProtection
function should be called before.
It can be written in initialization mode only
(LL_RTC_EnableInitMode function)
Reference Manual to TR PM LL_RTC_TIME_SetFormat
LL API cross
reference:
LL_RTC_TIME_GetFormat
Function name __STATIC_INLINE uint32_t LL_RTC_TIME_GetFormat
(RTC_TypeDef * RTCx)
Function description Get time format (AM or PM notation)
Parameters RTCx: RTC Instance
Return values Returned: value can be one of the following values:
LL_RTC_TIME_FORMAT_AM_OR_24
LL_RTC_TIME_FORMAT_PM
Notes if shadow mode is disabled (BYPSHAD=0), need to check if
RSF flag is set before reading this bit
Read either RTC_SSR or RTC_TR locks the values in the
higher-order calendar shadow registers until RTC_DR is read
(LL_RTC_ReadReg(RTC, DR)).
Reference Manual to TR PM LL_RTC_TIME_GetFormat
LL API cross
reference:
LL_RTC_TIME_GetHour
Function name __STATIC_INLINE uint32_t LL_RTC_TIME_GetHour
(RTC_TypeDef * RTCx)
Function description Get Hours in BCD format.
Parameters RTCx: RTC Instance
Return values Value: between Min_Data=0x01 and Max_Data=0x12 or
between Min_Data=0x00 and Max_Data=0x23
Notes if shadow mode is disabled (BYPSHAD=0), need to check if
RSF flag is set before reading this bit
Read either RTC_SSR or RTC_TR locks the values in the
higher-order calendar shadow registers until RTC_DR is read
(LL_RTC_ReadReg(RTC, DR)).
helper macro __LL_RTC_CONVERT_BCD2BIN is available
to convert hour from BCD to Binary format
Reference Manual to TR HT LL_RTC_TIME_GetHour
LL API cross TR HU LL_RTC_TIME_GetHour
reference:
LL_RTC_TIME_SetMinute
Function name __STATIC_INLINE void LL_RTC_TIME_SetMinute
(RTC_TypeDef * RTCx, uint32_t Minutes)
Function description Set Minutes in BCD format.
Parameters RTCx: RTC Instance
Minutes: Value between Min_Data=0x00 and
Max_Data=0x59
Return values None
LL_RTC_TIME_GetMinute
Function name __STATIC_INLINE uint32_t LL_RTC_TIME_GetMinute
(RTC_TypeDef * RTCx)
Function description Get Minutes in BCD format.
Parameters RTCx: RTC Instance
Return values Value: between Min_Data=0x00 and Max_Data=0x59
Notes if shadow mode is disabled (BYPSHAD=0), need to check if
RSF flag is set before reading this bit
Read either RTC_SSR or RTC_TR locks the values in the
higher-order calendar shadow registers until RTC_DR is read
(LL_RTC_ReadReg(RTC, DR)).
helper macro __LL_RTC_CONVERT_BCD2BIN is available
to convert minute from BCD to Binary format
Reference Manual to TR MNT LL_RTC_TIME_GetMinute
LL API cross TR MNU LL_RTC_TIME_GetMinute
reference:
LL_RTC_TIME_SetSecond
Function name __STATIC_INLINE void LL_RTC_TIME_SetSecond
(RTC_TypeDef * RTCx, uint32_t Seconds)
Function description Set Seconds in BCD format.
Parameters RTCx: RTC Instance
Seconds: Value between Min_Data=0x00 and
Max_Data=0x59
Return values None
Notes Bit is write-protected. LL_RTC_DisableWriteProtection
function should be called before.
It can be written in initialization mode only
(LL_RTC_EnableInitMode function)
helper macro __LL_RTC_CONVERT_BIN2BCD is available
to convert Seconds from binary to BCD format
Reference Manual to TR ST LL_RTC_TIME_SetSecond
LL API cross TR SU LL_RTC_TIME_SetSecond
reference:
LL_RTC_TIME_Config
Function name __STATIC_INLINE void LL_RTC_TIME_Config (RTC_TypeDef *
RTCx, uint32_t Format12_24, uint32_t Hours, uint32_t
Minutes, uint32_t Seconds)
Function description Set time (hour, minute and second) in BCD format.
Parameters RTCx: RTC Instance
Format12_24: This parameter can be one of the following
values:
LL_RTC_TIME_FORMAT_AM_OR_24
LL_RTC_TIME_FORMAT_PM
Hours: Value between Min_Data=0x01 and Max_Data=0x12
or between Min_Data=0x00 and Max_Data=0x23
Minutes: Value between Min_Data=0x00 and
Max_Data=0x59
Seconds: Value between Min_Data=0x00 and
Max_Data=0x59
Return values None
Notes Bit is write-protected. LL_RTC_DisableWriteProtection
function should be called before.
It can be written in initialization mode only
(LL_RTC_EnableInitMode function)
TimeFormat and Hours should follow the same format
Reference Manual to TR PM LL_RTC_TIME_Config
LL API cross TR HT LL_RTC_TIME_Config
reference: TR HU LL_RTC_TIME_Config
TR MNT LL_RTC_TIME_Config
TR MNU LL_RTC_TIME_Config
TR ST LL_RTC_TIME_Config
TR SU LL_RTC_TIME_Config
LL_RTC_TIME_EnableDayLightStore
Function name __STATIC_INLINE void LL_RTC_TIME_EnableDayLightStore
(RTC_TypeDef * RTCx)
Function description Memorize whether the daylight saving time change has been
performed.
Parameters RTCx: RTC Instance
Return values None
Notes Bit is write-protected. LL_RTC_DisableWriteProtection
function should be called before.
Reference Manual to CR BKP LL_RTC_TIME_EnableDayLightStore
LL API cross
reference:
LL_RTC_TIME_DisableDayLightStore
Function name __STATIC_INLINE void LL_RTC_TIME_DisableDayLightStore
(RTC_TypeDef * RTCx)
Function description Disable memorization whether the daylight saving time change
has been performed.
Parameters RTCx: RTC Instance
Return values None
Notes Bit is write-protected. LL_RTC_DisableWriteProtection
function should be called before.
LL_RTC_TIME_IsDayLightStoreEnabled
Function name __STATIC_INLINE uint32_t
LL_RTC_TIME_IsDayLightStoreEnabled (RTC_TypeDef *
RTCx)
Function description Check if RTC Day Light Saving stored operation has been enabled
or not.
Parameters RTCx: RTC Instance
Return values State: of bit (1 or 0).
Reference Manual to CR BKP LL_RTC_TIME_IsDayLightStoreEnabled
LL API cross
reference:
LL_RTC_TIME_DecHour
Function name __STATIC_INLINE void LL_RTC_TIME_DecHour
(RTC_TypeDef * RTCx)
Function description Subtract 1 hour (winter time change)
Parameters RTCx: RTC Instance
Return values None
Notes Bit is write-protected. LL_RTC_DisableWriteProtection
function should be called before.
Reference Manual to CR SUB1H LL_RTC_TIME_DecHour
LL API cross
reference:
LL_RTC_TIME_IncHour
Function name __STATIC_INLINE void LL_RTC_TIME_IncHour (RTC_TypeDef
* RTCx)
Function description Add 1 hour (summer time change)
Parameters RTCx: RTC Instance
Return values None
Notes Bit is write-protected. LL_RTC_DisableWriteProtection
function should be called before.
Reference Manual to CR ADD1H LL_RTC_TIME_IncHour
LL API cross
reference:
LL_RTC_TIME_Synchronize
Function name __STATIC_INLINE void LL_RTC_TIME_Synchronize
(RTC_TypeDef * RTCx, uint32_t ShiftSecond, uint32_t
Fraction)
Function description Synchronize to a remote clock with a high degree of precision.
Parameters RTCx: RTC Instance
ShiftSecond: This parameter can be one of the following
values:
LL_RTC_SHIFT_SECOND_DELAY
LL_RTC_SHIFT_SECOND_ADVANCE
Fraction: Number of Seconds Fractions (any value from 0 to
0x7FFF)
Return values None
Notes This operation effectively subtracts from (delays) or advance
the clock of a fraction of a second.
Bit is write-protected. LL_RTC_DisableWriteProtection
function should be called before.
When REFCKON is set, firmware must not write to Shift
control register.
Reference Manual to SHIFTR ADD1S LL_RTC_TIME_Synchronize
LL API cross SHIFTR SUBFS LL_RTC_TIME_Synchronize
reference:
LL_RTC_DATE_SetYear
Function name __STATIC_INLINE void LL_RTC_DATE_SetYear
(RTC_TypeDef * RTCx, uint32_t Year)
Function description Set Year in BCD format.
LL_RTC_DATE_GetYear
Function name __STATIC_INLINE uint32_t LL_RTC_DATE_GetYear
(RTC_TypeDef * RTCx)
Function description Get Year in BCD format.
Parameters RTCx: RTC Instance
Return values Value: between Min_Data=0x00 and Max_Data=0x99
Notes if shadow mode is disabled (BYPSHAD=0), need to check if
RSF flag is set before reading this bit
helper macro __LL_RTC_CONVERT_BCD2BIN is available
to convert Year from BCD to Binary format
Reference Manual to DR YT LL_RTC_DATE_GetYear
LL API cross DR YU LL_RTC_DATE_GetYear
reference:
LL_RTC_DATE_SetWeekDay
Function name __STATIC_INLINE void LL_RTC_DATE_SetWeekDay
(RTC_TypeDef * RTCx, uint32_t WeekDay)
Function description Set Week day.
Parameters RTCx: RTC Instance
WeekDay: This parameter can be one of the following
values:
LL_RTC_WEEKDAY_MONDAY
LL_RTC_WEEKDAY_TUESDAY
LL_RTC_WEEKDAY_WEDNESDAY
LL_RTC_WEEKDAY_THURSDAY
LL_RTC_WEEKDAY_FRIDAY
LL_RTC_WEEKDAY_SATURDAY
LL_RTC_WEEKDAY_SUNDAY
Return values None
Reference Manual to DR WDU LL_RTC_DATE_SetWeekDay
LL API cross
reference:
LL_RTC_DATE_SetMonth
Function name __STATIC_INLINE void LL_RTC_DATE_SetMonth
(RTC_TypeDef * RTCx, uint32_t Month)
Function description Set Month in BCD format.
Parameters RTCx: RTC Instance
Month: This parameter can be one of the following values:
LL_RTC_MONTH_JANUARY
LL_RTC_MONTH_FEBRUARY
LL_RTC_MONTH_MARCH
LL_RTC_MONTH_APRIL
LL_RTC_MONTH_MAY
LL_RTC_MONTH_JUNE
LL_RTC_MONTH_JULY
LL_RTC_MONTH_AUGUST
LL_RTC_MONTH_SEPTEMBER
LL_RTC_MONTH_OCTOBER
LL_RTC_MONTH_NOVEMBER
LL_RTC_MONTH_DECEMBER
Return values None
Notes helper macro __LL_RTC_CONVERT_BIN2BCD is available
to convert Month from binary to BCD format
Reference Manual to DR MT LL_RTC_DATE_SetMonth
LL API cross DR MU LL_RTC_DATE_SetMonth
reference:
LL_RTC_DATE_SetDay
Function name __STATIC_INLINE void LL_RTC_DATE_SetDay (RTC_TypeDef
* RTCx, uint32_t Day)
Function description Set Day in BCD format.
Parameters RTCx: RTC Instance
Day: Value between Min_Data=0x01 and Max_Data=0x31
Return values None
Notes helper macro __LL_RTC_CONVERT_BIN2BCD is available
to convert Day from binary to BCD format
Reference Manual to DR DT LL_RTC_DATE_SetDay
LL API cross DR DU LL_RTC_DATE_SetDay
reference:
LL_RTC_DATE_GetDay
Function name __STATIC_INLINE uint32_t LL_RTC_DATE_GetDay
(RTC_TypeDef * RTCx)
Function description Get Day in BCD format.
Parameters RTCx: RTC Instance
LL_RTC_DATE_Config
Function name __STATIC_INLINE void LL_RTC_DATE_Config (RTC_TypeDef
* RTCx, uint32_t WeekDay, uint32_t Day, uint32_t Month,
uint32_t Year)
Function description Set date (WeekDay, Day, Month and Year) in BCD format.
Parameters RTCx: RTC Instance
WeekDay: This parameter can be one of the following
values:
LL_RTC_WEEKDAY_MONDAY
LL_RTC_WEEKDAY_TUESDAY
LL_RTC_WEEKDAY_WEDNESDAY
LL_RTC_WEEKDAY_THURSDAY
LL_RTC_WEEKDAY_FRIDAY
LL_RTC_WEEKDAY_SATURDAY
LL_RTC_WEEKDAY_SUNDAY
Day: Value between Min_Data=0x01 and Max_Data=0x31
Month: This parameter can be one of the following values:
LL_RTC_MONTH_JANUARY
LL_RTC_MONTH_FEBRUARY
LL_RTC_MONTH_MARCH
LL_RTC_MONTH_APRIL
LL_RTC_MONTH_MAY
LL_RTC_MONTH_JUNE
LL_RTC_MONTH_JULY
LL_RTC_MONTH_AUGUST
LL_RTC_MONTH_SEPTEMBER
LL_RTC_MONTH_OCTOBER
LL_RTC_MONTH_NOVEMBER
LL_RTC_MONTH_DECEMBER
Year: Value between Min_Data=0x00 and Max_Data=0x99
Return values None
Reference Manual to DR WDU LL_RTC_DATE_Config
LL API cross DR MT LL_RTC_DATE_Config
reference: DR MU LL_RTC_DATE_Config
DR DT LL_RTC_DATE_Config
DR DU LL_RTC_DATE_Config
DR YT LL_RTC_DATE_Config
DR YU LL_RTC_DATE_Config
LL_RTC_ALMA_Enable
Function name __STATIC_INLINE void LL_RTC_ALMA_Enable (RTC_TypeDef
* RTCx)
Function description Enable Alarm A.
Parameters RTCx: RTC Instance
Return values None
Notes Bit is write-protected. LL_RTC_DisableWriteProtection
function should be called before.
Reference Manual to CR ALRAE LL_RTC_ALMA_Enable
LL API cross
reference:
LL_RTC_ALMA_Disable
Function name __STATIC_INLINE void LL_RTC_ALMA_Disable
(RTC_TypeDef * RTCx)
Function description Disable Alarm A.
Parameters RTCx: RTC Instance
Return values None
Notes Bit is write-protected. LL_RTC_DisableWriteProtection
function should be called before.
LL_RTC_ALMA_SetMask
Function name __STATIC_INLINE void LL_RTC_ALMA_SetMask
(RTC_TypeDef * RTCx, uint32_t Mask)
Function description Specify the Alarm A masks.
Parameters RTCx: RTC Instance
Mask: This parameter can be a combination of the following
values:
LL_RTC_ALMA_MASK_NONE
LL_RTC_ALMA_MASK_DATEWEEKDAY
LL_RTC_ALMA_MASK_HOURS
LL_RTC_ALMA_MASK_MINUTES
LL_RTC_ALMA_MASK_SECONDS
LL_RTC_ALMA_MASK_ALL
Return values None
Reference Manual to ALRMAR MSK4 LL_RTC_ALMA_SetMask
LL API cross ALRMAR MSK3 LL_RTC_ALMA_SetMask
reference: ALRMAR MSK2 LL_RTC_ALMA_SetMask
ALRMAR MSK1 LL_RTC_ALMA_SetMask
LL_RTC_ALMA_GetMask
Function name __STATIC_INLINE uint32_t LL_RTC_ALMA_GetMask
(RTC_TypeDef * RTCx)
Function description Get the Alarm A masks.
Parameters RTCx: RTC Instance
Return values Returned: value can be can be a combination of the
following values:
LL_RTC_ALMA_MASK_NONE
LL_RTC_ALMA_MASK_DATEWEEKDAY
LL_RTC_ALMA_MASK_HOURS
LL_RTC_ALMA_MASK_MINUTES
LL_RTC_ALMA_MASK_SECONDS
LL_RTC_ALMA_MASK_ALL
Reference Manual to ALRMAR MSK4 LL_RTC_ALMA_GetMask
LL API cross ALRMAR MSK3 LL_RTC_ALMA_GetMask
reference: ALRMAR MSK2 LL_RTC_ALMA_GetMask
ALRMAR MSK1 LL_RTC_ALMA_GetMask
LL_RTC_ALMA_DisableWeekday
Function name __STATIC_INLINE void LL_RTC_ALMA_DisableWeekday
(RTC_TypeDef * RTCx)
Function description Disable AlarmA Week day selection (DU[3:0] represents the date )
Parameters RTCx: RTC Instance
Return values None
Reference Manual to ALRMAR WDSEL LL_RTC_ALMA_DisableWeekday
LL API cross
reference:
LL_RTC_ALMA_SetDay
Function name __STATIC_INLINE void LL_RTC_ALMA_SetDay (RTC_TypeDef
* RTCx, uint32_t Day)
Function description Set ALARM A Day in BCD format.
Parameters RTCx: RTC Instance
Day: Value between Min_Data=0x01 and Max_Data=0x31
Return values None
Notes helper macro __LL_RTC_CONVERT_BIN2BCD is available
to convert Day from binary to BCD format
Reference Manual to ALRMAR DT LL_RTC_ALMA_SetDay
LL API cross ALRMAR DU LL_RTC_ALMA_SetDay
reference:
LL_RTC_ALMA_GetDay
Function name __STATIC_INLINE uint32_t LL_RTC_ALMA_GetDay
(RTC_TypeDef * RTCx)
Function description Get ALARM A Day in BCD format.
Parameters RTCx: RTC Instance
Return values Value: between Min_Data=0x01 and Max_Data=0x31
Notes helper macro __LL_RTC_CONVERT_BCD2BIN is available
LL_RTC_ALMA_SetWeekDay
Function name __STATIC_INLINE void LL_RTC_ALMA_SetWeekDay
(RTC_TypeDef * RTCx, uint32_t WeekDay)
Function description Set ALARM A Weekday.
Parameters RTCx: RTC Instance
WeekDay: This parameter can be one of the following
values:
LL_RTC_WEEKDAY_MONDAY
LL_RTC_WEEKDAY_TUESDAY
LL_RTC_WEEKDAY_WEDNESDAY
LL_RTC_WEEKDAY_THURSDAY
LL_RTC_WEEKDAY_FRIDAY
LL_RTC_WEEKDAY_SATURDAY
LL_RTC_WEEKDAY_SUNDAY
Return values None
Reference Manual to ALRMAR DU LL_RTC_ALMA_SetWeekDay
LL API cross
reference:
LL_RTC_ALMA_GetWeekDay
Function name __STATIC_INLINE uint32_t LL_RTC_ALMA_GetWeekDay
(RTC_TypeDef * RTCx)
Function description Get ALARM A Weekday.
Parameters RTCx: RTC Instance
Return values Returned: value can be one of the following values:
LL_RTC_WEEKDAY_MONDAY
LL_RTC_WEEKDAY_TUESDAY
LL_RTC_WEEKDAY_WEDNESDAY
LL_RTC_WEEKDAY_THURSDAY
LL_RTC_WEEKDAY_FRIDAY
LL_RTC_WEEKDAY_SATURDAY
LL_RTC_WEEKDAY_SUNDAY
Reference Manual to ALRMAR DU LL_RTC_ALMA_GetWeekDay
LL API cross
reference:
LL_RTC_ALMA_SetTimeFormat
Function name __STATIC_INLINE void LL_RTC_ALMA_SetTimeFormat
(RTC_TypeDef * RTCx, uint32_t TimeFormat)
Function description Set Alarm A time format (AM/24-hour or PM notation)
LL_RTC_ALMA_GetTimeFormat
Function name __STATIC_INLINE uint32_t LL_RTC_ALMA_GetTimeFormat
(RTC_TypeDef * RTCx)
Function description Get Alarm A time format (AM or PM notation)
Parameters RTCx: RTC Instance
Return values Returned: value can be one of the following values:
LL_RTC_ALMA_TIME_FORMAT_AM
LL_RTC_ALMA_TIME_FORMAT_PM
Reference Manual to ALRMAR PM LL_RTC_ALMA_GetTimeFormat
LL API cross
reference:
LL_RTC_ALMA_SetHour
Function name __STATIC_INLINE void LL_RTC_ALMA_SetHour
(RTC_TypeDef * RTCx, uint32_t Hours)
Function description Set ALARM A Hours in BCD format.
Parameters RTCx: RTC Instance
Hours: Value between Min_Data=0x01 and Max_Data=0x12
or between Min_Data=0x00 and Max_Data=0x23
Return values None
Notes helper macro __LL_RTC_CONVERT_BIN2BCD is available
to convert Hours from binary to BCD format
Reference Manual to ALRMAR HT LL_RTC_ALMA_SetHour
LL API cross ALRMAR HU LL_RTC_ALMA_SetHour
reference:
LL_RTC_ALMA_GetHour
Function name __STATIC_INLINE uint32_t LL_RTC_ALMA_GetHour
(RTC_TypeDef * RTCx)
Function description Get ALARM A Hours in BCD format.
Parameters RTCx: RTC Instance
Return values Value: between Min_Data=0x01 and Max_Data=0x12 or
between Min_Data=0x00 and Max_Data=0x23
LL_RTC_ALMA_SetMinute
Function name __STATIC_INLINE void LL_RTC_ALMA_SetMinute
(RTC_TypeDef * RTCx, uint32_t Minutes)
Function description Set ALARM A Minutes in BCD format.
Parameters RTCx: RTC Instance
Minutes: Value between Min_Data=0x00 and
Max_Data=0x59
Return values None
Notes helper macro __LL_RTC_CONVERT_BIN2BCD is available
to convert Minutes from binary to BCD format
Reference Manual to ALRMAR MNT LL_RTC_ALMA_SetMinute
LL API cross ALRMAR MNU LL_RTC_ALMA_SetMinute
reference:
LL_RTC_ALMA_GetMinute
Function name __STATIC_INLINE uint32_t LL_RTC_ALMA_GetMinute
(RTC_TypeDef * RTCx)
Function description Get ALARM A Minutes in BCD format.
Parameters RTCx: RTC Instance
Return values Value: between Min_Data=0x00 and Max_Data=0x59
Notes helper macro __LL_RTC_CONVERT_BCD2BIN is available
to convert Minutes from BCD to Binary format
Reference Manual to ALRMAR MNT LL_RTC_ALMA_GetMinute
LL API cross ALRMAR MNU LL_RTC_ALMA_GetMinute
reference:
LL_RTC_ALMA_SetSecond
Function name __STATIC_INLINE void LL_RTC_ALMA_SetSecond
(RTC_TypeDef * RTCx, uint32_t Seconds)
Function description Set ALARM A Seconds in BCD format.
Parameters RTCx: RTC Instance
Seconds: Value between Min_Data=0x00 and
Max_Data=0x59
Return values None
Notes helper macro __LL_RTC_CONVERT_BIN2BCD is available
to convert Seconds from binary to BCD format
Reference Manual to ALRMAR ST LL_RTC_ALMA_SetSecond
LL_RTC_ALMA_GetSecond
Function name __STATIC_INLINE uint32_t LL_RTC_ALMA_GetSecond
(RTC_TypeDef * RTCx)
Function description Get ALARM A Seconds in BCD format.
Parameters RTCx: RTC Instance
Return values Value: between Min_Data=0x00 and Max_Data=0x59
Notes helper macro __LL_RTC_CONVERT_BCD2BIN is available
to convert Seconds from BCD to Binary format
Reference Manual to ALRMAR ST LL_RTC_ALMA_GetSecond
LL API cross ALRMAR SU LL_RTC_ALMA_GetSecond
reference:
LL_RTC_ALMA_ConfigTime
Function name __STATIC_INLINE void LL_RTC_ALMA_ConfigTime
(RTC_TypeDef * RTCx, uint32_t Format12_24, uint32_t Hours,
uint32_t Minutes, uint32_t Seconds)
Function description Set Alarm A Time (hour, minute and second) in BCD format.
Parameters RTCx: RTC Instance
Format12_24: This parameter can be one of the following
values:
LL_RTC_ALMA_TIME_FORMAT_AM
LL_RTC_ALMA_TIME_FORMAT_PM
Hours: Value between Min_Data=0x01 and Max_Data=0x12
or between Min_Data=0x00 and Max_Data=0x23
Minutes: Value between Min_Data=0x00 and
Max_Data=0x59
Seconds: Value between Min_Data=0x00 and
Max_Data=0x59
Return values None
Reference Manual to ALRMAR PM LL_RTC_ALMA_ConfigTime
LL API cross ALRMAR HT LL_RTC_ALMA_ConfigTime
reference: ALRMAR HU LL_RTC_ALMA_ConfigTime
ALRMAR MNT LL_RTC_ALMA_ConfigTime
ALRMAR MNU LL_RTC_ALMA_ConfigTime
ALRMAR ST LL_RTC_ALMA_ConfigTime
ALRMAR SU LL_RTC_ALMA_ConfigTime
LL_RTC_ALMA_GetTime
Function name __STATIC_INLINE uint32_t LL_RTC_ALMA_GetTime
(RTC_TypeDef * RTCx)
Function description Get Alarm B Time (hour, minute and second) in BCD format.
Parameters RTCx: RTC Instance
LL_RTC_ALMA_SetSubSecondMask
Function name __STATIC_INLINE void LL_RTC_ALMA_SetSubSecondMask
(RTC_TypeDef * RTCx, uint32_t Mask)
Function description Set Alarm A Mask the most-significant bits starting at this bit.
Parameters RTCx: RTC Instance
Mask: Value between Min_Data=0x00 and Max_Data=0xF
Return values None
Notes This register can be written only when ALRAE is reset in
RTC_CR register, or in initialization mode.
Reference Manual to ALRMASSR MASKSS LL_RTC_ALMA_SetSubSecondMask
LL API cross
reference:
LL_RTC_ALMA_GetSubSecondMask
Function name __STATIC_INLINE uint32_t
LL_RTC_ALMA_GetSubSecondMask (RTC_TypeDef * RTCx)
Function description Get Alarm A Mask the most-significant bits starting at this bit.
Parameters RTCx: RTC Instance
Return values Value: between Min_Data=0x00 and Max_Data=0xF
Reference Manual to ALRMASSR MASKSS LL_RTC_ALMA_GetSubSecondMask
LL API cross
reference:
LL_RTC_ALMA_SetSubSecond
Function name __STATIC_INLINE void LL_RTC_ALMA_SetSubSecond
(RTC_TypeDef * RTCx, uint32_t Subsecond)
Function description Set Alarm A Sub seconds value.
Parameters RTCx: RTC Instance
Subsecond: Value between Min_Data=0x00 and
Max_Data=0x7FFF
Return values None
LL_RTC_ALMA_GetSubSecond
Function name __STATIC_INLINE uint32_t LL_RTC_ALMA_GetSubSecond
(RTC_TypeDef * RTCx)
Function description Get Alarm A Sub seconds value.
Parameters RTCx: RTC Instance
Return values Value: between Min_Data=0x00 and Max_Data=0x7FFF
Reference Manual to ALRMASSR SS LL_RTC_ALMA_GetSubSecond
LL API cross
reference:
LL_RTC_TS_Enable
Function name __STATIC_INLINE void LL_RTC_TS_Enable (RTC_TypeDef *
RTCx)
Function description Enable Timestamp.
Parameters RTCx: RTC Instance
Return values None
Notes Bit is write-protected. LL_RTC_DisableWriteProtection
function should be called before.
Reference Manual to CR TSE LL_RTC_TS_Enable
LL API cross
reference:
LL_RTC_TS_Disable
Function name __STATIC_INLINE void LL_RTC_TS_Disable (RTC_TypeDef *
RTCx)
Function description Disable Timestamp.
Parameters RTCx: RTC Instance
Return values None
Notes Bit is write-protected. LL_RTC_DisableWriteProtection
function should be called before.
Reference Manual to CR TSE LL_RTC_TS_Disable
LL API cross
reference:
LL_RTC_TS_GetActiveEdge
Function name __STATIC_INLINE uint32_t LL_RTC_TS_GetActiveEdge
(RTC_TypeDef * RTCx)
Function description Get Time-stamp event active edge.
Parameters RTCx: RTC Instance
Return values Returned: value can be one of the following values:
LL_RTC_TIMESTAMP_EDGE_RISING
LL_RTC_TIMESTAMP_EDGE_FALLING
Notes Bit is write-protected. LL_RTC_DisableWriteProtection
function should be called before.
Reference Manual to CR TSEDGE LL_RTC_TS_GetActiveEdge
LL API cross
reference:
LL_RTC_TS_GetTimeFormat
Function name __STATIC_INLINE uint32_t LL_RTC_TS_GetTimeFormat
(RTC_TypeDef * RTCx)
Function description Get Timestamp AM/PM notation (AM or 24-hour format)
Parameters RTCx: RTC Instance
Return values Returned: value can be one of the following values:
LL_RTC_TS_TIME_FORMAT_AM
LL_RTC_TS_TIME_FORMAT_PM
Reference Manual to TSTR PM LL_RTC_TS_GetTimeFormat
LL API cross
reference:
LL_RTC_TS_GetMinute
Function name __STATIC_INLINE uint32_t LL_RTC_TS_GetMinute
(RTC_TypeDef * RTCx)
Function description Get Timestamp Minutes in BCD format.
Parameters RTCx: RTC Instance
Return values Value: between Min_Data=0x00 and Max_Data=0x59
Notes helper macro __LL_RTC_CONVERT_BCD2BIN is available
to convert Minutes from BCD to Binary format
Reference Manual to TSTR MNT LL_RTC_TS_GetMinute
LL API cross TSTR MNU LL_RTC_TS_GetMinute
reference:
LL_RTC_TS_GetSecond
Function name __STATIC_INLINE uint32_t LL_RTC_TS_GetSecond
(RTC_TypeDef * RTCx)
Function description Get Timestamp Seconds in BCD format.
Parameters RTCx: RTC Instance
Return values Value: between Min_Data=0x00 and Max_Data=0x59
Notes helper macro __LL_RTC_CONVERT_BCD2BIN is available
to convert Seconds from BCD to Binary format
Reference Manual to TSTR ST LL_RTC_TS_GetSecond
LL API cross TSTR SU LL_RTC_TS_GetSecond
reference:
LL_RTC_TS_GetWeekDay
Function name __STATIC_INLINE uint32_t LL_RTC_TS_GetWeekDay
(RTC_TypeDef * RTCx)
Function description Get Timestamp Week day.
Parameters RTCx: RTC Instance
Return values Returned: value can be one of the following values:
LL_RTC_WEEKDAY_MONDAY
LL_RTC_WEEKDAY_TUESDAY
LL_RTC_WEEKDAY_WEDNESDAY
LL_RTC_WEEKDAY_THURSDAY
LL_RTC_WEEKDAY_FRIDAY
LL_RTC_WEEKDAY_SATURDAY
LL_RTC_WEEKDAY_SUNDAY
Reference Manual to TSDR WDU LL_RTC_TS_GetWeekDay
LL API cross
reference:
LL_RTC_TS_GetMonth
Function name __STATIC_INLINE uint32_t LL_RTC_TS_GetMonth
(RTC_TypeDef * RTCx)
Function description Get Timestamp Month in BCD format.
Parameters RTCx: RTC Instance
Return values Returned: value can be one of the following values:
LL_RTC_MONTH_JANUARY
LL_RTC_MONTH_FEBRUARY
LL_RTC_MONTH_MARCH
LL_RTC_MONTH_APRIL
LL_RTC_MONTH_MAY
LL_RTC_MONTH_JUNE
LL_RTC_TS_GetDay
Function name __STATIC_INLINE uint32_t LL_RTC_TS_GetDay
(RTC_TypeDef * RTCx)
Function description Get Timestamp Day in BCD format.
Parameters RTCx: RTC Instance
Return values Value: between Min_Data=0x01 and Max_Data=0x31
Notes helper macro __LL_RTC_CONVERT_BCD2BIN is available
to convert Day from BCD to Binary format
Reference Manual to TSDR DT LL_RTC_TS_GetDay
LL API cross TSDR DU LL_RTC_TS_GetDay
reference:
LL_RTC_TS_GetDate
Function name __STATIC_INLINE uint32_t LL_RTC_TS_GetDate
(RTC_TypeDef * RTCx)
Function description Get Timestamp date (WeekDay, Day and Month) in BCD format.
Parameters RTCx: RTC Instance
Return values Combination: of Weekday, Day and Month
Notes helper macros __LL_RTC_GET_WEEKDAY,
__LL_RTC_GET_MONTH, and __LL_RTC_GET_DAY are
available to get independently each parameter.
Reference Manual to TSDR WDU LL_RTC_TS_GetDate
LL API cross TSDR MT LL_RTC_TS_GetDate
reference: TSDR MU LL_RTC_TS_GetDate
TSDR DT LL_RTC_TS_GetDate
TSDR DU LL_RTC_TS_GetDate
LL_RTC_TS_GetSubSecond
Function name __STATIC_INLINE uint32_t LL_RTC_TS_GetSubSecond
(RTC_TypeDef * RTCx)
Function description Get time-stamp sub second value.
LL_RTC_TS_EnableOnTamper
Function name __STATIC_INLINE void LL_RTC_TS_EnableOnTamper
(RTC_TypeDef * RTCx)
Function description Activate timestamp on tamper detection event.
Parameters RTCx: RTC Instance
Return values None
Reference Manual to TAFCR TAMPTS LL_RTC_TS_EnableOnTamper
LL API cross
reference:
LL_RTC_TS_DisableOnTamper
Function name __STATIC_INLINE void LL_RTC_TS_DisableOnTamper
(RTC_TypeDef * RTCx)
Function description Disable timestamp on tamper detection event.
Parameters RTCx: RTC Instance
Return values None
Reference Manual to TAFCR TAMPTS LL_RTC_TS_DisableOnTamper
LL API cross
reference:
LL_RTC_TAMPER_Enable
Function name __STATIC_INLINE void LL_RTC_TAMPER_Enable
(RTC_TypeDef * RTCx, uint32_t Tamper)
Function description Enable RTC_TAMPx input detection.
Parameters RTCx: RTC Instance
Tamper: This parameter can be a combination of the
following values: (*) value not defined in all devices.
LL_RTC_TAMPER_1
LL_RTC_TAMPER_2
LL_RTC_TAMPER_3 (*)
Return values None
Reference Manual to TAFCR TAMP1E LL_RTC_TAMPER_Enable
LL API cross TAFCR TAMP2E LL_RTC_TAMPER_Enable
reference: TAFCR TAMP3E LL_RTC_TAMPER_Enable
LL_RTC_TAMPER_DisablePullUp
Function name __STATIC_INLINE void LL_RTC_TAMPER_DisablePullUp
(RTC_TypeDef * RTCx)
Function description Disable RTC_TAMPx pull-up disable (Disable precharge of
RTC_TAMPx pins)
Parameters RTCx: RTC Instance
Return values None
Reference Manual to TAFCR TAMPPUDIS LL_RTC_TAMPER_DisablePullUp
LL API cross
reference:
LL_RTC_TAMPER_EnablePullUp
Function name __STATIC_INLINE void LL_RTC_TAMPER_EnablePullUp
(RTC_TypeDef * RTCx)
Function description Enable RTC_TAMPx pull-up disable ( Precharge RTC_TAMPx
pins before sampling)
Parameters RTCx: RTC Instance
Return values None
Reference Manual to TAFCR TAMPPUDIS LL_RTC_TAMPER_EnablePullUp
LL API cross
reference:
LL_RTC_TAMPER_SetPrecharge
Function name __STATIC_INLINE void LL_RTC_TAMPER_SetPrecharge
(RTC_TypeDef * RTCx, uint32_t Duration)
Function description Set RTC_TAMPx precharge duration.
Parameters RTCx: RTC Instance
Duration: This parameter can be one of the following values:
LL_RTC_TAMPER_GetPrecharge
Function name __STATIC_INLINE uint32_t LL_RTC_TAMPER_GetPrecharge
(RTC_TypeDef * RTCx)
Function description Get RTC_TAMPx precharge duration.
Parameters RTCx: RTC Instance
Return values Returned: value can be one of the following values:
LL_RTC_TAMPER_DURATION_1RTCCLK
LL_RTC_TAMPER_DURATION_2RTCCLK
LL_RTC_TAMPER_DURATION_4RTCCLK
LL_RTC_TAMPER_DURATION_8RTCCLK
Reference Manual to TAFCR TAMPPRCH LL_RTC_TAMPER_GetPrecharge
LL API cross
reference:
LL_RTC_TAMPER_SetFilterCount
Function name __STATIC_INLINE void LL_RTC_TAMPER_SetFilterCount
(RTC_TypeDef * RTCx, uint32_t FilterCount)
Function description Set RTC_TAMPx filter count.
Parameters RTCx: RTC Instance
FilterCount: This parameter can be one of the following
values:
LL_RTC_TAMPER_FILTER_DISABLE
LL_RTC_TAMPER_FILTER_2SAMPLE
LL_RTC_TAMPER_FILTER_4SAMPLE
LL_RTC_TAMPER_FILTER_8SAMPLE
Return values None
Reference Manual to TAFCR TAMPFLT LL_RTC_TAMPER_SetFilterCount
LL API cross
reference:
LL_RTC_TAMPER_GetFilterCount
Function name __STATIC_INLINE uint32_t LL_RTC_TAMPER_GetFilterCount
(RTC_TypeDef * RTCx)
Function description Get RTC_TAMPx filter count.
Parameters RTCx: RTC Instance
LL_RTC_TAMPER_SetSamplingFreq
Function name __STATIC_INLINE void LL_RTC_TAMPER_SetSamplingFreq
(RTC_TypeDef * RTCx, uint32_t SamplingFreq)
Function description Set Tamper sampling frequency.
Parameters RTCx: RTC Instance
SamplingFreq: This parameter can be one of the following
values:
LL_RTC_TAMPER_SAMPLFREQDIV_32768
LL_RTC_TAMPER_SAMPLFREQDIV_16384
LL_RTC_TAMPER_SAMPLFREQDIV_8192
LL_RTC_TAMPER_SAMPLFREQDIV_4096
LL_RTC_TAMPER_SAMPLFREQDIV_2048
LL_RTC_TAMPER_SAMPLFREQDIV_1024
LL_RTC_TAMPER_SAMPLFREQDIV_512
LL_RTC_TAMPER_SAMPLFREQDIV_256
Return values None
Reference Manual to TAFCR TAMPFREQ LL_RTC_TAMPER_SetSamplingFreq
LL API cross
reference:
LL_RTC_TAMPER_GetSamplingFreq
Function name __STATIC_INLINE uint32_t
LL_RTC_TAMPER_GetSamplingFreq (RTC_TypeDef * RTCx)
Function description Get Tamper sampling frequency.
Parameters RTCx: RTC Instance
Return values Returned: value can be one of the following values:
LL_RTC_TAMPER_SAMPLFREQDIV_32768
LL_RTC_TAMPER_SAMPLFREQDIV_16384
LL_RTC_TAMPER_SAMPLFREQDIV_8192
LL_RTC_TAMPER_SAMPLFREQDIV_4096
LL_RTC_TAMPER_SAMPLFREQDIV_2048
LL_RTC_TAMPER_SAMPLFREQDIV_1024
LL_RTC_TAMPER_SAMPLFREQDIV_512
LL_RTC_TAMPER_SAMPLFREQDIV_256
Reference Manual to TAFCR TAMPFREQ LL_RTC_TAMPER_GetSamplingFreq
LL API cross
reference:
LL_RTC_TAMPER_DisableActiveLevel
Function name __STATIC_INLINE void LL_RTC_TAMPER_DisableActiveLevel
(RTC_TypeDef * RTCx, uint32_t Tamper)
Function description Disable Active level for Tamper input.
Parameters RTCx: RTC Instance
Tamper: This parameter can be a combination of the
following values: (*) value not defined in all devices.
LL_RTC_TAMPER_ACTIVELEVEL_TAMP1
LL_RTC_TAMPER_ACTIVELEVEL_TAMP2
LL_RTC_TAMPER_ACTIVELEVEL_TAMP3 (*)
Return values None
Reference Manual to TAFCR TAMP1TRG LL_RTC_TAMPER_DisableActiveLevel
LL API cross TAFCR TAMP2TRG LL_RTC_TAMPER_DisableActiveLevel
reference: TAFCR TAMP3TRG LL_RTC_TAMPER_DisableActiveLevel
LL_RTC_WAKEUP_Enable
Function name __STATIC_INLINE void LL_RTC_WAKEUP_Enable
(RTC_TypeDef * RTCx)
Function description Enable Wakeup timer.
Parameters RTCx: RTC Instance
Return values None
Notes Bit is write-protected. LL_RTC_DisableWriteProtection
function should be called before.
Reference Manual to CR WUTE LL_RTC_WAKEUP_Enable
LL API cross
reference:
LL_RTC_WAKEUP_IsEnabled
Function name __STATIC_INLINE uint32_t LL_RTC_WAKEUP_IsEnabled
(RTC_TypeDef * RTCx)
Function description Check if Wakeup timer is enabled or not.
Parameters RTCx: RTC Instance
Return values State: of bit (1 or 0).
Reference Manual to CR WUTE LL_RTC_WAKEUP_IsEnabled
LL API cross
reference:
LL_RTC_WAKEUP_SetClock
Function name __STATIC_INLINE void LL_RTC_WAKEUP_SetClock
(RTC_TypeDef * RTCx, uint32_t WakeupClock)
Function description Select Wakeup clock.
Parameters RTCx: RTC Instance
WakeupClock: This parameter can be one of the following
values:
LL_RTC_WAKEUPCLOCK_DIV_16
LL_RTC_WAKEUPCLOCK_DIV_8
LL_RTC_WAKEUPCLOCK_DIV_4
LL_RTC_WAKEUPCLOCK_DIV_2
LL_RTC_WAKEUPCLOCK_CKSPRE
LL_RTC_WAKEUPCLOCK_CKSPRE_WUT
Return values None
Notes Bit is write-protected. LL_RTC_DisableWriteProtection
function should be called before.
Bit can be written only when RTC_CR WUTE bit = 0 and
RTC_ISR WUTWF bit = 1
Reference Manual to CR WUCKSEL LL_RTC_WAKEUP_SetClock
LL API cross
reference:
LL_RTC_WAKEUP_SetAutoReload
Function name __STATIC_INLINE void LL_RTC_WAKEUP_SetAutoReload
(RTC_TypeDef * RTCx, uint32_t Value)
Function description Set Wakeup auto-reload value.
Parameters RTCx: RTC Instance
Value: Value between Min_Data=0x00 and
Max_Data=0xFFFF
Return values None
Notes Bit can be written only when WUTWF is set to 1 in RTC_ISR
Reference Manual to WUTR WUT LL_RTC_WAKEUP_SetAutoReload
LL API cross
reference:
LL_RTC_WAKEUP_GetAutoReload
Function name __STATIC_INLINE uint32_t LL_RTC_WAKEUP_GetAutoReload
(RTC_TypeDef * RTCx)
Function description Get Wakeup auto-reload value.
Parameters RTCx: RTC Instance
Return values Value: between Min_Data=0x00 and Max_Data=0xFFFF
Reference Manual to WUTR WUT LL_RTC_WAKEUP_GetAutoReload
LL API cross
reference:
LL_RTC_BAK_GetRegister
Function name __STATIC_INLINE uint32_t LL_RTC_BAK_GetRegister
(RTC_TypeDef * RTCx, uint32_t BackupRegister)
Function description Reads data from the specified RTC Backup data Register.
Parameters RTCx: RTC Instance
BackupRegister: This parameter can be one of the following
values:
LL_RTC_BKP_DR0
LL_RTC_BKP_DR1
LL_RTC_BKP_DR2
LL_RTC_BKP_DR3
LL_RTC_BKP_DR4
Return values Value: between Min_Data=0x00 and
Max_Data=0xFFFFFFFF
Reference Manual to BKPxR BKP LL_RTC_BAK_GetRegister
LL API cross
reference:
LL_RTC_CAL_SetOutputFreq
Function name __STATIC_INLINE void LL_RTC_CAL_SetOutputFreq
(RTC_TypeDef * RTCx, uint32_t Frequency)
Function description Set Calibration output frequency (1 Hz or 512 Hz)
Parameters RTCx: RTC Instance
Frequency: This parameter can be one of the following
values:
LL_RTC_CALIB_OUTPUT_NONE
LL_RTC_CAL_GetOutputFreq
Function name __STATIC_INLINE uint32_t LL_RTC_CAL_GetOutputFreq
(RTC_TypeDef * RTCx)
Function description Get Calibration output frequency (1 Hz or 512 Hz)
Parameters RTCx: RTC Instance
Return values Returned: value can be one of the following values:
LL_RTC_CALIB_OUTPUT_NONE
LL_RTC_CALIB_OUTPUT_1HZ
LL_RTC_CALIB_OUTPUT_512HZ
Reference Manual to CR COE LL_RTC_CAL_GetOutputFreq
LL API cross CR COSEL LL_RTC_CAL_GetOutputFreq
reference:
LL_RTC_CAL_SetPulse
Function name __STATIC_INLINE void LL_RTC_CAL_SetPulse (RTC_TypeDef
* RTCx, uint32_t Pulse)
Function description Insert or not One RTCCLK pulse every 2exp11 pulses (frequency
increased by 488.5 ppm)
Parameters RTCx: RTC Instance
Pulse: This parameter can be one of the following values:
LL_RTC_CALIB_INSERTPULSE_NONE
LL_RTC_CALIB_INSERTPULSE_SET
Return values None
Notes Bit is write-protected. LL_RTC_DisableWriteProtection
function should be called before.
Bit can be written only when RECALPF is set to 0 in
RTC_ISR
Reference Manual to CALR CALP LL_RTC_CAL_SetPulse
LL API cross
reference:
LL_RTC_CAL_SetPeriod
Function name __STATIC_INLINE void LL_RTC_CAL_SetPeriod
(RTC_TypeDef * RTCx, uint32_t Period)
Function description Set the calibration cycle period.
Parameters RTCx: RTC Instance
Period: This parameter can be one of the following values:
LL_RTC_CALIB_PERIOD_32SEC
LL_RTC_CALIB_PERIOD_16SEC
LL_RTC_CALIB_PERIOD_8SEC
Return values None
Notes Bit is write-protected. LL_RTC_DisableWriteProtection
function should be called before.
Bit can be written only when RECALPF is set to 0 in
RTC_ISR
Reference Manual to CALR CALW8 LL_RTC_CAL_SetPeriod
LL API cross CALR CALW16 LL_RTC_CAL_SetPeriod
reference:
LL_RTC_CAL_GetPeriod
Function name __STATIC_INLINE uint32_t LL_RTC_CAL_GetPeriod
(RTC_TypeDef * RTCx)
Function description Get the calibration cycle period.
Parameters RTCx: RTC Instance
Return values Returned: value can be one of the following values:
LL_RTC_CALIB_PERIOD_32SEC
LL_RTC_CALIB_PERIOD_16SEC
LL_RTC_CALIB_PERIOD_8SEC
Reference Manual to CALR CALW8 LL_RTC_CAL_GetPeriod
LL API cross CALR CALW16 LL_RTC_CAL_GetPeriod
reference:
LL_RTC_CAL_GetMinus
Function name __STATIC_INLINE uint32_t LL_RTC_CAL_GetMinus
(RTC_TypeDef * RTCx)
Function description Get Calibration minus.
Parameters RTCx: RTC Instance
Return values Value: between Min_Data=0x00 and Max_Data= 0x1FF
Reference Manual to CALR CALM LL_RTC_CAL_GetMinus
LL API cross
reference:
LL_RTC_IsActiveFlag_RECALP
Function name __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_RECALP
(RTC_TypeDef * RTCx)
Function description Get Recalibration pending Flag.
Parameters RTCx: RTC Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR RECALPF LL_RTC_IsActiveFlag_RECALP
LL API cross
reference:
LL_RTC_IsActiveFlag_TAMP3
Function name __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TAMP3
(RTC_TypeDef * RTCx)
Function description Get RTC_TAMP3 detection flag.
Parameters RTCx: RTC Instance
Return values State: of bit (1 or 0).
LL_RTC_IsActiveFlag_TAMP2
Function name __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TAMP2
(RTC_TypeDef * RTCx)
Function description Get RTC_TAMP2 detection flag.
Parameters RTCx: RTC Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR TAMP2F LL_RTC_IsActiveFlag_TAMP2
LL API cross
reference:
LL_RTC_IsActiveFlag_TAMP1
Function name __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TAMP1
(RTC_TypeDef * RTCx)
Function description Get RTC_TAMP1 detection flag.
Parameters RTCx: RTC Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR TAMP1F LL_RTC_IsActiveFlag_TAMP1
LL API cross
reference:
LL_RTC_IsActiveFlag_TSOV
Function name __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TSOV
(RTC_TypeDef * RTCx)
Function description Get Time-stamp overflow flag.
Parameters RTCx: RTC Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR TSOVF LL_RTC_IsActiveFlag_TSOV
LL API cross
reference:
LL_RTC_IsActiveFlag_WUT
Function name __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_WUT
(RTC_TypeDef * RTCx)
Function description Get Wakeup timer flag.
Parameters RTCx: RTC Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR WUTF LL_RTC_IsActiveFlag_WUT
LL API cross
reference:
LL_RTC_IsActiveFlag_ALRA
Function name __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ALRA
(RTC_TypeDef * RTCx)
Function description Get Alarm A flag.
Parameters RTCx: RTC Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR ALRAF LL_RTC_IsActiveFlag_ALRA
LL API cross
reference:
LL_RTC_ClearFlag_TAMP3
Function name __STATIC_INLINE void LL_RTC_ClearFlag_TAMP3
(RTC_TypeDef * RTCx)
Function description Clear RTC_TAMP3 detection flag.
Parameters RTCx: RTC Instance
Return values None
Reference Manual to ISR TAMP3F LL_RTC_ClearFlag_TAMP3
LL API cross
reference:
LL_RTC_ClearFlag_TAMP1
Function name __STATIC_INLINE void LL_RTC_ClearFlag_TAMP1
(RTC_TypeDef * RTCx)
Function description Clear RTC_TAMP1 detection flag.
Parameters RTCx: RTC Instance
Return values None
Reference Manual to ISR TAMP1F LL_RTC_ClearFlag_TAMP1
LL API cross
reference:
LL_RTC_ClearFlag_TSOV
Function name __STATIC_INLINE void LL_RTC_ClearFlag_TSOV
(RTC_TypeDef * RTCx)
Function description Clear Time-stamp overflow flag.
Parameters RTCx: RTC Instance
Return values None
Reference Manual to ISR TSOVF LL_RTC_ClearFlag_TSOV
LL API cross
reference:
LL_RTC_ClearFlag_TS
Function name __STATIC_INLINE void LL_RTC_ClearFlag_TS (RTC_TypeDef
* RTCx)
Function description Clear Time-stamp flag.
Parameters RTCx: RTC Instance
Return values None
Reference Manual to ISR TSF LL_RTC_ClearFlag_TS
LL API cross
reference:
LL_RTC_ClearFlag_ALRA
Function name __STATIC_INLINE void LL_RTC_ClearFlag_ALRA
(RTC_TypeDef * RTCx)
Function description Clear Alarm A flag.
Parameters RTCx: RTC Instance
Return values None
Reference Manual to ISR ALRAF LL_RTC_ClearFlag_ALRA
LL API cross
reference:
LL_RTC_IsActiveFlag_INIT
Function name __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_INIT
(RTC_TypeDef * RTCx)
Function description Get Initialization flag.
Parameters RTCx: RTC Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR INITF LL_RTC_IsActiveFlag_INIT
LL API cross
reference:
LL_RTC_IsActiveFlag_RS
Function name __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_RS
(RTC_TypeDef * RTCx)
Function description Get Registers synchronization flag.
Parameters RTCx: RTC Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR RSF LL_RTC_IsActiveFlag_RS
LL API cross
reference:
LL_RTC_IsActiveFlag_INITS
Function name __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_INITS
(RTC_TypeDef * RTCx)
Function description Get Initialization status flag.
Parameters RTCx: RTC Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR INITS LL_RTC_IsActiveFlag_INITS
LL API cross
reference:
LL_RTC_IsActiveFlag_SHP
Function name __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_SHP
(RTC_TypeDef * RTCx)
Function description Get Shift operation pending flag.
Parameters RTCx: RTC Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR SHPF LL_RTC_IsActiveFlag_SHP
LL API cross
reference:
LL_RTC_IsActiveFlag_WUTW
Function name __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_WUTW
(RTC_TypeDef * RTCx)
Function description Get Wakeup timer write flag.
Parameters RTCx: RTC Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR WUTWF LL_RTC_IsActiveFlag_WUTW
LL API cross
reference:
LL_RTC_EnableIT_TS
Function name __STATIC_INLINE void LL_RTC_EnableIT_TS (RTC_TypeDef *
RTCx)
Function description Enable Time-stamp interrupt.
Parameters RTCx: RTC Instance
Return values None
Notes Bit is write-protected. LL_RTC_DisableWriteProtection
function should be called before.
Reference Manual to CR TSIE LL_RTC_EnableIT_TS
LL API cross
reference:
LL_RTC_DisableIT_TS
Function name __STATIC_INLINE void LL_RTC_DisableIT_TS (RTC_TypeDef
* RTCx)
Function description Disable Time-stamp interrupt.
Parameters RTCx: RTC Instance
Return values None
Notes Bit is write-protected. LL_RTC_DisableWriteProtection
function should be called before.
Reference Manual to CR TSIE LL_RTC_DisableIT_TS
LL API cross
reference:
LL_RTC_EnableIT_WUT
Function name __STATIC_INLINE void LL_RTC_EnableIT_WUT
(RTC_TypeDef * RTCx)
Function description Enable Wakeup timer interrupt.
Parameters RTCx: RTC Instance
Return values None
Notes Bit is write-protected. LL_RTC_DisableWriteProtection
LL_RTC_DisableIT_WUT
Function name __STATIC_INLINE void LL_RTC_DisableIT_WUT
(RTC_TypeDef * RTCx)
Function description Disable Wakeup timer interrupt.
Parameters RTCx: RTC Instance
Return values None
Notes Bit is write-protected. LL_RTC_DisableWriteProtection
function should be called before.
Reference Manual to CR WUTIE LL_RTC_DisableIT_WUT
LL API cross
reference:
LL_RTC_EnableIT_ALRA
Function name __STATIC_INLINE void LL_RTC_EnableIT_ALRA
(RTC_TypeDef * RTCx)
Function description Enable Alarm A interrupt.
Parameters RTCx: RTC Instance
Return values None
Notes Bit is write-protected. LL_RTC_DisableWriteProtection
function should be called before.
Reference Manual to CR ALRAIE LL_RTC_EnableIT_ALRA
LL API cross
reference:
LL_RTC_DisableIT_ALRA
Function name __STATIC_INLINE void LL_RTC_DisableIT_ALRA
(RTC_TypeDef * RTCx)
Function description Disable Alarm A interrupt.
Parameters RTCx: RTC Instance
Return values None
Notes Bit is write-protected. LL_RTC_DisableWriteProtection
function should be called before.
Reference Manual to CR ALRAIE LL_RTC_DisableIT_ALRA
LL API cross
reference:
LL_RTC_DisableIT_TAMP
Function name __STATIC_INLINE void LL_RTC_DisableIT_TAMP
(RTC_TypeDef * RTCx)
Function description Disable all Tamper Interrupt.
Parameters RTCx: RTC Instance
Return values None
Reference Manual to TAFCR TAMPIE LL_RTC_DisableIT_TAMP
LL API cross
reference:
LL_RTC_IsEnabledIT_TS
Function name __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_TS
(RTC_TypeDef * RTCx)
Function description Check if Time-stamp interrupt is enabled or not.
Parameters RTCx: RTC Instance
Return values State: of bit (1 or 0).
Reference Manual to CR TSIE LL_RTC_IsEnabledIT_TS
LL API cross
reference:
LL_RTC_IsEnabledIT_WUT
Function name __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_WUT
(RTC_TypeDef * RTCx)
Function description Check if Wakeup timer interrupt is enabled or not.
Parameters RTCx: RTC Instance
Return values State: of bit (1 or 0).
Reference Manual to CR WUTIE LL_RTC_IsEnabledIT_WUT
LL API cross
reference:
LL_RTC_IsEnabledIT_TAMP
Function name __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_TAMP
(RTC_TypeDef * RTCx)
Function description Check if all the TAMPER interrupts are enabled or not.
Parameters RTCx: RTC Instance
Return values State: of bit (1 or 0).
Reference Manual to TAFCR TAMPIE LL_RTC_IsEnabledIT_TAMP
LL API cross
reference:
LL_RTC_DeInit
Function name ErrorStatus LL_RTC_DeInit (RTC_TypeDef * RTCx)
Function description De-Initializes the RTC registers to their default reset values.
Parameters RTCx: RTC Instance
Return values An: ErrorStatus enumeration value:
SUCCESS: RTC registers are de-initialized
ERROR: RTC registers are not de-initialized
Notes This function doesn't reset the RTC Clock source and RTC
Backup Data registers.
LL_RTC_Init
Function name ErrorStatus LL_RTC_Init (RTC_TypeDef * RTCx,
LL_RTC_InitTypeDef * RTC_InitStruct)
Function description Initializes the RTC registers according to the specified parameters
in RTC_InitStruct.
Parameters RTCx: RTC Instance
RTC_InitStruct: pointer to a LL_RTC_InitTypeDef structure
that contains the configuration information for the RTC
peripheral.
Return values An: ErrorStatus enumeration value:
SUCCESS: RTC registers are initialized
ERROR: RTC registers are not initialized
LL_RTC_StructInit
Function name void LL_RTC_StructInit (LL_RTC_InitTypeDef *
RTC_InitStruct)
Function description Set each LL_RTC_InitTypeDef field to default value.
Parameters RTC_InitStruct: pointer to a LL_RTC_InitTypeDef structure
which will be initialized.
Return values None
LL_RTC_TIME_Init
Function name ErrorStatus LL_RTC_TIME_Init (RTC_TypeDef * RTCx,
uint32_t RTC_Format, LL_RTC_TimeTypeDef *
RTC_TimeStruct)
Function description Set the RTC current time.
Parameters RTCx: RTC Instance
RTC_Format: This parameter can be one of the following
values:
LL_RTC_FORMAT_BIN
LL_RTC_FORMAT_BCD
RTC_TimeStruct: pointer to a RTC_TimeTypeDef structure
that contains the time configuration information for the RTC.
Return values An: ErrorStatus enumeration value:
SUCCESS: RTC Time register is configured
ERROR: RTC Time register is not configured
LL_RTC_TIME_StructInit
Function name void LL_RTC_TIME_StructInit (LL_RTC_TimeTypeDef *
RTC_TimeStruct)
Function description Set each LL_RTC_TimeTypeDef field to default value (Time =
00h:00min:00sec).
Parameters RTC_TimeStruct: pointer to a LL_RTC_TimeTypeDef
structure which will be initialized.
Return values None
LL_RTC_DATE_Init
Function name ErrorStatus LL_RTC_DATE_Init (RTC_TypeDef * RTCx,
uint32_t RTC_Format, LL_RTC_DateTypeDef *
RTC_DateStruct)
Function description Set the RTC current date.
Parameters RTCx: RTC Instance
RTC_Format: This parameter can be one of the following
values:
LL_RTC_DATE_StructInit
Function name void LL_RTC_DATE_StructInit (LL_RTC_DateTypeDef *
RTC_DateStruct)
Function description Set each LL_RTC_DateTypeDef field to default value (date =
Monday, January 01 xx00)
Parameters RTC_DateStruct: pointer to a LL_RTC_DateTypeDef
structure which will be initialized.
Return values None
LL_RTC_ALMA_Init
Function name ErrorStatus LL_RTC_ALMA_Init (RTC_TypeDef * RTCx,
uint32_t RTC_Format, LL_RTC_AlarmTypeDef *
RTC_AlarmStruct)
Function description Set the RTC Alarm A.
Parameters RTCx: RTC Instance
RTC_Format: This parameter can be one of the following
values:
LL_RTC_FORMAT_BIN
LL_RTC_FORMAT_BCD
RTC_AlarmStruct: pointer to a LL_RTC_AlarmTypeDef
structure that contains the alarm configuration parameters.
Return values An: ErrorStatus enumeration value:
SUCCESS: ALARMA registers are configured
ERROR: ALARMA registers are not configured
Notes The Alarm register can only be written when the
corresponding Alarm is disabled (Use
LL_RTC_ALMA_Disable function).
LL_RTC_ALMA_StructInit
Function name void LL_RTC_ALMA_StructInit (LL_RTC_AlarmTypeDef *
RTC_AlarmStruct)
Function description Set each LL_RTC_AlarmTypeDef of ALARMA field to default value
(Time = 00h:00mn:00sec / Day = 1st day of the month/Mask = all
fields are masked).
Parameters RTC_AlarmStruct: pointer to a LL_RTC_AlarmTypeDef
structure which will be initialized.
Return values None
LL_RTC_ExitInitMode
Function name ErrorStatus LL_RTC_ExitInitMode (RTC_TypeDef * RTCx)
Function description Exit the RTC Initialization mode.
Parameters RTCx: RTC Instance
Return values An: ErrorStatus enumeration value:
SUCCESS: RTC exited from in Init mode
ERROR: Not applicable
Notes When the initialization sequence is complete, the calendar
restarts counting after 4 RTCCLK cycles.
The RTC Initialization mode is write protected, use the
LL_RTC_DisableWriteProtection before calling this function.
LL_RTC_WaitForSynchro
Function name ErrorStatus LL_RTC_WaitForSynchro (RTC_TypeDef * RTCx)
Function description Waits until the RTC Time and Day registers (RTC_TR and
RTC_DR) are synchronized with RTC APB clock.
Parameters RTCx: RTC Instance
Return values An: ErrorStatus enumeration value:
SUCCESS: RTC registers are synchronised
ERROR: RTC registers are not synchronised
Notes The RTC Resynchronization mode is write protected, use the
LL_RTC_DisableWriteProtection before calling this function.
To read the calendar through the shadow registers after
Calendar initialization, calendar update or after wakeup from
low power modes the software must first clear the RSF flag.
The software must then wait until it is set again before reading
the calendar, which means that the calendar registers have
been correctly copied into the RTC_TR and RTC_DR shadow
registers.
LL_SPI_Enable
Function name __STATIC_INLINE void LL_SPI_Enable (SPI_TypeDef * SPIx)
Function description Enable SPI peripheral.
Parameters SPIx: SPI Instance
Return values None
Reference Manual to CR1 SPE LL_SPI_Enable
LL API cross
reference:
LL_SPI_Disable
Function name __STATIC_INLINE void LL_SPI_Disable (SPI_TypeDef * SPIx)
Function description Disable SPI peripheral.
Parameters SPIx: SPI Instance
Return values None
Notes When disabling the SPI, follow the procedure described in the
Reference Manual.
Reference Manual to CR1 SPE LL_SPI_Disable
LL API cross
reference:
LL_SPI_SetMode
Function name __STATIC_INLINE void LL_SPI_SetMode (SPI_TypeDef * SPIx,
uint32_t Mode)
Function description Set SPI operation mode to Master or Slave.
Parameters SPIx: SPI Instance
Mode: This parameter can be one of the following values:
LL_SPI_MODE_MASTER
LL_SPI_MODE_SLAVE
Return values None
Notes This bit should not be changed when communication is
ongoing.
Reference Manual to CR1 MSTR LL_SPI_SetMode
LL API cross CR1 SSI LL_SPI_SetMode
reference:
LL_SPI_GetMode
Function name __STATIC_INLINE uint32_t LL_SPI_GetMode (SPI_TypeDef *
SPIx)
Function description Get SPI operation mode (Master or Slave)
Parameters SPIx: SPI Instance
Return values Returned: value can be one of the following values:
LL_SPI_MODE_MASTER
LL_SPI_MODE_SLAVE
Reference Manual to CR1 MSTR LL_SPI_GetMode
LL API cross CR1 SSI LL_SPI_GetMode
reference:
LL_SPI_SetStandard
Function name __STATIC_INLINE void LL_SPI_SetStandard (SPI_TypeDef *
SPIx, uint32_t Standard)
Function description Set serial protocol used.
Parameters SPIx: SPI Instance
Standard: This parameter can be one of the following
LL_SPI_GetStandard
Function name __STATIC_INLINE uint32_t LL_SPI_GetStandard (SPI_TypeDef
* SPIx)
Function description Get serial protocol used.
Parameters SPIx: SPI Instance
Return values Returned: value can be one of the following values:
LL_SPI_PROTOCOL_MOTOROLA
LL_SPI_PROTOCOL_TI
Reference Manual to CR2 FRF LL_SPI_GetStandard
LL API cross
reference:
LL_SPI_SetClockPhase
Function name __STATIC_INLINE void LL_SPI_SetClockPhase (SPI_TypeDef
* SPIx, uint32_t ClockPhase)
Function description Set clock phase.
Parameters SPIx: SPI Instance
ClockPhase: This parameter can be one of the following
values:
LL_SPI_PHASE_1EDGE
LL_SPI_PHASE_2EDGE
Return values None
Notes This bit should not be changed when communication is
ongoing. This bit is not used in SPI TI mode.
Reference Manual to CR1 CPHA LL_SPI_SetClockPhase
LL API cross
reference:
LL_SPI_GetClockPhase
Function name __STATIC_INLINE uint32_t LL_SPI_GetClockPhase
(SPI_TypeDef * SPIx)
Function description Get clock phase.
Parameters SPIx: SPI Instance
LL_SPI_SetClockPolarity
Function name __STATIC_INLINE void LL_SPI_SetClockPolarity
(SPI_TypeDef * SPIx, uint32_t ClockPolarity)
Function description Set clock polarity.
Parameters SPIx: SPI Instance
ClockPolarity: This parameter can be one of the following
values:
LL_SPI_POLARITY_LOW
LL_SPI_POLARITY_HIGH
Return values None
Notes This bit should not be changed when communication is
ongoing. This bit is not used in SPI TI mode.
Reference Manual to CR1 CPOL LL_SPI_SetClockPolarity
LL API cross
reference:
LL_SPI_GetClockPolarity
Function name __STATIC_INLINE uint32_t LL_SPI_GetClockPolarity
(SPI_TypeDef * SPIx)
Function description Get clock polarity.
Parameters SPIx: SPI Instance
Return values Returned: value can be one of the following values:
LL_SPI_POLARITY_LOW
LL_SPI_POLARITY_HIGH
Reference Manual to CR1 CPOL LL_SPI_GetClockPolarity
LL API cross
reference:
LL_SPI_SetBaudRatePrescaler
Function name __STATIC_INLINE void LL_SPI_SetBaudRatePrescaler
(SPI_TypeDef * SPIx, uint32_t BaudRate)
Function description Set baud rate prescaler.
Parameters SPIx: SPI Instance
BaudRate: This parameter can be one of the following
values:
LL_SPI_BAUDRATEPRESCALER_DIV2
LL_SPI_BAUDRATEPRESCALER_DIV4
LL_SPI_BAUDRATEPRESCALER_DIV8
LL_SPI_GetBaudRatePrescaler
Function name __STATIC_INLINE uint32_t LL_SPI_GetBaudRatePrescaler
(SPI_TypeDef * SPIx)
Function description Get baud rate prescaler.
Parameters SPIx: SPI Instance
Return values Returned: value can be one of the following values:
LL_SPI_BAUDRATEPRESCALER_DIV2
LL_SPI_BAUDRATEPRESCALER_DIV4
LL_SPI_BAUDRATEPRESCALER_DIV8
LL_SPI_BAUDRATEPRESCALER_DIV16
LL_SPI_BAUDRATEPRESCALER_DIV32
LL_SPI_BAUDRATEPRESCALER_DIV64
LL_SPI_BAUDRATEPRESCALER_DIV128
LL_SPI_BAUDRATEPRESCALER_DIV256
Reference Manual to CR1 BR LL_SPI_GetBaudRatePrescaler
LL API cross
reference:
LL_SPI_SetTransferBitOrder
Function name __STATIC_INLINE void LL_SPI_SetTransferBitOrder
(SPI_TypeDef * SPIx, uint32_t BitOrder)
Function description Set transfer bit order.
Parameters SPIx: SPI Instance
BitOrder: This parameter can be one of the following values:
LL_SPI_LSB_FIRST
LL_SPI_MSB_FIRST
Return values None
Notes This bit should not be changed when communication is
ongoing. This bit is not used in SPI TI mode.
Reference Manual to CR1 LSBFIRST LL_SPI_SetTransferBitOrder
LL API cross
reference:
LL_SPI_SetTransferDirection
Function name __STATIC_INLINE void LL_SPI_SetTransferDirection
(SPI_TypeDef * SPIx, uint32_t TransferDirection)
Function description Set transfer direction mode.
Parameters SPIx: SPI Instance
TransferDirection: This parameter can be one of the
following values:
LL_SPI_FULL_DUPLEX
LL_SPI_SIMPLEX_RX
LL_SPI_HALF_DUPLEX_RX
LL_SPI_HALF_DUPLEX_TX
Return values None
Notes For Half-Duplex mode, Rx Direction is set by default. In
master mode, the MOSI pin is used and in slave mode, the
MISO pin is used for Half-Duplex.
Reference Manual to CR1 RXONLY LL_SPI_SetTransferDirection
LL API cross CR1 BIDIMODE LL_SPI_SetTransferDirection
reference: CR1 BIDIOE LL_SPI_SetTransferDirection
LL_SPI_GetTransferDirection
Function name __STATIC_INLINE uint32_t LL_SPI_GetTransferDirection
(SPI_TypeDef * SPIx)
Function description Get transfer direction mode.
Parameters SPIx: SPI Instance
Return values Returned: value can be one of the following values:
LL_SPI_FULL_DUPLEX
LL_SPI_SIMPLEX_RX
LL_SPI_HALF_DUPLEX_RX
LL_SPI_HALF_DUPLEX_TX
Reference Manual to CR1 RXONLY LL_SPI_GetTransferDirection
LL API cross CR1 BIDIMODE LL_SPI_GetTransferDirection
reference: CR1 BIDIOE LL_SPI_GetTransferDirection
LL_SPI_GetDataWidth
Function name __STATIC_INLINE uint32_t LL_SPI_GetDataWidth
(SPI_TypeDef * SPIx)
Function description Get frame data width.
Parameters SPIx: SPI Instance
Return values Returned: value can be one of the following values:
LL_SPI_DATAWIDTH_4BIT
LL_SPI_DATAWIDTH_5BIT
LL_SPI_DATAWIDTH_6BIT
LL_SPI_DATAWIDTH_7BIT
LL_SPI_DATAWIDTH_8BIT
LL_SPI_DATAWIDTH_9BIT
LL_SPI_DATAWIDTH_10BIT
LL_SPI_DATAWIDTH_11BIT
LL_SPI_DATAWIDTH_12BIT
LL_SPI_DATAWIDTH_13BIT
LL_SPI_DATAWIDTH_14BIT
LL_SPI_DATAWIDTH_15BIT
LL_SPI_DATAWIDTH_16BIT
Reference Manual to CR2 DS LL_SPI_GetDataWidth
LL API cross
reference:
LL_SPI_GetRxFIFOThreshold
Function name __STATIC_INLINE uint32_t LL_SPI_GetRxFIFOThreshold
(SPI_TypeDef * SPIx)
Function description Get threshold of RXFIFO that triggers an RXNE event.
Parameters SPIx: SPI Instance
Return values Returned: value can be one of the following values:
LL_SPI_RX_FIFO_TH_HALF
LL_SPI_RX_FIFO_TH_QUARTER
Reference Manual to CR2 FRXTH LL_SPI_GetRxFIFOThreshold
LL API cross
reference:
LL_SPI_EnableCRC
Function name __STATIC_INLINE void LL_SPI_EnableCRC (SPI_TypeDef *
SPIx)
Function description Enable CRC.
Parameters SPIx: SPI Instance
Return values None
Notes This bit should be written only when SPI is disabled (SPE = 0)
for correct operation.
Reference Manual to CR1 CRCEN LL_SPI_EnableCRC
LL API cross
reference:
LL_SPI_DisableCRC
Function name __STATIC_INLINE void LL_SPI_DisableCRC (SPI_TypeDef *
SPIx)
Function description Disable CRC.
LL_SPI_IsEnabledCRC
Function name __STATIC_INLINE uint32_t LL_SPI_IsEnabledCRC
(SPI_TypeDef * SPIx)
Function description Check if CRC is enabled.
Parameters SPIx: SPI Instance
Return values State: of bit (1 or 0).
Notes This bit should be written only when SPI is disabled (SPE = 0)
for correct operation.
Reference Manual to CR1 CRCEN LL_SPI_IsEnabledCRC
LL API cross
reference:
LL_SPI_SetCRCWidth
Function name __STATIC_INLINE void LL_SPI_SetCRCWidth (SPI_TypeDef *
SPIx, uint32_t CRCLength)
Function description Set CRC Length.
Parameters SPIx: SPI Instance
CRCLength: This parameter can be one of the following
values:
LL_SPI_CRC_8BIT
LL_SPI_CRC_16BIT
Return values None
Notes This bit should be written only when SPI is disabled (SPE = 0)
for correct operation.
Reference Manual to CR1 CRCL LL_SPI_SetCRCWidth
LL API cross
reference:
LL_SPI_GetCRCWidth
Function name __STATIC_INLINE uint32_t LL_SPI_GetCRCWidth
(SPI_TypeDef * SPIx)
Function description Get CRC Length.
Parameters SPIx: SPI Instance
Return values Returned: value can be one of the following values:
LL_SPI_CRC_8BIT
LL_SPI_SetCRCNext
Function name __STATIC_INLINE void LL_SPI_SetCRCNext (SPI_TypeDef *
SPIx)
Function description Set CRCNext to transfer CRC on the line.
Parameters SPIx: SPI Instance
Return values None
Notes This bit has to be written as soon as the last data is written in
the SPIx_DR register.
Reference Manual to CR1 CRCNEXT LL_SPI_SetCRCNext
LL API cross
reference:
LL_SPI_SetCRCPolynomial
Function name __STATIC_INLINE void LL_SPI_SetCRCPolynomial
(SPI_TypeDef * SPIx, uint32_t CRCPoly)
Function description Set polynomial for CRC calculation.
Parameters SPIx: SPI Instance
CRCPoly: This parameter must be a number between
Min_Data = 0x00 and Max_Data = 0xFFFF
Return values None
Reference Manual to CRCPR CRCPOLY LL_SPI_SetCRCPolynomial
LL API cross
reference:
LL_SPI_GetCRCPolynomial
Function name __STATIC_INLINE uint32_t LL_SPI_GetCRCPolynomial
(SPI_TypeDef * SPIx)
Function description Get polynomial for CRC calculation.
Parameters SPIx: SPI Instance
Return values Returned: value is a number between Min_Data = 0x00 and
Max_Data = 0xFFFF
Reference Manual to CRCPR CRCPOLY LL_SPI_GetCRCPolynomial
LL API cross
reference:
LL_SPI_GetTxCRC
Function name __STATIC_INLINE uint32_t LL_SPI_GetTxCRC (SPI_TypeDef *
SPIx)
Function description Get Tx CRC.
Parameters SPIx: SPI Instance
Return values Returned: value is a number between Min_Data = 0x00 and
Max_Data = 0xFFFF
Reference Manual to TXCRCR TXCRC LL_SPI_GetTxCRC
LL API cross
reference:
LL_SPI_SetNSSMode
Function name __STATIC_INLINE void LL_SPI_SetNSSMode (SPI_TypeDef *
SPIx, uint32_t NSS)
Function description Set NSS mode.
Parameters SPIx: SPI Instance
NSS: This parameter can be one of the following values:
LL_SPI_NSS_SOFT
LL_SPI_NSS_HARD_INPUT
LL_SPI_NSS_HARD_OUTPUT
Return values None
Notes LL_SPI_NSS_SOFT Mode is not used in SPI TI mode.
Reference Manual to CR1 SSM LL_SPI_SetNSSMode
LL API cross
reference: CR2 SSOE LL_SPI_SetNSSMode
LL_SPI_GetNSSMode
Function name __STATIC_INLINE uint32_t LL_SPI_GetNSSMode
(SPI_TypeDef * SPIx)
Function description Get NSS mode.
Parameters SPIx: SPI Instance
LL_SPI_EnableNSSPulseMgt
Function name __STATIC_INLINE void LL_SPI_EnableNSSPulseMgt
(SPI_TypeDef * SPIx)
Function description Enable NSS pulse management.
Parameters SPIx: SPI Instance
Return values None
Notes This bit should not be changed when communication is
ongoing. This bit is not used in SPI TI mode.
Reference Manual to CR2 NSSP LL_SPI_EnableNSSPulseMgt
LL API cross
reference:
LL_SPI_DisableNSSPulseMgt
Function name __STATIC_INLINE void LL_SPI_DisableNSSPulseMgt
(SPI_TypeDef * SPIx)
Function description Disable NSS pulse management.
Parameters SPIx: SPI Instance
Return values None
Notes This bit should not be changed when communication is
ongoing. This bit is not used in SPI TI mode.
Reference Manual to CR2 NSSP LL_SPI_DisableNSSPulseMgt
LL API cross
reference:
LL_SPI_IsActiveFlag_RXNE
Function name __STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_RXNE
(SPI_TypeDef * SPIx)
Function description Check if Rx buffer is not empty.
Parameters SPIx: SPI Instance
Return values State: of bit (1 or 0).
Reference Manual to SR RXNE LL_SPI_IsActiveFlag_RXNE
LL API cross
reference:
LL_SPI_IsActiveFlag_TXE
Function name __STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_TXE
(SPI_TypeDef * SPIx)
Function description Check if Tx buffer is empty.
Parameters SPIx: SPI Instance
Return values State: of bit (1 or 0).
Reference Manual to SR TXE LL_SPI_IsActiveFlag_TXE
LL API cross
reference:
LL_SPI_IsActiveFlag_CRCERR
Function name __STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_CRCERR
(SPI_TypeDef * SPIx)
Function description Get CRC error flag.
Parameters SPIx: SPI Instance
Return values State: of bit (1 or 0).
Reference Manual to SR CRCERR LL_SPI_IsActiveFlag_CRCERR
LL API cross
reference:
LL_SPI_IsActiveFlag_OVR
Function name __STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_OVR
(SPI_TypeDef * SPIx)
Function description Get overrun error flag.
Parameters SPIx: SPI Instance
Return values State: of bit (1 or 0).
Reference Manual to SR OVR LL_SPI_IsActiveFlag_OVR
LL API cross
reference:
LL_SPI_IsActiveFlag_BSY
Function name __STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_BSY
(SPI_TypeDef * SPIx)
Function description Get busy flag.
Parameters SPIx: SPI Instance
Return values State: of bit (1 or 0).
Notes The BSY flag is cleared under any one of the following
conditions: -When the SPI is correctly disabled -When a fault
is detected in Master mode (MODF bit set to 1) -In Master
mode, when it finishes a data transmission and no new data
is ready to be sent -In Slave mode, when the BSY flag is set
to '0' for at least one SPI clock cycle between each data
transfer.
Reference Manual to SR BSY LL_SPI_IsActiveFlag_BSY
LL API cross
reference:
LL_SPI_IsActiveFlag_FRE
Function name __STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_FRE
(SPI_TypeDef * SPIx)
Function description Get frame format error flag.
Parameters SPIx: SPI Instance
LL_SPI_GetRxFIFOLevel
Function name __STATIC_INLINE uint32_t LL_SPI_GetRxFIFOLevel
(SPI_TypeDef * SPIx)
Function description Get FIFO reception Level.
Parameters SPIx: SPI Instance
Return values Returned: value can be one of the following values:
LL_SPI_RX_FIFO_EMPTY
LL_SPI_RX_FIFO_QUARTER_FULL
LL_SPI_RX_FIFO_HALF_FULL
LL_SPI_RX_FIFO_FULL
Reference Manual to SR FRLVL LL_SPI_GetRxFIFOLevel
LL API cross
reference:
LL_SPI_GetTxFIFOLevel
Function name __STATIC_INLINE uint32_t LL_SPI_GetTxFIFOLevel
(SPI_TypeDef * SPIx)
Function description Get FIFO Transmission Level.
Parameters SPIx: SPI Instance
Return values Returned: value can be one of the following values:
LL_SPI_TX_FIFO_EMPTY
LL_SPI_TX_FIFO_QUARTER_FULL
LL_SPI_TX_FIFO_HALF_FULL
LL_SPI_TX_FIFO_FULL
Reference Manual to SR FTLVL LL_SPI_GetTxFIFOLevel
LL API cross
reference:
LL_SPI_ClearFlag_CRCERR
Function name __STATIC_INLINE void LL_SPI_ClearFlag_CRCERR
(SPI_TypeDef * SPIx)
Function description Clear CRC error flag.
Parameters SPIx: SPI Instance
Return values None
Reference Manual to SR CRCERR LL_SPI_ClearFlag_CRCERR
LL API cross
reference:
LL_SPI_ClearFlag_OVR
Function name __STATIC_INLINE void LL_SPI_ClearFlag_OVR (SPI_TypeDef
* SPIx)
Function description Clear overrun error flag.
Parameters SPIx: SPI Instance
Return values None
Notes Clearing this flag is done by a read access to the SPIx_DR
register followed by a read access to the SPIx_SR register
Reference Manual to SR OVR LL_SPI_ClearFlag_OVR
LL API cross
reference:
LL_SPI_ClearFlag_FRE
Function name __STATIC_INLINE void LL_SPI_ClearFlag_FRE (SPI_TypeDef *
SPIx)
Function description Clear frame format error flag.
Parameters SPIx: SPI Instance
Return values None
Notes Clearing this flag is done by reading SPIx_SR register
Reference Manual to SR FRE LL_SPI_ClearFlag_FRE
LL API cross
reference:
LL_SPI_EnableIT_ERR
Function name __STATIC_INLINE void LL_SPI_EnableIT_ERR (SPI_TypeDef *
SPIx)
Function description Enable error interrupt.
Parameters SPIx: SPI Instance
Return values None
LL_SPI_EnableIT_RXNE
Function name __STATIC_INLINE void LL_SPI_EnableIT_RXNE (SPI_TypeDef
* SPIx)
Function description Enable Rx buffer not empty interrupt.
Parameters SPIx: SPI Instance
Return values None
Reference Manual to CR2 RXNEIE LL_SPI_EnableIT_RXNE
LL API cross
reference:
LL_SPI_EnableIT_TXE
Function name __STATIC_INLINE void LL_SPI_EnableIT_TXE (SPI_TypeDef *
SPIx)
Function description Enable Tx buffer empty interrupt.
Parameters SPIx: SPI Instance
Return values None
Reference Manual to CR2 TXEIE LL_SPI_EnableIT_TXE
LL API cross
reference:
LL_SPI_DisableIT_ERR
Function name __STATIC_INLINE void LL_SPI_DisableIT_ERR (SPI_TypeDef *
SPIx)
Function description Disable error interrupt.
Parameters SPIx: SPI Instance
Return values None
Notes This bit controls the generation of an interrupt when an error
condition occurs (CRCERR, OVR, MODF in SPI mode, FRE
at TI mode).
Reference Manual to CR2 ERRIE LL_SPI_DisableIT_ERR
LL API cross
reference:
LL_SPI_DisableIT_TXE
Function name __STATIC_INLINE void LL_SPI_DisableIT_TXE (SPI_TypeDef *
SPIx)
Function description Disable Tx buffer empty interrupt.
Parameters SPIx: SPI Instance
Return values None
Reference Manual to CR2 TXEIE LL_SPI_DisableIT_TXE
LL API cross
reference:
LL_SPI_IsEnabledIT_ERR
Function name __STATIC_INLINE uint32_t LL_SPI_IsEnabledIT_ERR
(SPI_TypeDef * SPIx)
Function description Check if error interrupt is enabled.
Parameters SPIx: SPI Instance
Return values State: of bit (1 or 0).
Reference Manual to CR2 ERRIE LL_SPI_IsEnabledIT_ERR
LL API cross
reference:
LL_SPI_IsEnabledIT_RXNE
Function name __STATIC_INLINE uint32_t LL_SPI_IsEnabledIT_RXNE
(SPI_TypeDef * SPIx)
Function description Check if Rx buffer not empty interrupt is enabled.
Parameters SPIx: SPI Instance
Return values State: of bit (1 or 0).
Reference Manual to CR2 RXNEIE LL_SPI_IsEnabledIT_RXNE
LL API cross
reference:
LL_SPI_EnableDMAReq_RX
Function name __STATIC_INLINE void LL_SPI_EnableDMAReq_RX
(SPI_TypeDef * SPIx)
Function description Enable DMA Rx.
Parameters SPIx: SPI Instance
Return values None
Reference Manual to CR2 RXDMAEN LL_SPI_EnableDMAReq_RX
LL API cross
reference:
LL_SPI_DisableDMAReq_RX
Function name __STATIC_INLINE void LL_SPI_DisableDMAReq_RX
(SPI_TypeDef * SPIx)
Function description Disable DMA Rx.
Parameters SPIx: SPI Instance
Return values None
Reference Manual to CR2 RXDMAEN LL_SPI_DisableDMAReq_RX
LL API cross
reference:
LL_SPI_IsEnabledDMAReq_RX
Function name __STATIC_INLINE uint32_t LL_SPI_IsEnabledDMAReq_RX
(SPI_TypeDef * SPIx)
Function description Check if DMA Rx is enabled.
Parameters SPIx: SPI Instance
Return values State: of bit (1 or 0).
Reference Manual to CR2 RXDMAEN LL_SPI_IsEnabledDMAReq_RX
LL API cross
reference:
LL_SPI_DisableDMAReq_TX
Function name __STATIC_INLINE void LL_SPI_DisableDMAReq_TX
(SPI_TypeDef * SPIx)
Function description Disable DMA Tx.
Parameters SPIx: SPI Instance
Return values None
Reference Manual to CR2 TXDMAEN LL_SPI_DisableDMAReq_TX
LL API cross
reference:
LL_SPI_IsEnabledDMAReq_TX
Function name __STATIC_INLINE uint32_t LL_SPI_IsEnabledDMAReq_TX
(SPI_TypeDef * SPIx)
Function description Check if DMA Tx is enabled.
Parameters SPIx: SPI Instance
Return values State: of bit (1 or 0).
Reference Manual to CR2 TXDMAEN LL_SPI_IsEnabledDMAReq_TX
LL API cross
reference:
LL_SPI_SetDMAParity_RX
Function name __STATIC_INLINE void LL_SPI_SetDMAParity_RX
(SPI_TypeDef * SPIx, uint32_t Parity)
Function description Set parity of Last DMA reception.
Parameters SPIx: SPI Instance
Parity: This parameter can be one of the following values:
LL_SPI_DMA_PARITY_ODD
LL_SPI_DMA_PARITY_EVEN
Return values None
Reference Manual to CR2 LDMARX LL_SPI_SetDMAParity_RX
LL API cross
reference:
LL_SPI_SetDMAParity_TX
Function name __STATIC_INLINE void LL_SPI_SetDMAParity_TX
(SPI_TypeDef * SPIx, uint32_t Parity)
Function description Set parity of Last DMA transmission.
Parameters SPIx: SPI Instance
Parity: This parameter can be one of the following values:
LL_SPI_DMA_PARITY_ODD
LL_SPI_DMA_PARITY_EVEN
Return values None
Reference Manual to CR2 LDMATX LL_SPI_SetDMAParity_TX
LL API cross
reference:
LL_SPI_GetDMAParity_TX
Function name __STATIC_INLINE uint32_t LL_SPI_GetDMAParity_TX
(SPI_TypeDef * SPIx)
Function description Get parity configuration for Last DMA transmission.
Parameters SPIx: SPI Instance
Return values Returned: value can be one of the following values:
LL_SPI_DMA_PARITY_ODD
LL_SPI_DMA_PARITY_EVEN
Reference Manual to CR2 LDMATX LL_SPI_GetDMAParity_TX
LL API cross
reference:
LL_SPI_DMA_GetRegAddr
Function name __STATIC_INLINE uint32_t LL_SPI_DMA_GetRegAddr
(SPI_TypeDef * SPIx)
Function description Get the data register address used for DMA transfer.
Parameters SPIx: SPI Instance
LL_SPI_ReceiveData8
Function name __STATIC_INLINE uint8_t LL_SPI_ReceiveData8 (SPI_TypeDef
* SPIx)
Function description Read 8-Bits in the data register.
Parameters SPIx: SPI Instance
Return values RxData: Value between Min_Data=0x00 and
Max_Data=0xFF
Reference Manual to DR DR LL_SPI_ReceiveData8
LL API cross
reference:
LL_SPI_ReceiveData16
Function name __STATIC_INLINE uint16_t LL_SPI_ReceiveData16
(SPI_TypeDef * SPIx)
Function description Read 16-Bits in the data register.
Parameters SPIx: SPI Instance
Return values RxData: Value between Min_Data=0x00 and
Max_Data=0xFFFF
Reference Manual to DR DR LL_SPI_ReceiveData16
LL API cross
reference:
LL_SPI_TransmitData8
Function name __STATIC_INLINE void LL_SPI_TransmitData8 (SPI_TypeDef *
SPIx, uint8_t TxData)
Function description Write 8-Bits in the data register.
Parameters SPIx: SPI Instance
TxData: Value between Min_Data=0x00 and
Max_Data=0xFF
Return values None
Reference Manual to DR DR LL_SPI_TransmitData8
LL API cross
reference:
LL_SPI_TransmitData16
Function name __STATIC_INLINE void LL_SPI_TransmitData16 (SPI_TypeDef
* SPIx, uint16_t TxData)
LL_SPI_DeInit
Function name ErrorStatus LL_SPI_DeInit (SPI_TypeDef * SPIx)
Function description De-initialize the SPI registers to their default reset values.
Parameters SPIx: SPI Instance
Return values An: ErrorStatus enumeration value:
SUCCESS: SPI registers are de-initialized
ERROR: SPI registers are not de-initialized
LL_SPI_Init
Function name ErrorStatus LL_SPI_Init (SPI_TypeDef * SPIx,
LL_SPI_InitTypeDef * SPI_InitStruct)
Function description Initialize the SPI registers according to the specified parameters in
SPI_InitStruct.
Parameters SPIx: SPI Instance
SPI_InitStruct: pointer to a LL_SPI_InitTypeDef structure
Return values An: ErrorStatus enumeration value. (Return always
SUCCESS)
Notes As some bits in SPI configuration registers can only be written
when the SPI is disabled (SPI_CR1_SPE bit =0), SPI IP
should be in disabled state prior calling this function.
Otherwise, ERROR result will be returned.
LL_SPI_StructInit
Function name void LL_SPI_StructInit (LL_SPI_InitTypeDef * SPI_InitStruct)
Function description Set each LL_SPI_InitTypeDef field to default value.
Parameters SPI_InitStruct: pointer to a LL_SPI_InitTypeDef structure
whose fields will be set to default values.
Return values None
LL_SYSCFG_SetRemapMemory
Function name __STATIC_INLINE void LL_SYSCFG_SetRemapMemory
(uint32_t Memory)
Function description Set memory mapping at address 0x00000000.
Parameters Memory: This parameter can be one of the following values:
LL_SYSCFG_REMAP_FLASH
LL_SYSCFG_REMAP_SYSTEMFLASH
LL_SYSCFG_REMAP_SRAM
Return values None
Reference Manual to SYSCFG_CFGR1 MEM_MODE
LL API cross LL_SYSCFG_SetRemapMemory
reference:
LL_SYSCFG_GetRemapMemory
Function name __STATIC_INLINE uint32_t LL_SYSCFG_GetRemapMemory
(void )
Function description Get memory mapping at address 0x00000000.
Return values Returned: value can be one of the following values:
LL_SYSCFG_REMAP_FLASH
LL_SYSCFG_REMAP_SYSTEMFLASH
LL_SYSCFG_REMAP_SRAM
Reference Manual to SYSCFG_CFGR1 MEM_MODE
LL API cross LL_SYSCFG_GetRemapMemory
reference:
LL_SYSCFG_SetIRModEnvelopeSignal
Function name __STATIC_INLINE void
LL_SYSCFG_SetIRModEnvelopeSignal (uint32_t Source)
Function description Set IR Modulation Envelope signal source.
Parameters Source: This parameter can be one of the following values:
LL_SYSCFG_IR_MOD_TIM16
LL_SYSCFG_IR_MOD_USART1
LL_SYSCFG_IR_MOD_USART4
Return values None
Reference Manual to SYSCFG_CFGR1 IR_MOD
LL API cross LL_SYSCFG_SetIRModEnvelopeSignal
LL_SYSCFG_GetIRModEnvelopeSignal
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_GetIRModEnvelopeSignal (void )
Function description Get IR Modulation Envelope signal source.
Return values Returned: value can be one of the following values:
LL_SYSCFG_IR_MOD_TIM16
LL_SYSCFG_IR_MOD_USART1
LL_SYSCFG_IR_MOD_USART4
Reference Manual to SYSCFG_CFGR1 IR_MOD
LL API cross LL_SYSCFG_GetIRModEnvelopeSignal
reference:
LL_SYSCFG_EnableFastModePlus
Function name __STATIC_INLINE void LL_SYSCFG_EnableFastModePlus
(uint32_t ConfigFastModePlus)
Function description Enable the I2C fast mode plus driving capability.
Parameters ConfigFastModePlus: This parameter can be a combination
of the following values: (*) value not defined in all devices
LL_SYSCFG_I2C_FASTMODEPLUS_PB6
LL_SYSCFG_I2C_FASTMODEPLUS_PB7
LL_SYSCFG_I2C_FASTMODEPLUS_PB8
LL_SYSCFG_I2C_FASTMODEPLUS_PB9
LL_SYSCFG_I2C_FASTMODEPLUS_I2C1 (*)
LL_SYSCFG_I2C_FASTMODEPLUS_I2C2 (*)
LL_SYSCFG_I2C_FASTMODEPLUS_PA9 (*)
LL_SYSCFG_I2C_FASTMODEPLUS_PA10 (*)
Return values None
Reference Manual to SYSCFG_CFGR1 I2C_FMP_PB6
LL API cross LL_SYSCFG_EnableFastModePlus
reference: SYSCFG_CFGR1 I2C_FMP_PB7
LL_SYSCFG_EnableFastModePlus
SYSCFG_CFGR1 I2C_FMP_PB8
LL_SYSCFG_EnableFastModePlus
SYSCFG_CFGR1 I2C_FMP_PB9
LL_SYSCFG_EnableFastModePlus
SYSCFG_CFGR1 I2C_FMP_I2C1
LL_SYSCFG_EnableFastModePlus
SYSCFG_CFGR1 I2C_FMP_I2C2
LL_SYSCFG_EnableFastModePlus
SYSCFG_CFGR1 I2C_FMP_PA9
LL_SYSCFG_EnableFastModePlus
SYSCFG_CFGR1 I2C_FMP_PA10
LL_SYSCFG_EnableFastModePlus
LL_SYSCFG_SetEXTISource
Function name __STATIC_INLINE void LL_SYSCFG_SetEXTISource (uint32_t
Port, uint32_t Line)
Function description Configure source input for the EXTI external interrupt.
Parameters Port: This parameter can be one of the following values: (*)
value not defined in all devices
LL_SYSCFG_EXTI_PORTA
LL_SYSCFG_EXTI_PORTB
LL_SYSCFG_EXTI_PORTC
LL_SYSCFG_EXTI_PORTD (*)
LL_SYSCFG_EXTI_PORTE (*)
LL_SYSCFG_EXTI_PORTF
Line: This parameter can be one of the following values:
LL_SYSCFG_EXTI_LINE0
LL_SYSCFG_EXTI_LINE1
LL_SYSCFG_EXTI_LINE2
LL_SYSCFG_EXTI_LINE3
LL_SYSCFG_GetEXTISource
Function name __STATIC_INLINE uint32_t LL_SYSCFG_GetEXTISource
(uint32_t Line)
Function description Get the configured defined for specific EXTI Line.
Parameters Line: This parameter can be one of the following values:
LL_SYSCFG_EXTI_LINE0
LL_SYSCFG_EXTI_LINE1
LL_SYSCFG_EXTI_LINE2
LL_SYSCFG_EXTI_LINE3
LL_SYSCFG_EXTI_LINE4
LL_SYSCFG_EXTI_LINE5
LL_SYSCFG_EXTI_LINE6
LL_SYSCFG_EXTI_LINE7
LL_SYSCFG_EXTI_LINE8
LL_SYSCFG_EXTI_LINE9
LL_SYSCFG_EXTI_LINE10
LL_SYSCFG_EXTI_LINE11
LL_SYSCFG_EXTI_LINE12
LL_SYSCFG_EXTI_LINE13
LL_SYSCFG_IsActiveFlag_WWDG
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_WWDG
(void )
Function description Check if Window watchdog interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE0 SR_EWDG
LL API cross LL_SYSCFG_IsActiveFlag_WWDG
reference:
LL_SYSCFG_IsActiveFlag_PVDOUT
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_PVDOUT (void )
Function description Check if PVD supply monitoring interrupt occurred or not (EXTI
line 16).
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE1 SR_PVDOUT
LL API cross LL_SYSCFG_IsActiveFlag_PVDOUT
reference:
LL_SYSCFG_IsActiveFlag_RTC_WAKEUP
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_RTC_WAKEUP (void )
Function description Check if RTC Wake Up interrupt occurred or not (EXTI line 20).
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE2 SR_RTC_WAKEUP
LL API cross LL_SYSCFG_IsActiveFlag_RTC_WAKEUP
reference:
LL_SYSCFG_IsActiveFlag_RTC_TSTAMP
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_RTC_TSTAMP (void )
Function description Check if RTC Tamper and TimeStamp interrupt occurred or not
(EXTI line 19).
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE2 SR_RTC_TSTAMP
LL API cross LL_SYSCFG_IsActiveFlag_RTC_TSTAMP
reference:
LL_SYSCFG_IsActiveFlag_RTC_ALRA
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_RTC_ALRA (void )
Function description Check if RTC Alarm interrupt occurred or not (EXTI line 17).
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE2 SR_RTC_ALRA
LL API cross LL_SYSCFG_IsActiveFlag_RTC_ALRA
reference:
LL_SYSCFG_IsActiveFlag_FLASH_ITF
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_FLASH_ITF (void )
Function description Check if Flash interface interrupt occurred or not.
LL_SYSCFG_IsActiveFlag_CRS
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_CRS
(void )
Function description Check if Clock recovery system interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE4 SR_CRS LL_SYSCFG_IsActiveFlag_CRS
LL API cross
reference:
LL_SYSCFG_IsActiveFlag_CLK_CTRL
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_CLK_CTRL (void )
Function description Check if Reset and clock control interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE4 SR_CLK_CTRL
LL API cross LL_SYSCFG_IsActiveFlag_CLK_CTRL
reference:
LL_SYSCFG_IsActiveFlag_EXTI0
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI0
(void )
Function description Check if EXTI line 0 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE5 SR_EXTI0
LL API cross LL_SYSCFG_IsActiveFlag_EXTI0
reference:
LL_SYSCFG_IsActiveFlag_EXTI1
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI1
(void )
Function description Check if EXTI line 1 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE5 SR_EXTI1
LL API cross LL_SYSCFG_IsActiveFlag_EXTI1
reference:
LL_SYSCFG_IsActiveFlag_EXTI3
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI3
(void )
Function description Check if EXTI line 3 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE6 SR_EXTI3
LL API cross LL_SYSCFG_IsActiveFlag_EXTI3
reference:
LL_SYSCFG_IsActiveFlag_EXTI4
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI4
(void )
Function description Check if EXTI line 4 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE7 SR_EXTI4
LL API cross LL_SYSCFG_IsActiveFlag_EXTI4
reference:
LL_SYSCFG_IsActiveFlag_EXTI5
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI5
(void )
Function description Check if EXTI line 5 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE7 SR_EXTI5
LL API cross LL_SYSCFG_IsActiveFlag_EXTI5
reference:
LL_SYSCFG_IsActiveFlag_EXTI6
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI6
(void )
Function description Check if EXTI line 6 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE7 SR_EXTI6
LL_SYSCFG_IsActiveFlag_EXTI7
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI7
(void )
Function description Check if EXTI line 7 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE7 SR_EXTI7
LL API cross LL_SYSCFG_IsActiveFlag_EXTI7
reference:
LL_SYSCFG_IsActiveFlag_EXTI8
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI8
(void )
Function description Check if EXTI line 8 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE7 SR_EXTI8
LL API cross LL_SYSCFG_IsActiveFlag_EXTI8
reference:
LL_SYSCFG_IsActiveFlag_EXTI9
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI9
(void )
Function description Check if EXTI line 9 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE7 SR_EXTI9
LL API cross LL_SYSCFG_IsActiveFlag_EXTI9
reference:
LL_SYSCFG_IsActiveFlag_EXTI10
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI10
(void )
Function description Check if EXTI line 10 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE7 SR_EXTI10
LL API cross LL_SYSCFG_IsActiveFlag_EXTI10
reference:
LL_SYSCFG_IsActiveFlag_EXTI12
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI12
(void )
Function description Check if EXTI line 12 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE7 SR_EXTI12
LL API cross LL_SYSCFG_IsActiveFlag_EXTI12
reference:
LL_SYSCFG_IsActiveFlag_EXTI13
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI13
(void )
Function description Check if EXTI line 13 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE7 SR_EXTI13
LL API cross LL_SYSCFG_IsActiveFlag_EXTI13
reference:
LL_SYSCFG_IsActiveFlag_EXTI14
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI14
(void )
Function description Check if EXTI line 14 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE7 SR_EXTI14
LL API cross LL_SYSCFG_IsActiveFlag_EXTI14
reference:
LL_SYSCFG_IsActiveFlag_EXTI15
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI15
(void )
Function description Check if EXTI line 15 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE7 SR_EXTI15
LL_SYSCFG_IsActiveFlag_TSC_EOA
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_TSC_EOA (void )
Function description Check if Touch sensing controller end of acquisition interrupt
occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE8 SR_TSC_EOA
LL API cross LL_SYSCFG_IsActiveFlag_TSC_EOA
reference:
LL_SYSCFG_IsActiveFlag_TSC_MCE
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_TSC_MCE (void )
Function description Check if Touch sensing controller max counterror interrupt
occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE8 SR_TSC_MCE
LL API cross LL_SYSCFG_IsActiveFlag_TSC_MCE
reference:
LL_SYSCFG_IsActiveFlag_DMA1_CH1
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_DMA1_CH1 (void )
Function description Check if DMA1 channel 1 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE9 SR_DMA1_CH1
LL API cross LL_SYSCFG_IsActiveFlag_DMA1_CH1
reference:
LL_SYSCFG_IsActiveFlag_DMA1_CH2
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_DMA1_CH2 (void )
Function description Check if DMA1 channel 2 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE10 SR_DMA1_CH2
LL API cross LL_SYSCFG_IsActiveFlag_DMA1_CH2
reference:
LL_SYSCFG_IsActiveFlag_DMA2_CH1
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_DMA2_CH1 (void )
Function description Check if DMA2 channel 1 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE10 SR_DMA2_CH1
LL API cross LL_SYSCFG_IsActiveFlag_DMA2_CH1
reference:
LL_SYSCFG_IsActiveFlag_DMA2_CH2
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_DMA2_CH2 (void )
Function description Check if DMA2 channel 2 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE10 SR_DMA2_CH2
LL API cross LL_SYSCFG_IsActiveFlag_DMA2_CH2
reference:
LL_SYSCFG_IsActiveFlag_DMA1_CH4
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_DMA1_CH4 (void )
Function description Check if DMA1 channel 4 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE11 SR_DMA1_CH4
LL API cross LL_SYSCFG_IsActiveFlag_DMA1_CH4
reference:
LL_SYSCFG_IsActiveFlag_DMA1_CH5
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_DMA1_CH5 (void )
Function description Check if DMA1 channel 5 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE11 SR_DMA1_CH5
LL_SYSCFG_IsActiveFlag_DMA1_CH6
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_DMA1_CH6 (void )
Function description Check if DMA1 channel 6 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE11 SR_DMA1_CH6
LL API cross LL_SYSCFG_IsActiveFlag_DMA1_CH6
reference:
LL_SYSCFG_IsActiveFlag_DMA1_CH7
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_DMA1_CH7 (void )
Function description Check if DMA1 channel 7 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE11 SR_DMA1_CH7
LL API cross LL_SYSCFG_IsActiveFlag_DMA1_CH7
reference:
LL_SYSCFG_IsActiveFlag_DMA2_CH3
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_DMA2_CH3 (void )
Function description Check if DMA2 channel 3 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE11 SR_DMA2_CH3
LL API cross LL_SYSCFG_IsActiveFlag_DMA2_CH3
reference:
LL_SYSCFG_IsActiveFlag_DMA2_CH4
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_DMA2_CH4 (void )
Function description Check if DMA2 channel 4 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE11 SR_DMA2_CH4
LL API cross LL_SYSCFG_IsActiveFlag_DMA2_CH4
reference:
LL_SYSCFG_IsActiveFlag_DMA2_CH5
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_DMA2_CH5 (void )
LL_SYSCFG_IsActiveFlag_ADC
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_ADC
(void )
Function description Check if ADC interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE12 SR_ADC
LL API cross LL_SYSCFG_IsActiveFlag_ADC
reference:
LL_SYSCFG_IsActiveFlag_COMP1
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_COMP1
(void )
Function description Check if Comparator 1 interrupt occurred or not (EXTI line 21).
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE12 SR_COMP1
LL API cross LL_SYSCFG_IsActiveFlag_COMP1
reference:
LL_SYSCFG_IsActiveFlag_COMP2
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_COMP2
(void )
Function description Check if Comparator 2 interrupt occurred or not (EXTI line 22).
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE12 SR_COMP2
LL API cross LL_SYSCFG_IsActiveFlag_COMP2
reference:
LL_SYSCFG_IsActiveFlag_TIM1_BRK
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_TIM1_BRK (void )
Function description Check if Timer 1 break interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE13 SR_TIM1_BRK
LL API cross LL_SYSCFG_IsActiveFlag_TIM1_BRK
reference:
LL_SYSCFG_IsActiveFlag_TIM1_TRG
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_TIM1_TRG (void )
Function description Check if Timer 1 trigger interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE13 SR_TIM1_TRG
LL API cross LL_SYSCFG_IsActiveFlag_TIM1_TRG
reference:
LL_SYSCFG_IsActiveFlag_TIM1_CCU
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_TIM1_CCU (void )
Function description Check if Timer 1 commutation interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE13 SR_TIM1_CCU
LL API cross LL_SYSCFG_IsActiveFlag_TIM1_CCU
reference:
LL_SYSCFG_IsActiveFlag_TIM1_CC
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_TIM1_CC (void )
Function description Check if Timer 1 capture compare interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE14 SR_TIM1_CC
LL API cross LL_SYSCFG_IsActiveFlag_TIM1_CC
reference:
LL_SYSCFG_IsActiveFlag_TIM2
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_TIM2
(void )
Function description Check if Timer 2 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE15 SR_TIM2_GLB
LL_SYSCFG_IsActiveFlag_TIM3
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_TIM3
(void )
Function description Check if Timer 3 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE16 SR_TIM3_GLB
LL API cross LL_SYSCFG_IsActiveFlag_TIM3
reference:
LL_SYSCFG_IsActiveFlag_DAC
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_DAC
(void )
Function description Check if DAC underrun interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE17 SR_DAC
LL API cross LL_SYSCFG_IsActiveFlag_DAC
reference:
LL_SYSCFG_IsActiveFlag_TIM6
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_TIM6
(void )
Function description Check if Timer 6 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE17 SR_TIM6_GLB
LL API cross LL_SYSCFG_IsActiveFlag_TIM6
reference:
LL_SYSCFG_IsActiveFlag_TIM7
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_TIM7
(void )
Function description Check if Timer 7 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE18 SR_TIM7_GLB
LL API cross LL_SYSCFG_IsActiveFlag_TIM7
reference:
LL_SYSCFG_IsActiveFlag_TIM14
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_TIM14
(void )
LL_SYSCFG_IsActiveFlag_TIM15
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_TIM15
(void )
Function description Check if Timer 15 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE20 SR_TIM15_GLB
LL API cross LL_SYSCFG_IsActiveFlag_TIM15
reference:
LL_SYSCFG_IsActiveFlag_TIM16
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_TIM16
(void )
Function description Check if Timer 16 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE21 SR_TIM16_GLB
LL API cross LL_SYSCFG_IsActiveFlag_TIM16
reference:
LL_SYSCFG_IsActiveFlag_TIM17
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_TIM17
(void )
Function description Check if Timer 17 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE22 SR_TIM17_GLB
LL API cross LL_SYSCFG_IsActiveFlag_TIM17
reference:
LL_SYSCFG_IsActiveFlag_I2C1
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_I2C1
(void )
Function description Check if I2C1 interrupt occurred or not, combined with EXTI line
23.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE23 SR_I2C1_GLB
LL API cross LL_SYSCFG_IsActiveFlag_I2C1
reference:
LL_SYSCFG_IsActiveFlag_SPI1
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_SPI1
(void )
Function description Check if SPI1 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE25 SR_SPI1
LL API cross LL_SYSCFG_IsActiveFlag_SPI1
reference:
LL_SYSCFG_IsActiveFlag_SPI2
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_SPI2
(void )
Function description Check if SPI2 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE26 SR_SPI2
LL API cross LL_SYSCFG_IsActiveFlag_SPI2
reference:
LL_SYSCFG_IsActiveFlag_USART1
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_USART1 (void )
Function description Check if USART1 interrupt occurred or not, combined with EXTI
line 25.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE27 SR_USART1_GLB
LL API cross LL_SYSCFG_IsActiveFlag_USART1
reference:
LL_SYSCFG_IsActiveFlag_USART2
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_USART2 (void )
Function description Check if USART2 interrupt occurred or not, combined with EXTI
line 26.
LL_SYSCFG_IsActiveFlag_USART3
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_USART3 (void )
Function description Check if USART3 interrupt occurred or not, combined with EXTI
line 28.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE29 SR_USART3_GLB
LL API cross LL_SYSCFG_IsActiveFlag_USART3
reference:
LL_SYSCFG_IsActiveFlag_USART4
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_USART4 (void )
Function description Check if USART4 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE29 SR_USART4_GLB
LL API cross LL_SYSCFG_IsActiveFlag_USART4
reference:
LL_SYSCFG_IsActiveFlag_USART5
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_USART5 (void )
Function description Check if USART5 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE29 SR_USART5_GLB
LL API cross LL_SYSCFG_IsActiveFlag_USART5
reference:
LL_SYSCFG_IsActiveFlag_USART6
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_USART6 (void )
Function description Check if USART6 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE29 SR_USART6_GLB
LL API cross LL_SYSCFG_IsActiveFlag_USART6
reference:
LL_SYSCFG_IsActiveFlag_USART8
Function name __STATIC_INLINE uint32_t
LL_SYSCFG_IsActiveFlag_USART8 (void )
Function description Check if USART8 interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE29 SR_USART8_GLB
LL API cross LL_SYSCFG_IsActiveFlag_USART8
reference:
LL_SYSCFG_IsActiveFlag_CAN
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_CAN
(void )
Function description Check if CAN interrupt occurred or not.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE30 SR_CAN
LL API cross LL_SYSCFG_IsActiveFlag_CAN
reference:
LL_SYSCFG_IsActiveFlag_CEC
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_CEC
(void )
Function description Check if CEC interrupt occurred or not, combined with EXTI line
27.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_ITLINE30 SR_CEC
LL API cross LL_SYSCFG_IsActiveFlag_CEC
reference:
LL_SYSCFG_SetTIMBreakInputs
Function name __STATIC_INLINE void LL_SYSCFG_SetTIMBreakInputs
(uint32_t Break)
Function description Set connections to TIMx Break inputs.
Parameters Break: This parameter can be a combination of the following
values: (*) value not defined in all devices
LL_SYSCFG_GetTIMBreakInputs
Function name __STATIC_INLINE uint32_t LL_SYSCFG_GetTIMBreakInputs
(void )
Function description Get connections to TIMx Break inputs.
Return values Returned: value can be can be a combination of the
following values: (*) value not defined in all devices
LL_SYSCFG_TIMBREAK_PVD (*)
LL_SYSCFG_TIMBREAK_SRAM_PARITY
LL_SYSCFG_TIMBREAK_LOCKUP
Reference Manual to SYSCFG_CFGR2 LOCKUP_LOCK
LL API cross LL_SYSCFG_GetTIMBreakInputs
reference: SYSCFG_CFGR2 SRAM_PARITY_LOCK
LL_SYSCFG_GetTIMBreakInputs
SYSCFG_CFGR2 PVD_LOCK
LL_SYSCFG_GetTIMBreakInputs
LL_SYSCFG_IsActiveFlag_SP
Function name __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_SP
(void )
Function description Check if SRAM parity error detected.
Return values State: of bit (1 or 0).
Reference Manual to SYSCFG_CFGR2 SRAM_PEF
LL API cross LL_SYSCFG_IsActiveFlag_SP
reference:
LL_SYSCFG_ClearFlag_SP
Function name __STATIC_INLINE void LL_SYSCFG_ClearFlag_SP (void )
Function description Clear SRAM parity error flag.
Return values None
Reference Manual to SYSCFG_CFGR2 SRAM_PEF LL_SYSCFG_ClearFlag_SP
LL API cross
reference:
LL_DBGMCU_GetRevisionID
Function name __STATIC_INLINE uint32_t LL_DBGMCU_GetRevisionID (void
)
Function description Return the device revision identifier.
Return values Values: between Min_Data=0x00 and Max_Data=0xFFFF
Notes This field indicates the revision of the device. For example, it
is read as 0x1000 for Revision 1.0.
Reference Manual to DBGMCU_IDCODE REV_ID LL_DBGMCU_GetRevisionID
LL API cross
reference:
LL_DBGMCU_EnableDBGStopMode
Function name __STATIC_INLINE void LL_DBGMCU_EnableDBGStopMode
(void )
Function description Enable the Debug Module during STOP mode.
Return values None
Reference Manual to DBGMCU_CR DBG_STOP
LL API cross LL_DBGMCU_EnableDBGStopMode
reference:
LL_DBGMCU_DisableDBGStopMode
Function name __STATIC_INLINE void LL_DBGMCU_DisableDBGStopMode
(void )
Function description Disable the Debug Module during STOP mode.
Return values None
Reference Manual to DBGMCU_CR DBG_STOP
LL API cross LL_DBGMCU_DisableDBGStopMode
reference:
LL_DBGMCU_DisableDBGStandbyMode
Function name __STATIC_INLINE void
LL_DBGMCU_DisableDBGStandbyMode (void )
Function description Disable the Debug Module during STANDBY mode.
Return values None
Reference Manual to DBGMCU_CR DBG_STANDBY
LL API cross LL_DBGMCU_DisableDBGStandbyMode
reference:
LL_DBGMCU_APB1_GRP1_FreezePeriph
Function name __STATIC_INLINE void
LL_DBGMCU_APB1_GRP1_FreezePeriph (uint32_t Periphs)
Function description Freeze APB1 peripherals (group1 peripherals)
Parameters Periphs: This parameter can be a combination of the
following values: (*) value not defined in all devices
LL_DBGMCU_APB1_GRP1_TIM2_STOP (*)
LL_DBGMCU_APB1_GRP1_TIM3_STOP
LL_DBGMCU_APB1_GRP1_TIM6_STOP (*)
LL_DBGMCU_APB1_GRP1_TIM7_STOP (*)
LL_DBGMCU_APB1_GRP1_TIM14_STOP
LL_DBGMCU_APB1_GRP1_RTC_STOP
LL_DBGMCU_APB1_GRP1_WWDG_STOP
LL_DBGMCU_APB1_GRP1_IWDG_STOP
LL_DBGMCU_APB1_GRP1_I2C1_STOP
LL_DBGMCU_APB1_GRP1_CAN_STOP (*)
Return values None
Reference Manual to DBGMCU_APB1FZ DBG_TIM2_STOP
LL API cross LL_DBGMCU_APB1_GRP1_FreezePeriph
reference: DBGMCU_APB1FZ DBG_TIM3_STOP
LL_DBGMCU_APB1_GRP1_FreezePeriph
DBGMCU_APB1FZ DBG_TIM6_STOP
LL_DBGMCU_APB1_GRP1_FreezePeriph
DBGMCU_APB1FZ DBG_TIM7_STOP
LL_DBGMCU_APB1_GRP1_FreezePeriph
DBGMCU_APB1FZ DBG_TIM14_STOP
LL_DBGMCU_APB1_GRP1_FreezePeriph
DBGMCU_APB1FZ DBG_RTC_STOP
LL_DBGMCU_APB1_GRP1_UnFreezePeriph
Function name __STATIC_INLINE void
LL_DBGMCU_APB1_GRP1_UnFreezePeriph (uint32_t
Periphs)
Function description Unfreeze APB1 peripherals (group1 peripherals)
Parameters Periphs: This parameter can be a combination of the
following values: (*) value not defined in all devices
LL_DBGMCU_APB1_GRP1_TIM2_STOP (*)
LL_DBGMCU_APB1_GRP1_TIM3_STOP
LL_DBGMCU_APB1_GRP1_TIM6_STOP (*)
LL_DBGMCU_APB1_GRP1_TIM7_STOP (*)
LL_DBGMCU_APB1_GRP1_TIM14_STOP
LL_DBGMCU_APB1_GRP1_RTC_STOP
LL_DBGMCU_APB1_GRP1_WWDG_STOP
LL_DBGMCU_APB1_GRP1_IWDG_STOP
LL_DBGMCU_APB1_GRP1_I2C1_STOP
LL_DBGMCU_APB1_GRP1_CAN_STOP (*)
Return values None
Reference Manual to DBGMCU_APB1FZ DBG_TIM2_STOP
LL API cross LL_DBGMCU_APB1_GRP1_UnFreezePeriph
reference: DBGMCU_APB1FZ DBG_TIM3_STOP
LL_DBGMCU_APB1_GRP1_UnFreezePeriph
DBGMCU_APB1FZ DBG_TIM6_STOP
LL_DBGMCU_APB1_GRP1_UnFreezePeriph
DBGMCU_APB1FZ DBG_TIM7_STOP
LL_DBGMCU_APB1_GRP1_UnFreezePeriph
DBGMCU_APB1FZ DBG_TIM14_STOP
LL_DBGMCU_APB1_GRP1_UnFreezePeriph
DBGMCU_APB1FZ DBG_RTC_STOP
LL_DBGMCU_APB1_GRP1_UnFreezePeriph
DBGMCU_APB1FZ DBG_WWDG_STOP
LL_DBGMCU_APB1_GRP1_UnFreezePeriph
DBGMCU_APB1FZ DBG_IWDG_STOP
LL_DBGMCU_APB1_GRP1_UnFreezePeriph
DBGMCU_APB1FZ DBG_I2C1_SMBUS_TIMEOUT
LL_DBGMCU_APB1_GRP1_UnFreezePeriph
DBGMCU_APB1FZ DBG_CAN_STOP
LL_DBGMCU_APB1_GRP1_UnFreezePeriph
LL_DBGMCU_APB1_GRP2_UnFreezePeriph
Function name __STATIC_INLINE void
LL_DBGMCU_APB1_GRP2_UnFreezePeriph (uint32_t
Periphs)
Function description Unfreeze APB1 peripherals (group2 peripherals)
Parameters Periphs: This parameter can be a combination of the
following values: (*) value not defined in all devices
LL_DBGMCU_APB1_GRP2_TIM1_STOP
LL_DBGMCU_APB1_GRP2_TIM15_STOP (*)
LL_DBGMCU_APB1_GRP2_TIM16_STOP
LL_DBGMCU_APB1_GRP2_TIM17_STOP
Return values None
Reference Manual to DBGMCU_APB2FZ DBG_TIM1_STOP
LL API cross LL_DBGMCU_APB1_GRP2_UnFreezePeriph
reference: DBGMCU_APB2FZ DBG_TIM15_STOP
LL_DBGMCU_APB1_GRP2_UnFreezePeriph
DBGMCU_APB2FZ DBG_TIM16_STOP
LL_DBGMCU_APB1_GRP2_UnFreezePeriph
DBGMCU_APB2FZ DBG_TIM17_STOP
LL_DBGMCU_APB1_GRP2_UnFreezePeriph
LL_FLASH_SetLatency
Function name __STATIC_INLINE void LL_FLASH_SetLatency (uint32_t
Latency)
Function description Set FLASH Latency.
Parameters Latency: This parameter can be one of the following values:
LL_FLASH_GetLatency
Function name __STATIC_INLINE uint32_t LL_FLASH_GetLatency (void )
Function description Get FLASH Latency.
Return values Returned: value can be one of the following values:
LL_FLASH_LATENCY_0
LL_FLASH_LATENCY_1
Reference Manual to FLASH_ACR LATENCY LL_FLASH_GetLatency
LL API cross
reference:
LL_FLASH_EnablePrefetch
Function name __STATIC_INLINE void LL_FLASH_EnablePrefetch (void )
Function description Enable Prefetch.
Return values None
Reference Manual to FLASH_ACR PRFTBE LL_FLASH_EnablePrefetch
LL API cross
reference:
LL_FLASH_DisablePrefetch
Function name __STATIC_INLINE void LL_FLASH_DisablePrefetch (void )
Function description Disable Prefetch.
Return values None
Reference Manual to FLASH_ACR PRFTBE LL_FLASH_DisablePrefetch
LL API cross
reference:
LL_FLASH_IsPrefetchEnabled
Function name __STATIC_INLINE uint32_t LL_FLASH_IsPrefetchEnabled
(void )
Function description Check if Prefetch buffer is enabled.
Return values State: of bit (1 or 0).
Reference Manual to FLASH_ACR PRFTBS LL_FLASH_IsPrefetchEnabled
LL API cross
reference:
67.1.2 LL_TIM_OC_InitTypeDef
Data Fields
uint32_t OCMode
uint32_t OCState
uint32_t OCNState
uint32_t CompareValue
uint32_t OCPolarity
uint32_t OCNPolarity
uint32_t OCIdleState
uint32_t OCNIdleState
67.1.3 LL_TIM_IC_InitTypeDef
Data Fields
uint32_t ICPolarity
uint32_t ICActiveInput
uint32_t ICPrescaler
uint32_t ICFilter
Field Documentation
uint32_t LL_TIM_IC_InitTypeDef::ICPolarity
Specifies the active edge of the input signal. This parameter can be a value of
TIM_LL_EC_IC_POLARITY.This feature can be modified afterwards using unitary
function LL_TIM_IC_SetPolarity().
uint32_t LL_TIM_IC_InitTypeDef::ICActiveInput
Specifies the input. This parameter can be a value of
TIM_LL_EC_ACTIVEINPUT.This feature can be modified afterwards using unitary
function LL_TIM_IC_SetActiveInput().
uint32_t LL_TIM_IC_InitTypeDef::ICPrescaler
Specifies the Input Capture Prescaler. This parameter can be a value of
67.1.4 LL_TIM_ENCODER_InitTypeDef
Data Fields
uint32_t EncoderMode
uint32_t IC1Polarity
uint32_t IC1ActiveInput
uint32_t IC1Prescaler
uint32_t IC1Filter
uint32_t IC2Polarity
uint32_t IC2ActiveInput
uint32_t IC2Prescaler
uint32_t IC2Filter
Field Documentation
uint32_t LL_TIM_ENCODER_InitTypeDef::EncoderMode
Specifies the encoder resolution (x2 or x4). This parameter can be a value of
TIM_LL_EC_ENCODERMODE.This feature can be modified afterwards using unitary
function LL_TIM_SetEncoderMode().
uint32_t LL_TIM_ENCODER_InitTypeDef::IC1Polarity
Specifies the active edge of TI1 input. This parameter can be a value of
TIM_LL_EC_IC_POLARITY.This feature can be modified afterwards using unitary
function LL_TIM_IC_SetPolarity().
uint32_t LL_TIM_ENCODER_InitTypeDef::IC1ActiveInput
Specifies the TI1 input source This parameter can be a value of
TIM_LL_EC_ACTIVEINPUT.This feature can be modified afterwards using unitary
function LL_TIM_IC_SetActiveInput().
uint32_t LL_TIM_ENCODER_InitTypeDef::IC1Prescaler
Specifies the TI1 input prescaler value. This parameter can be a value of
TIM_LL_EC_ICPSC.This feature can be modified afterwards using unitary function
LL_TIM_IC_SetPrescaler().
uint32_t LL_TIM_ENCODER_InitTypeDef::IC1Filter
Specifies the TI1 input filter. This parameter can be a value of
TIM_LL_EC_IC_FILTER.This feature can be modified afterwards using unitary
function LL_TIM_IC_SetFilter().
uint32_t LL_TIM_ENCODER_InitTypeDef::IC2Polarity
Specifies the active edge of TI2 input. This parameter can be a value of
TIM_LL_EC_IC_POLARITY.This feature can be modified afterwards using unitary
function LL_TIM_IC_SetPolarity().
uint32_t LL_TIM_ENCODER_InitTypeDef::IC2ActiveInput
Specifies the TI2 input source This parameter can be a value of
TIM_LL_EC_ACTIVEINPUT.This feature can be modified afterwards using unitary
function LL_TIM_IC_SetActiveInput().
uint32_t LL_TIM_ENCODER_InitTypeDef::IC2Prescaler
Specifies the TI2 input prescaler value. This parameter can be a value of
TIM_LL_EC_ICPSC.This feature can be modified afterwards using unitary function
LL_TIM_IC_SetPrescaler().
67.1.5 LL_TIM_HALLSENSOR_InitTypeDef
Data Fields
uint32_t IC1Polarity
uint32_t IC1Prescaler
uint32_t IC1Filter
uint32_t CommutationDelay
Field Documentation
uint32_t LL_TIM_HALLSENSOR_InitTypeDef::IC1Polarity
Specifies the active edge of TI1 input. This parameter can be a value of
TIM_LL_EC_IC_POLARITY.This feature can be modified afterwards using unitary
function LL_TIM_IC_SetPolarity().
uint32_t LL_TIM_HALLSENSOR_InitTypeDef::IC1Prescaler
Specifies the TI1 input prescaler value. Prescaler must be set to get a maximum
counter period longer than the time interval between 2 consecutive changes on the
Hall inputs. This parameter can be a value of TIM_LL_EC_ICPSC.This feature can be
modified afterwards using unitary function LL_TIM_IC_SetPrescaler().
uint32_t LL_TIM_HALLSENSOR_InitTypeDef::IC1Filter
Specifies the TI1 input filter. This parameter can be a value of
TIM_LL_EC_IC_FILTER.This feature can be modified afterwards using unitary
function LL_TIM_IC_SetFilter().
uint32_t LL_TIM_HALLSENSOR_InitTypeDef::CommutationDelay
Specifies the compare value to be loaded into the Capture Compare Register. A
positive pulse (TRGO event) is generated with a programmable delay every time a
change occurs on the Hall inputs. This parameter can be a number between Min_Data
= 0x0000 and Max_Data = 0xFFFF.This feature can be modified afterwards using
unitary function LL_TIM_OC_SetCompareCH2().
67.1.6 LL_TIM_BDTR_InitTypeDef
Data Fields
uint32_t OSSRState
uint32_t OSSIState
uint32_t LockLevel
uint8_t DeadTime
uint16_t BreakState
uint32_t BreakPolarity
uint32_t AutomaticOutput
Field Documentation
uint32_t LL_TIM_BDTR_InitTypeDef::OSSRState
Specifies the Off-State selection used in Run mode. This parameter can be a value of
TIM_LL_EC_OSSRThis feature can be modified afterwards using unitary function
LL_TIM_SetOffStates()
Note:This bit-field cannot be modified as long as LOCK level 2 has been
programmed.
uint32_t LL_TIM_BDTR_InitTypeDef::OSSIState
Specifies the Off-State used in Idle state. This parameter can be a value of
LL_TIM_EnableCounter
Function name __STATIC_INLINE void LL_TIM_EnableCounter (TIM_TypeDef
* TIMx)
Function description Enable timer counter.
Parameters TIMx: Timer instance
Return values None
Reference Manual to CR1 CEN LL_TIM_EnableCounter
LL API cross
reference:
LL_TIM_IsEnabledCounter
Function name __STATIC_INLINE uint32_t LL_TIM_IsEnabledCounter
(TIM_TypeDef * TIMx)
Function description Indicates whether the timer counter is enabled.
Parameters TIMx: Timer instance
Return values State: of bit (1 or 0).
Reference Manual to CR1 CEN LL_TIM_IsEnabledCounter
LL API cross
reference:
LL_TIM_EnableUpdateEvent
Function name __STATIC_INLINE void LL_TIM_EnableUpdateEvent
(TIM_TypeDef * TIMx)
Function description Enable update event generation.
Parameters TIMx: Timer instance
Return values None
Reference Manual to CR1 UDIS LL_TIM_EnableUpdateEvent
LL API cross
reference:
LL_TIM_DisableUpdateEvent
Function name __STATIC_INLINE void LL_TIM_DisableUpdateEvent
(TIM_TypeDef * TIMx)
Function description Disable update event generation.
Parameters TIMx: Timer instance
Return values None
Reference Manual to CR1 UDIS LL_TIM_DisableUpdateEvent
LL API cross
reference:
LL_TIM_SetUpdateSource
Function name __STATIC_INLINE void LL_TIM_SetUpdateSource
(TIM_TypeDef * TIMx, uint32_t UpdateSource)
Function description Set update event source.
Parameters TIMx: Timer instance
UpdateSource: This parameter can be one of the following
values:
LL_TIM_UPDATESOURCE_REGULAR
LL_TIM_UPDATESOURCE_COUNTER
Return values None
Notes Update event source set to
LL_TIM_UPDATESOURCE_REGULAR: any of the following
events generate an update interrupt or DMA request if
enabled: Counter overflow/underflowSetting the UG bitUpdate
generation through the slave mode controller
Update event source set to
LL_TIM_UPDATESOURCE_COUNTER: only counter
overflow/underflow generates an update interrupt or DMA
request if enabled.
Reference Manual to CR1 URS LL_TIM_SetUpdateSource
LL API cross
reference:
LL_TIM_GetUpdateSource
Function name __STATIC_INLINE uint32_t LL_TIM_GetUpdateSource
(TIM_TypeDef * TIMx)
Function description Get actual event update source.
Parameters TIMx: Timer instance
Return values Returned: value can be one of the following values:
LL_TIM_UPDATESOURCE_REGULAR
LL_TIM_UPDATESOURCE_COUNTER
Reference Manual to CR1 URS LL_TIM_GetUpdateSource
LL API cross
reference:
LL_TIM_GetOnePulseMode
Function name __STATIC_INLINE uint32_t LL_TIM_GetOnePulseMode
(TIM_TypeDef * TIMx)
Function description Get actual one pulse mode.
Parameters TIMx: Timer instance
Return values Returned: value can be one of the following values:
LL_TIM_ONEPULSEMODE_SINGLE
LL_TIM_ONEPULSEMODE_REPETITIVE
Reference Manual to CR1 OPM LL_TIM_GetOnePulseMode
LL API cross
reference:
LL_TIM_SetCounterMode
Function name __STATIC_INLINE void LL_TIM_SetCounterMode
(TIM_TypeDef * TIMx, uint32_t CounterMode)
Function description Set the timer counter counting mode.
Parameters TIMx: Timer instance
CounterMode: This parameter can be one of the following
values:
LL_TIM_COUNTERMODE_UP
LL_TIM_COUNTERMODE_DOWN
LL_TIM_COUNTERMODE_CENTER_UP
LL_TIM_COUNTERMODE_CENTER_DOWN
LL_TIM_COUNTERMODE_CENTER_UP_DOWN
Return values None
Notes Macro
IS_TIM_COUNTER_MODE_SELECT_INSTANCE(TIMx) can
be used to check whether or not the counter mode selection
feature is supported by a timer instance.
Reference Manual to CR1 DIR LL_TIM_SetCounterMode
LL API cross
LL_TIM_GetCounterMode
Function name __STATIC_INLINE uint32_t LL_TIM_GetCounterMode
(TIM_TypeDef * TIMx)
Function description Get actual counter mode.
Parameters TIMx: Timer instance
Return values Returned: value can be one of the following values:
LL_TIM_COUNTERMODE_UP
LL_TIM_COUNTERMODE_DOWN
LL_TIM_COUNTERMODE_CENTER_UP
LL_TIM_COUNTERMODE_CENTER_DOWN
LL_TIM_COUNTERMODE_CENTER_UP_DOWN
Notes Macro
IS_TIM_COUNTER_MODE_SELECT_INSTANCE(TIMx) can
be used to check whether or not the counter mode selection
feature is supported by a timer instance.
Reference Manual to CR1 DIR LL_TIM_GetCounterMode
LL API cross CR1 CMS LL_TIM_GetCounterMode
reference:
LL_TIM_EnableARRPreload
Function name __STATIC_INLINE void LL_TIM_EnableARRPreload
(TIM_TypeDef * TIMx)
Function description Enable auto-reload (ARR) preload.
Parameters TIMx: Timer instance
Return values None
Reference Manual to CR1 ARPE LL_TIM_EnableARRPreload
LL API cross
reference:
LL_TIM_DisableARRPreload
Function name __STATIC_INLINE void LL_TIM_DisableARRPreload
(TIM_TypeDef * TIMx)
Function description Disable auto-reload (ARR) preload.
Parameters TIMx: Timer instance
Return values None
Reference Manual to CR1 ARPE LL_TIM_DisableARRPreload
LL API cross
reference:
LL_TIM_SetClockDivision
Function name __STATIC_INLINE void LL_TIM_SetClockDivision
(TIM_TypeDef * TIMx, uint32_t ClockDivision)
Function description Set the division ratio between the timer clock and the sampling
clock used by the dead-time generators (when supported) and the
digital filters.
Parameters TIMx: Timer instance
ClockDivision: This parameter can be one of the following
values:
LL_TIM_CLOCKDIVISION_DIV1
LL_TIM_CLOCKDIVISION_DIV2
LL_TIM_CLOCKDIVISION_DIV4
Return values None
Notes Macro IS_TIM_CLOCK_DIVISION_INSTANCE(TIMx) can be
used to check whether or not the clock division feature is
supported by the timer instance.
Reference Manual to CR1 CKD LL_TIM_SetClockDivision
LL API cross
reference:
LL_TIM_GetClockDivision
Function name __STATIC_INLINE uint32_t LL_TIM_GetClockDivision
(TIM_TypeDef * TIMx)
Function description Get the actual division ratio between the timer clock and the
sampling clock used by the dead-time generators (when
supported) and the digital filters.
Parameters TIMx: Timer instance
Return values Returned: value can be one of the following values:
LL_TIM_CLOCKDIVISION_DIV1
LL_TIM_CLOCKDIVISION_DIV2
LL_TIM_CLOCKDIVISION_DIV4
Notes Macro IS_TIM_CLOCK_DIVISION_INSTANCE(TIMx) can be
used to check whether or not the clock division feature is
supported by the timer instance.
LL_TIM_SetCounter
Function name __STATIC_INLINE void LL_TIM_SetCounter (TIM_TypeDef *
TIMx, uint32_t Counter)
Function description Set the counter value.
Parameters TIMx: Timer instance
Counter: Counter value (between Min_Data=0 and
Max_Data=0xFFFF or 0xFFFFFFFF)
Return values None
Notes Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be
used to check whether or not a timer instance supports a 32
bits counter.
Reference Manual to CNT CNT LL_TIM_SetCounter
LL API cross
reference:
LL_TIM_GetCounter
Function name __STATIC_INLINE uint32_t LL_TIM_GetCounter (TIM_TypeDef
* TIMx)
Function description Get the counter value.
Parameters TIMx: Timer instance
Return values Counter: value (between Min_Data=0 and
Max_Data=0xFFFF or 0xFFFFFFFF)
Notes Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be
used to check whether or not a timer instance supports a 32
bits counter.
Reference Manual to CNT CNT LL_TIM_GetCounter
LL API cross
reference:
LL_TIM_SetPrescaler
Function name __STATIC_INLINE void LL_TIM_SetPrescaler (TIM_TypeDef *
TIMx, uint32_t Prescaler)
Function description Set the prescaler value.
Parameters TIMx: Timer instance
Prescaler: between Min_Data=0 and Max_Data=65535
Return values None
Notes The counter clock frequency CK_CNT is equal to fCK_PSC /
(PSC[15:0] + 1).
The prescaler can be changed on the fly as this control
register is buffered. The new prescaler ratio is taken into
account at the next update event.
Helper macro __LL_TIM_CALC_PSC can be used to
calculate the Prescaler parameter
Reference Manual to PSC PSC LL_TIM_SetPrescaler
LL API cross
reference:
LL_TIM_GetPrescaler
Function name __STATIC_INLINE uint32_t LL_TIM_GetPrescaler
(TIM_TypeDef * TIMx)
Function description Get the prescaler value.
Parameters TIMx: Timer instance
Return values Prescaler: value between Min_Data=0 and
Max_Data=65535
Reference Manual to PSC PSC LL_TIM_GetPrescaler
LL API cross
reference:
LL_TIM_GetAutoReload
Function name __STATIC_INLINE uint32_t LL_TIM_GetAutoReload
(TIM_TypeDef * TIMx)
Function description Get the auto-reload value.
Parameters TIMx: Timer instance
Return values Auto-reload: value
Notes Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be
used to check whether or not a timer instance supports a 32
bits counter.
Reference Manual to ARR ARR LL_TIM_GetAutoReload
LL API cross
reference:
LL_TIM_GetRepetitionCounter
Function name __STATIC_INLINE uint32_t LL_TIM_GetRepetitionCounter
(TIM_TypeDef * TIMx)
Function description Get the repetition counter value.
Parameters TIMx: Timer instance
Return values Repetition: counter value
Notes Macro IS_TIM_REPETITION_COUNTER_INSTANCE(TIMx)
can be used to check whether or not a timer instance
supports a repetition counter.
Reference Manual to RCR REP LL_TIM_GetRepetitionCounter
LL API cross
reference:
LL_TIM_CC_DisablePreload
Function name __STATIC_INLINE void LL_TIM_CC_DisablePreload
(TIM_TypeDef * TIMx)
Function description Disable the capture/compare control bits (CCxE, CCxNE and
OCxM) preload.
Parameters TIMx: Timer instance
Return values None
Notes Macro IS_TIM_COMMUTATION_EVENT_INSTANCE(TIMx)
can be used to check whether or not a timer instance is able
to generate a commutation event.
Reference Manual to CR2 CCPC LL_TIM_CC_DisablePreload
LL API cross
reference:
LL_TIM_CC_SetUpdate
Function name __STATIC_INLINE void LL_TIM_CC_SetUpdate (TIM_TypeDef
* TIMx, uint32_t CCUpdateSource)
Function description Set the updated source of the capture/compare control bits (CCxE,
CCxNE and OCxM).
Parameters TIMx: Timer instance
CCUpdateSource: This parameter can be one of the
following values:
LL_TIM_CCUPDATESOURCE_COMG_ONLY
LL_TIM_CCUPDATESOURCE_COMG_AND_TRGI
Return values None
Notes Macro IS_TIM_COMMUTATION_EVENT_INSTANCE(TIMx)
LL_TIM_CC_SetDMAReqTrigger
Function name __STATIC_INLINE void LL_TIM_CC_SetDMAReqTrigger
(TIM_TypeDef * TIMx, uint32_t DMAReqTrigger)
Function description Set the trigger of the capture/compare DMA request.
Parameters TIMx: Timer instance
DMAReqTrigger: This parameter can be one of the following
values:
LL_TIM_CCDMAREQUEST_CC
LL_TIM_CCDMAREQUEST_UPDATE
Return values None
Reference Manual to CR2 CCDS LL_TIM_CC_SetDMAReqTrigger
LL API cross
reference:
LL_TIM_CC_GetDMAReqTrigger
Function name __STATIC_INLINE uint32_t LL_TIM_CC_GetDMAReqTrigger
(TIM_TypeDef * TIMx)
Function description Get actual trigger of the capture/compare DMA request.
Parameters TIMx: Timer instance
Return values Returned: value can be one of the following values:
LL_TIM_CCDMAREQUEST_CC
LL_TIM_CCDMAREQUEST_UPDATE
Reference Manual to CR2 CCDS LL_TIM_CC_GetDMAReqTrigger
LL API cross
reference:
LL_TIM_CC_SetLockLevel
Function name __STATIC_INLINE void LL_TIM_CC_SetLockLevel
(TIM_TypeDef * TIMx, uint32_t LockLevel)
Function description Set the lock level to freeze the configuration of several
capture/compare parameters.
Parameters TIMx: Timer instance
LockLevel: This parameter can be one of the following
values:
LL_TIM_LOCKLEVEL_OFF
LL_TIM_LOCKLEVEL_1
LL_TIM_LOCKLEVEL_2
LL_TIM_LOCKLEVEL_3
LL_TIM_CC_EnableChannel
Function name __STATIC_INLINE void LL_TIM_CC_EnableChannel
(TIM_TypeDef * TIMx, uint32_t Channels)
Function description Enable capture/compare channels.
Parameters TIMx: Timer instance
Channels: This parameter can be a combination of the
following values:
LL_TIM_CHANNEL_CH1
LL_TIM_CHANNEL_CH1N
LL_TIM_CHANNEL_CH2
LL_TIM_CHANNEL_CH2N
LL_TIM_CHANNEL_CH3
LL_TIM_CHANNEL_CH3N
LL_TIM_CHANNEL_CH4
Return values None
Reference Manual to CCER CC1E LL_TIM_CC_EnableChannel
LL API cross CCER CC1NE LL_TIM_CC_EnableChannel
reference: CCER CC2E LL_TIM_CC_EnableChannel
CCER CC2NE LL_TIM_CC_EnableChannel
CCER CC3E LL_TIM_CC_EnableChannel
CCER CC3NE LL_TIM_CC_EnableChannel
CCER CC4E LL_TIM_CC_EnableChannel
LL_TIM_CC_DisableChannel
Function name __STATIC_INLINE void LL_TIM_CC_DisableChannel
(TIM_TypeDef * TIMx, uint32_t Channels)
Function description Disable capture/compare channels.
Parameters TIMx: Timer instance
Channels: This parameter can be a combination of the
following values:
LL_TIM_CHANNEL_CH1
LL_TIM_CHANNEL_CH1N
LL_TIM_CHANNEL_CH2
LL_TIM_CHANNEL_CH2N
LL_TIM_CHANNEL_CH3
LL_TIM_CHANNEL_CH3N
LL_TIM_CHANNEL_CH4
Return values None
LL_TIM_CC_IsEnabledChannel
Function name __STATIC_INLINE uint32_t LL_TIM_CC_IsEnabledChannel
(TIM_TypeDef * TIMx, uint32_t Channels)
Function description Indicate whether channel(s) is(are) enabled.
Parameters TIMx: Timer instance
Channels: This parameter can be a combination of the
following values:
LL_TIM_CHANNEL_CH1
LL_TIM_CHANNEL_CH1N
LL_TIM_CHANNEL_CH2
LL_TIM_CHANNEL_CH2N
LL_TIM_CHANNEL_CH3
LL_TIM_CHANNEL_CH3N
LL_TIM_CHANNEL_CH4
Return values State: of bit (1 or 0).
Reference Manual to CCER CC1E LL_TIM_CC_IsEnabledChannel
LL API cross CCER CC1NE LL_TIM_CC_IsEnabledChannel
reference: CCER CC2E LL_TIM_CC_IsEnabledChannel
CCER CC2NE LL_TIM_CC_IsEnabledChannel
CCER CC3E LL_TIM_CC_IsEnabledChannel
CCER CC3NE LL_TIM_CC_IsEnabledChannel
CCER CC4E LL_TIM_CC_IsEnabledChannel
LL_TIM_OC_ConfigOutput
Function name __STATIC_INLINE void LL_TIM_OC_ConfigOutput
(TIM_TypeDef * TIMx, uint32_t Channel, uint32_t
Configuration)
Function description Configure an output channel.
Parameters TIMx: Timer instance
Channel: This parameter can be one of the following values:
LL_TIM_CHANNEL_CH1
LL_TIM_CHANNEL_CH2
LL_TIM_CHANNEL_CH3
LL_TIM_CHANNEL_CH4
Configuration: This parameter must be a combination of all
the following values:
LL_TIM_OCPOLARITY_HIGH or
LL_TIM_OCPOLARITY_LOW
LL_TIM_OCIDLESTATE_LOW or
LL_TIM_OC_SetMode
Function name __STATIC_INLINE void LL_TIM_OC_SetMode (TIM_TypeDef *
TIMx, uint32_t Channel, uint32_t Mode)
Function description Define the behavior of the output reference signal OCxREF from
which OCx and OCxN (when relevant) are derived.
Parameters TIMx: Timer instance
Channel: This parameter can be one of the following values:
LL_TIM_CHANNEL_CH1
LL_TIM_CHANNEL_CH2
LL_TIM_CHANNEL_CH3
LL_TIM_CHANNEL_CH4
Mode: This parameter can be one of the following values:
LL_TIM_OCMODE_FROZEN
LL_TIM_OCMODE_ACTIVE
LL_TIM_OCMODE_INACTIVE
LL_TIM_OCMODE_TOGGLE
LL_TIM_OCMODE_FORCED_INACTIVE
LL_TIM_OCMODE_FORCED_ACTIVE
LL_TIM_OCMODE_PWM1
LL_TIM_OCMODE_PWM2
Return values None
Reference Manual to CCMR1 OC1M LL_TIM_OC_SetMode
LL API cross CCMR1 OC2M LL_TIM_OC_SetMode
reference: CCMR2 OC3M LL_TIM_OC_SetMode
CCMR2 OC4M LL_TIM_OC_SetMode
LL_TIM_OC_GetMode
Function name __STATIC_INLINE uint32_t LL_TIM_OC_GetMode
(TIM_TypeDef * TIMx, uint32_t Channel)
Function description Get the output compare mode of an output channel.
Parameters TIMx: Timer instance
Channel: This parameter can be one of the following values:
LL_TIM_OC_SetPolarity
Function name __STATIC_INLINE void LL_TIM_OC_SetPolarity (TIM_TypeDef
* TIMx, uint32_t Channel, uint32_t Polarity)
Function description Set the polarity of an output channel.
Parameters TIMx: Timer instance
Channel: This parameter can be one of the following values:
LL_TIM_CHANNEL_CH1
LL_TIM_CHANNEL_CH1N
LL_TIM_CHANNEL_CH2
LL_TIM_CHANNEL_CH2N
LL_TIM_CHANNEL_CH3
LL_TIM_CHANNEL_CH3N
LL_TIM_CHANNEL_CH4
Polarity: This parameter can be one of the following values:
LL_TIM_OCPOLARITY_HIGH
LL_TIM_OCPOLARITY_LOW
Return values None
Reference Manual to CCER CC1P LL_TIM_OC_SetPolarity
LL API cross CCER CC1NP LL_TIM_OC_SetPolarity
reference: CCER CC2P LL_TIM_OC_SetPolarity
CCER CC2NP LL_TIM_OC_SetPolarity
CCER CC3P LL_TIM_OC_SetPolarity
CCER CC3NP LL_TIM_OC_SetPolarity
CCER CC4P LL_TIM_OC_SetPolarity
LL_TIM_OC_GetPolarity
Function name __STATIC_INLINE uint32_t LL_TIM_OC_GetPolarity
(TIM_TypeDef * TIMx, uint32_t Channel)
Function description Get the polarity of an output channel.
LL_TIM_OC_SetIdleState
Function name __STATIC_INLINE void LL_TIM_OC_SetIdleState
(TIM_TypeDef * TIMx, uint32_t Channel, uint32_t IdleState)
Function description Set the IDLE state of an output channel.
Parameters TIMx: Timer instance
Channel: This parameter can be one of the following values:
LL_TIM_CHANNEL_CH1
LL_TIM_CHANNEL_CH1N
LL_TIM_CHANNEL_CH2
LL_TIM_CHANNEL_CH2N
LL_TIM_CHANNEL_CH3
LL_TIM_CHANNEL_CH3N
LL_TIM_CHANNEL_CH4
IdleState: This parameter can be one of the following values:
LL_TIM_OCIDLESTATE_LOW
LL_TIM_OCIDLESTATE_HIGH
Return values None
Notes This function is significant only for the timer instances
supporting the break feature. Macro
IS_TIM_BREAK_INSTANCE(TIMx) can be used to check
whether or not a timer instance provides a break input.
Reference Manual to CR2 OIS1 LL_TIM_OC_SetIdleState
LL API cross CR2 OIS1N LL_TIM_OC_SetIdleState
reference: CR2 OIS2 LL_TIM_OC_SetIdleState
CR2 OIS2N LL_TIM_OC_SetIdleState
CR2 OIS3 LL_TIM_OC_SetIdleState
CR2 OIS3N LL_TIM_OC_SetIdleState
CR2 OIS4 LL_TIM_OC_SetIdleState
LL_TIM_OC_EnableFast
Function name __STATIC_INLINE void LL_TIM_OC_EnableFast (TIM_TypeDef
* TIMx, uint32_t Channel)
Function description Enable fast mode for the output channel.
Parameters TIMx: Timer instance
Channel: This parameter can be one of the following values:
LL_TIM_CHANNEL_CH1
LL_TIM_CHANNEL_CH2
LL_TIM_CHANNEL_CH3
LL_TIM_CHANNEL_CH4
Return values None
Notes Acts only if the channel is configured in PWM1 or PWM2
mode.
Reference Manual to CCMR1 OC1FE LL_TIM_OC_EnableFast
LL API cross CCMR1 OC2FE LL_TIM_OC_EnableFast
reference: CCMR2 OC3FE LL_TIM_OC_EnableFast
CCMR2 OC4FE LL_TIM_OC_EnableFast
LL_TIM_OC_IsEnabledFast
Function name __STATIC_INLINE uint32_t LL_TIM_OC_IsEnabledFast
(TIM_TypeDef * TIMx, uint32_t Channel)
Function description Indicates whether fast mode is enabled for the output channel.
Parameters TIMx: Timer instance
Channel: This parameter can be one of the following values:
LL_TIM_CHANNEL_CH1
LL_TIM_CHANNEL_CH2
LL_TIM_CHANNEL_CH3
LL_TIM_CHANNEL_CH4
Return values State: of bit (1 or 0).
Reference Manual to CCMR1 OC1FE LL_TIM_OC_IsEnabledFast
LL API cross CCMR1 OC2FE LL_TIM_OC_IsEnabledFast
reference: CCMR2 OC3FE LL_TIM_OC_IsEnabledFast
CCMR2 OC4FE LL_TIM_OC_IsEnabledFast
LL_TIM_OC_EnablePreload
Function name __STATIC_INLINE void LL_TIM_OC_EnablePreload
(TIM_TypeDef * TIMx, uint32_t Channel)
Function description Enable compare register (TIMx_CCRx) preload for the output
channel.
Parameters TIMx: Timer instance
Channel: This parameter can be one of the following values:
LL_TIM_CHANNEL_CH1
LL_TIM_CHANNEL_CH2
LL_TIM_CHANNEL_CH3
LL_TIM_CHANNEL_CH4
LL_TIM_OC_DisablePreload
Function name __STATIC_INLINE void LL_TIM_OC_DisablePreload
(TIM_TypeDef * TIMx, uint32_t Channel)
Function description Disable compare register (TIMx_CCRx) preload for the output
channel.
Parameters TIMx: Timer instance
Channel: This parameter can be one of the following values:
LL_TIM_CHANNEL_CH1
LL_TIM_CHANNEL_CH2
LL_TIM_CHANNEL_CH3
LL_TIM_CHANNEL_CH4
Return values None
Reference Manual to CCMR1 OC1PE LL_TIM_OC_DisablePreload
LL API cross CCMR1 OC2PE LL_TIM_OC_DisablePreload
reference: CCMR2 OC3PE LL_TIM_OC_DisablePreload
CCMR2 OC4PE LL_TIM_OC_DisablePreload
LL_TIM_OC_IsEnabledPreload
Function name __STATIC_INLINE uint32_t LL_TIM_OC_IsEnabledPreload
(TIM_TypeDef * TIMx, uint32_t Channel)
Function description Indicates whether compare register (TIMx_CCRx) preload is
enabled for the output channel.
Parameters TIMx: Timer instance
Channel: This parameter can be one of the following values:
LL_TIM_CHANNEL_CH1
LL_TIM_CHANNEL_CH2
LL_TIM_CHANNEL_CH3
LL_TIM_CHANNEL_CH4
Return values State: of bit (1 or 0).
Reference Manual to CCMR1 OC1PE LL_TIM_OC_IsEnabledPreload
LL API cross CCMR1 OC2PE LL_TIM_OC_IsEnabledPreload
reference: CCMR2 OC3PE LL_TIM_OC_IsEnabledPreload
CCMR2 OC4PE LL_TIM_OC_IsEnabledPreload
LL_TIM_OC_DisableClear
Function name __STATIC_INLINE void LL_TIM_OC_DisableClear
(TIM_TypeDef * TIMx, uint32_t Channel)
Function description Disable clearing the output channel on an external event.
Parameters TIMx: Timer instance
Channel: This parameter can be one of the following values:
LL_TIM_CHANNEL_CH1
LL_TIM_CHANNEL_CH2
LL_TIM_CHANNEL_CH3
LL_TIM_CHANNEL_CH4
Return values None
Notes Macro IS_TIM_OCXREF_CLEAR_INSTANCE(TIMx) can be
used to check whether or not a timer instance can clear the
OCxREF signal on an external event.
Reference Manual to CCMR1 OC1CE LL_TIM_OC_DisableClear
LL API cross CCMR1 OC2CE LL_TIM_OC_DisableClear
reference: CCMR2 OC3CE LL_TIM_OC_DisableClear
CCMR2 OC4CE LL_TIM_OC_DisableClear
LL_TIM_OC_IsEnabledClear
Function name __STATIC_INLINE uint32_t LL_TIM_OC_IsEnabledClear
(TIM_TypeDef * TIMx, uint32_t Channel)
Function description Indicates clearing the output channel on an external event is
enabled for the output channel.
LL_TIM_OC_SetDeadTime
Function name __STATIC_INLINE void LL_TIM_OC_SetDeadTime
(TIM_TypeDef * TIMx, uint32_t DeadTime)
Function description Set the dead-time delay (delay inserted between the rising edge of
the OCxREF signal and the rising edge if the Ocx and OCxN
signals).
Parameters TIMx: Timer instance
DeadTime: between Min_Data=0 and Max_Data=255
Return values None
Notes Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to
check whether or not dead-time insertion feature is supported
by a timer instance.
Helper macro __LL_TIM_CALC_DEADTIME can be used to
calculate the DeadTime parameter
Reference Manual to BDTR DTG LL_TIM_OC_SetDeadTime
LL API cross
reference:
LL_TIM_OC_SetCompareCH1
Function name __STATIC_INLINE void LL_TIM_OC_SetCompareCH1
(TIM_TypeDef * TIMx, uint32_t CompareValue)
Function description Set compare value for output channel 1 (TIMx_CCR1).
Parameters TIMx: Timer instance
CompareValue: between Min_Data=0 and
Max_Data=65535
LL_TIM_OC_SetCompareCH2
Function name __STATIC_INLINE void LL_TIM_OC_SetCompareCH2
(TIM_TypeDef * TIMx, uint32_t CompareValue)
Function description Set compare value for output channel 2 (TIMx_CCR2).
Parameters TIMx: Timer instance
CompareValue: between Min_Data=0 and
Max_Data=65535
Return values None
Notes In 32-bit timer implementations compare value can be
between 0x00000000 and 0xFFFFFFFF.
Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be
used to check whether or not a timer instance supports a 32
bits counter.
Macro IS_TIM_CC2_INSTANCE(TIMx) can be used to check
whether or not output channel 2 is supported by a timer
instance.
Reference Manual to CCR2 CCR2 LL_TIM_OC_SetCompareCH2
LL API cross
reference:
LL_TIM_OC_SetCompareCH3
Function name __STATIC_INLINE void LL_TIM_OC_SetCompareCH3
(TIM_TypeDef * TIMx, uint32_t CompareValue)
Function description Set compare value for output channel 3 (TIMx_CCR3).
Parameters TIMx: Timer instance
CompareValue: between Min_Data=0 and
Max_Data=65535
Return values None
Notes In 32-bit timer implementations compare value can be
between 0x00000000 and 0xFFFFFFFF.
Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be
used to check whether or not a timer instance supports a 32
bits counter.
LL_TIM_OC_SetCompareCH4
Function name __STATIC_INLINE void LL_TIM_OC_SetCompareCH4
(TIM_TypeDef * TIMx, uint32_t CompareValue)
Function description Set compare value for output channel 4 (TIMx_CCR4).
Parameters TIMx: Timer instance
CompareValue: between Min_Data=0 and
Max_Data=65535
Return values None
Notes In 32-bit timer implementations compare value can be
between 0x00000000 and 0xFFFFFFFF.
Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be
used to check whether or not a timer instance supports a 32
bits counter.
Macro IS_TIM_CC4_INSTANCE(TIMx) can be used to check
whether or not output channel 4 is supported by a timer
instance.
Reference Manual to CCR4 CCR4 LL_TIM_OC_SetCompareCH4
LL API cross
reference:
LL_TIM_OC_GetCompareCH1
Function name __STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH1
(TIM_TypeDef * TIMx)
Function description Get compare value (TIMx_CCR1) set for output channel 1.
Parameters TIMx: Timer instance
Return values CompareValue: (between Min_Data=0 and
Max_Data=65535)
Notes In 32-bit timer implementations returned compare value can
be between 0x00000000 and 0xFFFFFFFF.
Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be
used to check whether or not a timer instance supports a 32
bits counter.
Macro IS_TIM_CC1_INSTANCE(TIMx) can be used to check
whether or not output channel 1 is supported by a timer
instance.
Reference Manual to CCR1 CCR1 LL_TIM_OC_GetCompareCH1
LL API cross
reference:
LL_TIM_OC_GetCompareCH3
Function name __STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH3
(TIM_TypeDef * TIMx)
Function description Get compare value (TIMx_CCR3) set for output channel 3.
Parameters TIMx: Timer instance
Return values CompareValue: (between Min_Data=0 and
Max_Data=65535)
Notes In 32-bit timer implementations returned compare value can
be between 0x00000000 and 0xFFFFFFFF.
Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be
used to check whether or not a timer instance supports a 32
bits counter.
Macro IS_TIM_CC3_INSTANCE(TIMx) can be used to check
whether or not output channel 3 is supported by a timer
instance.
Reference Manual to CCR3 CCR3 LL_TIM_OC_GetCompareCH3
LL API cross
reference:
LL_TIM_OC_GetCompareCH4
Function name __STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH4
(TIM_TypeDef * TIMx)
Function description Get compare value (TIMx_CCR4) set for output channel 4.
Parameters TIMx: Timer instance
Return values CompareValue: (between Min_Data=0 and
Max_Data=65535)
LL_TIM_IC_Config
Function name __STATIC_INLINE void LL_TIM_IC_Config (TIM_TypeDef *
TIMx, uint32_t Channel, uint32_t Configuration)
Function description Configure input channel.
Parameters TIMx: Timer instance
Channel: This parameter can be one of the following values:
LL_TIM_CHANNEL_CH1
LL_TIM_CHANNEL_CH2
LL_TIM_CHANNEL_CH3
LL_TIM_CHANNEL_CH4
Configuration: This parameter must be a combination of all
the following values:
LL_TIM_ACTIVEINPUT_DIRECTTI or
LL_TIM_ACTIVEINPUT_INDIRECTTI or
LL_TIM_ACTIVEINPUT_TRC
LL_TIM_ICPSC_DIV1 or ... or LL_TIM_ICPSC_DIV8
LL_TIM_IC_FILTER_FDIV1 or ... or
LL_TIM_IC_FILTER_FDIV32_N8
LL_TIM_IC_POLARITY_RISING or
LL_TIM_IC_POLARITY_FALLING or
LL_TIM_IC_POLARITY_BOTHEDGE
Return values None
Reference Manual to CCMR1 CC1S LL_TIM_IC_Config
LL API cross CCMR1 IC1PSC LL_TIM_IC_Config
reference: CCMR1 IC1F LL_TIM_IC_Config
CCMR1 CC2S LL_TIM_IC_Config
CCMR1 IC2PSC LL_TIM_IC_Config
CCMR1 IC2F LL_TIM_IC_Config
CCMR2 CC3S LL_TIM_IC_Config
CCMR2 IC3PSC LL_TIM_IC_Config
CCMR2 IC3F LL_TIM_IC_Config
CCMR2 CC4S LL_TIM_IC_Config
CCMR2 IC4PSC LL_TIM_IC_Config
CCMR2 IC4F LL_TIM_IC_Config
CCER CC1P LL_TIM_IC_Config
CCER CC1NP LL_TIM_IC_Config
CCER CC2P LL_TIM_IC_Config
CCER CC2NP LL_TIM_IC_Config
LL_TIM_IC_SetActiveInput
Function name __STATIC_INLINE void LL_TIM_IC_SetActiveInput
(TIM_TypeDef * TIMx, uint32_t Channel, uint32_t
ICActiveInput)
Function description Set the active input.
Parameters TIMx: Timer instance
Channel: This parameter can be one of the following values:
LL_TIM_CHANNEL_CH1
LL_TIM_CHANNEL_CH2
LL_TIM_CHANNEL_CH3
LL_TIM_CHANNEL_CH4
ICActiveInput: This parameter can be one of the following
values:
LL_TIM_ACTIVEINPUT_DIRECTTI
LL_TIM_ACTIVEINPUT_INDIRECTTI
LL_TIM_ACTIVEINPUT_TRC
Return values None
Reference Manual to CCMR1 CC1S LL_TIM_IC_SetActiveInput
LL API cross CCMR1 CC2S LL_TIM_IC_SetActiveInput
reference: CCMR2 CC3S LL_TIM_IC_SetActiveInput
CCMR2 CC4S LL_TIM_IC_SetActiveInput
LL_TIM_IC_GetActiveInput
Function name __STATIC_INLINE uint32_t LL_TIM_IC_GetActiveInput
(TIM_TypeDef * TIMx, uint32_t Channel)
Function description Get the current active input.
Parameters TIMx: Timer instance
Channel: This parameter can be one of the following values:
LL_TIM_CHANNEL_CH1
LL_TIM_CHANNEL_CH2
LL_TIM_CHANNEL_CH3
LL_TIM_CHANNEL_CH4
Return values Returned: value can be one of the following values:
LL_TIM_ACTIVEINPUT_DIRECTTI
LL_TIM_ACTIVEINPUT_INDIRECTTI
LL_TIM_ACTIVEINPUT_TRC
Reference Manual to CCMR1 CC1S LL_TIM_IC_GetActiveInput
LL API cross CCMR1 CC2S LL_TIM_IC_GetActiveInput
reference: CCMR2 CC3S LL_TIM_IC_GetActiveInput
CCMR2 CC4S LL_TIM_IC_GetActiveInput
LL_TIM_IC_GetPrescaler
Function name __STATIC_INLINE uint32_t LL_TIM_IC_GetPrescaler
(TIM_TypeDef * TIMx, uint32_t Channel)
Function description Get the current prescaler value acting on an input channel.
Parameters TIMx: Timer instance
Channel: This parameter can be one of the following values:
LL_TIM_CHANNEL_CH1
LL_TIM_CHANNEL_CH2
LL_TIM_CHANNEL_CH3
LL_TIM_CHANNEL_CH4
Return values Returned: value can be one of the following values:
LL_TIM_ICPSC_DIV1
LL_TIM_ICPSC_DIV2
LL_TIM_ICPSC_DIV4
LL_TIM_ICPSC_DIV8
Reference Manual to CCMR1 IC1PSC LL_TIM_IC_GetPrescaler
LL API cross CCMR1 IC2PSC LL_TIM_IC_GetPrescaler
reference: CCMR2 IC3PSC LL_TIM_IC_GetPrescaler
CCMR2 IC4PSC LL_TIM_IC_GetPrescaler
LL_TIM_IC_SetFilter
Function name __STATIC_INLINE void LL_TIM_IC_SetFilter (TIM_TypeDef *
TIMx, uint32_t Channel, uint32_t ICFilter)
LL_TIM_IC_GetFilter
Function name __STATIC_INLINE uint32_t LL_TIM_IC_GetFilter (TIM_TypeDef
* TIMx, uint32_t Channel)
Function description Get the input filter duration.
Parameters TIMx: Timer instance
Channel: This parameter can be one of the following values:
LL_TIM_CHANNEL_CH1
LL_TIM_CHANNEL_CH2
LL_TIM_CHANNEL_CH3
LL_TIM_CHANNEL_CH4
Return values Returned: value can be one of the following values:
LL_TIM_IC_FILTER_FDIV1
LL_TIM_IC_FILTER_FDIV1_N2
LL_TIM_IC_FILTER_FDIV1_N4
LL_TIM_IC_FILTER_FDIV1_N8
LL_TIM_IC_FILTER_FDIV2_N6
LL_TIM_IC_FILTER_FDIV2_N8
LL_TIM_IC_FILTER_FDIV4_N6
LL_TIM_IC_FILTER_FDIV4_N8
LL_TIM_IC_SetPolarity
Function name __STATIC_INLINE void LL_TIM_IC_SetPolarity (TIM_TypeDef *
TIMx, uint32_t Channel, uint32_t ICPolarity)
Function description Set the input channel polarity.
Parameters TIMx: Timer instance
Channel: This parameter can be one of the following values:
LL_TIM_CHANNEL_CH1
LL_TIM_CHANNEL_CH2
LL_TIM_CHANNEL_CH3
LL_TIM_CHANNEL_CH4
ICPolarity: This parameter can be one of the following
values:
LL_TIM_IC_POLARITY_RISING
LL_TIM_IC_POLARITY_FALLING
LL_TIM_IC_POLARITY_BOTHEDGE
Return values None
Reference Manual to CCER CC1P LL_TIM_IC_SetPolarity
LL API cross CCER CC1NP LL_TIM_IC_SetPolarity
reference: CCER CC2P LL_TIM_IC_SetPolarity
CCER CC2NP LL_TIM_IC_SetPolarity
CCER CC3P LL_TIM_IC_SetPolarity
CCER CC3NP LL_TIM_IC_SetPolarity
CCER CC4P LL_TIM_IC_SetPolarity
CCER CC4NP LL_TIM_IC_SetPolarity
LL_TIM_IC_GetPolarity
Function name __STATIC_INLINE uint32_t LL_TIM_IC_GetPolarity
(TIM_TypeDef * TIMx, uint32_t Channel)
Function description Get the current input channel polarity.
Parameters TIMx: Timer instance
Channel: This parameter can be one of the following values:
LL_TIM_CHANNEL_CH1
LL_TIM_CHANNEL_CH2
LL_TIM_CHANNEL_CH3
LL_TIM_IC_EnableXORCombination
Function name __STATIC_INLINE void LL_TIM_IC_EnableXORCombination
(TIM_TypeDef * TIMx)
Function description Connect the TIMx_CH1, CH2 and CH3 pins to the TI1 input (XOR
combination).
Parameters TIMx: Timer instance
Return values None
Notes Macro IS_TIM_XOR_INSTANCE(TIMx) can be used to check
whether or not a timer instance provides an XOR input.
Reference Manual to CR2 TI1S LL_TIM_IC_EnableXORCombination
LL API cross
reference:
LL_TIM_IC_DisableXORCombination
Function name __STATIC_INLINE void LL_TIM_IC_DisableXORCombination
(TIM_TypeDef * TIMx)
Function description Disconnect the TIMx_CH1, CH2 and CH3 pins from the TI1 input.
Parameters TIMx: Timer instance
Return values None
Notes Macro IS_TIM_XOR_INSTANCE(TIMx) can be used to check
whether or not a timer instance provides an XOR input.
Reference Manual to CR2 TI1S LL_TIM_IC_DisableXORCombination
LL API cross
reference:
LL_TIM_IC_IsEnabledXORCombination
Function name __STATIC_INLINE uint32_t
LL_TIM_IC_IsEnabledXORCombination (TIM_TypeDef * TIMx)
Function description Indicates whether the TIMx_CH1, CH2 and CH3 pins are
LL_TIM_IC_GetCaptureCH1
Function name __STATIC_INLINE uint32_t LL_TIM_IC_GetCaptureCH1
(TIM_TypeDef * TIMx)
Function description Get captured value for input channel 1.
Parameters TIMx: Timer instance
Return values CapturedValue: (between Min_Data=0 and
Max_Data=65535)
Notes In 32-bit timer implementations returned captured value can
be between 0x00000000 and 0xFFFFFFFF.
Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be
used to check whether or not a timer instance supports a 32
bits counter.
Macro IS_TIM_CC1_INSTANCE(TIMx) can be used to check
whether or not input channel 1 is supported by a timer
instance.
Reference Manual to CCR1 CCR1 LL_TIM_IC_GetCaptureCH1
LL API cross
reference:
LL_TIM_IC_GetCaptureCH2
Function name __STATIC_INLINE uint32_t LL_TIM_IC_GetCaptureCH2
(TIM_TypeDef * TIMx)
Function description Get captured value for input channel 2.
Parameters TIMx: Timer instance
Return values CapturedValue: (between Min_Data=0 and
Max_Data=65535)
Notes In 32-bit timer implementations returned captured value can
be between 0x00000000 and 0xFFFFFFFF.
Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be
used to check whether or not a timer instance supports a 32
bits counter.
Macro IS_TIM_CC2_INSTANCE(TIMx) can be used to check
whether or not input channel 2 is supported by a timer
instance.
Reference Manual to CCR2 CCR2 LL_TIM_IC_GetCaptureCH2
LL API cross
LL_TIM_IC_GetCaptureCH3
Function name __STATIC_INLINE uint32_t LL_TIM_IC_GetCaptureCH3
(TIM_TypeDef * TIMx)
Function description Get captured value for input channel 3.
Parameters TIMx: Timer instance
Return values CapturedValue: (between Min_Data=0 and
Max_Data=65535)
Notes In 32-bit timer implementations returned captured value can
be between 0x00000000 and 0xFFFFFFFF.
Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be
used to check whether or not a timer instance supports a 32
bits counter.
Macro IS_TIM_CC3_INSTANCE(TIMx) can be used to check
whether or not input channel 3 is supported by a timer
instance.
Reference Manual to CCR3 CCR3 LL_TIM_IC_GetCaptureCH3
LL API cross
reference:
LL_TIM_IC_GetCaptureCH4
Function name __STATIC_INLINE uint32_t LL_TIM_IC_GetCaptureCH4
(TIM_TypeDef * TIMx)
Function description Get captured value for input channel 4.
Parameters TIMx: Timer instance
Return values CapturedValue: (between Min_Data=0 and
Max_Data=65535)
Notes In 32-bit timer implementations returned captured value can
be between 0x00000000 and 0xFFFFFFFF.
Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be
used to check whether or not a timer instance supports a 32
bits counter.
Macro IS_TIM_CC4_INSTANCE(TIMx) can be used to check
whether or not input channel 4 is supported by a timer
instance.
Reference Manual to CCR4 CCR4 LL_TIM_IC_GetCaptureCH4
LL API cross
reference:
LL_TIM_EnableExternalClock
Function name __STATIC_INLINE void LL_TIM_EnableExternalClock
(TIM_TypeDef * TIMx)
Function description Enable external clock mode 2.
Parameters TIMx: Timer instance
LL_TIM_DisableExternalClock
Function name __STATIC_INLINE void LL_TIM_DisableExternalClock
(TIM_TypeDef * TIMx)
Function description Disable external clock mode 2.
Parameters TIMx: Timer instance
Return values None
Notes Macro
IS_TIM_CLOCKSOURCE_ETRMODE2_INSTANCE(TIMx)
can be used to check whether or not a timer instance
supports external clock mode2.
Reference Manual to SMCR ECE LL_TIM_DisableExternalClock
LL API cross
reference:
LL_TIM_IsEnabledExternalClock
Function name __STATIC_INLINE uint32_t LL_TIM_IsEnabledExternalClock
(TIM_TypeDef * TIMx)
Function description Indicate whether external clock mode 2 is enabled.
Parameters TIMx: Timer instance
Return values State: of bit (1 or 0).
Notes Macro
IS_TIM_CLOCKSOURCE_ETRMODE2_INSTANCE(TIMx)
can be used to check whether or not a timer instance
supports external clock mode2.
Reference Manual to SMCR ECE LL_TIM_IsEnabledExternalClock
LL API cross
reference:
LL_TIM_SetClockSource
Function name __STATIC_INLINE void LL_TIM_SetClockSource
(TIM_TypeDef * TIMx, uint32_t ClockSource)
Function description Set the clock source of the counter clock.
Parameters TIMx: Timer instance
LL_TIM_SetEncoderMode
Function name __STATIC_INLINE void LL_TIM_SetEncoderMode
(TIM_TypeDef * TIMx, uint32_t EncoderMode)
Function description Set the encoder interface mode.
Parameters TIMx: Timer instance
EncoderMode: This parameter can be one of the following
values:
LL_TIM_ENCODERMODE_X2_TI1
LL_TIM_ENCODERMODE_X2_TI2
LL_TIM_ENCODERMODE_X4_TI12
Return values None
Notes Macro IS_TIM_ENCODER_INTERFACE_INSTANCE(TIMx)
can be used to check whether or not a timer instance
supports the encoder mode.
Reference Manual to SMCR SMS LL_TIM_SetEncoderMode
LL API cross
reference:
LL_TIM_SetTriggerOutput
Function name __STATIC_INLINE void LL_TIM_SetTriggerOutput
(TIM_TypeDef * TIMx, uint32_t TimerSynchronization)
Function description Set the trigger output (TRGO) used for timer synchronization .
Parameters TIMx: Timer instance
TimerSynchronization: This parameter can be one of the
following values:
LL_TIM_SetSlaveMode
Function name __STATIC_INLINE void LL_TIM_SetSlaveMode (TIM_TypeDef *
TIMx, uint32_t SlaveMode)
Function description Set the synchronization mode of a slave timer.
Parameters TIMx: Timer instance
SlaveMode: This parameter can be one of the following
values:
LL_TIM_SLAVEMODE_DISABLED
LL_TIM_SLAVEMODE_RESET
LL_TIM_SLAVEMODE_GATED
LL_TIM_SLAVEMODE_TRIGGER
Return values None
Notes Macro IS_TIM_SLAVE_INSTANCE(TIMx) can be used to
check whether or not a timer instance can operate as a slave
timer.
Reference Manual to SMCR SMS LL_TIM_SetSlaveMode
LL API cross
reference:
LL_TIM_SetTriggerInput
Function name __STATIC_INLINE void LL_TIM_SetTriggerInput (TIM_TypeDef
* TIMx, uint32_t TriggerInput)
Function description Set the selects the trigger input to be used to synchronize the
counter.
Parameters TIMx: Timer instance
TriggerInput: This parameter can be one of the following
values:
LL_TIM_TS_ITR0
LL_TIM_TS_ITR1
LL_TIM_TS_ITR2
LL_TIM_EnableMasterSlaveMode
Function name __STATIC_INLINE void LL_TIM_EnableMasterSlaveMode
(TIM_TypeDef * TIMx)
Function description Enable the Master/Slave mode.
Parameters TIMx: Timer instance
Return values None
Notes Macro IS_TIM_SLAVE_INSTANCE(TIMx) can be used to
check whether or not a timer instance can operate as a slave
timer.
Reference Manual to SMCR MSM LL_TIM_EnableMasterSlaveMode
LL API cross
reference:
LL_TIM_DisableMasterSlaveMode
Function name __STATIC_INLINE void LL_TIM_DisableMasterSlaveMode
(TIM_TypeDef * TIMx)
Function description Disable the Master/Slave mode.
Parameters TIMx: Timer instance
Return values None
Notes Macro IS_TIM_SLAVE_INSTANCE(TIMx) can be used to
check whether or not a timer instance can operate as a slave
timer.
Reference Manual to SMCR MSM LL_TIM_DisableMasterSlaveMode
LL API cross
reference:
LL_TIM_IsEnabledMasterSlaveMode
Function name __STATIC_INLINE uint32_t
LL_TIM_IsEnabledMasterSlaveMode (TIM_TypeDef * TIMx)
Function description Indicates whether the Master/Slave mode is enabled.
LL_TIM_ConfigETR
Function name __STATIC_INLINE void LL_TIM_ConfigETR (TIM_TypeDef *
TIMx, uint32_t ETRPolarity, uint32_t ETRPrescaler, uint32_t
ETRFilter)
Function description Configure the external trigger (ETR) input.
Parameters TIMx: Timer instance
ETRPolarity: This parameter can be one of the following
values:
LL_TIM_ETR_POLARITY_NONINVERTED
LL_TIM_ETR_POLARITY_INVERTED
ETRPrescaler: This parameter can be one of the following
values:
LL_TIM_ETR_PRESCALER_DIV1
LL_TIM_ETR_PRESCALER_DIV2
LL_TIM_ETR_PRESCALER_DIV4
LL_TIM_ETR_PRESCALER_DIV8
ETRFilter: This parameter can be one of the following
values:
LL_TIM_ETR_FILTER_FDIV1
LL_TIM_ETR_FILTER_FDIV1_N2
LL_TIM_ETR_FILTER_FDIV1_N4
LL_TIM_ETR_FILTER_FDIV1_N8
LL_TIM_ETR_FILTER_FDIV2_N6
LL_TIM_ETR_FILTER_FDIV2_N8
LL_TIM_ETR_FILTER_FDIV4_N6
LL_TIM_ETR_FILTER_FDIV4_N8
LL_TIM_ETR_FILTER_FDIV8_N6
LL_TIM_ETR_FILTER_FDIV8_N8
LL_TIM_ETR_FILTER_FDIV16_N5
LL_TIM_ETR_FILTER_FDIV16_N6
LL_TIM_ETR_FILTER_FDIV16_N8
LL_TIM_ETR_FILTER_FDIV32_N5
LL_TIM_ETR_FILTER_FDIV32_N6
LL_TIM_ETR_FILTER_FDIV32_N8
Return values None
Notes Macro IS_TIM_ETR_INSTANCE(TIMx) can be used to check
whether or not a timer instance provides an external trigger
input.
Reference Manual to SMCR ETP LL_TIM_ConfigETR
LL_TIM_EnableBRK
Function name __STATIC_INLINE void LL_TIM_EnableBRK (TIM_TypeDef *
TIMx)
Function description Enable the break function.
Parameters TIMx: Timer instance
Return values None
Notes Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to
check whether or not a timer instance provides a break input.
Reference Manual to BDTR BKE LL_TIM_EnableBRK
LL API cross
reference:
LL_TIM_DisableBRK
Function name __STATIC_INLINE void LL_TIM_DisableBRK (TIM_TypeDef *
TIMx)
Function description Disable the break function.
Parameters TIMx: Timer instance
Return values None
Notes Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to
check whether or not a timer instance provides a break input.
Reference Manual to BDTR BKE LL_TIM_DisableBRK
LL API cross
reference:
LL_TIM_ConfigBRK
Function name __STATIC_INLINE void LL_TIM_ConfigBRK (TIM_TypeDef *
TIMx, uint32_t BreakPolarity)
Function description Configure the break input.
Parameters TIMx: Timer instance
BreakPolarity: This parameter can be one of the following
values:
LL_TIM_BREAK_POLARITY_LOW
LL_TIM_BREAK_POLARITY_HIGH
Return values None
Notes Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to
check whether or not a timer instance provides a break input.
Reference Manual to BDTR BKP LL_TIM_ConfigBRK
LL API cross
reference:
LL_TIM_EnableAutomaticOutput
Function name __STATIC_INLINE void LL_TIM_EnableAutomaticOutput
(TIM_TypeDef * TIMx)
Function description Enable automatic output (MOE can be set by software or
automatically when a break input is active).
Parameters TIMx: Timer instance
Return values None
Notes Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to
check whether or not a timer instance provides a break input.
Reference Manual to BDTR AOE LL_TIM_EnableAutomaticOutput
LL API cross
reference:
LL_TIM_IsEnabledAutomaticOutput
Function name __STATIC_INLINE uint32_t
LL_TIM_IsEnabledAutomaticOutput (TIM_TypeDef * TIMx)
Function description Indicate whether automatic output is enabled.
Parameters TIMx: Timer instance
Return values State: of bit (1 or 0).
Notes Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to
check whether or not a timer instance provides a break input.
Reference Manual to BDTR AOE LL_TIM_IsEnabledAutomaticOutput
LL API cross
reference:
LL_TIM_EnableAllOutputs
Function name __STATIC_INLINE void LL_TIM_EnableAllOutputs
(TIM_TypeDef * TIMx)
Function description Enable the outputs (set the MOE bit in TIMx_BDTR register).
Parameters TIMx: Timer instance
Return values None
Notes The MOE bit in TIMx_BDTR register allows to enable /disable
the outputs by software and is reset in case of break or
break2 event
Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to
check whether or not a timer instance provides a break input.
Reference Manual to BDTR MOE LL_TIM_EnableAllOutputs
LL API cross
reference:
LL_TIM_DisableAllOutputs
Function name __STATIC_INLINE void LL_TIM_DisableAllOutputs
(TIM_TypeDef * TIMx)
LL_TIM_IsEnabledAllOutputs
Function name __STATIC_INLINE uint32_t LL_TIM_IsEnabledAllOutputs
(TIM_TypeDef * TIMx)
Function description Indicates whether outputs are enabled.
Parameters TIMx: Timer instance
Return values State: of bit (1 or 0).
Notes Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to
check whether or not a timer instance provides a break input.
Reference Manual to BDTR MOE LL_TIM_IsEnabledAllOutputs
LL API cross
reference:
LL_TIM_ConfigDMABurst
Function name __STATIC_INLINE void LL_TIM_ConfigDMABurst
(TIM_TypeDef * TIMx, uint32_t DMABurstBaseAddress,
uint32_t DMABurstLength)
Function description Configures the timer DMA burst feature.
Parameters TIMx: Timer instance
DMABurstBaseAddress: This parameter can be one of the
following values:
LL_TIM_DMABURST_BASEADDR_CR1
LL_TIM_DMABURST_BASEADDR_CR2
LL_TIM_DMABURST_BASEADDR_SMCR
LL_TIM_DMABURST_BASEADDR_DIER
LL_TIM_DMABURST_BASEADDR_SR
LL_TIM_DMABURST_BASEADDR_EGR
LL_TIM_DMABURST_BASEADDR_CCMR1
LL_TIM_DMABURST_BASEADDR_CCMR2
LL_TIM_DMABURST_BASEADDR_CCER
LL_TIM_DMABURST_BASEADDR_CNT
LL_TIM_DMABURST_BASEADDR_PSC
LL_TIM_DMABURST_BASEADDR_ARR
LL_TIM_DMABURST_BASEADDR_RCR
LL_TIM_DMABURST_BASEADDR_CCR1
LL_TIM_SetRemap
Function name __STATIC_INLINE void LL_TIM_SetRemap (TIM_TypeDef *
TIMx, uint32_t Remap)
Function description Remap TIM inputs (input channel, internal/external triggers).
Parameters TIMx: Timer instance
Remap: This parameter can be one of the following values:
LL_TIM_TIM14_TI1_RMP_GPIO
LL_TIM_TIM14_TI1_RMP_RTC_CLK
LL_TIM_TIM14_TI1_RMP_HSE
LL_TIM_TIM14_TI1_RMP_MCO
Return values None
Notes Macro IS_TIM_REMAP_INSTANCE(TIMx) can be used to
check whether or not a some timer inputs can be remapped.
Reference Manual to TIM14_OR TI1_RMP LL_TIM_SetRemap
LL API cross
reference:
LL_TIM_ClearFlag_UPDATE
Function name __STATIC_INLINE void LL_TIM_ClearFlag_UPDATE
(TIM_TypeDef * TIMx)
Function description Clear the update interrupt flag (UIF).
Parameters TIMx: Timer instance
Return values None
Reference Manual to SR UIF LL_TIM_ClearFlag_UPDATE
LL API cross
reference:
LL_TIM_IsActiveFlag_UPDATE
Function name __STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_UPDATE
(TIM_TypeDef * TIMx)
Function description Indicate whether update interrupt flag (UIF) is set (update interrupt
is pending).
Parameters TIMx: Timer instance
Return values State: of bit (1 or 0).
Reference Manual to SR UIF LL_TIM_IsActiveFlag_UPDATE
LL API cross
reference:
LL_TIM_ClearFlag_CC1
Function name __STATIC_INLINE void LL_TIM_ClearFlag_CC1 (TIM_TypeDef
* TIMx)
Function description Clear the Capture/Compare 1 interrupt flag (CC1F).
LL_TIM_IsActiveFlag_CC1
Function name __STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC1
(TIM_TypeDef * TIMx)
Function description Indicate whether Capture/Compare 1 interrupt flag (CC1F) is set
(Capture/Compare 1 interrupt is pending).
Parameters TIMx: Timer instance
Return values State: of bit (1 or 0).
Reference Manual to SR CC1IF LL_TIM_IsActiveFlag_CC1
LL API cross
reference:
LL_TIM_ClearFlag_CC2
Function name __STATIC_INLINE void LL_TIM_ClearFlag_CC2 (TIM_TypeDef
* TIMx)
Function description Clear the Capture/Compare 2 interrupt flag (CC2F).
Parameters TIMx: Timer instance
Return values None
Reference Manual to SR CC2IF LL_TIM_ClearFlag_CC2
LL API cross
reference:
LL_TIM_IsActiveFlag_CC2
Function name __STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC2
(TIM_TypeDef * TIMx)
Function description Indicate whether Capture/Compare 2 interrupt flag (CC2F) is set
(Capture/Compare 2 interrupt is pending).
Parameters TIMx: Timer instance
Return values State: of bit (1 or 0).
Reference Manual to SR CC2IF LL_TIM_IsActiveFlag_CC2
LL API cross
reference:
LL_TIM_ClearFlag_CC3
Function name __STATIC_INLINE void LL_TIM_ClearFlag_CC3 (TIM_TypeDef
* TIMx)
Function description Clear the Capture/Compare 3 interrupt flag (CC3F).
LL_TIM_IsActiveFlag_CC3
Function name __STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC3
(TIM_TypeDef * TIMx)
Function description Indicate whether Capture/Compare 3 interrupt flag (CC3F) is set
(Capture/Compare 3 interrupt is pending).
Parameters TIMx: Timer instance
Return values State: of bit (1 or 0).
Reference Manual to SR CC3IF LL_TIM_IsActiveFlag_CC3
LL API cross
reference:
LL_TIM_ClearFlag_CC4
Function name __STATIC_INLINE void LL_TIM_ClearFlag_CC4 (TIM_TypeDef
* TIMx)
Function description Clear the Capture/Compare 4 interrupt flag (CC4F).
Parameters TIMx: Timer instance
Return values None
Reference Manual to SR CC4IF LL_TIM_ClearFlag_CC4
LL API cross
reference:
LL_TIM_IsActiveFlag_CC4
Function name __STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC4
(TIM_TypeDef * TIMx)
Function description Indicate whether Capture/Compare 4 interrupt flag (CC4F) is set
(Capture/Compare 4 interrupt is pending).
Parameters TIMx: Timer instance
Return values State: of bit (1 or 0).
Reference Manual to SR CC4IF LL_TIM_IsActiveFlag_CC4
LL API cross
reference:
LL_TIM_ClearFlag_COM
Function name __STATIC_INLINE void LL_TIM_ClearFlag_COM (TIM_TypeDef
* TIMx)
Function description Clear the commutation interrupt flag (COMIF).
LL_TIM_IsActiveFlag_COM
Function name __STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_COM
(TIM_TypeDef * TIMx)
Function description Indicate whether commutation interrupt flag (COMIF) is set
(commutation interrupt is pending).
Parameters TIMx: Timer instance
Return values State: of bit (1 or 0).
Reference Manual to SR COMIF LL_TIM_IsActiveFlag_COM
LL API cross
reference:
LL_TIM_ClearFlag_TRIG
Function name __STATIC_INLINE void LL_TIM_ClearFlag_TRIG (TIM_TypeDef
* TIMx)
Function description Clear the trigger interrupt flag (TIF).
Parameters TIMx: Timer instance
Return values None
Reference Manual to SR TIF LL_TIM_ClearFlag_TRIG
LL API cross
reference:
LL_TIM_IsActiveFlag_TRIG
Function name __STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_TRIG
(TIM_TypeDef * TIMx)
Function description Indicate whether trigger interrupt flag (TIF) is set (trigger interrupt
is pending).
Parameters TIMx: Timer instance
Return values State: of bit (1 or 0).
Reference Manual to SR TIF LL_TIM_IsActiveFlag_TRIG
LL API cross
reference:
LL_TIM_ClearFlag_BRK
Function name __STATIC_INLINE void LL_TIM_ClearFlag_BRK (TIM_TypeDef
* TIMx)
Function description Clear the break interrupt flag (BIF).
LL_TIM_IsActiveFlag_BRK
Function name __STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_BRK
(TIM_TypeDef * TIMx)
Function description Indicate whether break interrupt flag (BIF) is set (break interrupt is
pending).
Parameters TIMx: Timer instance
Return values State: of bit (1 or 0).
Reference Manual to SR BIF LL_TIM_IsActiveFlag_BRK
LL API cross
reference:
LL_TIM_ClearFlag_CC1OVR
Function name __STATIC_INLINE void LL_TIM_ClearFlag_CC1OVR
(TIM_TypeDef * TIMx)
Function description Clear the Capture/Compare 1 over-capture interrupt flag (CC1OF).
Parameters TIMx: Timer instance
Return values None
Reference Manual to SR CC1OF LL_TIM_ClearFlag_CC1OVR
LL API cross
reference:
LL_TIM_IsActiveFlag_CC1OVR
Function name __STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC1OVR
(TIM_TypeDef * TIMx)
Function description Indicate whether Capture/Compare 1 over-capture interrupt flag
(CC1OF) is set (Capture/Compare 1 interrupt is pending).
Parameters TIMx: Timer instance
Return values State: of bit (1 or 0).
Reference Manual to SR CC1OF LL_TIM_IsActiveFlag_CC1OVR
LL API cross
reference:
LL_TIM_ClearFlag_CC2OVR
Function name __STATIC_INLINE void LL_TIM_ClearFlag_CC2OVR
(TIM_TypeDef * TIMx)
Function description Clear the Capture/Compare 2 over-capture interrupt flag (CC2OF).
LL_TIM_IsActiveFlag_CC2OVR
Function name __STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC2OVR
(TIM_TypeDef * TIMx)
Function description Indicate whether Capture/Compare 2 over-capture interrupt flag
(CC2OF) is set (Capture/Compare 2 over-capture interrupt is
pending).
Parameters TIMx: Timer instance
Return values State: of bit (1 or 0).
Reference Manual to SR CC2OF LL_TIM_IsActiveFlag_CC2OVR
LL API cross
reference:
LL_TIM_ClearFlag_CC3OVR
Function name __STATIC_INLINE void LL_TIM_ClearFlag_CC3OVR
(TIM_TypeDef * TIMx)
Function description Clear the Capture/Compare 3 over-capture interrupt flag (CC3OF).
Parameters TIMx: Timer instance
Return values None
Reference Manual to SR CC3OF LL_TIM_ClearFlag_CC3OVR
LL API cross
reference:
LL_TIM_IsActiveFlag_CC3OVR
Function name __STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC3OVR
(TIM_TypeDef * TIMx)
Function description Indicate whether Capture/Compare 3 over-capture interrupt flag
(CC3OF) is set (Capture/Compare 3 over-capture interrupt is
pending).
Parameters TIMx: Timer instance
Return values State: of bit (1 or 0).
Reference Manual to SR CC3OF LL_TIM_IsActiveFlag_CC3OVR
LL API cross
reference:
LL_TIM_IsActiveFlag_CC4OVR
Function name __STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC4OVR
(TIM_TypeDef * TIMx)
Function description Indicate whether Capture/Compare 4 over-capture interrupt flag
(CC4OF) is set (Capture/Compare 4 over-capture interrupt is
pending).
Parameters TIMx: Timer instance
Return values State: of bit (1 or 0).
Reference Manual to SR CC4OF LL_TIM_IsActiveFlag_CC4OVR
LL API cross
reference:
LL_TIM_EnableIT_UPDATE
Function name __STATIC_INLINE void LL_TIM_EnableIT_UPDATE
(TIM_TypeDef * TIMx)
Function description Enable update interrupt (UIE).
Parameters TIMx: Timer instance
Return values None
Reference Manual to DIER UIE LL_TIM_EnableIT_UPDATE
LL API cross
reference:
LL_TIM_DisableIT_UPDATE
Function name __STATIC_INLINE void LL_TIM_DisableIT_UPDATE
(TIM_TypeDef * TIMx)
Function description Disable update interrupt (UIE).
Parameters TIMx: Timer instance
Return values None
Reference Manual to DIER UIE LL_TIM_DisableIT_UPDATE
LL API cross
reference:
LL_TIM_EnableIT_CC1
Function name __STATIC_INLINE void LL_TIM_EnableIT_CC1 (TIM_TypeDef *
TIMx)
Function description Enable capture/compare 1 interrupt (CC1IE).
Parameters TIMx: Timer instance
Return values None
Reference Manual to DIER CC1IE LL_TIM_EnableIT_CC1
LL API cross
reference:
LL_TIM_DisableIT_CC1
Function name __STATIC_INLINE void LL_TIM_DisableIT_CC1 (TIM_TypeDef
* TIMx)
Function description Disable capture/compare 1 interrupt (CC1IE).
Parameters TIMx: Timer instance
Return values None
Reference Manual to DIER CC1IE LL_TIM_DisableIT_CC1
LL API cross
reference:
LL_TIM_IsEnabledIT_CC1
Function name __STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_CC1
(TIM_TypeDef * TIMx)
Function description Indicates whether the capture/compare 1 interrupt (CC1IE) is
enabled.
Parameters TIMx: Timer instance
Return values State: of bit (1 or 0).
Reference Manual to DIER CC1IE LL_TIM_IsEnabledIT_CC1
LL API cross
reference:
LL_TIM_DisableIT_CC2
Function name __STATIC_INLINE void LL_TIM_DisableIT_CC2 (TIM_TypeDef
* TIMx)
Function description Disable capture/compare 2 interrupt (CC2IE).
Parameters TIMx: Timer instance
Return values None
Reference Manual to DIER CC2IE LL_TIM_DisableIT_CC2
LL API cross
reference:
LL_TIM_IsEnabledIT_CC2
Function name __STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_CC2
(TIM_TypeDef * TIMx)
Function description Indicates whether the capture/compare 2 interrupt (CC2IE) is
enabled.
Parameters TIMx: Timer instance
Return values State: of bit (1 or 0).
Reference Manual to DIER CC2IE LL_TIM_IsEnabledIT_CC2
LL API cross
reference:
LL_TIM_EnableIT_CC3
Function name __STATIC_INLINE void LL_TIM_EnableIT_CC3 (TIM_TypeDef *
TIMx)
Function description Enable capture/compare 3 interrupt (CC3IE).
Parameters TIMx: Timer instance
Return values None
Reference Manual to DIER CC3IE LL_TIM_EnableIT_CC3
LL API cross
reference:
LL_TIM_IsEnabledIT_CC3
Function name __STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_CC3
(TIM_TypeDef * TIMx)
Function description Indicates whether the capture/compare 3 interrupt (CC3IE) is
enabled.
Parameters TIMx: Timer instance
Return values State: of bit (1 or 0).
Reference Manual to DIER CC3IE LL_TIM_IsEnabledIT_CC3
LL API cross
reference:
LL_TIM_EnableIT_CC4
Function name __STATIC_INLINE void LL_TIM_EnableIT_CC4 (TIM_TypeDef *
TIMx)
Function description Enable capture/compare 4 interrupt (CC4IE).
Parameters TIMx: Timer instance
Return values None
Reference Manual to DIER CC4IE LL_TIM_EnableIT_CC4
LL API cross
reference:
LL_TIM_DisableIT_CC4
Function name __STATIC_INLINE void LL_TIM_DisableIT_CC4 (TIM_TypeDef
* TIMx)
Function description Disable capture/compare 4 interrupt (CC4IE).
Parameters TIMx: Timer instance
Return values None
Reference Manual to DIER CC4IE LL_TIM_DisableIT_CC4
LL API cross
reference:
LL_TIM_EnableIT_COM
Function name __STATIC_INLINE void LL_TIM_EnableIT_COM (TIM_TypeDef
* TIMx)
Function description Enable commutation interrupt (COMIE).
Parameters TIMx: Timer instance
Return values None
Reference Manual to DIER COMIE LL_TIM_EnableIT_COM
LL API cross
reference:
LL_TIM_DisableIT_COM
Function name __STATIC_INLINE void LL_TIM_DisableIT_COM (TIM_TypeDef
* TIMx)
Function description Disable commutation interrupt (COMIE).
Parameters TIMx: Timer instance
Return values None
Reference Manual to DIER COMIE LL_TIM_DisableIT_COM
LL API cross
reference:
LL_TIM_IsEnabledIT_COM
Function name __STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_COM
(TIM_TypeDef * TIMx)
Function description Indicates whether the commutation interrupt (COMIE) is enabled.
Parameters TIMx: Timer instance
Return values State: of bit (1 or 0).
Reference Manual to DIER COMIE LL_TIM_IsEnabledIT_COM
LL API cross
reference:
LL_TIM_DisableIT_TRIG
Function name __STATIC_INLINE void LL_TIM_DisableIT_TRIG (TIM_TypeDef
* TIMx)
Function description Disable trigger interrupt (TIE).
Parameters TIMx: Timer instance
Return values None
Reference Manual to DIER TIE LL_TIM_DisableIT_TRIG
LL API cross
reference:
LL_TIM_IsEnabledIT_TRIG
Function name __STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_TRIG
(TIM_TypeDef * TIMx)
Function description Indicates whether the trigger interrupt (TIE) is enabled.
Parameters TIMx: Timer instance
Return values State: of bit (1 or 0).
Reference Manual to DIER TIE LL_TIM_IsEnabledIT_TRIG
LL API cross
reference:
LL_TIM_EnableIT_BRK
Function name __STATIC_INLINE void LL_TIM_EnableIT_BRK (TIM_TypeDef *
TIMx)
Function description Enable break interrupt (BIE).
Parameters TIMx: Timer instance
Return values None
Reference Manual to DIER BIE LL_TIM_EnableIT_BRK
LL API cross
reference:
LL_TIM_IsEnabledIT_BRK
Function name __STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_BRK
(TIM_TypeDef * TIMx)
Function description Indicates whether the break interrupt (BIE) is enabled.
Parameters TIMx: Timer instance
Return values State: of bit (1 or 0).
Reference Manual to DIER BIE LL_TIM_IsEnabledIT_BRK
LL API cross
reference:
LL_TIM_EnableDMAReq_UPDATE
Function name __STATIC_INLINE void LL_TIM_EnableDMAReq_UPDATE
(TIM_TypeDef * TIMx)
Function description Enable update DMA request (UDE).
Parameters TIMx: Timer instance
Return values None
Reference Manual to DIER UDE LL_TIM_EnableDMAReq_UPDATE
LL API cross
reference:
LL_TIM_DisableDMAReq_UPDATE
Function name __STATIC_INLINE void LL_TIM_DisableDMAReq_UPDATE
(TIM_TypeDef * TIMx)
Function description Disable update DMA request (UDE).
Parameters TIMx: Timer instance
Return values None
Reference Manual to DIER UDE LL_TIM_DisableDMAReq_UPDATE
LL API cross
reference:
LL_TIM_EnableDMAReq_CC1
Function name __STATIC_INLINE void LL_TIM_EnableDMAReq_CC1
(TIM_TypeDef * TIMx)
Function description Enable capture/compare 1 DMA request (CC1DE).
Parameters TIMx: Timer instance
Return values None
Reference Manual to DIER CC1DE LL_TIM_EnableDMAReq_CC1
LL API cross
reference:
LL_TIM_DisableDMAReq_CC1
Function name __STATIC_INLINE void LL_TIM_DisableDMAReq_CC1
(TIM_TypeDef * TIMx)
Function description Disable capture/compare 1 DMA request (CC1DE).
Parameters TIMx: Timer instance
Return values None
Reference Manual to DIER CC1DE LL_TIM_DisableDMAReq_CC1
LL API cross
reference:
LL_TIM_IsEnabledDMAReq_CC1
Function name __STATIC_INLINE uint32_t LL_TIM_IsEnabledDMAReq_CC1
(TIM_TypeDef * TIMx)
Function description Indicates whether the capture/compare 1 DMA request (CC1DE) is
enabled.
Parameters TIMx: Timer instance
Return values State: of bit (1 or 0).
Reference Manual to DIER CC1DE LL_TIM_IsEnabledDMAReq_CC1
LL API cross
reference:
LL_TIM_DisableDMAReq_CC2
Function name __STATIC_INLINE void LL_TIM_DisableDMAReq_CC2
(TIM_TypeDef * TIMx)
Function description Disable capture/compare 2 DMA request (CC2DE).
Parameters TIMx: Timer instance
Return values None
Reference Manual to DIER CC2DE LL_TIM_DisableDMAReq_CC2
LL API cross
reference:
LL_TIM_IsEnabledDMAReq_CC2
Function name __STATIC_INLINE uint32_t LL_TIM_IsEnabledDMAReq_CC2
(TIM_TypeDef * TIMx)
Function description Indicates whether the capture/compare 2 DMA request (CC2DE) is
enabled.
Parameters TIMx: Timer instance
Return values State: of bit (1 or 0).
Reference Manual to DIER CC2DE LL_TIM_IsEnabledDMAReq_CC2
LL API cross
reference:
LL_TIM_EnableDMAReq_CC3
Function name __STATIC_INLINE void LL_TIM_EnableDMAReq_CC3
(TIM_TypeDef * TIMx)
Function description Enable capture/compare 3 DMA request (CC3DE).
Parameters TIMx: Timer instance
Return values None
Reference Manual to DIER CC3DE LL_TIM_EnableDMAReq_CC3
LL API cross
reference:
LL_TIM_IsEnabledDMAReq_CC3
Function name __STATIC_INLINE uint32_t LL_TIM_IsEnabledDMAReq_CC3
(TIM_TypeDef * TIMx)
Function description Indicates whether the capture/compare 3 DMA request (CC3DE) is
enabled.
Parameters TIMx: Timer instance
Return values State: of bit (1 or 0).
Reference Manual to DIER CC3DE LL_TIM_IsEnabledDMAReq_CC3
LL API cross
reference:
LL_TIM_EnableDMAReq_CC4
Function name __STATIC_INLINE void LL_TIM_EnableDMAReq_CC4
(TIM_TypeDef * TIMx)
Function description Enable capture/compare 4 DMA request (CC4DE).
Parameters TIMx: Timer instance
Return values None
Reference Manual to DIER CC4DE LL_TIM_EnableDMAReq_CC4
LL API cross
reference:
LL_TIM_DisableDMAReq_CC4
Function name __STATIC_INLINE void LL_TIM_DisableDMAReq_CC4
(TIM_TypeDef * TIMx)
Function description Disable capture/compare 4 DMA request (CC4DE).
Parameters TIMx: Timer instance
Return values None
Reference Manual to DIER CC4DE LL_TIM_DisableDMAReq_CC4
LL API cross
reference:
LL_TIM_EnableDMAReq_COM
Function name __STATIC_INLINE void LL_TIM_EnableDMAReq_COM
(TIM_TypeDef * TIMx)
Function description Enable commutation DMA request (COMDE).
Parameters TIMx: Timer instance
Return values None
Reference Manual to DIER COMDE LL_TIM_EnableDMAReq_COM
LL API cross
reference:
LL_TIM_DisableDMAReq_COM
Function name __STATIC_INLINE void LL_TIM_DisableDMAReq_COM
(TIM_TypeDef * TIMx)
Function description Disable commutation DMA request (COMDE).
Parameters TIMx: Timer instance
Return values None
Reference Manual to DIER COMDE LL_TIM_DisableDMAReq_COM
LL API cross
reference:
LL_TIM_IsEnabledDMAReq_COM
Function name __STATIC_INLINE uint32_t LL_TIM_IsEnabledDMAReq_COM
(TIM_TypeDef * TIMx)
Function description Indicates whether the commutation DMA request (COMDE) is
enabled.
Parameters TIMx: Timer instance
Return values State: of bit (1 or 0).
Reference Manual to DIER COMDE LL_TIM_IsEnabledDMAReq_COM
LL API cross
reference:
LL_TIM_DisableDMAReq_TRIG
Function name __STATIC_INLINE void LL_TIM_DisableDMAReq_TRIG
(TIM_TypeDef * TIMx)
Function description Disable trigger interrupt (TDE).
Parameters TIMx: Timer instance
Return values None
Reference Manual to DIER TDE LL_TIM_DisableDMAReq_TRIG
LL API cross
reference:
LL_TIM_IsEnabledDMAReq_TRIG
Function name __STATIC_INLINE uint32_t LL_TIM_IsEnabledDMAReq_TRIG
(TIM_TypeDef * TIMx)
Function description Indicates whether the trigger interrupt (TDE) is enabled.
Parameters TIMx: Timer instance
Return values State: of bit (1 or 0).
Reference Manual to DIER TDE LL_TIM_IsEnabledDMAReq_TRIG
LL API cross
reference:
LL_TIM_GenerateEvent_UPDATE
Function name __STATIC_INLINE void LL_TIM_GenerateEvent_UPDATE
(TIM_TypeDef * TIMx)
Function description Generate an update event.
Parameters TIMx: Timer instance
Return values None
Reference Manual to EGR UG LL_TIM_GenerateEvent_UPDATE
LL API cross
reference:
LL_TIM_GenerateEvent_CC2
Function name __STATIC_INLINE void LL_TIM_GenerateEvent_CC2
(TIM_TypeDef * TIMx)
Function description Generate Capture/Compare 2 event.
Parameters TIMx: Timer instance
Return values None
Reference Manual to EGR CC2G LL_TIM_GenerateEvent_CC2
LL API cross
reference:
LL_TIM_GenerateEvent_CC3
Function name __STATIC_INLINE void LL_TIM_GenerateEvent_CC3
(TIM_TypeDef * TIMx)
Function description Generate Capture/Compare 3 event.
Parameters TIMx: Timer instance
Return values None
Reference Manual to EGR CC3G LL_TIM_GenerateEvent_CC3
LL API cross
reference:
LL_TIM_GenerateEvent_CC4
Function name __STATIC_INLINE void LL_TIM_GenerateEvent_CC4
(TIM_TypeDef * TIMx)
Function description Generate Capture/Compare 4 event.
Parameters TIMx: Timer instance
Return values None
Reference Manual to EGR CC4G LL_TIM_GenerateEvent_CC4
LL API cross
reference:
LL_TIM_GenerateEvent_TRIG
Function name __STATIC_INLINE void LL_TIM_GenerateEvent_TRIG
(TIM_TypeDef * TIMx)
Function description Generate trigger event.
Parameters TIMx: Timer instance
Return values None
Reference Manual to EGR TG LL_TIM_GenerateEvent_TRIG
LL API cross
reference:
LL_TIM_GenerateEvent_BRK
Function name __STATIC_INLINE void LL_TIM_GenerateEvent_BRK
(TIM_TypeDef * TIMx)
Function description Generate break event.
Parameters TIMx: Timer instance
Return values None
Reference Manual to EGR BG LL_TIM_GenerateEvent_BRK
LL API cross
reference:
LL_TIM_DeInit
Function name ErrorStatus LL_TIM_DeInit (TIM_TypeDef * TIMx)
Function description Set TIMx registers to their reset values.
Parameters TIMx: Timer instance
Return values An: ErrorStatus enumeration value:
SUCCESS: TIMx registers are de-initialized
ERROR: invalid TIMx instance
LL_TIM_StructInit
Function name void LL_TIM_StructInit (LL_TIM_InitTypeDef * TIM_InitStruct)
Function description Set the fields of the time base unit configuration data structure to
LL_TIM_Init
Function name ErrorStatus LL_TIM_Init (TIM_TypeDef * TIMx,
LL_TIM_InitTypeDef * TIM_InitStruct)
Function description Configure the TIMx time base unit.
Parameters TIMx: Timer Instance
TIM_InitStruct: pointer to a LL_TIM_InitTypeDef structure
(TIMx time base unit configuration data structure)
Return values An: ErrorStatus enumeration value:
SUCCESS: TIMx registers are de-initialized
ERROR: not applicable
LL_TIM_OC_StructInit
Function name void LL_TIM_OC_StructInit (LL_TIM_OC_InitTypeDef *
TIM_OC_InitStruct)
Function description Set the fields of the TIMx output channel configuration data
structure to their default values.
Parameters TIM_OC_InitStruct: pointer to a LL_TIM_OC_InitTypeDef
structure (the output channel configuration data structure)
Return values None
LL_TIM_OC_Init
Function name ErrorStatus LL_TIM_OC_Init (TIM_TypeDef * TIMx, uint32_t
Channel, LL_TIM_OC_InitTypeDef * TIM_OC_InitStruct)
Function description Configure the TIMx output channel.
Parameters TIMx: Timer Instance
Channel: This parameter can be one of the following values:
LL_TIM_CHANNEL_CH1
LL_TIM_CHANNEL_CH2
LL_TIM_CHANNEL_CH3
LL_TIM_CHANNEL_CH4
TIM_OC_InitStruct: pointer to a LL_TIM_OC_InitTypeDef
structure (TIMx output channel configuration data structure)
Return values An: ErrorStatus enumeration value:
SUCCESS: TIMx output channel is initialized
ERROR: TIMx output channel is not initialized
LL_TIM_IC_Init
Function name ErrorStatus LL_TIM_IC_Init (TIM_TypeDef * TIMx, uint32_t
Channel, LL_TIM_IC_InitTypeDef * TIM_IC_InitStruct)
Function description Configure the TIMx input channel.
Parameters TIMx: Timer Instance
Channel: This parameter can be one of the following values:
LL_TIM_CHANNEL_CH1
LL_TIM_CHANNEL_CH2
LL_TIM_CHANNEL_CH3
LL_TIM_CHANNEL_CH4
TIM_IC_InitStruct: pointer to a LL_TIM_IC_InitTypeDef
structure (TIMx input channel configuration data structure)
Return values An: ErrorStatus enumeration value:
SUCCESS: TIMx output channel is initialized
ERROR: TIMx output channel is not initialized
LL_TIM_ENCODER_StructInit
Function name void LL_TIM_ENCODER_StructInit
(LL_TIM_ENCODER_InitTypeDef * TIM_EncoderInitStruct)
Function description Fills each TIM_EncoderInitStruct field with its default value.
Parameters TIM_EncoderInitStruct: pointer to a
LL_TIM_ENCODER_InitTypeDef structure (encoder interface
configuration data structure)
Return values None
LL_TIM_ENCODER_Init
Function name ErrorStatus LL_TIM_ENCODER_Init (TIM_TypeDef * TIMx,
LL_TIM_ENCODER_InitTypeDef * TIM_EncoderInitStruct)
Function description Configure the encoder interface of the timer instance.
Parameters TIMx: Timer Instance
TIM_EncoderInitStruct: pointer to a
LL_TIM_ENCODER_InitTypeDef structure (TIMx encoder
interface configuration data structure)
Return values An: ErrorStatus enumeration value:
SUCCESS: TIMx registers are de-initialized
LL_TIM_HALLSENSOR_StructInit
Function name void LL_TIM_HALLSENSOR_StructInit
(LL_TIM_HALLSENSOR_InitTypeDef *
TIM_HallSensorInitStruct)
Function description Set the fields of the TIMx Hall sensor interface configuration data
structure to their default values.
Parameters TIM_HallSensorInitStruct: pointer to a
LL_TIM_HALLSENSOR_InitTypeDef structure (HALL sensor
interface configuration data structure)
Return values None
LL_TIM_HALLSENSOR_Init
Function name ErrorStatus LL_TIM_HALLSENSOR_Init (TIM_TypeDef * TIMx,
LL_TIM_HALLSENSOR_InitTypeDef *
TIM_HallSensorInitStruct)
Function description Configure the Hall sensor interface of the timer instance.
Parameters TIMx: Timer Instance
TIM_HallSensorInitStruct: pointer to a
LL_TIM_HALLSENSOR_InitTypeDef structure (TIMx HALL
sensor interface configuration data structure)
Return values An: ErrorStatus enumeration value:
SUCCESS: TIMx registers are de-initialized
ERROR: not applicable
Notes TIMx CH1, CH2 and CH3 inputs connected through a XOR to
the TI1 input channel
TIMx slave mode controller is configured in reset mode.
Selected internal trigger is TI1F_ED.
Channel 1 is configured as input, IC1 is mapped on TRC.
Captured value stored in TIMx_CCR1 correspond to the time
elapsed between 2 changes on the inputs. It gives information
about motor speed.
Channel 2 is configured in output PWM 2 mode.
Compare value stored in TIMx_CCR2 corresponds to the
commutation delay.
OC2REF is selected as trigger output on TRGO.
LL_TIM_IC_POLARITY_BOTHEDGE must not be used for
TI1 when it is used when TIMx operates in Hall sensor
interface mode.
LL_TIM_BDTR_StructInit
Function name void LL_TIM_BDTR_StructInit (LL_TIM_BDTR_InitTypeDef *
TIM_BDTRInitStruct)
Function description Set the fields of the Break and Dead Time configuration data
structure to their default values.
LL_TIM_BDTR_Init
Function name ErrorStatus LL_TIM_BDTR_Init (TIM_TypeDef * TIMx,
LL_TIM_BDTR_InitTypeDef * TIM_BDTRInitStruct)
Function description Configure the Break and Dead Time feature of the timer instance.
Parameters TIMx: Timer Instance
TIM_BDTRInitStruct: pointer to a
LL_TIM_BDTR_InitTypeDef structure(Break and Dead Time
configuration data structure)
Return values An: ErrorStatus enumeration value:
SUCCESS: Break and Dead Time is initialized
ERROR: not applicable
Notes As the bits AOE, BKP, BKE, OSSR, OSSI and DTG[7:0] can
be write-locked depending on the LOCK configuration, it can
be necessary to configure all of them during the first write
access to the TIMx_BDTR register.
Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to
check whether or not a timer instance provides a break input.
68.1.2 LL_USART_ClockInitTypeDef
Data Fields
uint32_t ClockOutput
uint32_t ClockPolarity
uint32_t ClockPhase
uint32_t LastBitClockPulse
LL_USART_Enable
Function name __STATIC_INLINE void LL_USART_Enable (USART_TypeDef *
USARTx)
Function description USART Enable.
Parameters USARTx: USART Instance
Return values None
Reference Manual to CR1 UE LL_USART_Enable
LL API cross
reference:
LL_USART_Disable
Function name __STATIC_INLINE void LL_USART_Disable (USART_TypeDef
* USARTx)
Function description USART Disable (all USART prescalers and outputs are disabled)
Parameters USARTx: USART Instance
Return values None
Notes When USART is disabled, USART prescalers and outputs are
stopped immediately, and current operations are discarded.
The configuration of the USART is kept, but all the status
LL_USART_IsEnabled
Function name __STATIC_INLINE uint32_t LL_USART_IsEnabled
(USART_TypeDef * USARTx)
Function description Indicate if USART is enabled.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Reference Manual to CR1 UE LL_USART_IsEnabled
LL API cross
reference:
LL_USART_EnableInStopMode
Function name __STATIC_INLINE void LL_USART_EnableInStopMode
(USART_TypeDef * USARTx)
Function description USART enabled in STOP Mode.
Parameters USARTx: USART Instance
Return values None
Notes When this function is enabled, USART is able to wake up the
MCU from Stop mode, provided that USART clock selection is
HSI or LSE in RCC.
Macro
IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can
be used to check whether or not Wake-up from Stop mode
feature is supported by the USARTx instance.
Reference Manual to CR1 UESM LL_USART_EnableInStopMode
LL API cross
reference:
LL_USART_DisableInStopMode
Function name __STATIC_INLINE void LL_USART_DisableInStopMode
(USART_TypeDef * USARTx)
Function description USART disabled in STOP Mode.
Parameters USARTx: USART Instance
Return values None
Notes When this function is disabled, USART is not able to wake up
the MCU from Stop mode
Macro
IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can
be used to check whether or not Wake-up from Stop mode
feature is supported by the USARTx instance.
LL_USART_IsEnabledInStopMode
Function name __STATIC_INLINE uint32_t LL_USART_IsEnabledInStopMode
(USART_TypeDef * USARTx)
Function description Indicate if USART is enabled in STOP Mode (able to wake up
MCU from Stop mode or not)
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Notes Macro
IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can
be used to check whether or not Wake-up from Stop mode
feature is supported by the USARTx instance.
Reference Manual to CR1 UESM LL_USART_IsEnabledInStopMode
LL API cross
reference:
LL_USART_EnableDirectionRx
Function name __STATIC_INLINE void LL_USART_EnableDirectionRx
(USART_TypeDef * USARTx)
Function description Receiver Enable (Receiver is enabled and begins searching for a
start bit)
Parameters USARTx: USART Instance
Return values None
Reference Manual to CR1 RE LL_USART_EnableDirectionRx
LL API cross
reference:
LL_USART_DisableDirectionRx
Function name __STATIC_INLINE void LL_USART_DisableDirectionRx
(USART_TypeDef * USARTx)
Function description Receiver Disable.
Parameters USARTx: USART Instance
Return values None
Reference Manual to CR1 RE LL_USART_DisableDirectionRx
LL API cross
reference:
LL_USART_EnableDirectionTx
Function name __STATIC_INLINE void LL_USART_EnableDirectionTx
(USART_TypeDef * USARTx)
LL_USART_DisableDirectionTx
Function name __STATIC_INLINE void LL_USART_DisableDirectionTx
(USART_TypeDef * USARTx)
Function description Transmitter Disable.
Parameters USARTx: USART Instance
Return values None
Reference Manual to CR1 TE LL_USART_DisableDirectionTx
LL API cross
reference:
LL_USART_SetTransferDirection
Function name __STATIC_INLINE void LL_USART_SetTransferDirection
(USART_TypeDef * USARTx, uint32_t TransferDirection)
Function description Configure simultaneously enabled/disabled states of Transmitter
and Receiver.
Parameters USARTx: USART Instance
TransferDirection: This parameter can be one of the
following values:
LL_USART_DIRECTION_NONE
LL_USART_DIRECTION_RX
LL_USART_DIRECTION_TX
LL_USART_DIRECTION_TX_RX
Return values None
Reference Manual to CR1 RE LL_USART_SetTransferDirection
LL API cross CR1 TE LL_USART_SetTransferDirection
reference:
LL_USART_GetTransferDirection
Function name __STATIC_INLINE uint32_t LL_USART_GetTransferDirection
(USART_TypeDef * USARTx)
Function description Return enabled/disabled states of Transmitter and Receiver.
Parameters USARTx: USART Instance
Return values Returned: value can be one of the following values:
LL_USART_DIRECTION_NONE
LL_USART_DIRECTION_RX
LL_USART_DIRECTION_TX
LL_USART_SetParity
Function name __STATIC_INLINE void LL_USART_SetParity
(USART_TypeDef * USARTx, uint32_t Parity)
Function description Configure Parity (enabled/disabled and parity mode if enabled).
Parameters USARTx: USART Instance
Parity: This parameter can be one of the following values:
LL_USART_PARITY_NONE
LL_USART_PARITY_EVEN
LL_USART_PARITY_ODD
Return values None
Notes This function selects if hardware parity control (generation
and detection) is enabled or disabled. When the parity control
is enabled (Odd or Even), computed parity bit is inserted at
the MSB position (9th or 8th bit depending on data width) and
parity is checked on the received data.
Reference Manual to CR1 PS LL_USART_SetParity
LL API cross CR1 PCE LL_USART_SetParity
reference:
LL_USART_GetParity
Function name __STATIC_INLINE uint32_t LL_USART_GetParity
(USART_TypeDef * USARTx)
Function description Return Parity configuration (enabled/disabled and parity mode if
enabled)
Parameters USARTx: USART Instance
Return values Returned: value can be one of the following values:
LL_USART_PARITY_NONE
LL_USART_PARITY_EVEN
LL_USART_PARITY_ODD
Reference Manual to CR1 PS LL_USART_GetParity
LL API cross CR1 PCE LL_USART_GetParity
reference:
LL_USART_SetWakeUpMethod
Function name __STATIC_INLINE void LL_USART_SetWakeUpMethod
(USART_TypeDef * USARTx, uint32_t Method)
Function description Set Receiver Wake Up method from Mute mode.
Parameters USARTx: USART Instance
Method: This parameter can be one of the following values:
LL_USART_WAKEUP_IDLELINE
LL_USART_GetWakeUpMethod
Function name __STATIC_INLINE uint32_t LL_USART_GetWakeUpMethod
(USART_TypeDef * USARTx)
Function description Return Receiver Wake Up method from Mute mode.
Parameters USARTx: USART Instance
Return values Returned: value can be one of the following values:
LL_USART_WAKEUP_IDLELINE
LL_USART_WAKEUP_ADDRESSMARK
Reference Manual to CR1 WAKE LL_USART_GetWakeUpMethod
LL API cross
reference:
LL_USART_SetDataWidth
Function name __STATIC_INLINE void LL_USART_SetDataWidth
(USART_TypeDef * USARTx, uint32_t DataWidth)
Function description Set Word length (i.e.
Parameters USARTx: USART Instance
DataWidth: This parameter can be one of the following
values: (*) Values not available on all devices
LL_USART_DATAWIDTH_7B (*)
LL_USART_DATAWIDTH_8B
LL_USART_DATAWIDTH_9B
Return values None
Reference Manual to CR1 M0 LL_USART_SetDataWidth
LL API cross CR1 M1 LL_USART_SetDataWidth
reference:
LL_USART_GetDataWidth
Function name __STATIC_INLINE uint32_t LL_USART_GetDataWidth
(USART_TypeDef * USARTx)
Function description Return Word length (i.e.
Parameters USARTx: USART Instance
Return values Returned: value can be one of the following values: (*)
Values not available on all devices
LL_USART_DATAWIDTH_7B (*)
LL_USART_DATAWIDTH_8B
LL_USART_DATAWIDTH_9B
Reference Manual to CR1 M0 LL_USART_GetDataWidth
LL_USART_EnableMuteMode
Function name __STATIC_INLINE void LL_USART_EnableMuteMode
(USART_TypeDef * USARTx)
Function description Allow switch between Mute Mode and Active mode.
Parameters USARTx: USART Instance
Return values None
Reference Manual to CR1 MME LL_USART_EnableMuteMode
LL API cross
reference:
LL_USART_DisableMuteMode
Function name __STATIC_INLINE void LL_USART_DisableMuteMode
(USART_TypeDef * USARTx)
Function description Prevent Mute Mode use.
Parameters USARTx: USART Instance
Return values None
Reference Manual to CR1 MME LL_USART_DisableMuteMode
LL API cross
reference:
LL_USART_IsEnabledMuteMode
Function name __STATIC_INLINE uint32_t LL_USART_IsEnabledMuteMode
(USART_TypeDef * USARTx)
Function description Indicate if switch between Mute Mode and Active mode is allowed.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Reference Manual to CR1 MME LL_USART_IsEnabledMuteMode
LL API cross
reference:
LL_USART_SetOverSampling
Function name __STATIC_INLINE void LL_USART_SetOverSampling
(USART_TypeDef * USARTx, uint32_t OverSampling)
Function description Set Oversampling to 8-bit or 16-bit mode.
Parameters USARTx: USART Instance
OverSampling: This parameter can be one of the following
values:
LL_USART_OVERSAMPLING_16
LL_USART_OVERSAMPLING_8
LL_USART_GetOverSampling
Function name __STATIC_INLINE uint32_t LL_USART_GetOverSampling
(USART_TypeDef * USARTx)
Function description Return Oversampling mode.
Parameters USARTx: USART Instance
Return values Returned: value can be one of the following values:
LL_USART_OVERSAMPLING_16
LL_USART_OVERSAMPLING_8
Reference Manual to CR1 OVER8 LL_USART_GetOverSampling
LL API cross
reference:
LL_USART_SetLastClkPulseOutput
Function name __STATIC_INLINE void LL_USART_SetLastClkPulseOutput
(USART_TypeDef * USARTx, uint32_t LastBitClockPulse)
Function description Configure if Clock pulse of the last data bit is output to the SCLK
pin or not.
Parameters USARTx: USART Instance
LastBitClockPulse: This parameter can be one of the
following values:
LL_USART_LASTCLKPULSE_NO_OUTPUT
LL_USART_LASTCLKPULSE_OUTPUT
Return values None
Notes Macro IS_USART_INSTANCE(USARTx) can be used to
check whether or not Synchronous mode is supported by the
USARTx instance.
Reference Manual to CR2 LBCL LL_USART_SetLastClkPulseOutput
LL API cross
reference:
LL_USART_GetLastClkPulseOutput
Function name __STATIC_INLINE uint32_t
LL_USART_GetLastClkPulseOutput (USART_TypeDef *
USARTx)
Function description Retrieve Clock pulse of the last data bit output configuration (Last
bit Clock pulse output to the SCLK pin or not)
Parameters USARTx: USART Instance
Return values Returned: value can be one of the following values:
LL_USART_LASTCLKPULSE_NO_OUTPUT
LL_USART_SetClockPhase
Function name __STATIC_INLINE void LL_USART_SetClockPhase
(USART_TypeDef * USARTx, uint32_t ClockPhase)
Function description Select the phase of the clock output on the SCLK pin in
synchronous mode.
Parameters USARTx: USART Instance
ClockPhase: This parameter can be one of the following
values:
LL_USART_PHASE_1EDGE
LL_USART_PHASE_2EDGE
Return values None
Notes Macro IS_USART_INSTANCE(USARTx) can be used to
check whether or not Synchronous mode is supported by the
USARTx instance.
Reference Manual to CR2 CPHA LL_USART_SetClockPhase
LL API cross
reference:
LL_USART_GetClockPhase
Function name __STATIC_INLINE uint32_t LL_USART_GetClockPhase
(USART_TypeDef * USARTx)
Function description Return phase of the clock output on the SCLK pin in synchronous
mode.
Parameters USARTx: USART Instance
Return values Returned: value can be one of the following values:
LL_USART_PHASE_1EDGE
LL_USART_PHASE_2EDGE
Notes Macro IS_USART_INSTANCE(USARTx) can be used to
check whether or not Synchronous mode is supported by the
USARTx instance.
Reference Manual to CR2 CPHA LL_USART_GetClockPhase
LL API cross
reference:
LL_USART_GetClockPolarity
Function name __STATIC_INLINE uint32_t LL_USART_GetClockPolarity
(USART_TypeDef * USARTx)
Function description Return polarity of the clock output on the SCLK pin in synchronous
mode.
Parameters USARTx: USART Instance
Return values Returned: value can be one of the following values:
LL_USART_POLARITY_LOW
LL_USART_POLARITY_HIGH
Notes Macro IS_USART_INSTANCE(USARTx) can be used to
check whether or not Synchronous mode is supported by the
USARTx instance.
Reference Manual to CR2 CPOL LL_USART_GetClockPolarity
LL API cross
reference:
LL_USART_ConfigClock
Function name __STATIC_INLINE void LL_USART_ConfigClock
(USART_TypeDef * USARTx, uint32_t Phase, uint32_t Polarity,
uint32_t LBCPOutput)
Function description Configure Clock signal format (Phase Polarity and choice about
output of last bit clock pulse)
Parameters USARTx: USART Instance
Phase: This parameter can be one of the following values:
LL_USART_PHASE_1EDGE
LL_USART_PHASE_2EDGE
Polarity: This parameter can be one of the following values:
LL_USART_EnableSCLKOutput
Function name __STATIC_INLINE void LL_USART_EnableSCLKOutput
(USART_TypeDef * USARTx)
Function description Enable Clock output on SCLK pin.
Parameters USARTx: USART Instance
Return values None
Notes Macro IS_USART_INSTANCE(USARTx) can be used to
check whether or not Synchronous mode is supported by the
USARTx instance.
Reference Manual to CR2 CLKEN LL_USART_EnableSCLKOutput
LL API cross
reference:
LL_USART_DisableSCLKOutput
Function name __STATIC_INLINE void LL_USART_DisableSCLKOutput
(USART_TypeDef * USARTx)
Function description Disable Clock output on SCLK pin.
Parameters USARTx: USART Instance
Return values None
Notes Macro IS_USART_INSTANCE(USARTx) can be used to
check whether or not Synchronous mode is supported by the
USARTx instance.
Reference Manual to CR2 CLKEN LL_USART_DisableSCLKOutput
LL API cross
reference:
LL_USART_SetStopBitsLength
Function name __STATIC_INLINE void LL_USART_SetStopBitsLength
(USART_TypeDef * USARTx, uint32_t StopBits)
Function description Set the length of the stop bits.
Parameters USARTx: USART Instance
StopBits: This parameter can be one of the following values:
(*) Values not available on all devices
LL_USART_STOPBITS_0_5 (*)
LL_USART_STOPBITS_1
LL_USART_STOPBITS_1_5 (*)
LL_USART_STOPBITS_2
Return values None
Reference Manual to CR2 STOP LL_USART_SetStopBitsLength
LL API cross
reference:
LL_USART_GetStopBitsLength
Function name __STATIC_INLINE uint32_t LL_USART_GetStopBitsLength
(USART_TypeDef * USARTx)
Function description Retrieve the length of the stop bits.
Parameters USARTx: USART Instance
Return values Returned: value can be one of the following values: (*)
Values not available on all devices
LL_USART_STOPBITS_0_5 (*)
LL_USART_STOPBITS_1
LL_USART_STOPBITS_1_5 (*)
LL_USART_STOPBITS_2
Reference Manual to CR2 STOP LL_USART_GetStopBitsLength
LL API cross
reference:
LL_USART_SetTXRXSwap
Function name __STATIC_INLINE void LL_USART_SetTXRXSwap
(USART_TypeDef * USARTx, uint32_t SwapConfig)
Function description Configure TX/RX pins swapping setting.
Parameters USARTx: USART Instance
SwapConfig: This parameter can be one of the following
values:
LL_USART_TXRX_STANDARD
LL_USART_TXRX_SWAPPED
Return values None
Reference Manual to CR2 SWAP LL_USART_SetTXRXSwap
LL API cross
reference:
LL_USART_SetRXPinLevel
Function name __STATIC_INLINE void LL_USART_SetRXPinLevel
(USART_TypeDef * USARTx, uint32_t PinInvMethod)
Function description Configure RX pin active level logic.
Parameters USARTx: USART Instance
PinInvMethod: This parameter can be one of the following
values:
LL_USART_RXPIN_LEVEL_STANDARD
LL_USART_RXPIN_LEVEL_INVERTED
Return values None
Reference Manual to CR2 RXINV LL_USART_SetRXPinLevel
LL API cross
reference:
LL_USART_GetRXPinLevel
Function name __STATIC_INLINE uint32_t LL_USART_GetRXPinLevel
(USART_TypeDef * USARTx)
Function description Retrieve RX pin active level logic configuration.
Parameters USARTx: USART Instance
Return values Returned: value can be one of the following values:
LL_USART_RXPIN_LEVEL_STANDARD
LL_USART_RXPIN_LEVEL_INVERTED
Reference Manual to CR2 RXINV LL_USART_GetRXPinLevel
LL API cross
reference:
LL_USART_SetTXPinLevel
Function name __STATIC_INLINE void LL_USART_SetTXPinLevel
(USART_TypeDef * USARTx, uint32_t PinInvMethod)
Function description Configure TX pin active level logic.
Parameters USARTx: USART Instance
LL_USART_GetTXPinLevel
Function name __STATIC_INLINE uint32_t LL_USART_GetTXPinLevel
(USART_TypeDef * USARTx)
Function description Retrieve TX pin active level logic configuration.
Parameters USARTx: USART Instance
Return values Returned: value can be one of the following values:
LL_USART_TXPIN_LEVEL_STANDARD
LL_USART_TXPIN_LEVEL_INVERTED
Reference Manual to CR2 TXINV LL_USART_GetTXPinLevel
LL API cross
reference:
LL_USART_SetBinaryDataLogic
Function name __STATIC_INLINE void LL_USART_SetBinaryDataLogic
(USART_TypeDef * USARTx, uint32_t DataLogic)
Function description Configure Binary data logic.
Parameters USARTx: USART Instance
DataLogic: This parameter can be one of the following
values:
LL_USART_BINARY_LOGIC_POSITIVE
LL_USART_BINARY_LOGIC_NEGATIVE
Return values None
Notes Allow to define how Logical data from the data register are
send/received : either in positive/direct logic (1=H, 0=L) or in
negative/inverse logic (1=L, 0=H)
Reference Manual to CR2 DATAINV LL_USART_SetBinaryDataLogic
LL API cross
reference:
LL_USART_GetBinaryDataLogic
Function name __STATIC_INLINE uint32_t LL_USART_GetBinaryDataLogic
(USART_TypeDef * USARTx)
Function description Retrieve Binary data configuration.
Parameters USARTx: USART Instance
LL_USART_SetTransferBitOrder
Function name __STATIC_INLINE void LL_USART_SetTransferBitOrder
(USART_TypeDef * USARTx, uint32_t BitOrder)
Function description Configure transfer bit order (either Less or Most Significant Bit
First)
Parameters USARTx: USART Instance
BitOrder: This parameter can be one of the following values:
LL_USART_BITORDER_LSBFIRST
LL_USART_BITORDER_MSBFIRST
Return values None
Notes MSB First means data is transmitted/received with the MSB
first, following the start bit. LSB First means data is
transmitted/received with data bit 0 first, following the start bit.
Reference Manual to CR2 MSBFIRST LL_USART_SetTransferBitOrder
LL API cross
reference:
LL_USART_GetTransferBitOrder
Function name __STATIC_INLINE uint32_t LL_USART_GetTransferBitOrder
(USART_TypeDef * USARTx)
Function description Return transfer bit order (either Less or Most Significant Bit First)
Parameters USARTx: USART Instance
Return values Returned: value can be one of the following values:
LL_USART_BITORDER_LSBFIRST
LL_USART_BITORDER_MSBFIRST
Notes MSB First means data is transmitted/received with the MSB
first, following the start bit. LSB First means data is
transmitted/received with data bit 0 first, following the start bit.
Reference Manual to CR2 MSBFIRST LL_USART_GetTransferBitOrder
LL API cross
reference:
LL_USART_EnableAutoBaudRate
Function name __STATIC_INLINE void LL_USART_EnableAutoBaudRate
(USART_TypeDef * USARTx)
Function description Enable Auto Baud-Rate Detection.
Parameters USARTx: USART Instance
LL_USART_DisableAutoBaudRate
Function name __STATIC_INLINE void LL_USART_DisableAutoBaudRate
(USART_TypeDef * USARTx)
Function description Disable Auto Baud-Rate Detection.
Parameters USARTx: USART Instance
Return values None
Notes Macro
IS_USART_AUTOBAUDRATE_DETECTION_INSTANCE(USA
RTx) can be used to check whether or not Auto Baud Rate
detection feature is supported by the USARTx instance.
Reference Manual CR2 ABREN LL_USART_DisableAutoBaudRate
to LL API cross
reference:
LL_USART_IsEnabledAutoBaud
Function name __STATIC_INLINE uint32_t LL_USART_IsEnabledAutoBaud
(USART_TypeDef * USARTx)
Function description Indicate if Auto Baud-Rate Detection mechanism is enabled.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Notes Macro
IS_USART_AUTOBAUDRATE_DETECTION_INSTANCE(USA
RTx) can be used to check whether or not Auto Baud Rate
detection feature is supported by the USARTx instance.
Reference Manual CR2 ABREN LL_USART_IsEnabledAutoBaud
to LL API cross
reference:
LL_USART_SetAutoBaudRateMode
Function name __STATIC_INLINE void LL_USART_SetAutoBaudRateMode
(USART_TypeDef * USARTx, uint32_t AutoBaudRateMode)
Function Set Auto Baud-Rate mode bits.
description
Parameters USARTx: USART Instance
AutoBaudRateMode: This parameter can be one of the following
LL_USART_GetAutoBaudRateMode
Function name __STATIC_INLINE uint32_t LL_USART_GetAutoBaudRateMode
(USART_TypeDef * USARTx)
Function Return Auto Baud-Rate mode.
description
Parameters USARTx: USART Instance
Return values Returned: value can be one of the following values: (*) Values
not available on all devices
LL_USART_AUTOBAUD_DETECT_ON_STARTBIT
LL_USART_AUTOBAUD_DETECT_ON_FALLINGEDGE
LL_USART_AUTOBAUD_DETECT_ON_7F_FRAME (*)
LL_USART_AUTOBAUD_DETECT_ON_55_FRAME (*)
Notes Macro
IS_USART_AUTOBAUDRATE_DETECTION_INSTANCE(USART
x) can be used to check whether or not Auto Baud Rate detection
feature is supported by the USARTx instance.
Reference CR2 ABRMODE LL_USART_GetAutoBaudRateMode
Manual to LL
API cross
reference:
LL_USART_EnableRxTimeout
Function name __STATIC_INLINE void LL_USART_EnableRxTimeout
(USART_TypeDef * USARTx)
Function description Enable Receiver Timeout.
Parameters USARTx: USART Instance
Return values None
Reference Manual to CR2 RTOEN LL_USART_EnableRxTimeout
LL API cross
reference:
LL_USART_IsEnabledRxTimeout
Function name __STATIC_INLINE uint32_t LL_USART_IsEnabledRxTimeout
(USART_TypeDef * USARTx)
Function description Indicate if Receiver Timeout feature is enabled.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Reference Manual to CR2 RTOEN LL_USART_IsEnabledRxTimeout
LL API cross
reference:
LL_USART_ConfigNodeAddress
Function name __STATIC_INLINE void LL_USART_ConfigNodeAddress
(USART_TypeDef * USARTx, uint32_t AddressLen, uint32_t
NodeAddress)
Function description Set Address of the USART node.
Parameters USARTx: USART Instance
AddressLen: This parameter can be one of the following
values:
LL_USART_ADDRESS_DETECT_4B
LL_USART_ADDRESS_DETECT_7B
NodeAddress: 4 or 7 bit Address of the USART node.
Return values None
Notes This is used in multiprocessor communication during Mute
mode or Stop mode, for wake up with address mark
detection.
4bits address node is used when 4-bit Address Detection is
selected in ADDM7. (b7-b4 should be set to 0) 8bits address
node is used when 7-bit Address Detection is selected in
ADDM7. (This is used in multiprocessor communication
during Mute mode or Stop mode, for wake up with 7-bit
address mark detection. The MSB of the character sent by
the transmitter should be equal to 1. It may also be used for
character detection during normal reception, Mute mode
inactive (for example, end of block detection in ModBus
protocol). In this case, the whole received character (8-bit) is
compared to the ADD[7:0] value and CMF flag is set on
LL_USART_GetNodeAddress
Function name __STATIC_INLINE uint32_t LL_USART_GetNodeAddress
(USART_TypeDef * USARTx)
Function description Return 8 bit Address of the USART node as set in ADD field of
CR2.
Parameters USARTx: USART Instance
Return values Address: of the USART node (Value between Min_Data=0
and Max_Data=255)
Notes If 4-bit Address Detection is selected in ADDM7, only 4bits
(b3-b0) of returned value are relevant (b31-b4 are not
relevant) If 7-bit Address Detection is selected in ADDM7,
only 8bits (b7-b0) of returned value are relevant (b31-b8 are
not relevant)
Reference Manual to CR2 ADD LL_USART_GetNodeAddress
LL API cross
reference:
LL_USART_GetNodeAddressLen
Function name __STATIC_INLINE uint32_t LL_USART_GetNodeAddressLen
(USART_TypeDef * USARTx)
Function description Return Length of Node Address used in Address Detection mode
(7-bit or 4-bit)
Parameters USARTx: USART Instance
Return values Returned: value can be one of the following values:
LL_USART_ADDRESS_DETECT_4B
LL_USART_ADDRESS_DETECT_7B
Reference Manual to CR2 ADDM7 LL_USART_GetNodeAddressLen
LL API cross
reference:
LL_USART_EnableRTSHWFlowCtrl
Function name __STATIC_INLINE void LL_USART_EnableRTSHWFlowCtrl
(USART_TypeDef * USARTx)
Function description Enable RTS HW Flow Control.
Parameters USARTx: USART Instance
Return values None
Notes Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be
used to check whether or not Hardware Flow control feature
is supported by the USARTx instance.
LL_USART_DisableRTSHWFlowCtrl
Function name __STATIC_INLINE void LL_USART_DisableRTSHWFlowCtrl
(USART_TypeDef * USARTx)
Function description Disable RTS HW Flow Control.
Parameters USARTx: USART Instance
Return values None
Notes Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be
used to check whether or not Hardware Flow control feature
is supported by the USARTx instance.
Reference Manual to CR3 RTSE LL_USART_DisableRTSHWFlowCtrl
LL API cross
reference:
LL_USART_EnableCTSHWFlowCtrl
Function name __STATIC_INLINE void LL_USART_EnableCTSHWFlowCtrl
(USART_TypeDef * USARTx)
Function description Enable CTS HW Flow Control.
Parameters USARTx: USART Instance
Return values None
Notes Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be
used to check whether or not Hardware Flow control feature
is supported by the USARTx instance.
Reference Manual to CR3 CTSE LL_USART_EnableCTSHWFlowCtrl
LL API cross
reference:
LL_USART_DisableCTSHWFlowCtrl
Function name __STATIC_INLINE void LL_USART_DisableCTSHWFlowCtrl
(USART_TypeDef * USARTx)
Function description Disable CTS HW Flow Control.
Parameters USARTx: USART Instance
Return values None
Notes Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be
used to check whether or not Hardware Flow control feature
is supported by the USARTx instance.
Reference Manual to CR3 CTSE LL_USART_DisableCTSHWFlowCtrl
LL API cross
reference:
LL_USART_GetHWFlowCtrl
Function name __STATIC_INLINE uint32_t LL_USART_GetHWFlowCtrl
(USART_TypeDef * USARTx)
Function description Return HW Flow Control configuration (both CTS and RTS)
Parameters USARTx: USART Instance
Return values Returned: value can be one of the following values:
LL_USART_HWCONTROL_NONE
LL_USART_HWCONTROL_RTS
LL_USART_HWCONTROL_CTS
LL_USART_HWCONTROL_RTS_CTS
Notes Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be
used to check whether or not Hardware Flow control feature
is supported by the USARTx instance.
Reference Manual to CR3 RTSE LL_USART_GetHWFlowCtrl
LL API cross CR3 CTSE LL_USART_GetHWFlowCtrl
reference:
LL_USART_DisableOneBitSamp
Function name __STATIC_INLINE void LL_USART_DisableOneBitSamp
(USART_TypeDef * USARTx)
Function description Disable One bit sampling method.
Parameters USARTx: USART Instance
Return values None
Reference Manual to CR3 ONEBIT LL_USART_DisableOneBitSamp
LL API cross
reference:
LL_USART_IsEnabledOneBitSamp
Function name __STATIC_INLINE uint32_t LL_USART_IsEnabledOneBitSamp
(USART_TypeDef * USARTx)
Function description Indicate if One bit sampling method is enabled.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Reference Manual to CR3 ONEBIT LL_USART_IsEnabledOneBitSamp
LL API cross
reference:
LL_USART_EnableOverrunDetect
Function name __STATIC_INLINE void LL_USART_EnableOverrunDetect
(USART_TypeDef * USARTx)
Function description Enable Overrun detection.
Parameters USARTx: USART Instance
Return values None
Reference Manual to CR3 OVRDIS LL_USART_EnableOverrunDetect
LL API cross
reference:
LL_USART_IsEnabledOverrunDetect
Function name __STATIC_INLINE uint32_t
LL_USART_IsEnabledOverrunDetect (USART_TypeDef *
USARTx)
Function description Indicate if Overrun detection is enabled.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Reference Manual to CR3 OVRDIS LL_USART_IsEnabledOverrunDetect
LL API cross
reference:
LL_USART_SetWKUPType
Function name __STATIC_INLINE void LL_USART_SetWKUPType
(USART_TypeDef * USARTx, uint32_t Type)
Function description Select event type for Wake UP Interrupt Flag (WUS[1:0] bits)
Parameters USARTx: USART Instance
Type: This parameter can be one of the following values:
LL_USART_WAKEUP_ON_ADDRESS
LL_USART_WAKEUP_ON_STARTBIT
LL_USART_WAKEUP_ON_RXNE
Return values None
Notes Macro
IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can
be used to check whether or not Wake-up from Stop mode
feature is supported by the USARTx instance.
Reference Manual to CR3 WUS LL_USART_SetWKUPType
LL API cross
reference:
LL_USART_GetWKUPType
Function name __STATIC_INLINE uint32_t LL_USART_GetWKUPType
(USART_TypeDef * USARTx)
Function description Return event type for Wake UP Interrupt Flag (WUS[1:0] bits)
LL_USART_SetBaudRate
Function name __STATIC_INLINE void LL_USART_SetBaudRate
(USART_TypeDef * USARTx, uint32_t PeriphClk, uint32_t
OverSampling, uint32_t BaudRate)
Function description Configure USART BRR register for achieving expected Baud Rate
value.
Parameters USARTx: USART Instance
PeriphClk: Peripheral Clock
OverSampling: This parameter can be one of the following
values:
LL_USART_OVERSAMPLING_16
LL_USART_OVERSAMPLING_8
BaudRate: Baud Rate
Return values None
Notes Compute and set USARTDIV value in BRR Register (full BRR
content) according to used Peripheral Clock, Oversampling
mode, and expected Baud Rate values
Peripheral clock and Baud rate values provided as function
parameters should be valid (Baud rate value != 0)
In case of oversampling by 16 and 8, BRR content must be
greater than or equal to 16d.
Reference Manual to BRR BRR LL_USART_SetBaudRate
LL API cross
reference:
LL_USART_GetBaudRate
Function name __STATIC_INLINE uint32_t LL_USART_GetBaudRate
(USART_TypeDef * USARTx, uint32_t PeriphClk, uint32_t
OverSampling)
Function description Return current Baud Rate value, according to USARTDIV present
in BRR register (full BRR content), and to used Peripheral Clock
and Oversampling mode values.
Parameters USARTx: USART Instance
PeriphClk: Peripheral Clock
LL_USART_SetRxTimeout
Function name __STATIC_INLINE void LL_USART_SetRxTimeout
(USART_TypeDef * USARTx, uint32_t Timeout)
Function description Set Receiver Time Out Value (expressed in nb of bits duration)
Parameters USARTx: USART Instance
Timeout: Value between Min_Data=0x00 and
Max_Data=0x00FFFFFF
Return values None
Reference Manual to RTOR RTO LL_USART_SetRxTimeout
LL API cross
reference:
LL_USART_GetRxTimeout
Function name __STATIC_INLINE uint32_t LL_USART_GetRxTimeout
(USART_TypeDef * USARTx)
Function description Get Receiver Time Out Value (expressed in nb of bits duration)
Parameters USARTx: USART Instance
Return values Value: between Min_Data=0x00 and
Max_Data=0x00FFFFFF
Reference Manual to RTOR RTO LL_USART_GetRxTimeout
LL API cross
reference:
LL_USART_SetBlockLength
Function name __STATIC_INLINE void LL_USART_SetBlockLength
(USART_TypeDef * USARTx, uint32_t BlockLength)
Function description Set Block Length value in reception.
Parameters USARTx: USART Instance
BlockLength: Value between Min_Data=0x00 and
Max_Data=0xFF
LL_USART_GetBlockLength
Function name __STATIC_INLINE uint32_t LL_USART_GetBlockLength
(USART_TypeDef * USARTx)
Function description Get Block Length value in reception.
Parameters USARTx: USART Instance
Return values Value: between Min_Data=0x00 and Max_Data=0xFF
Reference Manual to RTOR BLEN LL_USART_GetBlockLength
LL API cross
reference:
LL_USART_EnableIrda
Function name __STATIC_INLINE void LL_USART_EnableIrda
(USART_TypeDef * USARTx)
Function description Enable IrDA mode.
Parameters USARTx: USART Instance
Return values None
Notes Macro IS_IRDA_INSTANCE(USARTx) can be used to check
whether or not IrDA feature is supported by the USARTx
instance.
Reference Manual to CR3 IREN LL_USART_EnableIrda
LL API cross
reference:
LL_USART_DisableIrda
Function name __STATIC_INLINE void LL_USART_DisableIrda
(USART_TypeDef * USARTx)
Function description Disable IrDA mode.
Parameters USARTx: USART Instance
Return values None
Notes Macro IS_IRDA_INSTANCE(USARTx) can be used to check
whether or not IrDA feature is supported by the USARTx
instance.
Reference Manual to CR3 IREN LL_USART_DisableIrda
LL API cross
reference:
LL_USART_SetIrdaPowerMode
Function name __STATIC_INLINE void LL_USART_SetIrdaPowerMode
(USART_TypeDef * USARTx, uint32_t PowerMode)
Function description Configure IrDA Power Mode (Normal or Low Power)
Parameters USARTx: USART Instance
PowerMode: This parameter can be one of the following
values:
LL_USART_IRDA_POWER_NORMAL
LL_USART_IRDA_POWER_LOW
Return values None
Notes Macro IS_IRDA_INSTANCE(USARTx) can be used to check
whether or not IrDA feature is supported by the USARTx
instance.
Reference Manual to CR3 IRLP LL_USART_SetIrdaPowerMode
LL API cross
reference:
LL_USART_GetIrdaPowerMode
Function name __STATIC_INLINE uint32_t LL_USART_GetIrdaPowerMode
(USART_TypeDef * USARTx)
Function description Retrieve IrDA Power Mode configuration (Normal or Low Power)
Parameters USARTx: USART Instance
Return values Returned: value can be one of the following values:
LL_USART_IRDA_POWER_NORMAL
LL_USART_PHASE_2EDGE
Notes Macro IS_IRDA_INSTANCE(USARTx) can be used to check
whether or not IrDA feature is supported by the USARTx
instance.
Reference Manual to CR3 IRLP LL_USART_GetIrdaPowerMode
LL API cross
LL_USART_SetIrdaPrescaler
Function name __STATIC_INLINE void LL_USART_SetIrdaPrescaler
(USART_TypeDef * USARTx, uint32_t PrescalerValue)
Function description Set Irda prescaler value, used for dividing the USART clock source
to achieve the Irda Low Power frequency (8 bits value)
Parameters USARTx: USART Instance
PrescalerValue: Value between Min_Data=0x00 and
Max_Data=0xFF
Return values None
Notes Macro IS_IRDA_INSTANCE(USARTx) can be used to check
whether or not IrDA feature is supported by the USARTx
instance.
Reference Manual to GTPR PSC LL_USART_SetIrdaPrescaler
LL API cross
reference:
LL_USART_GetIrdaPrescaler
Function name __STATIC_INLINE uint32_t LL_USART_GetIrdaPrescaler
(USART_TypeDef * USARTx)
Function description Return Irda prescaler value, used for dividing the USART clock
source to achieve the Irda Low Power frequency (8 bits value)
Parameters USARTx: USART Instance
Return values Irda: prescaler value (Value between Min_Data=0x00 and
Max_Data=0xFF)
Notes Macro IS_IRDA_INSTANCE(USARTx) can be used to check
whether or not IrDA feature is supported by the USARTx
instance.
Reference Manual to GTPR PSC LL_USART_GetIrdaPrescaler
LL API cross
reference:
LL_USART_DisableSmartcardNACK
Function name __STATIC_INLINE void LL_USART_DisableSmartcardNACK
(USART_TypeDef * USARTx)
Function description Disable Smartcard NACK transmission.
Parameters USARTx: USART Instance
Return values None
Notes Macro IS_SMARTCARD_INSTANCE(USARTx) can be used
to check whether or not Smartcard feature is supported by the
USARTx instance.
Reference Manual to CR3 NACK LL_USART_DisableSmartcardNACK
LL API cross
reference:
LL_USART_IsEnabledSmartcardNACK
Function name __STATIC_INLINE uint32_t
LL_USART_IsEnabledSmartcardNACK (USART_TypeDef *
USARTx)
Function description Indicate if Smartcard NACK transmission is enabled.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Notes Macro IS_SMARTCARD_INSTANCE(USARTx) can be used
to check whether or not Smartcard feature is supported by the
USARTx instance.
Reference Manual to CR3 NACK LL_USART_IsEnabledSmartcardNACK
LL API cross
reference:
LL_USART_DisableSmartcard
Function name __STATIC_INLINE void LL_USART_DisableSmartcard
(USART_TypeDef * USARTx)
Function description Disable Smartcard mode.
Parameters USARTx: USART Instance
Return values None
Notes Macro IS_SMARTCARD_INSTANCE(USARTx) can be used
to check whether or not Smartcard feature is supported by the
USARTx instance.
Reference Manual to CR3 SCEN LL_USART_DisableSmartcard
LL API cross
reference:
LL_USART_IsEnabledSmartcard
Function name __STATIC_INLINE uint32_t LL_USART_IsEnabledSmartcard
(USART_TypeDef * USARTx)
Function description Indicate if Smartcard mode is enabled.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Notes Macro IS_SMARTCARD_INSTANCE(USARTx) can be used
to check whether or not Smartcard feature is supported by the
USARTx instance.
Reference Manual to CR3 SCEN LL_USART_IsEnabledSmartcard
LL API cross
reference:
LL_USART_GetSmartcardAutoRetryCount
Function name __STATIC_INLINE uint32_t
LL_USART_GetSmartcardAutoRetryCount (USART_TypeDef *
USARTx)
Function description Return Smartcard Auto-Retry Count value (SCARCNT[2:0] bits)
Parameters USARTx: USART Instance
Return values Smartcard: Auto-Retry Count value (Value between
Min_Data=0 and Max_Data=7)
Notes Macro IS_SMARTCARD_INSTANCE(USARTx) can be used
to check whether or not Smartcard feature is supported by the
USARTx instance.
Reference Manual to CR3 SCARCNT LL_USART_GetSmartcardAutoRetryCount
LL API cross
reference:
LL_USART_SetSmartcardPrescaler
Function name __STATIC_INLINE void LL_USART_SetSmartcardPrescaler
(USART_TypeDef * USARTx, uint32_t PrescalerValue)
Function description Set Smartcard prescaler value, used for dividing the USART clock
source to provide the SMARTCARD Clock (5 bits value)
Parameters USARTx: USART Instance
PrescalerValue: Value between Min_Data=0 and
LL_USART_GetSmartcardPrescaler
Function name __STATIC_INLINE uint32_t
LL_USART_GetSmartcardPrescaler (USART_TypeDef *
USARTx)
Function description Return Smartcard prescaler value, used for dividing the USART
clock source to provide the SMARTCARD Clock (5 bits value)
Parameters USARTx: USART Instance
Return values Smartcard: prescaler value (Value between Min_Data=0
and Max_Data=31)
Notes Macro IS_SMARTCARD_INSTANCE(USARTx) can be used
to check whether or not Smartcard feature is supported by the
USARTx instance.
Reference Manual to GTPR PSC LL_USART_GetSmartcardPrescaler
LL API cross
reference:
LL_USART_SetSmartcardGuardTime
Function name __STATIC_INLINE void LL_USART_SetSmartcardGuardTime
(USART_TypeDef * USARTx, uint32_t GuardTime)
Function description Set Smartcard Guard time value, expressed in nb of baud clocks
periods (GT[7:0] bits : Guard time value)
Parameters USARTx: USART Instance
GuardTime: Value between Min_Data=0x00 and
Max_Data=0xFF
Return values None
Notes Macro IS_SMARTCARD_INSTANCE(USARTx) can be used
to check whether or not Smartcard feature is supported by the
USARTx instance.
Reference Manual to GTPR GT LL_USART_SetSmartcardGuardTime
LL API cross
reference:
LL_USART_EnableHalfDuplex
Function name __STATIC_INLINE void LL_USART_EnableHalfDuplex
(USART_TypeDef * USARTx)
Function description Enable Single Wire Half-Duplex mode.
Parameters USARTx: USART Instance
Return values None
Notes Macro IS_UART_HALFDUPLEX_INSTANCE(USARTx) can
be used to check whether or not Half-Duplex mode is
supported by the USARTx instance.
Reference Manual to CR3 HDSEL LL_USART_EnableHalfDuplex
LL API cross
reference:
LL_USART_DisableHalfDuplex
Function name __STATIC_INLINE void LL_USART_DisableHalfDuplex
(USART_TypeDef * USARTx)
Function description Disable Single Wire Half-Duplex mode.
Parameters USARTx: USART Instance
Return values None
Notes Macro IS_UART_HALFDUPLEX_INSTANCE(USARTx) can
be used to check whether or not Half-Duplex mode is
supported by the USARTx instance.
Reference Manual to CR3 HDSEL LL_USART_DisableHalfDuplex
LL API cross
reference:
LL_USART_SetLINBrkDetectionLen
Function name __STATIC_INLINE void LL_USART_SetLINBrkDetectionLen
(USART_TypeDef * USARTx, uint32_t LINBDLength)
Function description Set LIN Break Detection Length.
Parameters USARTx: USART Instance
LINBDLength: This parameter can be one of the following
values:
LL_USART_LINBREAK_DETECT_10B
LL_USART_LINBREAK_DETECT_11B
Return values None
Notes Macro IS_UART_LIN_INSTANCE(USARTx) can be used to
check whether or not LIN feature is supported by the USARTx
instance.
Reference Manual to CR2 LBDL LL_USART_SetLINBrkDetectionLen
LL API cross
reference:
LL_USART_EnableLIN
Function name __STATIC_INLINE void LL_USART_EnableLIN
(USART_TypeDef * USARTx)
Function description Enable LIN mode.
Parameters USARTx: USART Instance
Return values None
Notes Macro IS_UART_LIN_INSTANCE(USARTx) can be used to
check whether or not LIN feature is supported by the USARTx
instance.
Reference Manual to CR2 LINEN LL_USART_EnableLIN
LL API cross
reference:
LL_USART_DisableLIN
Function name __STATIC_INLINE void LL_USART_DisableLIN
(USART_TypeDef * USARTx)
Function description Disable LIN mode.
Parameters USARTx: USART Instance
Return values None
Notes Macro IS_UART_LIN_INSTANCE(USARTx) can be used to
check whether or not LIN feature is supported by the USARTx
instance.
Reference Manual to CR2 LINEN LL_USART_DisableLIN
LL API cross
reference:
LL_USART_SetDEDeassertionTime
Function name __STATIC_INLINE void LL_USART_SetDEDeassertionTime
(USART_TypeDef * USARTx, uint32_t Time)
Function description Set DEDT (Driver Enable De-Assertion Time), Time value
expressed on 5 bits ([4:0] bits).
Parameters USARTx: USART Instance
Time: Value between Min_Data=0 and Max_Data=31
Return values None
Notes Macro IS_UART_DRIVER_ENABLE_INSTANCE(USARTx)
can be used to check whether or not Driver Enable feature is
supported by the USARTx instance.
Reference Manual to CR1 DEDT LL_USART_SetDEDeassertionTime
LL API cross
reference:
LL_USART_GetDEDeassertionTime
Function name __STATIC_INLINE uint32_t
LL_USART_GetDEDeassertionTime (USART_TypeDef *
USARTx)
Function description Return DEDT (Driver Enable De-Assertion Time)
Parameters USARTx: USART Instance
Return values Time: value expressed on 5 bits ([4:0] bits) : Value between
Min_Data=0 and Max_Data=31
Notes Macro IS_UART_DRIVER_ENABLE_INSTANCE(USARTx)
can be used to check whether or not Driver Enable feature is
supported by the USARTx instance.
Reference Manual to CR1 DEDT LL_USART_GetDEDeassertionTime
LL API cross
reference:
LL_USART_GetDEAssertionTime
Function name __STATIC_INLINE uint32_t LL_USART_GetDEAssertionTime
(USART_TypeDef * USARTx)
Function description Return DEAT (Driver Enable Assertion Time)
Parameters USARTx: USART Instance
Return values Time: value expressed on 5 bits ([4:0] bits) : Value between
Min_Data=0 and Max_Data=31
Notes Macro IS_UART_DRIVER_ENABLE_INSTANCE(USARTx)
can be used to check whether or not Driver Enable feature is
supported by the USARTx instance.
Reference Manual to CR1 DEAT LL_USART_GetDEAssertionTime
LL API cross
reference:
LL_USART_EnableDEMode
Function name __STATIC_INLINE void LL_USART_EnableDEMode
(USART_TypeDef * USARTx)
Function description Enable Driver Enable (DE) Mode.
Parameters USARTx: USART Instance
Return values None
Notes Macro IS_UART_DRIVER_ENABLE_INSTANCE(USARTx)
can be used to check whether or not Driver Enable feature is
supported by the USARTx instance.
Reference Manual to CR3 DEM LL_USART_EnableDEMode
LL API cross
reference:
LL_USART_IsEnabledDEMode
Function name __STATIC_INLINE uint32_t LL_USART_IsEnabledDEMode
(USART_TypeDef * USARTx)
Function description Indicate if Driver Enable (DE) Mode is enabled.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Notes Macro IS_UART_DRIVER_ENABLE_INSTANCE(USARTx)
can be used to check whether or not Driver Enable feature is
supported by the USARTx instance.
Reference Manual to CR3 DEM LL_USART_IsEnabledDEMode
LL API cross
reference:
LL_USART_SetDESignalPolarity
Function name __STATIC_INLINE void LL_USART_SetDESignalPolarity
(USART_TypeDef * USARTx, uint32_t Polarity)
Function description Select Driver Enable Polarity.
Parameters USARTx: USART Instance
Polarity: This parameter can be one of the following values:
LL_USART_DE_POLARITY_HIGH
LL_USART_DE_POLARITY_LOW
Return values None
Notes Macro IS_UART_DRIVER_ENABLE_INSTANCE(USARTx)
can be used to check whether or not Driver Enable feature is
supported by the USARTx instance.
Reference Manual to CR3 DEP LL_USART_SetDESignalPolarity
LL API cross
reference:
LL_USART_ConfigAsyncMode
Function name __STATIC_INLINE void LL_USART_ConfigAsyncMode
(USART_TypeDef * USARTx)
Function description Perform basic configuration of USART for enabling use in
Asynchronous Mode (UART)
Parameters USARTx: USART Instance
Return values None
Notes In UART mode, the following bits must be kept cleared:
LINEN bit in the USART_CR2 register (if LIN feature is
supported),CLKEN bit in the USART_CR2 register,SCEN bit
in the USART_CR3 register (if Smartcard feature is
supported),IREN bit in the USART_CR3 register (if Irda
feature is supported),HDSEL bit in the USART_CR3 register.
Call of this function is equivalent to following function call
sequence : Clear LINEN in CR2 using
LL_USART_DisableLIN() function (if LIN feature is
supported)Clear CLKEN in CR2 using
LL_USART_DisableSCLKOutput() functionClear SCEN in
CR3 using LL_USART_DisableSmartcard() function (if
Smartcard feature is supported)Clear IREN in CR3 using
LL_USART_DisableIrda() function (if Irda feature is
supported)Clear HDSEL in CR3 using
LL_USART_DisableHalfDuplex() function
Other remaining configurations items related to Asynchronous
Mode (as Baud Rate, Word length, Parity, ...) should be set
using dedicated functions
Reference Manual to CR2 LINEN LL_USART_ConfigAsyncMode
LL API cross CR2 CLKEN LL_USART_ConfigAsyncMode
reference: CR3 SCEN LL_USART_ConfigAsyncMode
CR3 IREN LL_USART_ConfigAsyncMode
CR3 HDSEL LL_USART_ConfigAsyncMode
LL_USART_ConfigLINMode
Function name __STATIC_INLINE void LL_USART_ConfigLINMode
(USART_TypeDef * USARTx)
Function description Perform basic configuration of USART for enabling use in LIN
Mode.
Parameters USARTx: USART Instance
Return values None
Notes In LIN mode, the following bits must be kept cleared: STOP
and CLKEN bits in the USART_CR2 register,SCEN bit in the
USART_CR3 register (if Smartcard feature is
supported),IREN bit in the USART_CR3 register (if Irda
feature is supported),HDSEL bit in the USART_CR3 register.
This function also set the UART/USART in LIN mode.
LL_USART_ConfigHalfDuplexMode
Function name __STATIC_INLINE void LL_USART_ConfigHalfDuplexMode
(USART_TypeDef * USARTx)
Function description Perform basic configuration of USART for enabling use in Half
Duplex Mode.
Parameters USARTx: USART Instance
Return values None
Notes In Half Duplex mode, the following bits must be kept cleared:
LINEN bit in the USART_CR2 register (if LIN feature is
supported),CLKEN bit in the USART_CR2 register,SCEN bit
in the USART_CR3 register (if Smartcard feature is
supported),IREN bit in the USART_CR3 register (if Irda
feature is supported), This function also sets the
UART/USART in Half Duplex mode.
Macro IS_UART_HALFDUPLEX_INSTANCE(USARTx) can
be used to check whether or not Half-Duplex mode is
supported by the USARTx instance.
Call of this function is equivalent to following function call
sequence : Clear LINEN in CR2 using
LL_USART_DisableLIN() function (if LIN feature is
supported)Clear CLKEN in CR2 using
LL_USART_DisableSCLKOutput() functionClear SCEN in
CR3 using LL_USART_DisableSmartcard() function (if
Smartcard feature is supported)Clear IREN in CR3 using
LL_USART_DisableIrda() function (if Irda feature is
supported)Set HDSEL in CR3 using
LL_USART_EnableHalfDuplex() function
Other remaining configurations items related to Half Duplex
LL_USART_ConfigSmartcardMode
Function name __STATIC_INLINE void LL_USART_ConfigSmartcardMode
(USART_TypeDef * USARTx)
Function description Perform basic configuration of USART for enabling use in
Smartcard Mode.
Parameters USARTx: USART Instance
Return values None
Notes In Smartcard mode, the following bits must be kept cleared:
LINEN bit in the USART_CR2 register (if LIN feature is
supported),IREN bit in the USART_CR3 register (if Irda
feature is supported),HDSEL bit in the USART_CR3 register.
This function also configures Stop bits to 1.5 bits and sets the
USART in Smartcard mode (SCEN bit). Clock Output is also
enabled (CLKEN).
Macro IS_SMARTCARD_INSTANCE(USARTx) can be used
to check whether or not Smartcard feature is supported by the
USARTx instance.
Call of this function is equivalent to following function call
sequence : Clear LINEN in CR2 using
LL_USART_DisableLIN() function (if LIN feature is
supported)Clear IREN in CR3 using LL_USART_DisableIrda()
function (if Irda feature is supported)Clear HDSEL in CR3
using LL_USART_DisableHalfDuplex() functionConfigure
STOP in CR2 using LL_USART_SetStopBitsLength()
functionSet CLKEN in CR2 using
LL_USART_EnableSCLKOutput() functionSet SCEN in CR3
using LL_USART_EnableSmartcard() function
Other remaining configurations items related to Smartcard
Mode (as Baud Rate, Word length, Parity, ...) should be set
using dedicated functions
Reference Manual to CR2 LINEN LL_USART_ConfigSmartcardMode
LL API cross CR2 STOP LL_USART_ConfigSmartcardMode
reference: CR2 CLKEN LL_USART_ConfigSmartcardMode
CR3 HDSEL LL_USART_ConfigSmartcardMode
CR3 SCEN LL_USART_ConfigSmartcardMode
LL_USART_ConfigIrdaMode
Function name __STATIC_INLINE void LL_USART_ConfigIrdaMode
(USART_TypeDef * USARTx)
Function description Perform basic configuration of USART for enabling use in Irda
LL_USART_ConfigMultiProcessMode
Function name __STATIC_INLINE void LL_USART_ConfigMultiProcessMode
(USART_TypeDef * USARTx)
Function description Perform basic configuration of USART for enabling use in Multi
processor Mode (several USARTs connected in a network, one of
the USARTs can be the master, its TX output connected to the RX
inputs of the other slaves USARTs).
Parameters USARTx: USART Instance
Return values None
Notes In MultiProcessor mode, the following bits must be kept
cleared: LINEN bit in the USART_CR2 register (if LIN feature
is supported),CLKEN bit in the USART_CR2 register,SCEN
bit in the USART_CR3 register (if Smartcard feature is
supported),IREN bit in the USART_CR3 register (if Irda
feature is supported),HDSEL bit in the USART_CR3 register.
Call of this function is equivalent to following function call
LL_USART_IsActiveFlag_PE
Function name __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_PE
(USART_TypeDef * USARTx)
Function description Check if the USART Parity Error Flag is set or not.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR PE LL_USART_IsActiveFlag_PE
LL API cross
reference:
LL_USART_IsActiveFlag_FE
Function name __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_FE
(USART_TypeDef * USARTx)
Function description Check if the USART Framing Error Flag is set or not.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR FE LL_USART_IsActiveFlag_FE
LL API cross
reference:
LL_USART_IsActiveFlag_NE
Function name __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_NE
(USART_TypeDef * USARTx)
Function description Check if the USART Noise error detected Flag is set or not.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
LL_USART_IsActiveFlag_ORE
Function name __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_ORE
(USART_TypeDef * USARTx)
Function description Check if the USART OverRun Error Flag is set or not.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR ORE LL_USART_IsActiveFlag_ORE
LL API cross
reference:
LL_USART_IsActiveFlag_IDLE
Function name __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_IDLE
(USART_TypeDef * USARTx)
Function description Check if the USART IDLE line detected Flag is set or not.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR IDLE LL_USART_IsActiveFlag_IDLE
LL API cross
reference:
LL_USART_IsActiveFlag_RXNE
Function name __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_RXNE
(USART_TypeDef * USARTx)
Function description Check if the USART Read Data Register Not Empty Flag is set or
not.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR RXNE LL_USART_IsActiveFlag_RXNE
LL API cross
reference:
LL_USART_IsActiveFlag_TC
Function name __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_TC
(USART_TypeDef * USARTx)
Function description Check if the USART Transmission Complete Flag is set or not.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
LL_USART_IsActiveFlag_TXE
Function name __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_TXE
(USART_TypeDef * USARTx)
Function description Check if the USART Transmit Data Register Empty Flag is set or
not.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR TXE LL_USART_IsActiveFlag_TXE
LL API cross
reference:
LL_USART_IsActiveFlag_LBD
Function name __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_LBD
(USART_TypeDef * USARTx)
Function description Check if the USART LIN Break Detection Flag is set or not.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Notes Macro IS_UART_LIN_INSTANCE(USARTx) can be used to
check whether or not LIN feature is supported by the USARTx
instance.
Reference Manual to ISR LBDF LL_USART_IsActiveFlag_LBD
LL API cross
reference:
LL_USART_IsActiveFlag_nCTS
Function name __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_nCTS
(USART_TypeDef * USARTx)
Function description Check if the USART CTS interrupt Flag is set or not.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Notes Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be
used to check whether or not Hardware Flow control feature
is supported by the USARTx instance.
Reference Manual to ISR CTSIF LL_USART_IsActiveFlag_nCTS
LL API cross
reference:
LL_USART_IsActiveFlag_RTO
Function name __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_RTO
(USART_TypeDef * USARTx)
Function description Check if the USART Receiver Time Out Flag is set or not.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR RTOF LL_USART_IsActiveFlag_RTO
LL API cross
reference:
LL_USART_IsActiveFlag_EOB
Function name __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_EOB
(USART_TypeDef * USARTx)
Function description Check if the USART End Of Block Flag is set or not.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Notes Macro IS_SMARTCARD_INSTANCE(USARTx) can be used
to check whether or not Smartcard feature is supported by the
USARTx instance.
Reference Manual to ISR EOBF LL_USART_IsActiveFlag_EOB
LL API cross
reference:
LL_USART_IsActiveFlag_ABRE
Function name __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_ABRE
(USART_TypeDef * USARTx)
Function description Check if the USART Auto-Baud Rate Error Flag is set or not.
Parameters USARTx: USART Instance
LL_USART_IsActiveFlag_ABR
Function name __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_ABR
(USART_TypeDef * USARTx)
Function description Check if the USART Auto-Baud Rate Flag is set or not.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Notes Macro
IS_USART_AUTOBAUDRATE_DETECTION_INSTANCE(USA
RTx) can be used to check whether or not Auto Baud Rate
detection feature is supported by the USARTx instance.
Reference Manual ISR ABRF LL_USART_IsActiveFlag_ABR
to LL API cross
reference:
LL_USART_IsActiveFlag_BUSY
Function name __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_BUSY
(USART_TypeDef * USARTx)
Function description Check if the USART Busy Flag is set or not.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR BUSY LL_USART_IsActiveFlag_BUSY
LL API cross
reference:
LL_USART_IsActiveFlag_CM
Function name __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_CM
(USART_TypeDef * USARTx)
Function description Check if the USART Character Match Flag is set or not.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR CMF LL_USART_IsActiveFlag_CM
LL API cross
reference:
LL_USART_IsActiveFlag_RWU
Function name __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_RWU
(USART_TypeDef * USARTx)
Function description Check if the USART Receive Wake Up from mute mode Flag is set
or not.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR RWU LL_USART_IsActiveFlag_RWU
LL API cross
reference:
LL_USART_IsActiveFlag_WKUP
Function name __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_WKUP
(USART_TypeDef * USARTx)
Function description Check if the USART Wake Up from stop mode Flag is set or not.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Notes Macro
IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can
be used to check whether or not Wake-up from Stop mode
feature is supported by the USARTx instance.
Reference Manual to ISR WUF LL_USART_IsActiveFlag_WKUP
LL API cross
reference:
LL_USART_IsActiveFlag_TEACK
Function name __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_TEACK
(USART_TypeDef * USARTx)
Function description Check if the USART Transmit Enable Acknowledge Flag is set or
not.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
LL_USART_IsActiveFlag_REACK
Function name __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_REACK
(USART_TypeDef * USARTx)
Function description Check if the USART Receive Enable Acknowledge Flag is set or
not.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Reference Manual to ISR REACK LL_USART_IsActiveFlag_REACK
LL API cross
reference:
LL_USART_ClearFlag_PE
Function name __STATIC_INLINE void LL_USART_ClearFlag_PE
(USART_TypeDef * USARTx)
Function description Clear Parity Error Flag.
Parameters USARTx: USART Instance
Return values None
Reference Manual to ICR PECF LL_USART_ClearFlag_PE
LL API cross
reference:
LL_USART_ClearFlag_FE
Function name __STATIC_INLINE void LL_USART_ClearFlag_FE
(USART_TypeDef * USARTx)
Function description Clear Framing Error Flag.
Parameters USARTx: USART Instance
Return values None
Reference Manual to ICR FECF LL_USART_ClearFlag_FE
LL API cross
reference:
LL_USART_ClearFlag_NE
Function name __STATIC_INLINE void LL_USART_ClearFlag_NE
(USART_TypeDef * USARTx)
Function description Clear Noise detected Flag.
Parameters USARTx: USART Instance
Return values None
LL_USART_ClearFlag_ORE
Function name __STATIC_INLINE void LL_USART_ClearFlag_ORE
(USART_TypeDef * USARTx)
Function description Clear OverRun Error Flag.
Parameters USARTx: USART Instance
Return values None
Reference Manual to ICR ORECF LL_USART_ClearFlag_ORE
LL API cross
reference:
LL_USART_ClearFlag_IDLE
Function name __STATIC_INLINE void LL_USART_ClearFlag_IDLE
(USART_TypeDef * USARTx)
Function description Clear IDLE line detected Flag.
Parameters USARTx: USART Instance
Return values None
Reference Manual to ICR IDLECF LL_USART_ClearFlag_IDLE
LL API cross
reference:
LL_USART_ClearFlag_TC
Function name __STATIC_INLINE void LL_USART_ClearFlag_TC
(USART_TypeDef * USARTx)
Function description Clear Transmission Complete Flag.
Parameters USARTx: USART Instance
Return values None
Reference Manual to ICR TCCF LL_USART_ClearFlag_TC
LL API cross
reference:
LL_USART_ClearFlag_nCTS
Function name __STATIC_INLINE void LL_USART_ClearFlag_nCTS
(USART_TypeDef * USARTx)
Function description Clear CTS Interrupt Flag.
Parameters USARTx: USART Instance
Return values None
Notes Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be
used to check whether or not Hardware Flow control feature
is supported by the USARTx instance.
Reference Manual to ICR CTSCF LL_USART_ClearFlag_nCTS
LL API cross
reference:
LL_USART_ClearFlag_RTO
Function name __STATIC_INLINE void LL_USART_ClearFlag_RTO
(USART_TypeDef * USARTx)
Function description Clear Receiver Time Out Flag.
Parameters USARTx: USART Instance
Return values None
Reference Manual to ICR RTOCF LL_USART_ClearFlag_RTO
LL API cross
reference:
LL_USART_ClearFlag_EOB
Function name __STATIC_INLINE void LL_USART_ClearFlag_EOB
(USART_TypeDef * USARTx)
Function description Clear End Of Block Flag.
Parameters USARTx: USART Instance
LL_USART_ClearFlag_CM
Function name __STATIC_INLINE void LL_USART_ClearFlag_CM
(USART_TypeDef * USARTx)
Function description Clear Character Match Flag.
Parameters USARTx: USART Instance
Return values None
Reference Manual to ICR CMCF LL_USART_ClearFlag_CM
LL API cross
reference:
LL_USART_ClearFlag_WKUP
Function name __STATIC_INLINE void LL_USART_ClearFlag_WKUP
(USART_TypeDef * USARTx)
Function description Clear Wake Up from stop mode Flag.
Parameters USARTx: USART Instance
Return values None
Notes Macro
IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can
be used to check whether or not Wake-up from Stop mode
feature is supported by the USARTx instance.
Reference Manual to ICR WUCF LL_USART_ClearFlag_WKUP
LL API cross
reference:
LL_USART_EnableIT_IDLE
Function name __STATIC_INLINE void LL_USART_EnableIT_IDLE
(USART_TypeDef * USARTx)
Function description Enable IDLE Interrupt.
Parameters USARTx: USART Instance
Return values None
Reference Manual to CR1 IDLEIE LL_USART_EnableIT_IDLE
LL API cross
reference:
LL_USART_EnableIT_TC
Function name __STATIC_INLINE void LL_USART_EnableIT_TC
(USART_TypeDef * USARTx)
Function description Enable Transmission Complete Interrupt.
Parameters USARTx: USART Instance
Return values None
Reference Manual to CR1 TCIE LL_USART_EnableIT_TC
LL API cross
reference:
LL_USART_EnableIT_TXE
Function name __STATIC_INLINE void LL_USART_EnableIT_TXE
(USART_TypeDef * USARTx)
Function description Enable TX Empty Interrupt.
Parameters USARTx: USART Instance
Return values None
Reference Manual to CR1 TXEIE LL_USART_EnableIT_TXE
LL API cross
reference:
LL_USART_EnableIT_PE
Function name __STATIC_INLINE void LL_USART_EnableIT_PE
(USART_TypeDef * USARTx)
Function description Enable Parity Error Interrupt.
Parameters USARTx: USART Instance
Return values None
Reference Manual to CR1 PEIE LL_USART_EnableIT_PE
LL API cross
reference:
LL_USART_EnableIT_RTO
Function name __STATIC_INLINE void LL_USART_EnableIT_RTO
(USART_TypeDef * USARTx)
Function description Enable Receiver Timeout Interrupt.
Parameters USARTx: USART Instance
Return values None
Reference Manual to CR1 RTOIE LL_USART_EnableIT_RTO
LL API cross
reference:
LL_USART_EnableIT_EOB
Function name __STATIC_INLINE void LL_USART_EnableIT_EOB
(USART_TypeDef * USARTx)
Function description Enable End Of Block Interrupt.
Parameters USARTx: USART Instance
Return values None
Notes Macro IS_SMARTCARD_INSTANCE(USARTx) can be used
to check whether or not Smartcard feature is supported by the
USARTx instance.
Reference Manual to CR1 EOBIE LL_USART_EnableIT_EOB
LL API cross
reference:
LL_USART_EnableIT_ERROR
Function name __STATIC_INLINE void LL_USART_EnableIT_ERROR
(USART_TypeDef * USARTx)
Function description Enable Error Interrupt.
Parameters USARTx: USART Instance
Return values None
Notes When set, Error Interrupt Enable Bit is enabling interrupt
generation in case of a framing error, overrun error or noise
flag (FE=1 or ORE=1 or NF=1 in the USARTx_ISR register).
0: Interrupt is inhibited 1: An interrupt is generated when
FE=1 or ORE=1 or NF=1 in the USARTx_ISR register.
Reference Manual to CR3 EIE LL_USART_EnableIT_ERROR
LL API cross
reference:
LL_USART_EnableIT_CTS
Function name __STATIC_INLINE void LL_USART_EnableIT_CTS
(USART_TypeDef * USARTx)
Function description Enable CTS Interrupt.
Parameters USARTx: USART Instance
Return values None
Notes Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be
used to check whether or not Hardware Flow control feature
is supported by the USARTx instance.
Reference Manual to CR3 CTSIE LL_USART_EnableIT_CTS
LL API cross
reference:
LL_USART_DisableIT_IDLE
Function name __STATIC_INLINE void LL_USART_DisableIT_IDLE
(USART_TypeDef * USARTx)
Function description Disable IDLE Interrupt.
Parameters USARTx: USART Instance
Return values None
Reference Manual to CR1 IDLEIE LL_USART_DisableIT_IDLE
LL API cross
reference:
LL_USART_DisableIT_RXNE
Function name __STATIC_INLINE void LL_USART_DisableIT_RXNE
(USART_TypeDef * USARTx)
Function description Disable RX Not Empty Interrupt.
Parameters USARTx: USART Instance
Return values None
Reference Manual to CR1 RXNEIE LL_USART_DisableIT_RXNE
LL API cross
reference:
LL_USART_DisableIT_TXE
Function name __STATIC_INLINE void LL_USART_DisableIT_TXE
(USART_TypeDef * USARTx)
Function description Disable TX Empty Interrupt.
Parameters USARTx: USART Instance
Return values None
Reference Manual to CR1 TXEIE LL_USART_DisableIT_TXE
LL API cross
reference:
LL_USART_DisableIT_PE
Function name __STATIC_INLINE void LL_USART_DisableIT_PE
(USART_TypeDef * USARTx)
Function description Disable Parity Error Interrupt.
Parameters USARTx: USART Instance
Return values None
Reference Manual to CR1 PEIE LL_USART_DisableIT_PE
LL API cross
reference:
LL_USART_DisableIT_CM
Function name __STATIC_INLINE void LL_USART_DisableIT_CM
(USART_TypeDef * USARTx)
Function description Disable Character Match Interrupt.
Parameters USARTx: USART Instance
Return values None
Reference Manual to CR1 CMIE LL_USART_DisableIT_CM
LL API cross
reference:
LL_USART_DisableIT_EOB
Function name __STATIC_INLINE void LL_USART_DisableIT_EOB
(USART_TypeDef * USARTx)
Function description Disable End Of Block Interrupt.
Parameters USARTx: USART Instance
Return values None
Notes Macro IS_SMARTCARD_INSTANCE(USARTx) can be used
to check whether or not Smartcard feature is supported by the
USARTx instance.
Reference Manual to CR1 EOBIE LL_USART_DisableIT_EOB
LL API cross
reference:
LL_USART_DisableIT_LBD
Function name __STATIC_INLINE void LL_USART_DisableIT_LBD
(USART_TypeDef * USARTx)
Function description Disable LIN Break Detection Interrupt.
Parameters USARTx: USART Instance
Return values None
Notes Macro IS_UART_LIN_INSTANCE(USARTx) can be used to
check whether or not LIN feature is supported by the USARTx
instance.
Reference Manual to CR2 LBDIE LL_USART_DisableIT_LBD
LL API cross
reference:
LL_USART_DisableIT_ERROR
Function name __STATIC_INLINE void LL_USART_DisableIT_ERROR
(USART_TypeDef * USARTx)
Function description Disable Error Interrupt.
Parameters USARTx: USART Instance
LL_USART_DisableIT_CTS
Function name __STATIC_INLINE void LL_USART_DisableIT_CTS
(USART_TypeDef * USARTx)
Function description Disable CTS Interrupt.
Parameters USARTx: USART Instance
Return values None
Notes Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be
used to check whether or not Hardware Flow control feature
is supported by the USARTx instance.
Reference Manual to CR3 CTSIE LL_USART_DisableIT_CTS
LL API cross
reference:
LL_USART_DisableIT_WKUP
Function name __STATIC_INLINE void LL_USART_DisableIT_WKUP
(USART_TypeDef * USARTx)
Function description Disable Wake Up from Stop Mode Interrupt.
Parameters USARTx: USART Instance
Return values None
Notes Macro
IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can
be used to check whether or not Wake-up from Stop mode
feature is supported by the USARTx instance.
Reference Manual to CR3 WUFIE LL_USART_DisableIT_WKUP
LL API cross
reference:
LL_USART_IsEnabledIT_IDLE
Function name __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_IDLE
(USART_TypeDef * USARTx)
Function description Check if the USART IDLE Interrupt source is enabled or disabled.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
LL_USART_IsEnabledIT_RXNE
Function name __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_RXNE
(USART_TypeDef * USARTx)
Function description Check if the USART RX Not Empty Interrupt is enabled or
disabled.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Reference Manual to CR1 RXNEIE LL_USART_IsEnabledIT_RXNE
LL API cross
reference:
LL_USART_IsEnabledIT_TC
Function name __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_TC
(USART_TypeDef * USARTx)
Function description Check if the USART Transmission Complete Interrupt is enabled
or disabled.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Reference Manual to CR1 TCIE LL_USART_IsEnabledIT_TC
LL API cross
reference:
LL_USART_IsEnabledIT_TXE
Function name __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_TXE
(USART_TypeDef * USARTx)
Function description Check if the USART TX Empty Interrupt is enabled or disabled.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Reference Manual to CR1 TXEIE LL_USART_IsEnabledIT_TXE
LL API cross
reference:
LL_USART_IsEnabledIT_PE
Function name __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_PE
(USART_TypeDef * USARTx)
Function description Check if the USART Parity Error Interrupt is enabled or disabled.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
LL_USART_IsEnabledIT_CM
Function name __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_CM
(USART_TypeDef * USARTx)
Function description Check if the USART Character Match Interrupt is enabled or
disabled.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Reference Manual to CR1 CMIE LL_USART_IsEnabledIT_CM
LL API cross
reference:
LL_USART_IsEnabledIT_RTO
Function name __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_RTO
(USART_TypeDef * USARTx)
Function description Check if the USART Receiver Timeout Interrupt is enabled or
disabled.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Reference Manual to CR1 RTOIE LL_USART_IsEnabledIT_RTO
LL API cross
reference:
LL_USART_IsEnabledIT_EOB
Function name __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_EOB
(USART_TypeDef * USARTx)
Function description Check if the USART End Of Block Interrupt is enabled or disabled.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Notes Macro IS_SMARTCARD_INSTANCE(USARTx) can be used
to check whether or not Smartcard feature is supported by the
USARTx instance.
Reference Manual to CR1 EOBIE LL_USART_IsEnabledIT_EOB
LL API cross
reference:
LL_USART_IsEnabledIT_LBD
Function name __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_LBD
(USART_TypeDef * USARTx)
Function description Check if the USART LIN Break Detection Interrupt is enabled or
LL_USART_IsEnabledIT_ERROR
Function name __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_ERROR
(USART_TypeDef * USARTx)
Function description Check if the USART Error Interrupt is enabled or disabled.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Reference Manual to CR3 EIE LL_USART_IsEnabledIT_ERROR
LL API cross
reference:
LL_USART_IsEnabledIT_CTS
Function name __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_CTS
(USART_TypeDef * USARTx)
Function description Check if the USART CTS Interrupt is enabled or disabled.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Notes Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be
used to check whether or not Hardware Flow control feature
is supported by the USARTx instance.
Reference Manual to CR3 CTSIE LL_USART_IsEnabledIT_CTS
LL API cross
reference:
LL_USART_IsEnabledIT_WKUP
Function name __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_WKUP
(USART_TypeDef * USARTx)
Function description Check if the USART Wake Up from Stop Mode Interrupt is enabled
or disabled.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Notes Macro
IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can
LL_USART_EnableDMAReq_RX
Function name __STATIC_INLINE void LL_USART_EnableDMAReq_RX
(USART_TypeDef * USARTx)
Function description Enable DMA Mode for reception.
Parameters USARTx: USART Instance
Return values None
Reference Manual to CR3 DMAR LL_USART_EnableDMAReq_RX
LL API cross
reference:
LL_USART_DisableDMAReq_RX
Function name __STATIC_INLINE void LL_USART_DisableDMAReq_RX
(USART_TypeDef * USARTx)
Function description Disable DMA Mode for reception.
Parameters USARTx: USART Instance
Return values None
Reference Manual to CR3 DMAR LL_USART_DisableDMAReq_RX
LL API cross
reference:
LL_USART_IsEnabledDMAReq_RX
Function name __STATIC_INLINE uint32_t LL_USART_IsEnabledDMAReq_RX
(USART_TypeDef * USARTx)
Function description Check if DMA Mode is enabled for reception.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Reference Manual to CR3 DMAR LL_USART_IsEnabledDMAReq_RX
LL API cross
reference:
LL_USART_EnableDMAReq_TX
Function name __STATIC_INLINE void LL_USART_EnableDMAReq_TX
(USART_TypeDef * USARTx)
Function description Enable DMA Mode for transmission.
Parameters USARTx: USART Instance
LL_USART_DisableDMAReq_TX
Function name __STATIC_INLINE void LL_USART_DisableDMAReq_TX
(USART_TypeDef * USARTx)
Function description Disable DMA Mode for transmission.
Parameters USARTx: USART Instance
Return values None
Reference Manual to CR3 DMAT LL_USART_DisableDMAReq_TX
LL API cross
reference:
LL_USART_IsEnabledDMAReq_TX
Function name __STATIC_INLINE uint32_t LL_USART_IsEnabledDMAReq_TX
(USART_TypeDef * USARTx)
Function description Check if DMA Mode is enabled for transmission.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Reference Manual to CR3 DMAT LL_USART_IsEnabledDMAReq_TX
LL API cross
reference:
LL_USART_EnableDMADeactOnRxErr
Function name __STATIC_INLINE void LL_USART_EnableDMADeactOnRxErr
(USART_TypeDef * USARTx)
Function description Enable DMA Disabling on Reception Error.
Parameters USARTx: USART Instance
Return values None
Reference Manual to CR3 DDRE LL_USART_EnableDMADeactOnRxErr
LL API cross
reference:
LL_USART_DisableDMADeactOnRxErr
Function name __STATIC_INLINE void LL_USART_DisableDMADeactOnRxErr
(USART_TypeDef * USARTx)
Function description Disable DMA Disabling on Reception Error.
Parameters USARTx: USART Instance
Return values None
LL_USART_IsEnabledDMADeactOnRxErr
Function name __STATIC_INLINE uint32_t
LL_USART_IsEnabledDMADeactOnRxErr (USART_TypeDef *
USARTx)
Function description Indicate if DMA Disabling on Reception Error is disabled.
Parameters USARTx: USART Instance
Return values State: of bit (1 or 0).
Reference Manual to CR3 DDRE LL_USART_IsEnabledDMADeactOnRxErr
LL API cross
reference:
LL_USART_DMA_GetRegAddr
Function name __STATIC_INLINE uint32_t LL_USART_DMA_GetRegAddr
(USART_TypeDef * USARTx, uint32_t Direction)
Function description Get the data register address used for DMA transfer.
Parameters USARTx: USART Instance
Direction: This parameter can be one of the following
values:
LL_USART_DMA_REG_DATA_TRANSMIT
LL_USART_DMA_REG_DATA_RECEIVE
Return values Address: of data register
Reference Manual to RDR RDR LL_USART_DMA_GetRegAddr
LL API cross
reference: TDR TDR LL_USART_DMA_GetRegAddr
LL_USART_ReceiveData8
Function name __STATIC_INLINE uint8_t LL_USART_ReceiveData8
(USART_TypeDef * USARTx)
Function description Read Receiver Data register (Receive Data value, 8 bits)
Parameters USARTx: USART Instance
Return values Value: between Min_Data=0x00 and Max_Data=0xFF
Reference Manual to RDR RDR LL_USART_ReceiveData8
LL API cross
reference:
LL_USART_ReceiveData9
Function name __STATIC_INLINE uint16_t LL_USART_ReceiveData9
(USART_TypeDef * USARTx)
Function description Read Receiver Data register (Receive Data value, 9 bits)
LL_USART_TransmitData8
Function name __STATIC_INLINE void LL_USART_TransmitData8
(USART_TypeDef * USARTx, uint8_t Value)
Function description Write in Transmitter Data Register (Transmit Data value, 8 bits)
Parameters USARTx: USART Instance
Value: between Min_Data=0x00 and Max_Data=0xFF
Return values None
Reference Manual to TDR TDR LL_USART_TransmitData8
LL API cross
reference:
LL_USART_TransmitData9
Function name __STATIC_INLINE void LL_USART_TransmitData9
(USART_TypeDef * USARTx, uint16_t Value)
Function description Write in Transmitter Data Register (Transmit Data value, 9 bits)
Parameters USARTx: USART Instance
Value: between Min_Data=0x00 and Max_Data=0x1FF
Return values None
Reference Manual to TDR TDR LL_USART_TransmitData9
LL API cross
reference:
LL_USART_RequestAutoBaudRate
Function name __STATIC_INLINE void LL_USART_RequestAutoBaudRate
(USART_TypeDef * USARTx)
Function description Request an Automatic Baud Rate measurement on next received
data frame.
Parameters USARTx: USART Instance
Return values None
Notes Macro
IS_USART_AUTOBAUDRATE_DETECTION_INSTANCE(USA
RTx) can be used to check whether or not Auto Baud Rate
detection feature is supported by the USARTx instance.
Reference Manual RQR ABRRQ LL_USART_RequestAutoBaudRate
to LL API cross
reference:
LL_USART_RequestEnterMuteMode
Function name __STATIC_INLINE void LL_USART_RequestEnterMuteMode
(USART_TypeDef * USARTx)
Function description Put USART in mute mode and set the RWU flag.
Parameters USARTx: USART Instance
Return values None
Reference Manual to RQR MMRQ LL_USART_RequestEnterMuteMode
LL API cross
reference:
LL_USART_RequestRxDataFlush
Function name __STATIC_INLINE void LL_USART_RequestRxDataFlush
(USART_TypeDef * USARTx)
Function description Request a Receive Data flush.
Parameters USARTx: USART Instance
Return values None
Reference Manual to RQR RXFRQ LL_USART_RequestRxDataFlush
LL API cross
reference:
LL_USART_DeInit
Function name ErrorStatus LL_USART_DeInit (USART_TypeDef * USARTx)
Function description De-initialize USART registers (Registers restored to their default
values).
Parameters USARTx: USART Instance
Return values An: ErrorStatus enumeration value:
SUCCESS: USART registers are de-initialized
ERROR: USART registers are not de-initialized
LL_USART_Init
Function name ErrorStatus LL_USART_Init (USART_TypeDef * USARTx,
LL_USART_InitTypeDef * USART_InitStruct)
Function description Initialize USART registers according to the specified parameters in
USART_InitStruct.
Parameters USARTx: USART Instance
USART_InitStruct: pointer to a LL_USART_InitTypeDef
structure that contains the configuration information for the
specified USART peripheral.
Return values An: ErrorStatus enumeration value:
SUCCESS: USART registers are initialized according to
USART_InitStruct content
ERROR: Problem occurred during USART Registers
initialization
Notes As some bits in USART configuration registers can only be
written when the USART is disabled (USART_CR1_UE bit
=0), USART IP should be in disabled state prior calling this
function. Otherwise, ERROR result will be returned.
Baud rate value stored in USART_InitStruct BaudRate field,
should be valid (different from 0).
LL_USART_ClockInit
Function name ErrorStatus LL_USART_ClockInit (USART_TypeDef * USARTx,
LL_USART_ClockInitTypeDef * USART_ClockInitStruct)
Function description Initialize USART Clock related settings according to the specified
parameters in the USART_ClockInitStruct.
Parameters USARTx: USART Instance
USART_ClockInitStruct: pointer to a
LL_USART_ClockInitTypeDef structure that contains the
Clock configuration information for the specified USART
peripheral.
Return values An: ErrorStatus enumeration value:
SUCCESS: USART registers related to Clock settings
are initialized according to USART_ClockInitStruct
content
ERROR: Problem occurred during USART Registers
initialization
Notes As some bits in USART configuration registers can only be
written when the USART is disabled (USART_CR1_UE bit
=0), USART IP should be in disabled state prior calling this
function. Otherwise, ERROR result will be returned.
LL_USART_ClockStructInit
Function name void LL_USART_ClockStructInit
(LL_USART_ClockInitTypeDef * USART_ClockInitStruct)
Function description Set each field of a LL_USART_ClockInitTypeDef type structure to
default value.
Parameters USART_ClockInitStruct: pointer to a
LL_USART_ClockInitTypeDef structure whose fields will be
set to default values.
Return values None
69.1.2 LL_UTILS_ClkInitTypeDef
Data Fields
uint32_t AHBCLKDivider
uint32_t APB1CLKDivider
Field Documentation
uint32_t LL_UTILS_ClkInitTypeDef::AHBCLKDivider
The AHB clock (HCLK) divider. This clock is derived from the system clock (SYSCLK).
This parameter can be a value of RCC_LL_EC_SYSCLK_DIVThis feature can be
modified afterwards using unitary function LL_RCC_SetAHBPrescaler().
uint32_t LL_UTILS_ClkInitTypeDef::APB1CLKDivider
The APB1 clock (PCLK1) divider. This clock is derived from the AHB clock (HCLK).
This parameter can be a value of RCC_LL_EC_APB1_DIVThis feature can be
modified afterwards using unitary function LL_RCC_SetAPB1Prescaler().
LL_GetUID_Word0
Function name __STATIC_INLINE uint32_t LL_GetUID_Word0 (void )
Function description Get Word0 of the unique device identifier (UID based on 96 bits)
Return values UID[31:0]: X and Y coordinates on the wafer expressed in
BCD format
LL_GetUID_Word1
Function name __STATIC_INLINE uint32_t LL_GetUID_Word1 (void )
Function description Get Word1 of the unique device identifier (UID based on 96 bits)
Return values UID[63:32]: Wafer number (UID[39:32]) & LOT_NUM[23:0]
(UID[63:40])
LL_GetUID_Word2
Function name __STATIC_INLINE uint32_t LL_GetUID_Word2 (void )
Function description Get Word2 of the unique device identifier (UID based on 96 bits)
Return values UID[95:64]: Lot number (ASCII encoded) - LOT_NUM[55:24]
LL_GetFlashSize
Function name __STATIC_INLINE uint32_t LL_GetFlashSize (void )
Function description Get Flash memory size.
Return values FLASH_SIZE[15:0]: Flash memory size
Notes This bitfield indicates the size of the device Flash memory
expressed in Kbytes. As an example, 0x040 corresponds to
64 Kbytes.
LL_InitTick
Function name __STATIC_INLINE void LL_InitTick (uint32_t HCLKFrequency,
uint32_t Ticks)
Function description This function configures the Cortex-M SysTick source of the time
base.
Parameters HCLKFrequency: HCLK frequency in Hz (can be calculated
thanks to RCC helper macro)
Ticks: Number of ticks
Return values None
Notes When a RTOS is used, it is recommended to avoid changing
the SysTick configuration by calling this function, for a delay
use rather osDelay RTOS service.
LL_mDelay
Function name void LL_mDelay (uint32_t Delay)
Function description This function provides accurate delay (in milliseconds) based on
SysTick counter flag.
Parameters Delay: specifies the delay time length, in milliseconds.
Return values None
Notes When a RTOS is used, it is recommended to avoid using
blocking delay and use rather osDelay service.
To respect 1ms timebase, user should call LL_Init1msTick
function which will configure Systick to 1ms
LL_SetSystemCoreClock
Function name void LL_SetSystemCoreClock (uint32_t HCLKFrequency)
Function description This function sets directly SystemCoreClock CMSIS variable.
Parameters HCLKFrequency: HCLK frequency in Hz (can be calculated
thanks to RCC helper macro)
Return values None
Notes Variable can be calculated also through
SystemCoreClockUpdate function.
LL_PLL_ConfigSystemClock_HSI
Function name ErrorStatus LL_PLL_ConfigSystemClock_HSI
(LL_UTILS_PLLInitTypeDef * UTILS_PLLInitStruct,
LL_UTILS_ClkInitTypeDef * UTILS_ClkInitStruct)
Function description This function configures system clock with HSI as clock source of
the PLL.
Parameters UTILS_PLLInitStruct: pointer to a
LL_UTILS_PLLInitTypeDef structure that contains the
configuration information for the PLL.
UTILS_ClkInitStruct: pointer to a LL_UTILS_ClkInitTypeDef
structure that contains the configuration information for the
LL_PLL_ConfigSystemClock_HSI48
Function name ErrorStatus LL_PLL_ConfigSystemClock_HSI48
(LL_UTILS_PLLInitTypeDef * UTILS_PLLInitStruct,
LL_UTILS_ClkInitTypeDef * UTILS_ClkInitStruct)
Function description This function configures system clock with HSI48 as clock source
of the PLL.
Parameters UTILS_PLLInitStruct: pointer to a
LL_UTILS_PLLInitTypeDef structure that contains the
configuration information for the PLL.
UTILS_ClkInitStruct: pointer to a LL_UTILS_ClkInitTypeDef
structure that contains the configuration information for the
BUS prescalers.
Return values An: ErrorStatus enumeration value:
SUCCESS: Max frequency configuration done
ERROR: Max frequency configuration not done
Notes The application need to ensure that PLL is disabled.
Function is based on the following formula: PLL output
frequency = ((HSI48 frequency / PREDIV) *
PLLMUL)PLLMUL: The application software must set
correctly the PLL multiplication factor to be in the range 16-
48MHz
LL_PLL_ConfigSystemClock_HSE
Function name ErrorStatus LL_PLL_ConfigSystemClock_HSE (uint32_t
HSEFrequency, uint32_t HSEBypass,
LL_UTILS_PLLInitTypeDef * UTILS_PLLInitStruct,
LL_UTILS_ClkInitTypeDef * UTILS_ClkInitStruct)
Function description This function configures system clock with HSE as clock source of
the PLL.
Parameters HSEFrequency: Value between Min_Data = 4000000 and
Max_Data = 32000000
HSEBypass: This parameter can be one of the following
values:
LL_UTILS_HSEBYPASS_ON
LL_UTILS_HSEBYPASS_OFF
UTILS_PLLInitStruct: pointer to a
LL_WWDG_Enable
Function name __STATIC_INLINE void LL_WWDG_Enable (WWDG_TypeDef *
WWDGx)
Function description Enable Window Watchdog.
Parameters WWDGx: WWDG Instance
Return values None
Notes It is enabled by setting the WDGA bit in the WWDG_CR
register, then it cannot be disabled again except by a reset.
This bit is set by software and only cleared by hardware after
a reset. When WDGA = 1, the watchdog can generate a
reset.
Reference Manual to CR WDGA LL_WWDG_Enable
LL API cross
reference:
LL_WWDG_IsEnabled
Function name __STATIC_INLINE uint32_t LL_WWDG_IsEnabled
(WWDG_TypeDef * WWDGx)
Function description Checks if Window Watchdog is enabled.
Parameters WWDGx: WWDG Instance
Return values State: of bit (1 or 0).
Reference Manual to CR WDGA LL_WWDG_IsEnabled
LL API cross
reference:
LL_WWDG_SetCounter
Function name __STATIC_INLINE void LL_WWDG_SetCounter
(WWDG_TypeDef * WWDGx, uint32_t Counter)
Function description Set the Watchdog counter value to provided value (7-bits T[6:0])
Parameters WWDGx: WWDG Instance
Counter: 0..0x7F (7 bit counter value)
Return values None
Notes When writing to the WWDG_CR register, always write 1 in the
MSB b6 to avoid generating an immediate reset This counter
is decremented every (4096 x 2expWDGTB) PCLK cycles A
reset is produced when it rolls over from 0x40 to 0x3F (bit T6
LL_WWDG_GetCounter
Function name __STATIC_INLINE uint32_t LL_WWDG_GetCounter
(WWDG_TypeDef * WWDGx)
Function description Return current Watchdog Counter Value (7 bits counter value)
Parameters WWDGx: WWDG Instance
Return values 7: bit Watchdog Counter value
Reference Manual to CR T LL_WWDG_GetCounter
LL API cross
reference:
LL_WWDG_SetPrescaler
Function name __STATIC_INLINE void LL_WWDG_SetPrescaler
(WWDG_TypeDef * WWDGx, uint32_t Prescaler)
Function description Set the time base of the prescaler (WDGTB).
Parameters WWDGx: WWDG Instance
Prescaler: This parameter can be one of the following
values:
LL_WWDG_PRESCALER_1
LL_WWDG_PRESCALER_2
LL_WWDG_PRESCALER_4
LL_WWDG_PRESCALER_8
Return values None
Notes Prescaler is used to apply ratio on PCLK clock, so that
Watchdog counter is decremented every (4096 x
2expWDGTB) PCLK cycles
Reference Manual to CFR WDGTB LL_WWDG_SetPrescaler
LL API cross
reference:
LL_WWDG_GetPrescaler
Function name __STATIC_INLINE uint32_t LL_WWDG_GetPrescaler
(WWDG_TypeDef * WWDGx)
Function description Return current Watchdog Prescaler Value.
Parameters WWDGx: WWDG Instance
Return values Returned: value can be one of the following values:
LL_WWDG_PRESCALER_1
LL_WWDG_PRESCALER_2
LL_WWDG_PRESCALER_4
LL_WWDG_SetWindow
Function name __STATIC_INLINE void LL_WWDG_SetWindow
(WWDG_TypeDef * WWDGx, uint32_t Window)
Function description Set the Watchdog Window value to be compared to the
downcounter (7-bits W[6:0]).
Parameters WWDGx: WWDG Instance
Window: 0x00..0x7F (7 bit Window value)
Return values None
Notes This window value defines when write in the WWDG_CR
register to program Watchdog counter is allowed. Watchdog
counter value update must occur only when the counter value
is lower than the Watchdog window register value. Otherwise,
a MCU reset is generated if the 7-bit Watchdog counter value
(in the control register) is refreshed before the downcounter
has reached the watchdog window register value. Physically
is possible to set the Window lower then 0x40 but it is not
recommended. To generate an immediate reset, it is possible
to set the Counter lower than 0x40.
Reference Manual to CFR W LL_WWDG_SetWindow
LL API cross
reference:
LL_WWDG_GetWindow
Function name __STATIC_INLINE uint32_t LL_WWDG_GetWindow
(WWDG_TypeDef * WWDGx)
Function description Return current Watchdog Window Value (7 bits value)
Parameters WWDGx: WWDG Instance
Return values 7: bit Watchdog Window value
Reference Manual to CFR W LL_WWDG_GetWindow
LL API cross
reference:
LL_WWDG_IsActiveFlag_EWKUP
Function name __STATIC_INLINE uint32_t LL_WWDG_IsActiveFlag_EWKUP
(WWDG_TypeDef * WWDGx)
Function description Indicates if the WWDG Early Wakeup Interrupt Flag is set or not.
Parameters WWDGx: WWDG Instance
Return values State: of bit (1 or 0).
Notes This bit is set by hardware when the counter has reached the
LL_WWDG_ClearFlag_EWKUP
Function name __STATIC_INLINE void LL_WWDG_ClearFlag_EWKUP
(WWDG_TypeDef * WWDGx)
Function description Clear WWDG Early Wakeup Interrupt Flag (EWIF)
Parameters WWDGx: WWDG Instance
Return values None
Reference Manual to SR EWIF LL_WWDG_ClearFlag_EWKUP
LL API cross
reference:
LL_WWDG_EnableIT_EWKUP
Function name __STATIC_INLINE void LL_WWDG_EnableIT_EWKUP
(WWDG_TypeDef * WWDGx)
Function description Enable the Early Wakeup Interrupt.
Parameters WWDGx: WWDG Instance
Return values None
Notes When set, an interrupt occurs whenever the counter reaches
value 0x40. This interrupt is only cleared by hardware after a
reset
Reference Manual to CFR EWI LL_WWDG_EnableIT_EWKUP
LL API cross
reference:
LL_WWDG_IsEnabledIT_EWKUP
Function name __STATIC_INLINE uint32_t LL_WWDG_IsEnabledIT_EWKUP
(WWDG_TypeDef * WWDGx)
Function description Check if Early Wakeup Interrupt is enabled.
Parameters WWDGx: WWDG Instance
Return values State: of bit (1 or 0).
Reference Manual to CFR EWI LL_WWDG_IsEnabledIT_EWKUP
LL API cross
reference:
71.2 BUS
Table 26: Correspondence between BUS registers and BUS low-layer driver functions
Register Field Function
LL_AHB1_GRP1_DisableClock
CRCEN LL_AHB1_GRP1_EnableClock
LL_AHB1_GRP1_IsEnabledClock
LL_AHB1_GRP1_DisableClock
DMA1EN LL_AHB1_GRP1_EnableClock
LL_AHB1_GRP1_IsEnabledClock
LL_AHB1_GRP1_DisableClock
DMA2EN LL_AHB1_GRP1_EnableClock
LL_AHB1_GRP1_IsEnabledClock
LL_AHB1_GRP1_DisableClock
FLITFEN LL_AHB1_GRP1_EnableClock
LL_AHB1_GRP1_IsEnabledClock
LL_AHB1_GRP1_DisableClock
GPIOAEN LL_AHB1_GRP1_EnableClock
LL_AHB1_GRP1_IsEnabledClock
AHBENR LL_AHB1_GRP1_DisableClock
GPIOBEN LL_AHB1_GRP1_EnableClock
LL_AHB1_GRP1_IsEnabledClock
LL_AHB1_GRP1_DisableClock
GPIOCEN LL_AHB1_GRP1_EnableClock
LL_AHB1_GRP1_IsEnabledClock
LL_AHB1_GRP1_DisableClock
GPIODEN LL_AHB1_GRP1_EnableClock
LL_AHB1_GRP1_IsEnabledClock
LL_AHB1_GRP1_DisableClock
GPIOEEN LL_AHB1_GRP1_EnableClock
LL_AHB1_GRP1_IsEnabledClock
LL_AHB1_GRP1_DisableClock
GPIOFEN LL_AHB1_GRP1_EnableClock
LL_AHB1_GRP1_IsEnabledClock
SRAMEN LL_AHB1_GRP1_DisableClock
71.3 COMP
Table 27: Correspondence between COMP registers and COMP low-layer driver functions
Register Field Function
LL_COMP_Disable
CSR COMP1EN
LL_COMP_Enable
71.4 CORTEX
Table 28: Correspondence between CORTEX registers and CORTEX low-layer driver functions
Register Field Function
ARCHITECTURE LL_CPUID_GetArchitecture
SCB_CPUID IMPLEMENTER LL_CPUID_GetImplementer
PARTNO LL_CPUID_GetParNo
71.5 CRC
Table 29: Correspondence between CRC registers and CRC low-layer driver functions
Register Field Function
LL_CRC_GetPolynomialSize
POLYSIZE
LL_CRC_SetPolynomialSize
RESET LL_CRC_ResetCRCCalculationUnit
CR LL_CRC_GetInputDataReverseMode
REV_IN
LL_CRC_SetInputDataReverseMode
LL_CRC_GetOutputDataReverseMode
REV_OUT
LL_CRC_SetOutputDataReverseMode
LL_CRC_FeedData16
LL_CRC_FeedData32
LL_CRC_FeedData8
DR DR LL_CRC_ReadData16
LL_CRC_ReadData32
LL_CRC_ReadData7
LL_CRC_ReadData8
LL_CRC_Read_IDR
IDR IDR
LL_CRC_Write_IDR
LL_CRC_GetInitialData
INIT INIT
LL_CRC_SetInitialData
71.6 CRS
Table 30: Correspondence between CRS registers and CRS low-layer driver functions
Register Field Function
LL_CRS_ConfigSynchronization
FELIM LL_CRS_GetFreqErrorLimit
LL_CRS_SetFreqErrorLimit
LL_CRS_ConfigSynchronization
RELOAD LL_CRS_GetReloadCounter
LL_CRS_SetReloadCounter
LL_CRS_ConfigSynchronization
CFGR SYNCDIV LL_CRS_GetSyncDivider
LL_CRS_SetSyncDivider
LL_CRS_ConfigSynchronization
SYNCPOL LL_CRS_GetSyncPolarity
LL_CRS_SetSyncPolarity
LL_CRS_ConfigSynchronization
SYNCSRC LL_CRS_GetSyncSignalSource
LL_CRS_SetSyncSignalSource
LL_CRS_DisableAutoTrimming
AUTOTRIMEN LL_CRS_EnableAutoTrimming
LL_CRS_IsEnabledAutoTrimming
LL_CRS_DisableFreqErrorCounter
CEN LL_CRS_EnableFreqErrorCounter
LL_CRS_IsEnabledFreqErrorCounter
LL_CRS_DisableIT_ERR
CR ERRIE LL_CRS_EnableIT_ERR
LL_CRS_IsEnabledIT_ERR
LL_CRS_DisableIT_ESYNC
ESYNCIE LL_CRS_EnableIT_ESYNC
LL_CRS_IsEnabledIT_ESYNC
SWSYNC LL_CRS_GenerateEvent_SWSYNC
LL_CRS_DisableIT_SYNCOK
SYNCOKIE
LL_CRS_EnableIT_SYNCOK
71.7 DAC
Table 31: Correspondence between DAC registers and DAC low-layer driver functions
Register Field Function
LL_DAC_GetOutputBuffer
BOFF1
LL_DAC_SetOutputBuffer
LL_DAC_GetOutputBuffer
BOFF2
LL_DAC_SetOutputBuffer
LL_DAC_DisableDMAReq
DMAEN1 LL_DAC_EnableDMAReq
CR
LL_DAC_IsDMAReqEnabled
LL_DAC_DisableDMAReq
DMAEN2 LL_DAC_EnableDMAReq
LL_DAC_IsDMAReqEnabled
LL_DAC_DisableIT_DMAUDR1
DMAUDRIE1
LL_DAC_EnableIT_DMAUDR1
71.8 DMA
Table 32: Correspondence between DMA registers and DMA low-layer driver functions
Register Field Function
LL_DMA_ConfigTransfer
CIRC LL_DMA_GetMode
LL_DMA_SetMode
LL_DMA_ConfigTransfer
DIR LL_DMA_GetDataTransferDirection
CCR
LL_DMA_SetDataTransferDirection
LL_DMA_DisableChannel
EN LL_DMA_EnableChannel
LL_DMA_IsEnabledChannel
HTIE LL_DMA_DisableIT_HT
71.9 EXTI
Table 33: Correspondence between EXTI registers and EXTI low-layer driver functions
Register Field Function
LL_EXTI_DisableEvent_0_31
EMR EMx LL_EXTI_EnableEvent_0_31
LL_EXTI_IsEnabledEvent_0_31
LL_EXTI_DisableFallingTrig_0_31
FTSR FTx LL_EXTI_EnableFallingTrig_0_31
LL_EXTI_IsEnabledFallingTrig_0_31
LL_EXTI_DisableIT_0_31
IMR IMx LL_EXTI_EnableIT_0_31
LL_EXTI_IsEnabledIT_0_31
LL_EXTI_ClearFlag_0_31
PR PIFx LL_EXTI_IsActiveFlag_0_31
LL_EXTI_ReadFlag_0_31
LL_EXTI_DisableRisingTrig_0_31
RTSR RTx LL_EXTI_EnableRisingTrig_0_31
LL_EXTI_IsEnabledRisingTrig_0_31
SWIER SWIx LL_EXTI_GenerateSWI_0_31
71.10 GPIO
Table 34: Correspondence between GPIO registers and GPIO low-layer driver functions
Register Field Function
LL_GPIO_GetAFPin_8_15
AFRH AFSELy
LL_GPIO_SetAFPin_8_15
LL_GPIO_GetAFPin_0_7
AFRL AFSELy
LL_GPIO_SetAFPin_0_7
BRR BRy LL_GPIO_ResetOutputPin
BSRR BSy LL_GPIO_SetOutputPin
LL_GPIO_IsInputPinSet
IDR IDy
LL_GPIO_ReadInputPort
LL_GPIO_IsAnyPinLocked
LCKK
LCKR LL_GPIO_LockPin
LCKy LL_GPIO_IsPinLocked
MODER MODEy LL_GPIO_GetPinMode
71.11 I2C
Table 35: Correspondence between I2C registers and I2C low-layer driver functions
Register Field Function
LL_I2C_DisableIT_ADDR
ADDRIE LL_I2C_EnableIT_ADDR
LL_I2C_IsEnabledIT_ADDR
LL_I2C_DisableSMBusAlert
ALERTEN LL_I2C_EnableSMBusAlert
LL_I2C_IsEnabledSMBusAlert
LL_I2C_ConfigFilters
LL_I2C_DisableAnalogFilter
ANFOFF
LL_I2C_EnableAnalogFilter
LL_I2C_IsEnabledAnalogFilter
CR1 LL_I2C_ConfigFilters
DNF LL_I2C_GetDigitalFilter
LL_I2C_SetDigitalFilter
LL_I2C_DisableIT_ERR
ERRIE LL_I2C_EnableIT_ERR
LL_I2C_IsEnabledIT_ERR
LL_I2C_DisableGeneralCall
GCEN LL_I2C_EnableGeneralCall
LL_I2C_IsEnabledGeneralCall
LL_I2C_DisableIT_NACK
NACKIE
LL_I2C_EnableIT_NACK
71.12 I2S
Table 36: Correspondence between I2S registers and I2S low-layer driver functions
Register Field Function
LL_I2S_DisableIT_ERR
ERRIE LL_I2S_EnableIT_ERR
LL_I2S_IsEnabledIT_ERR
LL_I2S_DisableDMAReq_RX
CR2
RXDMAEN LL_I2S_EnableDMAReq_RX
LL_I2S_IsEnabledDMAReq_RX
LL_I2S_DisableIT_RXNE
RXNEIE
LL_I2S_EnableIT_RXNE
71.13 IWDG
Table 37: Correspondence between IWDG registers and IWDG low-layer driver functions
Register Field Function
LL_IWDG_DisableWriteAccess
LL_IWDG_Enable
KR KEY
LL_IWDG_EnableWriteAccess
LL_IWDG_ReloadCounter
LL_IWDG_GetPrescaler
PR PR
LL_IWDG_SetPrescaler
LL_IWDG_GetReloadCounter
RLR RL
LL_IWDG_SetReloadCounter
LL_IWDG_IsActiveFlag_PVU
PVU
LL_IWDG_IsReady
LL_IWDG_IsActiveFlag_RVU
SR RVU
LL_IWDG_IsReady
LL_IWDG_IsActiveFlag_WVU
WVU
LL_IWDG_IsReady
LL_IWDG_GetWindow
WINR WIN
LL_IWDG_SetWindow
71.14 PWR
Table 38: Correspondence between PWR registers and PWR low-layer driver functions
Register Field Function
CSBF LL_PWR_ClearFlag_SB
CWUF LL_PWR_ClearFlag_WU
CR LL_PWR_DisableBkUpAccess
DBP LL_PWR_EnableBkUpAccess
LL_PWR_IsEnabledBkUpAccess
71.15 RCC
Table 39: Correspondence between RCC registers and RCC low-layer driver functions
Register Field Function
LL_RCC_ForceBackupDomainReset
BDRST
LL_RCC_ReleaseBackupDomainReset
LL_RCC_LSE_DisableBypass
LSEBYP
LL_RCC_LSE_EnableBypass
LL_RCC_LSE_GetDriveCapability
LSEDRV
LL_RCC_LSE_SetDriveCapability
LL_RCC_LSE_Disable
BDCR LSEON
LL_RCC_LSE_Enable
LSERDY LL_RCC_LSE_IsReady
LL_RCC_DisableRTC
RTCEN LL_RCC_EnableRTC
LL_RCC_IsEnabledRTC
LL_RCC_GetRTCClockSource
RTCSEL
LL_RCC_SetRTCClockSource
LL_RCC_GetAHBPrescaler
HPRE
LL_RCC_SetAHBPrescaler
MCO LL_RCC_ConfigMCO
MCOPRE LL_RCC_ConfigMCO
LL_RCC_PLL_ConfigDomain_SYS
PLLMUL
LL_RCC_PLL_GetMultiplicator
CFGR PLLNODIV LL_RCC_ConfigMCO
LL_RCC_PLL_ConfigDomain_SYS
PLLSRC
LL_RCC_PLL_GetMainSource
LL_RCC_GetAPB1Prescaler
PPRE
LL_RCC_SetAPB1Prescaler
SW LL_RCC_SetSysClkSource
SWS LL_RCC_GetSysClkSource
LL_RCC_PLL_ConfigDomain_SYS
CFGR2 PREDIV
LL_RCC_PLL_GetPrediv
71.16 RTC
Table 40: Correspondence between RTC registers and RTC low-layer driver functions
Register Field Function
LL_RTC_ALMA_GetDay
DT
LL_RTC_ALMA_SetDay
LL_RTC_ALMA_GetDay
LL_RTC_ALMA_GetWeekDay
DU
LL_RTC_ALMA_SetDay
LL_RTC_ALMA_SetWeekDay
LL_RTC_ALMA_ConfigTime
LL_RTC_ALMA_GetHour
HT
ALRMAR LL_RTC_ALMA_GetTime
LL_RTC_ALMA_SetHour
LL_RTC_ALMA_ConfigTime
LL_RTC_ALMA_GetHour
HU
LL_RTC_ALMA_GetTime
LL_RTC_ALMA_SetHour
LL_RTC_ALMA_ConfigTime
MNT LL_RTC_ALMA_GetMinute
LL_RTC_ALMA_GetTime
71.17 SPI
Table 41: Correspondence between SPI registers and SPI low-layer driver functions
Register Field Function
LL_SPI_GetTransferDirection
BIDIMODE
LL_SPI_SetTransferDirection
LL_SPI_GetTransferDirection
BIDIOE
LL_SPI_SetTransferDirection
LL_SPI_GetBaudRatePrescaler
BR
LL_SPI_SetBaudRatePrescaler
LL_SPI_GetClockPhase
CPHA
LL_SPI_SetClockPhase
CR1 LL_SPI_GetClockPolarity
CPOL
LL_SPI_SetClockPolarity
LL_SPI_DisableCRC
CRCEN LL_SPI_EnableCRC
LL_SPI_IsEnabledCRC
LL_SPI_GetCRCWidth
CRCL
LL_SPI_SetCRCWidth
CRCNEXT LL_SPI_SetCRCNext
LSBFIRST LL_SPI_GetTransferBitOrder
71.18 SYSTEM
Table 42: Correspondence between SYSTEM registers and SYSTEM low-layer driver functions
Register Field Function
LL_DBGMCU_APB1_GRP1_FreezePeriph
DBGMCU_APB1F DBG_CAN_STOP LL_DBGMCU_APB1_GRP1_UnFreezePerip
Z h
DBG_I2C1_SMBUS_TIMEOU LL_DBGMCU_APB1_GRP1_FreezePeriph
71.19 TIM
Table 43: Correspondence between TIM registers and TIM low-layer driver functions
Register Field Function
LL_TIM_GetAutoReload
ARR ARR
LL_TIM_SetAutoReload
LL_TIM_DisableAutomaticOutput
AOE LL_TIM_EnableAutomaticOutput
LL_TIM_IsEnabledAutomaticOutput
BDTR LL_TIM_DisableBRK
BKE
LL_TIM_EnableBRK
BKP LL_TIM_ConfigBRK
DTG LL_TIM_OC_SetDeadTime
71.20 USART
Table 44: Correspondence between USART registers and USART low-layer driver functions
Register Field Function
LL_USART_GetBaudRate
BRR BRR
LL_USART_SetBaudRate
LL_USART_DisableIT_CM
CMIE LL_USART_EnableIT_CM
CR1 LL_USART_IsEnabledIT_CM
LL_USART_GetDEAssertionTime
DEAT
LL_USART_SetDEAssertionTime
71.21 WWDG
Table 45: Correspondence between WWDG registers and WWDG low-layer driver functions
Register Field Function
72 FAQs
General subjects
What is the cost of using HAL drivers in term of code size and performance?
Like generic architecture drivers, the HAL drivers may induce firmware overhead.
This is due to the high abstraction level and ready-to-use APIs which allow data transfers,
errors management and offloads the user application from implementation details.
Architecture
Which header files should I include in my application to use the HAL drivers?
Only stm32f0xx_hal.h file has to be included.
When and how should I use callbacks functions (functions declared with the
attribute __weak)?
Use callback functions for the I/O operations used in DMA or interrupt mode. The PPP
process complete callbacks are called to inform the user about process completion in real-
time event mode (interrupts).
The Errors callbacks are called when a processing error occurs in DMA or interrupt mode.
These callbacks are customized by the user to add user proprietary code. They can be
declared in the application. Note that the same process completion callbacks are used for
DMA and interrupt mode.
Why do I need to configure the SysTick timer to use the HAL drivers?
The SysTick timer is configured to be used to generate variable increments by calling
HAL_IncTick() function in Systick ISR and retrieve the value of this variable by calling
HAL_GetTick() function.
The call HAL_GetTick() function is mandatory when using HAL drivers with Polling
Process or when using HAL_Delay().
73 Revision history
Table 46: Document revision history
Date Revision Changes
15-
Oct- 1 Initial release.
2014
Macros and functions renamed for all APIs.
09-
Updated common macros in Section 2.9: "HAL common resources".
Nov- 2
2015 Added LSE_STARTUP_TIMEOUT in Table 11: "Define statements used for
HAL configuration"
STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, enhancements, modifications, and
improvements to ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST
products before placing orders. ST products are sold pursuant to ST’s terms and conditions of sale in place at the time of order
acknowledgement.
Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the
design of Purchasers’ products.
Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product.
ST and the ST logo are trademarks of ST. All other product or service names are the property of their respective owners.
Information in this document supersedes and replaces information previously supplied in any prior versions of this document.