Skip to content

variants: add support for arduino_mkrzero #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 22, 2022
Merged

variants: add support for arduino_mkrzero #36

merged 1 commit into from
Sep 22, 2022

Conversation

DhruvaG2000
Copy link
Collaborator

Adds support for the arduino mkr zero board. Tested with LED_Blink sample.
I am not sure about the inbuilt LED pin number though, hence this pinmap just uses D7 for
demo purposes

Signed-off-by: Dhruva Gole goledhruva@gmail.com

@DhruvaG2000
Copy link
Collaborator Author

@szczys can you help with inbuilt LED please?
I tried d22_gpios = < &portb 8 GPIO_ACTIVE_LOW>; but did not work

@DhruvaG2000
Copy link
Collaborator Author

However when I add <4 0 &portb 8 0>, in the connector then the D4 pin works as internal LED... I am a little confused regarding what is hapenning.
Same when I add

			   <22 0 &portb  8 0>;	/* BUILTIN LED */

It doesn't work when I do

led0 = <&arduino_mkr_header 22 0>;

in my overlay

Am I missing something here?

@szczys
Copy link
Collaborator

szczys commented Aug 23, 2022

@DhruvaG2000

I tried d22_gpios = < &portb 8 GPIO_ACTIVE_LOW>; but did not work

I am also confused. I looked at the schematic, the port and pin look correct but the flag should be GPIO_ACTIVE_HIGH.

image

However, when you look at the DTS file in Zephyr it's a very different story. They're using pin 17 for the LED:

https://github.com/zephyrproject-rtos/zephyr/blob/e7591615724894a2319ea2c09d7eb21b4263fbf0/boards/arm/arduino_zero/arduino_zero.dts#L32-L35

Maybe give that a try and see if it works? I suspect Arduino and Zephyr handle the pin mux differently which results in different naming scheme for the pins, but I'm only guessing.

@DhruvaG2000
Copy link
Collaborator Author

DhruvaG2000 commented Aug 24, 2022 via email

@DhruvaG2000 DhruvaG2000 added the new variant Adding a new variant label Sep 4, 2022
@DhruvaG2000 DhruvaG2000 force-pushed the add-mkrzero branch 4 times, most recently from 89de89c to 7fec7bc Compare September 17, 2022 15:41
@DhruvaG2000 DhruvaG2000 changed the base branch from dev to main September 17, 2022 15:41
@DhruvaG2000 DhruvaG2000 force-pushed the add-mkrzero branch 3 times, most recently from a168e1d to 930c6bd Compare September 18, 2022 05:20
Add support for the arduino mkr zero board.
- Add the LED builtin in arduino mkrzero
- Add sercom as i2c because that's how it is described in
arduino_mkrzero.dts:

pinctrl-0 = <&sercom0_i2c_default>;

Signed-off-by: Dhruva Gole <goledhruva@gmail.com>
Copy link
Collaborator

@szczys szczys left a comment

Choose a reason for hiding this comment

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

LGTM!

I don't have a board to test this on, but I was able to build samples.

@DhruvaG2000 DhruvaG2000 merged commit 696cd5a into main Sep 22, 2022
@DhruvaG2000 DhruvaG2000 deleted the add-mkrzero branch November 19, 2022 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new variant Adding a new variant
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants