Page 1 of 1

Can the MCF54415 DSPI be operated in Slave mode?

Posted: Wed Jul 01, 2015 8:43 am
by dacoast
Previous coldfire products (5272) did not have the capability to operate as an SPI slave device. Does the DSPI module of the 54415 allow operation as an SPI slave?

Thanks,
-Doug

Re: Can the MCF54415 DSPI be operated in Slave mode?

Posted: Wed Jul 01, 2015 9:30 am
by pbreed
Yes it can, doing so is hard and probably requires operating it in DMA mode.

Coudl you give an outline of how you want to use this?

Command /response data streaming?

What?

Re: Can the MCF54415 DSPI be operated in Slave mode?

Posted: Wed Jul 01, 2015 9:40 am
by dciliske
Yes. I have done this multiple times. The biggest issue is configuring the DMA system.

We don't have any sort of drivers for this, as it is... difficult to do this in an abstracted way.

-Dan

Re: Can the MCF54415 DSPI be operated in Slave mode?

Posted: Wed Jul 01, 2015 6:51 pm
by dacoast
We use MCS12 microcontrollers in a distributed system using an SPI bus for a message passing backplane. We may want to replace one or more of these microcontrollers with Netburner modules in the future. It would also be useful if we could simulate some of the slave SPI messages using a Netburner module for development and testing.

Re: Can the MCF54415 DSPI be operated in Slave mode?

Posted: Thu Jul 02, 2015 10:42 am
by pbreed
Ok what is the nature of this communication?

IE what are you sending what are you receiveing and how long do you have to recieve a command then format a response...

Re: Can the MCF54415 DSPI be operated in Slave mode?

Posted: Mon Jul 06, 2015 12:40 pm
by dacoast
Paul,
Our protocol is as follows:

SPI clk = 307 kHz, DELAY = 22 uSec, Msg Interval = 10 msec, Msg Duration <= 5 msec,
Each slave recognizes 1 or more of NMSG unique message IDs.

Main connected on a common SPI bus with 1 - N slaves
Each slave disables its SOMI line until it recognizes an assigned message ID.

Main sends MsgID, DELAY, MsgID, DELAY,
Whichever slave recognizes MsgID prepares its response message and enables its SOMI line.
All other slaves disable their SPI irq for 8 msec.

Main then sends MsgID, DELAY, byte1, DELAY, byte2, DELAY, * * * byten
while receiving the simultaneous response from the slave.