CLOCK_XMC4: CLOCK_XMC4.c File Reference

CLOCK XMC4

CLOCK_XMC4
CLOCK_XMC4.c File Reference

Detailed Description

Date:
2016-07-08

NOTE: This file is generated by DAVE. Any manual modification done to this file will be lost when the code is regenerated.

Definition in file CLOCK_XMC4.c.

#include "clock_xmc4.h"

Functions

DAVE_APP_VERSION_t CLOCK_XMC4_GetAppVersion (void)
 Get CLOCK_XMC4 APP version.
CLOCK_XMC4_STATUS_t CLOCK_XMC4_Init (CLOCK_XMC4_t *handle)
 Initializes a CLOCK_XMC4 APP instance.
uint32_t OSCHP_GetFrequency (void)
 This is a non-weak function, which retrieves high precision external oscillator frequency.
Note: This function is used by xmc4_scu LLD for internal operations. Therefore the user do not required to call this API explicitly.
void CLOCK_XMC4_StepSystemPllFrequency (uint32_t kdiv)
 API for ramping down the system PLL clock frequency.

Function Documentation

CLOCK_XMC4_STATUS_t CLOCK_XMC4_Init ( CLOCK_XMC4_t handle)

Initializes a CLOCK_XMC4 APP instance.

Parameters:
handleaddress of CLOCK_XMC4 APP handler
Returns:
CLOCK_XMC4_STATUS_SUCCESS : if initialization is successful
CLOCK_XMC4_STATUS_FAILURE : if initialization is failed
Description:
CLOCK_XMC4_Init API is called during initialization of DAVE APPS. This API Initializes NMI TRAP Configuration.
Example Usage:
 #include <DAVE.h>

 int main(void)
 {
   DAVE_STATUS_t status;

   status = DAVE_Init();  //  CLOCK_XMC4_Init API is called during initialization of DAVE APPS
   if(DAVE_STATUS_SUCCESS == status)
   {
    // user code

     while(1)
     {

     }
   }
   return (1);
 }


Definition at line 96 of file CLOCK_XMC4.c.

References CLOCK_XMC4_STATUS_SUCCESS, and CLOCK_XMC4::init_status.

void CLOCK_XMC4_StepSystemPllFrequency ( uint32_t  kdiv)

API for ramping down the system PLL clock frequency.

Parameters:
kdivPLL output divider K2DIV. Range: 1 to 128. Represents (K2DIV+1).
Returns:
none
Description:
The function can be used for ramping down the system PLL clock frequency.

Example Usage:

 #include <DAVE.h>

 int main(void)
 {
   DAVE_STATUS_t init_status;
   uint32_t kdiv = 10U;  // (K2DIV+1) value for scaling down the system PLL clock frequency
   // Initialize CLOCK_XMC4 APP:
   // SystemCoreClockSetup() is called from SystemInit().
   init_status = DAVE_Init();
  if(DAVE_STATUS_SUCCESS == init_status)
  {
    // More code here


    // User decided to reduce the system power consumption by scaling down the system PLL clock frequency
    CLOCK_XMC4_StepSystemPllFrequency(kdiv); // fPLL frequency is scaling down by K2DIV factor.


    // More code here
    while(1) {

    }
  }
  return (1);
 }


Definition at line 116 of file CLOCK_XMC4.c.

uint32_t OSCHP_GetFrequency ( void  )

This is a non-weak function, which retrieves high precision external oscillator frequency.
Note: This function is used by xmc4_scu LLD for internal operations. Therefore the user do not required to call this API explicitly.

Returns:
uint32_t Range: 4 to 25 in External Crystal Mode, 4 to 40 in External External Direct Input Mode.
Description:
This function to retrieves the external high precision oscillator frequency value, derived from either "External Crystal Mode" or "External Direct Input Mode"

Definition at line 109 of file CLOCK_XMC4.c.

Go to the source code of this file.