12.07.2015 Views

SuperH (SH) 64-Bit RISC Series SH-5 System Architecture, Volume ...

SuperH (SH) 64-Bit RISC Series SH-5 System Architecture, Volume ...

SuperH (SH) 64-Bit RISC Series SH-5 System Architecture, Volume ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

PRELIMINARY DATAOperation 167flag should therefore be used to check the write status. If the carry flag(RTC.RCR1.CF) is set to 1, the write must be repeated.The interrupt function can also be used to determine the carry flag status.7.3.2 Time reading proceduresFigure 16 shows examples of the time reading procedures.YesYesDisable carry interruptsClear carry flagRead counter registerCarry flag = 1?NoClear RCR1.CIE to 0Clear RCR1.CF to 0(Write 1 to RCR1.AF so that alarm flagis not cleared)Set RCR2.START to 1(a) Reading time without using interruptsClear carry flagEnable carry interruptsClear carry flagRead counter registerD R A FTInterrupt generated?NoDisable carry interruptsRead RCR1 register and check CF bitSet RCR1.CIE to 1Clear RCR1.CF to 0(Write 1 to RCR1.AF so that alarm flagis not cleared)Clear RCR1.CIE to 0(b) Reading time using interruptsFigure 16: Examples of time reading procedures05-SA-10001 v1.0<strong>SuperH</strong>, Inc.<strong>SH</strong>-5 <strong>System</strong> <strong>Architecture</strong>, <strong>Volume</strong> 1: <strong>System</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!