commit for SPI1 config, working on 32 Mbit/s speed with low clock polarity (CPOL) and first edge clock phase (CPHA); PB3 has now been set as SPI1_CS pin with named user label, working on push pull mode.

This commit is contained in:
2026-09-14 10:27:29 +08:00
parent 23eb7b4e27
commit 1f6822dcbe
14 changed files with 8073 additions and 21 deletions
+15
View File
@@ -60,6 +60,7 @@ extern DMA_HandleTypeDef hdma_i2c1_rx;
extern DMA_HandleTypeDef hdma_i2c2_tx;
extern I2C_HandleTypeDef hi2c1;
extern I2C_HandleTypeDef hi2c2;
extern SPI_HandleTypeDef hspi1;
extern DMA_HandleTypeDef hdma_usart2_rx;
extern DMA_HandleTypeDef hdma_usart2_tx;
extern UART_HandleTypeDef huart2;
@@ -251,6 +252,20 @@ void I2C2_IRQHandler(void)
/* USER CODE END I2C2_IRQn 1 */
}
/**
* @brief This function handles SPI1 global interrupt.
*/
void SPI1_IRQHandler(void)
{
/* USER CODE BEGIN SPI1_IRQn 0 */
/* USER CODE END SPI1_IRQn 0 */
HAL_SPI_IRQHandler(&hspi1);
/* USER CODE BEGIN SPI1_IRQn 1 */
/* USER CODE END SPI1_IRQn 1 */
}
/**
* @brief This function handles USART2 global interrupt / USART2 wake-up interrupt through EXTI line 26.
*/