nrf52840 with NOR memory

https://github.com/zephyrproject-rtos/zephyr/blob/main/samples/drivers/spi_flash/src/main.c#L36

may I know where I can find the pin connections used in this example 

"const struct device *flash_dev = DEVICE_DT_GET_ONE(SPI_FLASH_COMPAT);" 

#if DT_HAS_COMPAT_STATUS_OKAY(jedec_spi_nor)
#define SPI_FLASH_COMPAT jedec_spi_nor

I checked jedec yaml file but no pins is defined there as well 

Parents
  • Hi,

    The pin connections are typically defined in the board's device tree file (.dts) . It is where you would specify the hardware specifics like pin connections. You would need to check the device tree file for your specific board to see how the pins are defined for your SPI device.

    -Priyanka

  • For this specific sample, spi-flash , i am using nrf52840 , may i ask where i can find the .dts file? I only find the .dtsi file.  And within this nrf52840.dtsi, also no specific pin is given or set. 

    spi2: spi@40023000 {
    /*
    * This spi node can be SPI, SPIM, or SPIS,
    * for the user to pick:
    * compatible = "nordic,nrf-spi" or
    * "nordic,nrf-spim" or
    * "nordic,nrf-spis".
    */
    compatible = "nordic,nrf-spim";
    #address-cells = <1>;
    #size-cells = <0>;
    reg = <0x40023000 0x1000>;
    interrupts = <35 NRF_DEFAULT_IRQ_PRIORITY>;
    max-frequency = <DT_FREQ_M(8)>;
    easydma-maxcnt-bits = <16>;
    status = "disabled";
    };

Reply
  • For this specific sample, spi-flash , i am using nrf52840 , may i ask where i can find the .dts file? I only find the .dtsi file.  And within this nrf52840.dtsi, also no specific pin is given or set. 

    spi2: spi@40023000 {
    /*
    * This spi node can be SPI, SPIM, or SPIS,
    * for the user to pick:
    * compatible = "nordic,nrf-spi" or
    * "nordic,nrf-spim" or
    * "nordic,nrf-spis".
    */
    compatible = "nordic,nrf-spim";
    #address-cells = <1>;
    #size-cells = <0>;
    reg = <0x40023000 0x1000>;
    interrupts = <35 NRF_DEFAULT_IRQ_PRIORITY>;
    max-frequency = <DT_FREQ_M(8)>;
    easydma-maxcnt-bits = <16>;
    status = "disabled";
    };

Children
No Data
Related