\n

SPI1

Peripheral Memory Blocks

address_offset : 0x0 Bytes (0x0)
size : 0xC byte (0x0)
mem_usage : registers
protection :

address_offset : 0x10 Bytes (0x0)
size : 0x8 byte (0x0)
mem_usage : registers
protection :

address_offset : 0x20 Bytes (0x0)
size : 0x8 byte (0x0)
mem_usage : registers
protection :

address_offset : 0x34 Bytes (0x0)
size : 0x8 byte (0x0)
mem_usage : registers
protection :

Registers

SPI1_CTL (CTL)

SPI1_RX0 (RX0)

SPI1_RX1 (RX1)

SPI1_TX0 (TX0)

SPI1_TX1 (TX1)

SPI1_VARCLK (VARCLK)

SPI1_PDMACTL (PDMACTL)

SPI1_CLKDIV (CLKDIV)

SPI1_SSCTL (SSCTL)


SPI1_CTL (CTL)

Control and Status Register
address_offset : 0x0 Bytes (0x0)
size : -1 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

SPI1_CTL SPI1_CTL read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 EN RXNEG TXNEG TXBITLEN TXNUM LSB CLKP SLEEP IF IE SLAVE BYTESLEEP BYTEENDIAN FIFO TWOB VARCLKEN RXEMPTY RXFULL TXEMPTY TXFULL DMABURST

EN : Go and Busy Status NOTE: All registers should be set before writing 1 to this EN bit. When a transfer is in progress, writing to any register of the SPI master/slave core has no effect.
bits : 0 - 0 (1 bit)
access : read-write

Enumeration:

#0 : 0

Writing 0 to this bit has no effect

#1 : 1

Writing 1 to this bit starts the transfer. This bit remains set during the transfer and is automatically cleared after transfer finished

End of enumeration elements list.

RXNEG : Receive At Negative Edge
bits : 1 - 1 (1 bit)
access : read-write

Enumeration:

#0 : 0

The received data input signal is latched at the rising edge of SCLK

#1 : 1

The received data input signal is latched at the falling edge of SCLK

End of enumeration elements list.

TXNEG : Transmit At Negative Edge
bits : 2 - 2 (1 bit)
access : read-write

Enumeration:

#0 : 0

The transmitted data output signal is changed at the rising edge of SCLK

#1 : 1

The transmitted data output signal is changed at the falling edge of SCLK

End of enumeration elements list.

TXBITLEN : Transmit Bit Length This field specifies how many bits are transmitted in one transmit/receive. Up to 32 bits can be transmitted.
bits : 3 - 7 (5 bit)
access : read-write

Enumeration:

#00000 : 0

32 bit

#00001 : 1

1 bit

#00010 : 2

2 bit

#00011 : 3

3 bit

#00100 : 4

4 bit

#00101 : 5

5 bit

#00110 : 6

6 bit

#00111 : 7

7 bit

#01000 : 8

8 bit

#01001 : 9

9 bit

#01010 : 10

10 bit

#01011 : 11

11 bit

#01100 : 12

12 bit

#01101 : 13

13 bit

#01110 : 14

14 bit

#01111 : 15

15 bit

#10000 : 16

16 bit

#10001 : 17

17 bit

#10010 : 18

18 bit

#10011 : 19

19 bit

#10100 : 20

20 bit

#10101 : 21

21 bit

#10110 : 22

22 bit

#10111 : 23

23 bit

#11000 : 24

24 bit

#11001 : 25

25 bit

#11010 : 26

26 bit

#11011 : 27

27 bit

#11100 : 28

28 bit

#11101 : 29

29 bit

#11110 : 30

30 bit

#11111 : 31

31 bit

End of enumeration elements list.

TXNUM : Transmit/Receive Word Numbers This field specifies how many transmit/receive word numbers should be executed in one transfer.
bits : 8 - 9 (2 bit)
access : read-write

Enumeration:

#00 : 0

Only one transmit/receive word will be executed in one transfer

#01 : 1

Two successive transmit/receive word will be executed in one transfer

#10 : 2

Reserved

#11 : 3

Reserved

End of enumeration elements list.

LSB : LSB First
bits : 10 - 10 (1 bit)
access : read-write

Enumeration:

#0 : 0

