mpc5748g enet d-cache

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

mpc5748g enet d-cache

ソリューションへジャンプ
3,643件の閲覧回数
tomyqg
Contributor II

Hi, everyone!

How to configure the D-cache for memory and put the enet Rx Description and Tx Description in the un-cachable memory space on MPC5748G?

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
3,149件の閲覧回数
tomyqg
Contributor II

Thank you very much, SMPU is the point!

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
3,149件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

data cache can be enabled in this way:

__dcache_cfg:

        e_li r5, 0x2

        mtspr 1010,r5

        e_li r7, 0x4

        e_li r8, 0x2

        e_lis    r11,0xFFFF

        e_or2i    r11,0xFFFB

__dcache_inv:

        mfspr r9, 1010

        and.  r10, r7, r9

        e_beq   __dcache_no_abort

        and.  r10, r11, r9

        mtspr 1010, r10

        e_b __icache_cfg

__dcache_no_abort:

        and.  r10, r8, r9

        e_bne __dcache_inv

        mfspr r5, 1010

        e_ori   r5, r5, 0x0001

        se_isync

        msync

        mtspr 1010, r5

If you want to configure certain address space as cache inhibited, use SMPU module. Simple example for SMPU configuration can be found here:

Example MPC5748G SMPU initialization

"Cache Inhibit" bit CI can be found in Word 3 of the descriptor (register SMPUx_RGDn_WRD3).

Regards,

Lukas

0 件の賞賛
返信
3,150件の閲覧回数
tomyqg
Contributor II

Thank you very much, SMPU is the point!

0 件の賞賛
返信