CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

CRC7 routine

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
EdWaugh



Joined: 07 Dec 2004
Posts: 127
Location: Southampton, UK

View user's profile Send private message

CRC7 routine
PostPosted: Fri May 13, 2005 6:51 am     Reply with quote

Hi all,

Given the current excitement over MMC/SD cards I was just wondering if anyone had a working crc7 routine. I'm adding CRCs to the data (CCITT16) with the CCS function but my compiler version doesn't have 7bit version and the 8bit is different I think. Does anyone have a routine that works or a way to adjust the 8bit one? Otherwise I guess I'll just have to do the maths.

cheers

ed
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Fri Oct 06, 2006 8:24 am     Reply with quote

I know it is an old thread but I stumbled upon some information that I want to share.

In another thread Ed wrote
EdWaugh wrote:
I don't suppose either of you guys have any tips for this crc7 thing? I have tried a couple of routines and i'm pretty sure I'm getting the starting and polynomial values correct but don't seem to be able to generate the same result for the one example I have which is for the out of reset instr (I think)
Quote:
0x40,0x00,0x00,0x00,0x00,0x95
Any suggestionswould be welcome.
For the reset command the MMC card is still in MultiMediaCard bus mode where each message ends with an end bit, always set to '1'. So here the real CRC value is not 0x95 but
(0x95>>1) = 0x4A
EdWaugh



Joined: 07 Dec 2004
Posts: 127
Location: Southampton, UK

View user's profile Send private message

nice work
PostPosted: Fri Oct 06, 2006 9:12 am     Reply with quote

Hi ckielstra,

Thanks for the info, I always wondered what that was about. I got it working fine in the end just left shifting in a 1 everytime I calculate the CRC. The cards don't seem to care once they're in SPI mode so it worked for everything.

cheers

ed
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group