Browse Source

squeak

master
squeaky otter 8 months ago
parent
commit
c25ce59572
Signed by: dashie GPG Key ID: C2D57B325840B755
7 changed files with 711 additions and 539 deletions
  1. +8
    -8
      .mxproject
  2. +108
    -0
      Core/Inc/main.h
  3. +1
    -1
      Core/Inc/stm32f7xx_hal_conf.h
  4. +162
    -166
      Core/Src/main.c
  5. +173
    -159
      Core/Src/stm32f7xx_hal_msp.c
  6. +4
    -5
      Makefile
  7. +255
    -200
      OtterClock.ioc

+ 8
- 8
.mxproject
File diff suppressed because it is too large
View File


+ 108
- 0
Core/Inc/main.h View File

@ -60,6 +60,114 @@ void Error_Handler(void);
/* USER CODE END EFP */
/* Private defines -----------------------------------------------------------*/
#define QSPI_IO2_Pin GPIO_PIN_2
#define QSPI_IO2_GPIO_Port GPIOE
#define I2C1_SDA_Pin GPIO_PIN_0
#define I2C1_SDA_GPIO_Port GPIOF
#define I2C1_SCL_Pin GPIO_PIN_1
#define I2C1_SCL_GPIO_Port GPIOF
#define QSPI_IO3_Pin GPIO_PIN_6
#define QSPI_IO3_GPIO_Port GPIOF
#define LCD_BL_PWM_Pin GPIO_PIN_7
#define LCD_BL_PWM_GPIO_Port GPIOF
#define QSPI_IO1_Pin GPIO_PIN_9
#define QSPI_IO1_GPIO_Port GPIOF
#define SPI1_MOSI_Pin GPIO_PIN_1
#define SPI1_MOSI_GPIO_Port GPIOC
#define SPI1_MISO_Pin GPIO_PIN_2
#define SPI1_MISO_GPIO_Port GPIOC
#define KB_WAKEUP_Pin GPIO_PIN_0
#define KB_WAKEUP_GPIO_Port GPIOA
#define LCD_PENIRQ_Pin GPIO_PIN_7
#define LCD_PENIRQ_GPIO_Port GPIOA
#define QSPI_CLK_Pin GPIO_PIN_2
#define QSPI_CLK_GPIO_Port GPIOB
#define OTG_EN_Pin GPIO_PIN_11
#define OTG_EN_GPIO_Port GPIOF
#define BAT_INT_Pin GPIO_PIN_13
#define BAT_INT_GPIO_Port GPIOF
#define BAT_SCL_Pin GPIO_PIN_14
#define BAT_SCL_GPIO_Port GPIOF
#define BAT_SDA_Pin GPIO_PIN_15
#define BAT_SDA_GPIO_Port GPIOF
#define LCD_BL_EN_Pin GPIO_PIN_7
#define LCD_BL_EN_GPIO_Port GPIOE
#define LCD_TOUCH_RST_Pin GPIO_PIN_8
#define LCD_TOUCH_RST_GPIO_Port GPIOE
#define BZZZ_Pin GPIO_PIN_9
#define BZZZ_GPIO_Port GPIOE
#define SPI1_NSS_Pin GPIO_PIN_12
#define SPI1_NSS_GPIO_Port GPIOB
#define SPI1_SCK_Pin GPIO_PIN_13
#define SPI1_SCK_GPIO_Port GPIOB
#define SERIAL2_TX_Pin GPIO_PIN_8
#define SERIAL2_TX_GPIO_Port GPIOD
#define SERIAL2_RX_Pin GPIO_PIN_9
#define SERIAL2_RX_GPIO_Port GPIOD
#define QSPI_IO0_Pin GPIO_PIN_11
#define QSPI_IO0_GPIO_Port GPIOD
#define EXTIO_1_PWM_Pin GPIO_PIN_14
#define EXTIO_1_PWM_GPIO_Port GPIOD
#define EXTIO_2_PWM_Pin GPIO_PIN_15
#define EXTIO_2_PWM_GPIO_Port GPIOD
#define EXTIO_3_Pin GPIO_PIN_2
#define EXTIO_3_GPIO_Port GPIOG
#define EXTIO_4_Pin GPIO_PIN_3
#define EXTIO_4_GPIO_Port GPIOG
#define EXTIO_5_Pin GPIO_PIN_4
#define EXTIO_5_GPIO_Port GPIOG
#define EXTIO_6_Pin GPIO_PIN_5
#define EXTIO_6_GPIO_Port GPIOG
#define SD_DAT0_Pin GPIO_PIN_8
#define SD_DAT0_GPIO_Port GPIOC
#define SD_DAT1_Pin GPIO_PIN_9
#define SD_DAT1_GPIO_Port GPIOC
#define USB_VBUS_Pin GPIO_PIN_9
#define USB_VBUS_GPIO_Port GPIOA
#define USB0_ID_Pin GPIO_PIN_10
#define USB0_ID_GPIO_Port GPIOA
#define USB0_DM_Pin GPIO_PIN_11
#define USB0_DM_GPIO_Port GPIOA
#define USB0_DP_Pin GPIO_PIN_12
#define USB0_DP_GPIO_Port GPIOA
#define JTMS_SWDIO_Pin GPIO_PIN_13
#define JTMS_SWDIO_GPIO_Port GPIOA
#define JTCK_SWCLK_Pin GPIO_PIN_14
#define JTCK_SWCLK_GPIO_Port GPIOA
#define JTDI_Pin GPIO_PIN_15
#define JTDI_GPIO_Port GPIOA
#define SD_DAT2_Pin GPIO_PIN_10
#define SD_DAT2_GPIO_Port GPIOC
#define SD_DAT3_Pin GPIO_PIN_11
#define SD_DAT3_GPIO_Port GPIOC
#define SD_CLK_Pin GPIO_PIN_12
#define SD_CLK_GPIO_Port GPIOC
#define RGBLED1_B_Pin GPIO_PIN_0
#define RGBLED1_B_GPIO_Port GPIOD
#define RGBLED1_G_Pin GPIO_PIN_1
#define RGBLED1_G_GPIO_Port GPIOD
#define SD_CMD_Pin GPIO_PIN_2
#define SD_CMD_GPIO_Port GPIOD
#define RGBLED1_R_Pin GPIO_PIN_4
#define RGBLED1_R_GPIO_Port GPIOD
#define SERIAL1_TX_Pin GPIO_PIN_5
#define SERIAL1_TX_GPIO_Port GPIOD
#define SERIAL1_RX_Pin GPIO_PIN_6
#define SERIAL1_RX_GPIO_Port GPIOD
#define SERIAL3_RX_Pin GPIO_PIN_9
#define SERIAL3_RX_GPIO_Port GPIOG
#define SERIAL3_TX_Pin GPIO_PIN_14
#define SERIAL3_TX_GPIO_Port GPIOG
#define JTDO_Pin GPIO_PIN_3
#define JTDO_GPIO_Port GPIOB
#define RGBLED1_RB4_Pin GPIO_PIN_4
#define RGBLED1_RB4_GPIO_Port GPIOB
#define RGBLED1_GB5_Pin GPIO_PIN_5
#define RGBLED1_GB5_GPIO_Port GPIOB
#define QSPI_NCS_Pin GPIO_PIN_6
#define QSPI_NCS_GPIO_Port GPIOB
#define RGBLED1_BB7_Pin GPIO_PIN_7
#define RGBLED1_BB7_GPIO_Port GPIOB
/* USER CODE BEGIN Private defines */
/* USER CODE END Private defines */


+ 1
- 1
Core/Inc/stm32f7xx_hal_conf.h View File

