Jump to content
43oh

Search the Community

Showing results for tags 'Interrupts'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News
    • Announcements
    • Suggestions
    • New users say Hi!
  • Spotlight!
    • Sponsor Spotlight
    • Sponsor Giveaways
  • Energia
    • Energia - MSP
    • Energia - TivaC/CC3XXX
    • Energia - C2000
    • Energia Libraries
  • MSP Technical Forums
    • General
    • Compilers and IDEs
    • Development Kits
    • Programmers and Debuggers
    • Code vault
    • Projects
    • Booster Packs
    • Energia
  • Tiva-C, Hercules, CCXXXX ARM Technical Forums
    • General
    • SensorTag
    • Tiva-C, Hercules, CC3XXX Launchpad Booster Packs
    • Code Vault
    • Projects
    • Compilers and IDEs
    • Development Kits and Custom Boards
  • Beagle ARM Cortex A8 Technical Forums
    • General
    • Code Snippets and Scripts
    • Cases, Capes and Plugin Boards
    • Projects
  • General Electronics Forum
    • General Electronics
    • Other Microcontrollers
  • Connect
    • Embedded Systems/Test Equipment Deals
    • Buy, Trade and Sell
    • The 43oh Store
    • Community Projects
    • Fireside Chat
  • C2000 Technical Forums
    • General
    • Development Kits
    • Code Vault
    • Projects
    • BoosterPacks

Calendars

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Location


Interests


Sparkfun


Github

