Datasheet

ADE5166/ADE5169/ADE5566/ADE5569 Data Sheet
Rev. D | Page 142 of 156
Table 154. SPI Configuration SFR 2 (SPIMOD2, Address 0xE9)
Bit Mnemonic Default Description
7 SPICONT 0 Master mode, SPI continuous transfer mode enable bit.
SPICONT Result
0 The SPI interface stops after one byte is transferred and
SS
is deasserted. A new data transfer can
be initiated after a stalled period.
1 The SPI interface continues to transfer data until no valid data is available in the SPI2CTx SFR.
SS
remains asserted until the SPI2CTx SFR and the transmit shift registers are empty.
6 SPIEN 0 SPI interface enable bit.
SPIEN Result
0 The SPI interface is disabled.
1 The SPI interface is enabled.
5 SPIODO 0 SPI open-drain output configuration bit.
SPIODO Result
0 Internal pull-up resistors are connected to the SPI outputs.
1 The SPI outputs are open drain and need external pull-up resistors. The pull-up voltage should
not exceed the specified operating voltage.
4
SPIMS_b
0
SPI master mode enable bit.
SPIMS_b Result
0 The SPI interface is defined as a slave.
1 The SPI interface is defined as a master.
3 SPICPOL 0 SPI clock polarity configuration bit (see Figure 114).
SPICPOL
Result
0 The default state of SCLK is low, and the first SCLK edge is rising. Depending on the SPICPHA bit,
the SPI data output changes state on the falling or rising edge of SCLK, whereas the SPI data input
is sampled on the rising or falling edge of SCLK.
1 The default state of SCLK is high, and the first SCLK edge is falling. Depending on the SPICPHA
bit, the SPI data output changes state on the rising or falling edge of SCLK, whereas the SPI data
input is sampled on the falling or rising edge of SCLK.
2 SPICPHA 0 SPI clock phase configuration bit (see Figure 114).
SPICPHA Result
0 The SPI data output changes state when
SS
goes low at the second edge of SCLK and then every
two subsequent edges, whereas the SPI data input is sampled at the first SCLK edge and then
every two subsequent edges.
1 The SPI data output changes state at the first edge of SCLK and then every two subsequent
edges, whereas the SPI data input is sampled at the second SCLK edge and then every two
subsequent edges.
1 SPILSBF 0 Master mode, LSB first configuration bit.
SPILSBF Result
0 The MSB of the SPI outputs is transmitted first.
1 The LSB of the SPI outputs is transmitted first.
0 TIMODE 1 Transfer and interrupt mode of the SPI interface.
TIMODE Result
1 See Bit 5, Bit 4, and Bit 1 of Table 155 for mode selection.