From mboxrd@z Thu Jan 1 00:00:00 1970 From: amit mahadik Subject: Re: How to print CMD18 read data Date: Wed, 1 Feb 2017 14:18:40 +0530 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from mail-io0-f182.google.com ([209.85.223.182]:36647 "EHLO mail-io0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751404AbdBAIsm (ORCPT ); Wed, 1 Feb 2017 03:48:42 -0500 Received: by mail-io0-f182.google.com with SMTP id j13so151258751iod.3 for ; Wed, 01 Feb 2017 00:48:41 -0800 (PST) In-Reply-To: Sender: linux-mmc-owner@vger.kernel.org List-Id: linux-mmc@vger.kernel.org To: Jaehoon Chung , linux-mmc@vger.kernel.org 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 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 >> >> >