Just like the last couple of posts in this series, the STM32F031K6 and STM32L031K6 chips will be used to demonstrate these concepts. In this tutorial, we will write code to enable a hardware interrupt triggered by a timer peripheral, and use that to blink an LED. The “advanced control” timer peripheral is particularly complicated and I won’t try to cover it in this quick overview, but the basic and general-purpose timers are easy to get started with for simple counters and interrupts. The STM32 line of chips have a variety of “timer” peripherals available, and they are flexible enough to use for all kinds of different things. These days, we don’t have to count clock cycles in ‘delay’ methods. How should you ask your chip to do something on a schedule? As you start to create microcontroller projects with more complicated logic, it probably won’t take long before you to want to add some sort of time-based functionality.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |