FRDM-K64F MPU doesn't take effect on some addresses

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FRDM-K64F MPU doesn't take effect on some addresses

1,809 Views
jiameng
Contributor II

Hello,

I was trying configure the access permission of peripheral address region (0x40000000 - 0x5FFFFFFF) as RW for privileged mode and No Access for unprivileged mode via MPU (sysmpu). In most cases, accessing to these addresses in unprivileged mode successfully triggered BusFault exception, but I still found a subregion starts from 0x400FF000 can still be accessed by unprivileged mode and never trigger BusFault exception. It seems that MPU does not take effect in that subregion. I konw the address 0x400FF000 is mapped to GPIO, does that mean GPIO can always be accessed regardless of execution mode?

Is there anyone knows the reason?

0 Kudos
2 Replies

1,781 Views
jiameng
Contributor II

Hi EdwinHz,

Thank you for providing the reference manual. I still have some questions about the bit-banding.

1. I investigated the corresponding section, Besides 0x400FF000 for GPIOs, I found the addresses of 0x40000000, 0x40080000 are also bit-band region for AIPS0 and AIPS1 respectively, but accesses to these addresses can be restricted by MPU. Shouldn't they be always accessible since they are also bitbanding?

2. I need to make GPIOs inaccessible by the unprivileged code, is there any way to achieve this goal?

 

Best Regards,

Jiameng

0 Kudos

1,797 Views
EdwinHz
NXP TechSupport
NXP TechSupport

That is correct. This region you mention corresponds to a Bitband region for GPIO, so it should always be accessible. Please check Chapter 4 of the Reference Manual for more information about this. Here’s the link: https://www.nxp.com/webapp/Download?colCode=K64P144M120SF5RM.

0 Kudos