[U-Boot-Users] problem with cfi_flash.c & AT91RM9200DK

Hello !
I have exchanged the flash on my AT91RM9200DK with a AT49BV320C cfi flash, and done all needed mods to the config file, every thing seems ok except that it get the size of the flash incorectly.
It sayes that it is a 16x16 4m, 71 sector cfi complient flash, when it should be a 2097 x 16, 32m, 71 sector flash ?
Anyone have any tips for me on how to fix this ? protect / unprotect seems to work fine, and it even writes without complaining, but nothing actualy gets writen !
Debug:
U-Boot 1.1.2 (Oct 4 2004 - 11:17:41)
U-Boot code: 21F00000 -> 21F188E4 BSS: -> 21F1CFB4 RAM Configuration: Bank #0: 20000000 32 MB flash detect cfi fwc addr 10000000 cmd ff ff 8bit x 8 bit fwc addr 10000055 cmd 98 98 8bit x 8 bit is= cmd 51(Q) addr 10000010 is= ff 51 fwc addr 10000000 cmd ff ffff 16bit x 8 bit fwc addr 100000aa cmd 98 9898 16bit x 8 bit is= cmd 51(Q) addr 10000020 is= 0051 5151 fwc addr 10000000 cmd ff 00ff 16bit x 16 bit fwc addr 100000aa cmd 98 0098 16bit x 16 bit is= cmd 51(Q) addr 10000020 is= 0051 0051 is= cmd 52(R) addr 10000022 is= 0052 0052 is= cmd 59(Y) addr 10000024 is= 0059 0059 ushort addr is at 10000050 info->portwidth = 2 addr[0] = 0x1 addr[1] = 0x0 addr[2] = 0x0 addr[3] = 0x0 retval = 0x1 device interface is 1 found port 2 chip 2 port 16 bits chip 16 bits ushort addr is at 10000026 info->portwidth = 2 addr[0] = 0x3 addr[1] = 0x0 addr[2] = 0x0 addr[3] = 0x0 retval = 0x3 10000020 : 51 00 52 00 59 00 03 00 00 00 41 00 00 00 00 00 Q.R.Y.....A..... 10000030 : 00 00 00 00 00 00 27 00 36 00 b5 00 c5 00 04 00 ......'.6....... 10000040 : 00 00 0a 00 00 00 03 00 00 00 03 00 00 00 16 00 ................ 10000050 : 01 00 00 00 00 00 00 00 02 00 07 00 00 00 20 00 .............. . 10000060 : 00 00 3e 00 00 00 00 00 01 00 ff ff ff ff ff ff ..>............. 10000070 : ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 10000080 : ff ff 50 00 52 00 49 00 31 00 30 00 86 00 01 00 ..P.R.I.1.0..... 10000090 : 00 00 00 00 80 00 03 00 03 00 ff ff ff ff ff ff ................ manufacturer is 3 size_ratio 1 port 16 bits chip 16 bits found 2 erase regions long addr is at 1000005a info->portwidth = 2 addr[0] = 0x7 addr[1] = 0x0 addr[2] = 0x0 addr[3] = 0x0 addr[4] = 0x20 addr[5] = 0x0 addr[6] = 0x0 addr[7] = 0x0 erase_region_count = 8 erase_region_size = 8192 long addr is at 10000062 info->portwidth = 2 addr[0] = 0x3e addr[1] = 0x0 addr[2] = 0x0 addr[3] = 0x0 addr[4] = 0x0 addr[5] = 0x0 addr[6] = 0x1 addr[7] = 0x0 erase_region_count = 63 erase_region_size = 65536 ushort addr is at 10000054 info->portwidth = 2 addr[0] = 0x0 addr[1] = 0x0 addr[2] = 0x0 addr[3] = 0x0 retval = 0x0 fwc addr 10000000 cmd ff 00ff 16bit x 16 bit Flash: 4 MB
Bank # 1: CFI conformant FLASH (16 x 16) Size: 4 MB in 71 Sectors Erase timeout 8192 ms, write timeout 0 ms, buffer write timeout 1 ms, buffer size 1 Sector Start Addresses: 10000000 (RO) 10002000 (RO) 10004000 (RO) 10006000 (RO) 10008000 (RO) 1000A000 (RO) 1000C000 (RO) 1000E000 (RO) 10010000 (RO) 10020000 (RO) 10030000 (RO) 10040000 (RO) 10050000 (RO) 10060000 (RO) 10070000 (RO) 10080000 (RO) 10090000 (RO) 100A0000 (RO) 100B0000 (RO) 100C0000 (RO) 100D0000 (RO) 100E0000 (RO) 100F0000 (RO) 10100000 (RO) 10110000 (RO) 10120000 (RO) 10130000 (RO) 10140000 (RO) 10150000 (RO) 10160000 (RO) 10170000 (RO) 10180000 (RO) 10190000 (RO) 101A0000 (RO) 101B0000 (RO) 101C0000 (RO) 101D0000 (RO) 101E0000 (RO) 101F0000 (RO) 10200000 (RO) 10210000 (RO) 10220000 (RO) 10230000 (RO) 10240000 (RO) 10250000 (RO) 10260000 (RO) 10270000 (RO) 10280000 (RO) 10290000 (RO) 102A0000 (RO) 102B0000 (RO) 102C0000 (RO) 102D0000 (RO) 102E0000 (RO) 102F0000 (RO) 10300000 (RO) 10310000 (RO) 10320000 (RO) 10330000 (RO) 10340000 (RO) 10350000 (RO) 10360000 (RO) 10370000 (RO) 10380000 (RO) 10390000 (RO) 103A0000 (RO) 103B0000 (RO) 103C0000 (RO) 103D0000 (RO) 103E0000 (RO) 103F0000 (RO)
Best Regards
Morten

