Zephyr API Documentation 4.2.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
swdp.h File Reference

Serial Wire Debug Port interface driver API. More...

#include <zephyr/device.h>

Go to the source code of this file.

Data Structures

struct  swdp_api
 Serial Wire Debug Port (SWDP) driver API. More...

Macros

#define SWDP_TRANSFER_ERROR   BIT(3)
 Transfer or parity error detected during transaction.
SWD Packet Request Bits

Bit definitions for SWD packet request fields.

These bits are used to construct the 8-bit request packet header sent during an SWD transaction.

#define SWDP_REQUEST_APnDP   BIT(0)
 Access Port (AP) or Debug Port (DP).
#define SWDP_REQUEST_RnW   BIT(1)
 Read (1) or Write (0) operation.
#define SWDP_REQUEST_A2   BIT(2)
 Address bit 2 for register selection.
#define SWDP_REQUEST_A3   BIT(3)
 Address bit 3 for register selection.
SWD Acknowledge (ACK) Response Bits

Bit definitions for SWD acknowledge response fields.

These bits are used to indicate the result of an SWD transaction.

#define SWDP_ACK_OK   BIT(0)
 Transaction completed successfully.
#define SWDP_ACK_WAIT   BIT(1)
 Target requests to retry the transaction later.
#define SWDP_ACK_FAULT   BIT(2)
 Target detected a fault condition.
SWDP Interface Pin Definitions

Pin identifiers for SWDP interface control.

These constants define bit positions for controlling individual pins in the SWDP interface.

#define SWDP_SWCLK_PIN   0U
 Serial Wire Clock (SWCLK) pin identifier.
#define SWDP_SWDIO_PIN   1U
 Serial Wire Data Input/Output (SWDIO) pin identifier.
#define SWDP_nRESET_PIN   7U
 Active-low reset (nRESET) pin identifier.

Detailed Description

Serial Wire Debug Port interface driver API.