Example: marketing

Introduction - STMicroelectronics

September 2012 Doc ID 018624 Rev 51/45AN3371 Application noteUsing the hardware real-time clock (RTC) in STM32 F0, F2, F3, F4 and L1 series of MCUsIntroductionA real-time clock (RTC) is a computer clock that keeps track of the current time. Although RTCs are often used in personal computers, servers and embedded systems, they are also present in almost any electronic device that requires accurate time keeping. Microcontrollers supporting RTC can be used for chronometers, alarm clocks, watches, small electronic agendas, and many other application note describes the features of the real-time clock (RTC) controller embedded in Ultra Low Power Medium-density, Ultra Low Power High-density, F0, F2 and F4 series devices microcontrollers, and the steps required to configure the RTC fo

Application note Using the hardware real-time clock (RTC) in STM32 F0, F2, F3, F4 and L1 series of MCUs Introduction A real-time clock (RTC) is a computer clock that keeps track of the current time. Although RTCs are often used in personal computers, servers …

Tags:

  Notes

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of Introduction - STMicroelectronics

1 September 2012 Doc ID 018624 Rev 51/45AN3371 Application noteUsing the hardware real-time clock (RTC) in STM32 F0, F2, F3, F4 and L1 series of MCUsIntroductionA real-time clock (RTC) is a computer clock that keeps track of the current time. Although RTCs are often used in personal computers, servers and embedded systems, they are also present in almost any electronic device that requires accurate time keeping. Microcontrollers supporting RTC can be used for chronometers, alarm clocks, watches, small electronic agendas, and many other application note describes the features of the real-time clock (RTC)

2 Controller embedded in Ultra Low Power Medium-density, Ultra Low Power High-density, F0, F2 and F4 series devices microcontrollers, and the steps required to configure the RTC for use with the calendar, alarm, periodic wakeup unit, tamper detection, timestamp and calibration are provided with configuration information to enable you to quickly and correctly configure the RTC for calendar, alarm, periodic wakeup unit, tamper detection, time stamp and calibration :All examples and explanations are based on the STM32L1xx, STM32F0xx, STM32F2xx STM32F4xx and STM32F3xx firmware libraries and reference manuals of STM32L1xx (RM0038), STM32F0xx (RM0091), STM32F2xx (RM0033), STM32F4xx (RM0090), STM32F37x (RM0313) and STM32F30x(RM0316).

3 STM32 refers to Ultra Low Power Medium-density, Ultra Low Power High-density, F0, F2 and F4 series devices in this Low Power Medium (ULPM) density devices are STM32L151xx and STM32L152xx microcontrollers where the Flash memory density ranges between 64 and 128 Low Power High (ULPH) density devices are STM32L151xx, STM32L152xx and STM32L162xx microcontrollers where the Flash memory density is 384 series devices are STM32F205xx, STM32F207xx, STM32F215xx and STM32F217xx refers to STM32F30x, STM32F31x, STM32F37x and STM32F38x series are STM32F405xx, STM32F407xx, STM32F415xx and STM32F417xx series devices are b l e 1 lists the microcontrollers concerned by this application note.

4 Table productsTypeApplicable productsMicrocontrollersSTM32 F0 STM32 F2 STM32 F3 (STM32F30x, STM32F31x, STM32F37x, STM32F38x)STM32 F4 (STM32F405xx, STM32F407xx, STM32F415xx, STM32F417xx) STM32 L1 ID 018624 Rev 5 Contents1 Overview of the STM32 advanced RTC .. calendar .. the calendar .. clock configuration .. alarms .. alarm configuration .. sub-second configuration .. periodic wakeup unit .. the Auto-wakeup unit .. and minimum RTC wakeup period .. digital calibration.

5 Coarse calibration .. smooth calibration .. the RTC .. reference clock detection .. function .. tamper detection function .. detection on tamper input .. detection on tamper input .. time-stamp on tamper detection event .. registers .. and low-power modes .. function RTC outputs .. output .. output .. security aspects .. register write protection .. initialization mode .. clock synchronization .. 302 Advanced RTC features .. 313 RTC firmware driver API.

6 33AN3371 ContentsDoc ID 018624 Rev 53 with the RTC driver .. and date configuration .. configuration .. wakeup configuration .. configuration .. calibration configuration .. configuration .. configuration .. data registers configuration .. groups and description .. 364 Application examples .. 415 Revision history .. 43 List of tablesAN33714/45 Doc ID 018624 Rev 5 List of tablesTable products and tools .. 1 Table to initialize the calendar .. 7 Table clock equal to 1 Hz with different clock sources.

7 9 Table to configure the alarm .. 11 Table combinations .. 11 Table sub-second mask combinations .. 13 Table to configure the Auto-wakeup unit .. 14 Table unit period resolution with clock configuration 1 .. 15 Table unit period resolution with clock configuration 2 .. 16 Table and max. timebase/wakeup period when RTCCLK= 32768 .. 17 Table features .. 21 Table features (edge detection) .. 23 Table features (level detection) .. 25 Table output frequency versus clock source .. 27 Table RTC features.

8 31 Table function groups .. 36 Table descriptions .. 41 Table revision history .. 43AN3371 List of figuresDoc ID 018624 Rev 55/45 List of figuresFigure calendar fields .. 6 Figure of calendar display on an LCD .. 7 Figure RTC clock sources .. 8 Figure or STM32F4xx RTC clock sources.. 8 Figure from RTC clock source to calendar unit .. 9 Figure A fields .. 10 Figure sub-second field .. 12 Figure connected to the timebase/wakeup unit for configuration 1 .. 15 Figure connected to the wakeup unit for configurations 2 and 3.

9 16 Figure calibration block .. 17 Figure calibration block.. 18 Figure shift register .. 19 Figure reference clock detection .. 20 Figure event procedure .. 21 Figure with edge detection .. 23 Figure with level detection .. 24 Figure sampling with precharge pulse .. 24 Figure clock sources .. 27 Figure flag routed to RTC_ALARM output.. 28 Figure wakeup routed to RTC_ALARM pinout.. 29 Overview of the STM32 advanced RTCAN33716/45 Doc ID 018624 Rev 51 Overview of the STM32 advanced RTCThe real-time clock (RTC) embedded in STM32 microcontrollers acts as an independent BCD timer/ counter.

10 The RTC can be used to provide a full-featured calendar, alarm, periodic wakeup unit, digital calibration, synchronization, time stamp, and advanced tamper detection. Refer to Table 15: Advanced RTC features for the complete list of features available on each device. RTC calendarA calendar keeps track of the time (hours, minutes and seconds) and date (day, week, month, year). The STM32 RTC calendar offers several features to easily configure and display the calendar data fields: Calendar with: sub-seconds (not programmable) seconds minutes hours in 12-hour or 24-hour format day of the week (day) day of the month (date) month year Calendar in binary-coded decimal (BCD) format Automatic management of 28-, 29- (leap year), 30-, and 31-day months Daylight saving time adjustment programmable by softwareFigure calendar fields1.


Related search queries