EmbeddedRelated.com
The 2024 Embedded Online Conference

Timer A and Interrupt Problem

Started by projecttamim in MSP43019 years ago 5 replies

Hi, I am trying to write a program that will take 450 analog signals from pin 6. I want the program to take the signal when at a specific...

Hi, I am trying to write a program that will take 450 analog signals from pin 6. I want the program to take the signal when at a specific rate so iam using TimerA interrupts to start the A/D conversions. But for some reason when the ISR is called the program keeps looping inside the ISR. However it doesnt stay inside the ISR all the time. Does any1 Know what the problem is? Thank You!


TAIFG

Started by Anonymous in MSP43019 years ago 29 replies

Not sure why this happens but when my TimerA ISR is vectored to, I can see that the TAIFG is clear. TAIV = 0; TACTL = 0101H TACCTL0, TACCTL1,...

Not sure why this happens but when my TimerA ISR is vectored to, I can see that the TAIFG is clear. TAIV = 0; TACTL = 0101H TACCTL0, TACCTL1, TACCTL2 = 0010H TAR = 7FFEH TACCR0 = 7FFEH TACCR1, TACCR2 = 0 The timer is in mode 1 (MC_1). can any one explain why TAIFG is clear when entering the ISR ? TIA, Alex


Problems with simulating Aclk, Smclk outputs and Port Interrupts

Started by stephen_fenstermaker in MSP43021 years ago 1 reply

I have a very simple assembly program which sets up aclk output on one of the ports and port2 interrupts and no matter what I have tried, I...

I have a very simple assembly program which sets up aclk output on one of the ports and port2 interrupts and no matter what I have tried, I can't get C-Spy to show me the aclk pin toggling. Aclk is working because I have TimerA hooked up to it and it is running fine. Also, I set up port2 to have interrupts and the only way I can get the interrupt to fire is to manually change the P2IFG


dma problem msp430fg4618

Started by petebrayuk in MSP43013 years ago 4 replies

I'm using crossworks v2, and msp430fg4618 and trying to output a 256 word waveform out of DAC12_1 using dma. I'm triggering the dma transfer using...

I'm using crossworks v2, and msp430fg4618 and trying to output a 256 word waveform out of DAC12_1 using dma. I'm triggering the dma transfer using timerA and passing the data directly through to the DAC rather than triggering the dac latch with a timer. i generate an IRQ after the 256 samples have been DMA transferred. This method seems to do what i want with one exception - i can't get the correc...


Pulse/Event Counter

Started by Matthew Bivans in MSP43022 years ago

You could use your input signal to drive the Timer clock, then use a compare block from that timer to interrupt when the compare value is...

You could use your input signal to drive the Timer clock, then use a compare block from that timer to interrupt when the compare value is reached. I'm not familiar with the F413 (F149 is my game), but look for TACLK or TAINCLK to use as the pulse input. Then configure TimerA to use the respective pin as the clock source, and set CCR0 to compare on the value you want. When the compare in


Timer A used as sample timer for ADC on MSP430F5438

Started by zjeriet in MSP43015 years ago 3 replies

Hello, I'm using TimerA to generate a PWM and feed it to the ADC12 on a MSP430F5438. I'm using an UP/down counter (with CCR1 setting the duty...

Hello, I'm using TimerA to generate a PWM and feed it to the ADC12 on a MSP430F5438. I'm using an UP/down counter (with CCR1 setting the duty cycle to 50%). Now my clk generated is OK (checked it with scope on output pin). But I'm unable to trigger my ADC12 using this clock. In the user guide it states the ADC can select Timer_A.OUT1 as sample source. But when I do this nothing happe...


MSP430F149 Interrupt Handling

Started by soon yan bo in MSP43016 years ago 13 replies

Hi Everyone, I have programmed the MSP430F149 to toggle the p1.0 pin every 1000ns using a 12.288 mhz crystal clock connect to XT2IN. The ISR...

Hi Everyone, I have programmed the MSP430F149 to toggle the p1.0 pin every 1000ns using a 12.288 mhz crystal clock connect to XT2IN. The ISR will wake the CPU up every 1000ns, after toggling, it will put it to sleep. However, the code does not entered the interrupt routine and IAR cannot compile when include the __interrupt [TimerA Vector] void Timer_A(void). Attached is the code. Wi...


Timer A Interrupt

Started by chetan loke in MSP43019 years ago

Hello, Basically I'm trying to generate a PWM o/p(for 1ms) after a 20ms period using TimerA .This is my first time programming a...

Hello, Basically I'm trying to generate a PWM o/p(for 1ms) after a 20ms period using TimerA .This is my first time programming a microcontroller...i went thru' the code samples and wrote this code...but 1)it wont compile...am i missing something? 2)looking at the code will i be able to achieve the above PWM o/p for 1ms after a 20ms period? Thnks #include "msp430x11x1.h" #incl


MSP430 timer confusion

Started by Tom Harry in MSP43014 years ago 6 replies

