SPI1 SCK Polarity is incorrect.
I have a B-U585I-IOT02A Discovery board, which is connected it to an external ST LSM6DS3 accelerometer via the SPI1 pins on the arduino connector. The issue is that the SCK line is going low when not active even though I have it configured to be high. I've tried with different clock sources with no success. Here is what the line waveforms look like with my logic analyzer:
Notice that the clock line(on top) starts low and only when the chip select(on bottom) is set low, does the clock line go high.
Contrast that with the same thing done with SPI3 also on the B-U585I-IOT02A, via the pins on the STMod+ connector:
Notice that the clock line(on top) is always high when inactive. This is the correct behavior and communicates correctly with the LSM6DS3.
I have double and triple checked the settings for SPI1 and tried different clock sources, configured the SCK like to pull up and haven't have any success.
Also note, I have done this same test with a U575-Nucleo, a WB55-Nucleo and a L476-Nucleo via the Arduino connector and had success with each with the clock line behaving like in my SPI3 image above. SPI1 on the B-U585I-IOT02A is the ONLY board/SPI I can't get it to work with.
So the question is, am I missing some setting or is there an issue with B-U585I-IOT02A, or perhaps even an issue with the SPI1 on the U585? Please advise.
Thanks,
Craig
