S32K1 RTD function Lpspi_Ip_SyncTransmitHalfDuplex() clocks too many bytes

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K1 RTD function Lpspi_Ip_SyncTransmitHalfDuplex() clocks too many bytes

ソリューションへジャンプ
1,381件の閲覧回数
hns80
Contributor V

When using the SPI in half duplex mode, the following call sends two bytes, which is expected:

Lpspi_Ip_SyncTransmitHalfDuplex(&Lpspi_Ip_DeviceAttributes_SpiExternalDevice_0_BOARD_InitPeripherals, txBuffer, 2, LPSPI_IP_HALF_DUPLEX_TRANSMIT, timeOut);

When receiving, though, the function clocks multiple bytes. I tried specifying from 1 to 4 bytes and see the peripheral send enough clocks for 6 or 7 bytes:

Lpspi_Ip_SyncTransmitHalfDuplex(&Lpspi_Ip_DeviceAttributes_SpiExternalDevice_0_BOARD_InitPeripherals, rxBuffer, 1, LPSPI_IP_HALF_DUPLEX_RECEIVE, timeOut);

I see the same behavior whether I use interrupt driven SPI or polling.

How can I use the RTD calls to get the peripheral to receive a single byte with no extra clock pulses?

 

ラベル(1)
タグ(3)
0 件の賞賛
1 解決策
1,373件の閲覧回数
hns80
Contributor V

Changing SpiCsContinuous to FALSE fixed the problem

 

 

元の投稿で解決策を見る

0 件の賞賛
1 返信
1,374件の閲覧回数
hns80
Contributor V

Changing SpiCsContinuous to FALSE fixed the problem

 

 

0 件の賞賛