User`s manual
RX62N Group, RX621 Group 4. Library Reference
3) R_SPI_Command
Synopsis
Configure an SPI command.
Prototype
bool R_SPI_Command(
uint8_t data1,
// Channel selection
uint8_t data2,
// Command selection
uint32_t data3,
// Command options
uint8_t data4
// Extended timing control
);
Description (1/2)
Select the options for a command.
[data1]
Select channel SPIn (where n = 0 to 1).
[data2]
Select command n (where n = 0 to 7).
[data3]
Select the command options. If multiple selections are required, use "|" to separate each selection.
The default settings are shown in bold.
•
Clock phase and polarity
PDL_SPI_CLOCK_MODE_0 or
PDL_SPI_CLOCK_MODE_1 or
PDL_SPI_CLOCK_MODE_2 or
PDL_SPI_CLOCK_MODE_3
Clock is low when idle; data is sampled on the rising edge.
Clock is low when idle; data is sampled on the falling edge.
Clock is high when idle; data is sampled on the falling edge.
Clock is high when idle; data is sampled on the rising edge.
•
Clock division
PDL_SPI_DIV_1 or
PDL_SPI_DIV_2 or
PDL_SPI_DIV_4 or
PDL_SPI_DIV_8
Use the bit rate (specified for R_SPI_Create) ÷ 1, 2, 4 or 8.
Ignored in Slave mode.
•
SSL assertion
PDL_SPI_ASSERT_SSL0 or
PDL_SPI_ASSERT_SSL1 or
PDL_SPI_ASSERT_SSL2 or
PDL_SPI_ASSERT_SSL3
The SSL pin to be asserted during the frame transfer.
Ignored in Slave mode.
•
SSL negation
PDL_SPI_SSL_NEGATE or
PDL_SPI_SSL_KEEP
Negate or retain the SSL signal after the frame transfer.
Ignored in Slave mode.
•
Frame data length
PDL_SPI_LENGTH_8 or
PDL_SPI_LENGTH_9 or
PDL_SPI_LENGTH_10 or
PDL_SPI_LENGTH_11 or
PDL_SPI_LENGTH_12 or
PDL_SPI_LENGTH_13 or
PDL_SPI_LENGTH_14 or
PDL_SPI_LENGTH_15 or
PDL_SPI_LENGTH_16 or
PDL_SPI_LENGTH_20 or
PDL_SPI_LENGTH_24 or
PDL_SPI_LENGTH_32
The number of bits in the frame transfer.
If a buffer size of 64 bits was selected when R_SPI_Create
was called, the number of bits must not exceed 16.
•
Data transfer format
PDL_SPI_MSB_FIRST or
PDL_SPI_LSB_FIRST
Select least- or most-significant bit first.
R20UT0084EE0112 Rev.1.12 Page 4-208
July. 16, 2014