martind1983
Joined: 22 Mar 2013 Posts: 16
|
first sector (sector 0) in SD card |
Posted: Thu Apr 04, 2013 12:30 am |
|
|
Hello.
I want to ask. Each time when I use fat_init() function, where function mmcsd_init() is built for initialization and loading buffer I seen, that mmcsd_init() function passes well. But in general I don't get correct values to fat_init() function variables (bytes per sector, sectors per cluster, Root_dir all those values necessary for FAT32 format). I see mmcsd_init() function always set "g_mmcsdBufferAddress" to 0 and it causes that data are loaded from first sector(block) of SDcard, but I think on first sector (sector 0) there are saved native data for SD card not FAT32. And it causes fault loading of FAT32 values to variables in fat_init() function.
So how can I find out sector address for FAT32 values on SD card or is able to set any sectors to which shouldn't be able to access in SD card registers? In SD card specs, I read that in CSD register is saved value for WP_GROUP (write_protected_group) sectors, but I don't know if those are first sectors I should jump over and behind them will finally be FAT32 sectors.
L.W. I am sure that card reading is correct, because I also read SD card with disk investigator application and it finds all data on SD card which I was able to find too by passing function mmcsd_load_buffer() when I was changing addresses. Only initial address in mmcsd_init() function for buffer loading is not set correct. How to solve it?
Thanks for your help.
Thanks for your help |
|