Hi Group, One general question. MSP430 family has only one 16-bit timer mentioned in datasheet (SLAS491E). But, in the MSP430x2xx family user's...

Hi Group, One general question. MSP430 family has only one 16-bit timer mentioned in datasheet (SLAS491E). But, in the MSP430x2xx family user's guide there is description of timerA (1 and 2) and timerB (1 and 2). Also, I looked through the MSP430 Microcontroller basics text book. It has mentioned that timerB is provided on larger devices in all MSP430 families. I'm kind of lost, any suggestions...


trigger ADC12 with timer

Started by rbuerli in MSP43021 years ago 3 replies

We try to trigger the ADC12 with either timer by setting SHS<>0. That doesn't seam to work. Per documentation either timerA.out1 or timerB.out0...

We try to trigger the ADC12 with either timer by setting SHS<>0. That doesn't seam to work. Per documentation either timerA.out1 or timerB.out0 or timerB.out1 can be used to start a conversion. Anybody have a sample that shows how this works ? The goals is to have the ADC12 take a sample based on the timer reaching a certain count. Yes, one could deal with that from within the t


switching SMCLK source from LFXTCLK to DCO

Started by Sipke de Leeuw in MSP43021 years ago 5 replies

Hi all, I have got a problem here with switch the SMCLK source from LFXTCLK to DCO. I am using a msp430f1121 controller and use timerA and...

Hi all, I have got a problem here with switch the SMCLK source from LFXTCLK to DCO. I am using a msp430f1121 controller and use timerA and CCR1 to create a 10ms timeinterval. The processor is running with a 4MHz crystal connected to LFXTCLK in high frequency mode. Every tick I toggle the P1.1 output pin. After startup, a 50 Hz signal is on P1.1. (period of 2*10ms = 20ms) The nmi oscillator


Frequency Measurement Using Capture

Started by nugent2007 in MSP43017 years ago 3 replies

I would appreciate a sanity check on using TimerA in capture mode. I will be doing simple frequency measurement on a low frequency (200Hz Max)...

I would appreciate a sanity check on using TimerA in capture mode. I will be doing simple frequency measurement on a low frequency (200Hz Max) input to a capture pin. I have set the timer to: continous up mode clock from ACLK (32KHz) positive edge detect Some questions: The timer will interrupt both on a capture event and an overflow? If so I suppose i have to handle over flow... ...


Strange IAR warning Pe550

Started by Albert Bartoszko in MSP43020 years ago 17 replies

Hi! Why i get: [...] IAR MSP430 C Compiler V2.21B/W32 [Kickstart] Copyright 1996-2003 IAR Systems. All rights reserved. Warning[Pe550]:...

Hi! Why i get: [...] IAR MSP430 C Compiler V2.21B/W32 [Kickstart] Copyright 1996-2003 IAR Systems. All rights reserved. Warning[Pe550]: variable "TA_vector" was set but never used [...] when compile timerA interrupt function with body: ------------------------------------------------------------ [code] static void ((* const TA_vector[])(void)) = { timerA_fail, // no interr


interrupt priority "overrride"

Started by stefandk63 in MSP43016 years ago 3 replies

Hi , people, I have keyboard scaning sequence inside TimerB interrupt. This sequence is relative slow, so its possible to lose bit/symbol in...

Hi , people, I have keyboard scaning sequence inside TimerB interrupt. This sequence is relative slow, so its possible to lose bit/symbol in software UART ( tied to TimerA). My intention is to make follow: TimerB_ISR: push r15 ;... mov #keybard_scanproc,r15 push r15 push SR reti keybard_scanproc: ;..... pop r15 pop SR ret Is this correct way? r...


MSP430 LPM3 power consumption

Started by rothe957 in MSP43021 years ago 14 replies

Hi! I am trying to (re)build a digital watch based on the MSP430F149: http://www.sigma957.org/uc2000.html I am using the FET evalkit from...

Hi! I am trying to (re)build a digital watch based on the MSP430F149: http://www.sigma957.org/uc2000.html I am using the FET evalkit from TI with a 32kHz watch quartz, powered from 2 AA cells. I am still at the very beginning, I just made a simple program that uses TimerA to generate interrupts for wakeup at 1s interval. The mainloop update


ADC12 Sequence of Channels Mode, Time Overflow

Started by jrecas in MSP43017 years ago 3 replies

Hello to everybody!! I am trying to read AD0 channel of an MSP430f149 using the Sequence of Channels mode. I am able to get the data but I...

Hello to everybody!! I am trying to read AD0 channel of an MSP430f149 using the Sequence of Channels mode. I am able to get the data but I also have a Conversion Time Overflow. I use TimerA.1 as a conversion trigger, in Set/Reset mode with a period of 30us. The conversion uses de internal ADC12OSC, which works at 5MHz (1 conversion takes 13/5MHz=2.6us) so it possible to get the data in t...


SW uart using TimerA and HFxtal 8MHz

Started by Martijn Broens in MSP43022 years ago 3 replies

Hi ,  

Hi ,  



The 2024 Embedded Online Conference