mcuconf.h (5582B)
1 /* 2 Copyright (C) 2021 Westberry Technology (ChangZhou) Corp., Ltd 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 #ifndef MCUCONF_H 18 #define MCUCONF_H 19 20 #define WB32F3G71xx_MCUCONF TRUE 21 22 /* 23 * WB32F3G71 drivers configuration. 24 * The following settings override the default settings present in 25 * the various device driver implementation headers. 26 * Note that the settings for each driver only have effect if the whole 27 * driver is enabled in halconf.h. 28 * 29 * IRQ priorities: 30 * 15...0 Lowest...Highest. 31 * 32 */ 33 34 /** 35 * @name Internal clock sources 36 * @{ 37 */ 38 #define WB32_HSECLK 12000000 39 #define WB32_LSECLK 32768 40 41 /* 42 * HAL driver system settings. 43 */ 44 #define WB32_NO_INIT FALSE 45 #define WB32_MHSI_ENABLED TRUE 46 #define WB32_FHSI_ENABLED FALSE 47 #define WB32_LSI_ENABLED FALSE 48 #define WB32_HSE_ENABLED TRUE 49 #define WB32_LSE_ENABLED FALSE 50 #define WB32_PLL_ENABLED TRUE 51 #define WB32_MAINCLKSRC WB32_MAINCLKSRC_PLL 52 #define WB32_PLLSRC WB32_PLLSRC_HSE 53 #define WB32_PLLDIV_VALUE 2 54 #define WB32_PLLMUL_VALUE 12 //The allowed range is 12,16,20,24. 55 #define WB32_HPRE 1 56 #define WB32_PPRE1 1 57 #define WB32_PPRE2 1 58 #define WB32_USBPRE WB32_USBPRE_DIV1P5 59 60 /* 61 * EXTI driver system settings. 62 */ 63 #define WB32_IRQ_EXTI0_PRIORITY 6 64 #define WB32_IRQ_EXTI1_PRIORITY 6 65 #define WB32_IRQ_EXTI2_PRIORITY 6 66 #define WB32_IRQ_EXTI3_PRIORITY 6 67 #define WB32_IRQ_EXTI4_PRIORITY 6 68 #define WB32_IRQ_EXTI5_9_PRIORITY 6 69 #define WB32_IRQ_EXTI10_15_PRIORITY 6 70 #define WB32_IRQ_EXTI16_PRIORITY 6 71 #define WB32_IRQ_EXTI17_PRIORITY 6 72 #define WB32_IRQ_EXTI18_PRIORITY 6 73 #define WB32_IRQ_EXTI19_PRIORITY 6 74 75 /* 76 * GPT driver system settings. 77 */ 78 #define WB32_TIM_MAX_CHANNELS 4 79 #define WB32_GPT_USE_TIM1 FALSE 80 #define WB32_GPT_USE_TIM2 FALSE 81 #define WB32_GPT_USE_TIM3 FALSE 82 #define WB32_GPT_USE_TIM4 FALSE 83 #define WB32_GPT_TIM1_IRQ_PRIORITY 7 84 #define WB32_GPT_TIM2_IRQ_PRIORITY 7 85 #define WB32_GPT_TIM3_IRQ_PRIORITY 7 86 #define WB32_GPT_TIM4_IRQ_PRIORITY 7 87 88 /* 89 * ICU driver system settings. 90 */ 91 #define WB32_ICU_USE_TIM1 FALSE 92 #define WB32_ICU_USE_TIM2 FALSE 93 #define WB32_ICU_USE_TIM3 FALSE 94 #define WB32_ICU_USE_TIM4 FALSE 95 #define WB32_ICU_TIM1_IRQ_PRIORITY 7 96 #define WB32_ICU_TIM2_IRQ_PRIORITY 7 97 #define WB32_ICU_TIM3_IRQ_PRIORITY 7 98 #define WB32_ICU_TIM4_IRQ_PRIORITY 7 99 100 /* 101 * PWM driver system settings. 102 */ 103 #define WB32_PWM_USE_ADVANCED FALSE 104 #define WB32_PWM_USE_TIM1 FALSE 105 #define WB32_PWM_USE_TIM2 FALSE 106 #define WB32_PWM_USE_TIM3 FALSE 107 #define WB32_PWM_USE_TIM4 FALSE 108 #define WB32_PWM_TIM1_IRQ_PRIORITY 7 109 #define WB32_PWM_TIM2_IRQ_PRIORITY 7 110 #define WB32_PWM_TIM3_IRQ_PRIORITY 7 111 #define WB32_PWM_TIM4_IRQ_PRIORITY 7 112 113 /* 114 * I2C driver system settings. 115 */ 116 #define WB32_I2C_USE_I2C1 FALSE 117 #define WB32_I2C_USE_I2C2 FALSE 118 #define WB32_I2C_BUSY_TIMEOUT 50 119 #define WB32_I2C_I2C1_IRQ_PRIORITY 5 120 #define WB32_I2C_I2C2_IRQ_PRIORITY 5 121 122 /* 123 * SERIAL driver system settings. 124 */ 125 #define WB32_SERIAL_USE_UART1 FALSE 126 #define WB32_SERIAL_USE_UART2 FALSE 127 #define WB32_SERIAL_USE_UART3 FALSE 128 #define WB32_SERIAL_USART1_PRIORITY 12 129 #define WB32_SERIAL_USART2_PRIORITY 12 130 #define WB32_SERIAL_USART3_PRIORITY 12 131 132 /* 133 * SPI driver system settings. 134 */ 135 #define WB32_SPI_USE_QSPI FALSE 136 #define WB32_SPI_USE_SPIM2 FALSE 137 #define WB32_SPI_USE_SPIS1 FALSE 138 #define WB32_SPI_USE_SPIS2 FALSE 139 #define WB32_SPI_QSPI_IRQ_PRIORITY 10 140 #define WB32_SPI_SPIM2_IRQ_PRIORITY 10 141 #define WB32_SPI_SPIS1_IRQ_PRIORITY 10 142 #define WB32_SPI_SPIS2_IRQ_PRIORITY 10 143 144 /* 145 * ST driver system settings. 146 */ 147 #define WB32_ST_IRQ_PRIORITY 8 148 #define WB32_ST_USE_TIMER 2 149 150 /* 151 * UART driver system settings. 152 */ 153 #define WB32_UART_USE_UART1 FALSE 154 #define WB32_UART_USE_UART2 FALSE 155 #define WB32_UART_USE_UART3 FALSE 156 #define WB32_UART_UART1_IRQ_PRIORITY 12 157 #define WB32_UART_UART2_IRQ_PRIORITY 12 158 #define WB32_UART_UART3_IRQ_PRIORITY 12 159 160 /* 161 * USB driver system settings. 162 */ 163 #define WB32_USB_USE_USB1 TRUE 164 #define WB32_USB_USB1_IRQ_PRIORITY 13 165 #define WB32_USB_HOST_WAKEUP_DURATION 10 166 167 168 #endif /* MCUCONF_H */