HCS08QG8, How can I know a SPI's transmission is completed?

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

HCS08QG8, How can I know a SPI's transmission is completed?

ソリューションへジャンプ
1,095件の閲覧回数
w_tension
Contributor III


I've took a look at status register, it contains 3-bits: Read buffer full flag, Transmit empty flag, Fault flag.

As I can see, transmit data register is empty doesn't mean "transmit complete",

Data may still in the shift register. If then I disable spi peripheral, error will occur.

ラベル(1)
タグ(2)
0 件の賞賛
返信
1 解決策
915件の閲覧回数
scottm
Senior Contributor II

Have you tried checking the read buffer full flag?  A byte is clocked in with every byte that is clocked out, so by the time the received byte is marked complete your transmitted byte should be finished as well.  Keep in mind that you'll need to make sure the read full flag is cleared before you start the transmission.

Scott

元の投稿で解決策を見る

1 返信
916件の閲覧回数
scottm
Senior Contributor II

Have you tried checking the read buffer full flag?  A byte is clocked in with every byte that is clocked out, so by the time the received byte is marked complete your transmitted byte should be finished as well.  Keep in mind that you'll need to make sure the read full flag is cleared before you start the transmission.

Scott