Chinaunix首页 | 论坛 | 博客
  • 博客访问: 567088
  • 博文数量: 169
  • 博客积分: 2656
  • 博客等级: 少校
  • 技术积分: 1685
  • 用 户 组: 普通用户
  • 注册时间: 2009-07-30 13:03
文章分类

全部博文(169)

文章存档

2011年(1)

2010年(135)

2009年(33)

我的朋友

分类: 嵌入式

2010-06-15 02:58:13

SMDK6410开发板上,原来NAND FLASH为K9F2G08U0A

(SLC,256MB,8bit,
1page=(2k+64)bytes,
1block=64pages,
1device=2048blocks) 接口为CE,R/B.

新NAND FLASH为K9HCG08U1M
(MLC,8GB,8bit,
1page=(4k+128)bytes,
1block=128pages,
1device=8192blocks) 接口为CE1,CE2,R/B1,R/B2.


硬件上:
1.SMDK6410开发板上R/B2脚和R/B1脚相连的电阻R15未焊接,焊上0欧电阻
2.由于K9HCG08U1M为两片K9LBG08组成,有两个选通脚CE1,CE2。而开发板
上CE2通过电阻与nCS_XD连接,所以要将R37焊接上0欧电阻,并设置CFGB3
的1(ON),2(OFF),设置CFGB4的1(OFF),2(ON),则6410能够读到整个4个bank
8GB地址空间。
   仅使用第一片K9LBG08:
       CFGB3  1(ON),2(OFF)
       CFGB4  1(OFF),2(OFF)
   仅使用第二片K9LBG08:
       CFGB3  1(OFF),2(ON)
       CFGB4  1(OFF),2(OFF)

软件:BSP为SMDK6410_WinCE60_PM_REL_0.10_080918.zip
1.错误提示:
[FIL:ERR] NAND_Sync() : Left-plane Sync Error
[FIL:ERR] NAND_Sync() : Right-plane Sync Error
eboot中格式化后,可以消除此提示。
2.出现错误提示:
[FTL:MSG] FIL_Init   [OK]
[FTL:MSG] BUF_Init   [OK]
[FTL:MSG] VFL_Init   [OK]
[FTL:MSG] Not Formated !
[VFL:ERR]  there is no spare to write VFL context
[VFL:ERR]  _StoreVFLCxt fail!
BP_ReadLogicalSector : WMR_Init is failed.
wNUM_BLOCKS : 2048(0x800)

[VFL:ERR]  VFL_Read(nVpn:16777215) nVpn Overflow! --- 4G
[FTL:ERR] there is error on VFL_Read!

[VFL:ERR]  VFL_Read(nVpn:33554431) nVpn Overflow! --- 8G
[FTL:ERR] there is error on VFL_Read!

是没有格式化,在eboot里按'b'格式化VFL区。
3.若eboot中格式化VFL不成功,提示:
Enter your selection: B
 ++Format VFL (Format FIL + VFL Format)
[WMR    ] ++WMR_Format_VFL()
[WMR    ] ++WMR_Format_FIL()
[WMR:INF] WMR_Format_FIL() : Initial Bad @ 1st plane of Block 4
[WMR:INF] WMR_Format_FIL() : Initial Bad @ 1st plane of Block 35
。。。。。。
[WMR:INF] WMR_Format_FIL() : Initial Bad @ 1st plane of Block 139
[WMR:INF] WMR_Format_FIL() : Initial Bad @ 1st plane of Block 140
[WMR:INF] WMR_Format_FIL() : All Block in the Bank 0 Erased
[WMR:INF] WMR_Format_FIL() : All Block in the Bank 1 Erased
[WMR:INF] WMR_Format_FIL() : All Block Erased including Block 0 !!!
[WMR    ] --WMR_Format_FIL()
[WMR:INF] WMR_Format_VFL() : VFL_Init() Success
[VFL:ERR]  there is no spare to write VFL context
[VFL:ERR]  _StoreVFLCxt fail!
[WMR:ERR] WMR_Format_VFL() : VFL_Format() Failure
[ERR] WMR_Format_VFL() Failure

则是坏块造成VFL_FORMAT不成功。但并不是标识了坏块的一定就是物理上坏了,
后来将标识位写为正常块标识0xFF,以上的格式化VFL过程就正常了。VFL格式化
过后,再烧写NK.BIN就能够正常的跑了。
注:对于物理坏块,此招无效,应该可以通过修改你的系统在NAND上的Layout来
避开关键block的坏块问题。
4.eboot正常,但NK.BIN跑不起来
waitforconnect
INFO: using TOC[1] dwJumpAddress: 0x80101000
INFO: OEMLaunch: Jumping to Physical Address 0x50101000h (Virtual Address 0x80101000h)...

就没有输出了,在这次调试中,是由于NK.BIN中使用的频率为667MHz,修改为532MHz
即可。
5.修改坏块标识
static BOOL MainMenu(PBOOT_CFG pBootCfg)

F) Make Initial Bad Block Information (Warning)
在 case 'F' :
 case 'f' :处

 if (pSBuf[0] != 0xff)
 {
 OALMSG(TRUE, (TEXT("Initial Bad Block @ %d Block\r\n"), nBlock));

#if 1
 pLowFuncTbl->Erase(0, nBlock, enuNONE_PLANE_BITMAP);
 pLowFuncTbl->Sync(0, &nSyncRet);

 memset((void *)pSBuf, 0xff, BYTES_PER_SPARE_PAGE);  --- 修改为0xFF(正常块)
 IS_CHECK_SPARE_ECC = FALSE32;
 pLowFuncTbl->Write(0, nBlock*PAGES_PER_BLOCK+(PAGES_PER_BLOCK-1), 0x0, enuNONE_PLANE_BITMAP, NULL, pSBuf);
 IS_CHECK_SPARE_ECC = TRUE32;
 if (pLowFuncTbl->Sync(0, &nSyncRet)) // Write Error
 {
  OALMSG(TRUE, (TEXT("Bad marking Write Error @ %d Block\r\n"), nBlock));
 }
#endif
 }
所以只需要编译后在eboot里面'F'一下,如果不是物理坏块,就可以正常使用你的MLC了。

阅读(1005) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~