Swd Protocol Physical Layer; Swd Protocol Packet Layer; Fetching Programming Data - Infineon PSoC 4 Quick Start Quide

Table of Contents

Advertisement

PSoC 4 Programming Using an External Microcontroller (HSSP)
HSSP Firmware Architecture
All layers used in the firmware architecture, as shown in
2.1

SWD Protocol Physical Layer

Files that constitute the SWD Protocol Physical layer are described:
Table 1
SWD Protocol Physical Layer Files
Source Files
RegisterDefines
(.h file)
SWD_PhysicalLayer
(.c and .h files)
The codes in these files are written for PSoC 5LP as the host microcontroller. If these files are ported to any
other host microcontroller, then you should modify all the functions and macros appropriately.
Note:
See "Pin Names and Requirements" in the programming specifications of the respective device
listed in the
2.2

SWD Protocol Packet Layer

Files that constitute the SWD Protocol Packet layer are described:
Table 2
SWD Protocol Packet Layer Files
Source Files
SWD_PacketLayer
(.c and .h files)
SWD_UpperPacketLayer
(.c and .h files)
The functions defined in this layer are called directly by the functions in the ProgrammingSteps.c file.
All of these SWD packet functions operate on three global variables—swd_PacketHeader,
swd_PacketAck, and swd_PacketData[]—that are accessed by the functions in the top layer files, as
Figure 1
shows.
2.3

Fetching Programming Data

Files used for fetching the programming data to the upper layer functions are described:
Table 3
Data Fetch Layer File
Source File
DataFetch
(.c and .h files)
Modify the definitions of the functions based on the method that you use to get the HSSP programming data.
Application Note
Description
This file defines the port number, pin number, input/output register, and drive mode
register of the programming pins.
These files contain macros and functions to manipulate the programming pins. The
pins are defined in the RegisterDefines.h file.
Related Documentation
Description
These files define the packet routines for sending the SWD Read and
SWD Write packets per the SWD protocol.
These files use the functions defined in SWD_PacketLayer to
implement functions that directly read and write to the DAP register
and CPU address space.
Description
These files contain the routines to fetch the programming data from the HexImage.c file
and then pass that data to the functions in the ProgrammingSteps.c file.
The programming data includes flash row data, flash protection data, chip protection
data, Silicon ID, checksum, and the total number of flash rows.
Figure
1, are discussed in the following sections.
section for details on the pin configurations on the host side.
6 of 45
001-84858 Rev. *N
2021-03-23

Advertisement

Table of Contents
loading

This manual is also suitable for:

An84858

Table of Contents