7 #ifndef __MSP430WARE_MPU_H__
8 #define __MSP430WARE_MPU_H__
10 #include "inc/hw_memmap.h"
12 #ifdef __MSP430_HAS_MPU__
25 #include "inc/hw_memmap.h"
70 #define MPU_READ MPUSEG1RE
71 #define MPU_WRITE MPUSEG1WE
72 #define MPU_EXEC MPUSEG1XE
73 #define MPU_NO_READ_WRITE_EXEC (0x0000)
81 #define MPU_FIRST_SEG MPUSEG1VS
82 #define MPU_SECOND_SEG MPUSEG2VS
83 #define MPU_THIRD_SEG MPUSEG3VS
84 #define MPU_INFO_SEG MPUSEGIVS
94 #define MPU_SEG_1_ACCESS_VIOLATION MPUSEG1IFG
95 #define MPU_SEG_2_ACCESS_VIOLATION MPUSEG2IFG
96 #define MPU_SEG_3_ACCESS_VIOLATION MPUSEG3IFG
97 #define MPU_SEG_INFO_ACCESS_VIOLATION MPUSEGIIFG
138 uint16_t seg1boundary,
140 uint8_t seg2accmask);
217 extern void MPU_start(uint16_t baseAddress);
305 uint16_t memAccFlag);
340 uint16_t memAccFlag);
392 #endif // __MSP430WARE_MPU_H__
uint16_t MPU_clearAllInterrupts(uint16_t baseAddress)
Clears all Memory Segment Access Violation Interrupt Flags.
Definition: mpu.c:278
uint8_t seg2accmask
Definition: mpu.h:49
void MPU_disablePUCOnViolation(uint16_t baseAddress, uint16_t segment)
The following function disables PUC generation when an access violation has occurred on the memory se...
Definition: mpu.c:246
void MPU_enablePUCOnViolation(uint16_t baseAddress, uint16_t segment)
The following function enables PUC generation when an access violation has occurred on the memory seg...
Definition: mpu.c:235
uint8_t seg3accmask
Definition: mpu.h:56
uint16_t MPU_clearInterrupt(uint16_t baseAddress, uint16_t memAccFlag)
Clears the masked interrupt flags.
Definition: mpu.c:264
uint16_t seg2boundary
Valid values can be found in the Family User's Guide.
Definition: mpu.h:35
void MPU_initTwoSegments(uint16_t baseAddress, uint16_t seg1boundary, uint8_t seg1accmask, uint8_t seg2accmask)
Initializes MPU with two memory segments.
Definition: mpu.c:30
void MPU_start(uint16_t baseAddress)
The following function enables the MPU module in the device.
Definition: mpu.c:227
void MPU_enableNMIevent(uint16_t baseAddress)
The following function enables the NMI Event if a Segment violation has occurred. ...
Definition: mpu.c:218
void MPU_initThreeSegments(uint16_t baseAddress, MPU_initThreeSegmentsParam *param)
Initializes MPU with three memory segments.
Definition: mpu.c:100
Used in the MPU_initThreeSegments() function as the param parameter.
Definition: mpu.h:31
uint8_t seg1accmask
Definition: mpu.h:42
uint16_t seg1boundary
Valid values can be found in the Family User's Guide.
Definition: mpu.h:33
void MPU_lockMPU(uint16_t baseAddress)
Lock MPU to protect from write access.
Definition: mpu.c:291
uint16_t MPU_getInterruptStatus(uint16_t baseAddress, uint16_t memAccFlag)
Returns the memory segment violation flag status requested by the user.
Definition: mpu.c:257
void MPU_initInfoSegment(uint16_t baseAddress, uint8_t accmask)
Initializes user information memory segment.
Definition: mpu.c:186