-->
Page 1 of 1

ESP12-Q change SPI Frequency with clock_div

PostPosted: Wed Jun 15, 2016 2:41 pm
by moonchaser
I'm playing with the esp modules already several months. Now I like to use the spi module. I'm setting it up with
Code: Select allspi.setup(1,spi.MASTER,spi.CPOL_LOW,spi.CPHA_LOW,spi.DATABITS_8,4)

I analyzed the signals and it is working correctly (CS, SCK and MOSI, see pic.). The measured clock frequency is about 8MHz. I tried to change it by varying the last parameter, which I thought is clock_div, because it is too fast for my SPI slave. But it does not change anything. The clock stays at 8Mhz, what ever I tried.
To send 3 bytes I used
Code: Select allspi.send(1,14,192,72)

What am I doing wrong?

Re: ESP12-Q change SPI Frequency with clock_div

PostPosted: Thu Jun 16, 2016 1:20 am
by moonchaser
I forgot to mention, I use nodemcu_float_0.9.6-dev_20150704.bin

Thanks!

Re: ESP12-Q change SPI Frequency with clock_div

PostPosted: Fri Jun 17, 2016 2:30 am
by moonchaser
I solved the problem by using the newest firmware. BTW, does anybody knows, why between the bytes is a such big time gap, even they are send in one command? The byte takes 1µs, but the gap is 4µs! Can this be improved?

Thanks