I'm using the MetalPhreak's (H)SPI library for ESP8266 and it looks good.
Since I need to send commands to another device (nRF24L01), I have something like this:
uint8_t ICACHE_FLASH_ATTR nRF24_RWReg(uint8_t reg, uint8_t value) {
CSN_L();
uint8_t statusreg = spi_transaction( HSPI, 8, reg, 0, 0, 8, value, 0, 0 );
//CSN_H();
gpio_output_set(BIT4, 0, BIT4, 0);
return statusreg;
}
The problem is that the GPIO port overlaps the SPI ports and destroys the timing. Please see the attached image.
Any ideas? If I repeat several times CSN_L() for example, right before CSN_H, it gives some delay for the CSN IO pin, but it is awful solution.