3 Replies Latest reply on Oct 30, 2019 5:51 AM by YashwantK_46

    where did i find the read and write buffer in the msc example code

    vepe_4473991

      where did i find the read and write buffer in the msc example code.please let me know the buffer

        • 1. Re: where did i find the read and write buffer in the msc example code
          YashwantK_46

          Hi,

           

          There's no provision to see the read and write buffers in the MSC firmware.


          Regards,

          Yashwant

          • 2. Re: where did i find the read and write buffer in the msc example code
            vepe_4473991

            but how they are going to transfer the data too and from memory to host and host to memory. is it not possible. i need to find it. suggest me any procedure.

            thanks for your reply

            • 3. Re: where did i find the read and write buffer in the msc example code
              YashwantK_46

              Hello,

               

              The data transfer does take place through the DMA channel where the data from the host is directly sent to the DMA buffers over the UIB socket but there is no buffer pointer to these buffer and they are handled according to the CBW command which is the first packet that is sent from the host.

              The CBW is a 31-Byte packet in which the direction (read or write), transfer length, start address in the SD card and the number of blocks of data that needs to be written to the SD card are specified.


              Based on the direction and the transfer length, SD card is initialized.

              If the direction is a read operation, the specified length of data is picked from the start address specified and filled into the DMA buffers. But there's no buffer pointer to these buffers as all of this is taken care by the MSC class driver. The buffers are then directly committed to the host and a CSW packet is sent which tells that the data has been received by the host.

               

              In the same way. write transactions also take place:

              - Send 31-Byte CBW

              - Send the specified length of data and wait for its completion

              - Send CSW to check if the data was received

               

              The usage of MSC driver doesn't give room to perform any vendor specific operations as everything is controlled by that driver.

               

              And that's the reason why there's no provision to find the read and write in msc_example.


              Regards,Yashwant