mpu_a.h
Go to the documentation of this file.
00001 #ifndef __MSP430WARE_MPUA_H__
00002 #define __MSP430WARE_MPUA_H__
00003 
00004 //*****************************************************************************
00005 //
00006 //The following are the defines to include the required modules for this
00007 //peripheral in msp430xgeneric.h file
00008 //
00009 //*****************************************************************************
00010 #define __MSP430_HAS_MPU_A__
00011 
00012 //*****************************************************************************
00013 //
00014 //The following are values that can be passed to the MPUA_createTwoSegments()
00015 //and MPUA_createThreeSegments  function as the seg1accmask, seg2accmask and
00016 //seg3accmask parameter.
00017 //
00018 //*****************************************************************************
00019 
00020 #define MPUA_READ               MPUSEG1RE
00021 #define MPUA_WRITE              MPUSEG1WE
00022 #define MPUA_EXEC               MPUSEG1XE
00023 
00024 //*****************************************************************************
00025 //
00026 //The following are values that can be passed to the MPUA_createPUConViolation()
00027 //function as the segment parameter.
00028 //
00029 //*****************************************************************************
00030 #define MPUA_FIRST_SEG          MPUSEG1VS
00031 #define MPUA_SECOND_SEG         MPUSEG2VS
00032 #define MPUA_THIRD_SEG          MPUSEG3VS
00033 
00034 
00035 //*****************************************************************************
00036 //
00037 //The following values are used to by createTwoSegments, createThreeSegments
00038 //to check the user has passed a valid segmentation value. This value was
00039 //obtained from the User's Guide
00040 //
00041 //*****************************************************************************
00042 #define MPUA_MAX_SEG_VALUE                              0x13C1
00043 
00044 
00045 #define MPUA_SEG_1_ACCESS_VIOLATION             MPUSEG1IFG
00046 #define MPUA_SEG_2_ACCESS_VIOLATION             MPUSEG2IFG
00047 #define MPUA_SEG_3_ACCESS_VIOLATION             MPUSEG3IFG
00048 
00049 //*****************************************************************************
00050 //
00051 //Prototypes for the APIs.
00052 //
00053 //*****************************************************************************
00054 extern void
00055 MPUA_createTwoSegments
00056 (       unsigned int baseAddress,
00057         unsigned int seg2boundary,
00058         unsigned char seg1accmask,
00059         unsigned char seg2accmask
00060         );
00061 
00062 extern void
00063 MPUA_createThreeSegments
00064 (       unsigned int baseAddress,
00065         unsigned int seg1boundary,
00066         unsigned int seg2boundary,
00067         unsigned char seg1accmask,
00068         unsigned char seg2accmask,
00069         unsigned char seg3accmask
00070         );
00071 
00072 extern void
00073 MPUA_enableNMIevent
00074 (       unsigned int baseAddress
00075         );
00076 
00077 extern void
00078 MPUA_start
00079 (       unsigned int baseAddress
00080         );
00081 
00082 extern void
00083 MPUA_enablePUCOnViolation
00084 (       unsigned int baseAddress,
00085         unsigned int segment
00086         );
00087 
00088 extern void
00089 MPUA_disablePUCOnViolation(unsigned int baseAddress,
00090                 unsigned int segment
00091                 );
00092 extern unsigned short
00093 MPUA_getInterruptStatus
00094 (       unsigned int baseAddress,
00095         unsigned int memAccFlag
00096         );
00097 
00098 extern unsigned short
00099 MPUA_clearInterruptFlag
00100 (       unsigned int baseAddress,
00101         unsigned int memAccFlag
00102         );
00103 
00104 unsigned short
00105 MPUA_clearAllInterruptFlags
00106 (       unsigned int baseAddress
00107         );
00108 
00109 #endif

Copyright 2012, Texas Instruments Incorporated