All we need worry about is the buffer.... We place the data in a buffer... The module can sample the buffer's MSbit then transmit it... Whilst the new data is shifted in at the LSbit... We choose the mode to suit the external hardware...
I'm trying to understand how SPI works, and not just how to code it, which is more simpler.
I read in Wiki that:
Wikipedia said:
Note that with CPHA=0, the data must be stable for a half cycle before the first clock cycle. For all CPOL and CPHA modes, the initial clock value must be stable before the chip select line goes active.