diff --git a/demos/MSP430-MSP430x1611-GCC/board.c b/demos/MSP430-MSP430x1611-GCC/board.c index e6ae187da..8fcecec17 100644 --- a/demos/MSP430-MSP430x1611-GCC/board.c +++ b/demos/MSP430-MSP430x1611-GCC/board.c @@ -74,9 +74,9 @@ void hwinit(void) { /* * Timer 0 setup, uses SMCLK as source. */ - TACCR0 = SMCLK / CH_FREQUENCY - 1; /* Counter limit. */ + TACCR0 = SMCLK / 4 / CH_FREQUENCY - 1;/* Counter limit. */ TACTL = TACLR; /* Clean start. */ - TACTL = TASSEL_2 | MC_1; /* Src=SMCLK, cmp=TACCR0. */ + TACTL = TASSEL_2 | ID_2 | MC_1; /* Src=SMCLK, ID=4, cmp=TACCR0. */ TACCTL0 = CCIE; /* Interrupt on compare. */ /* diff --git a/demos/MSP430-MSP430x1611-GCC/chconf.h b/demos/MSP430-MSP430x1611-GCC/chconf.h index da9878f86..c78c97701 100644 --- a/demos/MSP430-MSP430x1611-GCC/chconf.h +++ b/demos/MSP430-MSP430x1611-GCC/chconf.h @@ -151,12 +151,12 @@ /** Configuration option: Frequency of the system timer that drives the system * ticks. This also defines the system time unit.*/ -#define CH_FREQUENCY 1000 +#define CH_FREQUENCY 100 /** Configuration option: This constant is the number of ticks allowed for the * threads before preemption occurs. This option is only meaningful if the * option \p CH_USE_ROUNDROBIN is also active.*/ -#define CH_TIME_QUANTUM 20 +#define CH_TIME_QUANTUM 10 /** Configuration option: Defines a CPU register to be used as storage for the * global \p currp variable. Caching this variable in a register can greatly diff --git a/demos/MSP430-MSP430x1611-GCC/main.c b/demos/MSP430-MSP430x1611-GCC/main.c index 19ffacf7f..9904dfdb0 100644 --- a/demos/MSP430-MSP430x1611-GCC/main.c +++ b/demos/MSP430-MSP430x1611-GCC/main.c @@ -31,9 +31,9 @@ static msg_t Thread1(void *arg) { while (TRUE) { P6OUT |= P6_O_LED; - chThdSleep(500); + chThdSleep(50); P6OUT &= ~P6_O_LED; - chThdSleep(500); + chThdSleep(50); } return 0; } @@ -66,7 +66,7 @@ int main(int argc, char **argv) { while (TRUE) { if (!(P6IN & P6_I_BUTTON)) TestThread(&COM1); - chThdSleep(500); + chThdSleep(50); } return 0; } diff --git a/demos/MSP430-MSP430x1611-GCC/readme.txt b/demos/MSP430-MSP430x1611-GCC/readme.txt index 0fd0c5a7b..3c1682098 100644 --- a/demos/MSP430-MSP430x1611-GCC/readme.txt +++ b/demos/MSP430-MSP430x1611-GCC/readme.txt @@ -4,11 +4,13 @@ ** TARGET ** -The demo runs on an Olimex MSP430-P1611 board but it is still untested. +The demo runs on an Olimex MSP430-P1611 board. ** The Demo ** -The demo flashes the board LED using a thread. +The demo flashes the board LED using a thread, by pressing the button located +on the board the test procedure is activated with output on the serial port +COM1 (USART0). ** Build Procedure **