NUTINY-SDK-M0516 Nuvoton Technology Corporation of America, NUTINY-SDK-M0516 Datasheet - Page 242

no-image

NUTINY-SDK-M0516

Manufacturer Part Number
NUTINY-SDK-M0516
Description
BOARD EVAL NUMICRO M051 SERIES
Manufacturer
Nuvoton Technology Corporation of America
Series
NuMicro M051™r
Type
MCUr
Datasheets

Specifications of NUTINY-SDK-M0516

Contents
Board, Cable
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With/related Products
M051™ Series, M052/M054/M058/M0516
6.7.6
Example 1 , SPI controller is set as a master to access an off-chip slave device with following
specifications:
Basically, the specification of the connected off-chip slave device should be referred in details
before the following steps:
1) Set the DIVIDER (SPI_DIVIDER [15:0]) register to determine the output frequency of serial
2) Write the SPI_SSR register a proper value for the related settings of master mode
3) Write the related settings into the SPI_CNTRL register to control this SPI master actions
SPI Programming Examples
clock.
1.
2.
3.
1.
2.
3.
4.
Data bit is latched on positive edge of serial clock
Data bit is driven on negative edge of serial clock
Data is transferred from MSB first
SPICLK is idle at low state
Only one byte of data to be transmitted/received in a transfer
Slave select signal is active low
Disable the Automatic Slave Select bit AUTOSS(SPI_SSR[3] = 0)
Select low level trigger output of slave select signal in the Slave Select Active Level bit
SS_LVL (SPI_SSR[2] = 0)
Select slave select signal to be output active at the IO pin by setting the respective Slave
Select Register bits SSR[0] (SPI_SSR[0]) to active the off-chip slave devices
Set this SPI controller as master device in SLAVE bit (SPI_CNTRL[18] = 0)
Force the serial clock idle state at low in CLKP bit (SPI_CNTRL[11] = 0)
Select data transmitted at negative edge of serial clock in TX_NEG bit (SPI_CNTRL[2] =
1)
Select data latched at positive edge of serial clock in RX_NEG bit (SPI_CNTRL[1] = 0)
NuMicro M051
Series Technical Reference Manual
- 242 -
Publication Release Date: Sep 14, 2010
Revision V1.2

Related parts for NUTINY-SDK-M0516