I have an LPC uC which i use as SPI master that is connected with an esp8266 (spi slave).
For esp I am using arduino esp framework and wrote a sketch to handle spi interrupts.
I am using the SPISlave library https://github.com/esp8266/Arduino/tree ... s/SPISlave.
Inside setup() there is the interrupt handle routine of SPI Slave library (SPISlave.onData).
Inside SPISlave.onData i set a flag true. So every time i get an spi interrupt spiflag is true.
Inside loop() i check if the spi flag is true do some actions and restore spi flag to false.
These actions are to send the received spi data through http rest POST to a server. So there must be some latency here.
When i manually send spi data from master(LPC) to slave(esp) there is no problem. Interrupts occur and spi data are sent through http request.
But when code from master(LPC) sends continuously data through spi i miss interrupts.
I have checked that i miss interrupts.
Any ideas how to overvome this issue?
Can i use some kind of queue to buffer spi data so that i dont miss them?
Any idea?