2017-03-26 02:53 PM
I'm using CubeMX 4.19.0 for STM32F407G-DISC1 and firmware for STM32F4 version 1.14.0. (yes I realize there is an update).
When setting up an SPI port, one of the parameters is CPHA, the clock phasing. You have to declare whether the slave will have stable data on the rising or falling phase of the clock edge.
RM0090 has this parameter as CPHA=0|1. Cube has the Clock Phase parameter being 1 edge or 2 edge. Umm, one edge or two, that doesn't make any sense.
If I dig deeper into RM0090, the explanation of CPHA says:
0: The first clock transition is the first data capture edge
1: The second clock transition is the first data capture edgeCube needs an explanation in the description area saying which is which. I expect that Cube means first edge and second edge, which almost matches RM0090.
In it's current form, Cube is making me write this request rather than guiding me to the proper setting.
Andrei
2017-03-28 04:41 AM
Hi Andrei,
Thank you for your feedback, I will raise your request internally.
Regards
Imen
2017-04-28 06:21 AM
Hi
Chichak.Andrei
,Thanks for reporting this point.
The fix I did for this post will be available in the next CubeMX release (4.21). It will be available soon.
BR. Eric
2017-08-16 02:41 AM
CubeMX
V1.0
Version 4.22.0 still has the same problem2023-11-07 09:37 PM - edited 2023-11-07 09:42 PM
Sorry for replying a thread posted 6 years ago. This reply is for new readers brought over by Google.
I tried SPI transfer using both Edge 1 and Edge 2 options while putting the SCK and MOSI signals on an oscilloscope, the results are:
The Edge 1 option corresponds to CPHA=0;
The Edge 2 option corresponds to CPHA=1.
Hope it helps.