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

This commit is contained in:
gdisirio 2010-06-26 12:37:35 +00:00
parent 1ef97a2da2
commit 17bc42e5dc
6 changed files with 45 additions and 46 deletions

View File

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

View File

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

View File

@ -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" />
@ -87,7 +87,7 @@
<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>

View File

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

View File

@ -36,4 +36,5 @@
* SERIAL driver system settings.
*/
#define USE_STM8_UART1 TRUE
#define USE_STM8_UART2 FALSE
#define USE_STM8_UART3 FALSE

View File

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