Hardy,
It started to work when I included "msp430x241x.h" for correct ISR
addresses and build all on circuit board.
There was also problem with digital clock register's setup - that's why
it did not work before even when I used proper header file. I've added
BCSCTL1 = XT2OFF|XTS|DIVA_0;
BCSCTL3 = LFXT1S1;
There is some differences in clock's settings against 1612 which I have
missed.
Thank you all very much for your help!
---
Regards,
Dmitry
On Sat, 2009-04-04 at 13:36 +0200, Hardy Griech wrote:
> Dmitry,
>
> could you please revert to TIs example and use the following:
> #include <io.h>
> #include <signal.h>
> #include <stdlib.h>
>
> void main(void)
> {
> WDTCTL = WDTPW + WDTHOLD; // Stop WDT
> P3OUT &= ~(BIT4+BIT5);
> P3SEL = 0x30; // P3.4,5 = USCI_A0 TXD/RXD
> UCA0CTL1 |= UCSSEL_1; // CLK = ACLK
> UCA0BR0 = 0x03; // 32kHz/9600 = 3.41
> UCA0BR1 = 0x00; //
> UCA0MCTL = UCBRS1 + UCBRS0; // Modulation UCBRSx = 3
> UCA0CTL1 &= ~UCSWRST; // **Initialize USCI state
> machine**
> IE2 |= UCA0RXIE; // Enable USCI_A0 RX interrupt
>
> eint();
> //__bis_SR_register(LPM3_bits + GIE); // Enter LPM3, interrupts
> enabled
> for(;;);
> }
>
> // Echo back RXed character, confirm TX buffer is ready first
> interrupt ( USCIAB0RX_VECTOR ) wakeup USCI0RX_ISR(void)
> {
> while (!(IFG2&UCA0TXIFG)); // USCI_A0 TX buffer ready?
> UCA0TXBUF = UCA0RXBUF; // TX -> RXed character
> }
>
> Esp. use io.h as Peter suggested.
>
> Then compile with
> msp430-gcc -mmcu=msp430x2418 -Wall -v -g -S -DGCC_MSP430 -Wall test.c
> msp430-gcc -mmcu=msp430x2418 -Wall -v -g -E -DGCC_MSP430 -Wall test.c
> and send the relevant parts.
>
> Compile your application with
> msp430-gcc -mmcu=msp430x2418 -Wall -v -g -o test.elf -DGCC_MSP430
> -Wall test.c
> and test it...
>
> Hardy
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Mspgcc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users