ISF  2.1
Intelligent Sensing Framework for Kinetis with Processor Expert
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
BMTimer1 module documentation

Data Structures

struct  BMTimer1_TDeviceData
 

Macros

#define AVAILABLE_EVENTS_MASK   (LDD_TEventMask)(LDD_TIMERUNIT_ON_COUNTER_RESTART)
 
#define __BWUserType_BMTimer1_TValueType
 
#define BMTimer1_CNT_INP_FREQ_U_0   0x016E3600UL /* Counter input frequency in Hz */
 
#define BMTimer1_CNT_INP_FREQ_R_0   23999808.00153599F /* Counter input frequency in Hz */
 
#define BMTimer1_CNT_INP_FREQ_COUNT   0U /* Count of predefined counter input frequencies */
 
#define BMTimer1_PERIOD_TICKS   0x016E3600UL /* Initialization value of period in 'counter ticks' */
 
#define BMTimer1_NUMBER_OF_CHANNELS   0x00U /* Count of predefined channels */
 
#define BMTimer1_COUNTER_WIDTH   0x20U /* Counter width in bits */
 
#define BMTimer1_COUNTER_DIR   DIR_DOWN /* Direction of counting */
 
#define BMTimer1_PRPH_BASE_ADDRESS   0x40037000U
 
#define BMTimer1_Init_METHOD_ENABLED
 
#define BMTimer1_Deinit_METHOD_ENABLED
 
#define BMTimer1_Enable_METHOD_ENABLED
 
#define BMTimer1_Disable_METHOD_ENABLED
 
#define BMTimer1_SetPeriodTicks_METHOD_ENABLED
 
#define BMTimer1_GetPeriodTicks_METHOD_ENABLED
 
#define BMTimer1_ResetCounter_METHOD_ENABLED
 
#define BMTimer1_GetCounterValue_METHOD_ENABLED
 
#define BMTimer1_OnCounterRestart_EVENT_ENABLED
 

Typedefs

typedef BMTimer1_TDeviceDataBMTimer1_TDeviceDataPtr
 
typedef uint32_t BMTimer1_TValueType
 

Functions

LDD_TDeviceData * BMTimer1_Init (LDD_TUserData *UserDataPtr)
 Initializes the device. Allocates memory for the device data structure, allocates interrupt vectors and sets interrupt priority, sets pin routing, sets timing, etc. If the property ["Enable in init. code"] is set to "yes" value then the device is also enabled (see the description of the [Enable] method). In this case the [Enable] method is not necessary and needn't to be generated. This method can be called only once. Before the second call of Init the [Deinit] must be called first. More...
 
void BMTimer1_Deinit (LDD_TDeviceData *DeviceDataPtr)
 Deinitializes the device. Switches off the device, frees the device data structure memory, interrupts vectors, etc. More...
 
LDD_TError BMTimer1_Enable (LDD_TDeviceData *DeviceDataPtr)
 Enables the component - it starts the signal generation. Events may be generated (see SetEventMask). The method is not available if the counter can't be disabled/enabled by HW. More...
 
LDD_TError BMTimer1_Disable (LDD_TDeviceData *DeviceDataPtr)
 Disables the component - it stops signal generation and events calling. The method is not available if the counter can't be disabled/enabled by HW. More...
 
LDD_TError BMTimer1_SetPeriodTicks (LDD_TDeviceData *DeviceDataPtr, BMTimer1_TValueType Ticks)
 The method sets timer re-initialization period (in timer ticks). This method is available only if the property ["Counter restart"] is switched to 'on-match' value. More...
 
LDD_TError BMTimer1_GetPeriodTicks (LDD_TDeviceData *DeviceDataPtr, BMTimer1_TValueType *TicksPtr)
 Returns the number of counter ticks before re-initialization. See also method [SetPeriodTicks]. This method is available only if the property ["Counter restart"] is switched to 'on-match' value. More...
 
LDD_TError BMTimer1_ResetCounter (LDD_TDeviceData *DeviceDataPtr)
 Resets counter. If counter is counting up then it is set to zero. If counter is counting down then counter is updated to the reload value. The method is not available if HW doesn't allow resetting of the counter. More...
 
BMTimer1_TValueType BMTimer1_GetCounterValue (LDD_TDeviceData *DeviceDataPtr)
 Returns the content of counter register. This method can be used both if counter is enabled and if counter is disabled. The method is not available if HW doesn't allow reading of the counter. More...
 
