我想用LPC2131的SSP使用SPI模式主机与24位的ADC LTC2440从机相连,接收32位的转换结果,接线方式如下: LPC2131 LTC2440 SSEL1----------CS SCK1-----------SCK MISO1----------SDO MOSI1----------SDI 当(cpol=0,cpha=0)时序与LTC2440的是相匹配的,但是在连续两帧传输时,接收一帧16位后,SSEL电平被拉高,这会中断LTC2440的传输,导致后面的32位结果的后16位接收不到,应该怎么办? However, in the case of continuous back-to-back transmissions, the SSEL signal must be pulsed HIGH between each data word transfer. This is because the slave select pin freezes the data in its serial peripheral register and does not allow it to be altered if the CPHA bit is logic zero. Therefore the master device must raise the SSEL pin of the slave device between each data transfer to enable the serial peripheral data write. On completion of the continuous transfer, the SSEL pin is returned to its idle state one SCK period after the last bit has been captured.
数据手册中说:两帧数据间CS必须拉高是因为当cpha=0时,从机选择针冻结了在串行外设寄存器中的数据而不允许改变.
如果在接线时,不用LPC2131的SSEL1引脚功能而将其设置为 I/O 口控制LTC2440的CS,是不是会解决接收一帧16位后,SSEL电平被拉高因而中断LTC2440的传输的问题.
还有一个问题,当SSP做主SPI时,数据手册上说只有FIFO中有数据才能启动发送,并同时接收从机数据,那样的话,主机是不是要一次写入2帧16位的数据才能接收到2帧16位的从机结果,
|