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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

PRELIMINARY DATAOperation 247Serial Data Transmission:Figure 32 shows a sample flowchart for serial transmission.Use the following procedure for serial data transmission after enabling the SCIF fortransmission.Start of transmissionRead TDFE flag in SCFSR2TDFE = 1?YesWrite transmit data (16 - transmittrigger set number) to SCFTDR2,read 1 from TDFE flag and TENDflag in SCFSR2, then clear to 0All data transmitted?YesRead TEND flag in SCFSR2TEND = 1?YesBreak output?YesClear SPB2DT to 0 andset SPB2IO to 1Clear TE bit in SCSCR2 to 0NoNoNoNo1. SCIF status check and transmit datawrite:Read SCFSR2 and check that theTDFE flag is set to 1, then writetransmit data to SCFTDR2, read 1from the TDFE and TEND flags, thenclear these flags to 0.The number of transmit data bytesthat can be written is 16 - (transmittrigger set number).2. Serial transmission continuationprocedure:To continue serial transmission, read1 from the TDFE flag to confirm thatwriting is possible, then write data toSCFTDR2, and then clear the TDFEflag to 0.3. Break output at the end of serialtransmission:To output a break in serialtransmission, clear the SPB2DT bit to0 and set the SPB2IO bit to 1 inSCSPTR2, then clear the TE bit inSCSCR2 to 0.In steps 1 and 2, it is possible toascertain the number of data bytesthat can be written from the numberof transmit data bytes in SCFTDR2indicated by the upper 8 bits ofSCFDR2.D R A FTEnd of transmissionFigure 32: Sample serial transmission flowchart05-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!