Toggle Chip Select on Panther (MPC5744P)

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

Toggle Chip Select on Panther (MPC5744P)

778 Views
yyin
Contributor II

Hello,

 

We know how to set the CS pin in SPI as GPIO and toggle it manually to assert CS signal and negate the signal as well. I'm wondering if we can configure in registers in SPI and let the module control CS signal automatically? 

 

That's my question. Thank you for any feedback.

 

Best Regards,

Labels (1)
0 Kudos
1 Reply

580 Views
aero72
Contributor III

Hi,

This is done using commands to the PUSHR of the PUSH_TX_FIFO (see Reference manual 49.3.7, SPI_PUSHR). The most significant word contains the command to the SPI peripheral, including which CTAR register to use for the transfer and the PCS field contains which chip select line to use for the transfer. The CTAR contains the timing information for when the CS line is controlled with respect to the clock and data.

The low 16 bits of the PUSHR contain the data.

Hope that helps.

0 Kudos