Skip to content

image-20240821205726450

image-20240821204602607

image-20241128193825656

image-20241128193515352

image-20241128193537614

image-20241128193555100


image-20240821204802405

image-20240821204820850

image-20241128191226588

image-20240821204922474

image-20241126193526805

image-20240821205034468

image-20240821205202629

image-20240821205227843

image-20240821205313512

image-20240824122513456

image-20240824133256590

GPIO CONCEPS

Input configuration

for input mode, the output will be disabled

NOTICE * if pull up and pull down register is disabled, the input will be noisy

Output configuration

for GPIO output, there’re two configuration mode * PUSH PULL * OPEN DRAIN

alt text

PUSH PULL

push pull uses P-MOS and N-MOS to select which circuit to output

OPEN DRAIN

open drain only uses N-MOS, causing output has 2 states: HIGH(zero) or FLOAT(random)

SPEEP

control rise time & down time


Driver API Requirement

  • GPIO initialization
  • Enable/Disable GPIO port clock
  • Read From a GPIO
  • Write to GPIO Pin
  • Configure alternative functionality
  • Interrupt handling

Initalize

What should initialize do for GPIO?

* 
*