Hi David ,
I’ve taken some time to test how the SPI clock speed behaves using the speed option in (with-spi (str clock-divider).
These are my conclusions based on my 100Mhz digital scope.
First of all , it depends on the spi setting in the arduino IDE, under Tools you have an option for setting the highest SPI speed , being 24MHz (standard) or 50MHz or CPU/2 which is 60Mhz on 120Mhz cpu clock.
Then the next thing to consider is that all ODD numbers can not be used. So you can only divide by 2,4 6,8,10 and so on with 254 being the largest divider.
The clock for max SPI set in arduino must also be doubled for the calculation.
Example:
Max SPI speed set in arduino = 24MHz
I choose a divider of 10
This gives 24M*2 = 48M , divided by 10 = 4.8Mhz
If you divide by 11 , the result stays the same
If you divide by 12 , the result will be 48M/12 =4MHz.
A divider of 0 , 1 , 2 or 3 will give the max SPI speed *2 , divided by 2 , being 24Mhz in this case
Hoping this can help for the ulisp reference on the website , and hoping it also can help other ‘ulispers’ using ARM boards.
Kind regards ,
Ronny Suy