User Manual

Jennic
JennicJennic
Jennic
34 JN-DS-JN5139 v1.5 © Jennic 2008
has no data to transfer, then the data length should be set to zero. The transaction can be terminated by the master
after the status byte has been sent if it is not possible to send data in either direction. This may be because neither
party has data to send or because the receiver does not have a buffer available. If the data length is non-zero, the
data in the JN5139 transmit memory buffer is sent, beginning at the start of the buffer. At the same time that data
bytes are being sent from the transmit buffer, the JN5139 receive buffer is being filled with incoming data, beginning
from the start of the buffer.
The remote processor, acting as the master, must determine the larger of its incoming or outgoing data transfers and
deassert IP_SEL when all of the transmit and receive data has been transferred. The data is transferred into or out of
the buffers starting from the lowest address in the buffer, and each word is assembled with the MSB first on the serial
data lines.
IP_SEL
IP_CLK
IP_DI
Status (8 bit)
N words of data
IP_DO
data length or 0s (8 bit)
Status (8 bit)
N words of data
data length or 0s (8 bit)padding (8 bit)
padding (8 bit)
Figure 25: Intelligent Peripheral Data Transfer Waveforms
11.2 JN5139 Initiated Data Transfer
To send data, the data is written into either buffer 0 or 1 of the intelligent peripheral memory area. Then the buffer
number is written together with the data length. If the call is successful, the interrupt line IP_INT will signal to the
remote processor that there is a message ready to be sent from the JN5139. When a remote processor starts a
transfer to the JN5139 by deasserting IP_SEL, then IP_INT is deasserted. If the transfer is unsuccessful and the
data is not output then IP_INT is reasserted after the transfer to indicate that data is still waiting to be sent.
The interface can be configured to generate an internal interrupt whenever a transaction completes (for example
IP_SEL becomes inactive after a transfer starts). It is also possible to mask the interrupt. The end of the
transmission can be signalled by an interrupt, or the interface can be polled.
To receive data the interface must be firstly initialised and when this is done, the bit RXRDY sent in the status byte
from the IP block will show that data can be received by the JN5139. Successful data arrival can be indicated by an
interrupt, or the interface can be polled.
To send and receive at the same time, the transmit and receive buffers must be set to be different.
11.3 Remote Processor Initiated Data Transfer
The remote processor (master) may initiate a transfer to send data to the JN5139 by asserting the slave select pin,
IP_SEL, and generating its status byte on IP_DI with TXRDY set. After receiving the status byte from the JN5139, it
should check that the JN5139 has a buffer ready by reading the RXRDY bit. If the RXRDY bit is 0 indicating that the
JN5139 cannot accept data, it should terminate the transfer by deasserting IP_SEL unless it is receiving data from
the JN5139. If the RXRDY bit is 1, indicating that the JN5139 can accept data, then the master should generate a
further 8 clocks on IP_CLK in order to transfer its own message length on IP_DI. The master should continue
clocking the interface until sufficient clocks have been generated to send all the data specified in the length field to
the JN5139. The master should then deassert IP_SEL to show the transfer is complete.
The master may initiate a transfer to read data from the JN5139 by asserting the slave select pin, IP_SEL, and
generating its status byte on IP_DI with RXRDY set. After receiving the status byte from the JN5139, it should check
that the JN5139 has a buffer ready by reading the TXRDY bit. If the TXRDY bit is 0, indicating that the JN5139 does
not have data to send, it should terminate the transfer by deasserting IP_SEL unless it is transmitting data to the
JN5139. If the TXRDY bit is 1, indicating that the JN5139 can send data, then the master should generate a further 8
clocks on IP_CLK in order to receive the message length on IP_DO. The master should continue clocking the
interface until sufficient clocks have been generated to receive all the data specified in the length field from the
JN5139. The master should then deassert IP_SEL to show the transfer is complete.
Data can be sent in both directions at once and the master must ensure both transfers have completed before
deasserting IP_SEL.