Flexray memory access Issue

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

Flexray memory access Issue

857 Views
stefintomy
Contributor I

While trying to access flexray memory from Z6 ,it hit on IVOR13 (Data TLB error).Is there any configuration changes required to access those registers from Z6?

from Z0 it is possible to access such registers.

Labels (1)
0 Kudos
2 Replies

756 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

on MPC5668G the Flexray module is connected to peripheral bridge B. This MMU space is not initialized by the BAM after reset and hence must be configured by user software at startup before the peripherals on the bridge can be accessed. This was done on as we did not want the risk associated with making a change to the BAM code. See the code below how to initialize MMU to cover the peripheral bridge.

#TLB4 = pbridgeA

  lis r3, 0x1004

  mtmas0 r3

  lis  r3, 0xC000

  ori  r3, r3, 0x0800

  mtmas1 r3

  lis  r3, 0xC000

  ori  r3, r3, 0x000A

  mtmas2 r3

  lis  r3, 0xC000

  ori  r3, r3, 0x003F

  mtmas3 r3

  tlbwe

This will initialize TLB entry 4. You can take a look at Table 8-3 in reference manual (page 247-248) where the default MMU configuration can be found.

Regards,

Lukas

0 Kudos

756 Views
stefintomy
Contributor I

my tlb is this:-

TlbWrite:

    e_lis    r3,__MAS_CONFIG_START@h

    e_or2i   r3,__MAS_CONFIG_START@l

    e_lis    r0,__MAS_CONFIG_SIZE@h

    e_or2i   r0,__MAS_CONFIG_SIZE@l

  mtctr r0

tlbloop:

  se_lwz r4,0(r3)

  mtspr  624,r4

  se_lwz r4,4(r3)

  mtspr  625,r4

  se_lwz r4,8(r3)

  mtspr  626,r4

  se_lwz r4,12(r3)

  mtspr  627,r4

  lis    r4,0x1000

  ori    r4,r4,0x011E

  mtspr  628,r4

  lis    r4,0x0

  ori    r4,r4,0x0

  mtspr  630,r4

  tlbwe

  addi   r3,r3,16

    bdnz   tlbloop  

in dld:-

__MAS_CONFIG_START = .;

                STORE (0x10030000, 4) STORE (0xC0000500, 4) STORE (0x40000028, 4) STORE (0x4000003F, 4)

                STORE (0x10040000, 4) STORE (0xC0000400, 4) STORE (0x00000028, 4) STORE (0x0000003F, 4)

                STORE (0x10050000, 4) STORE (0xC0000400, 4) STORE (0x00040020, 4) STORE (0x0004003F, 4)

                STORE (0x10060000, 4) STORE (0xC0000400, 4) STORE (0x00080020, 4) STORE (0x0008003F, 4)

                STORE (0x10070000, 4) STORE (0xC0000400, 4) STORE (0x000C0000, 4) STORE (0x000C003F, 4)

                STORE (0x10080000, 4) STORE (0xC0000500, 4) STORE (0x00100000, 4) STORE (0x0010003F, 4)

                STORE (0x10010000, 4) STORE (0x00000900, 4) STORE (0x00000020, 4) STORE (0x0000003F, 4)

                STORE (0x10000000, 4) STORE (0xC0000500, 4) STORE (0xFFF0002A, 4) STORE (0xFFF0003F, 4)

            __MAS_CONFIG_END = .;

            __MAS_CONFIG_SIZE = (__MAS_CONFIG_END - __MAS_CONFIG_START)/16;

i tried to make changes as you said but didn't succeed. could you please look into this....

0 Kudos