Toggle Chip Select on Panther (MPC5744P)

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Toggle Chip Select on Panther (MPC5744P)

985 次查看
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,

标签 (1)
0 项奖励
回复
1 回复

787 次查看
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 项奖励
回复