1 / 17

Programming Microcontroller RTC – Real Time Clock Autumn term 2007

Programming Microcontroller RTC – Real Time Clock Autumn term 2007. 64K or 96K Byte SRAM. Enet MAC. ARM966E. CORE. w/DSP. USB 2.0FS. 96 MHz. 256K or 512K Byte Burst Flash. PFQ BC. CAN 2.0B. DMA. INTR Cntl. CLK Cntl. 32K Byte Burst Flash. GPIO. OTP Mem. LVD BOD.

briana
Télécharger la présentation

Programming Microcontroller RTC – Real Time Clock Autumn term 2007

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Programming Microcontroller RTC – Real Time Clock Autumn term 2007 64K or 96K Byte SRAM Enet MAC ARM966E CORE w/DSP USB 2.0FS 96 MHz 256K or 512K Byte Burst Flash PFQ BC CAN 2.0B DMA INTR Cntl CLK Cntl 32K Byte Burst Flash GPIO OTP Mem LVD BOD EXT. Bus JTAG ETM9 PLL RTC TIM ADC SPI I2C UART RTC - Real Time Clock STR912FW44

  2. Self-isolation Mode RTC continues to operate After power down Supply voltage drops out Automatically switches to alternate voltage source connected to VBATT pin (e.g.battery) Isolated 32KHz osc. continues to operate Tamper Detect (Manipulation) RTC time recorded SRAM standby voltage source cut off to invalidate SRAM contents Millisecond counter, wake-up function RTC Specifics RTC - Real Time Clock

  3. RTC structure RTC - Real Time Clock

  4. RTC Block diagram (simplified) RTC - Real Time Clock Ref manual figure 26

  5. RTC Register MAP RTC - Real Time Clock ? On which memory address can you see the seconds counting up?

  6. RTC time registerRTC_TR RTC - Real Time Clock

  7. RTC date registerRTC_DTR RTC - Real Time Clock

  8. RTC Alarm time registerRTC_ATR RTC - Real Time Clock

  9. RTC Milliseconds RegisterRTC_MILR RTC - Real Time Clock 

  10. RTC Control RegisterRTC_CR RTC - Real Time Clock 

  11. RTC Status RegisterRTC_SR RTC - Real Time Clock 

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

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

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

  15. Watchdog (WDG) RTC - Real Time Clock 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. Watch Dog Timer RTC - Real Time Clock • Watch Dog Timer Features • 16-bit down Counter • 8-bit clock Prescaler • Two clock sources : PCLK or RTC clock • Watch Dog or Free-running Timer mode • Key Register to protect Timer from un-intended counter loading

  17. Watch Dog Mode Once enabled, this mode cannot be cleared by software Generates Reset when the 16 bit down counter reaches 0 count Prevent WDG_reset by writing twice (A55A, 5AA5) to the Key Register. Counter is re-loaded after the write WDG Free running Timer Mode User can pre-load counter and control the counting start Can read counter values from Counter Register Generate interrupt when down counter reaches end of count Interrupt can be disabled, end of count flag is set in Status Register Watch Dog Timer Modes RTC - Real Time Clock

More Related