下記で2023年5月に nRF5340 について情報を集めた。 ki06.hatenablog.com
今回 nRF54L15 について再度整理する。
Seeed Studio XIAO nRF54L15 で nRF Connect SDK を使用して各種機能確認を進めているのでメモ。基本的には samples が充実しているのである程度理解や知識が進めば困ることはなさそう。
ただ nRF Connect SDK は Zephyr OS がベースであり、何もしならない状態ではまずの第一歩が少し難しそう。Web上に情報は多いので必要な情報は十分ありそうなのだが、多いがためにどの順序で見ていけばよいか悩むところ。
ということで各種情報をあとから見直すためのメモ。 まずは公式のイントロダクション動画や紹介動画、webセミナー(Webinar)から入るのが良いのではと思えるので、その順序で並べておく。
見る(BLE、nRF Connect for VS Code)
まず最初に、ひとまず開発環境の構築や開発ができるようになるための手順。
nRF54L15 Development Kit - Nordic | Mouser
- https://www.mouser.jp/new/nordic-semiconductor/nordic-nrf54l15-dev-kit
- nRF54L15 開発キットの紹介ページ
- https://www.mouser.jp/new/nordic-semiconductor/nordic-nrf54l15-dev-kit
nRF54L15 DK — Zephyr Project Documentation
XIAO NRF54L15 — Zephyr Project Documentation
Getting Started with Zephyr OS: A Beginner's Guide for Nordic Development with nRF Connect SDK
Nordic's Bluetooth Low Energy solution: The go-to choice for developers
- https://www.youtube.com/watch?v=ey9ANU1dXWs
- Bluetooth Low Energy (BLE) を開発するのであれば見ておく
- BLE の観点から52シリーズ、53シリーズ、54シリーズの紹介及び開発環境の紹介、学習コンテンツの紹介など、開発に着手するにあたって広く紹介されている
- https://www.youtube.com/watch?v=ey9ANU1dXWs
Introducing nRF Connect SDK Bare Metal option
- https://www.youtube.com/watch?v=31znTI-hnCQ
- nRF52 シリーズから nRF54L シリーズへの移植、あるいは RTOS を使用しないシンプルな Bluetooth LE 機能の開発時には見ておく
- https://www.youtube.com/watch?v=31znTI-hnCQ
Future-proofing IoT development with nRF Connect SDK
- https://www.youtube.com/watch?v=_Myyxc94APQ
- 少し古いが nRF Connect SDK で開発するための基本的なベースから手順まで幅広くカバーしており、最初にかなりよさそう
- https://www.youtube.com/watch?v=_Myyxc94APQ
Introducing nRF Connect for VS Code
- https://www.youtube.com/watch?v=ufjv2NaLfN8
- 少し古いので現状ではこの手順に従うというよりは見るのであれば参考としてみる方がよさそう
- https://www.youtube.com/watch?v=ufjv2NaLfN8
nRF Connect for VS Code tutorials
- https://www.youtube.com/playlist?list=PLx_tBuQ_KSqEt7NK-H7Lu78lT2OijwIMl
- 現時点で以下の6本が提供されている
- nRF Connect SDK を使用する場合は実際には VS Code (Visual Studio Code)を開発環境として使用して開発を進めていくが、それを具体的な手順ベースで紹介しており、まず最初に見た目でどの箇所をどのように操作しておけばよいかよいかわからないような状況において、役に立つ。
- nRF Connect for VS Code, part 1: Installation
- nRF Connect for VS Code, part 2: Creating an application
- nRF Connect for VS Code, part 3: Building an application
- nRF Connect for VS Code, part 4: Flashing an application
- nRF Connect for VS Code, part 5: Debugging Nordic Semiconductor
- nRF Connect for VS Code, part 6: Changing SDK- and toolchain versions
- https://www.youtube.com/playlist?list=PLx_tBuQ_KSqEt7NK-H7Lu78lT2OijwIMl
Adding Custom Board Support in nRF Connect SDK
- https://www.youtube.com/watch?v=V_dVKgWKILM&pp=0gcJCRUKAYcqIYzv
- ★後で見る★
- 開発を進めるとサンプルや基本操作のみではなく、自身のやりたいことを作りこんでいく(カスタムしていく)必要が出てくる。その場合の指針を示している。
- ただし nRF Connect SDK versions v2.6.2 までの古い手順であることに注意。ただし考え方は参考になる。
- https://www.youtube.com/watch?v=V_dVKgWKILM&pp=0gcJCRUKAYcqIYzv
Structuring nRF Connect SDK Projects for Flexibility and Scale
- https://www.youtube.com/watch?v=Z-6vdkQkdFI
- ★後で見る★
- コードの整理や依存性の管理など
- 開発を進めていく上で必要となる内容(応用)
- https://www.youtube.com/watch?v=Z-6vdkQkdFI
nRF54L Series Express - Nordic Developer Academy
- https://academy.nordicsemi.com/courses/nrf54l-series-express-course
- EasyDMA RAM access や Bare Metal オプションなど、概説
- nRF54L15 を使用する場合には最初に参照
- Lesson 1 – Architecture overview
- Lesson 2 – Power domains, event system, and GPIO
- Lesson 3 – Peripherals and system components
- Lesson 4 – Security features
- Lesson 5 – Development choices and demo
- https://academy.nordicsemi.com/courses/nrf54l-series-express-course
読む(学ぶ)
なんとなくわかったところで、実際に手を動かしてある程度手が動くようになるまでの手順や学習。
nRF Connect SDK Fundamentals
- https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/
- 最初に役に立つ
- 以下の章立て。すべて役に立つ。(必要)
- Lesson 1 – nRF Connect SDK Introduction
- Lesson 2 – Reading buttons and controlling LEDs
- Lesson 3 – Elements of an nRF Connect SDK application
- Lesson 4 – Printing messages to console and logging
- Lesson 5 – Serial communication (UART)
- Lesson 6 – Serial communication (I2C)
- Lesson 7 – Multithreaded applications
- Lesson 8 – Thread synchronization
- https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/
Bluetooth Low Energy Fundamentals
- https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/
- nRF Connect SDK で BLE (Bluetooth Low Energy) 機能を使用するために役に立つ
- Bluetooth LE 関係の API の使用方法ががわかる
- nRF Connect SDK に加えて BLE の基本的な技術や機能の紹介も兼ねており BLE 関係の開発を行うのであれば参考になる
- 以下の章立て。すべて役に立つ。(必要)
- Lesson 1 – Bluetooth LE Introduction
- Lesson 2 – Bluetooth LE Advertising
- Lesson 3 – Bluetooth LE Connections
- Lesson 4 – Data exchange in Bluetooth LE
- Lesson 5 – Security in Bluetooth LE communication
- Lesson 6 – Bluetooth LE sniffer
- https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/
見る(Hands-on)
なんとなくわかったところで、実際の開発環境を見ながら(見せながら)各機能や使い方の紹介がされており、把握できる。
- nRF Connect SDK Hands-on
- https://www.youtube.com/playlist?list=PLx_tBuQ_KSqG-leiJDfOKf_ZmCqHnbi4r
- ★後で見る★
- nRF Connect SDK ではサンプルが充実しているのでサンプルを読み解いての理解や把握、学習も可能であるが、この Hands-on では(ある意味)各サンプルがどのように作成されているかをサンプルを例に説明ではなく説明しつつ結果的にサンプルと同等の機能を構築していくので、開発の過程を知る/把握するという意味で役に立つ
- nRF Connect SDK hands-on, part 1: Rapid prototyping with nRF Connect SDK
- Bluetooth LE が nRF Connect SDK によってどのようにサポートされているかの説明
- クイックスタート
- まずはデモを通して実際に Bluetooth LE が動作してスマートフォンと連動していることの紹介
- ただし手順は実際に開発するときとは少し異なる(例を動作させるための Walk Through 的な意味合いが強い)ので見るのみでOKと思う
- nRF Connect SDK hands-on, part 2: Sensors in nRF Connect SDK
- ファイル構成と概観
- Devicetree, Kconfig, CMake, overlay, src ファイル などの設定の存在とその役割の説明
- Kconfig で設定を追加し、追加した設定について prj.conf にて値を指定あるいは y / n で選択(あるいはドライバで既に設定済みの Kconfig の設定値に対する設定)
- センサの使用例を通して、ソフトウェアとハードウェアの設定が分離しており高い移植性を有していることを説明(及びスケーラビリティ)
- 実際のセンサの使用例
- センサ用の API が用意されているので上位のアプリケーションは移植性が高い
- 最初に実際のセンサではなく"模擬" (Simulated sensor driver) で作成、Cファイルの作成と CMake への追加方法、各種 API を使用するためのヘッダファイルの追加方法など、実際に開発を行う手順を順次紹介している(参考になる)
- 参考: Simulated sensor driver: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/drivers/sensor_sim.html
- 開発ボード上での I2C センサの接続箇所や overlay での設定の仕方
- ファイル構成と概観
nRF Connect SDK hands-on, part 3: Send and receive data through Bluetooth LE
- Bluetooth LE を使用して何ができるかの例の紹介も兼ねて、 nRF Connect SDK において Bluetooth LE を使うにはどのような手順や設定、ソースコードになるかを説明
- Bluetooth LE を使用する手順を順を追って説明
- nRF Connect SDK において Bluetooth LE の GATT により read / write の例
- カスタム GATT の追加(DevAcademy の Bluetooth Low Energy Fundamentals 参考)
- nRF Kconfig GUI の紹介
- prj.conf を直接変更してもよいが階層的に把握ができる
nRF Connect SDK hands-on, part 4: Storing data on non-volatile memory
- 不揮発性メモリへのデータの記録方法
- SoC 内部の場合とSPI経由の外部の場合との、両方のデバイスの両方をカバー
- Zephyr OS が提供する Non-Volatile Storage (NVS) を nRF Connect SDK でどのように使用するか
- DK (Development kit) では External SPI Flash Memory が搭載されている(前提)
- 参考: Non-Volatile Storage (NVS): https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/services/storage/nvs/nvs.html
さらに Zephyr OS の Message Queues 及び処理用の別スレッドを用意するので Zephyr OS の Threads の使い方の説明にもなっている
Devicetree 上での "Partition" の設定の仕方や GUI 上での見え方などの説明
- overlay での設定の仕方と c ソースファイル上の名称の関連
- 記憶を Soc の内部と Soc の外部を切り替えるのに、どの設定ファイルがどのように変わるか(ハードウェアとソフトウェアの設定がどのように切り分けられているか)の把握
nRF Connect SDK hands-on, part 5: Power Optimization and the PPK2
- nRF Connect SDK hands-on, part 6: Adding FOTA over Bluetooth LE
- nRF Connect SDK hands-on, part 1: Rapid prototyping with nRF Connect SDK
読む(中級)
- nRF Connect SDK Intermediate
- https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/
- 最初に必要とはならないが、例えばカスタムボードの定義やデバイスドライバの作成をする場合には下記を参照。
- 以下の章立て。必要な個所を参照すればよいと考える。
- Lesson 1 – Zephyr RTOS: Beyond the basics
- Lesson 2 – Debugging and troubleshooting
- Lesson 3 – Adding custom board support
- Lesson 4 – Pulse Width Modulation (PWM)
- Lesson 5 – Serial Peripheral Interface (SPI)
- Lesson 6 – Analog-to-digital converter (ADC)
- Lesson 7 – Device driver development
- Lesson 8 – Sysbuild
- Lesson 9 – Bootloaders and DFU/FOTA
- https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/
見る(Zephyr OS)
その次に、Zephyr RTOS を知って自在にコーディングや機能のつくり込みができるようになるための手順。
- Zephyr 101 - Getting Work Done with Threads, Work Queues and Timers
- Zephyr 101 - Thread Control
- Zephyr 101 - Using the Device Tree
- Zephyr 101 - Multi-Event Polling and Thread Control
読む
- Writing device drivers for UART peripherals
- Devicetree — Zephyr Project Documentation
- https://docs.zephyrproject.org/latest/build/dts/index.html
- Zephyr OS の Devicetree について。最終的には全部重要だった。がまずは最低限以下を把握しておけば大丈夫そう。(残りは流し読み & 必要になれば戻ってきて詳細を読み込む)
- Devicetree access from C/C++ — Zephyr Project Documentation
- https://docs.zephyrproject.org/latest/build/dts/api-usage.html
- 結局プログラムから使用するにはどうすればよいか、という観点側からのアプローチ。具体的で理解しやすいと思う。
- https://docs.zephyrproject.org/latest/build/dts/api-usage.html
- Devicetree HOWTOs — Zephyr Project Documentation
- https://docs.zephyrproject.org/latest/build/dts/howtos.html
- こういったときはどうすれば?という方面からのアプローチ。意外とやりたいことはこの中に収まる(のでは)。
- https://docs.zephyrproject.org/latest/build/dts/howtos.html
- https://docs.zephyrproject.org/latest/build/dts/index.html
- Kernel Services — Zephyr Project Documentation
- https://docs.zephyrproject.org/latest/kernel/services/index.html
- OS が提供する基本的な機能やAPI、説明はすべてここからたどれる。
- 自分がしたいことはどの機能を使用すると適切なのかを把握するために、どのような機能が提供されているのかを一通り目を通しておくのが良い。
- https://docs.zephyrproject.org/latest/kernel/services/index.html
- OS Services — Zephyr Project Documentation
- https://docs.zephyrproject.org/latest/services/index.html
- OS の基本機能(RTOSの基本提供機能)ではなく、それを使用して使う側に提供しているサービス
- 自分がやりたいことと関係がなければ詳細を見ることはないが、Logging はさすがに把握しておく必要がありそう。
- https://docs.zephyrproject.org/latest/services/index.html
その他(Bare Metal オプション)
- Nordic Semiconductor launches nRF Connect SDK Bare Metal option for nRF54L Series - nordicsemi.com
- Bare Metal option for nRF54L Series - nRF Connect SDK - nordicsemi.com
- A technical dive into the nRF Connect SDK Bare Metal option - Blogs - Nordic Blog - Nordic DevZone
下記は参考。nRF5 SDK から nRF Connect SDK への移行を促す記事について Bare Metal オプション が移行先として追記されている。
Update 28/08/2025: For nRF5 SDK users there is now nRF Connect SDK Bare Metal option for nRF54L Series, bringing architecture and API compatibility to ease the migration of codebase from nRF52 Series to nRF54L Series. More information:
その他
優先度は低いけれども情報を探しておいたのでメモ。
- nRF Connect SDK - latest / Installation / Installing the nRF Connect SDK
- nRF Connect for VS Code / How to install the extension
- nRF Connect SDK 環境構築方法(V3.0.0編) | 加賀デバイス株式会社
- https://www.kgdev.co.jp/column/nordic-column0048
- 一通りの手順が日本語で記述されているので一番読みやすいかもしれない。(ただしこの情報が最新ではなくなる可能性が時間の経過とともに高まってくるので現時点ではよいけれども、将来的にも良いかどうかはわからない)
- 開発環境も変化しインストールの仕方も変わっていくと考えられるので、先に挙げた公式サイトの内容に従うのが一番良い
- https://www.kgdev.co.jp/column/nordic-column0048
- nRF Connectの開発環境をVSCodeで構築してみた
- Introduction to the Zephyr RTOS
- https://www.youtube.com/watch?v=jR5E5Kz9A-k
- 見たけれども(私の今回の場合では)あまり必要なかった
- https://www.youtube.com/watch?v=jR5E5Kz9A-k
- Zephyr Devicetree Mysteries, Solved - Marti Bolivar, Nordic Semiconductor
- https://www.youtube.com/watch?v=w8GgP3h0M8M
- 参考としてみる分には面白い(がちょっと難しく、現時点では内容に追いつけない)
- https://www.youtube.com/watch?v=w8GgP3h0M8M
- Zephyr 101 - Learn the basics to get your first build
- https://www.youtube.com/watch?v=02WjkF_v_30
- 見たけれども(私の今回の場合では)あまり必要なかった
- https://www.youtube.com/watch?v=02WjkF_v_30
- Zephyr入門(概要 & (スケジューラ:概要編))
- https://qiita.com/ueba/items/c5fe99bedd8862854ebd
- OS自体を深く知る分には有用。今回は(私の場合では)使う分には参考程度でよさそうと判断。
- https://qiita.com/ueba/items/c5fe99bedd8862854ebd
- Making a device driver for nrf52833 using Device Tree for SPI supported device that is not available in zephyr/drivers/sensors
- https://devzone.nordicsemi.com/f/nordic-q-a/89759/making-a-device-driver-for-nrf52833-using-device-tree-for-spi-supported-device-that-is-not-available-in-zephyr-drivers-sensors
- SPIを使用したセンサの drivers のレイヤのつくり方や参考、例についての問い合わせ。以下が参考になるとの回答が得られている。
- Zephyr 101 - Introduction to Drivers
- Zephyr 101 - Rolling Your Own Drivers
- https://devzone.nordicsemi.com/f/nordic-q-a/89759/making-a-device-driver-for-nrf52833-using-device-tree-for-spi-supported-device-that-is-not-available-in-zephyr-drivers-sensors
- nRF connect SDK によるシリアル通信(UART)設定方法 #uart - Qiita
- https://qiita.com/Kosuke_Matsui/items/b0eefe66fb627df8c72b
- UART通信の例
- デバイスツリーの設定方法や使い方などが参考になる
- https://qiita.com/Kosuke_Matsui/items/b0eefe66fb627df8c72b