• 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 » mpyi
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 >
  • mpyi

    mpyi

    This question is answered
    omry cohen
    Posted by omry cohen
    on Aug 09 2012 03:15 AM
    Prodigy110 points

    hi

    im working with MSP430F2272

    i run my program (on CC5) and after few minutes when i pause it

    it gave me the message:

    No source available for "_mpyi() at 0x88bc"

    could some one tell why

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Mo.
      Posted by Mo.
      on Aug 09 2012 03:48 AM
      Genius11020 points

      omry cohen
      No source available for "_mpyi() at 0x88bc"

      It seems that you have a multiplication in your code using the Hardware Multiplier support in CCS. Is that correct?

      Can you provide this code?

      BR,

      Mo.

      Make The Switch to TI MCUs

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • omry cohen
      Posted by omry cohen
      on Aug 09 2012 05:19 AM
      Prodigy110 points

      i didnt understand exactly what do tou mean by "using the Hardware Multiplier support in CCS".

       

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Mo.
      Posted by Mo.
      on Aug 09 2012 06:33 AM
      Verified Answer
      Verified by omry cohen
      Genius11020 points

      In the project properties, under Build -> MSP430 Linker -> Basic Options: "Link in hardware version of RTS mpy routine (--use_hw_mpy)".  Here you have choices for the 16-bit or 32-bit multiplier, depending on your MSP430 variant.

      From the command line, the replacement is invoked with the linker option '--use_hw_mpy[={16/32/F5}]'.

      Using this, the compiler / linker makes use of the hardware multiplier whenever it sees a multiplication in your code.  In the assembly code listing,  you should see the set-up and then "CALLA #__mpyi_hw" for the call to the routine to use the hardware multiplier (with the correct routine for signed, unsigned, ....)

      BR,

      Mo.

      Make The Switch to TI MCUs

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • omry cohen
      Posted by omry cohen
      on Aug 09 2012 06:58 AM
      Prodigy110 points

      THANKS

      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 Aug 09 2012 11:27 AM
      Guru141810 points

      _mpyi() is a function that does an integer multiplication. It is part of the C runtime library (along with e.g. the startup code that initializes the variables in ram etc.)
      It is automatically linked-in when the MSP has no hardware multiplier or if its use is disabled.
      Since it comes form a library, the debugger has no source code for it.

      Switch to assembly view and follow the code in single-steppign until it returns to your program code, where source is available. Most likely a multiplication.

      _____________________________________
      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.
    • Arsen Norman
      Posted by Arsen Norman
      on Jan 30 2013 18:39 PM
      Prodigy225 points

      Hello.

      I'm using H/W multiplier. Below are the sample C code,  assembly output and dis-assembly step through.

      The '__mpyi' actually jumps to a code that puts values in &MPY and &OP2 (per user guide) for h/w mutiplication.

      #include "msp430x26x.h"
      int x, y, z;
      void main(void){
          z = x * y;
      }

      main:
      ;* --------------------------------------------------------------------------*
          .dwcfi    cfa_offset, 4
          .dwcfi    save_reg_to_mem, 16, -4
      ;** 10    -----------------------    z = x*y;
          .dwpsn    file "../main.c",line 10,column 2,is_stmt
              MOV.W     &x+0,r12              ; [] |10|
              MOV.W     &y+0,r13              ; [] |10|
      $C$DW$5    .dwtag  DW_TAG_TI_branch
          .dwattr $C$DW$5, DW_AT_low_pc(0x00)
          .dwattr $C$DW$5, DW_AT_name("__mpyi")
          .dwattr $C$DW$5, DW_AT_TI_call
              CALLA     #__mpyi               ; [] |10|
                                                ; [] |10|
              MOV.W     r12,&z+0              ; [] |10|
      ;**      -----------------------    return;
          .dwpsn    file "../main.c",line 12,column 1,is_stmt
      $C$DW$6    .dwtag  DW_TAG_TI_branch
          .dwattr $C$DW$6, DW_AT_low_pc(0x00)
          .dwattr $C$DW$6, DW_AT_TI_return
              RETA      ; []
              ; []
          .dwattr $C$DW$4, DW_AT_TI_end_file("../main.c")
          .dwattr $C$DW$4, DW_AT_TI_end_line(0x0c)
          .dwattr $C$DW$4, DW_AT_TI_end_column(0x01)
          .dwendentry
          .dwendtag $C$DW$4


               __mpyi_hw:
      0x03122:   1202                PUSH    ST
      0x03124:   C232                DINT
      0x03126:   4303                NOP
      0x03128:   4C82 0130           MOV.W   R12,&Multiplier_MPY
      0x0312C:   4D82 0138           MOV.W   R13,&Multiplier_OP2
      0x03130:   421C 013A           MOV.W   &Multiplier_RESLO,R12
      0x03134:   4132                POP.W   ST
      0x03136:   0110                RETA
               main:
      0x03138:   421C 1110           MOV.W   &x,R12
      0x0313C:   421D 1112           MOV.W   &y,R13
      0x03140:   13B0 3122           CALLA   #__mpyi_hw
      0x03144:   4C82 1114           MOV.W   R12,&z
      0x03148:   0110                RETA
               _system_pre_init:
      0x0314A:   431C                MOV.W   #1,R12
      0x0314C:   0110                RETA
               C$$EXIT, abort:
      0x0314E:   4303                NOP
               C$L1:
      0x03150:   3FFF                JMP     (C$L1)
               _nop:
      0x03152:   0110                RETA

      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