2016-01-08 06:28 AM
Hi
I'm stuck in my project by this spi problem. What i do is simple, i send a data from a stm32f0 (master) to another one (slave) but here is the problem: while i see on the scope the good frame, the slave device doesn't. More precisely, it sees the data divided by 2. Plus i have to send the data twice to make the slave device understand something other than 0x00.. In the case of the slave, i handle the communication by interrupt whereas the reference manual says that it is preferable to use DMA. Do anybody found this problem someday?? I really need to work this out2016-01-09 11:42 AM
I suspect that you have a ''mode'' problem. There are 4 modes with SPI, specifying the clock polarity and resting state. If you get things wrong, the slave will recieve dat one bit-clock a too late and give you data that you call ''divided by two''.
2016-01-11 12:53 AM
But i've already check the CPOL and CPHA, they are the same for master and slave. I've also tried to change them but still the same problem..
2016-01-12 07:35 AM