SDIO读SD卡出错

2019-07-21 02:46发布

SDIO读一张256的SD卡,读第一扇区发现每次结果都漏了一个或者半个字节,已导致数据不对。移植过好多人的SDIO,结果就是不对,换了张32G的卡有是可以得。
速度也重地到高的试了好多次,数据读取模式也DMA,查询模式都试过了,还是出错。可是我的卡用读卡器在电脑上完全没问题。而且电脑上读出来的0扇区,相关参数都正常
。求解决办法。中断我也只开了DMA中断。
EB..........cnt=0
76..........cnt=1
90..........cnt=2
45..........cnt=3
58..........cnt=4
46..........cnt=5
41..........cnt=6
54..........cnt=7
20..........cnt=8
20..........cnt=9
20..........cnt=10
00..........cnt=11
00..........cnt=12
00..........cnt=13
00..........cnt=14
00..........cnt=15
00..........cnt=16
00..........cnt=17
00..........cnt=18
00..........cnt=19
00..........cnt=20
00..........cnt=21
00..........cnt=22
00..........cnt=23
00..........cnt=24
00..........cnt=25
00..........cnt=26
00..........cnt=27
00..........cnt=28
00..........cnt=29
00..........cnt=30
00..........cnt=31
00..........cnt=32
00..........cnt=33
00..........cnt=34
00..........cnt=35
00..........cnt=36
00..........cnt=37
00..........cnt=38
00..........cnt=39
00..........cnt=40
00..........cnt=41
00..........cnt=42
00..........cnt=43
00..........cnt=44
00..........cnt=45
00..........cnt=46
00..........cnt=47
00..........cnt=48
00..........cnt=49
00..........cnt=50
00..........cnt=51
00..........cnt=52
00..........cnt=53
00..........cnt=54
00..........cnt=55
00..........cnt=56
00..........cnt=57
00..........cnt=58
00..........cnt=59
00..........cnt=60
00..........cnt=61
00..........cnt=62
00..........cnt=63
00..........cnt=64
00..........cnt=65
00..........cnt=66
00..........cnt=67
00..........cnt=68
00..........cnt=69
00..........cnt=70
00..........cnt=71
00..........cnt=72
78..........cnt=73
07..........cnt=74
00..........cnt=75
00..........cnt=76
00..........cnt=77
00..........cnt=78
00..........cnt=79
80..........cnt=80
00..........cnt=81
00..........cnt=82
00..........cnt=83
E0..........cnt=84
01..........cnt=85
00..........cnt=86
00..........cnt=87
80..........cnt=88
02..........cnt=89
00..........cnt=90
00..........cnt=91
B0..........cnt=92
EE..........cnt=93
00..........cnt=94
00..........cnt=95
06..........cnt=96
00..........cnt=97
00..........cnt=98
00..........cnt=99
BD..........cnt=100
8D..........cnt=101
B5..........cnt=102
CC..........cnt=103
00..........cnt=104
01..........cnt=105
00..........cnt=106
00..........cnt=107
09..........cnt=108
03..........cnt=109
01..........cnt=110
80..........cnt=111
00..........cnt=112
00..........cnt=113
00..........cnt=114
00..........cnt=115
00..........cnt=116
00..........cnt=117
00..........cnt=118
00..........cnt=119
33..........cnt=120
C9..........cnt=121
8E..........cnt=122
D1..........cnt=123
8E..........cnt=124
C1..........cnt=125
8E..........cnt=126
D9..........cnt=127
BC..........cnt=128
D0..........cnt=129
7B..........cnt=130
BD..........cnt=131
00..........cnt=132
7C..........cnt=133
88..........cnt=134
16..........cnt=135
6F..........cnt=136
7C..........cnt=137
B4..........cnt=138
41..........cnt=139
BB..........cnt=140
AA..........cnt=141
55..........cnt=142
CD..........cnt=143
13..........cnt=144
72..........cnt=145
69..........cnt=146
81..........cnt=147
FB..........cnt=148
55..........cnt=149
AA..........cnt=150
75..........cnt=151
63..........cnt=152
F6..........cnt=153
C1..........cnt=154
01..........cnt=155
74..........cnt=156
5E..........cnt=157
FE..........cnt=158
06..........cnt=159
02..........cnt=160
7C..........cnt=161
66..........cnt=162
50..........cnt=163
B0..........cnt=164
65..........cnt=165
E8..........cnt=166
A6..........cnt=167
00..........cnt=168
66..........cnt=169
58..........cnt=170
66..........cnt=171
B8..........cnt=172
01..........cnt=173
00..........cnt=174
00..........cnt=175
00..........cnt=176
8A..........cnt=177
0E..........cnt=178
6D..........cnt=179
7C..........cnt=180
66..........cnt=181
D3..........cnt=182
E0..........cnt=183
66..........cnt=184
89..........cnt=185
46..........cnt=186
E8..........cnt=187
66..........cnt=188
B8..........cnt=189
01..........cnt=190
00..........cnt=191
00..........cnt=192
00..........cnt=193
8A..........cnt=194
0E..........cnt=195
6C..........cnt=196
7C..........cnt=197
66..........cnt=198
D3..........cnt=199
E0..........cnt=200
66..........cnt=201
89..........cnt=202
46..........cnt=203
D8..........cnt=204
66..........cnt=205
A1..........cnt=206
40..........cnt=207
7C..........cnt=208
66..........cnt=209
40..........cnt=210
BB..........cnt=211
00..........cnt=212
7E..........cnt=213
B9..........cnt=214
01..........cnt=215
00..........cnt=216
66..........cnt=217
50..........cnt=218
E8..........cnt=219
41..........cnt=220
00..........cnt=221
66..........cnt=222
58..........cnt=223
66..........cnt=224
40..........cnt=225
BB..........cnt=226
00..........cnt=227
80..........cnt=228
B9..........cnt=229
01..........cnt=230
00..........cnt=231
E8..........cnt=232
34..........cnt=233
00..........cnt=234
66..........cnt=235
50..........cnt=236
B0..........cnt=237
78..........cnt=238
E8..........cnt=239
5D..........cnt=240
00..........cnt=241
66..........cnt=242
58..........cnt=243
E9..........cnt=244
09..........cnt=245
01..........cnt=246
A0..........cnt=247
FC..........cnt=248
7D..........cnt=249
EB..........cnt=250
05..........cnt=251
A0..........cnt=252
FB..........cnt=253
7D..........cnt=254
EB..........cnt=255
00..........cnt=256
B4..........cnt=257
7D..........cnt=258
8B..........cnt=259
F0..........cnt=260
AC..........cnt=261
98..........cnt=262
40..........cnt=263
74..........cnt=264
0C..........cnt=265
48..........cnt=266
74..........cnt=267
0E..........cnt=268
B4..........cnt=269
0E..........cnt=270
BB..........cnt=271
07..........cnt=272
00..........cnt=273
CD..........cnt=274
10..........cnt=275
EB..........cnt=276
EF..........cnt=277
A0..........cnt=278
FD..........cnt=279
7D..........cnt=280
EB..........cnt=281
E6..........cnt=282
CD..........cnt=283
16..........cnt=284
CD..........cnt=285
19..........cnt=286
66..........cnt=287
60..........cnt=288
66..........cnt=289
6A..........cnt=290
00..........cnt=291
66..........cnt=292
50..........cnt=293
06..........cnt=294
53..........cnt=295
66..........cnt=296
68..........cnt=297
10..........cnt=298
00..........cnt=299
01..........cnt=300
00..........cnt=301
B4..........cnt=302
42..........cnt=303
B2..........cnt=304
80..........cnt=305
8A..........cnt=306
16..........cnt=307
6F..........cnt=308
7C..........cnt=309
8B..........cnt=310
F4..........cnt=311
CD..........cnt=312
13..........cnt=313
66..........cnt=314
58..........cnt=315
66..........cnt=316
58..........cnt=317
66..........cnt=318
58..........cnt=319
66..........cnt=320
58..........cnt=321
66..........cnt=322
61..........cnt=323
72..........cnt=324
B1..........cnt=325
03..........cnt=326
5E..........cnt=327
D8..........cnt=328
66..........cnt=329
40..........cnt=330
49..........cnt=331
75..........cnt=332
D1..........cnt=333
C3..........cnt=334
66..........cnt=335
60..........cnt=336
B4..........cnt=337
0E..........cnt=338
BB..........cnt=339
07..........cnt=340
00..........cnt=341
B9..........cnt=342
01..........cnt=343
00..........cnt=344
CD..........cnt=345
10..........cnt=346
66..........cnt=347
61..........cnt=348
C3..........cnt=349
42..........cnt=350
00..........cnt=351
4F..........cnt=352
00..........cnt=353
4F..........cnt=354
00..........cnt=355
54..........cnt=356
00..........cnt=357
4D..........cnt=358
00..........cnt=359
47..........cnt=360
00..........cnt=361
52..........cnt=362
00..........cnt=363
0D..........cnt=364
0A..........cnt=365
52..........cnt=366
65..........cnt=367
6D..........cnt=368
6F..........cnt=369
76..........cnt=370
65..........cnt=371
20..........cnt=372
64..........cnt=373
69..........cnt=374
73..........cnt=375
6B..........cnt=376
73..........cnt=377
20..........cnt=378
6F..........cnt=379
72..........cnt=380
20..........cnt=381
6F..........cnt=382
74..........cnt=383
68..........cnt=384
65..........cnt=385
72..........cnt=386
20..........cnt=387
6D..........cnt=388
65..........cnt=389
64..........cnt=390
69..........cnt=391
61..........cnt=392
2E..........cnt=393
FF..........cnt=394
0D..........cnt=395
0A..........cnt=396
44..........cnt=397
69..........cnt=398
73..........cnt=399
6B..........cnt=400
20..........cnt=401
65..........cnt=402
72..........cnt=403
72..........cnt=404
6F..........cnt=405
72..........cnt=406
FF..........cnt=407
0D..........cnt=408
0A..........cnt=409
50..........cnt=410
72..........cnt=411
65..........cnt=412
73..........cnt=413
73..........cnt=414
20..........cnt=415
61..........cnt=416
6E..........cnt=417
79..........cnt=418
20..........cnt=419
6B..........cnt=420
65..........cnt=421
79..........cnt=422
20..........cnt=423
74..........cnt=424
6F..........cnt=425
20..........cnt=426
72..........cnt=427
65..........cnt=428
73..........cnt=429
74..........cnt=430
61..........cnt=431
72..........cnt=432
74..........cnt=433
0D..........cnt=434
0A..........cnt=435
00..........cnt=436
00..........cnt=437
00..........cnt=438
00..........cnt=439
00..........cnt=440
00..........cnt=441
00..........cnt=442
00..........cnt=443
00..........cnt=444
00..........cnt=445
FF..........cnt=446
FF..........cnt=447
FF..........cnt=448
FF..........cnt=449
FF..........cnt=450
FF..........cnt=451
FF..........cnt=452
FF..........cnt=453
FF..........cnt=454
FF..........cnt=455
FF..........cnt=456
FF..........cnt=457
FF..........cnt=458
FF..........cnt=459
FF..........cnt=460
FF..........cnt=461
FF..........cnt=462
FF..........cnt=463
FF..........cnt=464
FF..........cnt=465
FF..........cnt=466
FF..........cnt=467
FF..........cnt=468
FF..........cnt=469
FF..........cnt=470
FF..........cnt=471
FF..........cnt=472
FF..........cnt=473
FF..........cnt=474
FF..........cnt=475
FF..........cnt=476
FF..........cnt=477
FF..........cnt=478
FF..........cnt=479
FF..........cnt=480
FF..........cnt=481
FF..........cnt=482
FF..........cnt=483
FF..........cnt=484
FF..........cnt=485
FF..........cnt=486
FF..........cnt=487
FF..........cnt=488
FF..........cnt=489
FF..........cnt=490
FF..........cnt=491
FF..........cnt=492
FF..........cnt=493
FF..........cnt=494
FF..........cnt=495
FF..........cnt=496
FF..........cnt=497
FF..........cnt=498
FF..........cnt=499
FF..........cnt=500
FF..........cnt=501
FF..........cnt=502
FF..........cnt=503
FF..........cnt=504
FF..........cnt=505
F6..........cnt=506
C8..........cnt=507
B9..........cnt=508
85..........cnt=509
5A..........cnt=510
A9..........cnt=511

结尾应该是55AA才对,中间漏了半个字节

0条回答

一周热门 更多>