MTB CAT1 Peripheral driver library

General Description

Functions

void Cy_SysClk_MfoEnable (bool deepSleepEnable)
 Enables the MFO. More...
 
bool Cy_SysClk_MfoIsEnabled (void)
 Reports whether MFO is enabled or not. More...
 
void Cy_SysClk_MfoDisable (void)
 Disables the MFO. More...
 
void Cy_SysClk_ClkMfEnable (void)
 Enables the CLK_MF. More...
 
bool Cy_SysClk_ClkMfIsEnabled (void)
 Reports whether CLK_MF is enabled or not. More...
 
void Cy_SysClk_ClkMfDisable (void)
 Disables the CLK_MF. More...
 
void Cy_SysClk_ClkMfSetDivider (uint32_t divider)
 Sets the clock divider for CLK_MF. More...
 
uint32_t Cy_SysClk_ClkMfGetDivider (void)
 Returns the clock divider of CLK_MF. More...
 
uint32_t Cy_SysClk_ClkMfGetFrequency (void)
 Reports the output clock signal frequency of CLK_MF. More...
 
void Cy_SysClk_ClkMfSetSource (cy_en_clkmf_in_sources_t source)
 Sets the source for the Medium frequency clock(clkMf). More...
 
cy_en_clkmf_in_sources_t Cy_SysClk_ClkMfGetSource (void)
 Reports the source for the Medium frequency clock (clkMf). More...
 

Function Documentation

◆ Cy_SysClk_MfoEnable()

void Cy_SysClk_MfoEnable ( bool  deepSleepEnable)

Enables the MFO.

Parameters
deepSleepEnableenables MFO operation is Deep Sleep low power mode.
Function Usage
/* Scenario: MFO is needed to source LCD with 1MHz in Deep Sleep mode. */
Cy_SysClk_MfoEnable(true); /* Enable MFO with Deep Sleep operation */
if (Cy_SysClk_ClkMfIsEnabled()) /* If CLK_MF is already enabled */
{
Cy_SysClk_ClkMfDisable(); /* Disable CLK_MF */
}
if (2UL != Cy_SysClk_ClkMfGetDivider()) /* Check the divider */
{
Cy_SysClk_ClkMfSetDivider(2UL); /* Set CLK_MF divider */
}
Cy_SysClk_ClkMfEnable(); /* Enable CLK_MF */
/* Check the CLK_MF frequency */
uint32_t clkMfreq = Cy_SysClk_ClkMfGetFrequency();

◆ Cy_SysClk_MfoIsEnabled()

bool Cy_SysClk_MfoIsEnabled ( void  )

Reports whether MFO is enabled or not.

Returns
false - disabled
true - enabled
Function Usage
/* Scenario: MFO is not more needed so could be disabled. */
Cy_SysClk_ClkMfDisable(); /* Disable CLK_MF */
if (Cy_SysClk_MfoIsEnabled()) /* If MFO enabled */
{
Cy_SysClk_MfoDisable(); /* Disable MF0 */
}

◆ Cy_SysClk_MfoDisable()

void Cy_SysClk_MfoDisable ( void  )

Disables the MFO.

Function Usage
/* Scenario: MFO is not more needed so could be disabled. */
Cy_SysClk_ClkMfDisable(); /* Disable CLK_MF */
if (Cy_SysClk_MfoIsEnabled()) /* If MFO enabled */
{
Cy_SysClk_MfoDisable(); /* Disable MF0 */
}

◆ Cy_SysClk_ClkMfEnable()

void Cy_SysClk_ClkMfEnable ( void  )

Enables the CLK_MF.

Function Usage
/* Scenario: MFO is needed to source LCD with 1MHz in Deep Sleep mode. */
Cy_SysClk_MfoEnable(true); /* Enable MFO with Deep Sleep operation */
if (Cy_SysClk_ClkMfIsEnabled()) /* If CLK_MF is already enabled */
{
Cy_SysClk_ClkMfDisable(); /* Disable CLK_MF */
}
if (2UL != Cy_SysClk_ClkMfGetDivider()) /* Check the divider */
{
Cy_SysClk_ClkMfSetDivider(2UL); /* Set CLK_MF divider */
}
Cy_SysClk_ClkMfEnable(); /* Enable CLK_MF */
/* Check the CLK_MF frequency */
uint32_t clkMfreq = Cy_SysClk_ClkMfGetFrequency();

◆ Cy_SysClk_ClkMfIsEnabled()

bool Cy_SysClk_ClkMfIsEnabled ( void  )

Reports whether CLK_MF is enabled or not.

