• 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 » Stellaris® ARM® Microcontrollers » Stellaris® ARM® LM3S Microcontrollers Forum » Sampling the MISO pin in SPI mode
Share
Stellaris® ARM® Microcontrollers
  • Forum
Options
  • Subscribe via RSS

Sampling the MISO pin in SPI mode

Sampling the MISO pin in SPI mode

This question is answered
David Pfaltzgraff
Posted by David Pfaltzgraff
on Dec 26 2012 09:46 AM
Expert1320 points

I am trying to interface a Microcip MCP3553 to a LM3S5749. In this case the MISO pin is used to indicate the ready state prior to having the data clocked out.

Is it possible to sense this pin as an input port when the SPI mode is set? Or, do I need to 'close' the SPI mode to sample the pin and then enable SPI mode to get the data?

 

SPI
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • cb1-
    Posted by cb1-
    on Dec 26 2012 12:14 PM
    Mastermind9430 points

    David Pfaltzgraff
    Is it possible to sense this pin as an input port when the SPI mode is set?

    I don't believe so - recall that SPI data is both written and read only when the SPI clock "ticks."

    You could switch the SPI port on/off as you suggest.  I'd prefer to use a separate GPIO - dedicated to reading your MCP3553 status.  This pin would thus "signal" your SPI to start its process...

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • David Pfaltzgraff
    Posted by David Pfaltzgraff
    on Dec 27 2012 08:58 AM
    Expert1320 points

    In this particular case, I need to hold the CLK line high while I monitor the MISO pin. When I disable the SSI module, do I need to set up the DIR and DATA registers again?

    My presumption was that when I set the DIR and DATA registers, the values would remian there and would be 'in effect' when the SSI was disabled. But, this doesn't appear to be the case. (Still investigating.)

    Just for background, I am trying to avoid adding the input to another pin since my soldering skills don'r go wuite that small! If necessary, I'll do it, but...

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • cb1-
    Posted by cb1-
    on Dec 27 2012 09:57 AM
    Mastermind9430 points

    The SPI module - with all of its operating modes - is significantly challenging by itself - your "presumptions" (while clever) may be too much to ask.  (and really must be confirmed)

    We always bring each/every MCU's GPIO pin out to an edge connector on our custom boards.  (avoids your soldering dilemma)  The new launchpad is ~14 USD - perhaps that's a better choice for your experiment.

    You add new, "facts in evidence" with your restriction on CLK line being high during MISO monitoring.  Shouldn't you determine which of the multiple Stellaris SSI "configurations" best suit your external SSI chip - and start your design effort from that?  IIRC "some" configurations do leave CLK high - but these may not prove proper for things such as, "clock edges" and number of bits required. 

    You really do need to review the slave SSI chip's data requirements - and then choose the most appropriate Stellaris SSI configuration.  (and this may not result in CLK being "high" during SSI "idle.")  Should this be the case - appears that you have no choice but to exit SSI mode - configure SSI_CLK to be normal GPIO - and set it as output with level high.  Then configure SSI_MISO also as normal GPIO - as an input - and either loop on this or trigger an interrupt when your slave drives high. 

    Once you detect the slave's "ready" you must configure your SSI Port for the most appropriate SSI mode.  Not the most efficient means but should meet your objective. 

    You may want to search for a more conventional SSI slave - one without these strange signal (non SPI normal/customary) demands...

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • David Pfaltzgraff
    Posted by David Pfaltzgraff
    on Dec 27 2012 10:13 AM
    Expert1320 points

    You make too many presumptions. For one, the MCP3553 was chosen prior to choosing the LM3S processor family. The second is that this is on a custom board - already laid out. Finally, as far as I can tell, the Lauchpad doesn't support the LM3S family. As far as I can tell TI is abandoning the LM3S family even though there is no equivalent in the LM4F family. (See other posts!)

    To make my life simple, if the SSI Tx (MOSI) is unused and the SSI pins are configured with:

    GPIOPinTypeSSI(GPIO_PORTE_BASE, (GPIO_PIN_0 | GPIO_PIN_2);

    is GPIO_PIN_3 available for reguglar GPIO use? In this case a blob of solder across pins 95 and 96 will do the job for me.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • cb1-
    Posted by cb1-
    on Dec 27 2012 10:21 AM
    Mastermind9430 points

    You have the board - should be quick/easy for you to code and observe...  (I've no experience w/your part - or partially liberating an SSI pin)

    btw - your post is not the friendliest - the advice I provided is sound and may help others - as well.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • David Pfaltzgraff
    Posted by David Pfaltzgraff
    on Dec 27 2012 11:01 AM
    Verified Answer
    Verified by David Pfaltzgraff
    Expert1320 points

    To answer the primary question, yes you can use the Tx (MOSI) pin as a separate I/I when it is not allocated to the SSI function.

    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