Embedded Systems Fundamentals · Interview question

You configured a GPIO pin correctly but it does nothing. What's the first thing to check?

A strong answer

Whether the port's peripheral clock is enabled in RCC. MCUs gate the clock to every peripheral off by default to save power, and a GPIO port with no clock won't respond, you can write MODER/ODR and see no effect, and reads may return zero. The fix is to set the GPIOx-enable bit in the appropriate RCC AHB/APB enable register before configuring the port. After that, check the obvious config: is MODER set to output (01) for an output, or input (00) with the right PUPDR for an input; for an LED, is it actually wired the way you think (active-high vs active-low, current-limiting resistor present); and if it's meant to be a peripheral pin, is MODER set to alternate-function with the correct AFR selection rather than plain output. But the first and most common culprit, especially for newcomers, is the missing RCC clock enable.

What a weak answer sounds like

You know the answer. Do you know what gets you dinged?

Pro breaks down the answer most candidates actually give to this question — and the specific reason an interviewer marks it down. It’s the difference between sounding correct and sounding senior, on all 472 questions.

From the lesson

GPIO: Digital I/O

Reading buttons and driving LEDs: configuring a pin's direction, push-pull vs open-drain outputs, pull-up/down inputs, and why a floating input reads noise.

More GPIO: Digital I/O questions

Browse all 472 interview questions
You configured a GPIO pin correctly but it does nothing. What's the first thing to check? | EmbeddedPrep.io