달우

블로그 이미지
국가를 바꾸는건 국민 입니다. 위선자의 망령에 가려진 대한민국의 진정한 모습을 이제 드러낼 때가 아닐까 합니다. 2012년. 대한민국의 진정한 독립을 이루어냅시다.
by hanseojin
  • Total hit
  • Today hit
  • Yesterday hit

TAG CLOUD


RTC Control Register Low

RTC register를 configure 하기 위해선 세곳의 레지스터 설정을 거쳐야 합니다.

RCC_BDCR(RCC Backup Domain Control Register)에서 Backup Domain에 clock공급을 해줘야 하며

PWR_CR(PWR Control Register)에서 Backup Domain에 걸려있는 write protection을 해제 시켜줘야 합니다.

그리고 마지막으로 이 곳! RTC_CRL에서 레지스터에 엑세스 한다는 인증 절차(?)를 거치면 비로소 RTC 레지스터를 설정 할 수 있게 됩니다.

Register map

15

14

13

12

11

10

9

8

7

6

5

4

3

2

1

0

Reserved

RTOFF

CNF

RSF

OWF

ALRF

SECF

r

rw

rc_w0

rc_w0

rc_w0

rc_w0

Register Access Type[레지스터 설명을 보시려면 클릭!]

Address Offset 0x04      Reset Value 0x0020


bit 0 second flag Show/Hide bookmarks

0 : second flag condition not met // 1 : second flag condition met

bit 1 alarm flag

0 : alarm not detected // 1 : alarm deteted

bit 2 overflow flag

0 : overflow not detected // 1 : 32-bit programmable counter overflow occurred

bit 3 register synchronized flag

0 : register not yet synchronized // 1 : register synchronized

bit 4 configuration flag

0 : exit configuration mode // 1 : enter configuration mode

bit 5 RTC operation OFF

0 : last write operation on RTC register is still ongoing // 1 : last write operation on RTC register terminated


0,1,2번 bit는 flag라고 되있어서 처음엔 약간 의아했지만 pending 역할을 합니다.

0으로 클리어 함으로써 인터럽트 핸들러로 넘어간 작업을 다시 되돌리는 역할을 하죠.


그리고 프로그래밍을 하면서 RTC레지스터 설정을 하는 작업을 하신 다면  4과 5번 비트를 제일 많이 쓰시지 않을까 하네요.

RTC레지스터를 설정 하기 위해선 이 4,5번 비트를 설정 해야 합니다.

'RTC(Real Time Clock)' 카테고리의 다른 글

Reset and Clock Control  (0) 2009.08.27
RCC_BDCR  (0) 2009.08.21
AND

RCC_BDCR(Backup Domain Control Register)

bit 0 LSEON (External Low Speed oscillator enable)
외부 저속 오실레이터 활성화.
Set and reset by software

0 : off
1 : on

bit 1 LSERDY(External Low Speed oscillator Ready)
외부 저속 오실레이터의 상태 확인 비트.

set and reset by hardware to indicate when the external 32kHz oscillator is stable.
설정이나 리셋을 한 후 (32kHz) 외부 오실레이터가 사용 가능 할때를 가르쳐줍니다.

this bit needs 6 cycles of external low speed oscillator clock to fall down after LSEON reset.
"LSEON"이 리셋 된 후 외부 저속 오실레이터 클럭이 떨어지고 부터 6 사이클 만큼의 시간이 필요합니다.

0 : not ready
1 : ready

cycle : 컴퓨터가 1회의 처리를 완료하는 데 드는 최소한의 시간 간격

[단순 매뉴얼 해석]

이 글은 스프링노트에서 작성되었습니다.

'RTC(Real Time Clock)' 카테고리의 다른 글

RTC_CRL  (0) 2009.08.28
RCC_BDCR  (0) 2009.08.21
AND

read/write (rw) Software can read and write to these bits.
read-only (r) Software can only read these bits.
write-only (w) Software can only write to this bit. Reading the bit returns the reset value.


read/clear (rc_w1) Software can read as well as clear this bit by writing 1. Writing ‘0’ has no effect on the bit value.
1을 입력하면 클리어. 0은 아무 효과 없음.

read/clear (rc_w0) Software can read as well as clear this bit by writing 0. Writing ‘1’ has no effect on the bit value.
0을 입력하면 클리어. 1은 아무 효과 없음.

read/clear by read (rc_r) Software can read this bit. Reading this bit automatically clears it to ‘0’.
Writing ‘0’ has no effect on the bit value.
읽으면 자동으로 0으로 클리어. 0을 대입하면 아무 효과 없음.

read/set (rs) Software can read as well as set this bit. Writing ‘0’ has no effect on the bit value.
읽기, 설정 가능. 0을 대입하면 아무 효과 없음.
(설정이 가능하다고 하는데 어떻게 설정이 가능한지는 모르겠습니다.)

read-only write trigger (rt_w) Software can read this bit. Writing ‘0’ or ‘1’ triggers an event but has no effect on the bit value.

toggle (t) Software can only toggle this bit by writing ‘1’. Writing ‘0’ has no effect.


Reserved (Res.) Reserved bit, must be kept at reset value.
예비(보류, 남겨둔) 비트, 리셋값으로 보존.

이 글은 스프링노트에서 작성되었습니다.

'ETC' 카테고리의 다른 글

Register description  (0) 2009.08.21
AND

ARTICLE CATEGORY

Embedded programming (6)
RTC(Real Time Clock) (3)
ETC (2)
RCC(Reset Control Register) (0)
NVIC(Nested Vectored Interrupt C.. (1)
I'm (0)
etc2 (0)

RECENT ARTICLE

RECENT COMMENT

RECENT TRACKBACK

CALENDAR

«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

ARCHIVE