Hello, I'm looking into documentation nRF52832_PS_v1.2.pdf and there is written:
Mode Clock polarity Clock phase
CPOL CPHA
SPI_MODE0 0 (Leading) 0 (Active High)
SPI_MODE1 0 (Leading) 1 (Active Low)
SPI_MODE2 1 (Trailing) 0 (Active High)
SPI_MODE3 1 (Trailing) 1 (Active Low)
When I look into SDK (components\drivers_nrf\hal\nrf_spis.h) ther is written:
typedef enum
{
NRF_SPIS_MODE_0, ///< SCK active high, sample on leading edge of clock.
NRF_SPIS_MODE_1, ///< SCK active high, sample on trailing edge of clock.
NRF_SPIS_MODE_2, ///< SCK active low, sample on leading edge of clock.
NRF_SPIS_MODE_3 ///< SCK active low, sample on trailing edge of clock.
} nrf_spis_mode_t;
So for example Mode 1 sounds contradictory docuamentation says (Leading) and (Active Low) while code comments says "active high", "trailing".
Can you correct the one which is wrong?