• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

boards/18-Mar-2025-2018

src/18-Mar-2025-300202

CMakeLists.txtD18-Mar-2025329 118

KconfigD18-Mar-2025373 107

README.rstD18-Mar-20251.8 KiB5642

app.overlayD18-Mar-2025378 1815

prj.confD18-Mar-2025396 1915

sample.yamlD18-Mar-2025201 1312

README.rst

1.. zephyr:code-sample:: cmsis-dap
2   :name: CMSIS-DAP
3
4   Implement a custom CMSIS-DAP controller using SWDP interface driver.
5
6Overview
7********
8
9This sample app demonstrates use of a SWDP interface driver and CMSIS DAP
10controller through DAP USB backend.
11
12Requirements
13************
14
15This sample supports multiple hardware configurations:
16
17The simplest configuration would be to connect ``SWDIO`` to ``dio``, ``SWDCLK`` to ``clk``
18and optionally ``nRESET`` to ``reset``.  The optional ``noe`` pin is used to enable the port,
19e.g. if the SWD connections are multiplexed.
20
21Building and Running
22********************
23
24The following commands build and flash DAP sample.
25
26.. zephyr-app-commands::
27   :zephyr-app: samples/subsys/dap
28   :board: nrf52840dk_nrf52840
29   :goals: flash
30   :compact:
31
32Connect HIC to the target and try some pyOCD commands, for example:
33
34.. code-block:: console
35
36   pyocd commander -t nrf52840
37
38   0029527 W Board ID FE5D is not recognized [mbed_board]
39   Connected to NRF52840 [Sleeping]: FE5D244DFE1F33DB
40   pyocd> read32 0x20004f18 32
41   20004f18:  20001160 2000244c 00000000 0000e407    | ..` .$L........|
42   20004f28:  ffffffff ffffffff 00000000 aaaaaaaa    |................|
43   pyocd> halt
44   Successfully halted device
45   pyocd> reg
46   general registers:
47         lr: 0x00009cdd                   r7: 0x00000000 (0)
48         pc: 0x000033ca                   r8: 0x00000000 (0)
49         r0: 0x00000000 (0)               r9: 0x00000000 (0)
50         r1: 0x20002854 (536881236)      r10: 0x00000000 (0)
51         r2: 0x20000be4 (536873956)      r11: 0x00000000 (0)
52         r3: 0x00000000 (0)              r12: 0x00000000 (0)
53         r4: 0x200017e8 (536877032)       sp: 0x20002898
54         r5: 0x20001867 (536877159)     xpsr: 0x61000000 (1627389952)
55         r6: 0x00000000 (0)
56