CAT2 Peripheral Driver Library

Functions

__STATIC_INLINE void Cy_ISOUART_Enable (ISOUART_Type *base)
 Enables the iso UART block. More...
 
__STATIC_INLINE void Cy_ISOUART_Disable (ISOUART_Type *base)
 Disables the iso UART block. More...
 
void Cy_ISOUART_ConfigIORouting (ISOUART_Type *base, bool enInputIflLow, bool enInputIflHigh, bool enInputIfhLow, bool enInputIfhHigh)
 Configure all dedicated iso UART pins as regular GPIOs so that they can be used by other peripheral blocks. More...
 
__STATIC_INLINE void Cy_ISOUART_ConfigureUvd (ISOUART_Type *base, bool isEnable, uint32_t filterLimit)
 Sets up the under voltage detection (UVD) control. More...
 
__STATIC_INLINE void Cy_ISOUART_ResetInterface (ISOUART_Type *base)
 Reset the interface when the interface gets stuck (i.e. More...
 
void Cy_ISOUART_GetInterfaceStatus (ISOUART_Type *base, cy_stc_isouart_interface_status_t *status)
 Get the current state of the interface. More...
 

Detailed Description

Function Documentation

◆ Cy_ISOUART_Enable()

__STATIC_INLINE void Cy_ISOUART_Enable ( ISOUART_Type *  base)

Enables the iso UART block.

Parameters
baseThe base address for the iso UART.
Note
Some registers are cleared when the iso UART block is disabled. For detail, refer to the device reference manual.
This function is valid for both Host and Node.

◆ Cy_ISOUART_Disable()

__STATIC_INLINE void Cy_ISOUART_Disable ( ISOUART_Type *  base)

Disables the iso UART block.

Parameters
baseThe base address for the iso UART.
Note
Some registers are cleared when the iso UART block is disabled. For detail, refer to the device reference manual.
This function is valid for both Host and Node.

◆ Cy_ISOUART_ConfigIORouting()

void Cy_ISOUART_ConfigIORouting ( ISOUART_Type *  base,
bool  enInputIflLow,
bool  enInputIflHigh,
bool  enInputIfhLow,
bool  enInputIfhHigh 
)

Configure all dedicated iso UART pins as regular GPIOs so that they can be used by other peripheral blocks.

Parameters
baseThe base address for the iso UART.
enInputIflLowDetermines whether IFL_L operates as a GPIO input (true) or output (false).
enInputIflHighDetermines whether IFL_H operates as a GPIO input (true) or output (false).
enInputIfhLowDetermines whether IFH_L operates as a GPIO input (true) or output (false).
enInputIfhHighDetermines whether IFH_H operates as a GPIO input (true) or output (false).
Warning
When this function is used, iso UART functionality becomes unavailable.
Note
This function is valid for both Host and Node.
To enable/disable the IO pin setting, call Cy_ISOUART_Enable/Cy_ISOUART_Disable after calling Cy_ISOUART_ConfigIORouting.
To restore all dedicated iso UART pins to iso UART functionality, call Cy_ISOUART_NodeInit or Cy_ISOUART_HostInit.
Function Usage
/* Scenario: Reconfigure dedicated iso UART pins (P4.0-P4.3) as IO pins
* when iso UART functionality is not needed.
*/
/* Configure dedicated iso UART pins as GPIO with specified directions. */
Cy_ISOUART_ConfigIORouting(ISOUART, false, false, true, true);
/* Enable the iso UART block to apply the GPIO mode configuration. */
/* Configure the HSIOM. */
Cy_GPIO_SetHSIOM(AUXIFLL_PORT, AUXIFLL_PIN, AUXIFLL_GPIO);
Cy_GPIO_SetHSIOM(AUXIFLH_PORT, AUXIFLH_PIN, AUXIFLH_GPIO);
Cy_GPIO_SetHSIOM(AUXIFHL_PORT, AUXIFHL_PIN, AUXIFHL_GPIO);
Cy_GPIO_SetHSIOM(AUXIFHH_PORT, AUXIFHH_PIN, AUXIFHH_GPIO);
/* After configuration, these pins can be used as IOs. */
Cy_GPIO_Write(AUXIFLL_PORT, AUXIFLL_PIN, 1U); /* Write to output pin */
uint32_t value = Cy_GPIO_Read(AUXIFHL_PORT, AUXIFHL_PIN); /* Read from input pin */

◆ Cy_ISOUART_ConfigureUvd()

__STATIC_INLINE void Cy_ISOUART_ConfigureUvd ( ISOUART_Type *  base,
bool  isEnable,
uint32_t  filterLimit 
)

Sets up the under voltage detection (UVD) control.

Parameters
baseThe base address for the iso UART.
isEnableIf true, enables the UVD.
filterLimitThe glitch filter counter limit for the UVD. Each count corresponds to 1/clk_hf seconds. Max value is 0x4B0, the default value is 0x2D0.
Note
This function is valid for both Host and Node.

◆ Cy_ISOUART_ResetInterface()

__STATIC_INLINE void Cy_ISOUART_ResetInterface ( ISOUART_Type *  base)

Reset the interface when the interface gets stuck (i.e.

when a node fails to respond). After resetting, the followings occur:

  • Host clears the MASTER_START register to prepare for another transaction. The internal regulator is disabled. It's re-enabled when next command is sent.
  • Node moves the interface back to IDLE state and the internal regulator is disabled. Need wakeup sequence reception again to wakeup iso UART interface.
    Parameters
    baseThe base address for the iso UART.
    Note
    This function is valid for both Host and Node.

◆ Cy_ISOUART_GetInterfaceStatus()

void Cy_ISOUART_GetInterfaceStatus ( ISOUART_Type *  base,
cy_stc_isouart_interface_status_t status 
)

Get the current state of the interface.

Performs a single register read and decodes all fields. Hardware is not latched or cleared. Some fields in the structure are only meaningful in certain interface states (see cy_stc_isouart_interface_status_t for details).

Parameters
baseThe base address for the iso UART.
statusPointer to a status structure to be filled.
Note
This function is valid for both Host and Node.