Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] SD card MBR interpretation issue

Status
Not open for further replies.

shankarrg

Newbie level 6
Joined
Jun 6, 2017
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
150
Hello,

Issue: MBR pointing to Empty sector as Relative/Boot sector.

I am interfacing SD card on ARM: LPC3250.On issuing READ_SINGLE_BLOCK(CMD17) command i am getting MBR output as below.
data[0] = 0x00000000
.....
data[110] = 0x00000000
data[111] = 0x02000000
data[112] = 0x3D06000A
data[113] = 0x0087BDFD
data[114] = 0xEF790000
data[115] = 0x0000003A
data[116] = 0x00000000
..........
data[127] = 0xAA550000

As per the other post and document-> I need to examine the partition tables located at offset 0x01BE in this sector and relative sector number at 0x1C6. attached snap below
SDcardmbr3.png

I am Interpreting above output i.e 0x00000087*512 = 0x10E00. (Relative/Boot sector address) as per SDCardmap.pdf attached below.

But when i open my 2GB SD card in Hex Editor Neo MBR is not visible, i am seeing BOOT sector at address 0x0000 attached snap below
SDcard.png

and @address 0x10E00 all the bytes are 0 snap below
10e00.png

1) why MBR is not visible in Hex Editor Neo?
2) Why MBR pointing to 0x10E00 location but boot sector start at location 0x0000 ?
3) I am using example code of LPC3250 initialize and read command sequence looks fine.

I tried both SDFormatter tool and Windows format Default/Fat16/Fat32, 4 different 2GB SD card of Transcend. Please help where am i missing I am stuck :bang:.
 

Attachments

  • SDCardMap.pdf
    774.3 KB · Views: 148

I do not know about the hex editor Neo, but all of the hex editors that I have used do not allow you to see the MBR. The method I use to see the MBR is to create an ISO file of the disk I wish to view and use a hex editor on that.
Tip I use the free HxD hex editor as I have found it to be the best one available.
 

Thanks for the replay pjmelect.

When i connect SD card by card reader it will detected as drive not disc. Is it possible to convert drive to ISO file? any software?
I tried HXD hex editor but same result(Drive not ISO file).
 

Yes it is possible to convert a drive (SD card) to an ISO, I used disc as a generic term to describe storage media. I use Ultra ISO to create the ISO file of a "drive" but I think that most ISO programs allow you to do this. I think that Ultra ISO gives you a free months trial to try it out.
 
try ' mkiso' a commandline utility for creating iso file from disk.
 

@pjmelect

Yes you are right image file gives MBR and Boot sector properly attached snap below
MBR
ImageMBR.png
BootSector @0x10e00(0x00000087*0x200)
ImageBoot.png

But when the Drive opened directly.NO MBR, Boot sector at address 0x00000(1st block).
MBR
DriveAdress000.png
BootSector @0x10e00(0x00000087*0x200)
DriveBoot.png

Code reading MBR properly as per ISO file. How to fix this?
I tried SD Card Formatter tool- SD Association and windows formatting, is there any better sd card format tool?
 

Could you explain in more detail what the problem is now, you cannot read the MBR sectors of a drive with any (that I know of) hex editor program, they all start at the boot sector of the first partition. It is easy to confuse the two sectors with a hex editor program as they look similar. The only way I know of to see or edit the MBR (please tell me if anyone knows another way) is to create a ISO or image of the drive.
What is wrong with the Windows formatting?
 

Problem solved: Yes i was confused with Hex editor.
as u said ISO Is right view of MBR(0x0000) and Bootsector(Relative address 0x00000087).

Thanks pjmelect & srizbf for ur time and kind replay.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top