-->
Page 1 of 3

ESP8266 Clock Out

PostPosted: Thu Mar 17, 2016 11:25 am
by blark
Is there any way to enable the ESP8266 clock on one of the output pins?

I believe that I read somewhere that when it reboots it automatically sends the clock out for a short period and then stops. I assume that it's stopping because of software? Any way to re-enable this using the Arduino IDE?

Thanks
Mark

Re: ESP8266 Clock Out

PostPosted: Thu Mar 17, 2016 12:28 pm
by martinayotte

Re: ESP8266 Clock Out

PostPosted: Tue May 31, 2016 6:05 am
by Mr. Anderson
Hello,

I would like a ask a follow-up question.
Right now I'm trying to enable a continuous clock signal of at least 2 MHz (max 4Mhz) on GPIO14. With the information from the link above I came up with following code.

Code: Select all#include <SPI.h>
SPI.begin();
SPI.setFrequency(4000000);
// pinMode(pin, SPECIAL); 14 = SPI_CLK
pinMode(14, 14);
// FUNCTION_2: set GPIO14 (MTMS) to HSPICLK
pinMode(14, FUNCTION_2)


Sadly it's not working. I'm just not sure if my code is wrong or if SPI.setFrequency() doesn't work in this case and the clock speed is just way too high.
Is this even the right approach or should I try something completely different?

Re: ESP8266 Clock Out

PostPosted: Tue May 31, 2016 12:38 pm
by lethe
SPI clock is only running during data transmission, so regardless of whether your code is correct or not, the pin will remain low unless you are sending data. And even if you do, the clock will stop between 2 transfers, so SPI would be a poor choice to generate a steady clock signal.