On Thu, 2018-11-15 at 10:00 +0000, Gil Beniamini wrote: > > +/* The following while() which copies tx-data into tx-fifo, must not be interrupted, > +** interruption might lead to chip tx-fifo become empty before end of the transaction data, > +** and cause chip-select release at mid transaction, which means SPI' master-slave protocol violation! > +*/ > +local_irq_save(flags); Can you instead use gpio chip select? This would prevent master de- asserting it when the fifo empties. You can probably pinmux your chip to use the same pin as it uses now, but in gpio mode. Or try to use DMA, which will be much more reliable.