

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


These problems are for practice only and are not graded. They may be in a style similar to the midterm but are not guaranteed to be the same questions.
Write out the acronym.
What is the port and pin of the USER button? What is the port and pin of the blue LED (LD2)? What is the number of discrete output levels of a 12-bit ADC? What GPIO register sets or resets output pins in a single write? What GPIO register holds the current state of the input pins? What RCC register enables the clocks for the GPIO ports? How many bits are needed in the GPIOx_MODER to configure one pin?
What interrupt handler is shared by EXTI lines 5 through 9?
Perform the operation(s) and answer in hexadecimal (32-bit hex answer).
Describe in one sentence what each line does on the Nucleo-144 board.
CPEG222 Fall 2026 Midterm Practice Page 1
Reset value: 0xA800 0000 for port A, 0x0000 0280 for port B, 0x0000 0000 for other ports
Bits 2y:2y+1 MODERy[1:0]: Port x configuration bits (y = 0..15). These bits are written by software to configure the I/O direction mode.
00: Input (reset state) 01: General-purpose output mode 10: Alternate function mode 11: Analog mode
2.To set PB0 and PB7 to output, you would use GPIOB->MODER |= 0x__________ (32-bit hex)
CPEG222 Fall 2026 Midterm Practice Page 2