HAL API Reference

The following provides a list of HAL API documentation

HAL General Types/Macros

This section documents the basic types and macros that are used by multiple HAL drivers

Result Type

Defines a type and related utilities for function result handling

General Types

This section documents the basic types that are used by multiple HAL drivers

Result Codes

HAL specific return codes definitions for all drivers

ADC HAL Results

ADC specific return codes

Clock HAL Results

Clock specific return codes

Comparator HAL Results

Comparator specific return codes

CRC HAL Results

CRC specific return codes

DAC HAL Results

DAC specific return codes

DMA HAL Results

DMA specific return codes

EZI2C HAL Results

EZI2C specific return codes

Flash HAL Results

Flash specific return codes

GPIO HAL Results

GPIO specific return codes

HWMGR HAL Results

HWMGR specific return codes

I2C HAL Results

I2C specific return codes

I2S HAL Results

I2S specific return codes

Interconnect HAL Results

Interconnect specific return codes

LPTimer HAL Results

LPTimer specific return codes

Opamp HAL Results

Opamp specific return codes

PDM/PCM HAL Results

PDM/PCM specific return codes

PWM HAL Results

PWM specific return codes

QSPI HAL Results

QSPI specific return codes

Quadrature Decoder HAL Results

Quadrature Decoder specific return codes

RTC HAL Results

RTC specific return codes

SDHC HAL Results

SDHC specific return codes

SDIO HAL Results

SDIO specific return codes

SPI HAL Results

SPI specific return codes

SYSPM HAL Results

SYSPM specific return codes

TDM HAL Results

TDM specific return codes

Timer HAL Results

Timer specific return codes

TRNG HAL Results

TRNG specific return codes

UART HAL Results

UART specific return codes

USB Device HAL Results

USB Device specific return codes

WDT HAL Results

WDT specific return codes

System Power Management

Interface for changing power states and restricting when they are allowed

SYSPM HAL Results

SYSPM specific return codes

Clock

Interface for getting and changing clock configuration

Clock HAL Results

Clock specific return codes

Group_hal_tolerance

Overrideable Macros

These macros can be defined to a custom value globally to modify the behavior of the HAL

Implementation Specific Types

The following types are used by the HAL, but are defined by the implementation

HAL Driver Availability

This section documents the macros that can be used to check if a specific driver is available for the current device

HAL Drivers

This section documents the drivers which form the stable API of the Cypress HAL

ADC (Analog to Digital Converter)

High level interface for interacting with the analog to digital converter (ADC)

ADC HAL Results

ADC specific return codes

Clock

Interface for getting and changing clock configuration

Clock HAL Results

Clock specific return codes

Group_hal_tolerance

COMP (Analog Comparator)

High level interface for interacting with an analog Comparator

Comparator HAL Results

Comparator specific return codes

CRC (Cyclic Redundancy Check)

High level interface for interacting with the CRC, which provides hardware accelerated CRC computations

CRC HAL Results

CRC specific return codes

DAC (Digital to Analog Converter)

High level interface for interacting with the digital to analog converter (DAC)

DAC HAL Results

DAC specific return codes

DMA (Direct Memory Access)

High level interface for interacting with the direct memory access (DMA)

DMA HAL Results

DMA specific return codes

EZI2C (Inter-Integrated Circuit)

High level interface for interacting with the Cypress EZ Inter-Integrated Circuit (EZI2C)

EZI2C HAL Results

EZI2C specific return codes

Flash (Flash System Routine)

High level interface to the internal flash memory

Flash HAL Results

Flash specific return codes

System Power Management

Interface for changing power states and restricting when they are allowed

SYSPM HAL Results

SYSPM specific return codes

GPIO (General Purpose Input Output)

High level interface for configuring and interacting with general purpose input/outputs (GPIO)

GPIO HAL Results

GPIO specific return codes

HWMGR (Hardware Manager)

High level interface to the Hardware Manager

HWMGR HAL Results

HWMGR specific return codes

I2C (Inter-Integrated Circuit)

High level interface for interacting with the I2C resource

I2C HAL Results

I2C specific return codes

I2S (Inter-IC Sound)

High level interface for interacting with the Inter-IC Sound (I2S)

I2S HAL Results

I2S specific return codes

Interconnect (Internal Digital Routing)

High level interface to the Cypress digital routing

