Renesas SH7781 User Manual

Page 1323

Advertising
background image

25. Audio Codec Interface (HAC)

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

REJ09B0261-0100

No

Yes

Send_read_request

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

Notes: E2:

Loop count required in the target system (13 < E2)

LoopCnt2: Software counter for wait insertion

Addr: Variable to hold CSAR read value.

DataT: Variable to hold CSDR read value.

Set RegN in CSAR

WaitLoop_CMDAMT

Error

Error

Error

Error

Error

Return

Wait for 5

μs

LoopCnt 2 ++

No

No

Yes

Yes

No

Yes

Get_codec_data

Input: RegN (address of the codec register to be read)

Input: RegN (address of the codec register to be read)

Clear LoopCnt 2 to 0

WaitLoop_RSR

Assign HACCSAR read value to Addr

Addr (R) = RegN?

E2 < LoopCnt 2

Assign HACCSDR read value to Data T

Data T is returned

Figure 25.6 Sample Flowchart for Off-Chip Codec Register Read (2)

Advertising