0% found this document useful (0 votes)
11 views5 pages

Mcu 5

MMIO reads and writes to hardware registers can cause peripherals to begin or end operations by reading or clearing interrupt flags. GPIO pins represent bits in memory that can be configured as inputs or outputs to control lights or trigger interrupts for events like a button press or radio transmission. GPIO operations are lightweight for debugging code execution and timer intervals by connecting a pin to an oscilloscope.

Uploaded by

kferraro
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views5 pages

Mcu 5

MMIO reads and writes to hardware registers can cause peripherals to begin or end operations by reading or clearing interrupt flags. GPIO pins represent bits in memory that can be configured as inputs or outputs to control lights or trigger interrupts for events like a button press or radio transmission. GPIO operations are lightweight for debugging code execution and timer intervals by connecting a pin to an oscilloscope.

Uploaded by

kferraro
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Reading and writing with MMIO is not

like talking to RAM


• MMIO reads and writes hardware device registers
• Reads and write to registers can cause peripherals
to begin or end an operation
• By reading data, it may cause the hardware to do
something!!!
– E.g., Clear an interrupt flag, get the next byte on a bus
• By writing data, it may cause the hardware to do
something with it
– E.g., Send this data over the UART bus
GPIOs are the general digital I/O device
Each GPIO pin represents one bit in memory: if the pin is on it’s a 1, off it’s a 0
That bit can be an input or an output

• GPIOs can be used to control lights (light on or off), but even more

• Indicating that an event just happened


– Interrupt the radio to tell it to transmit data
– Interrupt the CPU to tell it a button was pressed
– Read pin status to receive configuration messages

• Debugging
– Did this one part of my code actually execute?
– Is the timer firing at the interval that I expect it to fire (connect GPIO to oscilloscope)?
– Why using GPIO?
• GPIO ops are lightweight
Topology of a GPIO pin
GPIO Configurations
A fun extra feature: Drive Strength

You might also like