Skip to content

Commit 0530093

Browse files
RaytacStanleydanieldegrasse
authored andcommitted
boards: raytac: Add support for raytac_an7002q_db
Add support for Raytac's new AN7002Q-DB. Signed-off-by: Stanley Huang <[email protected]>
1 parent 56f5212 commit 0530093

19 files changed

+1017
-0
lines changed

boards/raytac/an7002q_db/Kconfig

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Raytac AN7002Q-DB-5340 board configuration
2+
3+
# Copyright (c) 2024 Nordic Semiconductor ASA
4+
# Copyright (c) 2025 Raytac Corporation.
5+
# SPDX-License-Identifier: Apache-2.0
6+
7+
config IPM_NRFX
8+
default IPM
9+
10+
config MBOX_NRFX_IPC
11+
default MBOX
12+
13+
if BOARD_RAYTAC_AN7002Q_DB_NRF5340_CPUAPP
14+
15+
config BT_HCI_IPC
16+
default y if BT
17+
18+
config HEAP_MEM_POOL_ADD_SIZE_BOARD
19+
int
20+
default 4096 if BT_HCI_IPC
21+
22+
endif
23+
24+
if BOARD_RAYTAC_AN7002Q_DB_NRF5340_CPUNET
25+
26+
config BT_ECC
27+
default y if BT
28+
29+
endif
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Copyright (c) 2024 Nordic Semiconductor
2+
# Copyright (c) 2025 Raytac Corporation.
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
config BOARD_RAYTAC_AN7002Q_DB
6+
select SOC_NRF5340_CPUNET_QKAA if BOARD_RAYTAC_AN7002Q_DB_NRF5340_CPUNET
7+
select SOC_NRF5340_CPUAPP_QKAA if BOARD_RAYTAC_AN7002Q_DB_NRF5340_CPUAPP

boards/raytac/an7002q_db/board.cmake

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright (c) 2024 Nordic Semiconductor ASA
2+
# Copyright (c) 2025 Raytac Corporation.
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
if(CONFIG_BOARD_RAYTAC_AN7002Q_DB_NRF5340_CPUAPP)
6+
board_runner_args(jlink "--device=nrf5340_xxaa_app" "--speed=4000")
7+
elseif(CONFIG_BOARD_RAYTAC_AN7002Q_DB_NRF5340_CPUNET)
8+
board_runner_args(jlink "--device=nrf5340_xxaa_net" "--speed=4000")
9+
endif()
10+
11+
include(${ZEPHYR_BASE}/boards/common/nrfutil.board.cmake)
12+
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
13+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