void BMTimer1_Interrupt (LDD_RTOS_TISRParameter _isrParameter)
 

Detailed Description

Macro Definition Documentation

#define __BWUserType_BMTimer1_TValueType

Definition at line 125 of file BMTimer1.h.

#define AVAILABLE_EVENTS_MASK   (LDD_TEventMask)(LDD_TIMERUNIT_ON_COUNTER_RESTART)

Definition at line 128 of file BMTimer1.c.

#define BMTimer1_CNT_INP_FREQ_COUNT   0U /* Count of predefined counter input frequencies */

Definition at line 130 of file BMTimer1.h.

#define BMTimer1_CNT_INP_FREQ_R_0   23999808.00153599F /* Counter input frequency in Hz */

Definition at line 129 of file BMTimer1.h.

#define BMTimer1_CNT_INP_FREQ_U_0   0x016E3600UL /* Counter input frequency in Hz */

Definition at line 128 of file BMTimer1.h.

#define BMTimer1_COUNTER_DIR   DIR_DOWN /* Direction of counting */

Definition at line 134 of file BMTimer1.h.

#define BMTimer1_COUNTER_WIDTH   0x20U /* Counter width in bits */

Definition at line 133 of file BMTimer1.h.

#define BMTimer1_Deinit_METHOD_ENABLED

Deinit method of the component BMTimer1 is enabled (generated)

Definition at line 140 of file BMTimer1.h.

#define BMTimer1_Disable_METHOD_ENABLED

Disable method of the component BMTimer1 is enabled (generated)

Definition at line 142 of file BMTimer1.h.

#define BMTimer1_Enable_METHOD_ENABLED

Enable method of the component BMTimer1 is enabled (generated)

Definition at line 141 of file BMTimer1.h.

#define BMTimer1_GetCounterValue_METHOD_ENABLED

GetCounterValue method of the component BMTimer1 is enabled (generated)

Definition at line 146 of file BMTimer1.h.

#define BMTimer1_GetPeriodTicks_METHOD_ENABLED

GetPeriodTicks method of the component BMTimer1 is enabled (generated)

Definition at line 144 of file BMTimer1.h.

#define BMTimer1_Init_METHOD_ENABLED

Init method of the component BMTimer1 is enabled (generated)

Definition at line 139 of file BMTimer1.h.

#define BMTimer1_NUMBER_OF_CHANNELS   0x00U /* Count of predefined channels */

Definition at line 132 of file BMTimer1.h.

#define BMTimer1_OnCounterRestart_EVENT_ENABLED

OnCounterRestart event of the component BMTimer1 is enabled (generated)

Definition at line 149 of file BMTimer1.h.

#define BMTimer1_PERIOD_TICKS   0x016E3600UL /* Initialization value of period in 'counter ticks' */

Definition at line 131 of file BMTimer1.h.

#define BMTimer1_PRPH_BASE_ADDRESS   0x40037000U

Peripheral base address of a device allocated by the component. This constant can be used directly in PDD macros.

Definition at line 136 of file BMTimer1.h.

#define BMTimer1_ResetCounter_METHOD_ENABLED

ResetCounter method of the component BMTimer1 is enabled (generated)

Definition at line 145 of file BMTimer1.h.

#define BMTimer1_SetPeriodTicks_METHOD_ENABLED

SetPeriodTicks method of the component BMTimer1 is enabled (generated)

Definition at line 143 of file BMTimer1.h.

Typedef Documentation

Definition at line 123 of file BMTimer1.c.

typedef uint32_t BMTimer1_TValueType

Definition at line 126 of file BMTimer1.h.

Function Documentation

void BMTimer1_Deinit ( LDD_TDeviceData *  DeviceDataPtr)

Deinitializes the device. Switches off the device, frees the device data structure memory, interrupts vectors, etc.

Parameters
DeviceDataPtr- Device data structure pointer returned by Init method

Definition at line 201 of file BMTimer1.c.

LDD_TError BMTimer1_Disable ( LDD_TDeviceData *  DeviceDataPtr)

Disables the component - it stops signal generation and events calling. The method is not available if the counter can't be disabled/enabled by HW.

Parameters
DeviceDataPtr- Device data structure pointer returned by [Init] method.
Returns
  • Error code, possible codes: ERR_OK - OK ERR_SPEED - The component does not work in the active clock configuration

