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.
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
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.
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.
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 }}
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.
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.
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.
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.
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.
BrandonAzbellThere is mention of CRO. I don't know what that is.
BrandonAzbellPerhaps you mean the output of the TACCR0 which is TA0
The second code, however, seems to be correct. P1.1 should output a 25kHz signal.For completeness, the port initialization should containP1SEL2 &= ~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.
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.
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
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.
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:
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.
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.