boards/raytac/an7002q_db/board.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
board:
2+
name: raytac_an7002q_db
3+
full_name: AN7002Q-DB-5340
4+
vendor: raytac
5+
socs:
6+
- name: nrf5340
Binary file not shown.
Lines changed: 261 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,261 @@
1+
.. zephyr:board:: raytac_an7002q_db
2+
3+
Overview
4+
********
5+
6+
The Raytac AN7002Q-DB-5340 is a single-board development kit for evaluation and development on
7+
the nRF7002, a Wi-Fi companion IC to Raytac's MDBT53 module host processor.
8+
It is certified for the Wi-Fi Alliance® `Wi-Fi Certification program`_ in the
9+
Connectivity, Security, and Optimization categories. See `UG Wi-Fi certification`_ for detailed
10+
information.
11+
12+
The nRF7002 is an IEEE 802.11ax (Wi-Fi 6) compliant solution that implements the Wi-Fi physical
13+
layer and Medium Access Control (MAC) layer protocols. It implements the nRF Wi-Fi driver
14+
software on the nRF5340 host processor communicating over the QSPI bus.
15+
16+
The nRF5340 host is a dual-core SoC based on the Arm® Cortex®-M33 architecture.
17+
It has the following features:
18+
19+
* A full-featured Arm Cortex-M33F core with DSP instructions, FPU, and Armv8-M Security Extension,
20+
running at up to 128 MHz, referred to as the application core.
21+
* A secondary Arm Cortex-M33 core, with a reduced feature set, running at a fixed 64 MHz,
22+
referred to as the network core.
23+
24+
The ``raytac_an7002q_db/nrf5340/cpuapp`` board target provides support for the application core on the
25+
nRF5340 SoC. The ``raytac_an7002q_db/nrf5340/cpunet`` board target provides support for the network
26+
core on the nRF5340 SoC.
27+
28+
More information about the board can be found at the
29+
`Raytac AN7002Q-DB-5340 website`_.
30+
The `Raytac AN7002Q-DB-5340 Product Specification`_
31+
contains the processor's information and the datasheet.
32+
33+
Hardware
34+
========
35+
36+
* Raytac AN7002Q-DB-5340:
37+
The Raytac AN7002Q-DB-5340 has two modules.
38+
39+
* The WiFi module of the AN7002Q-P.
40+
* The BLE module of the MDBT5340-P.
41+
42+
43+
Supported features
44+
------------------
45+
46+
.. zephyr:board-supported-hw::
47+
48+
See `Raytac AN7002Q-DB-5340 Product Specification`_
49+
for a complete list of Raytac AN7002Q-DB-5340 board hardware features.
50+
51+
Connections and IOs
52+
-------------------
53+
54+
The connections and IOs supported by the development kit are listed in this section.
55+
56+
LED
57+
^^^
58+
59+
* **LED 1** (green) = **P1.06**
60+
* **LED 2** (green) = **P1.07**
61+
62+
Push buttons
63+
^^^^^^^^^^^^
64+
65+
* **Button 1** = **SW1** = **P1.08**
66+
* **Button 2** = **SW2** = **P1.09**
67+
68+
Wi-Fi control
69+
^^^^^^^^^^^^^
70+
71+
* BUCKEN = **P0.12**
72+
* HOST IRQ = **P0.23**
73+
* COEX_REQ = **P0.28**
74+
* COEX_STATUS0 = **P0.30**
75+
* COEX_STATUS1 = **P0.29**
76+
* COEX_GRANT = **P0.24**
77+
78+
Security components
79+
-------------------
80+
81+
The following security components are available:
82+
83+
* Implementation Defined Attribution Unit (`IDAU`_) on the application core.
84+
85+
The IDAU is implemented with the System Protection Unit and is used to define
86+
secure and non-secure memory maps. By default, the entire memory space
87+
(Flash, SRAM, and peripheral address space) is defined to be secure-accessible only.
88+
89+
* Secure boot.
90+
91+
Programming and Debugging
92+
*************************
93+
94+
.. zephyr:board-supported-runners::
95+
96+
The nRF5340 application core supports the Armv8-M Security Extension.
97+
Applications built for the ``raytac_an7002q_db/nrf5340/cpuapp`` board boot by default in the
98+
secure state.
99+
100+
The nRF5340 network core does not support the Armv8-M Security Extension.
101+
nRF5340 IDAU can configure bus accesses by the nRF5340 network core to have the secure
102+
attribute set. This allows to build and run secure-only applications on the nRF5340 SoC.
103+
104+
Building Secure/Non-Secure Zephyr applications with Arm |reg| TrustZone |reg|
105+
=============================================================================
106+
107+
Applications on the nRF5340 may contain a Secure and a Non-Secure firmware
108+
image for the application core. The Secure image can be built using either
109+
Zephyr or `Trusted Firmware M`_ (TF-M). Non-Secure firmware
110+
images are always built using Zephyr. The two alternatives are described below.
111+
112+
.. note::
113+
114+
By default, SPE for the nRF5340 application core is built using TF-M.
115+
116+
Building the Secure firmware with TF-M
117+
--------------------------------------
118+
119+
The process to build the Secure firmware image using TF-M and the Non-Secure
120+
firmware image using Zephyr requires the following steps:
121+
122+
1. Build the Non-Secure Zephyr application
123+
for the application core using ``-DBOARD=raytac_an7002q_db/nrf5340/cpuapp/ns``.
124+
To invoke the building of TF-M the Zephyr build system requires the
125+
Kconfig option ``BUILD_WITH_TFM`` to be enabled, which is done by
126+
default when building Zephyr as a Non-Secure application.
127+
The Zephyr build system will perform the following steps automatically:
128+
129+
* Build the Non-Secure firmware image as a regular Zephyr application
130+
* Build a TF-M (secure) firmware image
131+
* Merge the output image binaries together
132+
* Optionally build a bootloader image (MCUboot)
133+
134+
.. note::
135+
136+
Depending on the TF-M configuration, an application DTS overlay may be
137+
required, to adjust the Non-Secure image Flash and SRAM starting address
138+
and sizes.
139+
140+
2. Build the application firmware for the network core using
141+
``-DBOARD=raytac_an7002q_db/nrf5340/cpunet``.
142+
143+
Building the Secure firmware using Zephyr
144+
-----------------------------------------
145+
146+
The process to build the Secure and the Non-Secure firmware images
147+
using Zephyr requires the following steps:
148+
149+
1. Build the Secure Zephyr application for the application core
150+
using ``-DBOARD=raytac_an7002q_db/nrf5340/cpuapp`` and
151+
``CONFIG_TRUSTED_EXECUTION_SECURE=y`` and ``CONFIG_BUILD_WITH_TFM=n``
152+
in the application project configuration file.
153+
2. Build the Non-Secure Zephyr application for the application core
154+
using ``-DBOARD=raytac_an7002q_db/nrf5340/cpuapp/ns``.
155+
3. Merge the two binaries together.
156+
4. Build the application firmware for the network core using
157+
``-DBOARD=raytac_an7002q_db/nrf5340/cpunet``.
158+
159+
When building a Secure/Non-Secure application for the nRF5340 application core,
160+
the Secure application will have to set the IDAU (SPU) configuration to allow
161+
Non-Secure access to all CPU resources utilized by the Non-Secure application
162+
firmware. SPU configuration shall take place before jumping to the Non-Secure
163+
application.
164+
165+
Building a Secure only application
166+
==================================
167+
168+
Build the Zephyr app in the usual way (see :ref:`build_an_application`
169+
and :ref:`application_run`), using ``-DBOARD=raytac_an7002q_db/nrf5340/cpuapp`` for
170+
the firmware running on the nRF5340 application core, and using
171+
``-DBOARD=raytac_an7002q_db/nrf5340/cpunet`` for the firmware running
172+
on the nRF5340 network core.
173+
174+
Flashing
175+
========
176+
177+
Follow the instructions in the :ref:`nordic_segger` page to install
178+
and configure all the necessary software. Further information can be
179+
found in :ref:`nordic_segger_flashing`. Then you can build and flash
180+
applications as usual (:ref:`build_an_application` and
181+
:ref:`application_run` for more details).
182+
183+
.. warning::
184+
185+
The nRF5340 has a flash read-back protection feature. When flash read-back
186+
protection is active, you will need to recover the chip before reflashing.
187+
If you are flashing with :ref:`west <west-build-flash-debug>`, run
188+
this command for more details on the related ``--recover`` option:
189+
190+
.. code-block:: console
191+
192+
$ west flash -H -r nrfjprog --skip-rebuild
193+
194+
.. note::
195+
196+
Flashing and debugging applications on the nRF5340 DK requires
197+
upgrading the nRF Command Line Tools to version 10.12.0. Further
198+
information on how to install the nRF Command Line Tools can be
199+
found in :ref:`nordic_segger_flashing`.
200+
201+
Here is an example for the :zephyr:code-sample:`hello_world` application running on the
202+
nRF5340 application core.
203+
204+
First, run your favorite terminal program to listen for output.
205+
206+
.. code-block:: console
207+
208+
$ minicom -D <tty_device> -b 115200
209+
210+
Replace :code:`<tty_device>` with the port where the board nRF7002 DK
211+
can be found. For example, under Linux, :code:`/dev/ttyACM0`.
212+
213+
Then build and flash the application in the usual way.
214+
215+
.. zephyr-app-commands::
216+
:zephyr-app: samples/hello_world
217+
:board: raytac_an7002q_db/nrf5340/cpuapp
218+
:goals: build flash
219+
220+
Debugging
221+
=========
222+
223+
Refer to the :ref:`nordic_segger` page to learn about debugging Nordic
224+
boards with a Segger IC.
225+
226+
Next steps
227+
**********
228+
229+
You have now completed getting started with the Raytac AN7002Q-DB-5340.
230+
See the following links for where to go next:
231+
232+
* `Installation`_ and `Configuring and Building`_ documentation to install the
233+
nRF Connect SDK and learn more about its development environment.
234+
* `Developing with nRF70`_ documentation for more advanced topics related to the nRF70 Series.
235+
* `Wi-Fi`_ documentation for information related to Wi-Fi protocol and Wi-Fi modes of operation.
236+
237+
References
238+
**********
239+
240+
.. target-notes::
241+
242+
.. _Wi-Fi Certification program:
243+
https://www.wi-fi.org/certification
244+
.. _UG Wi-Fi certification:
245+
https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/protocols/wifi/wifi_certification.html#ug-wifi-certification
246+
.. _IDAU:
247+
https://developer.arm.com/docs/100690/latest/attribution-units-sau-and-idau
248+
.. _Raytac AN7002Q-DB-5340 website:
249+
https://www.raytac.com/product/ins.php?index_id=139
250+
.. _Raytac AN7002Q-DB-5340 Product Specification:
251+
https://www.raytac.com/download/index.php?index_id=79
252+
.. _Trusted Firmware M:
253+
https://www.trustedfirmware.org/projects/tf-m/
254+
.. _Installation:
255+
https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/installation.html#installation
256+
.. _Configuring and Building:
257+
https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/config_and_build/index.html#configuration-and-build
258+
.. _Developing with nRF70:
259+
https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/device_guides/nrf70/index.html#ug-nrf70-developing
260+
.. _Wi-Fi:
261+
https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/protocols/wifi/index.html#ug-wifi

0 commit comments

Comments
 (0)