-->
Page 3 of 7

Re: SPI Slave Mode

PostPosted: Tue Oct 14, 2014 10:34 pm
by Patch
akohlsmith wrote:I'm looking at the SPI Slave mode for this device. Faster host communications and a common bus (SPI) with other popular wifi modules are my primary reasons for looking at this mode instead of the UART mode.


Indeed! Any news on this front?

Re: SPI Slave Mode

PostPosted: Tue Oct 14, 2014 10:45 pm
by akohlsmith
Patch wrote:Indeed! Any news on this front?


Sadly, not yet. I'll definitely keep everyone posted.

Re: SPI Slave Mode

PostPosted: Thu Oct 16, 2014 11:57 am
by Jostikas
If I had to guess, then the HSPI pins are for slave mode operation (ie. connect them TO Host SPI.) The reason being that the pins you mention are already in use for connecting the serial flash module, and that is most definitely not a master device.

Re: SPI Slave Mode

PostPosted: Fri Oct 24, 2014 4:25 pm
by tinhead
Squonk wrote:
jonsmirl wrote:I don't think the ESP8089 is an older device. It is the same basic chip configured for slave mode. It is used in tablets as a wifi chip.

I found this:
https://github.com/linux-rockchip/kerne ... ss/esp8089


right, and there is esp_android.c which contains some interessting things:

Code: Select allstruct esp_init_table_elem esp_init_table[MAX_ATTR_NUM] = {
   {"crystal_26M_en",    48, -1},
   {"test_xtal",    49, -1},
   {"sdio_configure",    50, -1},
   {"bt_configure",    51, -1},
   {"bt_protocol",    52, -1},
   {"dual_ant_configure",    53, -1},
   {"test_uart_configure",    54, -1},
   {"share_xtal",    55, -1},
   {"gpio_wake",    56, -1},
   {"no_auto_sleep",    57, -1},
   {"attr10",       -1, -1},
   {"attr11",       -1, -1},
   {"attr12",       -1, -1},
   {"attr13",       -1, -1},
   {"attr14",       -1, -1},
   {"attr15",       -1, -1},
   //attr that is not send to target
   {"ext_rst",              -1, -1},
   {"attr17",              -1, -1},
        {"attr18",              -1, -1},
        {"attr19",              -1, -1},
        {"attr20",              -1, -1},
        {"attr21",              -1, -1},
        {"attr22",              -1, -1},
        {"attr23",              -1, -1},
};


we know that to configure ESP8266EX to run with 40MHz crystal one have to change value 30h of the esp_init_data_default.bin (which then have to be burned to 7C000). 30h is 48, so same as in the init table above. Based on that, and the esp_android.c and its defualt config (init_data.conf), i would say when one set 1 on 32h then the chip is working in SPI slave, when 2 then SDIO mode and 0 sets it back to default. That my guess, it need to be checked anyway hardware wise. From a boot message i would say i does works:

when default: ets Jan 8 2013,rst cause:2, boot mode:(3,6)
when set to SPI: ets Jan 8 2013,rst cause:2, boot mode:(3,0)
when set to SDIO:ets Jan 8 2013,rst cause:1, boot mode:(3,1)

then if course due missing hardware the bootloader is still jumping to SPI boot, but as i said, one have to check this with properly hardware configuration.

No idea how and if the other values from the init table are working. EDIT: quick check, i did set 31h to 1, whcih should then change the test_xtal value, and indeed, any firmware is now having clock out set toGPIO0, exactly as escribed in the android / ESP8089 documenation. Nice.