- insert a dummy DMA transaction between the two bytes (e.g. copy a memory area into itself or so)
- or trigger the DMA externally, using a clock together with a LUT to create the trigger pattern you need
Sadly this won't work. I can't simply interrupt the DMA transfer. If the SPIM's FIFO ever becomes empty, then the SS output will go inactive during that period.
Somehow I need to actually pause the SPIM itself.
I see (again :) two options here:
- control SS by yourself, not by the SPIM (this is also suggested in the data sheet)
- use your own interrupts, and handle the SPI IDLE condition differently
I'm not sure about the second method, since it depends on that SS is handled by the interrupt, and not by the internal state machine.
Another option might be to use the byte complete interrupt, and pause/gate the clock supplied to the SPIM after the second byte.
Btw: what device do you want to communicate with?