Hello,
I'm afraid that the RED colored Ws would be Rs. Do you agree?
C:\...\<CCSv61_location>\msp430\MSPWare_2_40_00_37\driverlib\driverlib\MSP430FR5xx_6xx\mpu.c
[Ln.137]
void MPU_initThreeSegments(uint16_t baseAddress,
MPU_initThreeSegmentsParam *param)
{
...
[Ln.202]
// Set access rights based on user's selection for segment3
switch(param->seg3accmask)
{
case MPU_EXEC | MPU_READ:
HWREG16(baseAddress + OFS_MPUSAM) &= ~MPUSEG3WE;
HWREG16(baseAddress + OFS_MPUSAM) |= MPUSEG3XE + MPUSEG3RE;
break;
case MPU_READ | MPU_WRITE:
HWREG16(baseAddress + OFS_MPUSAM) &= ~MPUSEG3XE;
HWREG16(baseAddress + OFS_MPUSAM) |= MPUSEG3RE + MPUSEG3WE;
break;
case MPU_READ:
HWREG16(baseAddress + OFS_MPUSAM) &= ~(MPUSEG3XE + MPUSEG3WE);
HWREG16(baseAddress + OFS_MPUSAM) |= MPUSEG3RE;
break;
case MPU_EXEC | MPU_READ | MPU_WRITE:
HWREG16(baseAddress +
OFS_MPUSAM) |= (MPUSEG3XE + MPUSEG3WE + MPUSEG3WE); /* One of the W would be R ? */
break;
case MPU_NO_READ_WRITE_EXEC:
HWREG16(baseAddress +
OFS_MPUSAM) &= ~(MPUSEG3XE + MPUSEG3WE + MPUSEG3WE); /* One of the W would be R ? */
break;
default:
break;
}
//Lock MPU to disable writing to all registers
HWREG8(baseAddress + OFS_MPUCTL0_H) = 0x00;
}