• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Microcontrollers » MSP430™ Microcontrollers » MSP430 Ultra-Low Power 16-bit Microcontroller Forum » MSP430FR5739 CRC C code example
Share
MSP430™ Microcontrollers
  • Forum
  • Announcements
  • E2E Wiki
Options
  • Subscribe via RSS
MSP430 Resources
  • MSP430 Product Folder
  • MSP-EXP430G2 - MSP430 LaunchPad Value Line Development kit
  • MSP430 Getting Started Guide
  • MSP430 Microcontroller Projects
  • More Resources >
  • Forums

    MSP430FR5739 CRC C code example

    This question is answered
    Andres Mora
    Posted by Andres Mora
    on Jul 30 2012 13:45 PM
    Prodigy205 points

    Hello forum,

       I have a 9600 8N1 communication going on between two MSP430FR5739s and would like to integrate a check for corrupted messages using the CRC module. Does anyone have some C code around or can point me to an example that implements it? 

    Thanks in advance!

    MSP430FR5739 CRC C code example
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • kazola
      Posted by kazola
      on Jul 30 2012 15:05 PM
      Guru10665 points

      Hi!

      Some time ago I used something similar to the page 32 in this link:

      http://www.metratec.com/fileadmin/docs/en/documentation/metraTec_MiFare_Protocol-Guide.pdf

      In this link you have also something which the authors claim to be tested with Code Composer Studio :)

      http://www.ccsinfo.com/forum/viewtopic.php?t=24977

      Good luck!



      Please click the     Verify Answer     button on a post if it answers your question! :)

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Andres Mora
      Posted by Andres Mora
      on Jul 30 2012 16:50 PM
      Prodigy205 points

      Thanks Kazola!

          Those are helpful linkns, however, I am not looking into writing the CRC check routine but in learning how to use the already present CRC module/registers of the MSP430FR5739. I think implementing the CRC code would be doing the same job twice.

      Thanks again for you help though!

      Andres

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Chester Gillon
      Posted by Chester Gillon
      on Jul 30 2012 17:55 PM
      Mastermind6315 points

      Have you seen the examples\devices\5xx_6xx\MSP430F563x, MSP430F663x Code Examples\C\msp430f66xx_crc16_01.c example in MSP430ware_1_20_01_08?

      It compares the results of a software CRC against the CRC hardware module.

      (While this example was written for a different device, it also works on a MSP430FR5739 - you just have to change the #include<msp430f6638.h> to #include <msp430.h>)

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Andres Mora
      Posted by Andres Mora
      on Aug 06 2012 11:36 AM
      Prodigy205 points

      Hi Chester,

         Thanks for the information! Do you have the actual link to those files?

      Cheers!

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • TonyKao
      Posted by TonyKao
      on Aug 06 2012 16:17 PM
      Verified Answer
      Verified by Andres Mora
      Genius3770 points

      If you look at the device family user guide http://www.ti.com/lit/ug/slau272a/slau272a.pdf it appears the CRC unit is just a collection of registers to read and write data.

      // initializes CRC with seed, depends on CRC version
        CRCINIRES = seed;
        // write each word to input register
        for(i = 0; i < len; ++i)
          CRCDI = data[i];
        // reads CRC result
        int crcResult = CRCINIRES;

      I don't have the particular device so couldn't test it, but that should give you an idea for how to use the CRC unit.

      Tony

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Chester Gillon
      Posted by Chester Gillon
      on Aug 06 2012 16:21 PM
      Verified Answer
      Verified by Andres Mora
      Mastermind6315 points

      Andres Mora
      Do you have the actual link to those files?

      They are part of MSP430Ware.

      If you have Code Composer Studio 5 installed, the examples will under a directory such as C:\ti\ccsv5\ccs_base\msp430\msp430ware_1_20_00_16

      Failing that, http://www.ti.com/tool/msp430ware contains a download link.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Andres Mora
      Posted by Andres Mora
      on Aug 06 2012 16:50 PM
      Prodigy205 points

      Thanks a lot TonyKao and Chester! 

      TonyKao that was what I was looking for and Chester, sorry I didn't understand before what you meant but yes, after looking at CSS I found the examples you mentioned.

      Once again thanks a lot to the both of you!

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    TI E2E™ Community
    • Support Forums
    • Blogs
    • Videos
    • Groups
    • Site Support & Feedback
    • Settings
    TI E2E™ Community Groups
    • TI University Program
    • Make the Switch
    • Microcontroller Projects
    • Motor Drive & Control
    Other Communities
    • Deyisupport
    • Designsomething.org
    • beagleboard.org
    • TI on Element 14
    • TI on TechXchangeSM
    Other Technical & Support Resources
    • WEBENCH® Design Center
    • Product Information Centers
    • Technical Documents
    • TI Design Network
    • TI Technical Articles
    • TI Training

    All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

    Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

    Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
    TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

    TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
    embedded processors, along with software, tools and the industry’s largest sales/support staff.

    © Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
    Trademarks | Privacy Policy | Terms of Use