Difference between revisions of "STM32F107VC/GPIO"
m (Created page with "=General Purpose and Alternate Function I/O= 400px|thumb|right|Standard GPIO I/O bit [[Image:ARM GPIO 5v tolerant IO bit.png|400px|thumb|r...") |
(No difference)
|
Revision as of 08:35, 28 August 2011
General Purpose and Alternate Function I/O
GPIO functional description
Each of the general-purpose I/O ports has two 32-bit configuration registers (GPIOx_CRL, GPIOx_CRH), two 32-bit data registers (GPIOx_IDR, GPIOx_ODR), a 32-bit set/reset register (GPIOx_BSRR), a 16-bit reset register (GPIOx_BRR) and a 32-bit locking register (GPIOx_LCKR).
Subject to the specific hardware characteristics of each I/O port listed in the datasheet, each port bit of the General Purpose IO (GPIO) Ports, can be individually configured by software in several modes:
- Input floating
- Input pull-up
- Input-pull-down
- Analog
- Output open-drain
- Output push-pull
- Alternate function push-pull
- Alternate function open-drain
Each I/O port bit is freely programmable, however the I/O port registers have to be accessed as 32-bit words (half-word or byte accesses are not allowed). The purpose of the GPIOx_BSRR and GPIOx_BRR registers is to allow atomic read/modify accesses to any of the GPIO registers. This way, there is no risk that an IRQ occurs between the read and the modify access.
Detailed description
For detailed description see STM32F107VC Reference Manual Chapter 9.