• 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 » msp430afe253 debugging using launchpad by spy bi-wire communication
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

    msp430afe253 debugging using launchpad by spy bi-wire communication

    This question has suggested answer(s)
    saravanan chandrasekaran
    Posted by saravanan chandrasekaran
    on Apr 27 2012 10:31 AM
    Intellectual385 points

    hello everyone,

                    I am actually get started with msp430afe253 target board and i am able program the target board by using msp430 launchpad by spy bi-wire communication.

    when i  run a sample code to toggle the gpio port its working but when i used to run the sample code of other modules like Timer,ADC module its not working,the debugger doesn't enter into the interrupt.I have checked the hardware connection is perfect.

    please guide as how to resolve the problem.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • BrandonAzbell
      Posted by BrandonAzbell
      on Apr 27 2012 18:04 PM
      Suggested Answer
      Guru54850 points

      The subject of this thread and your ultimate issues that you are expressing in the body of the initial post are not aligned.  Perhaps you should edit the post and change the title to something more appropriate.

      That said, assuming you are actually able to the use the Launchpad to connect to the MSP430AFE253 target board for the JTAG connection and verify this with a simple GPIO toggle test (as you indicated), the issues you are observing with the other peripherals is the real target of investigation.

      Have you looked at the code examples for the MSP430AFE253 found in the Software & Development Tools section of the MSP430AFE253 Product Folder?

      Brandon

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Vivek Sankaranarayanan98982
      Posted by Vivek Sankaranarayanan98982
      on Apr 28 2012 00:19 AM
      Expert1565 points

      yes.I have tried the code examples of MSP430AFE253 provided in software and development tools section.

      And I tried the sample code to generate the PWM signal using the timer module.

      //******************************************************************************
      // MSP430AFE25x Demo - Timer_A, PWM TA1, Up/Down Mode, DCO SMCLK
      //
      // Description: This program generates one PWM output on P1.1 using
      // Timer_A configured for up/down mode. The value in CCR0, 128, defines the PWM
      // period/2 and the value in CCR1 the PWM duty cycles.
      // A 75% duty cycle is on P1.1.
      // SMCLK = MCLK = TACLK = default DCO
      //
      // MSP430AFE25x
      // -----------------
      // /|\| XIN|-
      // | | |
      // --|RST XOUT|-
      // | |
      // | P1.1/TA1|--> CCR1 - 75% PWM
      //
      // Naveen Kala
      // Texas Instruments, Inc
      // March 2011
      // Built with IAR Embedded Workbench Version: 5.20.1
      //******************************************************************************
      #include <msp430afe253.h>

      void main(void)
      {
      WDTCTL = WDTPW + WDTHOLD;                              // Stop WDT
      P1DIR |= BIT3 + BIT1;                                                      / / P1.1 and P1.3 output
      P1SEL |= BIT3 + BIT1;                                                     // P1.1 and P1.3 TA1/2 options
      CCR0 = 128;                                                                    // PWM Period/2
      CCTL1 = OUTMOD_6;                                                  // CCR1 toggle/set
      CCR1 = 32;                                                                    // CCR1 PWM duty cycle
      TACTL = TASSEL_2 + MC_3;                                    // SMCLK, up-down mode

      _BIS_SR(LPM0_bits);                                                 // Enter LPM0
      }

      The program has flashed to the MCU and I can able to monitor the changes in the Timer registers but  I cannot see the output in the CRO.

      When I tried another sample code of Timer module using interrupt and I kept the break point in the interrupt but the program counter doesn't come inside the interrupt. 

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • BrandonAzbell
      Posted by BrandonAzbell
      on Apr 28 2012 09:22 AM
      Guru54850 points

      The example you show appears to be MSP430AFE_ta_19.c, is this correct?

      You should see pin P1.1/TA1 toggle.

      You mention not seeing the output on CRO.  Please be more specific on what pin you are targeting.

      I would suggest you review the information contained in the Pin Schematics in the MSP430AFE253 datasheet for configuring the pins to bring out the desired peripherals.

      Brandon

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • saravanan chandrasekaran
      Posted by saravanan chandrasekaran
      on Apr 28 2012 09:39 AM
      Intellectual385 points

      well, I have verified the pin schematics is correct and I now  monitoring P1.1 through CRO still no hope.

      when i run another sample code of timer using interrupt  and I kept the break point  in the interrupt the debugger doesn't come inside the interrupt.I can see the value changes in the Timer control register while pausing the the debugger but even the TAR doesn't increment it remains in 0x0001.

      the sample code of timer using interrupt as follows:

      //******************************************************************************
      // MSP430AFE25x Demo - Timer_A, Toggle P1.0, CCR1 Cont. Mode ISR, DCO SMCLK
      //
      // Description: Toggle P1.0 using software and TA_1 ISR. Toggles every
      // 50000 SMCLK cycles. SMCLK provides clock source for TACLK.
      // During the TA_1 ISR, P1.0 is toggled and 50000 clock cycles are added to
      // CCR0. TA_1 ISR is triggered every 50000 cycles. CPU is normally off and
      // used only during TA_ISR. Proper use of the TAIV interrupt vector generator
      // is demonstrated.
      // ACLK = n/a, MCLK = SMCLK = TACLK = default DCO
      //
      // MSP430AFE25x
      // ---------------
      // /|\| XIN|-
      // | | |
      // --|RST XOUT|-
      // | |
      // | P1.0|-->LED
      //
      // Naveen Kala
      // Texas Instruments, Inc
      // March 2011
      // Built with IAR Embedded Workbench Version: 5.20.1
      //******************************************************************************
      #include <msp430afe253.h>

      void main(void)
      {
      WDTCTL = WDTPW + WDTHOLD; // Stop WDT
      P1DIR |= BIT0; // P1.0 output
      CCTL1 = CCIE; // CCR1 interrupt enabled
      CCR1 = 50000;
      TACTL = TASSEL_2 + MC_2; // SMCLK, Contmode

      _BIS_SR(LPM0_bits + GIE); // Enter LPM0 w/ interrupt
      }

      // Timer_A1 Interrupt Vector (TAIV) handler
      #pragma vector=TIMERA1_VECTOR
      __interrupt void Timer_A(void)
      {
      switch( TAIV )
      {
      case 2: // CCR1
      {
      P1OUT ^= BIT0; // Toggle P1.0
      CCR1 += 50000; // Add Offset to CCR1
      }
      break;
      case 4: break; // CCR2 not used
      case 10: break; // overflow not used
      }
      }

       

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • BrandonAzbell
      Posted by BrandonAzbell
      on Apr 28 2012 09:54 AM
      Guru54850 points

      You stil haven't indicated which pin you are trying to monitor.  There is mention of CRO.  I don't know what that is.  Perhaps you mean the output of the TACCR0 which is TA0.  If you look at the pinout of the MSP430AFE253, the TA0 can come out on pins P1.2 and P2.0.  Which of these pins are you monitoring?

      Secondly, the code above does not enable either of these pins, so I would expect you to see anything on them.

      Brandon

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • saravanan chandrasekaran
      Posted by saravanan chandrasekaran
      on Apr 28 2012 09:56 AM
      Intellectual385 points

      hello Brandon,

         I have verified the hardware connection from launchpad to the MSP430AFE253 target board is perfect. As for as now I can able to toggle the GPIO ports but non other peripherals are not responding.

      I Think whether it is a clocking problem because I have run the UART echo back code which is already tested in MSP430G2231 and I modified according to MSP430AFE253 but still no hope the debugger doesn't come inside the interrupt. 

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • saravanan chandrasekaran
      Posted by saravanan chandrasekaran
      on Apr 28 2012 10:08 AM
      Intellectual385 points

      I monitoring the output of TA1 on the port P1.1 as mentioned in the datasheet  for the first sample code that i have posted because the OUTMOD is set in CCTL1.

      But even no signal can be monitored in the oscilloscope.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • BrandonAzbell
      Posted by BrandonAzbell
      on Apr 28 2012 10:16 AM
      Guru54850 points

      saravanan chandrasekaran

      I monitoring the output of TA1 on the port P1.1 as mentioned in the datasheet  for the first sample code that i have posted because the OUTMOD is set in CCTL1.

      But even no signal can be monitored in the oscilloscope.

      Just so that I am clear, I was under the impression that the first sample code you provided, based on MSP430AFE_ta_19.c, was operating and you were able to observe toggling on TA1, P1.1.

      Is this a correct assumption?

      If not, please clarify on what code you are running on the MSP430AFE253, what pin you are monitoring and what you are observing.

      Brandon

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • saravanan chandrasekaran
      Posted by saravanan chandrasekaran
      on Apr 28 2012 10:31 AM
      Intellectual385 points

      The code that i have testing now is as follows:

      #include <msp430afe253.h>
      //
      void main(void)
      {
      WDTCTL = WDTPW + WDTHOLD;                          // Stop WDT
      // BCSCTL1=0xCF;
      // DCOCTL=0x63;
      BCSCTL1 = CALBC1_8MHZ;
      DCOCTL = CALDCO_8MHZ;
      P1DIR |= 0x02;                                                            // P1.1
      P1SEL |= 0x02;                                                            // P1.1
      // CCTL0 = OUTMOD_7;
      CCR0 = 160;                                                       // PWM Period
      CCTL1 = OUTMOD_2;                                    
      CCR1 = 80;                                                         // CCR1 PWM duty cycle
      TACTL = TASSEL_2 + MC_3;                               // SMCLK, up-down mode

      _BIS_SR(CPUOFF);                                           // Enter LPM0
      }

      I am monitoring the output of CCR1 in port P1.1 still no hope.

      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 30 2012 10:33 AM
      Guru140435 points

      BrandonAzbell
      There is mention of CRO.  I don't know what that is.

      Best guess: Cathode Ray Oscilloscope. Well, for observing pins, I would prefer a DMO (Digital Memory Oscilloscope) or a logic analyzer. :)

      BrandonAzbell
      Perhaps you mean the output of the TACCR0 which is TA0

      No, there is no OUTMODE configured (in the first code). So most likely the toggling of P1.0 in the ISR for CCR1 is meant. However, it is P1.0, not P1.1 that is toggled in the ISR.

      The second code, however, seems to be correct. P1.1 should output a 25kHz signal.
      For completeness, the port initialization should contain
      P1SEL2 &= ~0x02;
      But this should be the default anyway.

      _____________________________________
      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.
    • saravanan chandrasekaran
      Posted by saravanan chandrasekaran
      on May 01 2012 00:30 AM
      Intellectual385 points

      Hello Brandon,

      Finally the sample code worked but with some problem, actually I am using launchpad for programming and debugging purpose through spy bi-wire connection but what actually happend was using spy bi-wire it is only able to flashing the program in the MCU of MSP430AFE253 target board but it unable to debug the program.

      After flashing the program when I power cycle the launchpad the code which i flashed into the MCU its working I can able to monitor the output in oscilloscope. I don't know what's the problem because by spy bi-wire connection using launchpad i can able to flash and debug the program for MSP430G2XXX but the same spy bi-wire connection  is not working in other target board.

      It would be great if you advice me how to approach it further.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Lori Ann Welte
      Posted by Lori Ann Welte
      on Sep 21 2012 12:31 PM
      Prodigy10 points

      brandon, the MSP320AFE253 Timer doesn't work when running in the Debugger, I have the same problem. I use many different MSP430Fxxx's and this is the only one that shows this problem

      this problem renders debugging impossible if you use the Timer on this particular chip. code runs fine outside of the Debugger

      from reading other posts it appears to not matter if it's CCS or IAR, same problem and others are having it as well

       

       

       

      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 Sep 22 2012 09:59 AM
      Guru140435 points

      On some MSPs, the debugger is able to stop the clocks during a breakpoint. It's possible that this feature is active but not working properly on this MSP (so the clocks aren't released). If this is the case, you might configure the debugger to NOT stop the clocks on a breakpoint. Maybe it then works.

      Nevertheless, it seems to be a bug, possibly in the MSP430.DLL part that identifies and handles the EEM of this MSP - or a silicon bug that makes the EEM not working as expected. This needs to be investigated further at the TI labs.

      _____________________________________
      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.
    • Katie Enderle
      Posted by Katie Enderle
      on Sep 24 2012 15:54 PM
      Genius12795 points

      Lori Ann Welte

      brandon, the MSP320AFE253 Timer doesn't work when running in the Debugger, I have the same problem. I use many different MSP430Fxxx's and this is the only one that shows this problem

      this problem renders debugging impossible if you use the Timer on this particular chip. code runs fine outside of the Debugger

      from reading other posts it appears to not matter if it's CCS or IAR, same problem and others are having it as well

      Hi Lori,

      I was wondering a few things because I'd like to investigate and reproduce this issue:

      1. Have you always observed this problem with the Launchpad debugger, or also using the MSP-FET430UIF tool? (The reason I ask is I'm thinking the AFE253 is not really a supported device for the ez430 programmer on the Launchpad as the Launchpad is designed for just G2xx devices  - I'm looking into this. The MSP-FET430UIF however always does support all released MSP430 devices and so should work)
      2. If the problem is observed with the FET tool, does the problem show up only with the AFE253 with newer versions of CCS/IAR (DLLv3 - this would be CCSv5.1 and newer)? Or do you know if it happened with older versions as well?

      I saw that you mentioned there were other threads about this issue, I will try to search for them, but if you have any particularly revealing ones you'd like to link here that would be appreciated as well.

      Thanks,

      Katie

      MSP430 Customer Applications

      Please click the Verify Answer button on this 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.
    • Wally Ritchie42594
      Posted by Wally Ritchie42594
      on Dec 11 2012 13:54 PM
      Intellectual420 points

      Is there any resolution to this.

      I am seeing what appears to the same issue both on CCS 5.3 and 4.2. Using both ez430 and FET430UIF

      It appears that when debugging, the SM clock is unable to run. This renders most peripherals unusable - including the USART I am using.

      Programs run fine without the debugger connected. It is also possible to sometimes get the SM clock to restart with a reset (with the debugger connected). I discovered this by accident through an inadvertent scope probe short between the SM clock out I'm monitoring and the adjacent reset pin.

      Our configuration is a insitu AFE253 using external power and 3 pin SBW programming.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    12
    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