AnsweredAssumed Answered

STM32F042F6 SPI1 clock polarity problem

Question asked by grad.pawel on Nov 14, 2016
Latest reply on Dec 10, 2016 by S. Marsanne
Hello,
On my currently developing device and I issued a problem. I'm using CubeMX 4.17, F0 package 1.6 and F4 package 1.13.1.

I developed the code for F4 - SPI1 communicating with NRF24L01+ module using HAL library and DMA and everything works. Then I created new project for F0 and ported some code from F4. I notice an issue. On first SPI transaction HAL_SPI_TransmitReceive_DMA() clock is HIGH when IDLE (CPOL is set to LOW). I tried changing CPOL to HIGH but situation is the same. Following transactions are OK.

First transaction:
http://i.imgur.com/nQJ3hTx.png
Second:
http://i.imgur.com/95UEBs8.png
SPI configuration:
http://i.imgur.com/yEPiFJZ.png
http://i.imgur.com/U8m4rXS.png


So I'm making first dummy transaction and then I'm palying with SPI the way I want. Do you know where the proble might be?

Outcomes