Appendix D: Hssp Functions - Infineon PSoC 4 Quick Start Quide

Table of Contents

Advertisement

PSoC 4 Programming Using an External Microcontroller (HSSP)

Appendix D: HSSP Functions

17
Appendix D: HSSP Functions
The following tables list the public functions defined in each layer of the HSSP firmware architecture. These
functions are used to communicate between the layers of the HSSP firmware, as
Table 15
Functions in SWD_PhysicalLayer.h
Function
SetSwdckHigh()
SetSwdioHigh()
SetXresHigh()
SetSwdckLow()
SetSwdioLow()
SetXresLow()
SetSwdckCmosOutput()
SetSwdioCmosOutput()
SetXresCmosOutput()
SetSwdckHizInput()
SetSwdioHizInput()
SetXresHizInput()
ReadSwdio()
Table 16
Functions in SWD_PacketLayer.h
Function
Swd_WritePacket()
Swd_ReadPacket()
SwdLineReset()
Table 17
Functions in SWD_UpperPacketLayer.h
Function
Read_DAP
Write_DAP
Read_IO
Application Note
Description
Sets the host SWDCK pin HIGH.
Sets the host SWDIO pin HIGH.
Sets the host XRES pin HIGH.
Sets the host SWDCK pin LOW.
Sets the host SWDIO pin LOW.
Sets the host XRES pin LOW.
Configures the host SWDCK pin for CMOS output drive mode.
Configures the host SWDIO pin for CMOS output drive mode.
Configures the host XRES pin for CMOS output drive mode.
Configures the host SWDCK pin for high-impedance digital input drive
mode.
Configures the host SWDIO pin for high-impedance digital input drive
mode.
Configures the host XRES pin for high-impedance digital input drive mode.
Returns the current state of the SWDIO input pin.
Description
Sends an SWD write packet. This function operates on the global variables
swd_PacketHeader, swd_PacketAck, and swd_PacketData[].
Sends a single SWD read packet. This function operates on the global
variables swd_PacketHeader, swd_PacketAck, and swd_PacketData[]. This
function is used for reading from a specific address.
Resets the SWD line by sending 51 SWDCK clock cycles with SWDIO line
HIGH. Used to acquire the debug access port (DAP) during step 1 of
programming.
Description
Reads a 32-bit data from the specific DAP register and writes it to
Swd_PacketData[].This function uses the Swd_ReadPacket() function to
read the data.
Writes a 32-bit data to the specific DAP register. This function uses the
Swd_WritePacket() function to write the data.
Reads a 32-bit data from the specified address of the CPU address space.
This function is implemented by using the Read_DAP() and Write_DAP()
41 of 45
Figure 1
shows.
001-84858 Rev. *N
2021-03-23

Advertisement

Table of Contents
loading

This manual is also suitable for:

An84858

Table of Contents