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

This commit is contained in:
gdisirio 2012-07-08 09:55:25 +00:00
parent 3d44ca0b8b
commit df72da79cf
4 changed files with 55 additions and 7 deletions

View File

@ -39,7 +39,6 @@
/* /*
* Board frequencies. * Board frequencies.
* NOTE: The LSE crystal is not fitted by default on the board.
*/ */
#define STM32_LSECLK 32768 #define STM32_LSECLK 32768
#define STM32_HSECLK 12000000 #define STM32_HSECLK 12000000

View File

@ -9,7 +9,8 @@
HSEFrequency="0" HSEFrequency="0"
LSEFrequency="0" LSEFrequency="0"
BoardPHYID="MII_KS8721_ID" BoardPHYID="MII_KS8721_ID"
BoardPHYType="RMII"> BoardPHYType="RMII"
VDD="330">
<ports> <ports>
<GPIOA> <GPIOA>
<pin0 <pin0

View File

@ -49,6 +49,42 @@
[/#if] [/#if]
[/#if] [/#if]
/*
* Board oscillators-related settings.
[#if doc1.board.@LSEFrequency[0]?number == 0]
* NOTE: LSE not fitted.
[/#if]
[#if doc1.board.@HSEFrequency[0]?number == 0]
* NOTE: HSE not fitted.
[/#if]
*/
#if !defined(STM32_LSECLK)
#define STM32_LSECLK ${doc1.board.@LSEFrequency[0]}
#endif
#if !defined(STM32_HSECLK)
#define STM32_HSECLK ${doc1.board.@HSEFrequency[0]}
#endif
[#if doc1.board.@HSEBypass[0]?string == "true"]
#define STM32_HSE_BYPASS
[/#if]
/*
* Board voltages.
* Required for performance limits calculation.
*/
#define STM32_VDD ${doc1.board.@VDD[0]}
/*
* MCU type as defined in the ST header file stm32f4xx.h.
*/
#define STM32F4XX
/*
* IO pins assignments.
*/
#if !defined(_FROM_ASM_) #if !defined(_FROM_ASM_)
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@ -17,7 +17,7 @@
minOccurs="1"> minOccurs="1">
</xs:element> </xs:element>
</xs:sequence> </xs:sequence>
<xs:attribute <xs:attribute
name="HSEBypass" name="HSEBypass"
type="xs:boolean" type="xs:boolean"
use="required"> use="required">
@ -32,7 +32,6 @@
</xs:annotation> </xs:annotation>
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:int"> <xs:restriction base="xs:int">
<xs:minInclusive value="0"></xs:minInclusive> <xs:minInclusive value="0"></xs:minInclusive>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
@ -50,12 +49,26 @@
<xs:minInclusive value="0"></xs:minInclusive> <xs:minInclusive value="0"></xs:minInclusive>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:attribute> </xs:attribute>
<xs:attribute
name="VDD"
use="required">
<xs:annotation>
<xs:documentation>STM32F4xx VDD.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:int">
<xs:minInclusive value="180"></xs:minInclusive>
<xs:whiteSpace value="collapse"></xs:whiteSpace>
<xs:maxInclusive value="360"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:extension> </xs:extension>
</xs:complexContent> </xs:complexContent>
</xs:complexType> </xs:complexType>
<xs:complexType name="portsType"> <xs:complexType name="portsType">
<xs:sequence> <xs:sequence>
<xs:element name="GPIOA" type="STM32GPIOv2PortType" <xs:element name="GPIOA" type="STM32GPIOv2PortType"
@ -79,6 +92,5 @@
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:element name="board" type="STM32F4xxBoardType"></xs:element> <xs:element name="board" type="STM32F4xxBoardType"></xs:element>
</xs:schema> </xs:schema>