AnsweredAssumed Answered

HCS08 - SPI Slave Mode - Data Integrity / Overwrite / Discard SPID

Question asked by Alexander Buergel on Oct 24, 2014
Latest reply on Oct 24, 2014 by Tony Papadimitriou


Dear Community,

I want to share data between two MCUs via SPI. One would be the Master, one would be the slave. Since the slave samples some I/O's continuously, I would like to provide always the latest status information to the master.

If I understood the principle of the SPI in HCS08 correct, this is not possible, since SPID (SPI-Data-Register) is a 2-Level FIFO.

So the sequence on the slave would be like:

1) Slave samples I/Os

2) Slave checks if SPID can be written

3) If yes, write status info into SPID

 

On the master:

Read SPI-Byte from slave at "some time".

 

However, one can see that the master always reads "old" information, e.g. if the master only reads data via SPI once in 10 minutes, it will always read information that is 10 minutes old.

 

So my question is: Is there a way to overwrite the data in SPID periodically? If yes, the slave could write new data there e.g. every 10 ms....

 

Thank you and best regards,

Alex

Outcomes