Skip to content

boards: shields: Add nRF9160 DK overlay for arduino_uno_click shield - #71106

Merged
carlescufi merged 1 commit into
zephyrproject-rtos:mainfrom
common-ground-electronics:cdwilson/arduino-uno-click-nrf9160dk-nrf9160-overlay
Jun 3, 2024
Merged

boards: shields: Add nRF9160 DK overlay for arduino_uno_click shield#71106
carlescufi merged 1 commit into
zephyrproject-rtos:mainfrom
common-ground-electronics:cdwilson/arduino-uno-click-nrf9160dk-nrf9160-overlay

Conversation

@cdwilson

@cdwilson cdwilson commented Apr 4, 2024

Copy link
Copy Markdown
Contributor

The original Arduino Uno provides the same SCL/SDA signals on two sets of pins, but the nRF9160 DK maps these pins to two different pairs of GPIO on the nRF9160 SIP. As a result, when using the Arduino Uno Click Shield board with the nRF9160 DK, the P0.18/P0.19 pair must be used.

image image image

Also, the default pin group for the nRF9160 DK includes RTS/CTS HW flow control, but the Arduino Uno Click Shield board does not connect these pins (only TX/RX are connected on the shield). This keeps RX/TX on the same pins, but just removes RTS/CTS from the pin groups.

image

How I tested this

I don't have any of the in-tree MikroE Click shields to test this with, so I used a MikroE Weather Click board I had on hand.

IMG_3444

I added a new shield definition for the Weather Click in #71076 so by merging that PR together with this one:

west build -p -b nrf9160dk/nrf9160/ns samples/sensor/bme280 -- -DSHIELD="arduino_uno_click mikroe_weather_click"
west flash
*** Booting Zephyr OS build 98f9b57243cc ***
Found device "bme280@76", getting sensor data
temp: 21.130000; press: 99.427671; humidity: 48.135742
temp: 21.130000; press: 99.427671; humidity: 48.135742
temp: 21.120000; press: 99.426781; humidity: 48.124023
...

References

@MaureenHelm

Copy link
Copy Markdown
Member

@erwango @anangl please take a look

@cdwilson
cdwilson force-pushed the cdwilson/arduino-uno-click-nrf9160dk-nrf9160-overlay branch from 170ca05 to 99d93bd Compare May 8, 2024 22:06
@cdwilson

cdwilson commented May 8, 2024

Copy link
Copy Markdown
Contributor Author

I added a new shield definition for the Weather Click in #71076 so by merging that PR together with this one:

FYI, since #71076 was merged, I just rebased this onto main to pull in the Weather Click shield definition. If you have the hardware described above, you should now be able to test out this PR by simply running the following command after checking out this PR (no longer necessary to merge #71076 with this PR to test this out):

west build -p -b nrf9160dk/nrf9160/ns samples/sensor/bme280 -- -DSHIELD="arduino_uno_click mikroe_weather_click"
west flash

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Name used for this file is confusing as we can easily mixup with boards/nordic/nrf9160dk/nrf9160dk_nrf9160_common.dtsi.

I'd suggest to use something like nrf9160dk_nrf9160_arduino_uno_common.dtsi

Comment thread boards/shields/arduino_uno_click/boards/nrf9160dk_nrf9160.overlay Outdated
Comment thread boards/shields/arduino_uno_click/boards/nrf9160dk_nrf9160_common.dtsi Outdated
The original Arduino Uno provides the same SCL/SDA on two sets of pins,
but the nRF9160 DK maps these pins to two different pairs of GPIO. When
using the Arduino Uno Click Shield board with the nRF9160 DK, the
P0.18/P0.19 pair must be used.

Also, the default pin group for the nRF9160 DK includes RTS/CTS HW flow
control, but the Arduino Uno Click Shield board does not connect these
pins (only TX/RX are connected on the shield). This keeps RX/TX on the
same pins, but just removes RTS/CTS from the pin groups.

References:

 - Arduino Uno R3 pinout:
   https://docs.arduino.cc/resources/pinouts/A000066-full-pinout.pdf

 - Arduino Uno R3 schematic:
   https://www.arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf

 - Arduino UNO click shield schematic:
   https://download.mikroe.com/documents/add-on-boards/click-shields/arduino-uno/arduino-uno-click-shield-schematic-v101.pdf

Signed-off-by: Chris Wilson <chris@cgnd.dev>
@cdwilson
cdwilson force-pushed the cdwilson/arduino-uno-click-nrf9160dk-nrf9160-overlay branch from 99d93bd to 4fb9f11 Compare May 30, 2024 20:34
@carlescufi
carlescufi merged commit 365187e into zephyrproject-rtos:main Jun 3, 2024
@cdwilson
cdwilson deleted the cdwilson/arduino-uno-click-nrf9160dk-nrf9160-overlay branch November 1, 2025 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Shields Shields (add-on boards)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants