GR740-UM-DS, Nov 2017, Version 1.7
333
www.cobham.com/gaisler
GR740
23: 20
Word length (LEN) - The value of this field determines the length in bits of a transfer on the SPI bus.
Values are interpreted as:
0b0000 - 32-bit word length
0b0001-0b0010 - Illegal values
0b0011-0b1111 - Word length is LEN+1, allows words of length 4-16 bits.
19: 16
Prescale modulus (PM) - This value is used in master mode to divide the system clock and generate
the SPI SCK clock. The value in this field depends on the value of the FACT bit.
If bit 13 (FACT) is ‘0’:The system clock is divided by 4*(PM+1) if the DIV16 field is ‘0’ and
16*4*(PM+1) if the DIV16 field is set to ‘1’. The highest SCK frequency is attained when PM is set
to 0b0000 and DIV16 to ‘0’, this configuration will give a SCK frequency that is (system clock)/4.
With this setting the core is compatible with the SPI register interface found in MPC83xx SoCs.
If bit 13 (FACT) is ‘1’: The system clock is divided by 2*(PM+1) if the DIV16 field is ‘0’ and
16*2*(PM+1) if the DIV16 field is set to ‘1’. The highest SCK frequency is attained when PM is set
to 0b0000 and DIV16 to ‘0’, this configuration will give a SCK frequency that is (system clock)/2.
In slave mode the value of this field defines the number of system clock cycles that the SCK input
must be stable for the core to accept the state of the signal. See section 24.2.5.
15
Three-wire mode (TW) - If this bit is set to ‘1’ the core will operate in 3-wire mode.
14
Automatic slave select (ASEL) - If this bit is set to ‘1’ the core will swap the contents in the Slave
select register with the contents of the Automatic slave select register when a transfer is started and
the core is in master mode. When the transmit queue is empty, the slave select register will be
swapped back. Note that if the core is disabled (by writing to the core enable bit or due to a multiple-
master-error (MME)) when a transfer is in progress, the registers may still be swapped when the core
goes idle. Also see the ASELDEL field which can be set to insert a delay between the slave select
register swap and the start of a transfer.
13
PM factor (FACT) - If this bit is 1 the core’s register interface is no longer compatible with the
MPC83xx register interface. The value of this bit affects how the PM field is utilized to scale the SPI
clock. See the description of the PM field.
12
Open drain mode (OD) - If this bit is set to ‘0’, all pins are configured for operation in normal mode.
If this bit is set to ‘1’ all pins are set to open drain mode. The pins driven from the slave select regis-
ter are not affected by the value of this bit.
11: 7
Clock gap (CG) - The value of this field is only significant in master mode. The core will insert CG
SCK clock cycles between each consecutive word. This only applies when the transmit queue is kept
non-empty. After the last word of the transmit queue has been sent the core will go into an idle state
and will continue to transmit data as soon as a new word is written to the transmit register, regardless
of the value in CG. A value of 0b00000 in this field enables back-to-back transfers.
6: 5
Automatic Slave Select Delay (ASELDEL) - If the core is configured to use automatic slave select
(ASEL field set to ‘1’) the core will insert a delay corresponding to ASELDEL*(SPI SCK cycle
time)/2 between the swap of the slave select registers and the first toggle of the SCK clock. As an
example, if this field is set to “10” the core will insert a delay corresponding to one SCK cycle
between assigning the Automatic slave select register to the Slave select register and toggling SCK
for the first time in the transfer.
4
Toggle Automatic slave select during Clock Gap (TAC) - If this bit is set, and the ASEL field is set,
the core will perform the swap of the slave select registers at the start and end of each clock gap. The
clock gap is defined by the CG field and must be set to a value >= 2 if this field is set.
3
3-wire Transfer Order (TTO) - This bit controls if the master or slave transmits a word first in 3-wire
mode.If this bit is ‘0’, data is first transferred from the master to the slave. If this bit is ‘1’, data is
first transferred from the slave to the master.
2
Ignore SPISEL input (IGSEL) - If this bit is set to ‘1’ then the core will ignore the value of the SPI-
SEL input.
1
Require Clock Idle for Transfer End (CITE) - If this bit is ‘0’ the core will regard the transfer of a
word as completed when the last bit has been sampled. If this bit is set to ‘1’ the core will wait until
it has set the SCK clock to its idle level (see CI field) before regarding a transfer as completed. This
setting only affects the behavior of the TIP status bit, and automatic slave select toggling at the end
of a transfer, when the clock phase (CP field) is ‘0’.
0
RESERVED (R) - Read as zero and should be written as zero to ensure forward compatibility.
Table 421.
0x20 - MODE - Mode register