diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-04-12 13:56:29 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-04-12 13:56:29 +0000 |
commit | f0c8dde933f7fee21163d9831821dc524b56e6ef (patch) | |
tree | fb685ce542876f77ac7c350cfc225ea274ed313d /demos | |
parent | e1613c5169d7c792015d6a0bd2224626873af4e2 (diff) | |
download | ChibiOS-f0c8dde933f7fee21163d9831821dc524b56e6ef.tar.gz ChibiOS-f0c8dde933f7fee21163d9831821dc524b56e6ef.tar.bz2 ChibiOS-f0c8dde933f7fee21163d9831821dc524b56e6ef.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@260 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos')
-rw-r--r-- | demos/ARMCM3-STM32F103-GCC/board.c | 3 | ||||
-rw-r--r-- | demos/ARMCM3-STM32F103-GCC/ch.ld | 2 | ||||
-rw-r--r-- | demos/ARMCM3-STM32F103-GCC/main.c | 9 |
3 files changed, 6 insertions, 8 deletions
diff --git a/demos/ARMCM3-STM32F103-GCC/board.c b/demos/ARMCM3-STM32F103-GCC/board.c index 1323030f0..283341c4f 100644 --- a/demos/ARMCM3-STM32F103-GCC/board.c +++ b/demos/ARMCM3-STM32F103-GCC/board.c @@ -75,7 +75,7 @@ void hwinit(void) { GPIOD->CRL = VAL_GPIODCRL;
GPIOD->CRH = VAL_GPIODCRH;
GPIOD->ODR = VAL_GPIODODR;
-#if 0
+
/*
* NVIC/SCB initialization.
*/
@@ -88,5 +88,4 @@ void hwinit(void) { ST_RVR = SYSCLK / (8000000 / CH_FREQUENCY) - 1;
ST_CVR = 0;
ST_CSR = ENABLE_ON_BITS | TICKINT_ENABLED_BITS | CLKSOURCE_EXT_BITS;
-#endif
}
diff --git a/demos/ARMCM3-STM32F103-GCC/ch.ld b/demos/ARMCM3-STM32F103-GCC/ch.ld index 96c5a3a1d..d5f948476 100644 --- a/demos/ARMCM3-STM32F103-GCC/ch.ld +++ b/demos/ARMCM3-STM32F103-GCC/ch.ld @@ -20,7 +20,7 @@ /*
* ST32F103 memory setup.
*/
-__main_stack_size__ = 0x0100;
+__main_stack_size__ = 0x0200;
__process_stack_size__ = 0x0100;
__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
diff --git a/demos/ARMCM3-STM32F103-GCC/main.c b/demos/ARMCM3-STM32F103-GCC/main.c index 99a1c085e..a5b766de5 100644 --- a/demos/ARMCM3-STM32F103-GCC/main.c +++ b/demos/ARMCM3-STM32F103-GCC/main.c @@ -28,7 +28,10 @@ static WorkingArea(waThread1, 64); static msg_t Thread1(void *arg) {
while (TRUE) {
- chThdSleep(1000);
+ GPIOC->BRR = GPIOC_LED;
+ chThdSleep(500);
+ GPIOC->BSRR = GPIOC_LED;
+ chThdSleep(500);
}
return 0;
}
@@ -38,10 +41,6 @@ static msg_t Thread1(void *arg) { */
int main(int argc, char **argv) {
- GPIOC->BRR = GPIOC_LED;
- while(1)
- ;
-
/*
* The main() function becomes a thread here then the interrupts are
* enabled and ChibiOS/RT goes live.
|