K66 MPU Doesn't Set

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

K66 MPU Doesn't Set

Jump to solution
531 Views
ramazantoprak
Contributor II

Hi,

I have a problem with MPU, MK66FN2M0VLL18. When I try to protect all memory or specific region, protection doesn't set, because I set write protected area, and this area is still unprotected. I didnt understand what is the problem.

could you share MPU example code or document.

MPU_CESR &= ~MPU_CESR_VLD_MASK;

for (i = 0; i < CORTEX_MPU_REC; i++) {
MPU_WORD(i, 2) = 0;
}

_kinetis_mpu_add_region(0, (unsigned char *)0xffffffff, \
MPU_WORD_M1SM(MPU_SM_RWX) | MPU_WORD_M1UM(0) | \
MPU_WORD_M0SM(MPU_SM_RWX) | MPU_WORD_M0UM(0));

MPU_CESR |= MPU_CESR_VLD_MASK;

thank you for your helps.

Best regards.

0 Kudos
1 Solution
415 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi

Please check here to build the KSDK V2.0 software for FRDM-K66F board.
After download the software package, you could find the MPU example code located at below default folder:
..\SDK_2.0_FRDM-K66F\boards\frdmk66f\driver_examples\mpu


Wish it helps.

Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
1 Reply
416 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi

Please check here to build the KSDK V2.0 software for FRDM-K66F board.
After download the software package, you could find the MPU example code located at below default folder:
..\SDK_2.0_FRDM-K66F\boards\frdmk66f\driver_examples\mpu


Wish it helps.

Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos