External Crystal Used foe ESP8266EX
Posted: Tue May 26, 2015 6:33 pm
I was analyzing the ESP-12 module and noticed that a 26MHz crystal was used. I thought that was an odd frequency choice since the CPU runs at 80MHz so I did a little digging.
In the Hardware Manual I find this statement:
I found that a bit odd, especially since there isn't any mention on how the external crystal impacts the frequency of the CPU and surely it must.
Then in the datasheet I found this:
Hmm, OK, that explains the odd choice of a 74880 baud rate that I've seen.
So why are the modules using 26MHz crystals and not 40MHz? Of course the lower the frequency the lower power consumption but the CPU frequency can be controlled by software so why not use a standard 40MHz crystal? There are many articles that have evaluated CPU frequency vs power consumption. The lowest power consumption is not always the lowest clock speed because if you lower the speed operations take longer so you have to stay active longer.
I don't know about you but if nothing else I'd prefer a default baud rate of 115200 and the ability to control the CPU frequency over a wider range. Maybe I've missed something, so let me know if I have.
In the Hardware Manual I find this statement:
2.2.4. Crystal Oscillator
Currently, the frequency of crystal oscillators supported include 40MHz, 26MHz and 24MHz. The accuracy of crystal oscillators applied should be ±10PPM, and the operating temperature range should be between -20°C and 85°C.
I found that a bit odd, especially since there isn't any mention on how the external crystal impacts the frequency of the CPU and surely it must.
Then in the datasheet I found this:
Notes: By default, UART0 will output some printed information when the device is powered on and is booting up. The baud rate of the printed information is closely related to the frequency of the external crystal oscillator. If the frequency of the crystal oscillator is 40MHz, then the baud rate for printing is 115200; if the frequency of the crystal oscillator is 26MHz, then the baud rate for printing is 74880. If the printed information exerts any influence on the functionality of your device, you’d better block the printing during the power-on period by changing (U0TXD,U0RXD) to (MTDO,MTCK).
Hmm, OK, that explains the odd choice of a 74880 baud rate that I've seen.
So why are the modules using 26MHz crystals and not 40MHz? Of course the lower the frequency the lower power consumption but the CPU frequency can be controlled by software so why not use a standard 40MHz crystal? There are many articles that have evaluated CPU frequency vs power consumption. The lowest power consumption is not always the lowest clock speed because if you lower the speed operations take longer so you have to stay active longer.
I don't know about you but if nothing else I'd prefer a default baud rate of 115200 and the ability to control the CPU frequency over a wider range. Maybe I've missed something, so let me know if I have.