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?