This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR5969: highest MPUSEGBx value in lower memory

Part Number: MSP430FR5969

I'm in the process of setting the border address for MPUSEGB1. The idea was to create a protected ROM region from the beginning of ROM (0x4400) to the top (0xFF7F). This would mean setting:

MPUSEGB1 = 0x0FF8;

Unfortunately, I found that for my device, the lower 4 bits of the MPUSEGB register are not user selectable. This means that the closest I can get to the end of ROM is:

MPUSEGB1 = 0x0FF0;

However this also appears to be an invalid setting. Based on debugging and table 9-3 in User Guide, it seems that highest border segment value available in lower memory is:

MPUSEGB1 = 0x0FC0;

Is my understanding of this correct? If so, why enable memory protection but then make it impossible to protect the full ROM region?

  • You should be able to set a boundary of 0x1000 for an address of 0x10000. If that is SEGB1 then memory from 0x10000 and above is in segment 2.

    My gripe is with the resolution. I wanted to protect my code but use the space between it and the vectors for the FreeRTOS heap. With  just 1K resolution on the boundaries I lose most of that top 1K. Fortunately that hasn't been a problem so far.

  • I was planning to exclude the reset vectors in my protected region but I suppose they won't be changing and could also be considered ro.

    I wonder why the resolution is so limited, it certainly seems like it could cause problems for developers.

  • Hi Mike,

    Our MPU module is mainly designed for three divisions:

    Code (Read and Execute), Constants(Read only) and Normal variables(Read and Write).

    And in FR5xx and FR6xx series MCU, their FRAM memory is between 32Bytes and 256Bytes, so in order to ensure that the 16-bit register can achieve address division, at the same time, the accuracy of 1K has been used in almost all occasions, so 1K precision is used in the design. 

    Maybe you can divide more memory into the protection area, or a little less.

    Best Regards

    Johnson

  • Fair enough, thanks for the info.

**Attention** This is a public forum