Is it possible to transmit a 32-bit SPI word using DSPI on 55xx or 56xx?

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

Is it possible to transmit a 32-bit SPI word using DSPI on 55xx or 56xx?

848 Views
gnappo
Contributor I

Hello,

 

I'm using a MPC5634. I want to send a 32-bit frame using SPI. But in configuration register i see, than i can send only 16 bit words.

 

Is it possible to send a 32 bit SPI frame on 55xx or 56xx?

0 Kudos
1 Reply

405 Views
TomE
Specialist II

Aren't two 16 bit SPI frames the same as a 32-bit one? All you need to do is to make sure the chip-select remains asserted for both of them.

 

I've read something recently on one of these forums where an SPI controller wouldn't allow this when it was "in charge" of the Chip Select lines. A simple fix is to program the SPI Chip Select pin as a GPIO and drive it in software around your calls to the SPI hardware that is sending the multiple frames.

 

This shouldn't be necessary as the Reference Manual (MPC5553/5554) states:

 

Chapter 20
Deserial Serial Peripheral Interface (DSPI)

20.1.3 Features

— Programmable serial frame size of 4 to 16 bits, expandable with software control
Continuously held chip select capability

 

I think you want:

 

Table 20-8. DSPIx_PUSHR Field Descriptions

CONT

Continuous peripheral chip select enable.Selects a continuous selection format. The bit
is used in SPI master mode. The bit enables the selected PCS signals to remain
asserted between transfers. See Section 20.4.7.5, “Continuous Selection Format,” for
more information.
0 Return peripheral chip select signals to their inactive state between transfers
1 Keep peripheral chip select signals asserted between transfers

 

20.4.7.5 Continuous Selection Format

 

That should do what you want.

 

 

 

0 Kudos