git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@467 35acf78f-673a-0410-8e92-d51de3d6d3f4

master
gdisirio 2008-10-14 21:03:26 +00:00
parent 79a411fd97
commit e6757ceef9
4 changed files with 11 additions and 9 deletions

View File

@ -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. */
/*

View File

@ -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

View File

@ -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;
}

View File

@ -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 **