nand 烧写2
来源:互联网 发布:斜视矫正训练软件 编辑:程序博客网 时间:2024/04/29 22:10
1. nand info/nand device
功能:顯示當前nand flash晶片資訊。
函數調用關係如下(按先後順序):
static void nand_print(struct nand_chip *nand) ;
2. nand erase
功能:擦除指定塊上的數據。
函數調用關係如下(按先後順序):
int nand_erase(struct nand_chip* nand, size_t ofs, size_t len, int clean);
3. nand bad
功能:顯示壞塊。
函數調用關係如下(按先後順序):
static void nand_print_bad(struct nand_chip* nand);
int check_block (struct nand_chip *nand, unsigned long pos);
4. nand read
功能:讀取nand flash信息到SDRAM。
函數調用關係如下(按先後順序):
int nand_rw (struct nand_chip* nand, int cmd,size_t start, size_t len, size_t * retlen, u_char * buf);
static int nand_read_ecc(struct nand_chip *nand, size_t start, size_t len,
size_t * retlen, u_char *buf, u_char *ecc_code);
static void NanD_ReadBuf (struct nand_chip *nand, u_char * data_buf, int cntr);
READ_NAND(adr);
5. nand write
功能:從SDRAM寫數據到nand flash中。
函數調用關係如下(按先後順序):
int nand_rw (struct nand_chip* nand, int cmd,size_t start, size_t len, size_t * retlen, u_char * buf);
static int nand_write_ecc (struct nand_chip* nand, size_t to, size_t len,
size_t * retlen, const u_char * buf, u_char * ecc_code);
static int nand_write_page (struct nand_chip *nand, int page, int col, int last, u_char * ecc_code);
WRITE_NAND(d , adr);
4.2.32 nand info
列印nand flash資訊
CRANE2410 # nand info
Device 0: Samsung K9F1208U0B at 0x4e000000 (64 MB, 16 kB sector)
4.2.33 nand device <n>
顯示某個nand設備
CRANE2410 # nand device 0
Device 0: Samsung K9F1208U0B at 0x4e000000 (64 MB, 16 kB sector)
... is now current device
4.2.34 nand bad
CRANE2410 # nand bad
Device 0 bad blocks:
4.2.35 nand read
nand read InAddr FlAddr size
InAddr: 從nand flash中讀到記憶體的起始位址。
FlAddr: nand flash 的起始位址。
size: 從nand flash中讀取的數據的大小。
CRANE2410 # nand read 0x30008000 0 0x100000
NAND read: device 0 offset 0, size 1048576 ...
1048576 bytes read: OK
4.2.36 nand erease
nand erase FlAddr size
FlAddr: nand flash 的起始位址
size: 從nand flash中擦除資料塊的大小
CRANE2410 # nand erase 0x100000 0x20000
NAND erase: device 0 offset 1048576, size 131072 ... OK
4.2.37 nand write
nand write InAddr FlAddr size
InAddr: 寫到Nand Flash中的資料在記憶體的起始位址
FlAddr: Nand Flash的起始位址
size: 數據的大小
CRANE2410 # nand write 0x30f00000 0x100000 0x20000
NAND write: device 0 offset 1048576, size 131072 ...
131072 bytes written: OK
4.2.37 nboot
u-boot-1.1.4代碼對於nboot命令的幫助不正確,修改如下:
正確的順序為:
nboot InAddr dev FlAddr
InAddr: 需要裝載到的記憶體的位址。
FlAddr: 在nand flash上uImage存放的地址
dev: 設備號
需要提前設置環境變數,否則nboot不會調用bootm
CRANE2410 #setenv autostart yes
CRANE2410 # nboot 30008000 0 100000
Loading from device 0: <NULL> at 0x4e000000 (offset 0x100000)
Image Name: Linux-2.6.14.3
Created: 2006-07-06 7:31:52 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 897428 Bytes = 876.4 kB
Load Address: 30008000
Entry Point: 30008040
Automatic boot of image at addr 0x30008000 ...
## Booting image at 30008000 ...
Starting kernel ...
4.3 命令簡寫說明
所以命令都可以簡寫,只要命令前面的一部分不會跟其他命令相同,就可以不用寫全整個命令.
save命令
CRANE2410 # sa
Saving Environment to Flash...
Un-Protected 1 sectors
Erasing Flash...Erasing sector 10 ... Erased 1 sectors
4.4 把文件寫入NandFlash
如果把一個傳到記憶體中的檔寫入到Nand Flash中, 如:新的uboot.bin, zImage(內核),
rootfs等, 如果做呢?我們可以用Nand Flash命令來完成. 但是Nand Flash寫時,必須先要把Nand
Flash的寫入區全部擦除後,才能寫. 下面以把記憶體0x30008000起長度為0x20000的內容寫到Nand
Flash中的0x100000為例.
CRANE2410 # nand erase 0x100000 20000
NAND erase: device 0 offset 1048576, size 131072 ... OK
CRANE2410 # nand write 0x30008000 0x100000 0x20000
NAND write: device 0 offset 1048576, size 131072 ...
131072 bytes written: OK
- nand 烧写2
- nand flash 烧写
- nand flash烧写
- 支持Nand Flash烧写的仿真器
- HI3515-Nand Flash烧写说明
- 使用JLINK间接烧写NAND FLASH
- H-JTAG烧写NAND FLASH
- 烧写uboot到nand中
- Linux 烧写文件到Nand Flash
- DNW烧写FL2440 NAND Flash分区
- 自己动手写J-LINK脚本,烧写NAND启动代码
- Davinci DM6446开发攻略-UBOOT-2009.03移植2 nand flash的烧写
- Davinci DM6446开发攻略-UBOOT-2009.03移植2 nand flash的烧写
- Davinci DM6446开发攻略-UBOOT-2009.03移植2 nand flash的烧写
- Davinci DM6446开发攻略-UBOOT-2009.03移植2 nand flash的烧写
- Davinci DM6446开发攻略-UBOOT-2009.03移植2 nand flash的烧写
- 烧写NAND Flash时出现错误:*** Warning - bad CRC or NAND, using default environment
- DM36x使用串口和NAND启动完成NAND Flash烧写(一)
- nand flash 烧写
- 硅胶密封圈 我司专业生产各类硅胶塑胶礼品表及表带表头套装等
- 号称全球最大中文it社区的csdn保存用户密码竟然用明文
- 冒个泡泡
- Android 彻底关闭应用程序 返回键的捕获
- nand 烧写2
- fjale;tjel;wgf
- LinkServer 案例
- C++的模板详解
- 5000年历史的沉淀
- MFC CToolTipCtrl类的用法
- 常用的Web Service
- java中的map与List的用法
- 使用libjpeg处理图像(libjpeg的使用压缩与解压缩jpg格式)