Jump to content
43oh

jayaura

Members
  • Content Count

    12
  • Joined

  • Last visited

Everything posted by jayaura

  1. If it was an RC osc, I would've used an oscillator. But since its DCO, its supposed to be more stable. I never got any issue yet with SMCLK from DCO @ 1Mhz for 9600 bps. Didnt try higher freqs.
  2. My bad!, I didnt check the comment on the interrupt vector definition. I guess I breezed though that part of the datasheet. Thank you very much Its all clear now
  3. Great! But still, thats timer's problem, right? Why would that mess with UART? It must be some kinda reset like you mentioned, but how do I go about finding what exactly its happening inside the chip? I havent used gdb yet. Will it be *theoritically* possible to know whats happening inside if I use it?
  4. Okay I found a solution. But my conscience says that fix is *impossible*, but for some reason, its working!!! This is the setting that's working (both UART and Timer). What did the trick is, change the line: TACTL = TASSEL1 | MC0 | TAIE; to TACTL = TASSEL1 | MC0; So dont enable the timer interrupt. Then timer interrupt routines will work! Please someone should help me explain why its so! The full code which works is http://pastebin.com/HtP5yfDW
  5. Still its not working; TACCR0 = 25000; // since clk = 1MHhz => 25us count TACTL = TASSEL1; //set SMCLK as source - TASSELx = 10 TACTL |= TAIE; //enabe timer_A interrupt //TACCTL0 |= OUTMOD2; // Toggle mode - OUTMODx = 100 TACCTL0 |= CCIE; //enable interrupt for capture/compatre; TACTL |= MC0; // Set Up mode (upto TACCR0) - MCx = 01 But the weird thing is, this time, if I uncomment line starting TACCR0, (first one), UART works
  6. Thank you for the response @@pabigot, but I cant figure out what exactly I'm supposed to change in UART. It doesnt have any prescaler setting. AFAIK, just has a clock select (which is SMCLK in my case), and the Baud rate control registers, UCA0BR0 and UCA0BR1. Those values are constants, for a particular baud rate I believe. Though Timer has one independent prescaler, my setting is no prescaling (1). It seems I can have a global prescaler for SMCLK, but will equally change the timer's clock too. What exactly are you proposing to change? ,
  7. Dear all, I am an AVR atmega8 refugee, and msp's clocking scheme seems pretty feature rich (not to mention complex!). I am using MSP430G2 launchpad (g2553). This program uses TImerA, and hardware UART with interrupt. It runs at 1Mhz from DCO. And the peripherals take clock from SMCLK. The UART just echos whatever it receives. The timer generate 500ms delay, and toggles the red and green leds on board http://pastebin.com/yApLyFbu The problem is, I can only have one peripheral at a time using the SMCLK. If I have the above code running exactly as it is, the timer will correctly r
  8. Dear pabigot Thank you for that informative response. I tried adding __set_watchdog_clear_value(WDTPW+WDTHOLD); ed at the start of main() and checked the disassembled output, but I get the same watchdog_support section as before. What is the right way to use the inbuilt watchdog ? It might be an overkill for me right now to use these advanced stuff, but I would also like to know about all the other internal features that mspgcc has. Is there a documentation about them anywhere? I googled, but couldnt find anything regarding the watchdog functions you mentioned. The best I could fi
  9. Hello everyone, I disassembled the following code: #include <msp430.h> #define RED BIT0 #define GREEN BIT6 int main(int argc, const char *argv[]) { WDTCTL = WDTPW + WDTHOLD; P1DIR = BIT6 | BIT0; while (1) { P1OUT = BIT6; __delay_cycles(500000); P1OUT ^= (BIT6 | BIT0); __delay_cycles(500000); } return 0; } On running msp430-objdump -D hello_world.elf, I got: Disassembly of section .text: 0000c000 <__watchdog_support>: c000: 55 42 20 01 mov.b &0x0120,r5 //
  10. Fixed. It was the bad cable! :-O Dear admin/moderator, please feel free to delete this thread!
  11. Hello everyone, FIrst - its not the permission issue of not having a proper udev rule. I am on Debian Wheezy with all the msp related packages installed from the official repos - including mspdebug. But after I connect the launchpad and give: mspdebug rf2500 I get usbutil: unable to find a device matching 0451:f432 My computer is not detecting the board. The output of lsusb is: Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
×
×
  • Create New...