2016-11-11 09:08 AM
Hello. I have got stm32f746 and I make project with cubeMX.
I want to use SPI4, SPI5, SPI6 as fullduplex master with 50Mb/s baudrate. Then I try to HAL_SPI_Transmit(&hspi4, pData, 1, 30000); in while(1) cycle. Data has been sent, but the clock is very bad.(I put image in attachment. You can see there.) As you see, duration is not 50%. When I set baudrate less then 50Mb/s, may be clock is good, but I need only 50Mb/s. Is this my fault, or this is bug?2016-11-12 10:47 AM
What's your LA's sampling frequency?
JW2016-12-10 10:55 AM
Make sure the GPIO speed is setup to high frequency. You might check the signal quality with the optional pull-up mode.
The duty cycle of the clock signal probably depends on the SYSCLK and prescaler values (1/2, 1/4, 1/8, etc...)
50 MHz requires careful PCB lines and probably a serial resistor to avoid ringing. Also make sure to use if possible 4 wire mode and not 3 wire bi-directional. Definitely DMA will have to be used for good average data throughput. (6 channels, as you'll need a TX and RX channel for each SPI if they are used concurrently).
Good luck!