0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Zephyr RTOS 〜 Arduino UNO Q 向けの overlay 〜

Last updated at Posted at 2026-01-29

1. はじめに

Arduino UNO Q の技適対応版がスイッチサイエンスから入荷通知来たのでさっそくポチりました。

夕方を過ぎての購入手続きだったため、翌日出荷になるため週末に届くかどうか、でしょうか。

それまでに主要な設定を overlay に書き起こして置こうと思い、せっかくなので記事化しました。

2. Arduino UNO Q 向けの overlay

uart / i2c / spi / pwm の設定と候補の pin を抽出しました。
status = "okay"; にして、下記コマンドで zephyr.dts が生成されるところまでは確認しています。

Arduino UNO Q のビルド
west build -p -b arduino_uno_q .

前回記事を踏襲していますので、使い方や内容の解説については下記記事を参考にしてください。

arduino_uno_q.overlay
/*
 * Copyright (c) 2026 Takayuki Goto <tkg.develop@gmail.com>
 *
 * SPDX-License-Identifier: Apache-2.0
 */

/ {
    chosen {
        zephyr,console = &usart1;
        zephyr,shell-uart = &usart1;
    };
};

&lpuart1 {
    status = "disabled";
    current-speed = <115200>;

    // lpuart1_tx_pa2, lpuart1_tx_pb11, lpuart1_tx_pc1, lpuart1_tx_pg7
    // lpuart1_rx_pa3, lpuart1_rx_pb10, lpuart1_rx_pc0, lpuart1_rx_pg8
    pinctrl-0 = <&lpuart1_tx_pa2 &lpuart1_rx_pa3>;
    pinctrl-names = "default";
};

&usart1 {
    status = "okay";
    current-speed = <115200>;

    // usart1_tx_pa9, usart1_tx_pb6, usart1_tx_pg9
    // usart1_rx_pa10, usart1_rx_pb7, usart1_rx_pg10
    pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>;
    pinctrl-names = "default";
};

&usart2 {
    status = "disabled";
    current-speed = <115200>;

    // usart2_tx_pa2, usart2_tx_pd5
    // usart2_rx_pa3, usart2_rx_pa15, usart2_rx_pd6
    pinctrl-0 = < &usart2_tx_pa2 &usart2_rx_pa3 >;
    pinctrl-names = "default";
};

&usart3 {
    status = "disabled";
    current-speed = <115200>;

    // usart3_tx_pa7, usart3_tx_pb10, usart3_tx_pc4, usart3_tx_pc10, usart3_tx_pd8
    // usart3_rx_pa5, usart3_rx_pb11, usart3_rx_pc5, usart3_rx_pc11, usart3_rx_pd9
    pinctrl-0 = < &usart3_tx_pb10 &usart3_rx_pb11 >;
    pinctrl-names = "default";
};

&uart4 {
    status = "disabled";
    current-speed = <115200>;

	// uart4_tx_pa0, uart4_tx_pc10
	// uart4_rx_pa1, uart4_rx_pc11
    pinctrl-0 = < &uart4_tx_pc10 &uart4_rx_pc11 >;
    pinctrl-names = "default";
};

&uart5 {
    status = "disabled";
    current-speed = <115200>;

	// uart5_tx_pc12
	// uart5_rx_pd2
    pinctrl-0 = < &uart5_tx_pc12 &uart5_rx_pd2 >;
    pinctrl-names = "default";
};

&i2c1 {
	status = "okay";
	clock-frequency = <I2C_BITRATE_STANDARD>;

	// i2c1_scl_pb6, i2c1_scl_pb8
	// i2c1_sda_pb3, i2c1_sda_pb7, i2c1_sda_pb9
    pinctrl-0 = < &i2c1_scl_pb8 &i2c1_sda_pb9 >;
    pinctrl-names = "default";
};

&i2c2 {
	status = "disabled";
	clock-frequency = <I2C_BITRATE_STANDARD>;

	// i2c2_scl_pb10, i2c2_scl_pb13, i2c2_scl_pf1, i2c2_scl_ph4
	// i2c2_sda_pb11, i2c2_sda_pb14, i2c2_sda_pf0, i2c2_sda_ph5
    pinctrl-0 = < &i2c2_scl_ph4 &i2c2_sda_ph5 >;
    pinctrl-names = "default";
};

