mpc5644a MMU setup

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

mpc5644a MMU setup

1,382件の閲覧回数
yangzhao
Contributor I

Dear FAE,

        I Want to set up MMU of mpc5644a,  the complier is WR Diab v5.9.3,  after startup code(crt0.s), i try to initial the TLBs

as below, but it run with error to exception after first call CalcTLBEntry, the protype of function is as attached.

my question :

              (1)  what i need to do before  initial MMU in crt0.s?

              (2) about the problem , is any suggestion?

thanks for your reply!

        

void main(void)
{
           CalcTLBEntry (TLBNr0, TLBValid, PorcessID0, TS0, Size64KByte , 0x00000000, 0x00000000, 0);//first 64kb
          CalcTLBEntry (TLBNr1, TLBValid, PorcessID0, TS0, Size64KByte , 0x00010000, 0x00010000, 0);
           CalcTLBEntry (TLBNr2, TLBValid, PorcessID0, TS0, Size64KByte , 0x00020000, 0x00020000, 0);
           CalcTLBEntry (TLBNr3, TLBValid, PorcessID0, TS0, Size64KByte , 0x00030000, 0x00030000, 1);//for Cal_RP
           
           
          CalcTLBEntry (TLBNr4, TLBValid, PorcessID0, TS0, Size256KByte , 0x00040000, 0x00040000, 1);//
           CalcTLBEntry (TLBNr5, TLBValid, PorcessID0, TS0, Size256KByte , 0x00080000, 0x00080000, 1);//
          CalcTLBEntry (TLBNr6, TLBValid, PorcessID0, TS0, Size256KByte , 0x000C0000, 0x000C0000, 1);//
           
           CalcTLBEntry (TLBNr7, TLBValid, PorcessID0, TS0, Size1MByte , 0x00100000, 0x00100000, 1);//
          CalcTLBEntry (TLBNr8, TLBValid, PorcessID0, TS0, Size256KByte , 0x40000000, 0x40000000, 1);//???? not sure

0 件の賞賛
返信
1 返信

1,261件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

MMU is already initialized by BAM. You can find default configuration in the reference manual:

pastedImage_1.png

If you are going the reconfigure the TLB entries, you need to be aware of these settings. MMU is active all the time, it can't be disabled. So, you must be very careful to not cut a branch you are sitting on.

Where does it crash exactly? And where the code is running from (which address)?

Regards,

Lukas

0 件の賞賛
返信