Presentation is loading. Please wait.

Presentation is loading. Please wait.

MS_uC / dnd / V08 3- 1 RTC - Real Time Clock Programming Microcontroller RTC – Real Time Clock Autumn term 2007 32K Byte Burst Flash 64K or 96K Byte SRAM.

Similar presentations


Presentation on theme: "MS_uC / dnd / V08 3- 1 RTC - Real Time Clock Programming Microcontroller RTC – Real Time Clock Autumn term 2007 32K Byte Burst Flash 64K or 96K Byte SRAM."— Presentation transcript:

1 MS_uC / dnd / V08 3- 1 RTC - Real Time Clock Programming Microcontroller RTC – Real Time Clock Autumn term 2007 32K Byte Burst Flash 64K or 96K Byte SRAM 256K or 512K Byte Burst Flash OTP Mem UARTI2CSPI TIMRTC EXT. Bus GPIO USB 2.0FS CAN 2.0B Enet MAC PFQ BC DMA INTR Cntl ARM966 E CORE w/DSP 96 MHz CLK Cntl ADC LVD BOD PLL JTAGETM9 STR912FW44

2 MS_uC / dnd / V08 3- 2 RTC - Real Time Clock RTC Specifics zSelf-isolation Mode yRTC continues to operate xAfter power down xSupply voltage drops out yAutomatically switches to alternate voltage source connected to VBATT pin (e.g.battery) yIsolated 32KHz osc. continues to operate zTamper Detect (Manipulation) yRTC time recorded ySRAM standby voltage source cut off to invalidate SRAM contents zMillisecond counter, wake-up function

3 MS_uC / dnd / V08 3- 3 RTC - Real Time Clock RTC structure

4 MS_uC / dnd / V08 3- 4 RTC - Real Time Clock RTC Block diagram (simplified) Ref manual figure 26

5 MS_uC / dnd / V08 3- 5 RTC - Real Time Clock RTC Register MAP ? On which memory address can you see the seconds counting up?

6 MS_uC / dnd / V08 3- 6 RTC - Real Time Clock RTC time register RTC_TR

7 MS_uC / dnd / V08 3- 7 RTC - Real Time Clock RTC date register RTC_DTR

8 MS_uC / dnd / V08 3- 8 RTC - Real Time Clock RTC Alarm time register RTC_ATR

9 MS_uC / dnd / V08 3- 9 RTC - Real Time Clock RTC Milliseconds Register RTC_MILR 

10 MS_uC / dnd / V08 3- 10 RTC - Real Time Clock RTC Control Register RTC_CR 

11 MS_uC / dnd / V08 3- 11 RTC - Real Time Clock RTC Status Register RTC_SR 

12 MS_uC / dnd / V08 3- 12 RTC - Real Time Clock RTC debug support in IDE [Peripherals-I/O Ports] RTC support so far: => There might be loss of JTAG connection when using the millisecond timer

13 MS_uC / dnd / V08 3- 13 RTC - Real Time Clock RTC Configuration Flow 1.Take RTC out of reset and enable PCLK clock ySet bits in SCU_PCGR1 and SCU_PRR1 registers 2.Set W bit in RTC Control register 3.Set the current Millisecond in Millisec Register 4.Set the current second, minute, hour and date in Time Register 5.Set Alarm Register if Alarm Interrupt is needed 6.Clear W bit in Control Register, RTC starts running

14 MS_uC / dnd / V08 3- 14 RTC - Real Time Clock Peripheral Bridge 1 configuration "slow" peripherals PCG1: Peripheral Clocking Gate Register 1: PRR1: Peripheral Reset Register 1: RTC enabled After Reset: ports disabled

15 MS_uC / dnd / V08 3- 15 RTC - Real Time Clock Watchdog (WDG) What is a watch dog in a microcontroller? A device that supervises correct functioning of the controller What can watch dog do? Just bark and say: "We ar not ok" or reset the controller

16 MS_uC / dnd / V08 3- 16 RTC - Real Time Clock Watch Dog Timer zWatch Dog Timer Features y16-bit down Counter y8-bit clock Prescaler yTwo clock sources : PCLK or RTC clock yWatch Dog or Free-running Timer mode yKey Register to protect Timer from un-intended counter loading

17 MS_uC / dnd / V08 3- 17 RTC - Real Time Clock Watch Dog Timer Modes zWatch Dog Mode yOnce enabled, this mode cannot be cleared by software yGenerates Reset when the 16 bit down counter reaches 0 count yPrevent WDG_reset by writing twice (A55A, 5AA5) to the Key Register. Counter is re-loaded after the write zWDG Free running Timer Mode yUser can pre-load counter and control the counting start xCan read counter values from Counter Register yGenerate interrupt when down counter reaches end of count y Interrupt can be disabled, end of count flag is set in Status Register


Download ppt "MS_uC / dnd / V08 3- 1 RTC - Real Time Clock Programming Microcontroller RTC – Real Time Clock Autumn term 2007 32K Byte Burst Flash 64K or 96K Byte SRAM."

Similar presentations


Ads by Google