How do I calculate to get the correct timing for SPI
SPI usually cares little of clock speed (or jitter) provided the clock frequency is not too high and other timing is respected.  

However you do need to get the SPI mode correct. There are four possible modes (clock polarity and phase have two options each).