加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

读取nandflash ID

发布时间:2020-12-15 06:18:50 所属栏目:百科 来源:网络整理
导读:#define NFCONT ?(*(volatile unsigned char *)0x4e000004) #define NFCMMD ?(*(volatile unsigned char *)0x4e000008) #define NFADDR ?(*(volatile unsigned char *)0x4e00000c) #define NFDATA ?(*(volatile unsigned char *)0x4e000010) #ifndef CFG_CMD
#define NFCONT ?(*(volatile unsigned char *)0x4e000004)
#define NFCMMD ?(*(volatile unsigned char *)0x4e000008)
#define NFADDR ?(*(volatile unsigned char *)0x4e00000c)

#define NFDATA ?(*(volatile unsigned char *)0x4e000010)


#ifndef CFG_CMD_MYTEST
int getnandID(cmd_tbl_t *cmdtp,int flag,int argc,char *argv[])
? ? ? ?{
? ? ? volatile unsigned char ?data;
? ? ? ?
? NFCONT &= ~(1<<1);
? NFCMMD = 0x90;
? NFADDR = 0x00;
? ? ? ? ? int i;
? for(i = 0;i<200;i++)
;
? ? ? ?
? ? ? ? ?data = NFDATA;
? ? ? ? ?printf("%xn",data);
data = NFDATA;
? ? ? ? ?printf("%xn",data);
? return 0;
? ? ? ?}


U_BOOT_CMD(
? ? ? ? ? ?
? getnandID,1,getnandID,"getnandID -get nandID","-get nandID" ? ? ? ? ? );
#endif


基本实现功能但显示芯片不一致

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读