mFrame
載入中...
搜尋中...
無符合項目
Usage

Pin Control Register Array.

Pin Control Register ArrayArray of Pin Control Registers (PCR) for individual pin configuration. Each PCR controls the complete electrical and functional configuration of a single pin including multiplexing, pull resistors, drive strength, and other characteristics.

引腳控制暫存器陣列,用於個別引腳的完整配置

Each PCR contains bit fields for:

Array is irregular - not all indices correspond to valid pins
Pin availability varies by package and PORT instance
Register index directly corresponds to physical pin number
Locked registers (LK=1) cannot be modified until reset

:

// Configure pin 5 as GPIO with pull-up
port->pcr[5] = (GPIO << 8) | (1 << 2) | (3 << 0);
// Configure pin 10 for alternate function 2 with high drive strength
port->pcr[10] = (ALT2 << 8) | (1 << 6);
警告
Verify pin availability before accessing PCR array elements
Respect lock status - locked pins cannot be reconfigured
Invalid pin indices may cause bus faults or undefined behavior
參閱
mcxa153::chip::port::Config for structured PCR configuration
MCXA153 Pin Mapping Tables for valid pin assignments
Individual pin configuration enumerations for bit field values