nRF5340DK Devicetree File

Dear, I am new to Nordic. I trying to understand the various Defines for nRF5340DK kit using Devicetree.dts file. In that, I had look on SW0 defines.

1. The gpio0 reg is defined at addres at 0x842500, but what is 0x300 ? 

2. Similarly, where led0 etc and buton0 etc are defined. gpios = < &gpio0 0x1c 0x1 >; is written. What is 0xic and 0x1 in this ?,

    For button0, gpios = < &gpio0 0x17 0x11 >; what is 0x17 and 0x11 ? 

  • Dear, Few  more queries: 1. when any pin is used as GPIO Output ... what is sense of GPIO_ACTIVE_LOW etc in that case ? Similarly, when used as Digital Input ? Also, when any Pin is used an Analog I/P is it required to declare this flag ? Also, when any Pin is used dedicated to any peripheral say(UART, I2C), should this flag be declared ?  

    2. In hardware, is any register like Pin_CNF(n), affected by this flag or any other ? 

    3. Practically, in present project, I need to use two UARTs with (9600, 8,N,1) configuration. May I use P0.20 & P0.22 for one UART and P1.00 & P1.01 for second UART ? 

    4. I need one I2C also.. I think to use P1.02 & P1.03 

    5. I need to use NFC interface  also in the project so use of P0.02 & p0.03

    6.  I need four analog channels .

    7. I need 6 Digitla Output pins to interface 16x2 alhanumeric LCD

    please, help to write initialization code for each pin ?? I am just new to Nordic and Zypher.. though, I working on Microchip, Atmel etc since 15 years.

  • Hey again Gulzar,

    When it comes to your first point, I am bit uncertain but I think it is mainly used when the GPIO is set as an input. For more info on how you should set up a GPIO I would recommend that you take a look at the blinky example.

    Don't worry, you can get help with all of this. But would you mind creating a new case for it? This is beginning to get off topic of dts.

    Best regards,

    Elfving

Related