Hardware Abstraction Layer (HAL)
PSoC 6 Implementation Specific

General Description

This section provides details about the PSoC 6 implementation of the Cypress HAL.

All information within this section is platform specific and is provided for reference. Portable application code should depend only on the APIs and types which are documented in the HAL Drivers section.

HAL Resource Hardware Mapping

The following table shows a mapping of each HAL driver to the lower level firmware driver and the corresponding hardware resource. This is intended to help understand how the HAL is implemented for PSoC 6 and what features the underlying hardware supports.

HAL Resource PDL Driver(s) PSoC 6 Hardware
ADC cy_adc SAR ADC
Clock cy_sysclk All clocks (system & peripheral)
Comparator cy_ctb or cy_lpcomp CTBm or LPComp
CRC cy_crypto_core_crc Crypto
DAC cy_ctdac DAC
DMA cy_dma, cy_dmac DMA Controller
EZ-I2C cy_scb_ezi2c SCB
Flash cy_flash Flash
GPIO cy_gpio GPIO
Hardware Manager NA NA
I2C cy_scb_i2c SCB
I2S cy_i2s I2S
LPTimer cy_mcwdt MCWDT
Opamp cy_ctb CTBm
PDM/PCM cy_pdm_pcm PDM-PCM
PWM cy_pwm TCPWM
QSPI cy_smif QSPI (SMIF)
RTC cy_rtc RTC
SDHC cy_sd_host SD Host
SDIO cy_sd_host, or NA SD Host, or UDB
SPI cy_scb_spi SCB
SysPM cy_syspm System Power Resources
System cy_syslib System Resources
Timer cy_tcpwm_counter TCPWM
TRNG cy_crypto_core_trng Crypto
UART cy_scb_uart SCB
USB Device cy_usbfs_dev_drv USB-FS
WDT cy_wdt WDT

Device Specific Errors

Error codes generated by the low level level PDL driver all use module IDs starting with CY_RSLT_MODULE_DRIVERS_PDL_BASE. The exact errors are documented for each driver in the mtb-pdl-cat1 documentation.

API Reference

 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.
 
 Deprecated
 The following PSoC 6 specific items have been deprecated and replaced by more generic items.
 
 DMA (Direct Memory Access)
 DW (DataWire) is one of two DMA hardware implementations for PSOC6.
 
 PSoC 6 Specific Hardware Types
 Aliases for types which are part of the public HAL interface but whose representations need to vary per HAL implementation.
 
 Pins
 Definitions for the pinout for each supported device.
 
 System Power Management
 The 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.
 
 ADC (Analog Digital Converter)
 
 COMP (Analog Comparator)
 On PSoC 6, the COMP driver can use either of two underlying hardware blocks:
 
 DAC
 
 I2S (Inter-IC Sound)
 The PSoC 6 I2S Supports the following values for word and channel lengths (with the constraint that word length must be less than or equal to channel length):
 
 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 PSoC 6 PDM/PCM Supports the following conversion parameters:
 
 PWM (Pulse Width Modulator)
 
 RTC (Real Time Clock)
 Internally the PSoC 6 RTC only stores the year as a two digit BCD value (0-99); no century information is stored.
 
 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.
 
 WDT (Watchdog Timer)
 The PSoC 6 WDT is only capable of supporting certain timeout ranges below its maximum timeout of 6000ms.