ESP SERIAL FLASHER SPI COMMAND

pepopi
Posts: 32
Joined: Mon Apr 11, 2022 9:45 am

ESP SERIAL FLASHER SPI COMMAND

Postby pepopi » Thu Jun 22, 2023 3:04 pm

Hello,
I have a doubt, in the ESP serial flasher protocol.h do the commands have a reason for having those precise values? If so, where can I consult that in the technical reference manual? And if not why does it skip certain values?
typedef enum __attribute__((packed))
{
FLASH_BEGIN = 0x02,
FLASH_DATA = 0x03,
FLASH_END = 0x04,
MEM_BEGIN = 0x05,
MEM_END = 0x06,
MEM_DATA = 0x07,
SYNC = 0x08,
WRITE_REG = 0x09,
READ_REG = 0x0a,

SPI_SET_PARAMS = 0x0b,
SPI_ATTACH = 0x0d,
CHANGE_BAUDRATE = 0x0f,
FLASH_DEFL_BEGIN = 0x10,
FLASH_DEFL_DATA = 0x11,
FLASH_DEFL_END = 0x12,
SPI_FLASH_MD5 = 0x13,
} command_t;
Thank you

ESP_Sprite
Posts: 9709
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP SERIAL FLASHER SPI COMMAND

Postby ESP_Sprite » Fri Jun 23, 2023 2:10 am

They're communication parameters with the ROM baked into the ESP chips; the ROM checks for those numbers and does the thing that goes with it. Skipped numbers probably used to be there at some time but were removed without shifting the other numbers up. I don't think it's documented in any hardware docs, as ROM-defined behaviour kinda-sortta is seen as software.

pepopi
Posts: 32
Joined: Mon Apr 11, 2022 9:45 am

Re: ESP SERIAL FLASHER SPI COMMAND

Postby pepopi » Sat Jun 24, 2023 11:01 am

Thank you, I have another question I'm looking up the SPI register in the technical reference manual and I can't find the flash ID register. Do you know where is it?

Who is online

Users browsing this forum: jsmith56x and 304 guests