diff options
author | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-08-05 14:37:04 +0000 |
---|---|---|
committer | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-08-05 14:37:04 +0000 |
commit | 70574490da58814907c28067a494697f37b1d615 (patch) | |
tree | f932c9a555f29dd158890eeccc032e50c66bc1b3 /testhal/STM32 | |
parent | 3988ae9c5e823117b2e5656f4f4f0e239cfc5859 (diff) | |
download | ChibiOS-70574490da58814907c28067a494697f37b1d615.tar.gz ChibiOS-70574490da58814907c28067a494697f37b1d615.tar.bz2 ChibiOS-70574490da58814907c28067a494697f37b1d615.zip |
STM32 FSMC NAND. Cleaned rest of v2.6 calls
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7130 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32')
-rw-r--r-- | testhal/STM32/STM32F4xx/FSMC_NAND/.cproject | 65 | ||||
-rw-r--r-- | testhal/STM32/STM32F4xx/FSMC_NAND/.project | 44 | ||||
-rw-r--r-- | testhal/STM32/STM32F4xx/FSMC_NAND/main.c | 23 |
3 files changed, 121 insertions, 11 deletions
diff --git a/testhal/STM32/STM32F4xx/FSMC_NAND/.cproject b/testhal/STM32/STM32F4xx/FSMC_NAND/.cproject new file mode 100644 index 000000000..a89cdbc06 --- /dev/null +++ b/testhal/STM32/STM32F4xx/FSMC_NAND/.cproject @@ -0,0 +1,65 @@ +<?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.1570569554"> + <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.1570569554" moduleId="org.eclipse.cdt.core.settings" name="Default"> + <externalSettings/> + <extensions> + <extension id="org.eclipse.cdt.core.VCErrorParser" 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.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/> + <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> + <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> + <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> + </extensions> + </storageModule> + <storageModule moduleId="cdtBuildSystem" version="4.0.0"> + <configuration artifactName="${ProjName}" buildProperties="" description="" id="0.1570569554" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg"> + <folderInfo id="0.1570569554." name="/" resourcePath=""> + <toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.2051275125" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain"> + <targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.2051275125.1235631892" name=""/> + <builder id="org.eclipse.cdt.build.core.settings.default.builder.681215945" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="org.eclipse.cdt.build.core.settings.default.builder"/> + <tool id="org.eclipse.cdt.build.core.settings.holder.libs.1913618182" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/> + <tool id="org.eclipse.cdt.build.core.settings.holder.1359024970" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder"> + <option id="org.eclipse.cdt.build.core.settings.holder.incpaths.648690541" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath"> + <listOptionValue builtIn="false" value="/opt/arm-none-eabi/arm-none-eabi/include"/> + <listOptionValue builtIn="false" value="/opt/arm-none-eabi/lib/gcc/arm-none-eabi/4.8.4/include"/> + <listOptionValue builtIn="false" value="/opt/arm-none-eabi/lib/gcc/arm-none-eabi/4.8.4/include-fixed"/> + </option> + <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.865562104" 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.321395526" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder"> + <option id="org.eclipse.cdt.build.core.settings.holder.incpaths.76286563" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath"> + <listOptionValue builtIn="false" value="/opt/arm-none-eabi/arm-none-eabi/include"/> + <listOptionValue builtIn="false" value="/opt/arm-none-eabi/lib/gcc/arm-none-eabi/4.8.4/include"/> + <listOptionValue builtIn="false" value="/opt/arm-none-eabi/lib/gcc/arm-none-eabi/4.8.4/include-fixed"/> + </option> + <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1168908150" 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.1390938668" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder"> + <option id="org.eclipse.cdt.build.core.settings.holder.incpaths.684710851" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath"> + <listOptionValue builtIn="false" value="/opt/arm-none-eabi/arm-none-eabi/include"/> + <listOptionValue builtIn="false" value="/opt/arm-none-eabi/lib/gcc/arm-none-eabi/4.8.4/include"/> + <listOptionValue builtIn="false" value="/opt/arm-none-eabi/lib/gcc/arm-none-eabi/4.8.4/include-fixed"/> + </option> + <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.645908401" 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="STM32F4xx-GPT.null.188687308" name="STM32F4xx-GPT"/> + </storageModule> + <storageModule moduleId="scannerConfiguration"> + <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> + <scannerConfigBuildInfo instanceId="0.1570569554"> + <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> diff --git a/testhal/STM32/STM32F4xx/FSMC_NAND/.project b/testhal/STM32/STM32F4xx/FSMC_NAND/.project new file mode 100644 index 000000000..8fb3b9c90 --- /dev/null +++ b/testhal/STM32/STM32F4xx/FSMC_NAND/.project @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>STM32F4xx-FSMC_NAND</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name> + <triggers>clean,full,incremental,</triggers> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name> + <triggers>full,incremental,</triggers> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.cdt.core.cnature</nature> + <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature> + <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature> + </natures> + <linkedResources> + <link> + <name>board</name> + <type>2</type> + <locationURI>CHIBIOS/os/hal/boards/ST_STM32F4_DISCOVERY</locationURI> + </link> + <link> + <name>os</name> + <type>2</type> + <locationURI>CHIBIOS/os</locationURI> + </link> + </linkedResources> + <variableList> + <variable> + <name>CHIBIOS</name> + <value>file:/home/barthess/projects/chibios-svn</value> + </variable> + </variableList> +</projectDescription> diff --git a/testhal/STM32/STM32F4xx/FSMC_NAND/main.c b/testhal/STM32/STM32F4xx/FSMC_NAND/main.c index 3811986d3..ac9f571b5 100644 --- a/testhal/STM32/STM32F4xx/FSMC_NAND/main.c +++ b/testhal/STM32/STM32F4xx/FSMC_NAND/main.c @@ -51,6 +51,8 @@ ****************************************************************************** */ +#define USE_KILL_BLOCK_TEST FALSE + #define EMCNAND_TIME_SET ((uint32_t) 2) //(8nS) #define EMCNAND_TIME_WAIT ((uint32_t) 6) //(30nS) #define EMCNAND_TIME_HOLD ((uint32_t) 1) //(5nS) @@ -69,8 +71,6 @@ #define NAND_STATUS_READY ((uint8_t)1 << 6) #define NAND_STATUS_NOT_RPOTECTED ((uint8_t)1 << 7) -#define EMCNAND_USE_KILL_TEST TRUE - /* ****************************************************************************** * EXTERNS @@ -82,9 +82,11 @@ * PROTOTYPES ****************************************************************************** */ +#if !STM32_EMC_EMCNAND_USE_FSMC_INT static void ready_isr_enable(void); static void ready_isr_disable(void); static void nand_ready_cb(EXTDriver *extp, expchannel_t channel); +#endif /* ****************************************************************************** @@ -141,6 +143,7 @@ static const EMCNANDConfig nandcfg = { /** * */ +#if !STM32_EMC_EMCNAND_USE_FSMC_INT static const EXTConfig extcfg = { { {EXT_CH_MODE_DISABLED, NULL}, //0 @@ -168,6 +171,7 @@ static const EXTConfig extcfg = { {EXT_CH_MODE_DISABLED, NULL}, } }; +#endif /* !STM32_EMC_EMCNAND_USE_FSMC_INT */ /* * @@ -175,7 +179,7 @@ static const EXTConfig extcfg = { volatile uint32_t IdleCnt = 0; volatile systime_t T = 0; -#if EMCNAND_USE_KILL_TEST +#if USE_KILL_BLOCK_TEST volatile uint32_t KillCycle = 0; #endif @@ -187,12 +191,12 @@ volatile uint32_t KillCycle = 0; ****************************************************************************** */ +#if !STM32_EMC_EMCNAND_USE_FSMC_INT static void nand_ready_cb(EXTDriver *extp, expchannel_t channel){ (void)extp; (void)channel; -#if !STM32_EMC_EMCNAND_USE_FSMC_INT + EMCNANDD1.isr_handler(&EMCNANDD1); -#endif } static void ready_isr_enable(void) { @@ -202,6 +206,7 @@ static void ready_isr_enable(void) { static void ready_isr_disable(void) { extChannelDisable(&EXTD1, GPIOD_NAND_RB); } +#endif static void nand_wp_assert(void) { palClearPad(GPIOB, GPIOB_NAND_WP); @@ -562,7 +567,9 @@ int main(void) { chSysInit(); emcStart(&EMCD1, &emccfg); +#if !STM32_EMC_EMCNAND_USE_FSMC_INT extStart(&EXTD1, &extcfg); +#endif emcnandStart(&EMCNANDD1, &nandcfg); chThdSleepMilliseconds(4000); @@ -616,12 +623,6 @@ int main(void) { while (TRUE) { chThdSleepMilliseconds(500); } - - /*warning suppressor */ -#if STM32_EMC_EMCNAND_USE_FSMC_INT - (void)ready_isr_enable; - (void)ready_isr_disable; -#endif } |