Kinetis SDK v.1.2 Demo Applications User's Guide  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
freemaster_rec.h
Go to the documentation of this file.
1 /******************************************************************************
2 *
3 * Freescale Semiconductor Inc.
4 * (c) Copyright 2004-2010 Freescale Semiconductor
5 * ALL RIGHTS RESERVED.
6 *
7 ****************************************************************************/
19 #ifndef __FREEMASTER_REC_H
20 #define __FREEMASTER_REC_H
21 
22 #ifndef __FREEMASTER_H
23 #error Please include freemaster_rec.h after freemaster.h main header file.
24 #endif
25 
26 #include "freemaster.h"
27 #include "freemaster_private.h"
28 
29 /***********************************
30 * global recorder types
31 ***********************************/
32 
33 /* recorder runtime flags */
34 typedef volatile union
35 {
37 
38  struct
39  {
40  unsigned bIsConfigured : 1; /* recorder is configured */
41  unsigned bIsRunning : 1; /* recorder is running */
42  unsigned bIsStopping : 1; /* trigger activated, sample countdown */
43  unsigned bInvirginCycle : 1; /* virgin cycle of the circular buffer in-progress */
44  unsigned bTrgCrossActive : 1; /* trigger trheshold was crossed */
45  } flg;
46 
48 
49 /* the same flags for optimized asm access (see fast recorder) */
50 #if defined(FMSTR_PLATFORM_56F8xxx) /* flag allocation tested on 56f8xxx only */
51 #define FMSTR_REC_FLAG_bIsConfigured 0x01
52 #define FMSTR_REC_FLAG_bIsRunning 0x02
53 #define FMSTR_REC_FLAG_bIsStopping 0x04
54 #define FMSTR_REC_FLAG_bInvirginCycle 0x08
55 #define FMSTR_REC_FLAG_bTrgCrossActive 0x10
56 #endif
57 
58 /***********************************
59 * global recorder variables
60 ***********************************/
61 
62 /* configuration variables */
63 extern FMSTR_U16 pcm_wRecTotalSmps; /* number of samples to measure */
64 extern FMSTR_U16 pcm_wRecPostTrigger; /* number of post-trigger samples to keep */
65 extern FMSTR_U8 pcm_nRecTriggerMode; /* triger mode (0 = disabled, 1 = _/, 2 = \_) */
66 extern FMSTR_U16 pcm_wRecTimeDiv; /* divisor of recorder "clock" */
67 
68 extern FMSTR_U8 pcm_nRecVarCount; /* number of active recorder variables */
69 extern FMSTR_ADDR pcm_pRecVarAddr[FMSTR_MAX_SCOPE_VARS]; /* addresses of recorded variables */
70 extern FMSTR_SIZE8 pcm_pRecVarSize[FMSTR_MAX_SCOPE_VARS]; /* sizes of recorded variables */
71 
72 /* runtime variables */
73 extern FMSTR_U16 pcm_wRecBuffStartIx; /* first sample index */
74 
75 extern FMSTR_ADDR pcm_dwRecWritePtr; /* write pointer in recorder buffer */
76 extern FMSTR_ADDR pcm_dwRecEndBuffPtr; /* pointer to end of active recorder buffer */
77 extern FMSTR_U16 pcm_wRecTimeDivCtr; /* recorder "clock" divisor counter */
78 extern FMSTR_U16 pcm_wStoprecCountDown; /* post-trigger countdown counter */
79 
81 
82 
83 #endif /* __FREEMASTER_REC_H */
FreeMASTER driver private declarations, used internally by the driver.
FMSTR_REC_FLAGS pcm_wRecFlags
FMSTR_U16 pcm_wRecBuffStartIx
FMSTR_SIZE8 pcm_pRecVarSize[FMSTR_MAX_SCOPE_VARS]
FMSTR_U8 pcm_nRecVarCount
unsigned char FMSTR_SIZE8
Definition: freemaster_Kxx.h:80
FMSTR_U8 pcm_nRecTriggerMode
FMSTR_ADDR pcm_dwRecWritePtr
#define FMSTR_MAX_SCOPE_VARS
Definition: freemaster_private.h:510
FMSTR_U16 pcm_wRecPostTrigger
FMSTR_U16 pcm_wRecTimeDivCtr
FMSTR_U16 pcm_wRecTotalSmps
FMSTR_U16 pcm_wStoprecCountDown
FMSTR_U16 pcm_wRecTimeDiv
unsigned char * FMSTR_ADDR
Definition: freemaster.h:38
Definition: freemaster_rec.h:34
FMSTR_ADDR pcm_dwRecEndBuffPtr
unsigned short FMSTR_U16
Definition: freemaster_Kxx.h:68
FMSTR_FLAGS all
Definition: freemaster_rec.h:36
FMSTR_ADDR pcm_pRecVarAddr[FMSTR_MAX_SCOPE_VARS]
unsigned char FMSTR_FLAGS
Definition: freemaster_Kxx.h:79
FreeMASTER Driver main API header file, Kxx(40/60) platform.
unsigned char FMSTR_U8
Definition: freemaster_Kxx.h:67