English
Language : 

SH7785 Datasheet, PDF (1323/1692 Pages) Renesas Technology Corp – 32-Bit RISC Microcomputer
25. Audio Codec Interface (HAC)
Send_read_request
Input: RegN (address of the codec register to be read)
Write 0 to RSR.STARY
Write 0 to RSR.STDRY
Set RegN in CSAR
WaitLoop_CMDAMT
Error
No
Return
Yes
Error
Get_codec_data
Input: RegN (address of the codec register to be read)
Clear LoopCnt 2 to 0
WaitLoop_RSR
Yes
Error
No
Assign HACCSAR read value to Addr
Error
No
Addr (R) = RegN?
Yes
Assign HACCSDR read value to Data T
Wait for 5 μs
LoopCnt 2 ++
No
E2 < LoopCnt 2
Yes
Data T is returned
Error
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.
Figure 25.6 Sample Flowchart for Off-Chip Codec Register Read (2)
Rev.1.00 Jan. 10, 2008 Page 1293 of 1658
REJ09B0261-0100