GLOBAL_CCU4: Methods

GLOBAL_CCU4

GLOBAL_CCU4
Methods
DAVE_APP_VERSION_t GLOBAL_CCU4_GetAppVersion (void)
 Get GLOBAL_CCU4 APP version.
GLOBAL_CCU4_STATUS_t GLOBAL_CCU4_Init (GLOBAL_CCU4_t *handle)
 Initializes a GLOBAL_CCU4 with generated configuration.
__STATIC_INLINE void GLOBAL_CCU4_SyncStartTriggerHigh (uint32_t ccucon_msk)
 Start all the timers which are configured to start externally on positive edge.

__STATIC_INLINE void GLOBAL_CCU4_SyncStartTriggerLow (uint32_t ccucon_msk)
 Start all the timers which are configured to start externally on negative edge.

Methods


Function Documentation

DAVE_APP_VERSION_t GLOBAL_CCU4_GetAppVersion ( void  )

Get GLOBAL_CCU4 APP version.

Returns:
DAVE_APP_VERSION_t APP version information (major, minor and patch number)
Description:
The function can be used to check application software compatibility with a specific version of the APP.

Example Usage:

 #include <DAVE.h>
 int main(void)
 {
   DAVE_STATUS_t status;
   DAVE_APP_VERSION_t app_version;

   status = DAVE_Init();        // GLOBAL_CCU4_Init() is called from DAVE_Init()

   app_version = GLOBAL_CCU4_GetAppVersion();

   if (app_version.major != 4U)
   {
     // Probably, not the right version.
   }

   while(1U)
   {
   }
   return 1;
 }


Definition at line 70 of file GLOBAL_CCU4.c.

Initializes a GLOBAL_CCU4 with generated configuration.

Parameters:
handlepointer to the GLOBAL_CCU4 APP handle structure.
Returns:
GLOBAL_CCU4_STATUS_t
GLOBAL_CCU4_STATUS_SUCCESS : if initialization is successful
GLOBAL_CCU4_STATUS_FAILURE : if initialization is failed

Description:
  • Enable the module.
  • Start the prescaler.

Example Usage:

 #include <DAVE.h>
 int main(void)
 {
  DAVE_STATUS_t init_status;
  init_status = DAVE_Init();    // GLOBAL_CCU4_Init(&GLOBAL_CCU4_0) will be called from DAVE_Init()

  while(1)
  {
  }
  return 1;
 }


Definition at line 82 of file GLOBAL_CCU4.c.

References GLOBAL_CCU4_STATUS_SUCCESS, GLOBAL_CCU4::is_initialized, GLOBAL_CCU4::mcs_action, and GLOBAL_CCU4::module_ptr.

__STATIC_INLINE void GLOBAL_CCU4_SyncStartTriggerHigh ( uint32_t  ccucon_msk)

Start all the timers which are configured to start externally on positive edge.

Parameters:
ccucon_mskmask for which kernels sync start has to be applied.
Note:
This mask has been generated in the APP handle and as a macro in global_ccu4_conf.h file. 1. The variable from the APP handle is useful while starting the specific kernel/s 2. GLOBAL_CCU4_CCUCON_Msk Macro from global_ccu4_conf.h file can be used to start all the selected kernels at a time.
Return values:
none
Description:
The top level APPs have to be enabled, to start the timer externally with positive trigger edge.

Example Usage:

 #include <DAVE.h>
 int main(void)
 {
   DAVE_STATUS_t status;

   status = DAVE_Init();        // GLOBAL_CCU4_Init() is called from DAVE_Init()

  // Below can be used to start the specific kernels, by generating two instance of APP
  // GLOBAL_CCU4_SyncStartTriggerHigh((uint32_t)(GLOBAL_CCU4_0.syncstart_trigger_msk | GLOBAL_CCU4_1.syncstart_trigger_msk));
  // Below can be used to start all the kernels simultaneously
   GLOBAL_CCU4_SyncStartTriggerHigh(GLOBAL_CCU4_CCUCON_Msk);

   while(1)
   {
   }

   return 1;
 }


Definition at line 245 of file GLOBAL_CCU4.h.

__STATIC_INLINE void GLOBAL_CCU4_SyncStartTriggerLow ( uint32_t  ccucon_msk)

Start all the timers which are configured to start externally on negative edge.

Parameters:
ccucon_mskmask for which kernels sync start has to be applied.
Note:
This mask has been generated in the APP handle and a macro in global_ccu4_conf.h file. 1. The variable from the APP handle is useful while starting the specific kernel/s 2. GLOBAL_CCU4_CCUCON_Msk Macro from global_ccu4_conf.h file can be used to start all the selected kernels at a time.
Return values:
none
Description:
The top level APPs have to be enabled, to start the timer externally with negative trigger edge.

Example Usage:

 #include <DAVE.h>
 int main(void)
 {
   DAVE_STATUS_t status;

   status = DAVE_Init();        // GLOBAL_CCU4_Init() is called from DAVE_Init()

  // Below can be used to start the specific kernels, by generating two instance of APP
  // GLOBAL_CCU4_SyncStartTriggerLow((uint32_t)(GLOBAL_CCU4_0.syncstart_trigger_msk | GLOBAL_CCU4_1.syncstart_trigger_msk));
  // Below can be used to start all the kernels simultaneously
   GLOBAL_CCU4_SyncStartTriggerLow(GLOBAL_CCU4_CCUCON_Msk);

   while(1)
   {
   }

   return 1;
 }


Definition at line 284 of file GLOBAL_CCU4.h.