MPC5748G Flash example code question DisableFlashControllerCache function

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

MPC5748G Flash example code question DisableFlashControllerCache function

ソリューションへジャンプ
2,608件の閲覧回数
MattJCole
Contributor V

I have read through the data sheet for the processor, and I am still do not know what sections in flash the P0_BFEN, P1_BFEN, P2_BFEN control. I know I need to clear the bit before I write to flash and restore the bit after I am done writing to flash. Below are the flash addresses I will be writing to. What flash addresses does P0_BFEN, P1_BFEN, and P2_BFEN control

  1. 0x00FD8000 - 0x00FD8018
  2. 0x00FE0000 - 0x00FE0018
  3. 0x00FF0000 - 0x00FFFFFF
  4. 0x01000000 - 0x012BFFFF
  5. 0x012C0000 - 0x0157FFFF

 

0 件の賞賛
返信
1 解決策
2,566件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

In the past, I got confirmation that it is not necessary to explicitly clear the read line buffers:

“the flash controller samples the prog/erase status sidebands and uses these to automatically clear the read line buffers whenever a program or erase are in progress.”

And there’s this note in reference manuals for the MPC57xx devices which confirms it:

“To clear the flash controller line read buffers, issue an interlock
write command to a valid flash memory address. There will not
be an actual flash program operation performed, but the flash
controller mini-cache will be cleared as a side effect of
executing the command.”

That means the interlock write issued during program/erase operation clears the buffer.

So, it’s safe to remove the functions which disable/restore the buffer.

And to answer your question – you are not configuring PFCRn registers for certain addresses, you are configuring PFCRn registers for bus masters. This table should explain it:

lukaszadrapa_0-1636378067853.png


Regards,
Lukas

元の投稿で解決策を見る

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

Hi,

In the past, I got confirmation that it is not necessary to explicitly clear the read line buffers:

“the flash controller samples the prog/erase status sidebands and uses these to automatically clear the read line buffers whenever a program or erase are in progress.”

And there’s this note in reference manuals for the MPC57xx devices which confirms it:

“To clear the flash controller line read buffers, issue an interlock
write command to a valid flash memory address. There will not
be an actual flash program operation performed, but the flash
controller mini-cache will be cleared as a side effect of
executing the command.”

That means the interlock write issued during program/erase operation clears the buffer.

So, it’s safe to remove the functions which disable/restore the buffer.

And to answer your question – you are not configuring PFCRn registers for certain addresses, you are configuring PFCRn registers for bus masters. This table should explain it:

lukaszadrapa_0-1636378067853.png


Regards,
Lukas

0 件の賞賛
返信
2,562件の閲覧回数
MattJCole
Contributor V

That makes sense. Thought you where controlling the sections of flash you are actually contorting the bus from the processor to flash. One last question. How do you perform an interlock write?  

0 件の賞賛
返信
2,557件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

That's a part of program and erase sequence:

lukaszadrapa_0-1636381217581.png

 

lukaszadrapa_1-1636381235378.png

 

And here is a description how to perform dummy interlock write:

lukaszadrapa_2-1636381317103.png

 

0 件の賞賛
返信