• 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 » Data Converters » Precision Data Converters » Precision Data Converters Forum » RE: spi double buffer testing in msc1210 y5
Share
Precision Data Converters
  • Forum
  • Files
  • E2E Wiki
Options
  • Subscribe via RSS
Check out
The Signal blog
  • $core_v2_blog.Current.Name

    Grounding Principles

    Posted 3 days ago
    by Bruce Trump
    In a previous blog on supply bypassing , I cautioned that poor...
  • $core_v2_blog.Current.Name

    Handy Gadgets and Resistor Divider Calculations

    Posted 10 days ago
    by Bruce Trump
    Handy gadgets make our engineering life easier—the little...
  • $core_v2_blog.Current.Name

    Chopper Op Amps—are they really noisy?

    Posted 18 days ago
    by Bruce Trump
    Chopper op amps offer very low offset voltage and dramatically...

Forums

RE: spi double buffer testing in msc1210 y5

  • Teik Eng Ewe
    Posted by Teik Eng Ewe
    on Dec 26 2012 04:38 AM
    Prodigy75 points

    Hi Bob,

    I'm trying to setup SPI with double bufferred settings with poling, but I'm having difficulty on making it works. After comparing the test package, I found out that you set the FIFO bit of SPICON. However, I read it some of your literature (Revised Nov 2004) and errata warn about not using the FIFO due to unstability. Is that true?

    The following is my configurations and function call for transmission (SCK, MISO, MOSI & SS are the P1 bits):

    void SPI_Init()
    {
      PDCON&=~0x01; // turns on SPI
     //CYCLOPS - Enable SPI channels as master
     P1DDRH=0x75;  //CMOS Out
     //P1DDRH=0xBA;  //Open Drain
     //P1DDRH=0x30;  //Pull Up
     SCK=1;
     MISO=1;
     MOSI=1;
     SS=1;
     SPICON=0xE6; // ClkDiv=111(clk/256), Order=0, MSTR=1, CPHA=1, CPOL=0
     SPITCON=0x28;
    }

    char SPI_Transmit (char TxData)
    {
     while ((AIE&0x08) != 0x08){}
      SPIDATA=TxData;
     while ((AIE&0x04) != 0x04){}
      return(SPIDATA);
    }

    I've also tried the sample code in the user guide sba077, it is not working as well. Do you have sample code to configure double buffered with poling?

    Thanks. 

    MSC1210 SPI
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Bob Benjamin
    Posted by Bob Benjamin
    on Dec 26 2012 16:37 PM
    Mastermind34195 points

    Hi Andrew,

    Unfortunately I'm out of the office on vacation/holiday break.  I'll be back into the office the middle of next week and will get an answer as soon as I can.

    Best regards,

    Bob B

    MSC1210
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Teik Eng Ewe
    Posted by Teik Eng Ewe
    on Dec 28 2012 02:43 AM
    Prodigy75 points

    Hi Bob,

    Sorry for troubling you on your vacation. I hope you enjoy your holidays!

    Some update for you. I manage to configure the MSC1211 EVM SPI communication (active high/no SS) to work on double buffered polling on every 1 second interrupt, but not to the settings I wish (16 bits per transfer using active low Slave Select pin). My settings are:

     PDCON&=~0x03; // turns on System Timer and SPI
     P1DDRH=0x75; // CMOS output (push pull) for P1.7, P1.5 and P1.4
     SPICON=0x44; // Divide 8, FIFO off, msb, master, CPHA=0 
     SPITCON=0x28; // SCK driver on

    1) As a SPI Master, do I need to manually negate slave select pin for every transfer?

    2) I'm planning to send 2 bytes in one SPI transfer, with manually toggling the SS pin before and after sending 2 bytes.However, it seems that MSC1211 automatically deassert and assert the SS pin after the first byte being sent (tested with CPHA=0 and CPHA=1 and both give the same result). How do I overcome this?

    Thanks and happy new year.

    SPI MSC1211
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Bob Benjamin
    Posted by Bob Benjamin
    on Dec 28 2012 13:52 PM
    Mastermind34195 points

    Hi Andrew,

    Happy New Year to you too!  Typically the SS pin when operating as a master will drive the pin low for every single byte sent.  This is problematic for devices that use multi-byte transactions.  Some micros allow for a larger transaction size, but these are usually related to 16 bit processors and higher.

    One way of getting around this is to use the SS pin as a GPIO (instead of part of the SPI interface) and manually control the pin for transactions that are larger than a byte in size.

    Best regards,

    Bob B

    MSC1210 MSC1211
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Teik Eng Ewe
    Posted by Teik Eng Ewe
    on Jan 03 2013 23:43 PM
    Prodigy75 points

    Hi Bob,

    Is the Errata #1 in SBAS203A still valid? It is about not recommending the use of FIFO for SPI.

    Rgds,

    Andrew

    MSC1210Y5 Errata
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Bob Benjamin
    Posted by Bob Benjamin
    on Jan 04 2013 14:50 PM
    Mastermind34195 points

    Hi Andrew,

    The errata is still valid.  In fact if you look at the current datasheet for the MSC1210 there is not even an option listed for FIFO mode in SPICON register.  This differs from the MSC1211 which has a separate errata for specific lots.

    Best regards,

    Bob B

    MSC1210
    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