From fee72530476c5b9eed43fde792df9de367d56800 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 13 May 2010 14:02:17 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1915 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- boards/ST_STM3210C_EVAL/board.h | 113 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 boards/ST_STM3210C_EVAL/board.h (limited to 'boards/ST_STM3210C_EVAL/board.h') diff --git a/boards/ST_STM3210C_EVAL/board.h b/boards/ST_STM3210C_EVAL/board.h new file mode 100644 index 000000000..f6e623335 --- /dev/null +++ b/boards/ST_STM3210C_EVAL/board.h @@ -0,0 +1,113 @@ +/* + ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio. + + This file is part of ChibiOS/RT. + + ChibiOS/RT is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + ChibiOS/RT is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#ifndef _BOARD_H_ +#define _BOARD_H_ + +/* + * Setup for the STMicroelectronics STM3210C-EVAL evaluation board. + */ + +/* + * Board identifier. + */ +#define BOARD_ST_STM3210C_EVAL +#define BOARD_NAME "ST STM3210C-EVAL" + +/* + * Board frequencies. + */ +#define STM32_LSECLK 32768 +#define STM32_HSECLK 25000000 + +/* + * MCU type, this macro is used by both the ST library and the ChibiOS/RT + * native STM32 HAL. + */ +#define STM32F10X_CL + +/* + * IO pins assignments. + * *********************TO BE COMPLETED********************* + */ + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * + * The digits have the following meaning: + * 0 - Analog input. + * 1 - Push Pull output 10MHz. + * 2 - Push Pull output 2MHz. + * 3 - Push Pull output 50MHz. + * 4 - Digital input. + * 5 - Open Drain output 10MHz. + * 6 - Open Drain output 2MHz. + * 7 - Open Drain output 50MHz. + * 8 - Digital input with PullUp or PullDown resistor depending on ODR. + * 9 - Alternate Push Pull output 10MHz. + * A - Alternate Push Pull output 2MHz. + * B - Alternate Push Pull output 50MHz. + * C - Reserved. + * D - Alternate Open Drain output 10MHz. + * E - Alternate Open Drain output 2MHz. + * F - Alternate Open Drain output 50MHz. + * Please refer to the STM32 Reference Manual for details. + */ + +/* + * Port A setup. + * Everything input with pull-up except: + */ +#define VAL_GPIOACRL 0x88888888 /* PA7...PA0 */ +#define VAL_GPIOACRH 0x88888888 /* PA15...PA8 */ +#define VAL_GPIOAODR 0xFFFFFFFF + +/* + * Port B setup. + * Everything input with pull-up except: + */ +#define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */ +#define VAL_GPIOBCRH 0x88888888 /* PB15...PB8 */ +#define VAL_GPIOBODR 0xFFFFFFFF + +/* + * Port C setup. + * Everything input with pull-up except: + */ +#define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */ +#define VAL_GPIOCCRH 0x88888888 /* PC15...PC8 */ +#define VAL_GPIOCODR 0xFFFFFFFF + +/* + * Port D setup. + * Everything input with pull-up except: + */ +#define VAL_GPIODCRL 0x88888888 /* PD7...PD0 */ +#define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */ +#define VAL_GPIODODR 0xFFFFFFFF + +/* + * Port E setup. + */ +#define VAL_GPIOECRL 0x88888888 /* PE7...PE0 */ +#define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */ +#define VAL_GPIOEODR 0xFFFFFFFF + +#endif /* _BOARD_H_ */ -- cgit v1.2.3 From 55b7744199ce9771ac761fc708d173bc487145e8 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 14 May 2010 06:43:02 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1916 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- boards/ST_STM3210C_EVAL/board.h | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) (limited to 'boards/ST_STM3210C_EVAL/board.h') diff --git a/boards/ST_STM3210C_EVAL/board.h b/boards/ST_STM3210C_EVAL/board.h index f6e623335..9117aa52d 100644 --- a/boards/ST_STM3210C_EVAL/board.h +++ b/boards/ST_STM3210C_EVAL/board.h @@ -38,7 +38,7 @@ /* * MCU type, this macro is used by both the ST library and the ChibiOS/RT - * native STM32 HAL. + * native STM32 HAL. */ #define STM32F10X_CL @@ -73,41 +73,45 @@ /* * Port A setup. - * Everything input with pull-up except: + * Everything input except: */ -#define VAL_GPIOACRL 0x88888888 /* PA7...PA0 */ -#define VAL_GPIOACRH 0x88888888 /* PA15...PA8 */ +#define VAL_GPIOACRL 0x44444444 /* PA7...PA0 */ +#define VAL_GPIOACRH 0x44444444 /* PA15...PA8 */ #define VAL_GPIOAODR 0xFFFFFFFF /* * Port B setup. - * Everything input with pull-up except: + * Everything input except: */ -#define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */ -#define VAL_GPIOBCRH 0x88888888 /* PB15...PB8 */ +#define VAL_GPIOBCRL 0x44444444 /* PB7...PB0 */ +#define VAL_GPIOBCRH 0x44444444 /* PB15...PB8 */ #define VAL_GPIOBODR 0xFFFFFFFF /* * Port C setup. - * Everything input with pull-up except: + * Everything input except: */ -#define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */ -#define VAL_GPIOCCRH 0x88888888 /* PC15...PC8 */ +#define VAL_GPIOCCRL 0x44444444 /* PC7...PC0 */ +#define VAL_GPIOCCRH 0x44444444 /* PC15...PC8 */ #define VAL_GPIOCODR 0xFFFFFFFF /* * Port D setup. - * Everything input with pull-up except: + * Everything input except: + * PD5 - USART2TX (remapped) AF PP Output + * PD6 - USART2RX (remapped) Digital Input + * PD7 - LED (LD1) PP Output */ -#define VAL_GPIODCRL 0x88888888 /* PD7...PD0 */ -#define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */ -#define VAL_GPIODODR 0xFFFFFFFF +#define VAL_GPIODCRL 0x34B44444 /* PD7...PD0 */ +#define VAL_GPIODCRH 0x44444444 /* PD15...PD8 */ +#define VAL_GPIODODR 0x0F0FFFFF /* * Port E setup. + * Everything input except: */ -#define VAL_GPIOECRL 0x88888888 /* PE7...PE0 */ -#define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */ +#define VAL_GPIOECRL 0x44444444 /* PE7...PE0 */ +#define VAL_GPIOECRH 0x44444444 /* PE15...PE8 */ #define VAL_GPIOEODR 0xFFFFFFFF #endif /* _BOARD_H_ */ -- cgit v1.2.3 From 7ab0cff418bf49fcf1671dd72667b81a85c1ac37 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 14 Nov 2010 13:29:09 +0000 Subject: Improved STM32 HAL support. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2363 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- boards/ST_STM3210C_EVAL/board.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'boards/ST_STM3210C_EVAL/board.h') diff --git a/boards/ST_STM3210C_EVAL/board.h b/boards/ST_STM3210C_EVAL/board.h index 9117aa52d..8c382a8b8 100644 --- a/boards/ST_STM3210C_EVAL/board.h +++ b/boards/ST_STM3210C_EVAL/board.h @@ -37,10 +37,9 @@ #define STM32_HSECLK 25000000 /* - * MCU type, this macro is used by both the ST library and the ChibiOS/RT - * native STM32 HAL. + * MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h. */ -#define STM32F10X_CL +#define STM32F107xC /* * IO pins assignments. -- cgit v1.2.3 From 354bd66eb083691cab4c2c29b32a836805ac5edc Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 16 Nov 2010 18:39:47 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2371 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- boards/ST_STM3210C_EVAL/board.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'boards/ST_STM3210C_EVAL/board.h') diff --git a/boards/ST_STM3210C_EVAL/board.h b/boards/ST_STM3210C_EVAL/board.h index 8c382a8b8..30bb6cb94 100644 --- a/boards/ST_STM3210C_EVAL/board.h +++ b/boards/ST_STM3210C_EVAL/board.h @@ -28,7 +28,7 @@ * Board identifier. */ #define BOARD_ST_STM3210C_EVAL -#define BOARD_NAME "ST STM3210C-EVAL" +#define BOARD_NAME "ST STM3210C-EVAL" /* * Board frequencies. @@ -39,7 +39,7 @@ /* * MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h. */ -#define STM32F107xC +#define STM32F10X_CL /* * IO pins assignments. -- cgit v1.2.3 From 7d7d9727f9a280d63157ac9997fe271610f05b1e Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 19 Dec 2010 09:13:54 +0000 Subject: STM32 board files and demos now use the new organization. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2497 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- boards/ST_STM3210C_EVAL/board.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'boards/ST_STM3210C_EVAL/board.h') diff --git a/boards/ST_STM3210C_EVAL/board.h b/boards/ST_STM3210C_EVAL/board.h index 30bb6cb94..b8833ac9f 100644 --- a/boards/ST_STM3210C_EVAL/board.h +++ b/boards/ST_STM3210C_EVAL/board.h @@ -113,4 +113,14 @@ #define VAL_GPIOECRH 0x44444444 /* PE15...PE8 */ #define VAL_GPIOEODR 0xFFFFFFFF +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + #endif /* _BOARD_H_ */ -- cgit v1.2.3 From e7e79a6ccb4f3e320b2b8b7bad1b14d65218641d Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 18 Mar 2011 18:38:08 +0000 Subject: License updated. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2827 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- boards/ST_STM3210C_EVAL/board.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'boards/ST_STM3210C_EVAL/board.h') diff --git a/boards/ST_STM3210C_EVAL/board.h b/boards/ST_STM3210C_EVAL/board.h index b8833ac9f..e2d92bdd9 100644 --- a/boards/ST_STM3210C_EVAL/board.h +++ b/boards/ST_STM3210C_EVAL/board.h @@ -1,5 +1,6 @@ /* - ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio. + ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010, + 2011 Giovanni Di Sirio. This file is part of ChibiOS/RT. -- cgit v1.2.3 From de5dcbba856524599a8f06d3a9bdbf1b01db44c2 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 21 Jan 2012 14:29:42 +0000 Subject: License text updated with new year. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3846 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- boards/ST_STM3210C_EVAL/board.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'boards/ST_STM3210C_EVAL/board.h') diff --git a/boards/ST_STM3210C_EVAL/board.h b/boards/ST_STM3210C_EVAL/board.h index e2d92bdd9..beb448937 100644 --- a/boards/ST_STM3210C_EVAL/board.h +++ b/boards/ST_STM3210C_EVAL/board.h @@ -1,6 +1,6 @@ /* ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010, - 2011 Giovanni Di Sirio. + 2011,2012 Giovanni Di Sirio. This file is part of ChibiOS/RT. -- cgit v1.2.3 From 5caf58a184d6ffb0d08c286ab8137d224ae48ba3 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 7 Sep 2012 13:16:33 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4635 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- boards/ST_STM3210C_EVAL/board.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'boards/ST_STM3210C_EVAL/board.h') diff --git a/boards/ST_STM3210C_EVAL/board.h b/boards/ST_STM3210C_EVAL/board.h index beb448937..8aad92543 100644 --- a/boards/ST_STM3210C_EVAL/board.h +++ b/boards/ST_STM3210C_EVAL/board.h @@ -25,6 +25,11 @@ * Setup for the STMicroelectronics STM3210C-EVAL evaluation board. */ +#define GPIOD_LED1 7 +#define GPIOD_LED2 13 +#define GPIOD_LED3 3 +#define GPIOD_LED4 4 + /* * Board identifier. */ @@ -102,16 +107,16 @@ * PD6 - USART2RX (remapped) Digital Input * PD7 - LED (LD1) PP Output */ -#define VAL_GPIODCRL 0x34B44444 /* PD7...PD0 */ -#define VAL_GPIODCRH 0x44444444 /* PD15...PD8 */ -#define VAL_GPIODODR 0x0F0FFFFF +#define VAL_GPIODCRL 0x34B33444 /* PD7...PD0 */ +#define VAL_GPIODCRH 0x44344444 /* PD15...PD8 */ +#define VAL_GPIODODR 0x0000DF67 /* * Port E setup. * Everything input except: */ #define VAL_GPIOECRL 0x44444444 /* PE7...PE0 */ -#define VAL_GPIOECRH 0x44444444 /* PE15...PE8 */ +#define VAL_GPIOECRH 0x44344444 /* PE15...PE8 */ #define VAL_GPIOEODR 0xFFFFFFFF #if !defined(_FROM_ASM_) -- cgit v1.2.3 From 184a71345c6a36a9a8664eda8fbcc3ea728267a8 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 2 Feb 2013 10:58:09 +0000 Subject: Updated license years. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5102 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- boards/ST_STM3210C_EVAL/board.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'boards/ST_STM3210C_EVAL/board.h') diff --git a/boards/ST_STM3210C_EVAL/board.h b/boards/ST_STM3210C_EVAL/board.h index 8aad92543..9046bda1e 100644 --- a/boards/ST_STM3210C_EVAL/board.h +++ b/boards/ST_STM3210C_EVAL/board.h @@ -1,6 +1,6 @@ /* ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010, - 2011,2012 Giovanni Di Sirio. + 2011,2012,2013 Giovanni Di Sirio. This file is part of ChibiOS/RT. -- cgit v1.2.3 From 853216256ad4cdacf5f94edb7d6b738c6be165a1 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 30 Mar 2013 10:32:37 +0000 Subject: Relicensing parts of the tree under the Apache 2.0 license. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5521 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- boards/ST_STM3210C_EVAL/board.h | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'boards/ST_STM3210C_EVAL/board.h') diff --git a/boards/ST_STM3210C_EVAL/board.h b/boards/ST_STM3210C_EVAL/board.h index 9046bda1e..2193179b8 100644 --- a/boards/ST_STM3210C_EVAL/board.h +++ b/boards/ST_STM3210C_EVAL/board.h @@ -1,21 +1,17 @@ /* - ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010, - 2011,2012,2013 Giovanni Di Sirio. + ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio - This file is part of ChibiOS/RT. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - ChibiOS/RT is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + http://www.apache.org/licenses/LICENSE-2.0 - ChibiOS/RT is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ #ifndef _BOARD_H_ -- cgit v1.2.3