
Mini57
Apr. 06, 2017
Page 359 of 475
Rev.1.00
MINI5
7
S
E
RI
E
S
TECH
NIC
A
L R
E
F
E
RE
N
CE
MA
N
UA
L
3. Set FUNMODE (USPI_CTL[2:0]) to 0x1 to select SPI mode.
4. Set USPI_BRGEN register to determine the SPI bus clock frequency.
5.
According to the requirements of user’s application, configured the settings as follows.
CTLOINV (USPI_LINECTL[7]): If the slave selection signal is active low, set this bit to 1;
otherwise, set it to 0.
DWIDTH (USPI_LINECTL[11:8]): Data width setting.
LSB (USPI_LINECTL[0]): LSB first or MSB first.
TSMSEL (USPI_PROTCTL[14:12]): Full-duplex SPI transfer.
SCLKMODE (USPI_PROTCTL[7:6]): Determine the clock timing.
AUTOSS (USPI_PROTCTL[3]): Enable automatic slave select function or not.
SLAVE (USPI_PROTCTL[0]): Set to 0 for Master mode.
6. Set PROTEN (USPI_PROTCTL[31]) to 1 to enable SPI protocol.
7. If automatic slave select function is disabled (AUTOSS=0), set SS (USPI_PROTCTL[2]) to 1
before data transfer; set SS to 0 to inactivate the slave selection signal by user’s application.
8. Write USPI_TXDAT register to trigger SPI transfer.
9. User can get the received data by reading USPI_RXDAT register as long as RXEMPTY
(USPI_BUFSTS[0]) is 0. The SPI data transfer can be triggered by writing USPI_TXDAT register
as long as TXFULL (USPI_BUFSTS[9]) is 0.
For Slave mode:
1. Enable USCI peripheral clock by setting CLK_APBCLK register.
2. Configure user-specified pins as USCI function pins by setting corresponding multiple function
control registers.
3. Set FUNMODE (USPI_CTL[2:0]) to 0x1 to select SPI mode.
4. According to the requireme
nts of user’s application, configured the settings as follows.
ININV (USPI_CTLIN0[2]): If the slave selection signal is active low, set this bit to 1;
otherwise, set it to 0.
DWIDTH (USPI_LINECTL[11:8]): Data width setting.
LSB (USPI_LINECTL[0]): LSB first or MSB first.
TSMSEL (USPI_PROTCTL[14:12]): Full-duplex SPI transfer
SCLKMODE (USPI_PROTCTL[7:6]): Determine the clock timing.
SLAVE (USPI_PROTCTL[0]): Set to 1 for Slave mode.
5. Set PROTEN (USPI_PROTCTL[31]) to 1 to enable SPI protocol.
6. Write USPI_TXDAT register for transmission.
7. User can get the received data by reading USPI_RXDAT register as long as RXEMPTY
(USPI_BUFSTS[0]) is 0. The next datum for transmission can be written to USPI_TXDAT register
as long as TXFULL (USPI_BUFSTS[9]) is 0.
Содержание Mini57 Series
Страница 376: ...Mini57 Apr 06 2017 Page 376 of 475 Rev 1 00 MINI57 SERIES TECHNICAL REFERENCE MANUAL 1 Receive buffer is full ...
Страница 472: ...Mini57 Apr 06 2017 Page 472 of 475 Rev 1 00 MINI57 SERIES TECHNICAL REFERENCE MANUAL 1 3 20 Pin TSSOP 4 4x6 5x0 9 mm ...
Страница 473: ...Mini57 Apr 06 2017 Page 473 of 475 Rev 1 00 MINI57 SERIES TECHNICAL REFERENCE MANUAL 9 1 33 pin QFN33 4x4x0 8 mm ...