beautypg.com

Renesas SH7781 User Manual

Page 1324

background image

25. Audio Codec Interface (HAC)

Rev.1.00 Jan. 10, 2008 Page 1294 of 1658
REJ09B0261-0100

No

No

Yes

WaitLoop_CMDAMT

Notes: E3, E4: Loop count required in the target system

(21 < E3, 21 < E4 < 1000)

LoopCnt3: Software counter for wait insertion
LoopCnt4: Software counter for wait insertion

Write 0 to TSR.CMDAMT

Return

Return

Error

Clear LoopCnt 3 to 0

TSR.CMDAMT = 1

Wait for 1

μs

LoopCnt 3 ++

Yes

E3 < LoopCnt 3

Error

No

No

Yes

WaitLoop_RSR

Write 0 to RSR.STARY
Write 0 to RSR.STDRY

Clear LoopCnt 4 to 0

RSR.STARY = 1 &

RSR.STDRY = 1

Wait for 1

μs

LoopCnt 4 ++

Yes

E4 < LoopCnt 4

Figure 25.7 Sample Flowchart for Off-Chip Codec Register Read (3)