The MSB is transmitted/received first (which bit in SPI1_TX0/1 and SPI1_RX0/1 register that is depends on the TXBITLEN field)

#1 : 1

The LSB is sent first on the line (bit 0 of SPI1_TX0/1), and the first bit received from the line will be put in the LSB position in the Rx register (bit 0 of SPI1_RX0/1)

End of enumeration elements list.

CLKP : Clock Polarity
bits : 11 - 11 (1 bit)
access : read-write

Enumeration:

#0 : 0

SCLK idle low

#1 : 1

SCLK idle high

End of enumeration elements list.

SLEEP : Suspend Interval (Master Only) (SLEEP[3:0] + 2) * period of SCLK
bits : 12 - 15 (4 bit)
access : read-write

IF : Interrupt Flag NOTE: This bit is cleared by writing 1 to itself.
bits : 16 - 16 (1 bit)
access : read-write

Enumeration:

#0 : 0

Indicates the transfer is not finished yet

#1 : 1

Indicates that the transfer is complete. Interrupt is generated to CPU if enabled

End of enumeration elements list.

IE : Interrupt Enable
bits : 17 - 17 (1 bit)
access : read-write

Enumeration:

#0 : 0

Disable SPI Interrupt

#1 : 1

Enable SPI Interrupt to CPU

End of enumeration elements list.

SLAVE : Master Slave Mode Control
bits : 18 - 18 (1 bit)
access : read-write

Enumeration:

#0 : 0

Master mode

#1 : 1

Slave mode

End of enumeration elements list.

BYTESLEEP : Insert Sleep interval between Bytes
bits : 19 - 19 (1 bit)
access : read-write

BYTEENDIAN : Byte Endian Reorder Function This function changes the order of bytes sent/received to be least significant physical byte first.
bits : 20 - 20 (1 bit)
access : read-write

FIFO : FIFO Mode
bits : 21 - 21 (1 bit)
access : read-write

Enumeration:

#0 : 0

No FIFO present on transmit and receive buffer

#1 : 1

Enable FIFO on transmit and receive buffer

End of enumeration elements list.

TWOB : Two Bits Transfer Mode Note that when enabled in master mode, MOSI data comes from SPI1_TX0 and MOSI data from SPI1_TX1. Likewise SPI1_RX0 receives bit stream from MISO0 and SPI1_RX1 from MISO1. Note that when enabled, the setting of TXNUM must be programmed as 0x00
bits : 22 - 22 (1 bit)
access : read-write

Enumeration:

#0 : 0

Disable two-bit transfer mode

#1 : 1

Enable two-bit transfer mode

End of enumeration elements list.

VARCLKEN : Variable Clock Enable (Master Only) Note that when enabled, the setting of TXBITLEN must be programmed as 0x10 (16 bits mode)
bits : 23 - 23 (1 bit)
access : read-write

Enumeration:

#0 : 0

The serial clock output frequency is fixed and determined only by the value of DIVIDER

#1 : 1

SCLK output frequency is variable. The output frequency is determined by the value of VARCLK, DIVIDER, and DIVIDER2

End of enumeration elements list.

RXEMPTY : Receive FIFO EMPTY STATUS
bits : 24 - 24 (1 bit)
access : read-write

Enumeration:

#0 : 0

The receive data FIFO is not empty

#1 : 1

The receive data FIFO is empty

End of enumeration elements list.

RXFULL : Receive FIFO FULL STATUS
bits : 25 - 25 (1 bit)
access : read-write

Enumeration:

#0 : 0

The receive data FIFO is not full

#1 : 1

The receive data FIFO is full

End of enumeration elements list.

TXEMPTY : Transmit FIFO EMPTY STATUS
bits : 26 - 26 (1 bit)
access : read-write

Enumeration:

#0 : 0

The transmit data FIFO is not empty

#1 : 1

The transmit data FIFO is empty

End of enumeration elements list.

TXFULL : Transmit FIFO FULL STATUS
bits : 27 - 27 (1 bit)
access : read-write

Enumeration:

#0 : 0

The transmit data FIFO is not full

#1 : 1

The transmit data FIFO is full

End of enumeration elements list.

DMABURST : Enable DMA Automatic SS function. When enabled, interface will automatically generate a SS signal for an entire PDMA access transaction.
bits : 28 - 28 (1 bit)
access : read-write


