A random observation on Raptor's SPI clock

Today I’ve been searching why my FRAM chips sometimes behave erratically, and came to an interesting observation: even though SPI bus constructor accepts any clock frequency, that doen’t mean that exact frequency will be used. For example, I initialize my SPI with 40MHz clock, but it actually runs at 44MHz! And 44MHz is above FRAM chip specification. So, who knows, maybe this was the cause of my problems?..

This is probably related to Raptor’s peripheral clock running at 133MHz, which cannot be divided as I wish, so Raptor’s firmware simply takes the closest value.

I understand this probably cannot be fixed, but maybe you, GHI guys, could put a note in bold font somewhere in documentation section?

The code should get the closest value but it should be what you set or less, never more. This is a bug and we will take care of it.

Cool then, thanks :slight_smile:

I like it that Simon keeps GHI in check! :clap:

Well, we all are in the same boat, so let’s fix things together 8)