Definition at line 263 of file BMTimer1.c.

LDD_TError BMTimer1_Enable ( LDD_TDeviceData *  DeviceDataPtr)

Enables the component - it starts the signal generation. Events may be generated (see SetEventMask). The method is not available if the counter can't be disabled/enabled by HW.

Parameters
DeviceDataPtr- Device data structure pointer returned by [Init] method.
Returns
  • Error code, possible codes: ERR_OK - OK ERR_SPEED - The component does not work in the active clock configuration

Definition at line 237 of file BMTimer1.c.

BMTimer1_TValueType BMTimer1_GetCounterValue ( LDD_TDeviceData *  DeviceDataPtr)

Returns the content of counter register. This method can be used both if counter is enabled and if counter is disabled. The method is not available if HW doesn't allow reading of the counter.

Parameters
DeviceDataPtr- Device data structure pointer returned by [Init] method.
Returns
  • Counter value (number of counted ticks).

Definition at line 387 of file BMTimer1.c.

LDD_TError BMTimer1_GetPeriodTicks ( LDD_TDeviceData *  DeviceDataPtr,
BMTimer1_TValueType TicksPtr 
)

Returns the number of counter ticks before re-initialization. See also method [SetPeriodTicks]. This method is available only if the property ["Counter restart"] is switched to 'on-match' value.

Parameters
DeviceDataPtr- Device data structure pointer returned by [Init] method.
TicksPtr- Pointer to return value of the number of counter ticks before re-initialization
Returns
  • Error code, possible codes: ERR_OK - OK ERR_SPEED - The component does not work in the active clock configuration

Definition at line 328 of file BMTimer1.c.

LDD_TDeviceData * BMTimer1_Init ( LDD_TUserData *  UserDataPtr)

Initializes the device. Allocates memory for the device data structure, allocates interrupt vectors and sets interrupt priority, sets pin routing, sets timing, etc. If the property ["Enable in init. code"] is set to "yes" value then the device is also enabled (see the description of the [Enable] method). In this case the [Enable] method is not necessary and needn't to be generated. This method can be called only once. Before the second call of Init the [Deinit] must be called first.

Parameters
UserDataPtr- Pointer to the user or RTOS specific data. This pointer will be passed as an event or callback parameter.
Returns
  • Pointer to the dynamically allocated private structure or NULL if there was an error.

Definition at line 155 of file BMTimer1.c.

References BMTimer1_Interrupt(), BMTimer1_TDeviceData::SavedISRSettings_TUInterrupt, and BMTimer1_TDeviceData::UserDataPtr.

Here is the call graph for this function:

void BMTimer1_Interrupt ( LDD_RTOS_TISRParameter  _isrParameter)

Definition at line 403 of file BMTimer1.c.

References BMTimer1_OnCounterRestart(), and BMTimer1_TDeviceData::UserDataPtr.

Referenced by BMTimer1_Init().

Here is the call graph for this function:

Here is the caller graph for this function:

LDD_TError BMTimer1_ResetCounter ( LDD_TDeviceData *  DeviceDataPtr)

Resets counter. If counter is counting up then it is set to zero. If counter is counting down then counter is updated to the reload value. The method is not available if HW doesn't allow resetting of the counter.

Parameters
DeviceDataPtr- Device data structure pointer returned by [Init] method.
Returns
  • Error code, possible codes: ERR_OK - OK ERR_SPEED - The component does not work in the active clock configuration

Definition at line 356 of file BMTimer1.c.

LDD_TError BMTimer1_SetPeriodTicks ( LDD_TDeviceData *  DeviceDataPtr,
BMTimer1_TValueType  Ticks 
)

The method sets timer re-initialization period (in timer ticks). This method is available only if the property ["Counter restart"] is switched to 'on-match' value.

Parameters
DeviceDataPtr- Device data structure pointer returned by [Init] method.
Ticks- Number of counter ticks before counter re-initialization. Value 0 means maximal period value the same as "free-running mode", e.g. counter overflow or underflow without any explicit re-initialization.
Returns
  • Error code, possible codes: ERR_OK - OK ERR_PARAM_TICKS - Ticks parameter is out of possible range. ERR_SPEED - The component does not work in the active clock configuration

Definition at line 297 of file BMTimer1.c.