![]() |
MKM34Z256VLx7 Bare Metal Software Drivers
R4.1.6
Reference Manual
|
This example shows typical use of the Independent Real Time Clock (IRTC) module and specifically its calendaring, alarm and tamper detection circuitries. Initially RTC is initialized to 20.10.2012 23:59:58 and starts counting. An alarm occurs when RTC counters reach 21.10.2012 00:00:35. The alarm interrupt, serviced by the irtc_callback
function, causes re-initialization of the RTC counters to initial values 20.10.2012 23:59:58 and RTC starts counting again. The periodic 1 second event is also serviced by the irtc_callback
function. At this event, the content of RTC counters is written into rTime
variable. When using TWR-KM34Z75M board, user can also evaluate hardware tamper detection capabilities by pushing SW3 button. On TWR-KM34Z75M board, the SW3 button is connected to the TAMPER1 pin. The tamper interrupt, also serviced by the irtc_callback
function, performs reading the time stamp value and storing it into log
variable. Make sure J10 pins 1-2 are closed and pins 7-8 are opened prior testing tamper detection capabilities on TWR-KM34Z75M board.
IAR EWARM 7.40.7 | KEIL uVision 5.15 | CrossWorks 3.6 | ATOLLIC TrueStudio 5.3.0 | Kinetis Design Studio 3.0.0 |
---|---|---|---|---|
♦ | ♦ | ♦ | ♦ | ♦ |