+ Post New Thread
Results 1 to 11 of 11
  1. #1
    Newbie level 4
    Points: 33, Level: 1

    Join Date
    Nov 2019
    Posts
    5
    Helped
    0 / 0
    Points
    33
    Level
    1

    SD Card Identification

    How sd host controller knows whether a SD card is put in the connector slot

    •   AltAdvertisement

        
       

  2. #2
    Super Moderator
    Points: 261,068, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    45,599
    Helped
    13871 / 13871
    Points
    261,068
    Level
    100

    Re: SD Card Identification

    In the first place by reading the detect switch.


    1 members found this post helpful.

  3. #3
    Newbie level 4
    Points: 33, Level: 1

    Join Date
    Nov 2019
    Posts
    5
    Helped
    0 / 0
    Points
    33
    Level
    1

    Re: SD Card Identification

    Quote Originally Posted by FvM View Post
    In the first place by reading the detect switch.
    But there is no physical pin in SD card for this purpose. Then how the detect switch will set, when SD card is inserted in the connector



    •   AltAdvertisement

        
       

  4. #4
    Super Moderator
    Points: 81,682, Level: 69
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    13,393
    Helped
    4469 / 4469
    Points
    81,682
    Level
    69

    Re: SD Card Identification

    Not on the SD card, on the socket it plugs in to!

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.


    1 members found this post helpful.

    •   AltAdvertisement

        
       

  5. #5
    Newbie level 4
    Points: 33, Level: 1

    Join Date
    Nov 2019
    Posts
    5
    Helped
    0 / 0
    Points
    33
    Level
    1

    Re: SD Card Identification

    I have one more doubt, how processor inform sd host controller that it want to delete a particular folder in the sd card.



  6. #6
    Super Moderator
    Points: 81,682, Level: 69
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    13,393
    Helped
    4469 / 4469
    Points
    81,682
    Level
    69

    Re: SD Card Identification

    That is usually dealt with by the operating system but is also depends on the way the SD card is formatted. Deleting a file generally means looking up its name in a directory, finding its allocation table (FAT) entry then marking the location as re-usable. Files are not normally deleted but the space they are stored is made available for another file to occupy.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  7. #7
    Newbie level 4
    Points: 33, Level: 1

    Join Date
    Nov 2019
    Posts
    5
    Helped
    0 / 0
    Points
    33
    Level
    1

    Re: SD Card Identification

    Actually I am thinking in pin level transaction perspective. The master side (Processor side) of sd host controller may have an AXI interface or a generic 32 bit interface. It can pass a read request and write request, but how it can pass a delete request to the sd host controller?



  8. #8
    Super Moderator
    Points: 81,682, Level: 69
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    13,393
    Helped
    4469 / 4469
    Points
    81,682
    Level
    69

    Re: SD Card Identification

    You are confusing the electronic level and the filing system levels. There are only two electronic operations, read bits and write bits, they apply whatever operations you want to achieve. When considering files you have think in terms of structures of data and how to manipulate them. There are still R/W operations but you have to set read addresses to access the structures, for example the file directory, and based on what you read, then perform write operations to free the file addresses. There is no byte level operation to delete any file.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.


    1 members found this post helpful.

  9. #9
    Newbie level 4
    Points: 33, Level: 1

    Join Date
    Nov 2019
    Posts
    5
    Helped
    0 / 0
    Points
    33
    Level
    1

    Re: SD Card Identification

    I am a verification engineer (fresher). I want to verify a SD host controller(which is a black box to me). I am thinking how can i trigger a delete sequence of the SD host controller



    •   AltAdvertisement

        
       

  10. #10
    Super Moderator
    Points: 261,068, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    45,599
    Helped
    13871 / 13871
    Points
    261,068
    Level
    100

    Re: SD Card Identification

    You should learn about SD Card protocol, read Physical Layer Simplified Specification. https://www.sdcard.org/downloads/pls/index.html



  11. #11
    Advanced Member level 5
    Points: 17,407, Level: 31
    Achievements:
    7 years registered

    Join Date
    Nov 2012
    Posts
    3,185
    Helped
    784 / 784
    Points
    17,407
    Level
    31

    Re: SD Card Identification

    files are logical structures; they exist only in software. When you go to the hardware, you see no files, just blocks of data. However, some devices can at the low level work at the character or byte level.

    The mapping between a file and a group of blocks is done at the software and also partly at the controller level. That is the reason a given hardware can be formatted for different types of filesystems.

    When you delete a file, you just mark the corresponding blocks as free. Much of this information is written on the directory itself (which is itself a file) in terms of a chain of block numbers.

    The controller and the operating system talk via the device driver. Therefore first thing first: you need to get into the depths of the device driver.



--[[ ]]--