nrf5340 SPI application

Hi ,

      I wanted to create SPI application for custom board as SPI master as nrf5340 . So I was building spi application as per slave pin configurations. So please help me in configuring spi in my application. How to configure spi pins. How to assign its addresses.? Actually in datasheet they have mentioned resister address as 

PSEL.SCK   =    0x508

PSEL.MISO  =    0x50C

PSEL.MOSI  =    0x510

PSEL.CSN   =     0x514

Please let me know how can we assign these spi pin addresses.

  • Hello Vinay,

    The method to interface with peripherals in nRF Connect SDK (NCS) is to use a devicetree.
    You can leard about devicetrees in Lesson 2 of our NCS Fundamentals course.
    If you are just starting out with NCS, I advice you to take the whole course.

    The devicetree needs the pin numbers related to your board or chip. An overview of the pin assignments for the nRF5340 can be found on the Infocenter at nRF5340 Product Specification/Hardware and layout/Pin assignments.
    The pins differ based on which package variant you have (aQFN94(TM) or WLCSP95).

    A devicetree (.dts- and .dtsi-files) configuring SPI for the nRF5340-DK is found withing NCS at  <ncs-installation>/zephyr/boards/arm/nrf5340dk_nrf5340.

    If you need more guidance, please tell me which NCS version you are using.

    Best regards,

    Maria

Related