PebbleOS v4.47.0-1312-gf1984a001
Loading...
Searching...
No Matches

The extended interrupt and event controller of the STM32H7: each line raises an interrupt of the NVIC, given by the tree, which lines may share. More...

Data Structures

struct  pbl_intc_stm32_exti_state
 State. More...
 
struct  pbl_intc_stm32_exti
 STM32H7 EXTI. More...
 
struct  pbl_intc_stm32_exti_parent
 An interrupt of the NVIC and the lines raising it. More...
 

Macros

#define PBL_INTC_STM32_EXTI_NO_PARENT   UINT16_MAX
 Line without an interrupt of the NVIC.
 
#define PBL_INTC_STM32_EXTI_WORDS   3U
 Words of the masks of the lines.
 
#define PBL_INTC_STM32_EXTI_PARENT(sym, _irq, ...)
 Connect an interrupt of the NVIC to the lines raising it.
 
#define PBL_INTC_STM32_EXTI_DEFINE(sym, _name, _base, _hwlock, _connect, ...)
 Define the EXTI.
 

Detailed Description

The extended interrupt and event controller of the STM32H7: each line raises an interrupt of the NVIC, given by the tree, which lines may share.

Configurable lines latch their edges, direct ones, given with PBL_IRQ_TYPE_LEVEL_HIGH, pass a peripheral interrupt through and only wake the core. A line unmasked on one core is busy for the other.

A configurable line only latches an edge while unmasked, so disabling it leaves it unmasked: an edge it then takes masks it, and enabling it again raises that edge once more.


Data Structure Documentation

◆ pbl_intc_stm32_exti_state

struct pbl_intc_stm32_exti_state

State.

Data Fields
uint32_t direct[PBL_INTC_STM32_EXTI_WORDS] Lines configured as direct ones.
uint32_t disabled[PBL_INTC_STM32_EXTI_WORDS] Lines requested and disabled.
uint32_t missed[PBL_INTC_STM32_EXTI_WORDS] Configurable lines that took an edge while disabled.

◆ pbl_intc_stm32_exti

struct pbl_intc_stm32_exti

STM32H7 EXTI.

Data Fields
uintptr_t base Registers.
struct pbl_hwspinlock hwlock Lock of the registers shared with the other core.
struct pbl_intc intc Interrupt controller.
const uint16_t * parents Interrupt of the NVIC each line raises.
struct pbl_intc_stm32_exti_state * state State.

◆ pbl_intc_stm32_exti_parent

struct pbl_intc_stm32_exti_parent

An interrupt of the NVIC and the lines raising it.

Data Fields
const struct pbl_intc_stm32_exti * exti Controller.
uint32_t lines[PBL_INTC_STM32_EXTI_WORDS] Lines.

Macro Definition Documentation

◆ PBL_INTC_STM32_EXTI_DEFINE

#define PBL_INTC_STM32_EXTI_DEFINE (   sym,
  _name,
  _base,
  _hwlock,
  _connect,
  ... 
)
Value:
extern const struct pbl_intc_stm32_exti sym##_inst; \
static const uint16_t sym##_parents[] = {__VA_ARGS__}; \
static_assert(PBL_ARRAY_SIZE(sym##_parents) <= PBL_INTC_STM32_EXTI_WORDS * 32U); \
static struct pbl_intc_stm32_exti_state sym##_exti_state; \
PBL_INTC_STATE_DEFINE(sym, PBL_ARRAY_SIZE(sym##_parents)); \
_connect PBL_DEVICE_INSTANCE(sym, struct pbl_intc_stm32_exti, struct pbl_intc, intc) { \
.intc = PBL_INTC_INIT(sym, _name, nullptr, nullptr, &pbl_intc_stm32_exti_ops), \
.base = (_base), .hwlock = _hwlock, .parents = sym##_parents, .state = &sym##_exti_state, \
}
#define PBL_DEVICE_INSTANCE(sym, type, class_type, member)
Start the definition of a registered instance, followed by its initializer.
Definition device.h:243
STM32H7 EXTI.
Definition stm32_exti.h:45
State.
Definition stm32_exti.h:35
#define PBL_INTC_STM32_EXTI_WORDS
Words of the masks of the lines.
Definition stm32_exti.h:32
An interrupt controller.
Definition intc.h:94
#define PBL_INTC_INIT(sym, _name, _init, _parent, _ops)
Initializer for the struct pbl_intc of controller sym.
Definition intc.h:128
#define PBL_ARRAY_SIZE(array)
Get the number of elements of an array.
Definition size.h:40

Define the EXTI.

Parameters
symSymbol.
_nameDevice name.
_baseRegisters.
_hwlockLock, from PBL_HWSPINLOCK(), or PBL_HWSPINLOCK_NONE.
_connectPBL_INTC_STM32_EXTI_PARENT() of each interrupt of the NVIC.
...Interrupt of the NVIC of each line, PBL_INTC_STM32_EXTI_NO_PARENT for none.

◆ PBL_INTC_STM32_EXTI_NO_PARENT

#define PBL_INTC_STM32_EXTI_NO_PARENT   UINT16_MAX

Line without an interrupt of the NVIC.

◆ PBL_INTC_STM32_EXTI_PARENT

#define PBL_INTC_STM32_EXTI_PARENT (   sym,
  _irq,
  ... 
)
Value:
static const struct pbl_intc_stm32_exti_parent sym##_parent_##_irq = { \
.exti = &sym##_inst, \
.lines = {__VA_ARGS__}, \
}; \
PBL_IRQ_CONNECT_NUM(_irq, CONFIG_INTC_STM32_EXTI_IRQ_PRIO, pbl_intc_stm32_exti_isr, \
&sym##_parent_##_irq, 0);
const struct pbl_intc_stm32_exti * exti
Controller.
Definition stm32_exti.h:61
An interrupt of the NVIC and the lines raising it.
Definition stm32_exti.h:59

Connect an interrupt of the NVIC to the lines raising it.

Parameters
symSymbol of the controller.
_irqInterrupt.
...Mask of the lines, as words.

◆ PBL_INTC_STM32_EXTI_WORDS

#define PBL_INTC_STM32_EXTI_WORDS   3U

Words of the masks of the lines.