SPI connection between MPC5517 and MC33975

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SPI connection between MPC5517 and MC33975

884 Views
samsam2010
Contributor I

HI all,

 

Got a simple question and hope anyone of you can give me some hints!

 

I am using the MPC5517 as the MCU, and want to control the Freescale MC33975 using the SPI protocol. I realized that the MC33975 uses 24 bits SPI prototol, while the MPC5517 DSPI module can support frame size of 4 to 16bits only. I tried to read other resources (cookbook, RM, and etc) and realized that it is possible to use serial chaining method to transmit SPI with up to 64bit message frame. Not sure if I am right but I think thie function is only restricted to MPC5554 as shown on the AN2867 document right? I wasn't able to find some of those value inside the DSICR register within the DSPI module of the MPC5517. Do I have to use DSI mode when transmitting 24 bit SPI message? Is 24bit SPI message supported in MPC5510? Thanks for the help once again!

0 Kudos
1 Reply

391 Views
rlw
Contributor I

It seems to me that if you make sure your software waits until after the last transfer before de-asserting the chip select, you could send the 24 bits in batches of whatever size(s) are convenient for you, for example:

 

ASSERT(CS_33975);

for (i = 0; i < 3; i++)

{

SPI_WRITE(data[i]);

while (SPI_TX_BUF != EMPTY) { }

}

while (SPI_COMPLETE != DONE) { }

DEASSERT(CS_33975);

 

will send 24 bits, 8 bits at a time.

 

As long as you use the chip select as explicit framing of the data being sent/received, I don't think the SPI slave will care.

0 Kudos