STM32 RTOS 0.2.3
Bare-metal preemptive RTOS for STM32F446RE
Loading...
Searching...
No Matches
syscfg_reg.h File Reference

SYSCFG registers: EXTI line routing and the I/O compensation cell (RM0390 section 8.2). More...

#include <stdint.h>
Include dependency graph for syscfg_reg.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  SyscfgRegisters_t
 SYSCFG register block. More...

Macros

#define SYSCFG_BASE   (0x40013800UL)
 SYSCFG base address (APB2).
#define SYSCFG   ((SyscfgRegisters_t *)SYSCFG_BASE)
 The SYSCFG instance.
EXTICR port selectors

EXTI line n is selected by the 4-bit rw field at bit (n % 4) * 4 of EXTICR[n / 4].

GPIOH has only pins 0 and 1, so PH is valid only for lines 0 and 1.

#define SYSCFG_EXTICR_PA   (0x0U)
 GPIOA.
#define SYSCFG_EXTICR_PB   (0x1U)
 GPIOB.
#define SYSCFG_EXTICR_PC   (0x2U)
 GPIOC.
#define SYSCFG_EXTICR_PD   (0x3U)
 GPIOD.
#define SYSCFG_EXTICR_PE   (0x4U)
 GPIOE.
#define SYSCFG_EXTICR_PF   (0x5U)
 GPIOF.
#define SYSCFG_EXTICR_PG   (0x6U)
 GPIOG.
#define SYSCFG_EXTICR_PH   (0x7U)
 GPIOH.
CMPCR - compensation cell control (0x20)
#define SYSCFG_CMPCR_CMP_PD_Pos   (0U)
 Bit 0.
#define SYSCFG_CMPCR_CMP_PD   ((uint32_t)1U << SYSCFG_CMPCR_CMP_PD_Pos)
  rw Compensation cell on (1) or powered down (0).
#define SYSCFG_CMPCR_READY_Pos   (8U)
 Bit 8.
#define SYSCFG_CMPCR_READY   ((uint32_t)1U << SYSCFG_CMPCR_READY_Pos)
  ro Compensation cell ready.

Typedefs

typedef struct SyscfgRegisters_t SyscfgRegisters_t
 SYSCFG register block.

Detailed Description

SYSCFG registers: EXTI line routing and the I/O compensation cell (RM0390 section 8.2).

Accessible only once RCC_APB2ENR_SYSCFGEN is set. MEMRMP and PMC are laid out but not given bit macros; SYSCFG_CFGR (0x2C) is not modelled.

Definition in file syscfg_reg.h.