diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-06-26 12:37:35 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-06-26 12:37:35 +0000 |
commit | 17bc42e5dc7d5d983a2d108b8599639604f92ee0 (patch) | |
tree | 24500a2f9b8334fbd9e72178c15302be4e12bc7d | |
parent | 1ef97a2da260c0734e71ef6697072b270014696f (diff) | |
download | ChibiOS-17bc42e5dc7d5d983a2d108b8599639604f92ee0.tar.gz ChibiOS-17bc42e5dc7d5d983a2d108b8599639604f92ee0.tar.bz2 ChibiOS-17bc42e5dc7d5d983a2d108b8599639604f92ee0.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2044 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | boards/RAISONANCE_REVA_STM8S/board.c | 20 | ||||
-rw-r--r-- | boards/RAISONANCE_REVA_STM8S/board.h | 3 | ||||
-rw-r--r-- | demos/STM8S-STM8S208-RC/ch.rapp | 58 | ||||
-rw-r--r-- | demos/STM8S-STM8S208-RC/ch.rprj | 4 | ||||
-rw-r--r-- | demos/STM8S-STM8S208-RC/mcuconf.h | 1 | ||||
-rw-r--r-- | os/hal/platforms/STM8/pal_lld.h | 3 |
6 files changed, 44 insertions, 45 deletions
diff --git a/boards/RAISONANCE_REVA_STM8S/board.c b/boards/RAISONANCE_REVA_STM8S/board.c index 9d27cc619..9c785627c 100644 --- a/boards/RAISONANCE_REVA_STM8S/board.c +++ b/boards/RAISONANCE_REVA_STM8S/board.c @@ -37,7 +37,7 @@ CH_IRQ_HANDLER(13) { chSysTimerHandlerI();
chSysUnlockFromIsr();
- TIM2_SR1 = 0;
+ TIM2->SR1 = 0;
CH_IRQ_EPILOGUE();
}
@@ -55,13 +55,13 @@ void hwinit(void) { /*
* TIM2 initialization as system tick.
*/
- CLK_PCKENR1 |= 32; /* PCKEN15, TIM2 clock source.*/
- TIM2_PSCR = 4; /* Prescaler divide by 2^4=16.*/
- TIM2_ARRH = TIM2_ARR >> 8;
- TIM2_ARRL = TIM2_ARR;
- TIM2_CNTRH = 0;
- TIM2_CNTRL = 0;
- TIM2_SR1 = 0;
- TIM2_IER = 1; /* UIE */
- TIM2_CR1 = 1; /* CEN */
+ CLK->PCKENR1 |= 32; /* PCKEN15, TIM2 clock source.*/
+ TIM2->PSCR = 4; /* Prescaler divide by 2^4=16.*/
+ TIM2->ARRH = TIM2_ARR >> 8;
+ TIM2->ARRL = TIM2_ARR;
+ TIM2->CNTRH = 0;
+ TIM2->CNTRL = 0;
+ TIM2->SR1 = 0;
+ TIM2->IER = 1; /* UIE */
+ TIM2->CR1 = 1; /* CEN */
}
diff --git a/boards/RAISONANCE_REVA_STM8S/board.h b/boards/RAISONANCE_REVA_STM8S/board.h index adca21661..dc93c0804 100644 --- a/boards/RAISONANCE_REVA_STM8S/board.h +++ b/boards/RAISONANCE_REVA_STM8S/board.h @@ -37,9 +37,8 @@ /*
* MCU model used on the board.
- * The available models are listed in the file ./os/hal/platforms/stm8/stm8.h
*/
-#define STM8_PLATFORM PLATFORM_STM8S208RB
+#define STM8S208
/*
* Pin definitions.
diff --git a/demos/STM8S-STM8S208-RC/ch.rapp b/demos/STM8S-STM8S208-RC/ch.rapp index 499f89206..5f89b1c92 100644 --- a/demos/STM8S-STM8S208-RC/ch.rapp +++ b/demos/STM8S-STM8S208-RC/ch.rapp @@ -1,5 +1,5 @@ -<ApplicationBuild Header="ch" Extern=".\ch.rapp" Path=".\ch.rapp" OutputFile="..\STM8S-STM8S208-RC/bin\ch.aof" sate="96" >
+<ApplicationBuild Header="ch" Extern=".\ch.rapp" Path=".\ch.rapp" OutputFile="..\STM8S-STM8S208-RC/bin\ch.aof" sate="98" >
<Group Header="kernel" Marker="-1" OutputFile="" sate="0" >
<NodeC Path="..\..\os\kernel\src\chcond.c" Header="chcond.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\chcond.obj" sate="0" />
<NodeC Path="..\..\os\kernel\src\chdebug.c" Header="chdebug.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\chdebug.obj" sate="0" />
@@ -10,15 +10,15 @@ <Set Header="RCST7" >
<Section Header="Model" >
<Property Header="GlobalMemory" Value="" Removable="1" />
-
+
</Section>
-
+
</Set>
-
+
</Config>
-
+
</Options>
-
+
</NodeC>
<NodeC Path="..\..\os\kernel\src\chlists.c" Header="chlists.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\chlists.obj" sate="0" />
<NodeC Path="..\..\os\kernel\src\chmboxes.c" Header="chmboxes.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\chmboxes.obj" sate="0" />
@@ -30,7 +30,7 @@ <NodeC Path="..\..\os\kernel\src\chregistry.c" Header="chregistry.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\chregistry.obj" sate="0" />
<NodeC Path="..\..\os\kernel\src\chschd.c" Header="chschd.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\chschd.obj" sate="0" >
<Options/>
-
+
</NodeC>
<NodeC Path="..\..\os\kernel\src\chsem.c" Header="chsem.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\chsem.obj" sate="0" />
<NodeC Path="..\..\os\kernel\src\chsys.c" Header="chsys.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\chsys.obj" sate="0" />
@@ -41,17 +41,17 @@ <Set Header="RCST7" >
<Section Header="Model" >
<Property Header="GlobalMemory" Value="" Removable="1" />
-
+
</Section>
-
+
</Set>
-
+
</Config>
-
+
</Options>
-
+
</NodeC>
-
+
</Group>
<Group Header="test" Marker="-1" OutputFile="" sate="0" >
<NodeC Path="..\..\test\test.c" Header="test.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\test.obj" sate="0" />
@@ -66,11 +66,11 @@ <NodeC Path="..\..\test\testqueues.c" Header="testqueues.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\testqueues.obj" sate="0" />
<NodeC Path="..\..\test\testsem.c" Header="testsem.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\testsem.obj" sate="0" />
<NodeC Path="..\..\test\testthd.c" Header="testthd.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\testthd.obj" sate="0" />
-
+
</Group>
<Group Header="port" Marker="-1" OutputFile="" sate="0" >
<NodeC Path="..\..\os\ports\RC\STM8\chcore.c" Header="chcore.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\chcore.obj" sate="0" />
-
+
</Group>
<Group Header="hal" Marker="-1" OutputFile="" sate="0" >
<NodeC Path="..\..\os\hal\src\adc.c" Header="adc.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\adc.obj" sate="0" />
@@ -85,11 +85,11 @@ <NodeC Path="..\..\os\hal\platforms\STM8\hal_lld.c" Header="hal_lld.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\hal_lld.obj" sate="0" />
<NodeC Path="..\..\os\hal\platforms\STM8\serial_lld.c" Header="serial_lld.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\serial_lld.obj" sate="0" />
<NodeC Path="..\..\os\hal\platforms\STM8\pal_lld.c" Header="pal_lld.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\pal_lld.obj" sate="0" />
-
+
</Group>
- <Group Header="board" Marker="-1" OutputFile="" sate="0" >
+ <Group Header="board" Marker="-1" OutputFile="" sate="96" >
<NodeC Path="..\..\boards\RAISONANCE_REVA_STM8S\board.c" Header="board.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\board.obj" sate="0" />
-
+
</Group>
<NodeC Path=".\main.c" Header="main.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\main.obj" sate="0" />
<Options>
@@ -97,21 +97,21 @@ <Set Header="ApplicationBuild" >
<Section Header="General" >
<Property Header="TargetFamily" Value="ST7" />
-
+
</Section>
<Section Header="Directories" >
<Property Header="IncDir" Value="$(RkitInc);$(RkitInc)\ST7;..\..\os\kernel\include;..\..\os\ports\RC\STM8;..\..\os\hal\include;..\..\os\hal\platforms\STM8;..\..\boards\RAISONANCE_REVA_STM8S;..\..\test" Removable="1" />
<Property Header="OutDir" Value="$(ApplicationDir)/bin" Removable="1" />
<Property Header="ListDir" Value="$(ApplicationDir)/lst" Removable="1" />
<Property Header="LinkerOutputDir" Value="Output Directory" Removable="1" />
-
+
</Section>
-
+
</Set>
<Set Header="Target" >
<Section Header="ProcessorST7" >
<Property Header="Processor" Value="STM8S208MB" Removable="1" />
-
+
</Section>
<Section Header="ToolSetST7" >
<Property Header="BuildToolSetST7" Value="ST7\RaisonanceTools.config" Removable="1" />
@@ -122,33 +122,33 @@ <Section Header="DebugST7" >
<Property Header="Startup" Value="1" Removable="1" />
<Property Header="DebugTool_STM8" Value="RLINK_STM8" Removable="1" />
-
+
</Section>
</Set>
<Set Header="RCST7" >
<Section Header="CodeGen" >
<Property Header="ENUMTYPE" Value="ET(CHAR)" Removable="1" />
-
+
</Section>
<Section Header="Model" >
<Property Header="GlobalMemory" Value="DGC(DATA)" Removable="1" />
<Property Header="ModelP" Value="STM8(SMALL)" Removable="1" />
-
+
</Section>
<Section Header="OPTIM" >
<Property Header="OTLEVEL" Value="3" Removable="1" />
<Property Header="SPEEDSIZE" Value="SPEED" Removable="1" />
-
+
</Section>
-
+
</Set>
<Set Header="MAST7" >
<Section Header="Set" >
<Property Header="Defines" Value="STM8S208RB" Removable="1" />
-
+
</Section>
-
+
</Set>
</Config>
</Options>
diff --git a/demos/STM8S-STM8S208-RC/ch.rprj b/demos/STM8S-STM8S208-RC/ch.rprj index d066d7b79..dc557d7be 100644 --- a/demos/STM8S-STM8S208-RC/ch.rprj +++ b/demos/STM8S-STM8S208-RC/ch.rprj @@ -1,4 +1,4 @@ -<Project Header="Project 'ch'" Path=".\ch.rprj" Project="Yes" OutputFile="" sate="98" ActiveApp="ch" >
- <ApplicationBuild Header="ch" Extern=".\ch.rapp" Path=".\ch.rapp" OutputFile="..\STM8S-STM8S208-RC/bin\ch.aof" sate="96" />
+<Project Header="Project 'ch'" Path=".\ch.rprj" Project="Yes" OutputFile="" sate="96" ActiveApp="ch" >
+ <ApplicationBuild Header="ch" Extern=".\ch.rapp" Path=".\ch.rapp" OutputFile="..\STM8S-STM8S208-RC/bin\ch.aof" sate="98" />
</Project>
\ No newline at end of file diff --git a/demos/STM8S-STM8S208-RC/mcuconf.h b/demos/STM8S-STM8S208-RC/mcuconf.h index 227499992..c2148ac5b 100644 --- a/demos/STM8S-STM8S208-RC/mcuconf.h +++ b/demos/STM8S-STM8S208-RC/mcuconf.h @@ -36,4 +36,5 @@ * SERIAL driver system settings.
*/
#define USE_STM8_UART1 TRUE
+#define USE_STM8_UART2 FALSE
#define USE_STM8_UART3 FALSE
diff --git a/os/hal/platforms/STM8/pal_lld.h b/os/hal/platforms/STM8/pal_lld.h index cd819e7ef..7f2fb2cd9 100644 --- a/os/hal/platforms/STM8/pal_lld.h +++ b/os/hal/platforms/STM8/pal_lld.h @@ -58,8 +58,7 @@ * or whole ports can be reprogrammed at later time.
*/
typedef struct {
-#if defined(STM8S207) || defined(STM8S208) || defined(STM8S105) || \
- defined(__DOXYGEN__)
+#if defined(STM8S105) || defined(__DOXYGEN__)
GPIO_TypeDef P[7];
#elif defined(STM8S207) || defined(STM8S208)
GPIO_TypeDef P[9];
|