3.25_433_RX版本:使用cubemx根据项目设计硬件配置完成,且在板卡上运行成功:测试433模块TX模式/RX模式功能正常,符合预期

This commit is contained in:
2026-03-25 17:08:18 +08:00
parent 1c6ff020e9
commit f548593c59
111 changed files with 8928 additions and 5201 deletions

View File

@ -18,7 +18,7 @@
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "tim.h"
#include "spi.h"
#include "usart.h"
#include "gpio.h"
@ -95,7 +95,9 @@ int main(void)
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_USART1_UART_Init();
MX_TIM2_Init();
MX_SPI2_Init();
MX_USART2_UART_Init();
MX_USART3_UART_Init();
/* USER CODE BEGIN 2 */
/* 初始化RF433模块 - 使用默认配置 */
@ -151,7 +153,6 @@ void SystemClock_Config(void)
{
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
RCC_PeriphCLKInitTypeDef PeriphClkInit = {0};
/** Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure.
@ -181,12 +182,6 @@ void SystemClock_Config(void)
{
Error_Handler();
}
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USB;
PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_PLL_DIV1_5;
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)
{
Error_Handler();
}
}
/* USER CODE BEGIN 4 */