* How to print CMD18 read data @ 2017-02-01 7:23 ` amit mahadik 2017-02-01 8:08 ` Jaehoon Chung 0 siblings, 1 reply; 6+ messages in thread From: amit mahadik @ 2017-02-01 7:23 UTC (permalink / raw) To: linux-mmc Hello, I want to interface MMC card via SPI bus. However, I am getting CRC errors for CMD18. I tried reading partition table using CMD17 but still get errors. The same SDMMC card gets detected using SD interface. I want to compare the data of CMD18/CMD17 of SD and SPI modes. Please let me know how can I print the read data of the said commands in the block layer? I tried using the following code but it didn't help sg_copy_to_buffer(brq->data.sg, brq->data.sg_len, buf, 4096); and printed buf. Regards, Amit. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to print CMD18 read data 2017-02-01 7:23 ` How to print CMD18 read data amit mahadik @ 2017-02-01 8:08 ` Jaehoon Chung 2017-02-01 8:48 ` amit mahadik 0 siblings, 1 reply; 6+ messages in thread From: Jaehoon Chung @ 2017-02-01 8:08 UTC (permalink / raw) To: amit mahadik, linux-mmc Hi, On 02/01/2017 04:23 PM, amit mahadik wrote: > Hello, > I want to interface MMC card via SPI bus. However, I am > getting CRC errors for CMD18. I tried reading partition table using > CMD17 but still get errors. > The same SDMMC card gets detected using SD interface. I want to > compare the data of CMD18/CMD17 of SD and SPI modes. Please let me > know how can I print the read data of the said commands in the block > layer? In my experience, CRC error was timing issue..(clock, driver-strength, etc..) You can check those things. Best Regards, Jaehoon Chung > > I tried using the following code but it didn't help > > sg_copy_to_buffer(brq->data.sg, brq->data.sg_len, buf, 4096); and printed buf. > > Regards, > Amit. > -- > To unsubscribe from this list: send the line "unsubscribe linux-mmc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to print CMD18 read data 2017-02-01 8:08 ` Jaehoon Chung @ 2017-02-01 8:48 ` amit mahadik 2017-02-01 11:43 ` Jaehoon Chung 0 siblings, 1 reply; 6+ messages in thread From: amit mahadik @ 2017-02-01 8:48 UTC (permalink / raw) To: Jaehoon Chung, linux-mmc Hi Jaehoon, Thanks for replying promptly. adding more debug prints I see that CMD9(CSD) CMD51(SSR) values in case of SD and SPI mode are the same. Only command that troubles is CMD18. My clock setting is 25Mhz and the card is working at 3.3V. Regards, Amit. On Wed, Feb 1, 2017 at 1:38 PM, Jaehoon Chung <jh80.chung@samsung.com> wrote: > Hi, > > On 02/01/2017 04:23 PM, amit mahadik wrote: >> Hello, >> I want to interface MMC card via SPI bus. However, I am >> getting CRC errors for CMD18. I tried reading partition table using >> CMD17 but still get errors. >> The same SDMMC card gets detected using SD interface. I want to >> compare the data of CMD18/CMD17 of SD and SPI modes. Please let me >> know how can I print the read data of the said commands in the block >> layer? > > In my experience, CRC error was timing issue..(clock, driver-strength, etc..) > You can check those things. > > Best Regards, > Jaehoon Chung > >> >> I tried using the following code but it didn't help >> >> sg_copy_to_buffer(brq->data.sg, brq->data.sg_len, buf, 4096); and printed buf. >> >> Regards, >> Amit. >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html >> >> > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to print CMD18 read data 2017-02-01 8:48 ` amit mahadik @ 2017-02-01 11:43 ` Jaehoon Chung 2017-02-01 12:16 ` amit mahadik 0 siblings, 1 reply; 6+ messages in thread From: Jaehoon Chung @ 2017-02-01 11:43 UTC (permalink / raw) To: amit mahadik, linux-mmc On 02/01/2017 05:48 PM, amit mahadik wrote: > Hi Jaehoon, > Thanks for replying promptly. adding more debug > prints I see that CMD9(CSD) CMD51(SSR) values in case of SD and SPI > mode are the same. Only command that troubles is CMD18. My clock > setting is 25Mhz and the card is working at 3.3V. I don't have a knowledge about SPI mode..it might have the difference initial sequence. How about checking "use_spi_crc"?..Someone might have much knowledge for SPI mode. :) Best Regards, Jaehoon Chung > > Regards, > Amit. > > On Wed, Feb 1, 2017 at 1:38 PM, Jaehoon Chung <jh80.chung@samsung.com> wrote: >> Hi, >> >> On 02/01/2017 04:23 PM, amit mahadik wrote: >>> Hello, >>> I want to interface MMC card via SPI bus. However, I am >>> getting CRC errors for CMD18. I tried reading partition table using >>> CMD17 but still get errors. >>> The same SDMMC card gets detected using SD interface. I want to >>> compare the data of CMD18/CMD17 of SD and SPI modes. Please let me >>> know how can I print the read data of the said commands in the block >>> layer? >> >> In my experience, CRC error was timing issue..(clock, driver-strength, etc..) >> You can check those things. >> >> Best Regards, >> Jaehoon Chung >> >>> >>> I tried using the following code but it didn't help >>> >>> sg_copy_to_buffer(brq->data.sg, brq->data.sg_len, buf, 4096); and printed buf. >>> >>> Regards, >>> Amit. >>> -- >>> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in >>> the body of a message to majordomo@vger.kernel.org >>> More majordomo info at http://vger.kernel.org/majordomo-info.html >>> >>> >> > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to print CMD18 read data 2017-02-01 11:43 ` Jaehoon Chung @ 2017-02-01 12:16 ` amit mahadik 2017-02-01 18:00 ` David Haworth 0 siblings, 1 reply; 6+ messages in thread From: amit mahadik @ 2017-02-01 12:16 UTC (permalink / raw) To: Jaehoon Chung; +Cc: linux-mmc Hi Jaehoon, I tried the use_spi_crc=0 option too. However, if the data read is incorrect the block layer has no way of knowing the contents of partition table. That is the reason it fails to detect partitions of the connected SDMMC card. Regards, Amit. On Wed, Feb 1, 2017 at 5:13 PM, Jaehoon Chung <jh80.chung@samsung.com> wrote: > On 02/01/2017 05:48 PM, amit mahadik wrote: >> Hi Jaehoon, >> Thanks for replying promptly. adding more debug >> prints I see that CMD9(CSD) CMD51(SSR) values in case of SD and SPI >> mode are the same. Only command that troubles is CMD18. My clock >> setting is 25Mhz and the card is working at 3.3V. > > I don't have a knowledge about SPI mode..it might have the difference initial sequence. > How about checking "use_spi_crc"?..Someone might have much knowledge for SPI mode. :) > > Best Regards, > Jaehoon Chung > >> >> Regards, >> Amit. >> >> On Wed, Feb 1, 2017 at 1:38 PM, Jaehoon Chung <jh80.chung@samsung.com> wrote: >>> Hi, >>> >>> On 02/01/2017 04:23 PM, amit mahadik wrote: >>>> Hello, >>>> I want to interface MMC card via SPI bus. However, I am >>>> getting CRC errors for CMD18. I tried reading partition table using >>>> CMD17 but still get errors. >>>> The same SDMMC card gets detected using SD interface. I want to >>>> compare the data of CMD18/CMD17 of SD and SPI modes. Please let me >>>> know how can I print the read data of the said commands in the block >>>> layer? >>> >>> In my experience, CRC error was timing issue..(clock, driver-strength, etc..) >>> You can check those things. >>> >>> Best Regards, >>> Jaehoon Chung >>> >>>> >>>> I tried using the following code but it didn't help >>>> >>>> sg_copy_to_buffer(brq->data.sg, brq->data.sg_len, buf, 4096); and printed buf. >>>> >>>> Regards, >>>> Amit. >>>> -- >>>> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in >>>> the body of a message to majordomo@vger.kernel.org >>>> More majordomo info at http://vger.kernel.org/majordomo-info.html >>>> >>>> >>> >> >> > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to print CMD18 read data 2017-02-01 12:16 ` amit mahadik @ 2017-02-01 18:00 ` David Haworth 0 siblings, 0 replies; 6+ messages in thread From: David Haworth @ 2017-02-01 18:00 UTC (permalink / raw) To: amit mahadik; +Cc: Jaehoon Chung, linux-mmc Hi Amit, I'm trying to access an SD card/reader using SPI on a Raspberry Pi. I've had a little success - some of my cards work, some don't. I get errors from time to time, but they appear harmless. I seem to have cured a spurious timeout problem. I'm using pr_info() to dump debug messages into /var/log/syslog. Maybe we can compare notes and come up with a solution. Contact me off-list of you prefer. Cheers, Dave On Wed, Feb 01, 2017 at 05:46:34PM +0530, amit mahadik wrote: > Hi Jaehoon, > I tried the use_spi_crc=0 option too. However, > if the data read is incorrect the block layer has no way of knowing > the contents of partition table. That is the reason it fails to detect > partitions of the connected SDMMC card. > > Regards, > Amit. -- David Haworth Baiersdorf, Germany dave@fen-net.de PGP key at https://keyserver.pgp.com/ http://thelancashireman.org ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-02-01 18:00 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CGME20170201072351epcas2p4b40fc91e204153ce57d510622ab021cc@epcas2p4.samsung.com> 2017-02-01 7:23 ` How to print CMD18 read data amit mahadik 2017-02-01 8:08 ` Jaehoon Chung 2017-02-01 8:48 ` amit mahadik 2017-02-01 11:43 ` Jaehoon Chung 2017-02-01 12:16 ` amit mahadik 2017-02-01 18:00 ` David Haworth
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.