Hello,
I have SPI RAM (23LC1024) which is connected to SPI (no HSPI) and using this functions to init - spiRamInit() which includes SPI overlap:
https://github.com/espressif/ESP8266_MP ... r/spiram.c
Now I can connect to same SPI second device (now I have connect to HSPI bud I can reconnect to SPI, together to RAM), bud I don't know how to drive CS. I drive CS on second device manually, and now is configured and used by this way...
Configure CS PIN:
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDO_U, FUNC_GPIO15); // configure SPI CS (set manualy)
Using:
PIN_OUT_SET |= (1<<CS_PIN);
How to reconfigure CS to second device for SPI overlap?
Thanks, MG
SPI overlap
Re: SPI overlap
Postby mgrunt » Mon Apr 18, 2016 6:01 pm
I found the mistake in file spi_overlap.c (SDK example).
Function spi_overlap_init() ans spi_overlap_deinit() is the same!!!
And deinit not working when I testes connect SPI RAM to SPI and my SPI device to HSPI and I try to switch between them because I can not find a solution to connect these two devices to together SPI (to which is also connected FLASH to).
What is correct function to deinit spi overlat? Thanks.
Function spi_overlap_init() ans spi_overlap_deinit() is the same!!!
Code: Select all
void ICACHE_FLASH_ATTR
hspi_overlap_init(void)
{
//hspi overlap to spi, two spi masters on cspi
SET_PERI_REG_MASK(HOST_INF_SEL, reg_cspi_overlap);
//set higher priority for spi than hspi
SET_PERI_REG_MASK(SPI_EXT3(SPI),0x1);
SET_PERI_REG_MASK(SPI_EXT3(HSPI),0x3);
SET_PERI_REG_MASK(SPI_USER(HSPI), BIT(5));
}
Code: Select all
void ICACHE_FLASH_ATTR
hspi_overlap_deinit(void)
{
//hspi overlap to spi, two spi masters on cspi
CLEAR_PERI_REG_MASK(HOST_INF_SEL, reg_cspi_overlap);
//set higher priority for spi than hspi
CLEAR_PERI_REG_MASK(SPI_EXT3(SPI),0x1);
CLEAR_PERI_REG_MASK(SPI_EXT3(HSPI),0x3);
CLEAR_PERI_REG_MASK(SPI_USER(HSPI), BIT(5));
}
And deinit not working when I testes connect SPI RAM to SPI and my SPI device to HSPI and I try to switch between them because I can not find a solution to connect these two devices to together SPI (to which is also connected FLASH to).
What is correct function to deinit spi overlat? Thanks.
Who is online
Users browsing this forum: No registered users and 237 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.