cancel
Showing results for 
Search instead for 
Did you mean: 

MPU causes unaligned access fault

Lyu.1
Senior

Hi,Master:

MCU: STM32H743II

Question:

I configure the MPU for RAM as follows:

mpu_set_protection( 0x24000000,                 
                    MPU_REGION_SIZE_512KB,      
                    MPU_REGION_NUMBER1,         
                    MPU_REGION_FULL_ACCESS,     
                    MPU_ACCESS_SHAREABLE,      
                    MPU_ACCESS_NOT_CACHEABLE,       
                    MPU_ACCESS_NOT_BUFFERABLE);

 I found that an unaligned access fault is triggered at the location shown in Figure 1. The address shown in Figure 2 is within the MPU configuration range shown in Figure 3, but I do not understand why the fault is triggered.

q1.png

Thank you very much!

1 ACCEPTED SOLUTION

Accepted Solutions
Pavel A.
Super User

Combination TEX=0, C=0 B=0 S=1 means "strongly ordered". It does not allow unaligned access.

 

View solution in original post

2 REPLIES 2
Pavel A.
Super User

Combination TEX=0, C=0 B=0 S=1 means "strongly ordered". It does not allow unaligned access.

 

I re-read the cm7 manual and now understand, thank you so much for your guidance, the guidance was great!