Question
STM32F042F6 SPI1 clock polarity problem
Posted on November 14, 2016 at 08:53
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.pngSecond:http://i.imgur.com/95UEBs8.pngSPI configuration:http://i.imgur.com/yEPiFJZ.pnghttp://i.imgur.com/U8m4rXS.pngSo 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? #!f0-!spi