您好,欢迎来到乌哈旅游。
搜索
您的当前位置:首页mmc接口(4)——mmc基础操作

mmc接口(4)——mmc基础操作

来源:乌哈旅游

uboot 指令

mmc指令

=> mmc -help
mmc - MMC sub system

Usage:
mmc info - display info of the current MMC device
mmc read addr blk# cnt
mmc write addr blk# cnt
mmc erase blk# cnt
mmc rescan
mmc part - lists available partition on current mmc device
mmc dev [dev] [part] - show or set current mmc device [partition]
mmc list - lists available devices
mmc hwpartition [args...] - does hardware partitioning
  arguments (sizes in 512-byte blocks):
    [user [enh start cnt] [wrrel {on|off}]] - sets user data area attributes
    [gp1|gp2|gp3|gp4 cnt [enh] [wrrel {on|off}]] - general purpose partition
    [check|set|complete] - mode, complete set partitioning completed
  WARNING: Partitioning is a write-once setting once it is set to complete.
  Power cycling is required to initialize partitions after set to complete.
mmc setdsr <value> - set DSR register value

md指令

=> md.b      
md - memory display

Usage:
md [.b, .w, .l] address [# of objects]

应用示例

s5p4418# mmc list
NXP DWMMC: 0		//sd卡
 NXP DWMMC: 1
 NXP DWMMC: 2		//emmc

s5p4418# mmc info
Device: NXP DWMMC
Manufacturer ID: 15
OEM: 100
Name: 8GME4
Tran Speed: 52000000
Rd Block Len: 512
MMC version 4.0
High Capacity: Yes
Capacity: 7.3 GiB
Bus Width: 4-bit

emmc的第0x400块开始的2块存放着环境变量
读取环境变量

mmc read 48000000 400 2
md.b 48000000 3b0
md.b 48031400 3b0
480313f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
48031400: 5d d0 a6 e0 62 61 75 64 72 61 74 65 3d 31 31 35    ]...baudrate=115
......
48031790: 6f 75 74 3d 73 65 72 69 61 6c 00 74 70 3d 63 61    out=serial.tp=ca
480317a0: 70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    p...............
480317b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

擦除emmc存放环境变量的两块

mmc erase 400 2

TBC

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- wuhaninfo.cn 版权所有

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务