This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

NCS1.8 how to change the SPI1 pins?

Hello,

NCS1.8.0   Windows10 X64;

spi_loopback test,default code default pins;it is ok.

when i change the SPI_1 pins ,

Failed to achieve the effect, still used the original pins.

  

thanks

Best Regards

yuyou

  • Hi,Simon

    thanks for reply.

    i created file nrf52840dk_nrf52840.overlay as follow:

    i connect  P1.13 to P1.14,

    reload project and rebuild, it still runing whit old pin.

    it means nrf52840dk_nrf52840.overlay not used.

    but,when i delete folder build_nrf52840dk_nrf52840

    and recreated,the pin had changed.

    I don't know why, it's too much trouble.

       

    thanks

    Best Regards

  • Hellow,

    thanks Simon.

    this is the answer.

    created file nrf52840dk_nrf52840.overlay as follow pic:

    SES

    reload project and rebuild, it still runing whit old pin.

    it means nrf52840dk_nrf52840.overlay not used.

    but,when i delete folder build_nrf52840dk_nrf52840

    and recreated,the pin had changed.

    VS CODE

    build it will changed.not need delete folder and recreate.

    thanks

    Best Regards

  • Building an NCS/Zephyr project happens in two phases:

    • Configuration phase
      • This is driven by CMake and will go through all the Kconfigs, prj.conf, .dts and .overlay files and generate the ninja files
      • If you change the prj.conf or .overlay file, you need to run this
    • Build phase
      • This is driven by ninja and will only see the changes done to the .c/.h files
      • If you change fore example main.c it is enough to run this

    When you rebuild the project in SES, it will only run the Build phase, check out the ticket SEGGER Embedded Studio Nordic Edition for NCS doesn't update .config for modified prj.conf to see how to run configuration phase+build phase.

    However, you did say that you reloaded the project, so it's strange that it didn't work then

  • thanks,Simon

    i've got it,

    It's a little difficult from SDK to NCS.

Related