Found 19 results

  1. I'm following the attached I2C example code provided by TI. The MCU is put into LPM0 with three interrupts enabled. On a pending RX interrupt, the ISR stores one byte of the receive buffer and clears the LPM0 SR bits taking the MCU out of LPM0 (lines 133-135). What's the reason for exiting LPM0? And why isn't the __bic_SR_register_on_exit(LPM0_bits) used for the NACIFG and BCNTIFG? msp430fr235x_euscib0_i2c_10.c
  2. I'm new to micro-controller programming and am seeking some help. I'm using the MSP-EXP430G2553 Launchpad. Following examples from online contributors I have inserted the following as the first line of code: // WDTCTL = WDTPW + WDTHOLD; // Stop WDT However, when this is enabled it prevents serial monitoring and interrupts from working. I don't know if it is relevant but the uart jumpers are set to HW.
  3. I'm trying to read two encoders to know the angular position using interrupts but something is wrong, the code compiles but in serial just prints "0", what can i change? volatile long Left_Encoder_Ticks = 0; volatile bool LeftEncoderBSet; #define Right_Encoder_PinA PC_5 #define Right_Encoder_PinB PC_6 volatile long Right_Encoder_Ticks = 0; volatile bool RightEncoderBSet; void setup() { Serial.begin(9600); SetupEncoders(); } void SetupEncoders() { pinMode(Left_Encoder_PinA, INPUT_PULLUP); pinMode(Left_Encoder_PinB, INPUT_PULLUP); a
  4. I'm working on a reflow controller with a G2553 driving a solid state relay to control power. It also includes a rotary encoder with push button and two 7-segment displays to adjust and display the duty cycle. I've written it in assembler, and all of the activity takes place within the interrupt service routine triggered every 2ms by the watchdog timer in interval timer mode. Between interrupts, the processor sleeps. In assembler, the service routine does its magic in about 0.1ms, or 1/20th of the total time, so there's no danger of an overrun into the next trigger. There are no pin inter
  5. I am using launchpad cc3200 and i saw the attachInterrupt function. Is there a function to set the priorities of multiple interrupts ? I wish to declare the interrupt priorities of two or more tasks Thanking you
  6. Hi , I am unable to use the Timers of CC3200 on Energia. Kindly view my code snippet and see what errors have I made.I am getting the errors which I have mentioned at the last. CODE:- #include <driverlib/timer.h> #include <inc/hw_timer.h> void setup() { pinMode(2,INPUT_PULLUP); pinMode(9,OUTPUT); noInterrupts(); TimerIntStatus(TIMERA0_BASE,true); TimerDisable(TIMERA0_BASE,TIMER_A); TimerIntDisable(TIMERA0_BASE,TIMER_TIMA_MATCH); TimerConfigure(TIMERA0_BASE,TIMER_CFG_A_PERIODIC_UP); TimerPrescaleSet(TIMERA0_BASE,TIMER_A,32); TimerMatchSet(TIMERA0_BASE,TIMER_A,7500); TimerInt
  7. I have experience with the traditional C programming in Code Composer and have implemented a timer interrupt routine in CCS for TIVA TM4C1294, now I want to create a timer ISR in Energia, how do I proceed ?
  8. A decoder from a motor has 2 square wave outputs that deliver 256 pulses/revolution (duty cycle 1:1). The two outputs are 90 degree out of phase for direction information. I want to count pulse, in one direction up, in the other down. Towards this aim I attach to the first decoder output following routine: void countStep(){ if(digitalRead(_CIN2)){_pos++;} else {_pos--;} } "_CIN2" is the second decoder output and "pos" the counter variable. This works well until up to approx. 16kHz. But for higher frequencies it counts in the wrong direction. I first guessed, that the phase r
  9. Colleagues, The circuit that I'm working on is based on an 8-pin MSP430G2210. The RST#/NMI serves as a soft on/off switch. While the device is on, it will use the WDT in the interval mode for cyclic sleep (at least, that's my intent). I was able to make the NMI# interrupt work to wake up from LPM4. Separately, I was able to make the WDT interrupt work to wake up from LPM3. But I wasn't able to make them work together. // PURPOSE: Keep track of button presses #pragma vector=NMI_VECTOR __interrupt void nmi_isr(void) { g_nmiFlag = true; // set a flag, whic
  10. Hi guys, do you know if there is a way to set different priorities to different threads of a sketch? For example, if we had a slow thread which senses a thermomenter and another one which sends data serially bit-banging a pin, and another one which senses an emergency stop (whatever, just imagine they are all pretty fast processes) I would like to set a list of priorities for the underlying TI/RTOS to handle possible needs. Is there a way to implement this? Also... if we set interrupts to handle certain events... how does Energia signal the RTOS the priority for this (like in don't
  11. I am trying a loopback test for msp430f5438a using interrupts. I have initialized the master and slave modules and have written their respective functions as interrupt service routines. The aim I to turn the LED off when the slave receives a character.However, the code is not working. Please tell me how to make it work --------------------------------------------------------------------------------------------------------------------------------- // To use interrupts to transmit and recieve text character(s) #include <msp430.h> /* * main.c */ ? ? void main(void) { WDTCTL = WD
  12. Hello, I am basically new to msp430 and CCS, and I am having a hard time trying to understand code, interrupts and timers. Background info: Goal.- read and interpret a dual 7 segment LED display with 10 pins. So after playing around with this part I found out that the way this works is the driver pins (9, 6) toggle each other really fast ~4khz, 9 is on while 6 is of etc. My idea was to use the MSP430G2553 to read A-G on PORT1 and the 2 drivers (9, 6) on PORT2. I read on interrupts and saw that there is a way to set up an interrupt for when your input signal (in this cas
  13. I developed working code for TIMER0 interrupt on my TM4C129. But I would like to also get the current period. I assumed TimerLoadGet would return this but I get zero. I've tried all three of these functions with ROM_ and without. The peripherals manual doesn't help with info like "Returns the load value for the timer" returns 0 for uint32_t TimerLoadGet(TIMER0_BASE, TIMER_TIMA_TIMEOUT) returns 0 for uint32_t TimerValueGet(TIMER0_BASE, TIMER_TIMA_TIMEOUT) returns 65535 for uint32_t ROM_TimerMatchGet(TIMER0_BASE, TIMER_TIMA_TIMEOUT) Can anyone direct m
  14. I am currently working on a battery operated wireless doorsensor. A message is sent whenever a magnetic switch causes an interrupt. I have read some topics on this forum and changed some lines in Winterrupts file and created the following sketch: #include <x10rf.h> #define intpin1 P1_5 #define txpin P1_7 #define txvcc P1_0 #define reps 4 x10rf myx10 = x10rf(txpin,0,reps); void setup() { myx10.begin(); pinMode(intpin1,INPUT_PULLUP); pinMode(txvcc,OUTPUT); digitalWrite(intpin1, HIGH); digitalWrite(txvcc, LOW); attachInterrupt(intpin1, Wake, CHAN
  15. Hi, I am trying to write a code on the launchpad msp430g2553, which would simulate the output of several simple logic gates. I have connected 2 push buttons as inputs to pins P1.3 and P1.7 and 4 LEDs as outputs to P1.0, P1.4, P1.5, and P1.6. 2 of the LEDs are representing the "truth" and "false" of the truth table and the other 2 are just to indicate that a push button has been pressed (1 for each). At first I did it with polling with 6 diferrent logic gates in switch cases and it is working just fine. logicPolling.c But now I am trying to do it with interrupts and I get problems w
  16. Hello everyone. I am more of a hardware dude, so software always makes me stay up all nights while trying to understand why it doesn't work and why DOES it work. Anyway, below is the code I am using. It works, kind of, but there is a problem. If I decrease delay, resolution goes down pretty bad, with 300ms it is 100RPM. If I Increase, of course it gets slow, and that is not ok in my application. As I am a total noob, I hope someone here might give me advice, what can I possibly do. Regards, Arch. volatile unsigned int rpmcount; float rpm; float timeold; const int carbswitch = P2_2; //s
  17. Hey all. I'm using an msp430g2553 to output an integer to an LCD and let that integer to be modified with a rotating gray code switch. I am attempting to debounce the switch by sampling its value every 1ms for 5ms (5 samples) each time the switch interrupt fires. I am trying to accomplish this with the following code: for(i=0; i<SAMPLE_NUM; i++) { ms=0; while(ms==0) { //do nothing until at least 1 ms has elapsed } gray0_val = P2IN&GRAY0; //latch current port pin values gray1_val = P2IN&GRAY1; The issue is at line 2-3 where I re
  18. Hi all, I am having some trouble getting interrupts up and running on the energia, i have a couple of questions. 1 ) I have not been able to find a list of pins on the G2553 that are compatible with interrupts. 2) I am using the following code, with a tactile button (pulled up to VCC with a 10k and then pressing it connects it to ground) and it only seems to work with the option "FALLING" in the interrupt declaration "CHANGE" does not work. Any suggestions on what might be going wrong ? void setup() { attachInterrupt(P2_0,blinky,FALLING); Serial.begin(9600); } void loop(
  19. Hi, I'm trying to build a simple Li ion battery capacity tester using this article. The code compiles fine until line 40, where it comes to interrupt handler. What should I use instead? Here is the code where I get errors: ISR(TIMER1_OVF_vect) { TCNT1=0x0BDC; x=!x; measure(); } void setup() { pinMode(LED, OUTPUT); TIMSK1=0x01; // enabled global and timer overflow interrupt; TCCR1A = 0x00; // normal operation page 148 (mode0); TCNT1=0x0BDC; // set initial value to remove time error (16bit counter register) TCCR1B = 0x04; // start timer/ set clock Serial.begin
×
×
  • Create New...