- Sat Jan 24, 2015 4:24 pm
#8107
Fr4gg0r wrote:I am not using the externally available ADC. Also I don't see why providing too much voltage to the ADC would cause the chip to hang.
Try to do the experiment.
Btw.: Did you do some experiments to see if actually does anything?
I wrote a small benchmark in lua but could not see any speed gains compared to 80MHz.
correctly reports back 160MHz.
Does it have to be called at startup?
https://github.com/esp8266/esp8266-wiki/wiki/Memory-Map :
3FF00014h is a clock setting register. Setting bit 0 changes the CPU to 160 MHz mode. Clearing it means 80 MHz.
Code: Select all#ifdef USE_CPU_SPEED
#if USE_CPU_SPEED > 80
REG_SET_BIT(0x3ff00014, BIT(0));
os_update_cpu_frequency(160);
#else
REG_CLR_BIT(0x3ff00014, BIT(0));
os_update_cpu_frequency(80);
#endif
#if DEBUGSOO > 0
os_printf("Set CPU CLK: %u MHz\n", ets_get_cpu_frequency());
#endif
#endif
see os_update_cpu_frequency in esp_iot_sdk\examples\IoT_Demo\ssl\app\espconn_ssl.c
BiosROM:
Code: Select all40002f04 <ets_update_cpu_frequency>:
2f04: fff131 l32r a3, 2ec8 <ets_timer_init+0x60> 0x3fffc704 = 0x000000a0
2f07: 0329 s32i.n a2, a3, 0
2f09: f00d ret.n
2f0b: 00 .byte 00
40002f0c <ets_get_cpu_frequency>:
2f0c: ffef21 l32r a2, 2ec8 <ets_timer_init+0x60>
2f0f: 0228 l32i.n a2, a2, 0
2f11: f00d ret.n
os_update_cpu_frequency()/ets_get_cpu_frequency() - Called to notify the timers and other routines settings in the SDK/BiosROM.
SDK periodically disables 160MHz.
My tcpsrv_server_poll() enables 160MHz, when there is a connections (else #define USE_CPU_SPEED xx)
At 80MHz speed HTTP / TCP to 800 Kbytes / sec
At 160MHz CPU and QSPI 80MHz + Flash W25Q128 speed more 1200 Kbytes / sec