Write to 5644 CRC Module register causes processor exception

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

Write to 5644 CRC Module register causes processor exception

Jump to solution
1,083 Views
kentabacchi
Contributor I

With 5644A, writing to CRC_CFG register causes a processor exception.

 

Using the definition of CRC in mpc5644a.h, at address 0xFFE68000

 

 

// For example...

CRC.CFG.B.POLY = 0;

 

Causes a processor exception.  What could be wrong?

Labels (1)
0 Kudos
1 Solution
911 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,


the problem is that CRC registers are not covered by default MMU settings. So, access to the registers leads to bus error and to exception (IVOR1).
Add the following code to your project and it will work. It just creates new MMU page that covers area 0xFFE0_0000 - 0xFFEF_FFFF.

//MMU - TLB6
asm
{
   lis r3, 0x1006
   mtmas0 r3
   lis  r3, 0xC000
   ori  r3, r3, 0x0500
   mtmas1 r3
   lis  r3, 0xFFE0
   ori  r3, r3, 0x000A
   mtmas2 r3
   lis  r3, 0xFFE0
   ori  r3, r3, 0x003F
   mtmas3 r3
   tlbwe    
}

Regards,

Lukas

View solution in original post

3 Replies
911 Views
kentabacchi
Contributor I

Thanks.  Could you please point to where this is documented?

0 Kudos
911 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

the MMU is initialized by BAM code which resides in ROM memory. The same BAM code is used on more devices (not only MPC5644A) for compatibility reasons and also to avoid risk when changing the code. Unfortunately the default MMU settings do not cover CRC module because it is outside the MMU page covering Peripheral Bridge B.

The default MMU settings are:

pastedImage_1.png

But here you can see that CRC module is not covered by TLB entry 0:

pastedImage_2.png

So, it is necessary to adjust the MMU settings...

Regards,

Lukas

0 Kudos
912 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,


the problem is that CRC registers are not covered by default MMU settings. So, access to the registers leads to bus error and to exception (IVOR1).
Add the following code to your project and it will work. It just creates new MMU page that covers area 0xFFE0_0000 - 0xFFEF_FFFF.

//MMU - TLB6
asm
{
   lis r3, 0x1006
   mtmas0 r3
   lis  r3, 0xC000
   ori  r3, r3, 0x0500
   mtmas1 r3
   lis  r3, 0xFFE0
   ori  r3, r3, 0x000A
   mtmas2 r3
   lis  r3, 0xFFE0
   ori  r3, r3, 0x003F
   mtmas3 r3
   tlbwe    
}

Regards,

Lukas