CHS to LBA conversion - How to get CHS and SPT on uSD card?
I need to do conversion between CHS addressing to LBA using the following formula:
LBA = (( C x HPC ) + H ) x SPT + S - 1
where,
- C, H and S are the cylinder number, head number, and the sector number
- LBA is the logical block address
- HPC is the number of heads per cylinder
- SPT is the number of sectors per track
but I just don't know where and how to get those from a uSD card? Is there any way to get them using the MMC/SDIO HAL library or FATFS?