beautypg.com

Read rtc (rdrtc) instruction – Cypress CY14B101P User Manual

Page 11

background image

PRELIMINARY

CY14B101P

Document #: 001-44109 Rev. *B

Page 11 of 32

READ RTC (RDRTC) Instruction

Read RTC (RDRTC) instruction allows the user to read the
contents of RTC registers. Reading the RTC registers through
the serial output (SO) pin requires the following sequence: After
the CS line is pulled LOW to select a device, the RDRTC opcode
is transmitted through the SI line followed by eight address bits
for selecting the register. Any data on the SI line after the address
bits is ignored. The data (D7-D0) at the specified address is then
shifted out onto the SO line. RDRTC also allows burst mode read
operation. When reading multiple bytes from RTC registers, the
address rolls over to 0x00 after the last RTC register address
(0x0F) is reached.

The R bit in RTC Flag register must be set to '1' before reading
RTC time keeping registers to avoid reading transitional data.
Modifying the RTC Flag registers requires a Write RTC cycle.
The R bit must be cleared to '0' after completion of the read
operation.
The easiest way to read RTC registers is to perform RDRTC in
burst mode. The read may start from the first RTC register (0x00)
and the CS must be held LOW to allow the data from all 16 RTC
registers to be transmitted through the SO pin.
Note Read RTC instruction operates at a maximum clock
frequency of 25 MHz.

Figure 11. Burst Mode Read Instruction Timing

Figure 12. Write Instruction Timing

Figure 13. Burst Mode Write Instruction Timing

CS

SCK

SO

LSB

SI

Op-Code

17-bit Address

MSB

LSB

~ ~

~ ~

~ ~

0 1

2

3

4 5 6

7

0

7

6

5

4

3

2

1

20 21 22 23 0

1

2

3 4 5

6

7

0

1

2

3

4 5

6

7

~ ~

0 7

0

0

0

0

0

0

1 1

0

0

0 0

0 0

0 A16

A3 A2 A1 A0

D0

D1

D2

D3

D4

D5

D6

D7

Data Byte 1

Data Byte N

MSB

LSB

MSB

D0

D1

D2

D3

D4

D5

D6

D7

D0

D7

~ ~

CS

SCK

SO

0

1

2

3

4

5 6 7

0

7

6

5

4

3

2

1

20 21 22 23 0

1

2

3

4

5

6

7

MSB

LSB

Data

D0

D1

D2

D3

D4

D5

D6

D7

SI

~ ~

Op-Code

0

0

0

0

0

0

1

0

0

0

0 0

0

0

0

A16

A3

A1

A2

A0

17-bit Address

MSB

LSB

HI-Z

~ ~

CS

SCK

SO

MSB

LSB

SI

Op-Code

17-bit Address

MSB

LSB

~ ~

~ ~

0 1

2

3

4 5

6

7 0

7

6

5

4

3

2

1

20 21 22 23 0 1

2

3

4 5

6

7

0 1

2

3

4 5

6

7

~ ~

0

7

0

0 0

0 0

0

1

0

0

0

0

0

0

0 0 A16 A3 A2 A1 A0

HI-Z

Data Byte 1

Data Byte N

D0

D1

D2

D3

D4

D5

D6

D7

D0

D1

D2

D3

D4

D5

D6

D7

D0

D7

[+] Feedback