diff options
Diffstat (limited to 'testhal/STM32/STM32F7xx')
| -rw-r--r-- | testhal/STM32/STM32F7xx/USB_MSD/Makefile | 13 | ||||
| -rw-r--r-- | testhal/STM32/STM32F7xx/USB_MSD/halconf.h | 56 | ||||
| -rw-r--r-- | testhal/STM32/STM32F7xx/USB_MSD/halconf_community.h | 278 | ||||
| -rw-r--r-- | testhal/STM32/STM32F7xx/USB_MSD/mcuconf.h | 59 | ||||
| -rw-r--r-- | testhal/STM32/STM32F7xx/USB_MSD/mcuconf_community.h | 155 | 
5 files changed, 405 insertions, 156 deletions
diff --git a/testhal/STM32/STM32F7xx/USB_MSD/Makefile b/testhal/STM32/STM32F7xx/USB_MSD/Makefile index 8f4695f..33b207d 100644 --- a/testhal/STM32/STM32F7xx/USB_MSD/Makefile +++ b/testhal/STM32/STM32F7xx/USB_MSD/Makefile @@ -30,7 +30,7 @@ endif  # Enable this if you want link time optimizations (LTO)  ifeq ($(USE_LTO),) -  USE_LTO = no +  USE_LTO = yes  endif  # If enabled, this option allows to compile the application in THUMB mode. @@ -93,24 +93,25 @@ PROJECT = ch  # Imported source files and paths  CHIBIOS = ../../../../../ChibiOS-RT  CHIBIOS_CONTRIB = $(CHIBIOS)/../ChibiOS-Contrib -  # Startup files.  include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f7xx.mk  # HAL-OSAL files (optional).  include $(CHIBIOS_CONTRIB)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/ports/STM32/STM32F7xx/platform.mk -include $(CHIBIOS)/os/hal/boards/ST_NUCLEO144_F767ZI/board.mk +include $(CHIBIOS_CONTRIB)/os/hal/ports/STM32/STM32F7xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_STM32F746G_DISCOVERY/board.mk  include $(CHIBIOS)/os/hal/osal/rt/osal.mk  # RTOS files (optional).  include $(CHIBIOS)/os/rt/rt.mk  include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk  # Other files (optional). -include $(CHIBIOS)/test/rt/test.mk +include $(CHIBIOS)/test/lib/test.mk +include $(CHIBIOS)/test/rt/rt_test.mk +include $(CHIBIOS)/test/oslib/oslib_test.mk  include $(CHIBIOS)/os/hal/lib/streams/streams.mk  include $(CHIBIOS)/os/various/shell/shell.mk  # Define linker script file here -LDSCRIPT= $(STARTUPLD)/STM32F76xxI.ld +LDSCRIPT= $(STARTUPLD)/STM32F746xG.ld  # C sources that can be compiled in ARM or THUMB mode depending on the global  # setting. diff --git a/testhal/STM32/STM32F7xx/USB_MSD/halconf.h b/testhal/STM32/STM32F7xx/USB_MSD/halconf.h index bf1b023..c08c586 100644 --- a/testhal/STM32/STM32F7xx/USB_MSD/halconf.h +++ b/testhal/STM32/STM32F7xx/USB_MSD/halconf.h @@ -1,5 +1,5 @@  /* -    ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio +    ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio      Licensed under the Apache License, Version 2.0 (the "License");      you may not use this file except in compliance with the License. @@ -31,13 +31,6 @@  #include "mcuconf.h"  /** - * @brief   Enables the TM subsystem. - */ -#if !defined(HAL_USE_TM) || defined(__DOXYGEN__) -#define HAL_USE_TM                  TRUE -#endif - -/**   * @brief   Enables the PAL subsystem.   */  #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) @@ -48,7 +41,7 @@   * @brief   Enables the ADC subsystem.   */  #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC                 FALSE +#define HAL_USE_ADC                 TRUE  #endif  /** @@ -59,6 +52,13 @@  #endif  /** + * @brief   Enables the cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY                 FALSE +#endif + +/**   * @brief   Enables the DAC subsystem.   */  #if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) @@ -76,7 +76,7 @@   * @brief   Enables the GPT subsystem.   */  #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT                 FALSE +#define HAL_USE_GPT                 TRUE  #endif  /** @@ -153,7 +153,7 @@   * @brief   Enables the SERIAL over USB subsystem.   */  #if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL_USB          TRUE +#define HAL_USE_SERIAL_USB          FALSE  #endif  /** @@ -174,7 +174,7 @@   * @brief   Enables the USB subsystem.   */  #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB                 TRUE +#define HAL_USE_USB                 FALSE  #endif  /** @@ -216,6 +216,28 @@  #endif  /*===========================================================================*/ +/* CRY driver related settings.                                              */ +/*===========================================================================*/ + +/** + * @brief   Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + *          implementation for algorithms not supported by the underlying + *          hardware. + * @note    Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK                FALSE +#endif + +/** + * @brief   Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK            FALSE +#endif + +/*===========================================================================*/  /* I2C driver related settings.                                              */  /*===========================================================================*/ @@ -301,7 +323,7 @@   *          default configuration.   */  #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE      115200 +#define SERIAL_DEFAULT_BITRATE      38400  #endif  /** @@ -312,7 +334,7 @@   *          buffers.   */  #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE         80 +#define SERIAL_BUFFERS_SIZE         16  #endif  /*===========================================================================*/ @@ -387,13 +409,9 @@   * @note    Disabling this option saves both code and data space.   */  #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT                TRUE +#define USB_USE_WAIT                FALSE  #endif -/*===========================================================================*/ -/* Community drivers's includes                                              */ -/*===========================================================================*/ -  #include "halconf_community.h"  #endif /* HALCONF_H */ diff --git a/testhal/STM32/STM32F7xx/USB_MSD/halconf_community.h b/testhal/STM32/STM32F7xx/USB_MSD/halconf_community.h index 943992f..32d0271 100644 --- a/testhal/STM32/STM32F7xx/USB_MSD/halconf_community.h +++ b/testhal/STM32/STM32F7xx/USB_MSD/halconf_community.h @@ -1,105 +1,173 @@ -/* -    ChibiOS - 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. -*/ - -#ifndef _HALCONF_COMMUNITY_H_ -#define _HALCONF_COMMUNITY_H_ - -/** - * @brief   Enables the community overlay. - */ -#if !defined(HAL_USE_COMMUNITY) || defined(__DOXYGEN__) -#define HAL_USE_COMMUNITY           TRUE -#endif - -/** - * @brief   Enables the FSMC subsystem. - */ -#if !defined(HAL_USE_FSMC) || defined(__DOXYGEN__) -#define HAL_USE_FSMC                FALSE -#endif - -/** - * @brief   Enables the NAND subsystem. - */ -#if !defined(HAL_USE_NAND) || defined(__DOXYGEN__) -#define HAL_USE_NAND                FALSE -#endif - -/** - * @brief   Enables the 1-wire subsystem. - */ -#if !defined(HAL_USE_ONEWIRE) || defined(__DOXYGEN__) -#define HAL_USE_ONEWIRE             FALSE -#endif - -/** - * @brief   Enables the EICU subsystem. - */ -#if !defined(HAL_USE_EICU) || defined(__DOXYGEN__) -#define HAL_USE_EICU                FALSE -#endif - -/** - * @brief   Enables the CRC subsystem. - */ -#if !defined(HAL_USE_CRC) || defined(__DOXYGEN__) -#define HAL_USE_CRC                 FALSE -#endif - -/** - * @brief   Enables the RNG subsystem. - */ -#if !defined(HAL_USE_RNG) || defined(__DOXYGEN__) -#define HAL_USE_RNG                 FALSE -#endif - -/** - * @brief   Enables the USB_MSD subsystem. - */ -#if !defined(HAL_USE_USB_MSD) || defined(__DOXYGEN__) -#define HAL_USE_USB_MSD             TRUE -#endif - -/*===========================================================================*/ -/* FSMCNAND driver related settings.                                         */ -/*===========================================================================*/ - -/** - * @brief   Enables the @p nandAcquireBus() and @p nanReleaseBus() APIs. - * @note    Disabling this option saves both code and data space. - */ -#if !defined(NAND_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define NAND_USE_MUTUAL_EXCLUSION   TRUE -#endif - -/*===========================================================================*/ -/* 1-wire driver related settings.                                           */ -/*===========================================================================*/ -/** - * @brief   Enables strong pull up feature. - * @note    Disabling this option saves both code and data space. - */ -#define ONEWIRE_USE_STRONG_PULLUP   FALSE - -/** - * @brief   Enables search ROM feature. - * @note    Disabling this option saves both code and data space. - */ -#define ONEWIRE_USE_SEARCH_ROM      TRUE - -#endif /* _HALCONF_COMMUNITY_H_ */ - -/** @} */ +/*
 +    ChibiOS - 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.
 +*/
 +
 +#ifndef HALCONF_COMMUNITY_H
 +#define HALCONF_COMMUNITY_H
 +
 +/**
 + * @brief   Enables the community overlay.
 + */
 +#if !defined(HAL_USE_COMMUNITY) || defined(__DOXYGEN__)
 +#define HAL_USE_COMMUNITY           TRUE
 +#endif
 +
 +/**
 + * @brief   Enables the FSMC subsystem.
 + */
 +#if !defined(HAL_USE_FSMC) || defined(__DOXYGEN__)
 +#define HAL_USE_FSMC                FALSE
 +#endif
 +
 +/**
 + * @brief   Enables the NAND subsystem.
 + */
 +#if !defined(HAL_USE_NAND) || defined(__DOXYGEN__)
 +#define HAL_USE_NAND                FALSE
 +#endif
 +
 +/**
 + * @brief   Enables the 1-wire subsystem.
 + */
 +#if !defined(HAL_USE_ONEWIRE) || defined(__DOXYGEN__)
 +#define HAL_USE_ONEWIRE             FALSE
 +#endif
 +
 +/**
 + * @brief   Enables the EICU subsystem.
 + */
 +#if !defined(HAL_USE_EICU) || defined(__DOXYGEN__)
 +#define HAL_USE_EICU                FALSE
 +#endif
 +
 +/**
 + * @brief   Enables the CRC subsystem.
 + */
 +#if !defined(HAL_USE_CRC) || defined(__DOXYGEN__)
 +#define HAL_USE_CRC                 FALSE
 +#endif
 +
 +/**
 + * @brief   Enables the RNG subsystem.
 + */
 +#if !defined(HAL_USE_RNG) || defined(__DOXYGEN__)
 +#define HAL_USE_RNG                 FALSE
 +#endif
 +
 +/**
 + * @brief   Enables the EEPROM subsystem.
 + */
 +#if !defined(HAL_USE_EEPROM) || defined(__DOXYGEN__)
 +#define HAL_USE_EEPROM              FALSE
 +#endif
 +
 +/**
 + * @brief   Enables the TIMCAP subsystem.
 + */
 +#if !defined(HAL_USE_TIMCAP) || defined(__DOXYGEN__)
 +#define HAL_USE_TIMCAP              FALSE
 +#endif
 +
 +/**
 + * @brief   Enables the TIMCAP subsystem.
 + */
 +#if !defined(HAL_USE_COMP) || defined(__DOXYGEN__)
 +#define HAL_USE_COMP                FALSE
 +#endif
 +
 +/**
 + * @brief   Enables the QEI subsystem.
 + */
 +#if !defined(HAL_USE_QEI) || defined(__DOXYGEN__)
 +#define HAL_USE_QEI                 FALSE
 +#endif
 +
 +/**
 + * @brief   Enables the USBH subsystem.
 + */
 +#if !defined(HAL_USE_USBH) || defined(__DOXYGEN__)
 +#define HAL_USE_USBH                FALSE
 +#endif
 +
 +/**
 + * @brief   Enables the USB_MSD subsystem.
 + */
 +#if !defined(HAL_USE_USB_MSD) || defined(__DOXYGEN__)
 +#define HAL_USE_USB_MSD             TRUE
 +#endif
 +
 +/*===========================================================================*/
 +/* FSMCNAND driver related settings.                                         */
 +/*===========================================================================*/
 +
 +/**
 + * @brief   Enables the @p nandAcquireBus() and @p nanReleaseBus() APIs.
 + * @note    Disabling this option saves both code and data space.
 + */
 +#if !defined(NAND_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
 +#define NAND_USE_MUTUAL_EXCLUSION   TRUE
 +#endif
 +
 +/*===========================================================================*/
 +/* 1-wire driver related settings.                                           */
 +/*===========================================================================*/
 +/**
 + * @brief   Enables strong pull up feature.
 + * @note    Disabling this option saves both code and data space.
 + */
 +#define ONEWIRE_USE_STRONG_PULLUP   FALSE
 +
 +/**
 + * @brief   Enables search ROM feature.
 + * @note    Disabling this option saves both code and data space.
 + */
 +#define ONEWIRE_USE_SEARCH_ROM      TRUE
 +
 +/*===========================================================================*/
 +/* QEI driver related settings.                                              */
 +/*===========================================================================*/
 +
 +/**
 + * @brief   Enables discard of overlow
 + */
 +#if !defined(QEI_USE_OVERFLOW_DISCARD) || defined(__DOXYGEN__)
 +#define QEI_USE_OVERFLOW_DISCARD    FALSE
 +#endif
 +
 +/**
 + * @brief   Enables min max of overlow
 + */
 +#if !defined(QEI_USE_OVERFLOW_MINMAX) || defined(__DOXYGEN__)
 +#define QEI_USE_OVERFLOW_MINMAX     FALSE
 +#endif
 +
 +/*===========================================================================*/
 +/* EEProm driver related settings.                                           */
 +/*===========================================================================*/
 +
 +/**
 + * @brief   Enables 24xx series I2C eeprom device driver.
 + * @note    Disabling this option saves both code and data space.
 + */
 +#define EEPROM_USE_EE24XX FALSE
 + /**
 + * @brief   Enables 25xx series SPI eeprom device driver.
 + * @note    Disabling this option saves both code and data space.
 + */
 +#define EEPROM_USE_EE25XX FALSE
 +
 +#endif /* HALCONF_COMMUNITY_H */
 +
 +/** @} */
 diff --git a/testhal/STM32/STM32F7xx/USB_MSD/mcuconf.h b/testhal/STM32/STM32F7xx/USB_MSD/mcuconf.h index c7bf7a1..ee6970b 100644 --- a/testhal/STM32/STM32F7xx/USB_MSD/mcuconf.h +++ b/testhal/STM32/STM32F7xx/USB_MSD/mcuconf.h @@ -1,5 +1,5 @@  /* -    ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio +    ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio      Licensed under the Apache License, Version 2.0 (the "License");      you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@  #define MCUCONF_H  /* - * STM32F4xx drivers configuration. + * STM32F7xx drivers configuration.   * The following settings override the default settings present in   * the various device driver implementation headers.   * Note that the settings for each driver only have effect if the whole @@ -47,7 +47,7 @@  #define STM32_CLOCK48_REQUIRED              TRUE  #define STM32_SW                            STM32_SW_PLL  #define STM32_PLLSRC                        STM32_PLLSRC_HSE -#define STM32_PLLM_VALUE                    8 +#define STM32_PLLM_VALUE                    25  #define STM32_PLLN_VALUE                    432  #define STM32_PLLP_VALUE                    2  #define STM32_PLLQ_VALUE                    9 @@ -60,18 +60,21 @@  #define STM32_MCO1PRE                       STM32_MCO1PRE_DIV1  #define STM32_MCO2SEL                       STM32_MCO2SEL_SYSCLK  #define STM32_MCO2PRE                       STM32_MCO2PRE_DIV4 -#define STM32_I2SSRC                        STM32_I2SSRC_PLLI2S +#define STM32_I2SSRC                        STM32_I2SSRC_OFF  #define STM32_PLLI2SN_VALUE                 192  #define STM32_PLLI2SP_VALUE                 4  #define STM32_PLLI2SQ_VALUE                 4  #define STM32_PLLI2SR_VALUE                 4 +#define STM32_PLLI2SDIVQ_VALUE              2  #define STM32_PLLSAIN_VALUE                 192  #define STM32_PLLSAIP_VALUE                 4  #define STM32_PLLSAIQ_VALUE                 4  #define STM32_PLLSAIR_VALUE                 4 -#define STM32_PLLSAIDIVR                    STM32_PLLSAIDIVR_OFF +#define STM32_PLLSAIDIVQ_VALUE              2 +#define STM32_PLLSAIDIVR_VALUE              2  #define STM32_SAI1SEL                       STM32_SAI1SEL_OFF  #define STM32_SAI2SEL                       STM32_SAI2SEL_OFF +#define STM32_LCDTFT_REQUIRED               FALSE  #define STM32_USART1SEL                     STM32_USART1SEL_PCLK2  #define STM32_USART2SEL                     STM32_USART2SEL_PCLK1  #define STM32_USART3SEL                     STM32_USART3SEL_PCLK1 @@ -87,14 +90,32 @@  #define STM32_LPTIM1SEL                     STM32_LPTIM1SEL_PCLK1  #define STM32_CECSEL                        STM32_CECSEL_LSE  #define STM32_CK48MSEL                      STM32_CK48MSEL_PLL -#define STM32_SDMMCSEL                      STM32_SDMMCSEL_PLL48CLK +#define STM32_SDMMC1SEL                     STM32_SDMMC1SEL_PLL48CLK  #define STM32_SRAM2_NOCACHE                 FALSE  /* + * IRQ system settings. + */ +#define STM32_IRQ_EXTI0_PRIORITY            6 +#define STM32_IRQ_EXTI1_PRIORITY            6 +#define STM32_IRQ_EXTI2_PRIORITY            6 +#define STM32_IRQ_EXTI3_PRIORITY            6 +#define STM32_IRQ_EXTI4_PRIORITY            6 +#define STM32_IRQ_EXTI5_9_PRIORITY          6 +#define STM32_IRQ_EXTI10_15_PRIORITY        6 +#define STM32_IRQ_EXTI16_PRIORITY           6 +#define STM32_IRQ_EXTI17_PRIORITY           15 +#define STM32_IRQ_EXTI18_PRIORITY           6 +#define STM32_IRQ_EXTI19_PRIORITY           6 +#define STM32_IRQ_EXTI20_PRIORITY           6 +#define STM32_IRQ_EXTI21_PRIORITY           15 +#define STM32_IRQ_EXTI22_PRIORITY           15 + +/*   * ADC driver system settings.   */  #define STM32_ADC_ADCPRE                    ADC_CCR_ADCPRE_DIV4 -#define STM32_ADC_USE_ADC1                  FALSE +#define STM32_ADC_USE_ADC1                  TRUE  #define STM32_ADC_USE_ADC2                  FALSE  #define STM32_ADC_USE_ADC3                  FALSE  #define STM32_ADC_ADC1_DMA_STREAM           STM32_DMA_STREAM_ID(2, 4) @@ -113,8 +134,10 @@   */  #define STM32_CAN_USE_CAN1                  FALSE  #define STM32_CAN_USE_CAN2                  FALSE +#define STM32_CAN_USE_CAN3                  FALSE  #define STM32_CAN_CAN1_IRQ_PRIORITY         11  #define STM32_CAN_CAN2_IRQ_PRIORITY         11 +#define STM32_CAN_CAN3_IRQ_PRIORITY         11  /*   * DAC driver system settings. @@ -130,30 +153,12 @@  #define STM32_DAC_DAC1_CH2_DMA_STREAM       STM32_DMA_STREAM_ID(1, 6)  /* - * EXT driver system settings. - */ -#define STM32_EXT_EXTI0_IRQ_PRIORITY        6 -#define STM32_EXT_EXTI1_IRQ_PRIORITY        6 -#define STM32_EXT_EXTI2_IRQ_PRIORITY        6 -#define STM32_EXT_EXTI3_IRQ_PRIORITY        6 -#define STM32_EXT_EXTI4_IRQ_PRIORITY        6 -#define STM32_EXT_EXTI5_9_IRQ_PRIORITY      6 -#define STM32_EXT_EXTI10_15_IRQ_PRIORITY    6 -#define STM32_EXT_EXTI16_IRQ_PRIORITY       6 -#define STM32_EXT_EXTI17_IRQ_PRIORITY       15 -#define STM32_EXT_EXTI18_IRQ_PRIORITY       6 -#define STM32_EXT_EXTI19_IRQ_PRIORITY       6 -#define STM32_EXT_EXTI20_IRQ_PRIORITY       6 -#define STM32_EXT_EXTI21_IRQ_PRIORITY       15 -#define STM32_EXT_EXTI22_IRQ_PRIORITY       15 - -/*   * GPT driver system settings.   */  #define STM32_GPT_USE_TIM1                  FALSE  #define STM32_GPT_USE_TIM2                  FALSE  #define STM32_GPT_USE_TIM3                  FALSE -#define STM32_GPT_USE_TIM4                  FALSE +#define STM32_GPT_USE_TIM4                  TRUE  #define STM32_GPT_USE_TIM5                  FALSE  #define STM32_GPT_USE_TIM6                  FALSE  #define STM32_GPT_USE_TIM7                  FALSE @@ -383,4 +388,6 @@   */  #define STM32_WDG_USE_IWDG                  FALSE +#include "mcuconf_community.h" +  #endif /* MCUCONF_H */ diff --git a/testhal/STM32/STM32F7xx/USB_MSD/mcuconf_community.h b/testhal/STM32/STM32F7xx/USB_MSD/mcuconf_community.h new file mode 100644 index 0000000..cf6a1ce --- /dev/null +++ b/testhal/STM32/STM32F7xx/USB_MSD/mcuconf_community.h @@ -0,0 +1,155 @@ +/* +    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                  TRUE +#define STM32_TIMCAP_USE_TIM2                  FALSE +#define STM32_TIMCAP_USE_TIM3                  TRUE +#define STM32_TIMCAP_USE_TIM4                  TRUE +#define STM32_TIMCAP_USE_TIM5                  TRUE +#define STM32_TIMCAP_USE_TIM8                  TRUE +#define STM32_TIMCAP_USE_TIM9                  TRUE +#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                  TRUE +#define STM32_COMP_USE_COMP2                  TRUE +#define STM32_COMP_USE_COMP3                  TRUE +#define STM32_COMP_USE_COMP4                  TRUE +#define STM32_COMP_USE_COMP5                  TRUE +#define STM32_COMP_USE_COMP6                  TRUE +#define STM32_COMP_USE_COMP7                  TRUE + +#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                 TRUE +#define STM32_EICU_USE_TIM2                 FALSE +#define STM32_EICU_USE_TIM3                 TRUE +#define STM32_EICU_USE_TIM4                 TRUE +#define STM32_EICU_USE_TIM5                 TRUE +#define STM32_EICU_USE_TIM8                 TRUE +#define STM32_EICU_USE_TIM9                 TRUE +#define STM32_EICU_USE_TIM10                TRUE +#define STM32_EICU_USE_TIM11                TRUE +#define STM32_EICU_USE_TIM12                TRUE +#define STM32_EICU_USE_TIM13                TRUE +#define STM32_EICU_USE_TIM14                TRUE +#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 + +/* + * QEI driver system settings. + */ +#define STM32_QEI_USE_TIM1                TRUE +#define STM32_QEI_USE_TIM2                FALSE +#define STM32_QEI_USE_TIM3                TRUE +#define STM32_QEI_TIM1_IRQ_PRIORITY         3 +#define STM32_QEI_TIM2_IRQ_PRIORITY         3 +#define STM32_QEI_TIM3_IRQ_PRIORITY         3  | 
