aboutsummaryrefslogtreecommitdiffstats
path: root/demos/STM32
diff options
context:
space:
mode:
Diffstat (limited to 'demos/STM32')
-rw-r--r--demos/STM32/RT-STM32F429-DISCOVERY-DMA2D/.cproject203
-rw-r--r--demos/STM32/RT-STM32F429-DISCOVERY-TRIBUF/main.c4
2 files changed, 149 insertions, 58 deletions
diff --git a/demos/STM32/RT-STM32F429-DISCOVERY-DMA2D/.cproject b/demos/STM32/RT-STM32F429-DISCOVERY-DMA2D/.cproject
index 916c7ab..a2a9791 100644
--- a/demos/STM32/RT-STM32F429-DISCOVERY-DMA2D/.cproject
+++ b/demos/STM32/RT-STM32F429-DISCOVERY-DMA2D/.cproject
@@ -1,56 +1,147 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
- <storageModule moduleId="org.eclipse.cdt.core.settings">
- <cconfiguration id="0.1306240181">
- <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.1306240181" moduleId="org.eclipse.cdt.core.settings" name="Default">
- <externalSettings/>
- <extensions>
- <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- </extensions>
- </storageModule>
- <storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <configuration buildProperties="" description="" id="0.1306240181" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
- <folderInfo id="0.1306240181." name="/" resourcePath="">
- <toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.1809487124" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
- <targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.1809487124.82130379" name=""/>
- <builder id="org.eclipse.cdt.build.core.settings.default.builder.1978195842" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
- <tool id="org.eclipse.cdt.build.core.settings.holder.libs.1542188159" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
- <tool id="org.eclipse.cdt.build.core.settings.holder.1536899570" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
- <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.878634277" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
- </tool>
- <tool id="org.eclipse.cdt.build.core.settings.holder.508046483" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
- <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1664032194" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
- </tool>
- <tool id="org.eclipse.cdt.build.core.settings.holder.87282723" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
- <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.430808546" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
- </tool>
- </toolChain>
- </folderInfo>
- </configuration>
- </storageModule>
- <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
- </cconfiguration>
- </storageModule>
- <storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <project id="RT-STM32F429-DISCOVERY-DMA2D.null.1705354114" name="RT-STM32F429-DISCOVERY-DMA2D"/>
- </storageModule>
- <storageModule moduleId="scannerConfiguration">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
- <scannerConfigBuildInfo instanceId="0.2113576648">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
- </scannerConfigBuildInfo>
- <scannerConfigBuildInfo instanceId="0.1306240181">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
- </scannerConfigBuildInfo>
- <scannerConfigBuildInfo instanceId="0.114656749">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
- </scannerConfigBuildInfo>
- </storageModule>
- <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
- <storageModule moduleId="refreshScope"/>
-</cproject>
+/*
+ ChibiOS/RT - Copyright (C) 2014 Uladzimir Pylinsky aka barthess
+
+ 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
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ 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.
+*/
+
+/*
+ * FSMC driver system settings.
+ */
+#define STM32_FSMC_USE_FSMC1 FALSE
+#define STM32_FSMC_FSMC1_IRQ_PRIORITY 10
+
+/*
+ * FSMC NAND driver system settings.
+ */
+#define STM32_NAND_USE_FSMC_NAND1 FALSE
+#define STM32_NAND_USE_FSMC_NAND2 FALSE
+#define STM32_NAND_USE_EXT_INT FALSE
+#define STM32_NAND_DMA_STREAM STM32_DMA_STREAM_ID(2, 7)
+#define STM32_NAND_DMA_PRIORITY 0
+#define STM32_NAND_DMA_ERROR_HOOK(nandp) osalSysHalt("DMA failure")
+
+/*
+ * FSMC SRAM driver system settings.
+ */
+#define STM32_USE_FSMC_SRAM FALSE
+#define STM32_SRAM_USE_FSMC_SRAM1 FALSE
+#define STM32_SRAM_USE_FSMC_SRAM2 FALSE
+#define STM32_SRAM_USE_FSMC_SRAM3 FALSE
+#define STM32_SRAM_USE_FSMC_SRAM4 FALSE
+
+/*
+ * FSMC SDRAM driver system settings.
+ */
+#define STM32_USE_FSMC_SDRAM FALSE
+
+/*
+ * TIMCAP driver system settings.
+ */
+#define STM32_TIMCAP_USE_TIM1 FALSE
+#define STM32_TIMCAP_USE_TIM2 FALSE
+#define STM32_TIMCAP_USE_TIM3 FALSE
+#define STM32_TIMCAP_USE_TIM4 FALSE
+#define STM32_TIMCAP_USE_TIM5 FALSE
+#define STM32_TIMCAP_USE_TIM8 FALSE
+#define STM32_TIMCAP_USE_TIM9 FALSE
+#define STM32_TIMCAP_TIM1_IRQ_PRIORITY 3
+#define STM32_TIMCAP_TIM2_IRQ_PRIORITY 3
+#define STM32_TIMCAP_TIM3_IRQ_PRIORITY 3
+#define STM32_TIMCAP_TIM4_IRQ_PRIORITY 3
+#define STM32_TIMCAP_TIM5_IRQ_PRIORITY 3
+#define STM32_TIMCAP_TIM8_IRQ_PRIORITY 3
+#define STM32_TIMCAP_TIM9_IRQ_PRIORITY 3
+
+/*
+ * COMP driver system settings.
+ */
+#define STM32_COMP_USE_COMP1 FALSE
+#define STM32_COMP_USE_COMP2 FALSE
+#define STM32_COMP_USE_COMP3 FALSE
+#define STM32_COMP_USE_COMP4 FALSE
+#define STM32_COMP_USE_COMP5 FALSE
+#define STM32_COMP_USE_COMP6 FALSE
+#define STM32_COMP_USE_COMP7 FALSE
+
+#define STM32_COMP_USE_INTERRUPTS TRUE
+#define STM32_COMP_1_2_3_IRQ_PRIORITY 5
+#define STM32_COMP_4_5_6_IRQ_PRIORITY 5
+#define STM32_COMP_7_IRQ_PRIORITY 5
+
+#if STM32_COMP_USE_INTERRUPTS
+#define STM32_DISABLE_EXTI21_22_29_HANDLER
+#define STM32_DISABLE_EXTI30_32_HANDLER
+#define STM32_DISABLE_EXTI33_HANDLER
+#endif
+
+/*
+ * USBH driver system settings.
+ */
+#define STM32_OTG1_CHANNELS_NUMBER 8
+#define STM32_OTG2_CHANNELS_NUMBER 12
+
+#define STM32_USBH_USE_OTG1 1
+#define STM32_OTG1_RXFIFO_SIZE 1024
+#define STM32_OTG1_PTXFIFO_SIZE 128
+#define STM32_OTG1_NPTXFIFO_SIZE 128
+
+#define STM32_USBH_USE_OTG2 0
+#define STM32_OTG2_RXFIFO_SIZE 2048
+#define STM32_OTG2_PTXFIFO_SIZE 1024
+#define STM32_OTG2_NPTXFIFO_SIZE 1024
+
+#define STM32_USBH_MIN_QSPACE 4
+#define STM32_USBH_CHANNELS_NP 4
+
+/*
+ * CRC driver system settings.
+ */
+#define STM32_CRC_USE_CRC1 TRUE
+#define STM32_CRC_CRC1_DMA_IRQ_PRIORITY 1
+#define STM32_CRC_CRC1_DMA_PRIORITY 2
+#define STM32_CRC_CRC1_DMA_STREAM STM32_DMA1_STREAM2
+
+#define CRCSW_USE_CRC1 FALSE
+#define CRCSW_CRC32_TABLE TRUE
+#define CRCSW_CRC16_TABLE TRUE
+#define CRCSW_PROGRAMMABLE TRUE
+
+/*
+ * EICU driver system settings.
+ */
+#define STM32_EICU_USE_TIM1 FALSE
+#define STM32_EICU_USE_TIM2 FALSE
+#define STM32_EICU_USE_TIM3 TRUE
+#define STM32_EICU_USE_TIM4 FALSE
+#define STM32_EICU_USE_TIM5 FALSE
+#define STM32_EICU_USE_TIM8 FALSE
+#define STM32_EICU_USE_TIM9 FALSE
+#define STM32_EICU_USE_TIM10 FALSE
+#define STM32_EICU_USE_TIM11 FALSE
+#define STM32_EICU_USE_TIM12 FALSE
+#define STM32_EICU_USE_TIM13 FALSE
+#define STM32_EICU_USE_TIM14 FALSE
+#define STM32_EICU_TIM1_IRQ_PRIORITY 7
+#define STM32_EICU_TIM2_IRQ_PRIORITY 7
+#define STM32_EICU_TIM3_IRQ_PRIORITY 7
+#define STM32_EICU_TIM4_IRQ_PRIORITY 7
+#define STM32_EICU_TIM5_IRQ_PRIORITY 7
+#define STM32_EICU_TIM8_IRQ_PRIORITY 7
+#define STM32_EICU_TIM9_IRQ_PRIORITY 7
+#define STM32_EICU_TIM10_IRQ_PRIORITY 7
+#define STM32_EICU_TIM11_IRQ_PRIORITY 7
+#define STM32_EICU_TIM12_IRQ_PRIORITY 7
+#define STM32_EICU_TIM13_IRQ_PRIORITY 7
+#define STM32_EICU_TIM14_IRQ_PRIORITY 7
+
+
diff --git a/demos/STM32/RT-STM32F429-DISCOVERY-TRIBUF/main.c b/demos/STM32/RT-STM32F429-DISCOVERY-TRIBUF/main.c
index a7a33f6..c8f1af3 100644
--- a/demos/STM32/RT-STM32F429-DISCOVERY-TRIBUF/main.c
+++ b/demos/STM32/RT-STM32F429-DISCOVERY-TRIBUF/main.c
@@ -141,7 +141,7 @@ static THD_FUNCTION(reader_thread, arg) {
osalThreadSuspendS(&thread_ref);
reader_suspend = false;
} else {
- osalThreadSleepS(MS2ST(reader_delay));
+ osalThreadSleepS(TIME_MS2I(reader_delay));
}
old_priority = chThdGetPriorityX();
osalSysUnlock();
@@ -180,7 +180,7 @@ static THD_FUNCTION(writer_thread, arg) {
osalThreadSuspendS(&thread_ref);
writer_suspend = false;
} else {
- osalThreadSleepS(MS2ST(writer_delay));
+ osalThreadSleepS(TIME_MS2I(writer_delay));
}
osalSysUnlock();
}