"Morten" morteenh@online.no schreibt:
I have exchanged the flash on my AT91RM9200DK with a AT49BV320C cfi flash,
It sayes that it is a 16x16 4m, 71 sector cfi complient flash, when it should be a 2097 x 16, 32m, 71 sector flash ?
Hi,
normally the chip vendors state the capacity in megabits, not megabytes, whereas U-Boot shows the capacity in megabytes. Your AT49BV320C holds 32 Mbit, which equals the 4MBytes shown by U-Boot.
Cheers Anders
Disclaimer: I didn't consult the data sheet of that particular chip.

Correction, U-Boot seems to detect the chip correctly :)
Mixed up bits and bytes, and dident understand how the 16 x16 worket, sorry for this !
So it seams like erase and protect works like it should, but it stil doesent change anything in the flash if i modify or copy code to it !
Any idears ?
Best Regards
Morten
----- Original Message ----- From: "Morten" morteenh@online.no To: u-boot-users@lists.sourceforge.net Sent: Monday, October 04, 2004 12:39 PM Subject: [U-Boot-Users] problem with cfi_flash.c & AT91RM9200DK
Hello !
I have exchanged the flash on my AT91RM9200DK with a AT49BV320C cfi flash, and done all needed mods to the config file, every thing seems ok except that it get the size of the flash incorectly.
It sayes that it is a 16x16 4m, 71 sector cfi complient flash, when it should be a 2097 x 16, 32m, 71 sector flash ?
Anyone have any tips for me on how to fix this ? protect / unprotect seems to work fine, and it even writes without complaining, but nothing actualy gets writen !
Debug:
U-Boot 1.1.2 (Oct 4 2004 - 11:17:41)
U-Boot code: 21F00000 -> 21F188E4 BSS: -> 21F1CFB4 RAM Configuration: Bank #0: 20000000 32 MB flash detect cfi fwc addr 10000000 cmd ff ff 8bit x 8 bit fwc addr 10000055 cmd 98 98 8bit x 8 bit is= cmd 51(Q) addr 10000010 is= ff 51 fwc addr 10000000 cmd ff ffff 16bit x 8 bit fwc addr 100000aa cmd 98 9898 16bit x 8 bit is= cmd 51(Q) addr 10000020 is= 0051 5151 fwc addr 10000000 cmd ff 00ff 16bit x 16 bit fwc addr 100000aa cmd 98 0098 16bit x 16 bit is= cmd 51(Q) addr 10000020 is= 0051 0051 is= cmd 52(R) addr 10000022 is= 0052 0052 is= cmd 59(Y) addr 10000024 is= 0059 0059 ushort addr is at 10000050 info->portwidth = 2 addr[0] = 0x1 addr[1] = 0x0 addr[2] = 0x0 addr[3] = 0x0 retval = 0x1 device interface is 1 found port 2 chip 2 port 16 bits chip 16 bits ushort addr is at 10000026 info->portwidth = 2 addr[0] = 0x3 addr[1] = 0x0 addr[2] = 0x0 addr[3] = 0x0 retval = 0x3 10000020 : 51 00 52 00 59 00 03 00 00 00 41 00 00 00 00 00 Q.R.Y.....A..... 10000030 : 00 00 00 00 00 00 27 00 36 00 b5 00 c5 00 04 00 ......'.6....... 10000040 : 00 00 0a 00 00 00 03 00 00 00 03 00 00 00 16 00 ................ 10000050 : 01 00 00 00 00 00 00 00 02 00 07 00 00 00 20 00 .............. . 10000060 : 00 00 3e 00 00 00 00 00 01 00 ff ff ff ff ff ff ..>............. 10000070 : ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 10000080 : ff ff 50 00 52 00 49 00 31 00 30 00 86 00 01 00 ..P.R.I.1.0..... 10000090 : 00 00 00 00 80 00 03 00 03 00 ff ff ff ff ff ff ................ manufacturer is 3 size_ratio 1 port 16 bits chip 16 bits found 2 erase regions long addr is at 1000005a info->portwidth = 2 addr[0] = 0x7 addr[1] = 0x0 addr[2] = 0x0 addr[3] = 0x0 addr[4] = 0x20 addr[5] = 0x0 addr[6] = 0x0 addr[7] = 0x0 erase_region_count = 8 erase_region_size = 8192 long addr is at 10000062 info->portwidth = 2 addr[0] = 0x3e addr[1] = 0x0 addr[2] = 0x0 addr[3] = 0x0 addr[4] = 0x0 addr[5] = 0x0 addr[6] = 0x1 addr[7] = 0x0 erase_region_count = 63 erase_region_size = 65536 ushort addr is at 10000054 info->portwidth = 2 addr[0] = 0x0 addr[1] = 0x0 addr[2] = 0x0 addr[3] = 0x0 retval = 0x0 fwc addr 10000000 cmd ff 00ff 16bit x 16 bit Flash: 4 MB
Bank # 1: CFI conformant FLASH (16 x 16) Size: 4 MB in 71 Sectors Erase timeout 8192 ms, write timeout 0 ms, buffer write timeout 1 ms, buffer size 1 Sector Start Addresses: 10000000 (RO) 10002000 (RO) 10004000 (RO) 10006000 (RO) 10008000 (RO) 1000A000 (RO) 1000C000 (RO) 1000E000 (RO) 10010000 (RO) 10020000 (RO) 10030000 (RO) 10040000 (RO) 10050000 (RO) 10060000 (RO) 10070000 (RO) 10080000 (RO) 10090000 (RO) 100A0000 (RO) 100B0000 (RO) 100C0000 (RO) 100D0000 (RO) 100E0000 (RO) 100F0000 (RO) 10100000 (RO) 10110000 (RO) 10120000 (RO) 10130000 (RO) 10140000 (RO) 10150000 (RO) 10160000 (RO) 10170000 (RO) 10180000 (RO) 10190000 (RO) 101A0000 (RO) 101B0000 (RO) 101C0000 (RO) 101D0000 (RO) 101E0000 (RO) 101F0000 (RO) 10200000 (RO) 10210000 (RO) 10220000 (RO) 10230000 (RO) 10240000 (RO) 10250000 (RO) 10260000 (RO) 10270000 (RO) 10280000 (RO) 10290000 (RO) 102A0000 (RO) 102B0000 (RO) 102C0000 (RO) 102D0000 (RO) 102E0000 (RO) 102F0000 (RO) 10300000 (RO) 10310000 (RO) 10320000 (RO) 10330000 (RO) 10340000 (RO) 10350000 (RO) 10360000 (RO) 10370000 (RO) 10380000 (RO) 10390000 (RO) 103A0000 (RO) 103B0000 (RO) 103C0000 (RO) 103D0000 (RO) 103E0000 (RO) 103F0000 (RO)
Best Regards
Morten
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users