SPI1_RX0 (RX0)

Data Receive Register 0
address_offset : 0x10 Bytes (0x0)
size : -1 bit
access : read-only
reset_value : 0x0
reset_Mask : 0x0

SPI1_RX0 SPI1_RX0 read-only 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 RX

RX : Data Receive Register The Data Receive Registers hold the value of received data of the last executed transfer. Valid bits depend on the transmit bit length field in the SPI1_CTL register. For example, if TXBITLEN is set to 0x08 and TXNUM is set to 0x0, bit SPI1_RX0[7:0] holds the received data. NOTE: The Data Receive Registers are read only registers.
bits : 0 - 31 (32 bit)
access : read-only


SPI1_RX1 (RX1)

Data Receive Register 1
address_offset : 0x14 Bytes (0x0)
size : -1 bit
access : read-only
reset_value : 0x0
reset_Mask : 0x0

SPI1_RX1 SPI1_RX1 read-only 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 RX

RX : Data Receive Register The Data Receive Registers hold the value of received data of the last executed transfer. Valid bits depend on the transmit bit length field in the SPI1_CTL register. For example, if TXBITLEN is set to 0x08 and TXNUM is set to 0x0, bit SPI1_RX0[7:0] holds the received data. NOTE: The Data Receive Registers are read only registers.
bits : 0 - 31 (32 bit)
access : read-only


SPI1_TX0 (TX0)

Data Transmit Register 0
address_offset : 0x20 Bytes (0x0)
size : -1 bit
access : write-only
reset_value : 0x0
reset_Mask : 0x0

SPI1_TX0 SPI1_TX0 write-only 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 TX

TX : Data Transmit Register The Data Transmit Registers hold the data to be transmitted in the next transfer. Valid bits depend on the transmit bit length field in the SPI1_CTL register. For example, if TXBITLEN is set to 0x08 and the TXNUM is set to 0x0, the bit SPI1_TX0[7:0] will be transmitted in next transfer. If TXBITLEN is set to 0x00 and TXNUM is set to 0x1, the core will perform two 32-bit transmit/receive successive using the same setting (the order is SPI1_TX0[31:0], SPI1_TX1[31:0]).
bits : 0 - 31 (32 bit)
access : write-only


SPI1_TX1 (TX1)

Data Transmit Register 1
address_offset : 0x24 Bytes (0x0)
size : -1 bit
access : write-only
reset_value : 0x0
reset_Mask : 0x0

SPI1_TX1 SPI1_TX1 write-only 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 TX

TX : Data Transmit Register The Data Transmit Registers hold the data to be transmitted in the next transfer. Valid bits depend on the transmit bit length field in the SPI1_CTL register. For example, if TXBITLEN is set to 0x08 and the TXNUM is set to 0x0, the bit SPI1_TX0[7:0] will be transmitted in next transfer. If TXBITLEN is set to 0x00 and TXNUM is set to 0x1, the core will perform two 32-bit transmit/receive successive using the same setting (the order is SPI1_TX0[31:0], SPI1_TX1[31:0]).
bits : 0 - 31 (32 bit)
access : write-only


SPI1_VARCLK (VARCLK)

Variable Clock Pattern Register
address_offset : 0x34 Bytes (0x0)
size : -1 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

SPI1_VARCLK SPI1_VARCLK read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 VARCLK

VARCLK : Variable Clock Pattern The value in this field is the frequency pattern of the SPI clock. If the bit field of VARCLK is '0', the output frequency of SCLK is given by the value of DIVIDER. If the bit field of VARCLK is '1', the output frequency of SCLK is given by the value of CLKDIV1. Refer to register CLKDIV0. Refer to Figure 562 Variable Serial Clock Frequency paragraph for detailed description.
bits : 0 - 31 (32 bit)
access : read-write


SPI1_PDMACTL (PDMACTL)

SPI PDMA Control Register
address_offset : 0x38 Bytes (0x0)
size : -1 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

SPI1_PDMACTL SPI1_PDMACTL read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 TXMDAEN RXMDAEN

