SDK DK devicetree file

Hi,

I am taking the nRF Connect SDK Fundamentals course using the nRF7002DK board

Blinky file loaded  modified and it is working.

But I can find no way to see the binding for led1 with GPIO P1.06 (LED1 in nRF7002DK)

This is the line in blinky

#define LED1_NODE DT_ALIAS(led1)

I looked in the following DTS files:

nrf7002dk_nrf5340_cpuapp.dts

nordic/nrf5340_cpuapp_qkaa.dtsi

The nrf5340_cpuapp_common.dts

nrf7002dk_nrf5340_cpuapp-pinctrl.dtsi

But no luck to spot the binding with GPIO P1.06 where the LED1 is attached.

Where on earth is that?

Finding this I can move faster since I have stacked in moving  in the SDK Fundamentals

Thank you

Project name "NordiCube"

id :14785987758

Parents
  • Hi Vasilis

    If you click on Devicetree under ACTIONS it should take you to a graphical device tree overview of the current board:

     

    If you right click the node in the graphical view and press Show in Text Editor it should take you to the definition in the nrf5340_cpuapp_common.dts file, in the nrf7002dk_nrf5340 board folder. 

    One important thing to note is that led0 in the board file corresponds to LED 1 on the DK, and led1 in the board file corresponds to LED 2 on the DK. I can understand if this is leading to some confusion...

    Best regards
    Torbjørn

  • Thank you Torbjørn for the fast answer.

    This clears the fog. I understand it now. It also clears the LED index difference with the nRF7002 DK.

    SDK looks that ld0 (LED1) has it for different purposes (PWM I suppose) that is why looks it is not working as simple ON/OFF

    The problem is that I have the nRF7002 DK and the "SDK Fundamentals" is referring to nRF52833 . So I must be careful to cross look on the manual but I think I can manage.

    One last thing is that for reasons I do not know I created a Devicetree overlay file instead of plain Devicetree. how can I 

    get rid of it and return to normal?

    I Have a screenshot image but looks I can not upload it.
    so a URL instead
    https://drive.google.com/file/d/1ElPf0fdMOMJSxl1BuzV8ZjEvndpk7uKm/view?usp=sharing
    Please consider the question about Devicetree overlay as answered 
    in Lesson 3 "SDK fundamentals" watching today.

    We can close this ticket now. Job done!

    Best regards
    Vasilis
  • Hi Vasilis

    You should not make changes to the board files directly. These are a part of the SDK, and should remain unchanged. 

    If you still need to change something you essentially have two options: 

    1) Make your own board definition based on the DK board files, and change them as you want. This is the recommended option if you are planning to make your own hardware (PCB) at some point. 

    2) Use an overlay to modify the board definition without altering the board files themselves. This is the recommended option if you are just testing things out, and when you are learning how things work. 

    In other words, if you do want to make changes it is to be expected that you have created an overlay. 

    Best regards
    Torbjørn

  • Hi Torbjørn,

    Everything is clear now. Thank you for your explanations.
    Can we consider this case as answered or closed ? How can I do that?

    Best regards

    Vasilis

  • Hi Vasilis

    Good to hear that things are clearer Slight smile

    It is possible to mark one of the replies in the thread as a correct response by clicking on the More button and selecting Verified Answer. Then this reply will be marked as the official answer to your question, and the thread will be closed. 

    Best regards
    Torbjørn

Reply Children
  • Done Verified Answer Torbjorn

    we will be seen a lot in the upcoming years...

    Nordic is a company we invest on. We like the spirit and the enthusiasm.  We like to be part of it.

    We enjoy learning and creating with the nRF connect SDK .

    Enjoying the grate support as well and thank you for it.

    Best regards

    Vasilis

  • You welcome Vasilis, glad I could help out Slight smile

    The learning curve when starting out with the new SDK is quite steep, but we are working hard to make it easier to get into (the DevAcademy being an example of this). 

    Financially we are in a bit of a slump at the moment, but I believe strongly in our future, and expect many exciting products to be launched in the coming years Wink

    Please do keep in touch!

    Regards
    Torbjørn

Related