&i2c3 {
	status = "disabled";
	clock-frequency = <I2C_BITRATE_STANDARD>;

	// i2c3_scl_pa7, i2c3_scl_pc0, i2c3_scl_pg7, i2c3_scl_ph7
	// i2c3_sda_pb4, i2c3_sda_pc1, i2c3_sda_pg8, i2c3_sda_ph8
    pinctrl-0 = < &i2c3_scl_ph7 &i2c3_sda_ph8 >;
    pinctrl-names = "default";
};

&i2c4 {
	status = "disabled";
	clock-frequency = <I2C_BITRATE_STANDARD>;

	// i2c4_scl_pb6, i2c4_scl_pb10, i2c4_scl_pd12, i2c4_scl_pf14
	// i2c4_sda_pb7, i2c4_sda_pb11, i2c4_sda_pd13, i2c4_sda_pf15
    pinctrl-0 = < &i2c4_scl_pf14 &i2c4_sda_pf15 >;
    pinctrl-names = "default";
};

&spi1 {
    status = "okay";
    clock-frequency = <8000000>;

	// spi1_sck_pa1, spi1_sck_pa5, spi1_sck_pb3, spi1_sck_pe13, spi1_sck_pg2
	// spi1_miso_pa6, spi1_miso_pa11, spi1_miso_pb4, spi1_miso_pe14, spi1_miso_pg3
	// spi1_mosi_pa7, spi1_mosi_pa12, spi1_mosi_pb5, spi1_mosi_pe15, spi1_mosi_pg4
    pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>;
    pinctrl-names = "default";
};

&spi2 {
    status = "disabled";
    clock-frequency = <8000000>;

	// spi2_sck_pa9, spi2_sck_pb10, spi2_sck_pb13, spi2_sck_pd1, spi2_sck_pd3, spi2_sck_pi1
	// spi2_miso_pb14, spi2_miso_pc2, spi2_miso_pd3, spi2_miso_pi2
	// spi2_mosi_pb15, spi2_mosi_pc1, spi2_mosi_pc3, spi2_mosi_pd4, spi2_mosi_pi3
    pinctrl-0 = <&spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>;
    pinctrl-names = "default";
};

&spi3 {
    status = "disabled";
    clock-frequency = <8000000>;

	// spi3_sck_pb3, spi3_sck_pc10, spi3_sck_pg9
	// spi3_miso_pb4, spi3_miso_pc11, spi3_miso_pg10
	// spi3_mosi_pb5, spi3_mosi_pc12, spi3_mosi_pd6
    pinctrl-0 = <&spi3_sck_pb3 &spi3_miso_pb4 &spi3_mosi_pb5>;
    pinctrl-names = "default";
};

&timers1 {
    status = "disabled";
    pwm1: pwm {
        status = "disabled";

        // tim1_ch1n_pa7, tim1_ch1_pa8, tim1_ch1n_pb13, tim1_ch1n_pe8, tim1_ch1_pe9
        // tim1_ch2_pa9, tim1_ch2n_pb0, tim1_ch2n_pb14, tim1_ch2n_pe10, tim1_ch2_pe11
        // tim1_ch3_pa10, tim1_ch3n_pb1, tim1_ch3n_pb15, tim1_ch3n_pe12, tim1_ch3_pe13
        // tim1_ch4_pa11, tim1_ch4n_pc5, tim1_ch4_pe14, tim1_ch4n_pe15
//      pinctrl-0 = <&>;
//      pinctrl-names = "default";
    };
};

&timers2 {
    status = "disabled";
    pwm2: pwm {
        status = "disabled";

        // tim2_ch1_pa0, tim2_ch1_pa5
        // tim2_ch2_pa1, tim2_ch1_pa15, 
        // tim2_ch3_pa2, tim2_ch2_pb3, tim2_ch4_pb11
        // tim2_ch4_pa3
//      pinctrl-0 = <&>;
//      pinctrl-names = "default";
    };
};