Returns
false - disabled
true - enabled
Note
This API is available for CAT1A and CAT1B devices.
Function Usage
/* Scenario: MFO is needed to source LCD with 1MHz in Deep Sleep mode. */
Cy_SysClk_MfoEnable(true); /* Enable MFO with Deep Sleep operation */
if (Cy_SysClk_ClkMfIsEnabled()) /* If CLK_MF is already enabled */
{
Cy_SysClk_ClkMfDisable(); /* Disable CLK_MF */
}
if (2UL != Cy_SysClk_ClkMfGetDivider()) /* Check the divider */
{
Cy_SysClk_ClkMfSetDivider(2UL); /* Set CLK_MF divider */
}
Cy_SysClk_ClkMfEnable(); /* Enable CLK_MF */
/* Check the CLK_MF frequency */
uint32_t clkMfreq = Cy_SysClk_ClkMfGetFrequency();

◆ Cy_SysClk_ClkMfDisable()

void Cy_SysClk_ClkMfDisable ( void  )

Disables the CLK_MF.

Note
This API is available for CAT1A and CAT1B devices.
Function Usage
/* Scenario: MFO is not more needed so could be disabled. */
Cy_SysClk_ClkMfDisable(); /* Disable CLK_MF */
if (Cy_SysClk_MfoIsEnabled()) /* If MFO enabled */
{
Cy_SysClk_MfoDisable(); /* Disable MF0 */
}

◆ Cy_SysClk_ClkMfSetDivider()

void Cy_SysClk_ClkMfSetDivider ( uint32_t  divider)

Sets the clock divider for CLK_MF.

Precondition
If the CLK_MF is already enabled - it should be disabled prior to use this function by Cy_SysClk_ClkMfDisable.
Parameters
dividerdivider value between 1 and 256.
Note
This API is available for CAT1A and CAT1B devices.
Function Usage
/* Scenario: MFO is needed to source LCD with 1MHz in Deep Sleep mode. */
Cy_SysClk_MfoEnable(true); /* Enable MFO with Deep Sleep operation */
if (Cy_SysClk_ClkMfIsEnabled()) /* If CLK_MF is already enabled */
{
Cy_SysClk_ClkMfDisable(); /* Disable CLK_MF */
}
if (2UL != Cy_SysClk_ClkMfGetDivider()) /* Check the divider */
{
Cy_SysClk_ClkMfSetDivider(2UL); /* Set CLK_MF divider */
}
Cy_SysClk_ClkMfEnable(); /* Enable CLK_MF */
/* Check the CLK_MF frequency */
uint32_t clkMfreq = Cy_SysClk_ClkMfGetFrequency();

◆ Cy_SysClk_ClkMfGetDivider()

uint32_t Cy_SysClk_ClkMfGetDivider ( void  )

Returns the clock divider of CLK_MF.

Returns
divider value in range 1..256.
Note
This API is available for CAT1A and CAT1B devices.
Function Usage
/* Scenario: MFO is needed to source LCD with 1MHz in Deep Sleep mode. */
Cy_SysClk_MfoEnable(true); /* Enable MFO with Deep Sleep operation */
if (Cy_SysClk_ClkMfIsEnabled()) /* If CLK_MF is already enabled */
{
Cy_SysClk_ClkMfDisable(); /* Disable CLK_MF */
}
if (2UL != Cy_SysClk_ClkMfGetDivider()) /* Check the divider */
{
Cy_SysClk_ClkMfSetDivider(2UL); /* Set CLK_MF divider */
}
Cy_SysClk_ClkMfEnable(); /* Enable CLK_MF */
/* Check the CLK_MF frequency */
uint32_t clkMfreq = Cy_SysClk_ClkMfGetFrequency();

◆ Cy_SysClk_ClkMfGetFrequency()

uint32_t Cy_SysClk_ClkMfGetFrequency ( void  )

Reports the output clock signal frequency of CLK_MF.

Returns
The frequency, in Hz.
Note
This API is available for CAT1A and CAT1B devices.
Function Usage
/* Scenario: MFO is needed to source LCD with 1MHz in Deep Sleep mode. */
Cy_SysClk_MfoEnable(true); /* Enable MFO with Deep Sleep operation */
if (Cy_SysClk_ClkMfIsEnabled()) /* If CLK_MF is already enabled */
{
Cy_SysClk_ClkMfDisable(); /* Disable CLK_MF */
}
if (2UL != Cy_SysClk_ClkMfGetDivider()) /* Check the divider */
{
Cy_SysClk_ClkMfSetDivider(2UL); /* Set CLK_MF divider */
}
Cy_SysClk_ClkMfEnable(); /* Enable CLK_MF */
/* Check the CLK_MF frequency */
uint32_t clkMfreq = Cy_SysClk_ClkMfGetFrequency();

◆ Cy_SysClk_ClkMfSetSource()

void Cy_SysClk_ClkMfSetSource ( cy_en_clkmf_in_sources_t  source)

Sets the source for the Medium frequency clock(clkMf).

Parameters
sourcecy_en_clkmf_in_sources_t
Note
This API is available for CAT1B devices.

◆ Cy_SysClk_ClkMfGetSource()

cy_en_clkmf_in_sources_t Cy_SysClk_ClkMfGetSource ( void  )

Reports the source for the Medium frequency clock (clkMf).

Returns
cy_en_clkmf_in_sources_t
Note
This API is available for CAT1B devices.