So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By ekt
#74967 I'm trying to understand if the fact that having a non conventional crystal frequency might be a problem with firmwares built via nodemcu-build.com and flashed with PyFlasher

my (limited) understanding is that there is register which has to be set to 0 for 40MHz, or 1 for 26MHz crystals.

the esp8266 library in the arduino ide has a settings (core_esp8266_phy.c, phy_init_data[48])
the espressif flash download tool has a setting too (and a way to auto detect it also)
but I could not find an equivalent option in the cloud build, nor a setting in PyFlasher or esptool.py
User avatar
By ekt
#74986 answering myself in hope it helps someone else
as far as I can tell, either PyFlasher or esptool.py does not support setting the crystal frequency. they all assume it has been correctly set in the firmware. the cloud build nodemcu-build.com does not have a way to specify it.

so, the best I came up was the following script (I'm on windows)

Code: Select allesptool.py --port com9 erase_flash
esptool.py --port com9 write_flash -fm dio 0x00000 nodemcu-firmware-20180328.bin
del rfblock.bin
esptool.py --port com9 read_flash 0x3FC000 128 rfblock.bin
set-byte.py rfblock.bin 0x30 0
esptool.py --port com9 write_flash 0x3FC000 rfblock.bin