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

This commit is contained in:
gdisirio 2008-04-18 12:33:52 +00:00
parent f71ba1635a
commit 792c528dbc
5 changed files with 13 additions and 10 deletions

View File

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

View File

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

View File

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

View File

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

View File

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