Interconnect HAL Results

Interconnect specific return codes

Keyscan

High level interface for interacting with the KeyScan

LPTimer (Low-Power Timer)

High level interface for interacting with the low-power timer (LPTimer)

LPTimer HAL Results

LPTimer specific return codes

Opamp (Operational Amplifier)

High level interface for interacting with the Operational Amplifier (Opamp)

Opamp HAL Results

Opamp specific return codes

PDM/PCM (Pulse-Density Modulation to Pulse-Code Modulation Converter)

High level interface for interacting with the pulse-density modulation to pulse-code modulation (PDM/PCM) converter

PDM/PCM HAL Results

PDM/PCM specific return codes

PWM (Pulse Width Modulator)

High level interface for interacting with the pulse width modulator (PWM) hardware resource

PWM HAL Results

PWM specific return codes

QSPI (Quad Serial Peripheral Interface)

High level interface for interacting with the Quad-SPI interface

QSPI HAL Results

QSPI specific return codes

Quadrature Decoder

High level interface for interacting with the Quadrature Decoder hardware resource

Quadrature Decoder HAL Results

Quadrature Decoder specific return codes

RTC (Real-Time Clock)

High level interface for interacting with the real-time clock (RTC)

RTC HAL Results

RTC specific return codes

SDHC (SD Host Controller)

High level interface to the Secure Digital Host Controller (SDHC)

SDHC HAL Results

SDHC specific return codes

SDIO (Secure Digital Input Output)

High level interface to the Secure Digital Input Output (SDIO)

SDIO HAL Results

SDIO specific return codes

SPI (Serial Peripheral Interface)

High level interface for interacting with the Serial Peripheral Interface (SPI)

SPI HAL Results

SPI specific return codes

System

High level interface for interacting with reset and delays

TDM (Time Division Multiplexed)

High level interface for interacting with the Time Division Multiplexed controller (TDM)

TDM HAL Results

TDM specific return codes

Timer (Timer/Counter)

High level interface for interacting with the Timer/Counter hardware resource

Timer HAL Results

Timer specific return codes

TRNG (True Random Number Generator)

High level interface to the True Random Number Generator (TRNG)

TRNG HAL Results

TRNG specific return codes

UART (Universal Asynchronous Receiver-Transmitter)

High level interface for interacting with the Universal Asynchronous Receiver-Transmitter (UART)

UART HAL Results

UART specific return codes

USB Device

High level interface for interacting with the USB Device

USB Device HAL Results

USB Device specific return codes

Endpoint

APIs relating to endpoint management

Common

EP0

APIs relating specifically to management of endpoint zero

WDT (Watchdog Timer)

High level interface to the Watchdog Timer (WDT)

WDT HAL Results

WDT specific return codes

CAT1 (PSoC 6) Implementation Specific

This section provides details about the CAT1 (PSoC 6) implementation of the Cypress HAL

Deprecated

The following CAT1 specific items have been deprecated and replaced by more generic items

Clocks

Implementation specific interface for using the Clock driver

COMP (CTB Opamps)

Implementation of the analog comparator (COMP) driver on top of the CTB opamps

COMP (LP Comparator block)

Implementation of the analog comparator (COMP) driver on top of the LP (low power) comparator

DMA (Direct Memory Access)

DW (DataWire) is one of two DMA hardware implementations for CAT1 (PSoC 6)

DMAC (Direct Memory Access Controller)

Implementation specific interface for using the DMAC DMA peripheral

DW (Datawire)

Implementation specific interface for using the Datawire DMA peripheral

CAT1 Specific Hardware Types

Aliases for types which are part of the public HAL interface but whose representations need to vary per HAL implementation

Interconnect (Internal Digital Routing)

The interconnect system connects the various hardware peripherals using trigger signals

Pins

Definitions for the pinout for each supported device

PSoC6_01 104-M-CSP-BLE

Pin definitions and connections specific to the PSoC6_01 104-M-CSP-BLE package

PSoC6_01 104-M-CSP-BLE-USB

Pin definitions and connections specific to the PSoC6_01 104-M-CSP-BLE-USB package

PSoC6_01 116-BGA-BLE

Pin definitions and connections specific to the PSoC6_01 116-BGA-BLE package

PSoC6_01 116-BGA-USB

Pin definitions and connections specific to the PSoC6_01 116-BGA-USB package