&timers3 {
    status = "disabled";
    pwm3: pwm {
        status = "disabled";

        // tim3_ch1_pa6, tim3_ch1_pb4, tim3_ch1_pc6, tim3_ch1_pe3
        // tim3_ch2_pa7, tim3_ch2_pb5, tim3_ch2_pc7, tim3_ch2_pe4
        // tim3_ch3_pb0, tim3_ch3_pc8, tim3_ch3_pe5
        // tim3_ch4_pb1, tim3_ch4_pc9, tim3_ch4_pe6
//      pinctrl-0 = <&>;
//      pinctrl-names = "default";
    };
};

&timers4 {
    status = "disabled";
    pwm4: pwm {
        status = "disabled";

        // tim4_ch1_pb6, tim4_ch1_pd12
        // tim4_ch2_pb7, tim4_ch2_pd13 
        // tim4_ch3_pb8, tim4_ch3_pd14
        // tim4_ch4_pb9, tim4_ch4_pd15
//      pinctrl-0 = <&>;
//      pinctrl-names = "default";
    };
};

&timers5 {
    status = "disabled";
    pwm5: pwm {
        status = "disabled";

        // tim15_ch1n_pa1, tim15_ch1_pa2, tim15_ch1n_pb13, tim15_ch1_pb14, tim15_ch1_pf9, tim15_ch1n_pg9, tim15_ch1_pg10
        // tim15_ch2_pa3, tim15_ch2_pb15, tim15_ch2_pf10
//      pinctrl-0 = <&>;
//      pinctrl-names = "default";
    };
};

&timers6 {
    status = "disabled";
};

&timers7 {
    status = "disabled";
};

&timers8 {
    status = "disabled";
    pwm8: pwm {
        status = "disabled";

        // tim8_ch1n_pa5, tim8_ch1n_pa7, tim8_ch1_pc6, tim8_ch1n_ph13, tim8_ch1_pi5
        // tim8_ch2n_pb0, tim8_ch2n_pb14, tim8_ch2_pc7, tim8_ch2n_ph14, tim8_ch2_pi6
        // tim8_ch3n_pb1, tim8_ch3n_pb15, tim8_ch3_pc8, tim8_ch3n_ph15, tim8_ch3_pi7
        // tim8_ch4n_pb2, tim8_ch4_pc9, tim8_ch4n_pd0, tim8_ch4n_ph12, tim8_ch4_pi2
//      pinctrl-0 = <&>;
//      pinctrl-names = "default";
    };
};

&timers15 {
    status = "disabled";
    pwm15: pwm {
        status = "disabled";

        // tim15_ch1n_pa1, tim15_ch1_pa2, tim15_ch1n_pb13, tim15_ch1_pb14, tim15_ch1_pf9, tim15_ch1n_pg9, tim15_ch1_pg10
        // tim15_ch2_pa3, tim15_ch2_pb15, tim15_ch2_pf10
//      pinctrl-0 = <&>;
//      pinctrl-names = "default";
    };
};

&timers16 {
    status = "disabled";
    pwm16: pwm {
        status = "disabled";

        // tim16_ch1_pa6, tim16_ch1n_pb6, tim16_ch1_pb8, tim16_ch1_pe0
//      pinctrl-0 = <&>;
//      pinctrl-names = "default";
    };
};

&timers17 {
    status = "disabled";
    pwm17: pwm {
        status = "disabled";

        // tim17_ch1_pa7, tim17_ch1n_pb7, tim17_ch1_pb9, tim17_ch1_pe1
//      pinctrl-0 = <&>;
//      pinctrl-names = "default";
    };
};

3. まとめ

今回は本当に手抜き記事ですが、実機が届いたら使い方含めて少しずつ記事化できればと思います。

Arduino UNO Q については何も調べないままポチったので、開発環境なども専用のものがあるのかすらわかっていませんが、
その辺のつまづきポイントや手順の整理などもまとめていけたらと思っています。
(当面は純粋な Zephyr の解説を続ける予定です)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?