Skip to main content

Subsection 9.2.1 Part 1: Homework Review

In last night’s homework you added a heartbeat to ADCPot.c: the ADC keeps printing while a TIM14 interrupt blinks the on-board LED one-third of a second on, one-third of a second off. Compare your version with your neighbors’ and note any differences in implementation.
One detail to notice: The hint was to toggle the LED directly in the ISR, so most solutions contain a line like GPIOA->ODR ^= LED; inside TIM14_IRQHandler. The ISR thus loads a peripheral register, changes its value and writes it back. Keep that line in mind: We’ll come back to it at the end of class.