Main Site Documentation

SPI Clock Rate


#1

I am unable to control the rate of SPI on ChipworkX with .NET Micro 4.1.

Here is my code:
var config = new SPI.Configuration(ChipworkX.Pin.PA5, false, 1, 1, true, true, 100, SPI.SPI_module.SPI2);
spi = new SPI(config);
spi.Write(data); // data is a byte array with some data

I have tried 10kHz, 50kHz, and 100kHz and captured the SPI clock at 2MHz using a data acquisition card. I always see the same clock rate (400kHz?). Am I understanding this correctly?


#2

We do not support low clock rates. Forgot what is the minimum.
Why do you need low rate on SPI? Maybe we can add this for you

Usually, SPI is used in 1000khz or more so why do you need lower?


#3

I just wanted to slow things down to make it easier for troubleshooting (my data acquisition system can’t capture many channels at 1MHz).

I can work around it, but maybe documenting the range of supported SPI clock rates would be helpful.

Thanks!