-->
Page 5 of 49

Re: Announce: Free book on the ESP8266

PostPosted: Wed Aug 05, 2015 5:09 pm
by lethe
martinayotte wrote:I have a PL2303, but maybe a clone (I'm not sure), and I've never be able to decrypt 76800 Baud boot message.

I've tested CP2102/CP2104, PL2303 and a (most likely fake) FT232RL. Out of these, only the FT232RL worked at 74880 baud.
If you happen to have an USB AVR at hand: an atmega32u4 programmed with the LUFA USBtoSerial demo also works well (other AVRs compatible with LUFA should also work).

(I think I will purchase another one, although I would prefer that Espressif change that to 115200 in their own libs right after reset)

The boot loader UART speed depends on the crystal used. It is 115200 baud with a 40MHz crystal, but most (all?) available boards use 26MHz crystals. The baud rate is therefore 115200baud * (26MHz/40MHz) = 74880 baud (see datasheet, section 3.6).

Re: Announce: Free book on the ESP8266

PostPosted: Wed Aug 05, 2015 5:28 pm
by martinayotte
lethe wrote:If you happen to have an USB AVR at hand: an atmega32u4 programmed with the LUFA USBtoSerial demo also works well (other AVRs compatible with LUFA should also work).

The boot loader UART speed depends on the crystal used. It is 115200 baud with a 40MHz crystal, but most (all?) available boards use 26MHz crystals. The baud rate is therefore 115200baud * (26MHz/40MHz) = 74880 baud (see datasheet, section 3.6).


Unfortunately, the Arduino I have are Nanos ... If FTDI clone works, then maybe I will purchase one (or a CH340 ?) ...
For the 115200/74880 rate, yes, I saw that recently in the datasheet, but still, since it can be change in software, why Espressif doesn't do kind of "if 26Mhz then switch prescaler to 115200 else keep default prescaler" ... ;)

Re: Announce: Free book on the ESP8266

PostPosted: Wed Aug 05, 2015 6:24 pm
by lethe
martinayotte wrote:Unfortunately, the Arduino I have are Nanos ... If FTDI clone works, then maybe I will purchase one (or a CH340 ?) ...

I don't have any CH340s to test, so all bets are off...

For the 115200/74880 rate, yes, I saw that recently in the datasheet, but still, since it can be change in software, why Espressif doesn't do kind of "if 26Mhz then switch prescaler to 115200 else keep default prescaler" ... ;)

That's not gonna happen, because the bootloader is on the ESP itself and has no idea what crystal is connected and no way to find out.
The firmware written to the SPI flash can match the baud rate to the crystal used, because the crystal's frequency is written to flash along with the program. With espressif's flash tool, you can manually select the frequency of the crystal, esptool.py does not seem to have that option.

Re: Announce: Free book on the ESP8266

PostPosted: Sat Aug 08, 2015 10:36 am
by gauravgupta
Great Work!!