Embedded Systems Engineer
Microcontrollers and peripherals questions
244 questions on Microcontrollers and peripherals for embedded systems engineers, easiest first.
Easy 71
- Why use volatileeasy
- Protocol with addresseseasy
- Floating input pineasy
- Keeping ISRs shorteasy
- PWM duty cycleeasy
- Clearing one register biteasy
- Toggling an LED pineasy
- Testing a status flageasy
- Converting an ADC readingeasy
- UART bytes per secondeasy
- Why I2C needs pull-upseasy
- Talking to two SPI deviceseasy
- Timer prescaler mathseasy
- The interrupt vector tableeasy
- Sizing an LED resistoreasy
- CAN bus terminationeasy
- Why enable brown-out reseteasy
- A register access macroeasy
- Garbage characters on the consoleeasy
- I2C lines sitting at 0 Veasy
- What a watchdog timer doeseasy
- UART idle line leveleasy
- Kicking the watchdog in a timer ISReasy
- Doing heavy work in an ISReasy
- printf inside an interrupteasy
- One press, many interruptseasy
- What an open-drain output can doeasy
- Button wired to ground with pull-upeasy
- Meaning of an NRST pineasy
- Setting bit 5 of a registereasy
- GPIO alternate function modeeasy
- Polling versus interruptseasy
- Hooking an ISR in CMSIS startup codeeasy
- 16-bit timer overflow timeeasy
- Why UART is called asynchronouseasy
- SPI shifts both ways at onceeasy
- Size of the 7-bit I2C address spaceeasy
- Why CAN uses two wireseasy
- Purpose of a DMA controllereasy
- What a watchdog timer protects againsteasy
- Steps in a 12-bit ADCeasy
- Light sleep compared with deep sleepeasy
- Edge versus level triggered inputseasy
- Two interrupts at different prioritieseasy
- Crystal or internal RC oscillatoreasy
- PLL output frequencyeasy
- Peripheral registers ignore writeseasy
- Memory-mapped peripheral registerseasy
- What lives in flash and SRAMeasy
- What 8N1 meanseasy
- Choosing RS-485 over TTL UARTeasy
- Running a DC motor from a pineasy
- Diode across a relay coileasy
- A 5 V sensor output into a 3.3 V MCUeasy
- PWM frequency from timer settingseasy
- What SysTick is used foreasy
- Using the built-in ROM bootloadereasy
- SWD compared with JTAGeasy
- Byte order of a 32-bit valueeasy
- Saving RAM with a lookup tableeasy
- What interrupt latency measureseasy
- Role of the ADC reference voltageeasy
- Width of a standard CAN IDeasy
- UART line when nothing is senteasy
- Why I2C has a repeated starteasy
- Schmitt trigger on a GPIO inputeasy
- Capacitors next to each VDD pineasy
- Where a FreeRTOS timer callback runseasy
- Deferring ISR work in Zephyreasy
- Putting the CPU to sleep when idleeasy
- Signalling a Zephyr thread from an ISReasy
Medium 98
- Buffering UART datamedium
- I2C device not respondingmedium
- Counter shared with an ISRmedium
- SPI returns garbagemedium
- One press, many eventsmedium
- Bit-fields for hardware registersmedium
- Measuring a signal frequencymedium
- Waking a task from an ISRmedium
- Slave holds SCL lowmedium
- Reading from an SPI slavemedium
- UART framing errorsmedium
- Who wins CAN arbitrationmedium
- Stuck in Default_Handlermedium
- Unused pins and sleep currentmedium
- Clock speed and powermedium
- Atomic GPIO writesmedium
- Cortex-M interrupt priority numbersmedium
- Feeding the watchdog with an RTOSmedium
- const and volatile togethermedium
- A struct over peripheral registersmedium
- App dies on first interruptmedium
- Counter read gives odd valuesmedium
- Lost GPIO pin changesmedium
- Debugger drops in low-power modemedium
- Interrupts stop during erasemedium
- Why did it resetmedium
- Halted in Default_Handlermedium
- Board stuck at clock setupmedium
- Blocking call in an ISRmedium
- Watchdog for many tasksmedium
- Reset from refreshing too soonmedium
- RTOS tick in a sleepy devicemedium
- Measuring sleep and burst currentmedium
- Probe stops the oscillatormedium
- SPI data off by one bitmedium
- Independent watchdog for safetymedium
- Battery voltage from an ADC countmedium
- What SPI mode 3 meansmedium
- Datasheet gives address 0xD0medium
- NACK at the end of an I2C readmedium
- Baud error with an integer dividermedium
- Reading a quadrature encodermedium
- Center-aligned PWM periodmedium
- Dead time in a half bridgemedium
- Continuous ADC capture with DMAmedium
- DMA increment settings for UART TXmedium
- ADC reads low from a 100 kΩ dividermedium
- Extra resolution by oversamplingmedium
- Refreshing a window watchdog too earlymedium
- Independent watchdog timeoutmedium
- Code runs slow after waking from stopmedium
- Where code resumes after standbymedium
- WFI compared with WFEmedium
- Sleep-on-exit for an event-driven appmedium
- Why RTC crystals are 32.768 kHzmedium
- Time quanta in a CAN bitmedium
- CAN FD payload sizemedium
- A CAN node alone on the busmedium
- Which IDs a CAN filter acceptsmedium
- Estimating CAN bus loadmedium
- CAN bit stuffingmedium
- Second SPI slave breaks the firstmedium
- What RTS/CTS flow control doesmedium
- Receiving variable-length UART messagesmedium
- UART overrun errormedium
- RS-485 reply loses its last bytemedium
- GPIO speed setting for a slow LEDmedium
- Interrupts on PA0 and PB0medium
- Preemption priority versus subprioritymedium
- Tail-chaining on Cortex-Mmedium
- Registers saved on interrupt entrymedium
- Nested disable and enable of interruptsmedium
- Masking only some interruptsmedium
- Work done before mainmedium
- Raising clock speed and flash latencymedium
- Writing over existing flash datamedium
- Saving a counter to flash every minutemedium
- Exact ADC sample ratemedium
- SysTick reload for a 1 ms tickmedium
- Battery voltage from an ADC codemedium
- Current through a held buttonmedium
- Distance from an ultrasonic echomedium
- Centring a hobby servomedium
- Sleep current high only under debugmedium
- Board hangs without the debuggermedium
- HAL_Delay inside an interruptmedium
- Why did the field unit rebootmedium
- Why portYIELD_FROM_ISR is neededmedium
- Setting event bits from an ISRmedium
- Blocking inside a timer callbackmedium
- xTimerStart returns pdFAILmedium
- A 2.5 ms software timermedium
- Context of a Zephyr k_timer expiry functionmedium
- Running a job 500 ms later in Zephyrmedium
- An interrupt the kernel never masksmedium
- Lock-free ring buffer from ISR to taskmedium
- Long critical section and interrupt latencymedium
- Priority of an interrupt handler taskmedium
Hard 75
- Random HardFaultshard
- DMA data looks stalehard
- Battery dies too fasthard
- Reading a 32-bit fieldhard
- Missed motor control interruptshard
- Packed struct crashes a Cortex-M0hard
- ISR runs twice per eventhard
- Taking a mutex in an ISRhard
- A CAN node goes silenthard
- I2C bus stuck after resethard
- A phantom 100 Hz signalhard
- Jitter in a control loop ISRhard
- FromISR call from a high priority ISRhard
- Sleep current 60 times too highhard
- The tick keeps waking the CPUhard
- Timestamp jumps backwardshard
- Bit-band alias addresseshard
- Baud rate error from roundinghard
- Crystal stops in the fieldhard
- Aligning a relocated vector tablehard
- Receiving frames of unknown lengthhard
- FromISR call trips an asserthard
- DMA data looks stale on M7hard
- Battery life from duty cyclehard
- Critical section loses byteshard
- Update resets halfway throughhard
- Largest pull-up for 400 kHz I2Chard
- ADC reads low through a dividerhard
- Elapsed ticks across a timer wraphard
- Clearing an EXTI flag with |=hard
- Bit-band alias of an SRAM bithard
- Jumping from bootloader to apphard
- PWM glitch when changing the periodhard
- Battery life of a duty-cycled nodehard
- Longest SysTick period at 168 MHzhard
- Porting BASEPRI code to Cortex-M0hard
- Timing an ISR in CPU cycleshard
- Finding the line that faultedhard
- Imprecise bus fault addresshard
- SPI chip select released too earlyhard
- Write position in a circular UART DMA bufferhard
- Time to read 6 bytes over I2Chard
- Time to send 4 KB over SPIhard
- Two CAN nodes using the same IDhard
- Stack frame with FPU contexthard
- Catching stack overflow with the MPUhard
- Watchdog resets a sleeping devicehard
- Phantom interrupts from a long cablehard
- Calling printf from an ISRhard
- ADC noise synced to PWMhard
- External crystal fails in the fieldhard
- USB fails on the internal oscillatorhard
- Setting STM32 read protection level 2hard
- Negative swing on an ADC pinhard
- One ADC channel affects anotherhard
- Errors on a long 500 kbit/s CAN bushard
- RTC loses 2 minutes a monthhard
- DMA buffer declared as a localhard
- ADC DMA data size mismatchhard
- Receiving UART data while in stop modehard
- Missed wake-up just before sleephard
- Timeouts fail in HAL callbackshard
- Devices fail to boot on weak batterieshard
- Reading stale data after a flash writehard
- Pump turns on briefly at power-uphard
- A precise 10 µs trigger pulsehard
- Interrupt fires before the scheduler startshard
- xQueueSend inside a timer ISRhard
- Software timers fire late under loadhard
- Allowed NVIC priorities for FreeRTOS callshard
- Tick count after a tickless sleephard
- Lowest-latency interrupts in Zephyrhard
- Powering down an idle Zephyr peripheralhard
- Running a function in the daemon from an ISRhard
- Timer callback waits on a mutexhard