English
Language : 

SH7763 Datasheet, PDF (1481/2026 Pages) Renesas Technology Corp – Renesas 32-Bit RISC Microcomputer SuperHTM RISC Engine Family SH-4A Series
Section 33 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 to CSAR.
WaitLoop_CMDAMT
Error
No
Return
Yes
Error
Get_codec_data
Clear LoopCnt2 to 0.
Input: RegN (address of the codec register to be read)
WaitLoop_RSR
Error
Yes
No
Assign HACCSAR read
value to Addr.
Error
No
Addr (R) = RegN?
Yes
Assign HACCSDR read
value to DataT.
Wait for 5ms
LoopCnt2 ++
No
E2 < LoopCnt 2
Yes
DataT return
Error
Notes: E2: Number required for 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 33.6 Sample Flowchart for Off-Chip Codec Register Read (2)
Rev. 1.00 Oct. 01, 2007 Page 1415 of 1956
REJ09B0256-0100