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 Tina

    Yes, it's possible to switch the SPI instance the MX25 uses if you'd like. But is there a specific reason you want the SPI4 instance for the BMP280 sensor? The app core has 5 SPI instances available (SPI0-SPI4) and either of these can be used for the BMP280. If you run both on the same instance, they won't be able to operate at the speed you'd like, so I'd strongly recommend moving either the MX25 or the BMP280 to its own SPI instance.

    Best regards,

    Simon

  • Hi Simonr

                  Thanks for your reply, I need high speed spi4 for my sensor,I try to move Mx25 to spi3, isn't need any precaution?

     Best Reagrds

         Tina

  • Hi

    Note that there are some specific pins dedicated for high-speed SPI4 (P0.08-P0.12). By default, these are connected to the Flash memory on the nRF7002DK, so you will need to short SB11-SB14 to have these pins available for your sensor when using the DK. Note that this will leave the MX25 disconnected though so it won't be usable unless you get inventive with soldering it onto some other pins on the DK.

    Best regards,

    Simon

  • Hi Simon

                   Ishort SB11-SB14 and I use https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-5-serial-peripheral-interface-spi/topic/exercise-1-10/ sample code :Interfacing with a sensor over SPI, for connect ST:LIS2HH12 sensor, after I write register and print the registers in main, the result is as below, isn't normal?

    [00:00:00.300,811] <inf> Lesson5_Exercise1: bmp_print_registers: Reading all BME280 registers (one by one)
    [00:00:00.300,872] <inf> Lesson5_Exercise1: Reg[0x0f] = 0xff
    [00:00:00.321,044] <inf> Lesson5_Exercise1: Reg[0x1e] = 0xff
    [00:00:00.341,186] <inf> Lesson5_Exercise1: Reg[0x1f] = 0xff
    [00:00:00.361,328] <inf> Lesson5_Exercise1: Reg[0x20] = 0xff
    [00:00:00.381,469] <inf> Lesson5_Exercise1: Reg[0x21] = 0xff
    [00:00:00.401,611] <inf> Lesson5_Exercise1: Reg[0x22] = 0xff
    [00:00:00.421,752] <inf> Lesson5_Exercise1: Reg[0x23] = 0xff
    [00:00:00.441,894] <inf> Lesson5_Exercise1: Reg[0x24] = 0xff
    [00:00:00.462,036] <inf> Lesson5_Exercise1: Reg[0x25] = 0xff
    [00:00:00.482,177] <inf> Lesson5_Exercise1: Reg[0x26] = 0xff
    [00:00:00.502,349] <inf> Lesson5_Exercise1: Reg[0x27] = 0xff
    [00:00:00.522,491] <inf> Lesson5_Exercise1: Reg[0x28] = 0xff
    [00:00:00.542,633] <inf> Lesson5_Exercise1: Reg[0x26] = 0xff
    [00:00:00.562,774] <inf> Lesson5_Exercise1: Reg[0x27] = 0xff
    [00:00:00.582,916] <inf> Lesson5_Exercise1: Reg[0x28] = 0xff
    [00:00:00.603,057] <inf> Lesson5_Exercise1: Reg[0x29] = 0xff
    [00:00:00.623,199] <inf> Lesson5_Exercise1: Reg[0x2a] = 0xff
    [00:00:00.643,341] <inf> Lesson5_Exercise1: Reg[0x2b] = 0x00
    [00:00:00.663,482] <inf> Lesson5_Exercise1: Reg[0x2c] = 0x00
    [00:00:00.683,624] <inf> Lesson5_Exercise1: Reg[0x2d] = 0x00
    [00:00:00.703,796] <inf> Lesson5_Exercise1: Reg[0x2e] = 0x00

    Best Regards

         Tina

  • Hi

    It seems like the registers you're reading are empty, so if nothing is written to these registers, what you're seeing is perfectly normal. What are you writing to the sensor exactly?

    Best regards,

    Simon

Related