Hi guys!
How does one generate a stable clock signal above what the LED PWM provides?
I need a 2MHz square wave signal with 50:50 duty cycle.
Of cause the ESP32 is fast and I could use a RTOS thread, but there must be a more elegant way.
I see CLKout1, CLKout2, CLKout3 - #1 + #2 are on the USB pins - so what about CLKout3 (GPIO0)?
Or even better - because GPOI0 is connected to the boot sequence - have another pin do it - what about all those PWMs?
Any help would be awesome - I really don't feel like connecting a whole Arduino for the clock at this moment
Output a clock signal in the MHz range
- iot-bits.com
- Posts: 25
- Joined: Wed Dec 21, 2016 6:14 am
- Location: India
- Contact:
Re: Output a clock signal in the MHz range
You can use CLK_OUT pins to output any clock frequency (>= peripheral clock and accuracy subject to divisors). Check out the latest ESP32 TRM. It has details on how to output I2S clock on the CLK_OUT pins. It is really accurate.
- Pratik
Just another hobbyist and consultant
Just another hobbyist and consultant
Re: Output a clock signal in the MHz range
Ah OK, thanks for the hint!
To fill in others that have the same problem:
Using nothing but pin up/down in the main loop results in a short burst at about 1MHz on my scope.
Literally just
So I will now try to activate I2S in Arduino. Haven't found anything Arduino specific till now...
Is there some "tutorial" on how to use those routines in the SDK and the ardu core - I am not the greatest when it comes to this sort of cross-everything-coding…
To fill in others that have the same problem:
Using nothing but pin up/down in the main loop results in a short burst at about 1MHz on my scope.
Literally just
Code: Select all
setup: pinMode(5, OUTPUT);
loop:
GPIO_REG_WRITE(GPIO_OUT_W1TS_REG, 0b00000000000000000000000000100000);
GPIO_REG_WRITE(GPIO_OUT_W1TC_REG, 0b00000000000000000000000000100000);
Is there some "tutorial" on how to use those routines in the SDK and the ardu core - I am not the greatest when it comes to this sort of cross-everything-coding…
Who is online
Users browsing this forum: No registered users and 121 guests