User`s manual

RX62N Group, RX621 Group 4. Library Reference
Remarks
The compiler adds a null character to the end of string constants.
If a callback function is specified, transmission interrupts are used.
Please see the notes on callback function usage in §6.
If polling mode is used, the TXI and TEND flags will be used to manage the data transmission.
If the SCI channel’s control registers are directly modified by the user, this function may lock up.
The maximum number of characters to be transmitted is 65535.
A callback function is executed by the interrupt processing function. This means that no other
interrupt can be processed until the callback function has completed.
If reception is enabled and receive errors occur, transmission will be blocked until the errors are
cleared.
In Multi-processor mode, R_SCI_Send is to be called in pair: the first one is to send ID (ID cycle);
the second one is to send data (Data cycle). For ID transmission, it will be sent by internal
polling operation. For Data transmission, it will be the same as normal Asynchronous mode.
For a usage example of Multi-processor mode, please refer to section 5.12.5.
For ID cycle, the DMAC / DTC trigger control and the callback function will be ignored.
Program example
/* RPDL definitions */
#include "r_pdl_sci.h"
/* RPDL device-specific definitions */
#include "r_pdl_definitions.h"
void func( void )
{
uint8_t data_store[100];
/* Send a string on channel 2 */
R_SCI_Send(
2,
PDL_NO_DATA,
"Renesas RX",
0,
PDL_NO_FUNC
);
/* Send 50 bytes of binary data on channel 1 */
R_SCI_Send(
2,
PDL_NO_DATA,
data_store,
50,
PDL_NO_FUNC
);
/* Send the ID byte (0x0A, shifted into the upper byte) */
R_SCI_Send(
2,
PDL_SCI_MP_ID_CYCLE | 0x0A00,
PDL_NO_PTR,
0,
PDL_NO_FUNC
);
}
R20UT0084EE0112 Rev.1.12 Page 4-176
July. 16, 2014