µTasker Forum
June 19, 2013, 07:10:42 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: March 2012: uTasker KINETIS and STM32 release versions available.
Follow uTasker updates at www.twitter.com/uTasker !!

Online Forum registration has now been disabled. Please send an email to an address at the bottom of the home page with your preferred user name and email address if you would like an account.
 
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: SPI_DATA_FLASH  (Read 602 times)
hervé
Jr. Member
**
Offline Offline

Posts: 98


View Profile
« on: March 05, 2012, 05:53:27 PM »

Hi Mark,

I need to use two differents SPI FLASH memories, they have different block size

Even if I set SPI_FLASH_MULTIPLE_CHIPS, How can I manage to have different FILE_GRANULARITY for each memory ?

Thanks
Logged
mark
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2479



View Profile WWW
« Reply #1 on: March 08, 2012, 04:24:53 AM »

Hi Hervé

It is assumed that when multiple chips are used that they are of the same device type. The reason for this is that only one SPI Flash driver is used at a time.
Also it is assumed that the device size of constant - the reason being that when the page size changes ther is often a different driver operation (calculation of the page addressing).

The uFileSystem then expects to have a constant file granularity across the whole memory area. This Flash granularity can change across the area but it is the largest of all available Flash granularities that determines this minimum file granularity.

Therefore, if you have different SPI Flash devices, the single driver must be able to control them all. This is however unlikely due to the fact that the driver generally needs to know the correct page size to operare correctly - it would be possible to change the page calculation depending on the device which is presently being accessed quite easily though to make this dynamic (rather than fixed based on the page size define).

If you select the FILE_GRANULARITY to respect the largest FLASH_GRANULARITY value it should then be able to work like this over the complete range.

It is presently not possible to vary the FILE_GRANULARITY across the memory area since this is a fixed value.

I am wondering why there would be the need to have different types of SPI Flash in the uFileSystem area? Usually it makes sense to have multiple devices of the same type since it means that greater quantities of a single type are used and only one type needs to be purchased (logistics is optimised).

Regards

Mark
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
Copyright © 2013 utasker.com. Webdesign and Hosting by e-future.ch 2013
Valid XHTML 1.0! Valid CSS!
Page created in 0.037 seconds with 18 queries.