Device tree setting problem

Hi 

  Iam use nRF7002-DK, SDK v2.5.2, I try to set high seed SPI as master and connect with BMP280 sensor,I generate overay file for spi4 connect BMP280 sensor,for this resource in nrf5340_cpuapp_common.dts connect mx25r64 NOR flash first, as below picture, can I coonect two resource on this SPI4 or remove this NOR flash to other SPI resouce?If connect two on same SPI or remove the NOR falsh to other SPI resource, what the side effect happen for change setting? 

Best Regards

      Tina

  • Hi Simonr

                    Thanks for your reply, now I use upper ticket you provide, connect new sensor, for this how can I know the defult setting for SPI mode or SPI_MODE_CPOL and SPI_MODE_CPHA value? how can I  config for SPI mode as 3?

    can I set as below? 

    #define SPIOP   SPI_WORD_SET(8) | SPI_TRANSFER_MSB | SPI_MODE_CPOL | SPI_MODE_CPHA
    Best Regards
          Tina
  • Hi Tina

    You should be able to use any similar SPI driver as a template for your new one and look at how SPIOP is set up in other SPI sensors. I'm not intimately familiar with this specific device, but this define looks okay. Some trial and error must be expected when creating a new sensor for a project from scratch though. Please give it a shot and let me know if you run into any specific issues.

    Best regards,

    Simon

Related