SPI interface from Raspberry pi working (with occasional glitches)