@ -75,7 +75,7 @@
/* #define HAL_DSI_MODULE_ENABLED */
/* #define HAL_JPEG_MODULE_ENABLED */
/* #define HAL_MDIOS_MODULE_ENABLED */
#define HAL_SMBUS_MODULE_ENABLED
/* #define HAL_SMBUS_MODULE_ENABLED */
/* #define HAL_EXTI_MODULE_ENABLED */
#define HAL_GPIO_MODULE_ENABLED
#define HAL_EXTI_MODULE_ENABLED


+ 162
- 166
Core/Src/main.c View File

@ -41,8 +41,8 @@
/* Private variables ---------------------------------------------------------*/
SMBUS_HandleTypeDef hsmbus2;
SMBUS_HandleTypeDef hsmbus4;
I2C_HandleTypeDef hi2c2;
I2C_HandleTypeDef hi2c4;
LTDC_HandleTypeDef hltdc;
@ -53,15 +53,15 @@ RTC_HandleTypeDef hrtc;
SD_HandleTypeDef hsd1;
SPI_HandleTypeDef hspi2;
SPI_HandleTypeDef hspi5;
TIM_HandleTypeDef htim1;
TIM_HandleTypeDef htim3;
TIM_HandleTypeDef htim4;
TIM_HandleTypeDef htim11;
UART_HandleTypeDef huart1;
UART_HandleTypeDef huart2;
UART_HandleTypeDef huart3;
UART_HandleTypeDef huart6;
/* USER CODE BEGIN PV */
@ -70,21 +70,21 @@ UART_HandleTypeDef huart3;
/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
static void MX_GPIO_Init(void);
static void MX_I2C2_SMBUS_Init(void);
static void MX_I2C4_SMBUS_Init(void);
static void MX_I2C2_Init(void);
static void MX_I2C4_Init(void);
static void MX_LTDC_Init(void);
static void MX_QUADSPI_Init(void);
static void MX_RTC_Init(void);
static void MX_SDMMC1_SD_Init(void);
static void MX_SPI2_Init(void);
static void MX_SPI5_Init(void);
static void MX_TIM1_Init(void);
static void MX_TIM3_Init(void);
static void MX_TIM4_Init(void);
static void MX_USART1_UART_Init(void);
static void MX_USART2_UART_Init(void);
static void MX_USART3_UART_Init(void);
static void MX_USB_OTG_FS_USB_Init(void);
static void MX_TIM11_Init(void);
static void MX_USART6_UART_Init(void);
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
@ -122,21 +122,21 @@ int main(void)
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_I2C2_SMBUS_Init();
MX_I2C4_SMBUS_Init();
MX_I2C2_Init();
MX_I2C4_Init();
MX_LTDC_Init();
MX_QUADSPI_Init();
MX_RTC_Init();
MX_SDMMC1_SD_Init();
MX_SPI2_Init();
MX_SPI5_Init();
MX_TIM1_Init();
MX_TIM3_Init();
MX_TIM4_Init();
MX_USART1_UART_Init();
MX_USART2_UART_Init();
MX_USART3_UART_Init();
MX_USB_OTG_FS_USB_Init();
MX_TIM11_Init();
MX_USART6_UART_Init();
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
@ -202,8 +202,8 @@ void SystemClock_Config(void)
Error_Handler();
}
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_LTDC|RCC_PERIPHCLK_RTC
|RCC_PERIPHCLK_USART1|RCC_PERIPHCLK_USART2
|RCC_PERIPHCLK_USART3|RCC_PERIPHCLK_I2C2
|RCC_PERIPHCLK_USART2|RCC_PERIPHCLK_USART3
|RCC_PERIPHCLK_USART6|RCC_PERIPHCLK_I2C2
|RCC_PERIPHCLK_I2C4|RCC_PERIPHCLK_SDMMC1
|RCC_PERIPHCLK_CLK48;
PeriphClkInitStruct.PLLSAI.PLLSAIN = 60;
@ -213,9 +213,9 @@ void SystemClock_Config(void)
PeriphClkInitStruct.PLLSAIDivQ = 1;
PeriphClkInitStruct.PLLSAIDivR = RCC_PLLSAIDIVR_2;
PeriphClkInitStruct.RTCClockSelection = RCC_RTCCLKSOURCE_LSI;
PeriphClkInitStruct.Usart1ClockSelection = RCC_USART1CLKSOURCE_PCLK2;
PeriphClkInitStruct.Usart2ClockSelection = RCC_USART2CLKSOURCE_PCLK1;
PeriphClkInitStruct.Usart3ClockSelection = RCC_USART3CLKSOURCE_PCLK1;
PeriphClkInitStruct.Usart6ClockSelection = RCC_USART6CLKSOURCE_PCLK2;
PeriphClkInitStruct.I2c2ClockSelection = RCC_I2C2CLKSOURCE_PCLK1;
PeriphClkInitStruct.I2c4ClockSelection = RCC_I2C4CLKSOURCE_PCLK1;
PeriphClkInitStruct.Clk48ClockSelection = RCC_CLK48SOURCE_PLL;
@ -231,7 +231,7 @@ void SystemClock_Config(void)
* @param None
* @retval None
*/
static void MX_I2C2_SMBUS_Init(void)
static void MX_I2C2_Init(void)
{
/* USER CODE BEGIN I2C2_Init 0 */
@ -241,26 +241,28 @@ static void MX_I2C2_SMBUS_Init(void)
/* USER CODE BEGIN I2C2_Init 1 */
/* USER CODE END I2C2_Init 1 */
hsmbus2.Instance = I2C2;
hsmbus2.Init.Timing = 0x00303D5B;
hsmbus2.Init.AnalogFilter = SMBUS_ANALOGFILTER_ENABLE;
hsmbus2.Init.OwnAddress1 = 2;
hsmbus2.Init.AddressingMode = SMBUS_ADDRESSINGMODE_7BIT;
hsmbus2.Init.DualAddressMode = SMBUS_DUALADDRESS_DISABLE;
hsmbus2.Init.OwnAddress2 = 0;
hsmbus2.Init.OwnAddress2Masks = SMBUS_OA2_NOMASK;
hsmbus2.Init.GeneralCallMode = SMBUS_GENERALCALL_DISABLE;
hsmbus2.Init.NoStretchMode = SMBUS_NOSTRETCH_DISABLE;
hsmbus2.Init.PacketErrorCheckMode = SMBUS_PEC_DISABLE;
hsmbus2.Init.PeripheralMode = SMBUS_PERIPHERAL_MODE_SMBUS_SLAVE;
hsmbus2.Init.SMBusTimeout = 0x000080C3;
if (HAL_SMBUS_Init(&hsmbus2) != HAL_OK)
{
Error_Handler();
}
/** configuration Alert Mode
hi2c2.Instance = I2C2;
hi2c2.Init.Timing = 0x00303D5B;
hi2c2.Init.OwnAddress1 = 0;
hi2c2.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT;
hi2c2.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE;
hi2c2.Init.OwnAddress2 = 0;
hi2c2.Init.OwnAddress2Masks = I2C_OA2_NOMASK;
hi2c2.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE;
hi2c2.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE;
if (HAL_I2C_Init(&hi2c2) != HAL_OK)
{
Error_Handler();
}
/** Configure Analogue filter
*/
if (HAL_I2CEx_ConfigAnalogFilter(&hi2c2, I2C_ANALOGFILTER_ENABLE) != HAL_OK)
{
Error_Handler();
}
/** Configure Digital filter
*/
if (HAL_SMBUS_EnableAlert_IT(&hsmbus2) != HAL_OK)
if (HAL_I2CEx_ConfigDigitalFilter(&hi2c2, 0) != HAL_OK)
{
Error_Handler();
}
@ -275,7 +277,7 @@ static void MX_I2C2_SMBUS_Init(void)
* @param None
* @retval None
*/
static void MX_I2C4_SMBUS_Init(void)
static void MX_I2C4_Init(void)
{
/* USER CODE BEGIN I2C4_Init 0 */
@ -285,26 +287,28 @@ static void MX_I2C4_SMBUS_Init(void)
/* USER CODE BEGIN I2C4_Init 1 */
/* USER CODE END I2C4_Init 1 */
hsmbus4.Instance = I2C4;
hsmbus4.Init.Timing = 0x00303D5B;
hsmbus4.Init.AnalogFilter = SMBUS_ANALOGFILTER_ENABLE;
hsmbus4.Init.OwnAddress1 = 2;
hsmbus4.Init.AddressingMode = SMBUS_ADDRESSINGMODE_7BIT;
hsmbus4.Init.DualAddressMode = SMBUS_DUALADDRESS_DISABLE;
hsmbus4.Init.OwnAddress2 = 0;
hsmbus4.Init.OwnAddress2Masks = SMBUS_OA2_NOMASK;
hsmbus4.Init.GeneralCallMode = SMBUS_GENERALCALL_DISABLE;
hsmbus4.Init.NoStretchMode = SMBUS_NOSTRETCH_DISABLE;
hsmbus4.Init.PacketErrorCheckMode = SMBUS_PEC_DISABLE;
hsmbus4.Init.PeripheralMode = SMBUS_PERIPHERAL_MODE_SMBUS_SLAVE;
hsmbus4.Init.SMBusTimeout = 0x000080C3;
if (HAL_SMBUS_Init(&hsmbus4) != HAL_OK)
{
Error_Handler();
}
/** configuration Alert Mode
hi2c4.Instance = I2C4;
hi2c4.Init.Timing = 0x00303D5B;
hi2c4.Init.OwnAddress1 = 0;
hi2c4.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT;
hi2c4.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE;
hi2c4.Init.OwnAddress2 = 0;
hi2c4.Init.OwnAddress2Masks = I2C_OA2_NOMASK;
hi2c4.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE;
hi2c4.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE;
if (HAL_I2C_Init(&hi2c4) != HAL_OK)
{
Error_Handler();
}
/** Configure Analogue filter
*/
if (HAL_SMBUS_EnableAlert_IT(&hsmbus4) != HAL_OK)
if (HAL_I2CEx_ConfigAnalogFilter(&hi2c4, I2C_ANALOGFILTER_ENABLE) != HAL_OK)
{
Error_Handler();
}
/** Configure Digital filter
*/
if (HAL_I2CEx_ConfigDigitalFilter(&hi2c4, 0) != HAL_OK)
{
Error_Handler();
}
@ -541,46 +545,6 @@ static void MX_SPI2_Init(void)
}
/**
* @brief SPI5 Initialization Function
* @param None
* @retval None
*/
static void MX_SPI5_Init(void)
{
/* USER CODE BEGIN SPI5_Init 0 */
/* USER CODE END SPI5_Init 0 */
/* USER CODE BEGIN SPI5_Init 1 */
/* USER CODE END SPI5_Init 1 */
/* SPI5 parameter configuration*/
hspi5.Instance = SPI5;
hspi5.Init.Mode = SPI_MODE_MASTER;
hspi5.Init.Direction = SPI_DIRECTION_2LINES;
hspi5.Init.DataSize = SPI_DATASIZE_4BIT;
hspi5.Init.CLKPolarity = SPI_POLARITY_LOW;
hspi5.Init.CLKPhase = SPI_PHASE_1EDGE;
hspi5.Init.NSS = SPI_NSS_SOFT;
hspi5.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2;
hspi5.Init.FirstBit = SPI_FIRSTBIT_MSB;
hspi5.Init.TIMode = SPI_TIMODE_DISABLE;
hspi5.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
hspi5.Init.CRCPolynomial = 7;
hspi5.Init.CRCLength = SPI_CRC_LENGTH_DATASIZE;
hspi5.Init.NSSPMode = SPI_NSS_PULSE_ENABLE;
if (HAL_SPI_Init(&hspi5) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN SPI5_Init 2 */
/* USER CODE END SPI5_Init 2 */
}
/**
* @brief TIM1 Initialization Function
* @param None
@ -693,6 +657,10 @@ static void MX_TIM3_Init(void)
{
Error_Handler();
}
if (HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_2) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN TIM3_Init 2 */
/* USER CODE END TIM3_Init 2 */
@ -738,7 +706,15 @@ static void MX_TIM4_Init(void)
sConfigOC.Pulse = 0;
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
if (HAL_TIM_PWM_ConfigChannel(&htim4, &sConfigOC, TIM_CHANNEL_1) != HAL_OK)
if (HAL_TIM_PWM_ConfigChannel(&htim4, &sConfigOC, TIM_CHANNEL_2) != HAL_OK)
{
Error_Handler();
}
if (HAL_TIM_PWM_ConfigChannel(&htim4, &sConfigOC, TIM_CHANNEL_3) != HAL_OK)
{
Error_Handler();
}
if (HAL_TIM_PWM_ConfigChannel(&htim4, &sConfigOC, TIM_CHANNEL_4) != HAL_OK)
{
Error_Handler();
}
@ -750,37 +726,48 @@ static void MX_TIM4_Init(void)
}
/**
* @brief USART1 Initialization Function
* @brief TIM11 Initialization Function
* @param None
* @retval None
*/
static void MX_USART1_UART_Init(void)
static void MX_TIM11_Init(void)
{
/* USER CODE BEGIN USART1_Init 0 */
/* USER CODE BEGIN TIM11_Init 0 */
/* USER CODE END USART1_Init 0 */
/* USER CODE END TIM11_Init 0 */
/* USER CODE BEGIN USART1_Init 1 */
TIM_OC_InitTypeDef sConfigOC = {0};
/* USER CODE END USART1_Init 1 */
huart1.Instance = USART1;
huart1.Init.BaudRate = 115200;
huart1.Init.WordLength = UART_WORDLENGTH_8B;
huart1.Init.StopBits = UART_STOPBITS_1;
huart1.Init.Parity = UART_PARITY_NONE;
huart1.Init.Mode = UART_MODE_TX_RX;
huart1.Init.HwFlowCtl = UART_HWCONTROL_NONE;
huart1.Init.OverSampling = UART_OVERSAMPLING_16;
huart1.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
huart1.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;
if (HAL_UART_Init(&huart1) != HAL_OK)
/* USER CODE BEGIN TIM11_Init 1 */
/* USER CODE END TIM11_Init 1 */
htim11.Instance = TIM11;
htim11.Init.Prescaler = 0;
htim11.Init.CounterMode = TIM_COUNTERMODE_UP;
htim11.Init.Period = 65535;
htim11.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
htim11.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
if (HAL_TIM_Base_Init(&htim11) != HAL_OK)
{
Error_Handler();
}
if (HAL_TIM_PWM_Init(&htim11) != HAL_OK)
{
Error_Handler();
}
sConfigOC.OCMode = TIM_OCMODE_PWM1;
sConfigOC.Pulse = 0;
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
if (HAL_TIM_PWM_ConfigChannel(&htim11, &sConfigOC, TIM_CHANNEL_1) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN USART1_Init 2 */
/* USER CODE BEGIN TIM11_Init 2 */
/* USER CODE END USART1_Init 2 */
/* USER CODE END TIM11_Init 2 */
HAL_TIM_MspPostInit(&htim11);
}
@ -854,6 +841,41 @@ static void MX_USART3_UART_Init(void)
}
/**
* @brief USART6 Initialization Function
* @param None
* @retval None
*/
static void MX_USART6_UART_Init(void)
{
/* USER CODE BEGIN USART6_Init 0 */
/* USER CODE END USART6_Init 0 */
/* USER CODE BEGIN USART6_Init 1 */
/* USER CODE END USART6_Init 1 */
huart6.Instance = USART6;
huart6.Init.BaudRate = 115200;
huart6.Init.WordLength = UART_WORDLENGTH_8B;
huart6.Init.StopBits = UART_STOPBITS_1;
huart6.Init.Parity = UART_PARITY_NONE;
huart6.Init.Mode = UART_MODE_TX_RX;
huart6.Init.HwFlowCtl = UART_HWCONTROL_NONE;
huart6.Init.OverSampling = UART_OVERSAMPLING_16;
huart6.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
huart6.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;
if (HAL_UART_Init(&huart6) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN USART6_Init 2 */
/* USER CODE END USART6_Init 2 */
}
/**
* @brief USB_OTG_FS Initialization Function
* @param None
@ -891,86 +913,60 @@ static void MX_GPIO_Init(void)
__HAL_RCC_GPIOH_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
__HAL_RCC_GPIOG_CLK_ENABLE();
__HAL_RCC_GPIOD_CLK_ENABLE();
__HAL_RCC_GPIOG_CLK_ENABLE();
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOG, GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3
|GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_8
|GPIO_PIN_9|GPIO_PIN_14, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOF, OTG_EN_Pin|BAT_INT_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOE, GPIO_PIN_8, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOE, LCD_BL_EN_Pin|LCD_TOUCH_RST_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOD, GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_4, GPIO_PIN_RESET);
/*Configure GPIO pins : PE3 PE7 PE10 PE13
PE14 */
GPIO_InitStruct.Pin = GPIO_PIN_3|GPIO_PIN_7|GPIO_PIN_10|GPIO_PIN_13
|GPIO_PIN_14;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
/*Configure GPIO pins : PF3 PF4 PF5 PF12 */
GPIO_InitStruct.Pin = GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_12;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
/*Configure GPIO pins : PC3 PC4 PC5 */
GPIO_InitStruct.Pin = GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_5;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
HAL_GPIO_WritePin(GPIOD, RGBLED1_B_Pin|RGBLED1_G_Pin|RGBLED1_R_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin : PA7 */
GPIO_InitStruct.Pin = GPIO_PIN_7;
/*Configure GPIO pin : LCD_PENIRQ_Pin */
GPIO_InitStruct.Pin = LCD_PENIRQ_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
HAL_GPIO_Init(LCD_PENIRQ_GPIO_Port, &GPIO_InitStruct);
/*Configure GPIO pins : PB1 PB14 PB15 */
GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_14|GPIO_PIN_15;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
/*Configure GPIO pins : PG0 PG1 PG2 PG3
PG4 PG5 PG6 PG8
PG9 PG14 */
GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3
|GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_8
|GPIO_PIN_9|GPIO_PIN_14;
/*Configure GPIO pins : OTG_EN_Pin BAT_INT_Pin */
GPIO_InitStruct.Pin = OTG_EN_Pin|BAT_INT_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
/*Configure GPIO pin : PE8 */
GPIO_InitStruct.Pin = GPIO_PIN_8;
/*Configure GPIO pins : LCD_BL_EN_Pin LCD_TOUCH_RST_Pin */
GPIO_InitStruct.Pin = LCD_BL_EN_Pin|LCD_TOUCH_RST_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
/*Configure GPIO pins : PD14 PD15 */
GPIO_InitStruct.Pin = GPIO_PIN_14|GPIO_PIN_15;
/*Configure GPIO pins : EXTIO_3_Pin EXTIO_4_Pin EXTIO_5_Pin EXTIO_6_Pin */
GPIO_InitStruct.Pin = EXTIO_3_Pin|EXTIO_4_Pin|EXTIO_5_Pin|EXTIO_6_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
/*Configure GPIO pin : USB_VBUS_Pin */
GPIO_InitStruct.Pin = USB_VBUS_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(USB_VBUS_GPIO_Port, &GPIO_InitStruct);
/*Configure GPIO pins : PA10 PA11 PA12 */
GPIO_InitStruct.Pin = GPIO_PIN_10|GPIO_PIN_11|GPIO_PIN_12;
/*Configure GPIO pins : USB0_ID_Pin USB0_DM_Pin USB0_DP_Pin */
GPIO_InitStruct.Pin = USB0_ID_Pin|USB0_DM_Pin|USB0_DP_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF10_OTG_FS;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
/*Configure GPIO pins : PD0 PD1 PD4 */
GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_4;
/*Configure GPIO pins : RGBLED1_B_Pin RGBLED1_G_Pin RGBLED1_R_Pin */
GPIO_InitStruct.Pin = RGBLED1_B_Pin|RGBLED1_G_Pin|RGBLED1_R_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;


+ 173
- 159
Core/Src/stm32f7xx_hal_msp.c View File

@ -60,7 +60,7 @@
/* USER CODE END 0 */
void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
/**
/**
* Initializes the Global MSP.
*/
void HAL_MspInit(void)
@ -80,15 +80,15 @@ void HAL_MspInit(void)
}
/**
* @brief SMBUS MSP Initialization
* @brief I2C MSP Initialization
* This function configures the hardware resources used in this example
* @param hsmbus: SMBUS handle pointer
* @param hi2c: I2C handle pointer
* @retval None
*/
void HAL_SMBUS_MspInit(SMBUS_HandleTypeDef* hsmbus)
void HAL_I2C_MspInit(I2C_HandleTypeDef* hi2c)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
if(hsmbus->Instance==I2C2)
if(hi2c->Instance==I2C2)
{
/* USER CODE BEGIN I2C2_MspInit 0 */
@ -98,9 +98,8 @@ void HAL_SMBUS_MspInit(SMBUS_HandleTypeDef* hsmbus)
/**I2C2 GPIO Configuration
PF0 ------> I2C2_SDA
PF1 ------> I2C2_SCL
PF2 ------> I2C2_SMBA
*/
GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2;
GPIO_InitStruct.Pin = I2C1_SDA_Pin|I2C1_SCL_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
GPIO_InitStruct.Pull = GPIO_PULLUP;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
@ -113,7 +112,7 @@ void HAL_SMBUS_MspInit(SMBUS_HandleTypeDef* hsmbus)
/* USER CODE END I2C2_MspInit 1 */
}
else if(hsmbus->Instance==I2C4)
else if(hi2c->Instance==I2C4)
{
/* USER CODE BEGIN I2C4_MspInit 0 */
@ -121,11 +120,10 @@ void HAL_SMBUS_MspInit(SMBUS_HandleTypeDef* hsmbus)
__HAL_RCC_GPIOF_CLK_ENABLE();
/**I2C4 GPIO Configuration
PF13 ------> I2C4_SMBA
PF14 ------> I2C4_SCL
PF15 ------> I2C4_SDA
*/
GPIO_InitStruct.Pin = GPIO_PIN_13|GPIO_PIN_14|GPIO_PIN_15;
GPIO_InitStruct.Pin = BAT_SCL_Pin|BAT_SDA_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
GPIO_InitStruct.Pull = GPIO_PULLUP;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
@ -142,14 +140,14 @@ void HAL_SMBUS_MspInit(SMBUS_HandleTypeDef* hsmbus)
}
/**
* @brief SMBUS MSP De-Initialization
* @brief I2C MSP De-Initialization
* This function freeze the hardware resources used in this example
* @param hsmbus: SMBUS handle pointer
* @param hi2c: I2C handle pointer
* @retval None
*/
void HAL_SMBUS_MspDeInit(SMBUS_HandleTypeDef* hsmbus)
void HAL_I2C_MspDeInit(I2C_HandleTypeDef* hi2c)
{
if(hsmbus->Instance==I2C2)
if(hi2c->Instance==I2C2)
{
/* USER CODE BEGIN I2C2_MspDeInit 0 */
@ -160,19 +158,16 @@ void HAL_SMBUS_MspDeInit(SMBUS_HandleTypeDef* hsmbus)
/**I2C2 GPIO Configuration
PF0 ------> I2C2_SDA
PF1 ------> I2C2_SCL
PF2 ------> I2C2_SMBA
*/
HAL_GPIO_DeInit(GPIOF, GPIO_PIN_0);
HAL_GPIO_DeInit(I2C1_SDA_GPIO_Port, I2C1_SDA_Pin);
HAL_GPIO_DeInit(GPIOF, GPIO_PIN_1);
HAL_GPIO_DeInit(GPIOF, GPIO_PIN_2);
HAL_GPIO_DeInit(I2C1_SCL_GPIO_Port, I2C1_SCL_Pin);
/* USER CODE BEGIN I2C2_MspDeInit 1 */
/* USER CODE END I2C2_MspDeInit 1 */
}
else if(hsmbus->Instance==I2C4)
else if(hi2c->Instance==I2C4)
{
/* USER CODE BEGIN I2C4_MspDeInit 0 */
@ -181,15 +176,12 @@ void HAL_SMBUS_MspDeInit(SMBUS_HandleTypeDef* hsmbus)
__HAL_RCC_I2C4_CLK_DISABLE();
/**I2C4 GPIO Configuration
PF13 ------> I2C4_SMBA
PF14 ------> I2C4_SCL
PF15 ------> I2C4_SDA
*/
HAL_GPIO_DeInit(GPIOF, GPIO_PIN_13);
HAL_GPIO_DeInit(GPIOF, GPIO_PIN_14);
HAL_GPIO_DeInit(BAT_SCL_GPIO_Port, BAT_SCL_Pin);
HAL_GPIO_DeInit(GPIOF, GPIO_PIN_15);
HAL_GPIO_DeInit(BAT_SDA_GPIO_Port, BAT_SDA_Pin);
/* USER CODE BEGIN I2C4_MspDeInit 1 */
@ -418,47 +410,47 @@ void HAL_QSPI_MspInit(QSPI_HandleTypeDef* hqspi)
PD11 ------> QUADSPI_BK1_IO0
PB6 ------> QUADSPI_BK1_NCS
*/
GPIO_InitStruct.Pin = GPIO_PIN_2;
GPIO_InitStruct.Pin = QSPI_IO2_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF9_QUADSPI;
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
HAL_GPIO_Init(QSPI_IO2_GPIO_Port, &GPIO_InitStruct);
GPIO_InitStruct.Pin = GPIO_PIN_6;
GPIO_InitStruct.Pin = QSPI_IO3_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF9_QUADSPI;
HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
HAL_GPIO_Init(QSPI_IO3_GPIO_Port, &GPIO_InitStruct);
GPIO_InitStruct.Pin = GPIO_PIN_9;
GPIO_InitStruct.Pin = QSPI_IO1_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF10_QUADSPI;
HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
HAL_GPIO_Init(QSPI_IO1_GPIO_Port, &GPIO_InitStruct);
GPIO_InitStruct.Pin = GPIO_PIN_2;
GPIO_InitStruct.Pin = QSPI_CLK_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF9_QUADSPI;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
HAL_GPIO_Init(QSPI_CLK_GPIO_Port, &GPIO_InitStruct);
GPIO_InitStruct.Pin = GPIO_PIN_11;
GPIO_InitStruct.Pin = QSPI_IO0_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF9_QUADSPI;
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
HAL_GPIO_Init(QSPI_IO0_GPIO_Port, &GPIO_InitStruct);
GPIO_InitStruct.Pin = GPIO_PIN_6;
GPIO_InitStruct.Pin = QSPI_NCS_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF10_QUADSPI;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
HAL_GPIO_Init(QSPI_NCS_GPIO_Port, &GPIO_InitStruct);
/* USER CODE BEGIN QUADSPI_MspInit 1 */
@ -491,13 +483,13 @@ void HAL_QSPI_MspDeInit(QSPI_HandleTypeDef* hqspi)
PD11 ------> QUADSPI_BK1_IO0
PB6 ------> QUADSPI_BK1_NCS
*/
HAL_GPIO_DeInit(GPIOE, GPIO_PIN_2);
HAL_GPIO_DeInit(QSPI_IO2_GPIO_Port, QSPI_IO2_Pin);
HAL_GPIO_DeInit(GPIOF, GPIO_PIN_6|GPIO_PIN_9);
HAL_GPIO_DeInit(GPIOF, QSPI_IO3_Pin|QSPI_IO1_Pin);
HAL_GPIO_DeInit(GPIOB, GPIO_PIN_2|GPIO_PIN_6);
HAL_GPIO_DeInit(GPIOB, QSPI_CLK_Pin|QSPI_NCS_Pin);
HAL_GPIO_DeInit(GPIOD, GPIO_PIN_11);
HAL_GPIO_DeInit(QSPI_IO0_GPIO_Port, QSPI_IO0_Pin);
/* USER CODE BEGIN QUADSPI_MspDeInit 1 */
@ -577,20 +569,20 @@ void HAL_SD_MspInit(SD_HandleTypeDef* hsd)
PC12 ------> SDMMC1_CK
PD2 ------> SDMMC1_CMD
*/
GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_11
|GPIO_PIN_12;
GPIO_InitStruct.Pin = SD_DAT0_Pin|SD_DAT1_Pin|SD_DAT2_Pin|SD_DAT3_Pin
|SD_CLK_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF12_SDMMC1;
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
GPIO_InitStruct.Pin = GPIO_PIN_2;
GPIO_InitStruct.Pin = SD_CMD_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF12_SDMMC1;
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
HAL_GPIO_Init(SD_CMD_GPIO_Port, &GPIO_InitStruct);
/* USER CODE BEGIN SDMMC1_MspInit 1 */
@ -623,10 +615,10 @@ void HAL_SD_MspDeInit(SD_HandleTypeDef* hsd)
PC12 ------> SDMMC1_CK
PD2 ------> SDMMC1_CMD
*/
HAL_GPIO_DeInit(GPIOC, GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_11
|GPIO_PIN_12);
HAL_GPIO_DeInit(GPIOC, SD_DAT0_Pin|SD_DAT1_Pin|SD_DAT2_Pin|SD_DAT3_Pin
|SD_CLK_Pin);
HAL_GPIO_DeInit(GPIOD, GPIO_PIN_2);
HAL_GPIO_DeInit(SD_CMD_GPIO_Port, SD_CMD_Pin);
/* USER CODE BEGIN SDMMC1_MspDeInit 1 */
@ -660,14 +652,14 @@ void HAL_SPI_MspInit(SPI_HandleTypeDef* hspi)
PB12 ------> SPI2_NSS
PB13 ------> SPI2_SCK
*/
GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_2;
GPIO_InitStruct.Pin = SPI1_MOSI_Pin|SPI1_MISO_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF5_SPI2;
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
GPIO_InitStruct.Pin = GPIO_PIN_12|GPIO_PIN_13;
GPIO_InitStruct.Pin = SPI1_NSS_Pin|SPI1_SCK_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
@ -678,31 +670,6 @@ void HAL_SPI_MspInit(SPI_HandleTypeDef* hspi)
/* USER CODE END SPI2_MspInit 1 */
}
else if(hspi->Instance==SPI5)
{
/* USER CODE BEGIN SPI5_MspInit 0 */
/* USER CODE END SPI5_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_SPI5_CLK_ENABLE();
__HAL_RCC_GPIOF_CLK_ENABLE();
/**SPI5 GPIO Configuration
PF7 ------> SPI5_SCK
PF8 ------> SPI5_MISO
PF11 ------> SPI5_MOSI
*/
GPIO_InitStruct.Pin = GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_11;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF5_SPI5;
HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
/* USER CODE BEGIN SPI5_MspInit 1 */
/* USER CODE END SPI5_MspInit 1 */
}
}
@ -728,33 +695,14 @@ void HAL_SPI_MspDeInit(SPI_HandleTypeDef* hspi)
PB12 ------> SPI2_NSS
PB13 ------> SPI2_SCK
*/
HAL_GPIO_DeInit(GPIOC, GPIO_PIN_1|GPIO_PIN_2);
HAL_GPIO_DeInit(GPIOC, SPI1_MOSI_Pin|SPI1_MISO_Pin);
HAL_GPIO_DeInit(GPIOB, GPIO_PIN_12|GPIO_PIN_13);
HAL_GPIO_DeInit(GPIOB, SPI1_NSS_Pin|SPI1_SCK_Pin);
/* USER CODE BEGIN SPI2_MspDeInit 1 */
/* USER CODE END SPI2_MspDeInit 1 */
}
else if(hspi->Instance==SPI5)
{
/* USER CODE BEGIN SPI5_MspDeInit 0 */
/* USER CODE END SPI5_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_SPI5_CLK_DISABLE();
/**SPI5 GPIO Configuration
PF7 ------> SPI5_SCK
PF8 ------> SPI5_MISO
PF11 ------> SPI5_MOSI
*/
HAL_GPIO_DeInit(GPIOF, GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_11);
/* USER CODE BEGIN SPI5_MspDeInit 1 */
/* USER CODE END SPI5_MspDeInit 1 */
}
}
@ -802,6 +750,28 @@ void HAL_TIM_PWM_MspInit(TIM_HandleTypeDef* htim_pwm)
}
/**
* @brief TIM_Base MSP Initialization
* This function configures the hardware resources used in this example
* @param htim_base: TIM_Base handle pointer
* @retval None
*/
void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base)
{
if(htim_base->Instance==TIM11)
{
/* USER CODE BEGIN TIM11_MspInit 0 */
/* USER CODE END TIM11_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_TIM11_CLK_ENABLE();
/* USER CODE BEGIN TIM11_MspInit 1 */
/* USER CODE END TIM11_MspInit 1 */
}
}
void HAL_TIM_MspPostInit(TIM_HandleTypeDef* htim)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
@ -814,12 +784,12 @@ void HAL_TIM_MspPostInit(TIM_HandleTypeDef* htim)
/**TIM1 GPIO Configuration
PE9 ------> TIM1_CH1
*/
GPIO_InitStruct.Pin = GPIO_PIN_9;
GPIO_InitStruct.Pin = BZZZ_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Alternate = GPIO_AF1_TIM1;
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
HAL_GPIO_Init(BZZZ_GPIO_Port, &GPIO_InitStruct);
/* USER CODE BEGIN TIM1_MspPostInit 1 */
@ -834,8 +804,9 @@ void HAL_TIM_MspPostInit(TIM_HandleTypeDef* htim)
__HAL_RCC_GPIOB_CLK_ENABLE();
/**TIM3 GPIO Configuration
PB4 ------> TIM3_CH1
PB5 ------> TIM3_CH2
*/
GPIO_InitStruct.Pin = GPIO_PIN_4;
GPIO_InitStruct.Pin = RGBLED1_RB4_Pin|RGBLED1_GB5_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
@ -853,20 +824,51 @@ void HAL_TIM_MspPostInit(TIM_HandleTypeDef* htim)
/* USER CODE END TIM4_MspPostInit 0 */
__HAL_RCC_GPIOD_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
/**TIM4 GPIO Configuration
PD12 ------> TIM4_CH1
PD14 ------> TIM4_CH3
PD15 ------> TIM4_CH4
PB7 ------> TIM4_CH2
*/
GPIO_InitStruct.Pin = GPIO_PIN_12;
GPIO_InitStruct.Pin = EXTIO_1_PWM_Pin|EXTIO_2_PWM_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Alternate = GPIO_AF2_TIM4;
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
GPIO_InitStruct.Pin = RGBLED1_BB7_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Alternate = GPIO_AF2_TIM4;
HAL_GPIO_Init(RGBLED1_BB7_GPIO_Port, &GPIO_InitStruct);
/* USER CODE BEGIN TIM4_MspPostInit 1 */
/* USER CODE END TIM4_MspPostInit 1 */
}
else if(htim->Instance==TIM11)
{
/* USER CODE BEGIN TIM11_MspPostInit 0 */
/* USER CODE END TIM11_MspPostInit 0 */
__HAL_RCC_GPIOF_CLK_ENABLE();
/**TIM11 GPIO Configuration
PF7 ------> TIM11_CH1
*/
GPIO_InitStruct.Pin = LCD_BL_PWM_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Alternate = GPIO_AF3_TIM11;
HAL_GPIO_Init(LCD_BL_PWM_GPIO_Port, &GPIO_InitStruct);
/* USER CODE BEGIN TIM11_MspPostInit 1 */
/* USER CODE END TIM11_MspPostInit 1 */
}
}
/**
@ -914,47 +916,37 @@ void HAL_TIM_PWM_MspDeInit(TIM_HandleTypeDef* htim_pwm)
}
/**
* @brief UART MSP Initialization
* This function configures the hardware resources used in this example
* @param huart: UART handle pointer
* @brief TIM_Base MSP De-Initialization
* This function freeze the hardware resources used in this example
* @param htim_base: TIM_Base handle pointer
* @retval None
*/
void HAL_UART_MspInit(UART_HandleTypeDef* huart)
void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* htim_base)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
if(huart->Instance==USART1)
if(htim_base->Instance==TIM11)
{
/* USER CODE BEGIN USART1_MspInit 0 */
/* USER CODE END USART1_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_USART1_CLK_ENABLE();
/* USER CODE BEGIN TIM11_MspDeInit 0 */
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
/**USART1 GPIO Configuration
PA9 ------> USART1_TX
PB7 ------> USART1_RX
*/
GPIO_InitStruct.Pin = GPIO_PIN_9;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF7_USART1;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
/* USER CODE END TIM11_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_TIM11_CLK_DISABLE();
/* USER CODE BEGIN TIM11_MspDeInit 1 */
GPIO_InitStruct.Pin = GPIO_PIN_7;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF7_USART1;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
/* USER CODE END TIM11_MspDeInit 1 */
}
/* USER CODE BEGIN USART1_MspInit 1 */
}
/* USER CODE END USART1_MspInit 1 */
}
else if(huart->Instance==USART2)
/**
* @brief UART MSP Initialization
* This function configures the hardware resources used in this example
* @param huart: UART handle pointer
* @retval None
*/
void HAL_UART_MspInit(UART_HandleTypeDef* huart)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
if(huart->Instance==USART2)
{
/* USER CODE BEGIN USART2_MspInit 0 */
@ -967,7 +959,7 @@ void HAL_UART_MspInit(UART_HandleTypeDef* huart)
PD5 ------> USART2_TX
PD6 ------> USART2_RX
*/
GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_6;
GPIO_InitStruct.Pin = SERIAL1_TX_Pin|SERIAL1_RX_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
@ -991,7 +983,7 @@ void HAL_UART_MspInit(UART_HandleTypeDef* huart)
PD8 ------> USART3_TX
PD9 ------> USART3_RX
*/
GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9;
GPIO_InitStruct.Pin = SERIAL2_TX_Pin|SERIAL2_RX_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
@ -1002,6 +994,30 @@ void HAL_UART_MspInit(UART_HandleTypeDef* huart)
/* USER CODE END USART3_MspInit 1 */
}
else if(huart->Instance==USART6)
{
/* USER CODE BEGIN USART6_MspInit 0 */
/* USER CODE END USART6_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_USART6_CLK_ENABLE();
__HAL_RCC_GPIOG_CLK_ENABLE();
/**USART6 GPIO Configuration
PG9 ------> USART6_RX
PG14 ------> USART6_TX
*/
GPIO_InitStruct.Pin = SERIAL3_RX_Pin|SERIAL3_TX_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF8_USART6;
HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
/* USER CODE BEGIN USART6_MspInit 1 */
/* USER CODE END USART6_MspInit 1 */
}
}
@ -1013,27 +1029,7 @@ void HAL_UART_MspInit(UART_HandleTypeDef* huart)
*/
void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
{
if(huart->Instance==USART1)
{
/* USER CODE BEGIN USART1_MspDeInit 0 */
/* USER CODE END USART1_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_USART1_CLK_DISABLE();
/**USART1 GPIO Configuration
PA9 ------> USART1_TX
PB7 ------> USART1_RX
*/
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_9);
HAL_GPIO_DeInit(GPIOB, GPIO_PIN_7);
/* USER CODE BEGIN USART1_MspDeInit 1 */
/* USER CODE END USART1_MspDeInit 1 */
}
else if(huart->Instance==USART2)
if(huart->Instance==USART2)
{
/* USER CODE BEGIN USART2_MspDeInit 0 */
@ -1045,7 +1041,7 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
PD5 ------> USART2_TX
PD6 ------> USART2_RX
*/
HAL_GPIO_DeInit(GPIOD, GPIO_PIN_5|GPIO_PIN_6);
HAL_GPIO_DeInit(GPIOD, SERIAL1_TX_Pin|SERIAL1_RX_Pin);
/* USER CODE BEGIN USART2_MspDeInit 1 */
@ -1063,12 +1059,30 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
PD8 ------> USART3_TX
PD9 ------> USART3_RX
*/
HAL_GPIO_DeInit(GPIOD, GPIO_PIN_8|GPIO_PIN_9);
HAL_GPIO_DeInit(GPIOD, SERIAL2_TX_Pin|SERIAL2_RX_Pin);
/* USER CODE BEGIN USART3_MspDeInit 1 */
/* USER CODE END USART3_MspDeInit 1 */
}
else if(huart->Instance==USART6)
{
/* USER CODE BEGIN USART6_MspDeInit 0 */
/* USER CODE END USART6_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_USART6_CLK_DISABLE();
/**USART6 GPIO Configuration
PG9 ------> USART6_RX
PG14 ------> USART6_TX
*/
HAL_GPIO_DeInit(GPIOG, SERIAL3_RX_Pin|SERIAL3_TX_Pin);
/* USER CODE BEGIN USART6_MspDeInit 1 */
/* USER CODE END USART6_MspDeInit 1 */
}
}


