This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to read zephyr.dts file?

Hi Everyone

I am trying to get a hold of the nrf9160 SDK which is based on zephyr. 
Here is what i would like to know

1. There is a file named zephyr.dts which has all the hardware related configuration. 
But , in some of the peripherals defined inside that , the pin numbers aren't mentioned. 
My question is 

If i have a custom board , How can i change those pins (for example i2c)?

2. Instead of using zephyr library , can i use nordic libraries to define i2c peripherals and all other peripherals along with speed and pin configurations?

Thanks 
Rajat 

Parents
  • Hi!

    1. To change the pins from the default configuration, you can add an .overlay file in the application you are running. Take a look at this SPI sample, for instance, and more specifically the .overlay file. This is a way to change the pins for SPI.  

    Or take a look at the _common.dts file for the Thingy:91 board here. Here the I2C pins are specified for the board. Now, if you wanted to change this for an application, the way to do it is to add an .overlay to change those pins, like what is done in the SPI sample. 

    2. Yes, you can use the drivers found in ncs/zephyr/include/drivers/ which is a part of our nRF Connect SDK. 

    Best regards,

    Heidi

Reply
  • Hi!

    1. To change the pins from the default configuration, you can add an .overlay file in the application you are running. Take a look at this SPI sample, for instance, and more specifically the .overlay file. This is a way to change the pins for SPI.  

    Or take a look at the _common.dts file for the Thingy:91 board here. Here the I2C pins are specified for the board. Now, if you wanted to change this for an application, the way to do it is to add an .overlay to change those pins, like what is done in the SPI sample. 

    2. Yes, you can use the drivers found in ncs/zephyr/include/drivers/ which is a part of our nRF Connect SDK. 

    Best regards,

    Heidi

Children
No Data
Related