
AN1816
15
Summary
interframe delay, DLYx[B:A]. It is also used to enable interrupts, RIEx
and TIEx, and to select 12 -bit (8 data bits plus 4 CRC bits) or 20-bit (16
data bits plus 4 CRC bits) messages, MSx. This register is updated as
soon as new data is received over the SPI interface, however, the new
value does not take affect until the next DSI clock cycle after the
conclusion of the SPI write to this register. Finally, the DSIENABL
register is used to enable or disable each DSI channel. The function
SetupDSI shown in the source code in
Appendix 1 - Source Code
is an
example of how to set up the MC68HC55 SPI Peripheral’s registers. It
uses the SPI burst routine discussed in sub section:
‘Initialisation of the
PWM and SPI’
and sets up the registers for initialisation of the
programmable slave nodes.
Initialising the
Slave Nodes
Programmable
Devices
The source code shown in the main section of the program that calls
functions PgmAddr, PgmChk and ChkRsp in
Appendix 1 - Source Code
details a very simple routine to program the addresses into slave nodes.
It programs 15 slave nodes sequentially starting with address 1 (0001)
and finishing with address 15 (1111). To ensure the response from the
slave node whose address is being set is captured, the MC68HC55’s
clock period is set to SCLK divided by 4 and the interframe delay is set
to 32 bit times. This is achieved by writing $B0 to the MC68HC55’s
DSIxCTRL register (refer to sub section:
‘Initialisation of the MC68HC55
SPI Peripheral’s Registers’
).
Pre-programmed
Devices
When the network is configured with pre-programmed devices the
initialisation procedure is similar to that of programmable devices. An
initialisation command that contains the address of the slave node being
initialised is sent to that slave node. The slave node then responds to the
initialisation command to let the master know it is present in the network.
Summary
This Application Note has discussed a total system solution using a full
suite of Freescale ICs. Although the initial target application is automotive
airbag systems it could be used in other applications which require
remote sensors. The Distributed Systems Interface (DSI) has many
advantages in that it allows flexibility of system design, is easily
expandible and allows the central module size to decrease while the
system content grows.
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.