PSOC E8XXGP Device Support Library

| PSOC E8XXGP Device Support Library

Functions
Functions
PDL API Reference » SysClk (System Clock) » Precision Internal Low-Speed Oscillator (PILO)

## General Description

## Functions
void | Cy_SysClk_PiloEnable (void)
| Enables the PILO. More...
bool | Cy_SysClk_PiloIsEnabled (void)
| Reports the Enabled/Disabled status of the PILO. More...
void | Cy_SysClk_PiloDisable (void)
| Disables the PILO. More...

## Function Documentation

## ◆ Cy_SysClk_PiloEnable()

void Cy_SysClk_PiloEnable | ( | void |  | ) |

Enables the PILO.

Note
  This function blocks for 1 millisecond between enabling the PILO and releasing the PILO reset.

Function Usage
  /* Scenario: PILO needs to source the LFCLK. All peripherals clocked by
  the LFCLK are disabled and the Watchdog timer (WDT) is unlocked. */
  /* Enable the PILO. Note: Blocks for 1 millisecond. */
  Cy_SysClk_PiloEnable();
  /* Set the LFCLK source to the PILO */
  Cy_SysClk_ClkLfSetSource(CY_SYSCLK_CLKLF_IN_PILO);
  CY_SYSCLK_CLKLF_IN_PILO
  @ CY_SYSCLK_CLKLF_IN_PILO
  clkLf is sourced by the precision low speed oscillator (PILO)
  Definition: cy_sysclk.h:3994
  Cy_SysClk_ClkLfSetSource
  void Cy_SysClk_ClkLfSetSource(cy_en_clklf_in_sources_t source)
  Sets the source for the low frequency clock(clkLf).
  Definition: cy_sysclk_v2.c:2378
  Cy_SysClk_PiloEnable
  void Cy_SysClk_PiloEnable(void)
  Enables the PILO.
  Definition: cy_sysclk_v2.c:3918

## ◆ Cy_SysClk_PiloIsEnabled()

bool Cy_SysClk_PiloIsEnabled | ( | void |  | ) |

Reports the Enabled/Disabled status of the PILO.

Returns
  Boolean status of PILO: true - Enabled, false - Disabled.

Function Usage
  /* Scenario: LFCLK needs to be sourced by the ILO instead of the PILO. All
  peripherals clocked by the LFCLK are disabled and the Watchdog
  timer (WDT) is unlocked. */
  if (Cy_SysClk_PiloIsEnabled())
  {
  /* Disable the PILO */
  Cy_SysClk_PiloDisable();
  /* Enable the ILO */
  #if (defined (CY_IP_MXS40SRSS) && (CY_IP_MXS40SRSS_VERSION < 2))
  Cy_SysClk_IloEnable();
  #endif
  /* Set the LFCLK source to the ILO */
  Cy_SysClk_ClkLfSetSource(CY_SYSCLK_CLKLF_IN_ILO);
  }
  CY_SYSCLK_CLKLF_IN_ILO
  @ CY_SYSCLK_CLKLF_IN_ILO
  clkLf is sourced by the internal low speed oscillator (ILO)
  Definition: cy_sysclk.h:3998
  Cy_SysClk_PiloIsEnabled
  bool Cy_SysClk_PiloIsEnabled(void)
  Reports the Enabled/Disabled status of the PILO.
  Definition: cy_sysclk_v2.c:3977
  Cy_SysClk_PiloDisable
  void Cy_SysClk_PiloDisable(void)
  Disables the PILO.
  Definition: cy_sysclk_v2.c:3986

## ◆ Cy_SysClk_PiloDisable()

void Cy_SysClk_PiloDisable | ( | void |  | ) |

Disables the PILO.

Function Usage
  /* Scenario: LFCLK needs to be sourced by the ILO instead of the PILO. All
  peripherals clocked by the LFCLK are disabled and the Watchdog
  timer (WDT) is unlocked. */
  if (Cy_SysClk_PiloIsEnabled())
  {
  /* Disable the PILO */
  Cy_SysClk_PiloDisable();
  /* Enable the ILO */
  #if (defined (CY_IP_MXS40SRSS) && (CY_IP_MXS40SRSS_VERSION < 2))
  Cy_SysClk_IloEnable();
  #endif
  /* Set the LFCLK source to the ILO */
  Cy_SysClk_ClkLfSetSource(CY_SYSCLK_CLKLF_IN_ILO);
  }