Usually similar behavior happens if your SPI slave supports only this configuration: Polarity low and Phase high.
Check documentation of your SPI slave. Often SPI devices support only single Phase/Polarity combination.
For example the P1020RDB board contains the S25FL128P0XNFI00 SPI Flash;
Datasheet for this SPI Flash contains the following:
A microcontroller can use either of its two SPI modes to control Spansion SPI Flash memory devices:
CPOL = 0, CPHA = 0 (Mode 0)
CPOL = 1, CPHA = 1 (Mode 3)
Input data is latched in on the rising edge of SCK, and output data is available from the falling edge of SCK for both modes.
Have a great day,
Pavel Chubakov
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------