打印

单片机实现host,写U盘时,无法全部写入?

[复制链接]
1776|1
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
zhangjunye|  楼主 | 2011-1-1 14:03 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
大家好,我用的STM32带有otg模块的单片机,在U盘写扇区函数种调用SCSI协议中的WRITE(1)命令,查了好几遍命令块格式应该符合协议要求,但写入数据后--假如整个扇区都写0x55,只能有些字节变为0x55,有些字节改变为其他值。大家有没有相关的经验?
把写之后扇区数据贴出来,
写一个扇区的0x44,读出一个扇区的:
44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 FE AB 65 00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 EB 56 44 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 37 2E 37 37 14 AA 55 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 33 D7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 33 D7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 44 44 44 98 0D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 44 44 44 98 0D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 44 44 44 98 0D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 44 44 44 98 0D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
现在这个写U盘的东西卡在这好几天了,恳请各位高手给一些建议。

相关帖子

沙发
zhangjunye|  楼主 | 2011-1-4 10:34 | 只看该作者
自己顶一下,希望各位来帮忙

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:想得多,做得少,人笨又不读书。

9

主题

139

帖子

1

粉丝