Author Topic: How to access 2nd and 3rd partition on an SDCard...  (Read 23398 times)

st2000

  • Member
  • ***
  • Posts: 44
How to access 2nd and 3rd partition on an SDCard...
« on: April 07, 2011, 11:47:09 am »
Hi...

Had this question posted in the Microchip forums for a day and haven't "caught any fish" yet.  I figure most here including Jan work with the Microchip PIC and might have some insight:

---

Wanted to know if any have managed to access a 2nd or 3rd partition on an SDCard.  I doubt current Microchip code can do this.  I have accessed the 1st and 2nd device (SCSI / LUN level) on a USB device by changing the Microchip MSD drivers (the USB drivers were ok "as is" for that project).  I simply changed from a LUN of 0 to a LUN of 1 and the lower level Microchip code worked.

Now I find my self needing multiple partitions on an single SDCard (long story - mostly to do with non-standard accessing of a FAT file system).  My solution is to spread out data across different partitions.  I was hoping someone has already tried this and knows all about how to make up a batch of "secret sauce".

---

-thanks

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: How to access 2nd and 3rd partition on an SDCard...
« Reply #1 on: April 12, 2011, 10:46:37 am »
The only possibility I can think of is to comb through the Linux source code.

Jan

st2000

  • Member
  • ***
  • Posts: 44
Re: How to access 2nd and 3rd partition on an SDCard...
« Reply #2 on: April 12, 2011, 12:41:38 pm »
I was hoping someone would verify that multiple partitions on a device like an SDCard would be accessible using different values of LUN (i.e. LUN = 0 for the first partition and LUN = 1 for the second) with in the Microchip Solutions code (which, BTW has LUN hard coded to 0 - but I've tried and gotten it to talk to a USB device with multiple MSD inside of it (right term??) by setting LUN to 0 and 1).