RTEMS 6.1-rc6
|
EXTI HAL module driver. This file provides firmware functions to manage the following functionalities of the General Purpose Input/Output (EXTI) peripheral: More...
#include "stm32h7xx_hal.h"
EXTI HAL module driver. This file provides firmware functions to manage the following functionalities of the General Purpose Input/Output (EXTI) peripheral:
Copyright (c) 2017 STMicroelectronics. All rights reserved.
This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.
============================================================================== ##### EXTI Peripheral features ##### ============================================================================== [..] (+) Each Exti line can be configured within this driver. (+) Exti line can be configured in 3 different modes (++) Interrupt (CORE1 or CORE2 in case of dual core line ) (++) Event (CORE1 or CORE2 in case of dual core line ) (++) a combination of the previous (+) Configurable Exti lines can be configured with 3 different triggers (++) Rising (++) Falling (++) Both of them (+) When set in interrupt mode, configurable Exti lines have two diffenrents interrupt pending registers which allow to distinguish which transition occurs: (++) Rising edge pending interrupt (++) Falling (+) Exti lines 0 to 15 are linked to gpio pin number 0 to 15. Gpio port can be selected through multiplexer. (+) PendClearSource used to set the D3 Smart Run Domain autoamtic pend clear source. It is applicable for line with wkaeup target is Any (CPU1 , CPU2 and D3 smart run domain). Value can be one of the following: (++) EXTI_D3_PENDCLR_SRC_NONE : no pend clear source is selected : In this case corresponding bit of D2PMRx register is set to 0 (+++) On a configurable Line : the D3 domain wakeup signal is automatically cleared after after the Delay + Rising Edge detect (+++) On a direct Line : the D3 domain wakeup signal is cleared after the direct event input signal is cleared (++) EXTI_D3_PENDCLR_SRC_DMACH6 : no pend clear source is selected : In this case corresponding bit of D2PMRx register is set to 1 and corresponding bits(2) of D3PCRxL/H is set to b00 : DMA ch6 event selected as D3 domain pendclear source (++) EXTI_D3_PENDCLR_SRC_DMACH7 : no pend clear source is selected : In this case corresponding bit of D2PMRx register is set to 1 and corresponding bits(2) of D3PCRxL/H is set to b01 : DMA ch7 event selected as D3 domain pendclear source (++) EXTI_D3_PENDCLR_SRC_LPTIM4 : no pend clear source is selected : In this case corresponding bit of D2PMRx register is set to 1 and corresponding bits(2) of D3PCRxL/H is set to b10 : LPTIM4 out selected as D3 domain pendclear source (++) EXTI_D3_PENDCLR_SRC_LPTIM5 : no pend clear source is selected : In this case corresponding bit of D2PMRx register is set to 1 and corresponding bits(2) of D3PCRxL/H is set to b11 : LPTIM5 out selected as D3 domain pendclear source ##### How to use this driver ##### ============================================================================== [..] (#) Configure the EXTI line using HAL_EXTI_SetConfigLine(). (++) Choose the interrupt line number by setting "Line" member from EXTI_ConfigTypeDef structure. (++) Configure the interrupt and/or event mode using "Mode" member from EXTI_ConfigTypeDef structure. (++) For configurable lines, configure rising and/or falling trigger "Trigger" member from EXTI_ConfigTypeDef structure. (++) For Exti lines linked to gpio, choose gpio port using "GPIOSel" member from GPIO_InitTypeDef structure. (++) For Exti lines with wkaeup target is Any (CPU1 , CPU2 and D3 smart run domain), choose gpio D3 PendClearSource using PendClearSource member from EXTI_PendClear_Source structure. (#) Get current Exti configuration of a dedicated line using HAL_EXTI_GetConfigLine(). (++) Provide exiting handle as parameter. (++) Provide pointer on EXTI_ConfigTypeDef structure as second parameter. (#) Clear Exti configuration of a dedicated line using HAL_EXTI_ClearConfigLine(). (++) Provide exiting handle as parameter. (#) Register callback to treat Exti interrupts using HAL_EXTI_RegisterCallback(). (++) Provide exiting handle as first parameter. (++) Provide which callback will be registered using one value from EXTI_CallbackIDTypeDef. (++) Provide callback function pointer. (#) Get interrupt pending bit using HAL_EXTI_GetPending(). (#) Clear interrupt pending bit using HAL_EXTI_ClearPending(). (#) Generate software interrupt using HAL_EXTI_GenerateSWI().