2022-01-18 10:32 AM
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
Solved! Go to Solution.
2022-01-18 11:01 AM
> So the question is, am I missing some setting or is there an issue with B-U585I-IOT02A
Which pin? Have you checked in the board's schematics, what is connected to that pin on the board?
Do you clear SPI_CR1.SPE between transactions?
JW
2022-01-18 11:01 AM
> So the question is, am I missing some setting or is there an issue with B-U585I-IOT02A
Which pin? Have you checked in the board's schematics, what is connected to that pin on the board?
Do you clear SPI_CR1.SPE between transactions?
JW
2022-01-18 12:56 PM
Thank you JW! Upon checking the schematic, there is an LED(LD2) connected to PE13 which is also the SPI1 SCK line on the Arduino connector. There is a 0 ohm resistor R48 that can be removed taking LD2 out of circuit. Doing so allows the SCK line to behave properly and I'm now able to get values properly from the LSM6DS3.
Shame on me for assuming that the Arduino connectors should work the same on all these Nucleo and Discovery boards straight out of the box.