This section provides details about the implementation of the Infineon 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.
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 and what features the underlying hardware supports.
HAL Resource | PDL Driver(s) | Hardware |
---|---|---|
ADC | cy_adc | SAR ADC |
Clock | cy_sysclk | All clocks (system & peripheral) |
Comparator | cy_ctb or cy_lpcomp | CTBm or LPComp |
DMA | cy_dma, cy_dmac | DMA Controller |
NVM | cy_flash | Flash |
GPIO | cy_gpio | GPIO |
I2C | cy_scb_i2c | SCB |
LPTimer | cy_mcwdt | MCWDT |
PWM | cy_pwm | TCPWM |
MemorySPI | cy_smif | MemorySPI (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 |
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 | |
ADC (Analog to Digital Converter) | |
ADC reads on PSC3 do not automatically clear the read status after reading the result. | |
DMA (Direct Memory Access) | |
DW (DataWire) is one of two DMA hardware implementations. | |
Specific Hardware Types | |
Aliases for types which are part of the public HAL interface but whose representations need to vary per HAL implementation. | |
LPTimer (Low-Power Timer) | |
The maximum number of ticks that can set to an LPTimer is 0xFFF0FFFF. | |
System Power Management | |
The Power Management has the following characteristics: MTB_HAL_SYSPM_CB_SYSTEM_NORMAL equates to the Low Power mode MTB_HAL_SYSPM_CB_SYSTEM_LOW equates to the Ultra Low Power mode. | |
TRNG (True Random Number Generator) | |
Initialization polynomial values for the True Random Number Generator. | |
RTC (Real Time Clock) | |
Internally the RTC only stores the year as a two digit BCD value (0-99); no century information is stored. | |
SPI (Serial Peripheral Interface) | |
Macros | |
#define | MTB_HAL_API_VERSION (3) |
Macro specifying the major version number of the HAL API. More... | |
#define MTB_HAL_API_VERSION (3) |
Macro specifying the major version number of the HAL API.
Since there are multiple HAL library implementations, this is not necessarily the same as the major version number of the library. It is instead intended as a single version number that can be used across implementation libraries to know what signatures to use in the case an API is updated in the future. Once an API is available, its API will remain consistant across libraries sharing the same version here.