[U-Boot] FLASH write bug on NGW100

Eirik Aanonsen eaa at wprmedical.com
Thu May 21 21:30:56 CEST 2009


><reconstructing thread and cc'ing u-boot list; please don't
>top-post :-)>

Sorry.. a little to quick

>> > > when using the latest u-boot version from
>> > > git://www.denx.de/git/u-boot-avr32.git, it is not possible for me to
>> > > write (I have tried saveenv and protect) to NOR FLASH anymore.
>> > >
>> > > U-Boot gives the following error: "start or end address not on sector
>> > > boundary"
>> > >
>> > > Is this a known problem?
>> > >
>> > > Gerhard
>> > >
>> >
>> > Post the exact commands you are using. Probably you are using wrong
>> > addresses
>> >
>> 
>> The exact command:
>> 
>> ?U-Boot> saveenv
>> Saving Environment to Flash...
>> Error: start and/or end address not on sector boundary
>> 
>> Seriously, it's that easy.  The addresses are the default ones found in
>> include/configs/atngw100.h since the dawn of time :-)
>> 
>>       --Ben.
>?
>> On Wed, 2009-05-20 at 13:08 +0200, Eirik Aanonsen wrote:

>> ?I dont have tha board. What result do you get if you run: Flinfo ( post it back here )

>On Wed, 2009-05-20 at 15:54 +0200, Gerhard Berghofer wrote:
>> Hi Eirik,
>> 
>> flinfo with u-boot version >= 2009.03 gives the following output:
>> 
>> ######################################################################
>> Bank # 1: CFI conformant FLASH (16 x 16)  Size: 8 MB in 135 Sectors
>>   AMD Standard command set, Manufacturer ID: 0x1F, Device ID: 0x1D6
>>   Erase timeout: 8192 ms, write timeout: 1 ms
>>   Buffer write timeout: 1 ms, buffer size: 4 bytes
>> 
>>   Sector Start Addresses:
>>   A0000000        A0002000        A0004000        A0006000       A0008000     
>>   A000A000        A000C000        A000E000        A0010000       A0020000     
>>   A0030000        A0040000        A0050000        A0060000       A0070000     
>
>...
>> 
>> flinfo with u-boot version 2008.10 gives the following output:
>> 
>> ######################################################################
>> Bank # 1: CFI conformant FLASH (16 x 16)  Size: 8 MB in 135 Sectors
>>   AMD Standard command set, Manufacturer ID: 0x1F, Device ID: 0x1D6
>>   Erase timeout: 8192 ms, write timeout: 1 ms
>>   Buffer write timeout: 1 ms, buffer size: 4 bytes
>> 
>>   Sector Start Addresses:
>>   00000000   RO   00002000   RO   00004000   RO   00006000   RO   00008000   RO
>>   0000A000   RO   0000C000   RO   0000E000   RO   00010000   RO   00020000     
>>   00030000        00040000        00050000        00060000        00070000     
>...

>> ?the FLASH seems to be attached to a wrong address range ...

>Well on the AVR32 both addresses are correct - the first accessed the
>flash through the uncached, untranslatable segment, now it's both cached
>and translated but that should only be a win.  I guess though that the
>environment address (which in the config is set to 007F0000) is still
>somehow somewhere being translated to A07F0000 then breaking all the
>flash range checking.

>But I'm kinda guessing here, I hope someone on the u-boot list can tell
>us it's known and fixed and we should be have scoured their archives
>harder ;-)

>	--Ben.

How about to try and change the base to  0xA0000000 ?
#define CONFIG_SYS_FLASH_BASE                   0x00000000

That could help some on how to get the env address set ok..

Not sure of this would break the 
#define CONFIG_SYS_MONITOR_BASE         CONFIG_SYS_FLASH_BASE

____________________________________________________
 
Eirik Aanonsen
SW Developer
E-mail: eaa at wprmedical.com
Phone: +47 90 68 11 92
Fax: +47 37 03 56 77
____________________________________________________





More information about the U-Boot mailing list