This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: flash_query returning different device_id


On Wed, 2005-03-30 at 20:17 +0530, Ringo Pebam wrote:
> Hi,
> 
> My eCos bootloader (with AM29LV128 flash device) fails at flash_query
> (flash_am29xxxxx.inl).
> 
> 
> In flash_hwr_init(), flash_query returns values as
> 
>                      id[0] = 0xe
>                      id[1] = 0xea00 <-- device_id
>                      id[2] = 0xf018
>                      id[3] = 0xe59f
> 
> 
> but in flash_am29xxxxx_parts.inl it's defined as
> 
> #ifdef CYGHWR_DEVS_FLASH_AMD_AM29LV128
>     {   // AM29LV128
>         device_id  : FLASHWORD(0x227e),
> 	.....
> 
> 
> Hence, FLASH_ERR_DRV_WRONG_PART is returned.
> 
> 	// Did we find the device? If not, return error.
> 	if (NUM_DEVICES == i)
>         	return FLASH_ERR_DRV_WRONG_PART;
> 
> 
> Which finally fails at flash_init() and exits without doing
> 	
> 	flash_info.block_mask = ~(flash_info.block_size-1);
> 	flash_info.init = 1;
> 
> 
> And the flash_read finally fails.
> 
> 
> 
> With these very few informations I know that it will be tough to give 
> me good suggestions. But in if anybody had faced similar problem, 
> could you share some ideas or approach, please.

My guess is that your FLASH device is write protected (probably by
some hardware enable/gate).  What you are seeing is actual FLASH
contents, not ID data.

If your device needs specific enable/disable code, look at the iPAQ
for an example of how to handle this.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]