Jump to content

Search the Community

Showing results for tags 'ISR'.



More search options

  • 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 5 results

  1. I'm getting this error: main.c: In function 'Timer_A': main.c:150:28: error: MSP430 builtin functions only work inside interrupt handlers __bic_SR_register_on_exit(CPUOFF); // Clear CPUOFF bit from 0(SR) ^ makefile:23: recipe for target 'main.o' failed With this code: // TimerA interrupt __attribute__((__interrupt__(TIMERA0_VECTOR))) Timer_A (void) { iflag |= BIT0; // Set BIT0 flag __bic_SR_register_on_exit(CPUOFF); // Clear CPUOFF bit from 0(SR) } For some reason msp430-elf-gcc thinks my ISR isn't an ISR Any ideas? I emailed one of the red hat guys who submitted the GCC patch with the function that checks whether a function is an interrupt handler or not.
  2. Hello. Been lurking here for while and learning from the pro's. ;-) I have this project of doing my own RC radios with MSP430G2553 and the nRF24L01p. The problem is that when I try to go to low power mode and use a ISR driven by the IRQ pin of the nRF24L01p to wake up. I get this error "#10099-D program will not fit into available memory. placement with alignment fails for section "PORT2" size 0x4 . Available memory ranges:" If I substitute the low power mode and ISR with while loop the code compiles whit out any errors. What I understand the while loop is not the ideal way of doing it, as it wastes energy doing nothing. How do I get around this? Is the chip really too small? I have googled the error, but as I am some sort of a beginner, the results I found where not very helpful. So any and all help is very much appreciated. Any pointers for my code, what could be leaner, what I have done wrong, are appreciated also. Attachment is the source code for RX part. The TX part is still WIP. Sorry if this is in wrong section, but what I gathered whit my limited knowledge from my googling the problem is some how related to the compilers linker. Edit: To add I am using Code Composer Studio Version: 5.3.0.00090 in Linux. Can't get to my windows machine atm because of horrid window renovation at my apartment. main.c msprf24.c msprf24.h nRF24L01.h nrf_userconfig.h printf.h
  3. When I insert into an archive library the interrupt services does not appears into the target elf. I reproduced with a minimal gist the problem: https://gist.github.com/attdona/0ef96f41155d780f70ef The build recipe build_no_lib (mspgcc LTS 20120406 unpatched): msp430-gcc -Os -fno-strict-aliasing -g -Wall -mmcu=msp430f5438 -std=gnu99 -c -o isr.o isr.c msp430-gcc -Os -fno-strict-aliasing -g -Wall -mmcu=msp430f5438 -std=gnu99 -c -o main.o main.c msp430-gcc ./isr.o ./main.o -mmcu=msp430f5438 -o "main-nolib.elf" create the right fw (.vectors OK e ISR OK) whereas the recipe: msp430-gcc -Os -fno-strict-aliasing -g -Wall -mmcu=msp430f5438 -std=gnu99 -c -o isr.o isr.c msp430-ar rcf mylib.a isr.o msp430-gcc -Os -fno-strict-aliasing -g -Wall -mmcu=msp430f5438 -std=gnu99 main.c mylib.a -o main-lib.elf does not setup .vectors and the ISR in not included in the elf. What I missing? Attilio
  4. 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 reset a 1ms global variable counter. This gets incremented by my timer 0 A0 interrupt at a rate of 12000Hz. (yes I know thats not exactly 1 ms, but it doesnt matter) After I reset the variable, the idea is to wait until the timer interrupt increments it again and then sample the gray code switch value. However, instead my code is getting stuck here, and it's preventing the timer interrupt from ever firing. I looked up ISR priorities in the user guide, and it appears that the timer interrupt priority is higher than port 2. That means that in theory this SHOULD work, but something is going wrong. If you guys could help me solve it that would be great!! P.S. I know its not usually good practice to interrupt an interrupt, but we are close to a deadline and this is the easiest way we've come up with to debounce effectively.
  5. I am trying to detect the width of a pulse signal (that should be anywhere from 1ms to 20ms wide) using two ISRs on the MSP430G2553. One ISR is triggered by the rising edge, and the other by the falling edge. The first ISR reads micros() and stores the value in a variable called Time1. The second ISR reads micros() and stores the value in a variable called Time2. The pulse width of the signal is equal to Time2-Time1. The problem is, Time1 and Time2 always end up being equal, even though they are read in two different ISRs on two separate signal edges-- this should be impossible. Anyone know how this is happening? Does entering an ISR stop whatever micros() is referencing? I've tried using millis() as well, but the problem persists. I've used a similar code on the Arduino using "CHANGE" as the interrupt trigger and reading micros() for time1 or time2 depending on the status of a pin-- and that works-- so I'm assuming the launchpad must deal with micros() differently? Here is some code that demonstrates the problem on the launchpad: volatile unsigned long Time; volatile unsigned long Time1; volatile unsigned long Time2; void setup(){ Serial.begin(9600); pinMode(5,INPUT); pinMode(6,INPUT); attachInterrupt(5,CapturePulse1,RISING); attachInterrupt(6,CapturePulse2,FALLING);} void loop(){} void CapturePulse1(){ Time1=millis(); Serial.print(Time1); } void CapturePulse2(){ Time2=millis(); Serial.print(Time2); Time=Time2-Time1; Serial.print(Time); }
×
×
  • Create New...