March 2016
Beginner to intermediate
296 pages
6h 34m
English
The idea of this recipe, which we'll call timerISR_c5v0, is to use a general purpose timer (TIM2) to generate an interrupt every 100 ms (that is, 10 Hz). The interrupt handler maintains a counter that, in turn, sets the global variables, LEDOn, LEDOff, which are used within main () to flash the LEDs.
Follow the steps to configure general purpose timers:
timerISR_c5v0. Invoke uVision5 and create a new project named timerISR.uvprojx.timerISR.c, and enter the following statements. Remember to include the boilerplate: ...Read now
Unlock full access