MSPM0G3507: Multi-word SPI transaction in peripheral mode

Part Number: MSPM0G3507

I am trying to configure the SPI peripheral to operate in peripheral mode with 16-bit transfers in Motorola format.  I would like to use a controller device to transfer multiple words to the peripheral (and receive data in response), ideally without de-asserting CS between words.  However, the following text is in 25.2.3.1 of the reference manual:

For continuous back-to-back transmissions, the CS signal must pulse high between each data word transfer because the peripheral-select pin freezes the data in its serial peripheral register and does not allow altering of the data if the SPH bit is clear. The controller device must raise the CS pin of the peripheral device between each data transfer to enable the serial peripheral data write.

My understanding of this is that CS must be pulsed high by the controller after each 16-bit word.  Have I understood this correctly?

  • If you really want control over CS, it is often best to use 3 wire mode and do it yourself, it also gives you more freedom as to which pin to use.

  • Thanks for the response.  I'm not sure I need *more* control over CS, I just want to understand whether a host talking to my peripheral-mode SPI peripheral will be required to pulse CS between words or not. I'd prefer to stick with hardware CS if I can get away with it, I'm just a bit surprised at this text given that multiword transactions without deasserting CS are quite common.

  • The per-frame /CS is actually quite common in (MCU) SPI units, since most (I know of 2x exceptions) have no concept of a Transaction; thus it doesn't know when it's finished. If you use 3-wire mode  +  GPIO (i.e. you don't connect the /CS pin in the IOMUX) the /CS signal is quietly wiggling inside the SPI unit but no one knows about it, so the "freeze" doesn't matter.

    Are you asking about the peripheral side, or are you trying to write some controller-side code? The peripheral side doesn't care about this.

  • I'm trying to use the MSPM0 in peripheral mode. The controller that I have connected to it will assert CS, then transfer (TX/RX) some number of 16-bit words then deassert CS.  From your last sentence, it sounds like an additional brief deassertion of CS between words is unnecessary in this case, as the MSPM0 is a peripheral?