
Rev.1.00 May 22 2012
REJ09B0566
Library Reference
4.2.9 40BSerial Communication Interface R_SCI_Create
4.2.9. Serial Communication Interface
1) R_SCI_Create
Synopsis
SCI channel setup.
Prototype bool R_SCI_Create(
uint8_t data1, // Channel selection
uint32_t data2, // Channel configuration
uint32_t data3, // Bit rate or register value
uint8_t data4 // Interrupt priority level
uint8_t data5 //dma_channel
);
Description (1/3)
Set up the selected SCI channel.
[data1]
Select channel SCIFn (where n = 0 to 7).
[data2]
Configure the channel. If multiple selections are required, use “|” to separate each selection.
The default settings are shown in bold.
• Operation mode
PDL_SCI_ASYNC or
PDL_SCI_SYNC or
PDL_SCI_SMART
Choose between Asynchronous, Clock synchronous or Smart
Card Interface operation.
• Data transfer format
PDL_SCI_LSB_FIRST or
PDL_SCI_MSB_FIRST
Select least- or most-significant bit first.
In 7-bit mode the format is fixed to LSB first.
Options which only apply to Asynchronous mode
• Data clock source selection
PDL_SCI_CLK_INT_IO or
Select the on-chip
The SCKn pin functions as an I/O pin.
PDL_SCI_CLK_INT_OUT or
baud rate generator.
The SCKn pin outputs the bit clock.
PDL_SCI_CLK_EXT_DIV_8 or
PDL_SCI_CLK_EXT_DIV_16 or
Input a clock of 8 or 16 times the desired bit rate to the SCKn
pin.
PDL_SCI_CLK_TMR
For SCI5, select Timer output TMO0. SCK5 is set to high-impedance.
For SCI6, select Timer output TMO2. SCK6 is set to high-impedance.
• Data length
PDL_SCI_8_BIT_LENGTH or
PDL_SCI_7_BIT_LENGTH
8- or 7-bit data length.
Comentarios a estos manuales