This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

spi configuration ?

Hi,

I'm trying to configure the SPI by using the nrf_drv_spi. the problem that I'm facing is the configuration of the "spi_config.SPI_CPHA = SPI_CONFIG_CPHA_Leading" which exict in the "spi_master.h" & not in the "nrf_drv_spi.h".

what should i do

regards,

Parents
  • This is specified by the by the nrf_drv_spi_mode_t field in the the nrf_drv_spi_config_t struct. The SPI peripheral can be set up in the following 4 modes:

    NRF_DRV_SPI_MODE_0 -	SCK active high, sample on leading edge of clock.
    NRF_DRV_SPI_MODE_1 -	SCK active high, sample on trailing edge of clock.
    NRF_DRV_SPI_MODE_2 -	SCK active low, sample on leading edge of clock.
    NRF_DRV_SPI_MODE_3 -	SCK active low, sample on trailing edge of clock.
    

    Please refer the SPI Master documentation on our Infocenter, found here. The nrf_drv_spi_config_t struct is documented here.

    -Bjørn

Reply
  • This is specified by the by the nrf_drv_spi_mode_t field in the the nrf_drv_spi_config_t struct. The SPI peripheral can be set up in the following 4 modes:

    NRF_DRV_SPI_MODE_0 -	SCK active high, sample on leading edge of clock.
    NRF_DRV_SPI_MODE_1 -	SCK active high, sample on trailing edge of clock.
    NRF_DRV_SPI_MODE_2 -	SCK active low, sample on leading edge of clock.
    NRF_DRV_SPI_MODE_3 -	SCK active low, sample on trailing edge of clock.
    

    Please refer the SPI Master documentation on our Infocenter, found here. The nrf_drv_spi_config_t struct is documented here.

    -Bjørn

Children
No Data
Related