• 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 » USCI_Ax & USCI_Bx - 430F5419a.
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

    USCI_Ax & USCI_Bx - 430F5419a.

    This question is answered
    Jim Parr
    Posted by Jim Parr
    on Apr 20 2012 00:00 AM
    Prodigy60 points

    MSP430F5419a - 100pin quad flat pack.

    I would like to know if USCI_A0 & USCI_B0 can be operated simultaneously as Async UART & I2C master respectively.  From inspection of datasheet, the resources on-chip appear to be entirely separate and for all 4 of the _Ax & 4 _Bx modules, the only constraints I can see that would disallow implementing this would be pinning conflicts in some modes on some of the USCI_A/Bx channels.

    So as USCI_A0 (no harware handshake) is to run 9600 baud N81 asynch - pins 39/40 , and USCI_B0 as 2 wire 400kHz I2C pins 34/35, are there any gotchas?

    And I only ask because I am a newbie to MSP430 core & peripherals.  I am a little confused by statements in datasheet that imply up to four serial channels LIMIT.  But there are no statements I can find in user manual or datasheet "slas655b.pdf" that specifically say my desire to implement as above is illegal.

    I am I correct in the way I have interpreted this use of resource?  BTW I also wish to use USCI_A1 & A2 & A3 in this design and foresee no issues with those channels.

    Thanks in advance.

    Regards,

    Jim Parr

    MSP430 I2C UART USCI
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Leo Hendrawan
      Posted by Leo Hendrawan
      on Apr 20 2012 02:54 AM
      Mastermind27045 points

      Hi Jim,

      it shoul be possible to use USCI_Ax and USCI_Bx simultaneously. In my opinion, they can be seen as "separated" modules. I have never done it myself, but i have seen customers doing that.

      Hope this helps.

      Regards,

      Leo Hendrawan


      - Now that my signature has caught your attention, please click the "Verify Answer" button if this post answers your question. Thanks! -

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Jim Parr
      Posted by Jim Parr
      on Apr 20 2012 05:16 AM
      Prodigy60 points

      Hi Ihend,

      Thanks for very  prompt response to my query.  I assume that your comment means specifically in this case that USCI_A0 & USCI_B0 can be used provided no pinning resource conflicts.  I am nearly 100% sure this is your answer but there is a lot riding on this design at prototyping stage so want to be as sure as I can this is OK!

      I have been cutting a bit of code (successfully) in MSP430 - but new language 'C', new instruction set & new IDE environment to cope with all at once.  So thanks for this encouraging news.

      BTW, the generic user manual "slau208h.pdf" states the following...

      22.2.3 Voltage Reference Generator
      The ADC12_A module of the MSP430F54xx contains a built-in voltage reference with two selectable
      voltage levels, 1.5 V and 2.5 V. Either of these reference voltages may be used internally and externally
      on pin VREF+.
      The ADC12_A modules of other devices have a separate reference module that supplies three selectable
      voltage levels, 1.5 V, 2.0 V, and 2.5 V to the ADC12_A. Either of these voltages may be used internally
      and externally on pin VREF+.

      Again I am rather confused because the F5491a data-sheet clearly allows use of 2.0V internal reference.  I will be using 3V0 supply and have chosen 2.0V reference as best fit for this job when all parameters considered.

      Q. Can you tell me if 2.0V INTERNAL reference is usable on F5419a part?

      Cheers and thanks again Ihend,

      Jim

      MSP430 I2C UART USCI
      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 Apr 20 2012 05:45 AM
      Verified Answer
      Verified by Jim Parr
      Genius3770 points

      I suspect the "MSP430F54xx " referred to in the family guide is the MSP430F5491 without the -a, the older iteration of the chip.

      Tony

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Jim Parr
      Posted by Jim Parr
      on Apr 20 2012 05:51 AM
      Prodigy60 points

      Thanks Tony.  That makes perfect sense.  I need to go mining the TI document resource to find the latest documents and update my archives.
      Jim

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Leo Hendrawan
      Posted by Leo Hendrawan
      on Apr 20 2012 05:53 AM
      Verified Answer
      Verified by Jim Parr
      Mastermind27045 points

      Hi Jim

      Jim Parr

      I have been cutting a bit of code (successfully) in MSP430 - but new language 'C', new instruction set & new IDE environment to cope with all at once.  So thanks for this encouraging news.

      If you are still new to MSP430, i would recommend you to take a look at the software tools TI offers today, for example in this case as you are doing 5xx family, the MSP430ware: http://www.ti.com/tool/msp430ware

      This would help you to at least not writing anything from scratch.

      Jim Parr

      BTW, the generic user manual "slau208h.pdf" states the following...

      22.2.3 Voltage Reference Generator
      The ADC12_A module of the MSP430F54xx contains a built-in voltage reference with two selectable
      voltage levels, 1.5 V and 2.5 V. Either of these reference voltages may be used internally and externally
      on pin VREF+.
      The ADC12_A modules of other devices have a separate reference module that supplies three selectable
      voltage levels, 1.5 V, 2.0 V, and 2.5 V to the ADC12_A. Either of these voltages may be used internally
      and externally on pin VREF+.

      Again I am rather confused because the F5491a data-sheet clearly allows use of 2.0V internal reference.  I will be using 3V0 supply and have chosen 2.0V reference as best fit for this job when all parameters considered.

      Q. Can you tell me if 2.0V INTERNAL reference is usable on F5419a part?

      TonyKao

      I suspect the "MSP430F54xx " referred to in the family guide is the MSP430F5491 without the -a, the older iteration of the chip.

      Tony

      Tony is right in this case, Jim. The MSP430F54xx (without A) device do not have the REF (Reference Voltage Module) as the MSP430F54xxA devices. With the REF module it is of course possible to supply 2.0V reference voltage.

      Regards,

      Leo Hendrawan


      - Now that my signature has caught your attention, please click the "Verify Answer" button if this post answers your question. Thanks! -

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Jim Parr
      Posted by Jim Parr
      on Apr 20 2012 06:18 AM
      Prodigy60 points

      Thanks Ihend,

      I have taken a brief look at the CCStudio offerings.  Have bookmarked and will inspect over weekend (aside from the downtime On TI website this weekend).  I am using CCStudio for code development right now.

      My major learning curve issues are about coping with 'C' structures - because I am a 'dyed in the wool' assembler chap who knows how to get the very best performance out of micro-controllers.  So even the basic 'C' language abstractions leave me rather gob-smacked still.

      Don't get me wrong.  A project of this size and complexity needs 'C' to get it going.  But am very ambivalent about much of the object code I see generated.  Hopefully I will learn quickly how to exploit the language to better effect.

      Thanks for the resource link Ihend.  I am sure it will be most useful once I get myself properly saddled up.

      Best regards,

      Jim

      MSP430
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Jens-Michael Gross
      Posted by Jens-Michael Gross
      on Apr 20 2012 08:23 AM
      Verified Answer
      Verified by Jim Parr
      Guru139970 points

      Jim Parr
      I assume that your comment means specifically in this case that USCI_A0 & USCI_B0 can be used provided no pinning resource conflicts.

      Well, yes, except... You cannot operate one of teh A/B pair in 4-wire SPI mode if you want to use SPI on the other one too. Since there are only 6 pins assigned per USCI.
      Besides this, on 5x family the two mdoules can be seen as independent.
      On 2x family, however, A and B shared interrupt vectors for RX and TX. In newer 5x family, this has been changes into one single interrupt vector separately for each (sub-)module, that handles all interrupts of this (sub-)module.

      Jim Parr
      Again I am rather confused because the F5491a data-sheet clearly allows use of 2.0V internal reference.

      It's a major pitfall. The 54xx (non-A) did not have the internal REF module. 1.5 and 2.5V reference were controlled by teh ADC12.

      In 54xxA devices, there is a REF module. It offers 2V and overrides the ADC12 controls by default. However, for 1.5 and 2.5V reference, the ADC12 controls provide more options. You'll have to disable the REF module first.

      So the A devices are not 100% backwards compatible to the 54xx. They need at least an additional REFCTL &= ~REFMSTR; Which many people didn't notice at first.

      _____________________________________
      Before posting bug reports or ask for help, do at least quick scan over this article. It applies to any kind of problem reporting. On any forum. And/or look here.
      If you cannot discuss your problem in the public, feel free to start a private conversation: click on my name and then 'start conversation'. But please do so only if you really cannot do it in a public thread, as I usually read all threads. And I prefer to answer where others can profit from it (or contribute to it) too.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Jim Parr
      Posted by Jim Parr
      on Apr 20 2012 09:11 AM
      Prodigy60 points

      Thank you Mr Gross for your helpful comments.

      You appear to have also confirmed that my particular USCI usage is legal.  I fully understand the potential minefield of pinning conflicts but can see none for USCI_A0 and USCI_B0 when both in basic 2-wire modes (UART & I2C in this case).

      Ok your comments in respect of interrupt vectors for 2x/5x families.  Understood.  Vector sub-tables are always a pain -especially when all you might want to do is toggle a flag and hand back control.

      Thanks for this detail on ADC12.  I have understood all you wrote but need to verify for myself in data-sheets that the data-sheets I am using are kosher.  Interesting that you state option changes between REF module engaged and disengaged.  Will research this as a matter of priority to make sure that I have the right of it all B4 casting prototype artwork in concrete.

      Understood non-backward compliance between 54xx & 54xxA.  I am among those who did not notice.

      Thanks a lot for reply.

      Jim

      MSP430 I2C ADC12 UART Interrupt
      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 Apr 20 2012 15:48 PM
      Verified Answer
      Verified by Jim Parr
      Genius3770 points

      Jim Parr

      Don't get me wrong.  A project of this size and complexity needs 'C' to get it going.  But am very ambivalent about much of the object code I see generated.  Hopefully I will learn quickly how to exploit the language to better effect.

      You can always code the time/size critical parts of your program in assembly, then use the main C framework to "glue" them together.

      Also, have you tried playing with some of the optimizer options? You may be surprised at what the compiler can do in some instances. Of course nothing replaces human ingenuity. :)

      BTW, to compare code size you should look at the linker map instead of the intermediate object code themselves, since the object codes contain a lot of debug information as well as hints for the linker to help with optimization. The linker memory map would give a clearer picture of how much space you're actually using.

      Tony

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Jim Parr
      Posted by Jim Parr
      on Apr 21 2012 07:45 AM
      Prodigy60 points

      Thanks for the tips Tony.

      All understood.  I have fiddled with optimisation switches and settings - and yes this has made a difference in the past - especially to rather overburdened on-chip RAM.  For this reason I have added a 128Kbyte FRAM on the I2C bus to mitigate this problem (although frankly I have difficulty conceiving how a programmer can gobble 16Kbyte on-chip memory in course of orthodox coding of a program for a supervisory style project.

      I have inherited a basically well written program - previous model of product.  But I have now made HUGE alterations to the hardware in order to exploit ALL the on-chip CNTR/TMR peripheral hardware (as I/O) and also improve expandability - hence use of all USCI ports in various orthodox ways.  In other words, because the product exploits low-power modes of micro-controller in many ways, I have a fairly fiddly set of problems on my hands.  The consequent massive increase of interrupt oriented events will require very careful construction of code to meet the goals of project.  Oh well I would probably go stir-crazy if I didn't have a decent problem I can bite down on...

      I understand about the linker map - now.  Thanks especially for that tip.   Basically these appear to be 'assembler' equivalents so had little difficulty sorting out what you mean here.

      I have found the 'C' compiler quite tolerant of very BASIC structures and it seems to code these in a passably practical way.  So I may wind up using rather less in-line assembler when I have fully understood the concepts - in particular - usage of core register set as opposed to direct operations on RAM registers.  And all this is about correct scoping and management of variables and their type-casting methinks.

      I will get there.  Don't think it is going to be fun because I do not like the tools much (stupid and needless time-wasting communication difficulties with a PET for example).  But hey that's life.

      Best regards,

      Jim Parr

      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