beautypg.com

Renesas SH7781 User Manual

Page 1321

background image

25. Audio Codec Interface (HAC)

Rev.1.00 Jan. 10, 2008 Page 1291 of 1658

REJ09B0261-0100

No

No

Yes

Yes

Yes

Write to codec

Return

Error

Write 0 to TSR.CMDAMT
Write 0 to TSR.CMDDMT

Prerequisite:
ACR.TX12_ATOMIC = 1

Wait for 1

μs

LoopCnt++

Clear RetryCnt to 0

Set data in CSDR

Set Addr. in CSAR

No

Clear LoopCnt to 0

RetryCnt++

TSR.CMDAMT = 1 &

TSR.CMDDMT = 1

E1 < LoopCnt 1

5 < RetryCnt

Notes: E1:

Loop count required in the target system

(21 < E1 < 1000)

Input:

Addr: Address of codec register to be written to

Data: Data to be written to codec register

RetryCnt: Software counter for error detection

LoopCnt: Software counter for wait insertion

Figure 25.4 Sample Flowchart for Off-Chip Codec Register Write