PSoC6_01 124-BGA

Pin definitions and connections specific to the PSoC6_01 124-BGA package

PSoC6_01 124-BGA-SIP

Pin definitions and connections specific to the PSoC6_01 124-BGA-SIP package

PSoC6_01 43-SMT

Pin definitions and connections specific to the PSoC6_01 43-SMT package

PSoC6_01 68-QFN-BLE

Pin definitions and connections specific to the PSoC6_01 68-QFN-BLE package

PSoC6_01 80-WLCSP

Pin definitions and connections specific to the PSoC6_01 80-WLCSP package

PSoC6_02 100-WLCSP

Pin definitions and connections specific to the PSoC6_02 100-WLCSP package

PSoC6_02 124-BGA

Pin definitions and connections specific to the PSoC6_02 124-BGA package

PSoC6_02 128-TQFP

Pin definitions and connections specific to the PSoC6_02 128-TQFP package

PSoC6_02 68-QFN

Pin definitions and connections specific to the PSoC6_02 68-QFN package

PSoC6_03 100-TQFP

Pin definitions and connections specific to the PSoC6_03 100-TQFP package

PSoC6_03 49-WLCSP

Pin definitions and connections specific to the PSoC6_03 49-WLCSP package

PSoC6_03 68-QFN

Pin definitions and connections specific to the PSoC6_03 68-QFN package

PSoC6_04 64-TQFP-EPAD

Pin definitions and connections specific to the PSoC6_04 64-TQFP-EPAD package

PSoC6_04 68-QFN

Pin definitions and connections specific to the PSoC6_04 68-QFN package

PSoC6_04 80-TQFP

Pin definitions and connections specific to the PSoC6_04 80-TQFP package

CYW20829 56-QFN

Pin definitions and connections specific to the CYW20829 56-QFN package

MXS28PLAYERMCUSS 128-TQFP

Pin definitions and connections specific to the MXS28PLAYERMCUSS 128-TQFP package

System Power Management

The CAT1 (PSoC 6) Power Management has the following characteristics: CYHAL_SYSPM_SYSTEM_NORMAL equates to the Low Power mode CYHAL_SYSPM_SYSTEM_LOW equates to the Ultra Low Power mode

Timer (Timer/Counter)

Triggers

Trigger connections for supported device families

PSOC6_01

Trigger connections for psoc6_01

PSOC6_02

Trigger connections for psoc6_02

PSOC6_03

Trigger connections for psoc6_03

PSOC6_04

Trigger connections for psoc6_04

CYW20829

Trigger connections for cyw20829

MXS28PLAYERM CUSS

Trigger connections for mxs28playermcuss

TRNG (True Random Number Generator)

Initialization polynomial values for the True Random Number Generator

WDT (Watchdog Timer)

The CAT1 (PSoC 6) WDT is only capable of supporting certain timeout ranges below its maximum timeout

ADC (Analog Digital Converter)

ADC (Analog Digital Converter)

COMP (Analog Comparator)

On CAT1 (PSoC 6), the COMP driver can use either of two underlying hardware blocks:

DAC

I2S (Inter-IC Sound)

The CAT1 (PSoC 6) I2S Supports the following values for word lengths:

LPTIMER

The maximum number of ticks that can set to an LPTIMER is 0xFFF0FFFF

Opamp

PDM/PCM (Pulse Density Modulation to Pulse Code Modulation Converter)

The CAT1 (PSoC 6) PDM/PCM Supports the following conversion parameters:

PWM (Pulse Width Modulator)

QuadDec (Quadrature Decoder)

RTC (Real Time Clock)

Internally the CAT1 (PSoC 6) RTC only stores the year as a two digit BCD value (0-99); no century information is stored

SDHC (SD Host Controller)

The SHDC HAL implemenation for PSoC 6 provides implementations for the following weak functions specified by the PDL to make their usage in SDHC HAL driver more flexible by providing user ability to use card detect, write protect, pwr en, and io select signals on custom pins instead of dedicated SDHC block pins

TDM (Time Division Multiplexing)

The CAT1 (PSoC 6) TDM Supports the following values for word lengths:

UDB SDIO (Secure Digital Input Output)

The UDB based SDIO interface allows for communicating between a PSoC 6 and a Cypress wireless device such as the CYW4343W, CYW43438, or CYW43012