diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-04-18 12:33:52 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-04-18 12:33:52 +0000 |
commit | 792c528dbc75f0ffeb19766594607bee73fa36ad (patch) | |
tree | 5ba15b026fe89c4993dd92af6fecb35f9e1179aa | |
parent | f71ba1635af2197a9543a37ea2b19a608a28320f (diff) | |
download | ChibiOS-792c528dbc75f0ffeb19766594607bee73fa36ad.tar.gz ChibiOS-792c528dbc75f0ffeb19766594607bee73fa36ad.tar.bz2 ChibiOS-792c528dbc75f0ffeb19766594607bee73fa36ad.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@270 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | demos/ARMCM3-STM32F103-GCC/readme.txt | 4 | ||||
-rw-r--r-- | ports/ARMCM3-STM32F103/stm32_serial.c | 6 | ||||
-rw-r--r-- | ports/ARMCM3/nvic.c | 3 | ||||
-rw-r--r-- | ports/ARMCM3/nvic.h | 2 | ||||
-rw-r--r-- | readme.txt | 8 |
5 files changed, 13 insertions, 10 deletions
diff --git a/demos/ARMCM3-STM32F103-GCC/readme.txt b/demos/ARMCM3-STM32F103-GCC/readme.txt index 33c94445b..d3954897a 100644 --- a/demos/ARMCM3-STM32F103-GCC/readme.txt +++ b/demos/ARMCM3-STM32F103-GCC/readme.txt @@ -8,7 +8,9 @@ The demo will on an Olimex STM32-P103 board. ** The Demo **
-Not complete yet.
+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
+COM2 (USART2).
** Build Procedure **
diff --git a/ports/ARMCM3-STM32F103/stm32_serial.c b/ports/ARMCM3-STM32F103/stm32_serial.c index fdd7c5f77..300cdfdce 100644 --- a/ports/ARMCM3-STM32F103/stm32_serial.c +++ b/ports/ARMCM3-STM32F103/stm32_serial.c @@ -174,25 +174,25 @@ void InitSerial(uint32_t prio1, uint32_t prio2, uint32_t prio3) { #ifdef USE_USART1
chFDDInit(&COM1, ib1, sizeof ib1, NULL, ob1, sizeof ob1, OutNotify1);
- GPIOA->CRH = (GPIOA->CRH & 0xFFFFF00F) | 0x000004B0;
RCC->APB2ENR |= 0x00002000;
SetUSARTI(USART1, 38400, 0, CR2_STOP1_BITS | CR2_LINEN, 0);
+ GPIOA->CRH = (GPIOA->CRH & 0xFFFFF00F) | 0x000004B0;
NVICEnableVector(USART1_IRQChannel, prio1);
#endif
#ifdef USE_USART2
chFDDInit(&COM2, ib2, sizeof ib2, NULL, ob2, sizeof ob2, OutNotify2);
- GPIOA->CRL = (GPIOA->CRL & 0xFFFF00FF) | 0x00004B00;
RCC->APB1ENR |= 0x00020000;
SetUSARTI(USART2, 38400, 0, CR2_STOP1_BITS | CR2_LINEN, 0);
+ GPIOA->CRL = (GPIOA->CRL & 0xFFFF00FF) | 0x00004B00;
NVICEnableVector(USART2_IRQChannel, prio2);
#endif
#ifdef USE_USART3
chFDDInit(&COM3, ib3, sizeof ib3, NULL, ob3, sizeof ob3, OutNotify3);
- GPIOB->CRH = (GPIOB->CRH & 0xFFFF00FF) | 0x00004B00;
RCC->APB1ENR |= 0x00040000;
SetUSARTI(USART3, 38400, 0, CR2_STOP1_BITS | CR2_LINEN, 0);
+ GPIOB->CRH = (GPIOB->CRH & 0xFFFF00FF) | 0x00004B00;
NVICEnableVector(USART3_IRQChannel, prio3);
#endif
}
diff --git a/ports/ARMCM3/nvic.c b/ports/ARMCM3/nvic.c index c36229c9c..dbb4935c0 100644 --- a/ports/ARMCM3/nvic.c +++ b/ports/ARMCM3/nvic.c @@ -21,7 +21,8 @@ #include <nvic.h>
void NVICEnableVector(uint32_t n, uint32_t prio) {
+ int sh = (n & 3) << 3;
- NVIC_IPR(n >> 2) = (NVIC_IPR(n >> 2) & ~(0xFF << (n & 3))) | (prio << (n & 3));
+ NVIC_IPR(n >> 2) = (NVIC_IPR(n >> 2) & ~(0xFF << sh)) | (prio << sh);
NVIC_ISER(n >> 5) = 1 << (n & 0x1F);
}
diff --git a/ports/ARMCM3/nvic.h b/ports/ARMCM3/nvic.h index 0cb4cc36b..96a70ea85 100644 --- a/ports/ARMCM3/nvic.h +++ b/ports/ARMCM3/nvic.h @@ -68,7 +68,7 @@ typedef struct { IOREG32 ICPR[8];
IOREG32 unused4[24];
IOREG32 IABR[8];
- IOREG32 unused5[54];
+ IOREG32 unused5[56];
IOREG32 IPR[60];
} NVIC;
diff --git a/readme.txt b/readme.txt index e8aa096fc..5059b2871 100644 --- a/readme.txt +++ b/readme.txt @@ -37,9 +37,8 @@ ARM7-LPC214x-G++ - Yet another LPC214X demo but this one is done using ChibiOS/RT users.
ARM7-AT91SAM7X-GCC - Port for Atmel AT91SAM7X256. The demo program targets
the Olimex SAM7-EX256 board.
-ARMCM3-ST32F103-GCC - ARM Cortex-M3 port, work in progress, not complete
- yet. The demo will target the Olimex STM32-P103
- board.
+ARMCM3-ST32F103-GCC - ARM Cortex-M3 port. The demo targets the Olimex
+ STM32-P103 board.
AVR-AVRmega128-GCC - Port on AVRmega128. A special thanks to Vladimir for
the work done on the AVR port. The demo program
targets the Olimex AVR-MT-128 mini terminal board.
@@ -64,12 +63,13 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process, *****************************************************************************
*** 0.6.3 ***
+- NEW: ARM Cortex-M3 port completed. The demo program targets the STM32F103
+ chip from ST Microelectronics on an Olimex STM32-P103 board.
- Fixed a minor error in ./ports/ARM7/vic.h, it should not affect anything.
- Minor bug fix: in chThdCreate() a working area size equal to UserStackSize(0)
was asserted as an error when in debug mode. It is now allowed.
- Increased the stack size for the threads in the test suite to 128 bytes
because THUMB/THUMB2 modes seem to use a lot more stack than ARM mode.
-- More work done on the ARM-CM3 port but it does not pass the test suite yet.
*** 0.6.2 ***
- NEW: Added C++ wrapper around the ChibiOS/RT core APIs, now it is possible
|