Flashx, Some more Detail

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

Flashx, Some more Detail

ソリューションへジャンプ
1,560件の閲覧回数
CarlFST60L
Senior Contributor II

Can someone shed some light on exactly what and why these would be used?

 

FLASH_IOCTL_FLUSH_BUFFER

FLASH_IOCTL_ENABLE_BUFFERING

FLASH_IOCTL_ENABLE_SECTOR_CACHE

 

There is some information on these in the MQXIOUG.pdf, but nothing seems to say why these exsist i.e. whats their use? Obviously they are there for a reason...

 

 

 

 

 

0 件の賞賛
1 解決策
530件の閲覧回数
PetrL
NXP Employee
NXP Employee

I will try to explain it.

 

FLASH_IOCTL_ENABLE_BUFFERING, FLASH_IOCTL_DISABLE_BUFFERING, FLASH_IOCTL_FLUSH_BUFFER


  • - in this mode driver internally allocate RAM buffer of FLASH sector size(4KB for MCF52259)
  • - if you writing to flash device writes to same sector are buffered and written to flash at once

 

FLASH_IOCTL_ENABLE_SECTOR_CACHE, FLASH_IOCTL_DISABLE_SECTOR_CACHE


  • - intend of this is RAM saving, but it restrict functionality of driver
  • - when you want to write new data to flash - driver have to store read current content of flash sector to RAM buffer, clear flash sector, modify data in buffer and write it back to flash. For this buffer of Flash sector size is required.
  • - if you know that you will do only listed actions, you do not need RAM buffer

    •  * Incremental write to erased area
    •  * Full sector write
    •  * Partial sector overwrite when the remaining area of

      sector is erased.
  • - this feature can be used e.g.. if you are saving whole parameter structure still on the same place in flash, overwriting all previously stored data.. Then you do not need quite big RAM sector buffer.

 

PetrL


元の投稿で解決策を見る

0 件の賞賛
2 返答(返信)
531件の閲覧回数
PetrL
NXP Employee
NXP Employee

I will try to explain it.

 

FLASH_IOCTL_ENABLE_BUFFERING, FLASH_IOCTL_DISABLE_BUFFERING, FLASH_IOCTL_FLUSH_BUFFER


  • - in this mode driver internally allocate RAM buffer of FLASH sector size(4KB for MCF52259)
  • - if you writing to flash device writes to same sector are buffered and written to flash at once

 

FLASH_IOCTL_ENABLE_SECTOR_CACHE, FLASH_IOCTL_DISABLE_SECTOR_CACHE


  • - intend of this is RAM saving, but it restrict functionality of driver
  • - when you want to write new data to flash - driver have to store read current content of flash sector to RAM buffer, clear flash sector, modify data in buffer and write it back to flash. For this buffer of Flash sector size is required.
  • - if you know that you will do only listed actions, you do not need RAM buffer

    •  * Incremental write to erased area
    •  * Full sector write
    •  * Partial sector overwrite when the remaining area of

      sector is erased.
  • - this feature can be used e.g.. if you are saving whole parameter structure still on the same place in flash, overwriting all previously stored data.. Then you do not need quite big RAM sector buffer.

 

PetrL


0 件の賞賛
530件の閲覧回数
CarlFST60L
Senior Contributor II

Thanks PetrL. 

 

Message Edited by CarlFST60L on 2009-08-11 11:50 PM
0 件の賞賛