MC9S08AC60 SPI Master - how best to flush out old Rcv Data on Master?

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

MC9S08AC60 SPI Master - how best to flush out old Rcv Data on Master?

544 次查看
mfugere
Contributor III

I'm porting over some (bad) legacy code and encountering problems where occasionally the SPI1D receive buffer on the Master contains (old) bytes from a previous Slave data transfer, which then ends up going into the beginning of the next received data buffer on the Master.  Which bits can I use in the SPI control registers to effectively clear out (either all 0s or all Fs) content of the SPI1D receive register and its double buffer to ensure that the first bytes of a subsequent transfer are not old/leftover bytes?    I normally send formatted data packets for this stuff, but to do so will require even more upset to the legacy code, which had been running (more or less) on MC908GP32 devices.

Thank you

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