+ 4
- 5
Makefile View File

@ -1,5 +1,5 @@
##########################################################################################################################
# File automatically-generated by tool: [projectgenerator] version: [3.10.0-B14] date: [Wed Oct 07 12:49:09 CEST 2020]
# File automatically-generated by tool: [projectgenerator] version: [3.10.0-B14] date: [Sat Oct 24 17:35:54 CEST 2020]
##########################################################################################################################
# ------------------------------------------------
@ -40,7 +40,6 @@ Core/Src/main.c \
Core/Src/stm32f7xx_it.c \
Core/Src/stm32f7xx_hal_msp.c \
Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_cortex.c \
Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_smbus.c \
Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_rcc.c \
Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_rcc_ex.c \
Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_flash.c \
@ -68,7 +67,7 @@ Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_tim.c \
Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_tim_ex.c \
Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_uart.c \
Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_uart_ex.c \
Core/Src/system_stm32f7xx.c
Core/Src/system_stm32f7xx.c
# ASM sources
ASM_SOURCES = \
@ -129,7 +128,7 @@ C_INCLUDES = \
-IDrivers/STM32F7xx_HAL_Driver/Inc \
-IDrivers/STM32F7xx_HAL_Driver/Inc/Legacy \
-IDrivers/CMSIS/Device/ST/STM32F7xx/Include \
-IDrivers/CMSIS/Include \
-IDrivers/CMSIS/Include
-IDrivers/CMSIS/Include
@ -202,4 +201,4 @@ clean:
#######################################
-include $(wildcard $(BUILD_DIR)/*.d)
# *** EOF ***
# *** EOF ***

+ 255
- 200
OtterClock.ioc View File

@ -1,55 +1,67 @@
#MicroXplorer Configuration settings - do not modify
PF7.GPIOParameters=GPIO_Label
PB13.GPIOParameters=GPIO_Label
USART2.IPParameters=VirtualMode-Asynchronous
SPI2.VirtualType=VM_MASTER
PB10.Mode=RGB888
PC12.Locked=true
TIM1.IPParameters=Channel-PWM Generation1 CH1
PG8.Signal=GPIO_Output
PG4.Signal=GPIO_Output
PG4.Signal=GPIO_Input
PG4.Locked=true
PG8.Locked=true
RCC.PLLCLKFreq_Value=120000000
PG0.Locked=true
PC12.Signal=SDMMC1_CK
PA14.GPIO_Label=JTCK_SWCLK
RCC.PLLQCLKFreq_Value=48000000
PG0.Signal=GPIO_Output
PG3.GPIOParameters=GPIO_Label
PC7.Locked=true
PD8.Locked=true
VP_RTC_VS_RTC_Activate.Mode=RTC_Enabled
PC3.Locked=true
PB6.GPIO_Label=QSPI_NCS
PD0.Locked=true
PD4.Locked=true
PD2.GPIOParameters=GPIO_Label
PG14.GPIOParameters=GPIO_Label
SH.S_TIM1_CH1.ConfNb=1
USART1.IPParameters=VirtualMode-Asynchronous
SH.S_TIM4_CH4.ConfNb=1
PB13.Signal=SPI2_SCK
PD6.GPIO_Label=SERIAL1_RX
PG13.Signal=LTDC_R0
PG2.GPIOParameters=GPIO_Label
PinOutPanel.RotationAngle=0
SH.S_TIM11_CH1.ConfNb=1
PF6.GPIO_Label=QSPI_IO3
USART3.VirtualMode-Asynchronous=VM_ASYNC
NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false
PD15.GPIOParameters=GPIO_Label
PA4.Mode=RGB888
PF7.Signal=SPI5_SCK
SH.S_TIM3_CH2.ConfNb=1
PF7.Signal=S_TIM11_CH1
PE2.Mode=Single Bank 1
PD4.Signal=GPIO_Output
PB6.Signal=QUADSPI_BK1_NCS
PC7.Signal=LTDC_G6
PH1/OSC_OUT.Signal=RCC_OSC_OUT
PB6.Mode=Single Bank 1
PC3.Signal=GPIO_Input
PD0.Signal=GPIO_Output
RCC.SAI2Freq_Value=50000000
PD8.Signal=USART3_TX
USART6.VirtualMode-Asynchronous=VM_ASYNC
PE5.Signal=LTDC_G0
PE10.Locked=true
PB13.Locked=true
PE14.Locked=true
RCC.PLLSAIRCLKFreq_Value=50000000
ProjectManager.ProjectBuild=false
TIM4.Channel-PWM\ Generation3\ CH3=TIM_CHANNEL_3
PG13.Locked=true
NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false
PB2.Signal=QUADSPI_CLK
PB3.Mode=JTAG_4_pins
PA8.Locked=true
PA4.Locked=true
PF1.GPIO_Label=I2C1_SCL
PD1.GPIOParameters=GPIO_Label
PD1.GPIO_Label=RGBLED1_G
PB12.GPIO_Label=SPI1_NSS
PG14.Mode=Asynchronous
PH0/OSC_IN.Locked=true
ProjectManager.FirmwarePackage=STM32Cube FW_F7 V1.16.0
MxDb.Version=DB.6.0.0
@ -59,240 +71,252 @@ TIM1.Channel-PWM\ Generation1\ CH1=TIM_CHANNEL_1
PE9.Signal=S_TIM1_CH1
PE9.Locked=true
PH1/OSC_OUT.Locked=true
PG4.GPIO_Label=EXTIO_5
PF10.Locked=true
PF13.Locked=true
PC9.Mode=SD_4_bits_Wide_bus
SPI2.CalculateBaudRate=8.0 MBits/s
SH.S_TIM4_CH2.0=TIM4_CH2,PWM Generation2 CH2
PE2.Signal=QUADSPI_BK1_IO2
PF8.Mode=Full_Duplex_Master
PA8.Signal=LTDC_R6
PF2.Locked=true
PB6.Locked=true
NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false
PC15/OSC32_OUT.Locked=true
PF3.Signal=GPIO_Input
PD3.Mode=RGB888
PE10.Signal=GPIO_Input
ProjectManager.HalAssertFull=false
PC8.GPIOParameters=GPIO_Label
Mcu.Package=LQFP144
PB9.Signal=LTDC_B7
PB1.Signal=GPIO_Input
PA5.Locked=true
SPI2.Mode=SPI_MODE_MASTER
PD11.Locked=true
PD12.Signal=S_TIM4_CH1
PG5.GPIOParameters=GPIO_Label
PA14.Locked=true
PD5.GPIOParameters=GPIO_Label
VP_SYS_VS_Systick.Signal=SYS_VS_Systick
USART3.IPParameters=VirtualMode-Asynchronous
PA10.Signal=USB_OTG_FS_ID
VP_TIM11_VS_ClockSourceINT.Signal=TIM11_VS_ClockSourceINT
PF7.Locked=true
PC11.Mode=SD_4_bits_Wide_bus
SPI5.CalculateBaudRate=8.0 MBits/s
SH.S_TIM4_CH1.0=TIM4_CH1,PWM Generation1 CH1
RCC.CECFreq_Value=32786.88524590164
PF14.Signal=I2C4_SCL
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false
PF10.Mode=RGB888
PB13.Mode=Full_Duplex_Master
PE6.Locked=true
TIM4.Channel-PWM\ Generation4\ CH4=TIM_CHANNEL_4
PD5.Locked=true
PD15.Signal=GPIO_Input
SPI5.VirtualType=VM_MASTER
PD15.Signal=S_TIM4_CH4
ProjectManager.CustomerFirmwarePackage=
RCC.PLLSAIQCLKFreq_Value=50000000
PA5.Mode=RGB888
PG12.Signal=LTDC_B1
PE12.Mode=RGB888
Mcu.Pin80=PA12
SH.S_TIM4_CH1.ConfNb=1
Mcu.Pin81=PA13
PD6.GPIOParameters=GPIO_Label
Mcu.Pin80=PB4
Mcu.Pin81=PB5
PA0/WKUP.GPIOParameters=GPIO_Label
RCC.PLLQoutputFreq_Value=48000000
ProjectManager.ProjectFileName=OtterClock.ioc
Mcu.Pin79=PA11
Mcu.PinsNb=108
Mcu.Pin73=PC7
Mcu.Pin79=PB3
PD9.GPIO_Label=SERIAL2_RX
PA15.GPIOParameters=GPIO_Label
Mcu.PinsNb=89
PC11.Locked=true
Mcu.Pin74=PC8
Mcu.Pin71=PG8
Mcu.Pin72=PC6
Mcu.Pin73=PG9
Mcu.Pin74=PG10
Mcu.Pin71=PD5
Mcu.Pin72=PD6
PG5.Locked=true
Mcu.Pin77=PA9
PG9.Locked=true
PG5.Signal=GPIO_Output
Mcu.Pin78=PA10
Mcu.Pin75=PC9
PG9.Signal=GPIO_Output
Mcu.Pin76=PA8
Mcu.Pin77=PG13
PG5.Signal=GPIO_Input
Mcu.Pin78=PG14
PG9.Signal=USART6_RX
Mcu.Pin75=PG11
PA9.GPIO_Label=USB_VBUS
PG3.Locked=true
Mcu.Pin76=PG12
PD3.Signal=LTDC_G7
Mcu.Pin70=PG7
Mcu.Pin70=PD4
PG9.Mode=Asynchronous
PC6.Signal=LTDC_HSYNC
PC2.Signal=SPI2_MISO
PD1.Signal=GPIO_Output
Mcu.Pin68=PG5
Mcu.Pin69=PG6
PA11.GPIO_Label=USB0_DM
PF14.GPIO_Label=BAT_SCL
Mcu.Pin68=PD2
Mcu.Pin69=PD3
PC0.Signal=LTDC_R5
PB14.Locked=true
PC11.GPIOParameters=GPIO_Label
PD6.Mode=Asynchronous
Mcu.Pin62=PD12
PF13.GPIO_Label=BAT_INT
Mcu.Pin62=PA15
PG14.Locked=true
Mcu.Pin63=PD14
Mcu.Pin60=PD9
Mcu.Pin61=PD11
Mcu.Pin66=PG3
Mcu.Pin67=PG4
Mcu.Pin64=PD15
Mcu.Pin65=PG2
Mcu.Pin63=PC10
Mcu.Pin60=PA13
Mcu.Pin61=PA14
Mcu.Pin66=PD0
Mcu.Pin67=PD1
Mcu.Pin64=PC11
Mcu.Pin65=PC12
PG10.Signal=LTDC_B2
PG10.Locked=true
PA3.Mode=RGB888
PF1.Mode=SMBus-Alert-mode
PF11.Mode=Full_Duplex_Master
PF1.Mode=I2C
PA11.Locked=true
PA15.Locked=true
Mcu.Pin59=PD8
Mcu.Pin57=PB14
Mcu.Pin58=PB15
Mcu.Pin59=PA12
Mcu.Pin57=PA10
Mcu.Pin58=PA11
PB11.Mode=RGB888
TIM4.IPParameters=Channel-PWM Generation1 CH1
Mcu.Pin51=PE14
Mcu.Pin52=PE15
Mcu.Pin50=PE13
Mcu.Pin55=PB12
TIM4.IPParameters=Channel-PWM Generation3 CH3,Channel-PWM Generation4 CH4,Channel-PWM Generation2 CH2
Mcu.Pin51=PC6
Mcu.Pin52=PC7
Mcu.Pin50=PG7
PC6.Mode=RGB888
Mcu.Pin56=PB13
Mcu.Pin53=PB10
Mcu.Pin54=PB11
Mcu.Pin55=PA8
Mcu.Pin56=PA9
Mcu.Pin53=PC8
PE8.GPIO_Label=LCD_TOUCH_RST
Mcu.Pin54=PC9
PC6.Locked=true
PA9.Signal=USART1_TX
PA9.Signal=USB_OTG_FS_VBUS
PB5.Locked=true
PB9.Locked=true
PD8.Mode=Asynchronous
Mcu.Pin48=PE11
Mcu.Pin49=PE12
Mcu.Pin46=PE9
Mcu.Pin47=PE10
PE9.GPIO_Label=BZZZ(PWM)
Mcu.Pin48=PG4
Mcu.Pin49=PG5
Mcu.Pin46=PG2
Mcu.Pin47=PG3
PA0/WKUP.Mode=SYS_WakeUp0
PB10.Signal=LTDC_G4
PB14.Signal=GPIO_Input
PA5.Signal=LTDC_R4
Mcu.Pin40=PF14
Mcu.Pin41=PF15
Mcu.Pin44=PE7
Mcu.Pin40=PB13
Mcu.Pin41=PD8
Mcu.Pin44=PD14
PC12.Mode=SD_4_bits_Wide_bus
Mcu.Pin45=PE8
Mcu.Pin42=PG0
Mcu.Pin43=PG1
Mcu.Pin45=PD15
Mcu.Pin42=PD9
Mcu.Pin43=PD11
ProjectManager.LastFirmware=true
PA1.Mode=RGB888
PE14.Signal=GPIO_Input
PE6.Mode=RGB888
PE15.Signal=LTDC_R7
Mcu.Pin37=PF11
Mcu.Pin38=PF12
Mcu.Pin35=PB1
Mcu.Pin37=PB10
PB4.GPIO_Label=RGBLED1_R
Mcu.Pin38=PB11
Mcu.Pin35=PE12
PE8.Signal=GPIO_Output
Mcu.Pin36=PB2
Mcu.Pin36=PE15