Jump to content

Search the Community

Showing results for tags 'timers'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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


There are no results to display.

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 5 results

  1. I have modified the code and now the zero crossing interrupt is occurring.But the timer is still not functioning.Can anyone see and tell whether I have configured it right? #include "inc/hw_ints.h" #include "inc/hw_memmap.h" #include "inc/hw_timer.h" #include "inc/hw_types.h" #include "debug.h" #include "interrupt.h" #include "timer.h" #include "driverlib/prcm.h" #include "inc/hw_gprcm.h" #include "wiring_private.h" #include "driverlib/rom_map.h" #include "driverlib/pin.h" void setup() { pinMode(2,INPUT_PULLUP); pinMode(4,OUTPUT); noInterrupts(); MAP_PRCMPeripheralClkEnable(PRCM_TIMERA0,PRCM_RUN_MODE_CLK); MAP_PRCMPeripheralReset(PRCM_TIMERA0); MAP_TimerConfigure(TIMERA0_BASE,TIMER_CFG_B_PERIODIC_UP); MAP_TimerIntRegister(TIMERA0_BASE,TIMER_B,start); MAP_TimerIntEnable(TIMERA0_BASE,TIMER_TIMB_MATCH); MAP_TimerPrescaleSet(TIMERA0_BASE,TIMER_B,32); MAP_TimerMatchSet(TIMERA0_BASE,TIMER_B,7500); MAP_TimerLoadSet(TIMERA0_BASE,TIMER_B,0); MAP_TimerEnable(TIMERA0_BASE,TIMER_B ); attachInterrupt(2,zeroCrossingInterrupt, RISING); interrupts(); Serial.begin(9600); } void loop() { } void zeroCrossingInterrupt() { digitalWrite(4,LOW); MAP_TimerLoadSet(TIMERA0_BASE,TIMER_B,0); MAP_TimerEnable(TIMERA0_BASE,TIMER_B ); Serial.println("0k"); } void start() { digitalWrite(4,HIGH); MAP_TimerIntClear(TIMERA0_BASE,TIMER_TIMB_MATCH); MAP_TimerIntDisable(TIMERA0_BASE,TIMER_TIMB_MATCH); MAP_TimerDisable(TIMERA0_BASE,TIMER_B ); Serial.println("hi"); }
  2. 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); TimerIntRegister(TIMERA0_BASE,TIMER_A,start); TimerControlStall(TIMERA0_BASE,TIMER_A,false); TimerControlLevel(TIMERA0_BASE,TIMER_A,false); attachInterrupt(0,zeroCrossingInterrupt, RISING); interrupts(); TimerIntEnable(TIMERA0_BASE,TIMER_TIMA_MATCH); } void loop() { } void zeroCrossingInterrupt() { digitalWrite(9,LOW); TimerEnable(TIMERA0_BASE,TIMER_A); } void start() { digitalWrite(9,HIGH); TimerDisable(TIMERA0_BASE,TIMER_A); } Errors:- In file included from sketch_aug17a.ino:1:0: C:\energia-0101E0014-windows\energia-0101E0014\hardware\cc3200\cores\cc3200/driverlib/timer.h:164:31: error: 'tBoolean' has not been declared tBoolean bInvert); ^ C:\energia-0101E0014-windows\energia-0101E0014\hardware\cc3200\cores\cc3200/driverlib/timer.h:168:31: error: 'tBoolean' has not been declared tBoolean bStall); ^ C:\energia-0101E0014-windows\energia-0101E0014\hardware\cc3200\cores\cc3200/driverlib/timer.h:193:59: error: 'tBoolean' has not been declared extern unsigned long TimerIntStatus(unsigned long ulBase, tBoolean bMasked); Kindly help asap.
  3. 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 ?
  4. Hello dear developers, I am currently working on an automated rover project working on multiple MSP430 the board in charge of the electrical power management embbeds a MSP430G2744 model. As I quite used to work with arduino IDE I tried to port it to Energia. Unfortunately I got stuck at some point editing my variant of pins_energia.h : The timers for the ported microcontrollers appears something like T0A0 T0A1 T1A0 ... etc On the MSP430G2744 however they only appear as TA0, TA1 etc. The Energia.h file in cores does not allow in its enumaration list for TA0, TB0 simple notations I understand that the second number is related to the number of the CCR capture and compare register but not all the timers seem to be related to a CCR in the datasheet of the MSP430G2744. For now I just assumed as it seems to appear in the datasheet that the number of the CCR is the same as the number for the pin eg. OUT0 with CCR0, OUT 1with CCR1 etc each time but is it right ? Here come my modified file (I highlighted the tricky part in red): Of course I modified the Board.mk and boards.txt files as well. A second information I didn't fint is the upload protocol, I assumed: lpmsp430g2755.upload.protocol=tilib Would that work ? Note that I am planning to use a Spi-by-wire upload using only the TEST and RST pins. Thank you in advance for your help Hoping to read you soon.
  5. competentScience

    Question about Timers and loops

    My question is this: can I use a while loop to suspend a program until a value in a global variable is >= a constant. I'm using timer0 to interrupt every one second. I update a global integer value by one every time the interrupt method executes. However, when my program reaches the while loop, it locks up my program. Does the while loop prevent the interrupt from firing, or is the while loop putting a lock on the variable and not allowing the interrupt statement to update. The code I have is as follows and I am new to hardware programming. // initialize timer TA0CCR0 = 12000; // Count limit (16 bit) TA0CCTL0 = CCIE + OUTMOD_3+ CM_0+ CCIS_0; // Enable Timer A0 interrupts, bit 4=1 TA0CTL = TASSEL_1 + MC_1; __enable_interrupt(); //interrupt method plus global variable declaration volatile int delay_clock =0; volatile int blink_clock =0; __attribute__((interrupt(TIMER0_A0_VECTOR))) void oneSecondHandler(void){ delay_clock++; blink_clock++; } //while loop void wait() { blink_clock = 0; while( blink_clock < 5){ wait_ghost = 111 // so the compiler doesn't throw out the code} } ANY help would be appreciated. I am developing this for a bluetooth IPhone application