Have re checked all Hardware, and every thig seems to be correct, but i stil have the same problem. all commands seems to be working (no errors) but nothing gets writen to the AT49BV320C !
One thing i have noticed is that in debug mode, when i try to write to the flash, it keeps saying bussy all the time, could the Atmel flash be using a slightly different Command set than the ones inplemented in the cfi_flash.c ?
please, if anyone has any tips, i would be very greatful :) going out of my mind her .. 4 prototype boards behaving juste the same ! (based on the AT91Rm9200DK ref design)
Best Regards
Morten
Hello !
I have exchanged the flash on my AT91RM9200DK with a AT49BV320C cfi flash, and done all needed mods to the config file, every thing seems ok except that it get the size of the flash incorectly.
It sayes that it is a 16x16 4m, 71 sector cfi complient flash, when it should be a 2097 x 16, 32m, 71 sector flash ?
Anyone have any tips for me on how to fix this ? protect / unprotect seems to work fine, and it even writes without complaining, but nothing actualy gets writen !
Debug:
U-Boot 1.1.2 (Oct 4 2004 - 11:17:41)
U-Boot code: 21F00000 -> 21F188E4 BSS: -> 21F1CFB4 RAM Configuration: Bank #0: 20000000 32 MB flash detect cfi fwc addr 10000000 cmd ff ff 8bit x 8 bit fwc addr 10000055 cmd 98 98 8bit x 8 bit is= cmd 51(Q) addr 10000010 is= ff 51 fwc addr 10000000 cmd ff ffff 16bit x 8 bit fwc addr 100000aa cmd 98 9898 16bit x 8 bit is= cmd 51(Q) addr 10000020 is= 0051 5151 fwc addr 10000000 cmd ff 00ff 16bit x 16 bit fwc addr 100000aa cmd 98 0098 16bit x 16 bit is= cmd 51(Q) addr 10000020 is= 0051 0051 is= cmd 52(R) addr 10000022 is= 0052 0052 is= cmd 59(Y) addr 10000024 is= 0059 0059 ushort addr is at 10000050 info->portwidth = 2 addr[0] = 0x1 addr[1] = 0x0 addr[2] = 0x0 addr[3] = 0x0 retval = 0x1 device interface is 1 found port 2 chip 2 port 16 bits chip 16 bits ushort addr is at 10000026 info->portwidth = 2 addr[0] = 0x3 addr[1] = 0x0 addr[2] = 0x0 addr[3] = 0x0 retval = 0x3 10000020 : 51 00 52 00 59 00 03 00 00 00 41 00 00 00 00 00 Q.R.Y.....A..... 10000030 : 00 00 00 00 00 00 27 00 36 00 b5 00 c5 00 04 00 ......'.6....... 10000040 : 00 00 0a 00 00 00 03 00 00 00 03 00 00 00 16 00 ................ 10000050 : 01 00 00 00 00 00 00 00 02 00 07 00 00 00 20 00 .............. . 10000060 : 00 00 3e 00 00 00 00 00 01 00 ff ff ff ff ff ff ..>............. 10000070 : ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 10000080 : ff ff 50 00 52 00 49 00 31 00 30 00 86 00 01 00 ..P.R.I.1.0..... 10000090 : 00 00 00 00 80 00 03 00 03 00 ff ff ff ff ff ff ................ manufacturer is 3 size_ratio 1 port 16 bits chip 16 bits found 2 erase regions long addr is at 1000005a info->portwidth = 2 addr[0] = 0x7 addr[1] = 0x0 addr[2] = 0x0 addr[3] = 0x0 addr[4] = 0x20 addr[5] = 0x0 addr[6] = 0x0 addr[7] = 0x0 erase_region_count = 8 erase_region_size = 8192 long addr is at 10000062 info->portwidth = 2 addr[0] = 0x3e addr[1] = 0x0 addr[2] = 0x0 addr[3] = 0x0 addr[4] = 0x0 addr[5] = 0x0 addr[6] = 0x1 addr[7] = 0x0 erase_region_count = 63 erase_region_size = 65536 ushort addr is at 10000054 info->portwidth = 2 addr[0] = 0x0 addr[1] = 0x0 addr[2] = 0x0 addr[3] = 0x0 retval = 0x0 fwc addr 10000000 cmd ff 00ff 16bit x 16 bit Flash: 4 MB
Bank # 1: CFI conformant FLASH (16 x 16) Size: 4 MB in 71 Sectors Erase timeout 8192 ms, write timeout 0 ms, buffer write timeout 1 ms, buffer size 1 Sector Start Addresses: 10000000 (RO) 10002000 (RO) 10004000 (RO) 10006000 (RO) 10008000 (RO) 1000A000 (RO) 1000C000 (RO) 1000E000 (RO) 10010000 (RO) 10020000 (RO) 10030000 (RO) 10040000 (RO) 10050000 (RO) 10060000 (RO) 10070000 (RO) 10080000 (RO) 10090000 (RO) 100A0000 (RO) 100B0000 (RO) 100C0000 (RO) 100D0000 (RO) 100E0000 (RO) 100F0000 (RO) 10100000 (RO) 10110000 (RO) 10120000 (RO) 10130000 (RO) 10140000 (RO) 10150000 (RO) 10160000 (RO) 10170000 (RO) 10180000 (RO) 10190000 (RO) 101A0000 (RO) 101B0000 (RO) 101C0000 (RO) 101D0000 (RO) 101E0000 (RO) 101F0000 (RO) 10200000 (RO) 10210000 (RO) 10220000 (RO) 10230000 (RO) 10240000 (RO) 10250000 (RO) 10260000 (RO) 10270000 (RO) 10280000 (RO) 10290000 (RO) 102A0000 (RO) 102B0000 (RO) 102C0000 (RO) 102D0000 (RO) 102E0000 (RO) 102F0000 (RO) 10300000 (RO) 10310000 (RO) 10320000 (RO) 10330000 (RO) 10340000 (RO) 10350000 (RO) 10360000 (RO) 10370000 (RO) 10380000 (RO) 10390000 (RO) 103A0000 (RO) 103B0000 (RO) 103C0000 (RO) 103D0000 (RO) 103E0000 (RO) 103F0000 (RO)
Best Regards
Morten
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
participants (2)
-
Anders Larsen
-
Morten