TXMDAEN : Transmit DMA Start Set this bit to 1 will start the transmit DMA process. SPI module will issue request to DMA module automatically. If using DMA mode to transfer data, remember not to set EN bit of SPI_CTL register. The DMA controller inside SPI module will set it automatically whenever necessary.
bits : 0 - 0 (1 bit)
access : read-write

Enumeration:

#0 : 0

Disable

#1 : 1

Enable

End of enumeration elements list.

RXMDAEN : Receive DMA Start Set this bit to 1 will start the receive DMA process. SPI module will issue request to DMA module automatically.
bits : 1 - 1 (1 bit)
access : read-write

Enumeration:

#0 : 0

Disable

#1 : 1

Enable

End of enumeration elements list.


SPI1_CLKDIV (CLKDIV)

Clock Divider Register (Master Only)
address_offset : 0x4 Bytes (0x0)
size : -1 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

SPI1_CLKDIV SPI1_CLKDIV read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 CLKDIV0 CLKDIV1

CLKDIV0 : Clock Divider Register (master only) The value in this field is the frequency division of the system clock, PCLK, to generate the serial clock on the output SCLK. The desired frequency is obtained according to the following equation: In slave mode, the period of SPI clock driven by a master shall satisfy In other words, the maximum frequency of SCLK clock is one fifth of the SPI peripheral clock.
bits : 0 - 15 (16 bit)
access : read-write

CLKDIV1 : Clock Divider 2 Register (master only) The value in this field is the 2nd frequency divider of the system clock, PCLK, to generate the serial clock on the output SCLK. The desired frequency is obtained according to the following equation:
bits : 16 - 31 (16 bit)
access : read-write


SPI1_SSCTL (SSCTL)

Slave Select Register
address_offset : 0x8 Bytes (0x0)
size : -1 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

SPI1_SSCTL SPI1_SSCTL read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SSR SSLVL ASS SSLTRIG LTRIGFLAG

SSR : Slave Select Register (Master only) If ASS bit is cleared, writing 1 to any bit location of this field sets the proper SPISSx0/1 line to an active state and writing 0 sets the line back to inactive state. If ASS bit is set, writing 1 to any bit location of this field will select appropriate SPISS line to be automatically driven to active state for the duration of the transmit/receive, and will be driven to inactive state for the rest of the time. (The active level of SPISSx0/1 is specified in SSLVL). Note: SPISS is always defined as device/slave select input signal in slave mode.
bits : 0 - 0 (1 bit)
access : read-write

SSLVL : Slave Select Active Level It defines the active level of device/slave select signal (SPISSx0/1).
bits : 2 - 2 (1 bit)
access : read-write

Enumeration:

#0 : 0

The slave select signal SPISSx0/1 is active at low-level/falling-edge

#1 : 1

The slave select signal SPISSx0/1 is active at high-level/rising-edge

End of enumeration elements list.

ASS : Automatic Slave Select (Master only)
bits : 3 - 3 (1 bit)
access : read-write

Enumeration:

#0 : 0

If this bit is cleared, slave select signals are asserted and de-asserted by setting and clearing related bits in SSCTL register

#1 : 1

If this bit is set, SPISS signals are generated automatically. It means that device/slave select signal, which is set in SSCTL register is asserted by the SPI controller when transmit/receive is started by setting EN, and is de-asserted after each transmit/receive is finished

End of enumeration elements list.

SSLTRIG : Slave Select Level Trigger (Slave only)
bits : 4 - 4 (1 bit)
access : read-write

Enumeration:

#0 : 0

The input slave select signal is edge-trigger. This is the default value

#1 : 1

The slave select signal will be level-trigger. It depends on SSLVL to decide the signal is active low or active high

End of enumeration elements list.

LTRIGFLAG : Level Trigger Flag When the SSLTRIG bit is set in slave mode, this bit can be read to indicate the received bit number is met the requirement or not. Note: This bit is READ only
bits : 5 - 5 (1 bit)
access : read-write

Enumeration:

#0 : 0

One of the received number and the received bit length doesn't meet the requirement in one transfer

#1 : 1

The received number and received bits met the requirement which defines in TXNUM and TXBITLEN among one transfer

End of enumeration elements list.



Is something missing? Is something wrong? can you help correct it ? Please contact us at info@chipselect.org !

This website is sponsored by EmbeetleEmbeetle, an IDE designed from scratch for embedded software developers.