How to start with the nrf5340

Hi all,

I am very new to the nRF controller. Previously, I have worked with STM32 controllers.

Currently, I am working on a project with the nRF5340. I am having difficulty understanding the nRF Connect SDK. What is this device tree used for configuring peripherals? I can run the example code, but I'm unsure how to configure other peripherals in the device tree and use them.

Could you please provide any advice on this?

Thank you!

Parents
  • Read the zeyphr documentation about DT. Then make an overlay file for your (example/testing) project - this way you can change stuff without messing up original code.

    The finished device tree can be observed in the projects build/zephyr directory.

    If you are curious - or see unusual DTS macro usage in some code - you can find the finished compiler macros in
    build/zephyr/include/generated subdir. There will be a ton of them on every nRF project.

    What is it used for? It connects device drivers to the busses. This way you can specify which bus a device is connected to (NRF MCUs can have multiple SPI/TWI/UART busses) without touching anything in the driver source code itself.

Reply
  • Read the zeyphr documentation about DT. Then make an overlay file for your (example/testing) project - this way you can change stuff without messing up original code.

    The finished device tree can be observed in the projects build/zephyr directory.

    If you are curious - or see unusual DTS macro usage in some code - you can find the finished compiler macros in
    build/zephyr/include/generated subdir. There will be a ton of them on every nRF project.

    What is it used for? It connects device drivers to the busses. This way you can specify which bus a device is connected to (NRF MCUs can have multiple SPI/TWI/UART busses) without touching anything in the driver source code itself.

Children
Related