© NXP Laboratories UK 2012
JN-DS-JN5142 1v0
37
sent from a slave, it should perform transmit using dummy data. An interrupt can be generated when the transaction
has completed or alternatively the interface can be polled.
If a slave device wishes to signal the JN5142 indicating that it has data to provide, it may be connected to one of the
DIO pins that can be enabled as an interrupt.
Figure 25 shows a complex SPI transfer, reading data from a FLASH device, that can be achieved using the SPI
master interface. The slave select line must stay low for many separate SPI accesses, and therefore manual slave
select mode must be used. The required slave select can then be asserted (active low) at the start of the transfer. A
sequence 8 and 32 bit transfers can be used to issue the command and address to the FLASH device and then to
read data back. Finally, the slave select can be deselected to end the transaction.
0
1
2
3
4
5
6
7
Instruction (0x03)
23
22
21
3
2
1
0
8
9
10
28
29
30
31
24-bit Address
MSB
Instruction Transaction
7
6
5
4
3
2
1
0
MSB
0
1
2
3
4
5
7
8N-1
3
2
1
0
LSB
Read Data Bytes Transaction(s) 1-N
SPISEL
SPICLK
SPIMOSI
SPIMISO
SPISEL
SPICLK
SPIMOSI
SPIMISO
8
9
10
7
6
5
MSB
Byte 1
Byte 2
Byte N
value unused by peripherals
6
Figure 25: Example SPI Waveforms
– Reading from FLASH Device using Mode 0