2005-11-14 02:04 AM
SPI in ST7FMC2 data sheet.
2011-05-17 01:19 AM
Hello
I read the data sheet of the ST7FMC2 In SPI section, page 92 it says: ''When the master device transmits data to a slave device via MOSI pin, the slave device responds by sending data to the master device via the MISO pin.'' How much time after the slave got the last byte of message, it still can write back to the MISO pin and answer ? Also it syas: ''Four possible data/clock timing relationships may be chosen (see Figure 57) but master and slave must be programmed with the same timing mode.'' But the master is the one that gives the clock, so I don't have to set the same timing in slave. So it this an error in data sheet? (maybe it means that I have to set CPOL and CPHA the same in both) master and slave) Thanks Oren2011-05-17 01:19 AM
hello gforte
Thanks a lot for your replay. I understand that the master generate the clock. So, writing to SPIDR register produce clock. right ? Does also reading from SPIDR register produce clock ? if not, then I have to write and read at the same time from the SPIDR. how to do this ? Also, suppose master send command, and it takes between 1 to 3 miliseconds to the slave, to calculate the answer. how will the master will know when the slave is ready to answer ? (I don't want to wait always worst case long time) Thanks Oren2011-05-17 01:19 AM
Hello Gigi
Thanks a lot for your help. You mean that when I write to the SPIDR, (and send it from master to salve,) then I will read from the SPIDR, immidiatly after the write, a different value ? (that was written to me ?) What about the slave side ? what happen there ? I will do some experiments to see what was written to me when I wrote to the SPIDR. Thanks a lot Yours Oren