This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Can't understand the configuration of MPC on M33

Hi 

I can use some help in understanding how to configure MPC for M33. I uses an MPS2+ board with AN505 (IOTKit_CM33). I run the example TrustZone code which is available from uVision Pack installer.

Background: the device AN505 has SSRAM1 (4MB) and SSRAM3 (2MB). SSRAM1 is mapped at 1) 0x0000_0000 - 0x003F_FFFF (NS) 2) 0x0040_0000 - 0x007F_FFFF (NS) 3) 0x1000_0000 - 0x103F_FFFF (S) and 4) 0x1040_0000 - 0x107F_FFFF (S). SSRAM3 is mapped at 1) 0x2820_0000 - 0x283F_FFFF (NS) and 2) 0x3820_0000 - 0x383F_FFFF (S). SSRAM1 has a MPC block size of 128KB. SSRAM3 has a block size of 64KB.

We are configuring half of SSRAM1 to normal world and the whole SSRAM3 to normal world.

The example code shows

This does not make sense to me:

1) SSRAM3 is 2MB. It should have 2048KB/64KB = 32 blocks. So, we should only need 1 BLK_LUT. So, we should set BLK_IDX = 0. But the code set BLK_IDX to 1.

2) In the comment of setting SSRAM1, it says "blk_cnt = 0x10". Is this an error? Shouldn't it be 0x400000/blk_size = 0x20. SInce it is just comment, I guess it does not matter anyway.

I am quite confused here. Thank you in advance for the clarification.

0