However more needs to be done on the software end rather than the hardware end. Like with any standard RTC chip, the embedded RTC can be used to provide a full-featured software-based calendar along with alarm functions. The RTC core consists of counters, Prescaler, clock dividers, alarm data registers, etc. The embedded RTC of an STM32 micro is an independent binary-coded-decimal (BCD) timer counter. This tutorial covers basic features of STM32’s internal RTC and how to use it for time-keeping applications. STM32 MCUs come with built-in RTC modules that require no additional hardware support. Fortunately, STM32s are on that list of those modern era microcontrollers. Thus cost, time and space are dramatically reduced, resulting in smarter, sleeker and smaller affordable devices. Gone are the days when MCUs were manufactured for application-specific requirements and also gone are the days of implementing and involving multiple assets in a design. It is only up to a designer to decide which resources to use from a modern-era micro to meet a specific design goal. At present, however, most modern MCUs come packed with literally every possible hardware a designer may think of. Those chips also need some additional circuitry, wiring and circuit board space. In most 8-bit MCUs like the regular PICs and AVRs, there are no built-in RTC modules and so we need to use dedicated RTC chips like the popular DS1302 or PCF8563 when we need an onboard precise time-keeping device. Those were not suitable for precise time-keeping. Previous to this post, we explored STM32 timers but those were useful for applications like PWM generation, time-bases and other waveform-related tasks. Basically, an RTC is a timer-counter but unlike other timers of an MCU, it is much more accurate. Examples of such applications apart from clocks and watches include washing machines, medicine dispensers, data loggers, etc. In many applications, especially where precise timed-operations are needed to be performed, an RTC is a very useful tool. Components Required:Ī Real-Time Clock (RTC) is a timing element dedicated to keeping time. Step2: Choose The Target MCU & Double-Click Its NameĪ real-time clock (RTC) is an electronic device (most often in the form of an integrated circuit) that measures the passage of time.Īlthough the term often refers to the devices in the personal computer, servers and embedded system, RTCs are present in almost any electronic device which needs to keep accurate time. Step1: Open CubeIDE & Create New Project.And now, let’s build this system step-by-step.
0 Comments
Leave a Reply. |