Yesterday I managed to prove I could both read and write to the DW. My code uses an interrupt routine, so that, in theory anyway, the processor can be doing other stuff while the transfer is in progress. This may prove to be a small gain, and in any case I discovered that DW do not use interrupt-driven SPI. Indeed they implement a mutex that turns off interrupts from the DW module while the transfer is in progress, which I’m curious about.
The other snag is that their SPI routine transfers the command, and data bytes in separate buffers. I could rewrite my interrupt routine to match their calling protocol, but that’s going to be a bit fiddly and will undoubtedly introduce some bugs. So I decided to simply copy the two chunks of DW data into a separate buffer, and call my usual one-buffer routine. I did that getting it to work at all is higher priority, and I can rewrite it later to save the extra buffer space.
OK, so the next step is to port a little more code over and see if it can drive the DW through my SPI routines.