ESP8266 Developer Zone The Official ESP8266 Forum 2015-09-18T00:06:27+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=1118 2015-09-18T00:06:27+08:00 2015-09-18T00:06:27+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1118&p=3734#p3734 <![CDATA[Odd Line of Code in SPI Overlap Example]]>

Code:

   //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));

What I find odd is the setting of bit 5 of the SPI_USER register because, according to spi_register.h, bit 5 is SPI_CS_SETUP. As far as I can tell the SPI_CS_SETUP bit has nothing to do with overlap mode specifically. Is that line misplaced (being better located with code setting/clearing of other bits in the SPI_USER register) or should it be setting a different bit or be operating on a different register?

Statistics: Posted by dkinzer — Fri Sep 18, 2015 12:06 am


]]>