没加帮助信息,会爆flash

This commit is contained in:
yxming66 2025-12-08 02:28:40 +08:00
parent 28538d1ed9
commit 8ba7466e02
145 changed files with 10044 additions and 9658 deletions

View File

@ -84,7 +84,7 @@
* (when HSE is used as system clock source, directly or through the PLL).
*/
#if !defined (HSE_VALUE)
#define HSE_VALUE 8000000U /*!< Value of the External oscillator in Hz */
#define HSE_VALUE 16000000U /*!< Value of the External oscillator in Hz */
#endif /* HSE_VALUE */
#if !defined (HSE_STARTUP_TIMEOUT)

View File

@ -60,6 +60,9 @@ void DMA1_Channel5_IRQHandler(void);
void DMA1_Channel6_IRQHandler(void);
void DMA1_Channel7_IRQHandler(void);
void EXTI9_5_IRQHandler(void);
void SPI1_IRQHandler(void);
void SPI2_IRQHandler(void);
void USART1_IRQHandler(void);
void USART2_IRQHandler(void);
void EXTI15_10_IRQHandler(void);
/* USER CODE BEGIN EFP */

View File

@ -141,7 +141,7 @@ void SystemClock_Config(void)
*/
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
RCC_OscInitStruct.HSEPredivValue = RCC_HSE_PREDIV_DIV1;
RCC_OscInitStruct.HSEPredivValue = RCC_HSE_PREDIV_DIV2;
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;

View File

@ -156,6 +156,9 @@ void HAL_SPI_MspInit(SPI_HandleTypeDef* spiHandle)
__HAL_LINKDMA(spiHandle,hdmarx,hdma_spi1_rx);
/* SPI1 interrupt Init */
HAL_NVIC_SetPriority(SPI1_IRQn, 5, 0);
HAL_NVIC_EnableIRQ(SPI1_IRQn);
/* USER CODE BEGIN SPI1_MspInit 1 */
/* USER CODE END SPI1_MspInit 1 */
@ -195,6 +198,9 @@ void HAL_SPI_MspInit(SPI_HandleTypeDef* spiHandle)
__HAL_LINKDMA(spiHandle,hdmatx,hdma_spi2_tx);
/* SPI2 interrupt Init */
HAL_NVIC_SetPriority(SPI2_IRQn, 5, 0);
HAL_NVIC_EnableIRQ(SPI2_IRQn);
/* USER CODE BEGIN SPI2_MspInit 1 */
/* USER CODE END SPI2_MspInit 1 */
@ -222,6 +228,9 @@ void HAL_SPI_MspDeInit(SPI_HandleTypeDef* spiHandle)
/* SPI1 DMA DeInit */
HAL_DMA_DeInit(spiHandle->hdmatx);
HAL_DMA_DeInit(spiHandle->hdmarx);
/* SPI1 interrupt Deinit */
HAL_NVIC_DisableIRQ(SPI1_IRQn);
/* USER CODE BEGIN SPI1_MspDeInit 1 */
/* USER CODE END SPI1_MspDeInit 1 */
@ -242,6 +251,9 @@ void HAL_SPI_MspDeInit(SPI_HandleTypeDef* spiHandle)
/* SPI2 DMA DeInit */
HAL_DMA_DeInit(spiHandle->hdmatx);
/* SPI2 interrupt Deinit */
HAL_NVIC_DisableIRQ(SPI2_IRQn);
/* USER CODE BEGIN SPI2_MspDeInit 1 */
/* USER CODE END SPI2_MspDeInit 1 */

View File

@ -60,9 +60,12 @@ extern void USER_UART_IRQHandler(UART_HandleTypeDef *huart);
extern DMA_HandleTypeDef hdma_spi1_tx;
extern DMA_HandleTypeDef hdma_spi1_rx;
extern DMA_HandleTypeDef hdma_spi2_tx;
extern SPI_HandleTypeDef hspi1;
extern SPI_HandleTypeDef hspi2;
extern DMA_HandleTypeDef hdma_usart1_tx;
extern DMA_HandleTypeDef hdma_usart2_rx;
extern DMA_HandleTypeDef hdma_usart2_tx;
extern UART_HandleTypeDef huart1;
extern UART_HandleTypeDef huart2;
/* USER CODE BEGIN EV */
@ -288,6 +291,48 @@ void EXTI9_5_IRQHandler(void)
/* USER CODE END EXTI9_5_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 SPI2 global interrupt.
*/
void SPI2_IRQHandler(void)
{
/* USER CODE BEGIN SPI2_IRQn 0 */
/* USER CODE END SPI2_IRQn 0 */
HAL_SPI_IRQHandler(&hspi2);
/* USER CODE BEGIN SPI2_IRQn 1 */
/* USER CODE END SPI2_IRQn 1 */
}
/**
* @brief This function handles USART1 global interrupt.
*/
void USART1_IRQHandler(void)
{
/* USER CODE BEGIN USART1_IRQn 0 */
/* USER CODE END USART1_IRQn 0 */
HAL_UART_IRQHandler(&huart1);
/* USER CODE BEGIN USART1_IRQn 1 */
/* USER CODE END USART1_IRQn 1 */
}
/**
* @brief This function handles USART2 global interrupt.
*/

View File

@ -50,10 +50,10 @@ void MX_USART1_UART_Init(void)
huart1.Init.WordLength = UART_WORDLENGTH_8B;
huart1.Init.StopBits = UART_STOPBITS_1;
huart1.Init.Parity = UART_PARITY_NONE;
huart1.Init.Mode = UART_MODE_TX;
huart1.Init.Mode = UART_MODE_TX_RX;
huart1.Init.HwFlowCtl = UART_HWCONTROL_NONE;
huart1.Init.OverSampling = UART_OVERSAMPLING_16;
if (HAL_HalfDuplex_Init(&huart1) != HAL_OK)
if (HAL_UART_Init(&huart1) != HAL_OK)
{
Error_Handler();
}
@ -107,12 +107,18 @@ void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle)
__HAL_RCC_GPIOA_CLK_ENABLE();
/**USART1 GPIO Configuration
PA9 ------> USART1_TX
PA10 ------> USART1_RX
*/
GPIO_InitStruct.Pin = GPIO_PIN_9;
GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
GPIO_InitStruct.Pin = GPIO_PIN_10;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
/* USART1 DMA Init */
/* USART1_TX Init */
hdma_usart1_tx.Instance = DMA1_Channel4;
@ -130,6 +136,9 @@ void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle)
__HAL_LINKDMA(uartHandle,hdmatx,hdma_usart1_tx);
/* USART1 interrupt Init */
HAL_NVIC_SetPriority(USART1_IRQn, 5, 0);
HAL_NVIC_EnableIRQ(USART1_IRQn);
/* USER CODE BEGIN USART1_MspInit 1 */
/* USER CODE END USART1_MspInit 1 */
@ -212,11 +221,15 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* uartHandle)
/**USART1 GPIO Configuration
PA9 ------> USART1_TX
PA10 ------> USART1_RX
*/
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_9);
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_9|GPIO_PIN_10);
/* USART1 DMA DeInit */
HAL_DMA_DeInit(uartHandle->hdmatx);
/* USART1 interrupt Deinit */
HAL_NVIC_DisableIRQ(USART1_IRQn);
/* USER CODE BEGIN USART1_MspDeInit 1 */
/* USER CODE END USART1_MspDeInit 1 */
@ -263,7 +276,7 @@ void USAR_UART2_IDLECallback(UART_HandleTypeDef *huart)
HAL_UART_Transmit(huart, uart_buffer, uart2_datalength, 0x200); // 回显/打印接收数据
printf("\r\n");
strcpy((char*)uart2_data,(char*)uart_buffer);
strcpy((char*)uart2_data,(char*)uart_buffer);
memset(uart_buffer, 0, uart2_datalength); // 清空已读数据
HAL_UART_Receive_DMA(huart, (uint8_t*)uart_buffer, 255); // 重启 DMA 接收

File diff suppressed because one or more lines are too long

View File

@ -26,7 +26,7 @@
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<TargetOption>
<CLKADS>8000000</CLKADS>
<CLKADS>16000000</CLKADS>
<OPTTT>
<gFlags>1</gFlags>
<BeepAtEnd>1</BeepAtEnd>
@ -183,14 +183,36 @@
<Ww>
<count>6</count>
<WinNumber>1</WinNumber>
<ItemText>robot_config,0x0A</ItemText>
<ItemText>robot_config,0x10</ItemText>
</Ww>
<Ww>
<count>7</count>
<WinNumber>1</WinNumber>
<ItemText>txbuffer,0x0A</ItemText>
</Ww>
<Ww>
<count>8</count>
<WinNumber>1</WinNumber>
<ItemText>tmp,0x0A</ItemText>
</Ww>
</WatchWindow1>
<WatchWindow2>
<Ww>
<count>0</count>
<WinNumber>2</WinNumber>
<ItemText>uart2_datalength,0x0A</ItemText>
</Ww>
<Ww>
<count>1</count>
<WinNumber>2</WinNumber>
<ItemText>uart2_data,0x0A</ItemText>
</Ww>
<Ww>
<count>2</count>
<WinNumber>2</WinNumber>
<ItemText>UART2_IdleFlag</ItemText>
</Ww>
</WatchWindow2>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
@ -382,7 +404,7 @@
<Group>
<GroupName>Drivers/STM32F1xx_HAL_Driver</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
@ -858,7 +880,7 @@
<Group>
<GroupName>User/device</GroupName>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>

View File

@ -81,7 +81,7 @@
</BeforeMake>
<AfterMake>
<RunUserProg1>0</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<RunUserProg2>1</RunUserProg2>
<UserProg1Name></UserProg1Name>
<UserProg2Name></UserProg2Name>
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
@ -313,7 +313,7 @@
</ArmAdsMisc>
<Cads>
<interw>1</interw>
<Optim>4</Optim>
<Optim>3</Optim>
<oTime>0</oTime>
<SplitLS>0</SplitLS>
<OneElfS>1</OneElfS>

Binary file not shown.

View File

@ -22,7 +22,7 @@ Dialog DLL: TCM.DLL V1.48.0.0
<h2>Project:</h2>
D:\CUBEMX\MR16\MDK-ARM\MR16.uvprojx
Project File Date: 12/06/2025
Project File Date: 12/07/2025
<h2>Output:</h2>
*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\cangming\ARM\ARMCC\Bin'
@ -30,28 +30,35 @@ Build target 'MR16'
Note: source file '..\User\bsp\gpio.c' - object file renamed from 'MR16\gpio.o' to 'MR16\gpio_1.o'.
Note: source file '..\User\bsp\spi.c' - object file renamed from 'MR16\spi.o' to 'MR16\spi_1.o'.
compiling mr16.c...
../User/module/mr16.h(96): warning: #1-D: last line of file ends without a newline
../User/module/mr16.h(105): warning: #1-D: last line of file ends without a newline
#endif
../User/bsp/time.h(24): warning: #1295-D: Deprecated declaration BSP_TIME_Get_ms - give arg types
uint32_t BSP_TIME_Get_ms();
../User/bsp/time.h(26): warning: #1295-D: Deprecated declaration BSP_TIME_Get_us - give arg types
uint64_t BSP_TIME_Get_us();
../User/bsp/time.h(28): warning: #1295-D: Deprecated declaration BSP_TIME_Get - give arg types
uint64_t BSP_TIME_Get();
../User/bsp/gpio.h(59): warning: #1-D: last line of file ends without a newline
#endif
..\User\module\mr16.c(132): warning: #546-D: transfer of control bypasses initialization of:
variable "RXheader" (declared at line 146)
variable "totalCount" (declared at line 158)
../User/component/user_math.h(179): warning: #1-D: last line of file ends without a newline
/* USER FUNCTION END */
..\User\module\mr16.c(209): warning: #546-D: transfer of control bypasses initialization of:
variable "RXheader" (declared at line 223)
switch (source) {
^
..\User\module\mr16.c(248): warning: #188-D: enumerated type mixed with another type
..\User\module\mr16.c(507): warning: #188-D: enumerated type mixed with another type
LCD_Init(1);
..\User\module\mr16.c(998): warning: #186-D: pointless comparison of unsigned integer with zero
..\User\module\mr16.c(1259): warning: #186-D: pointless comparison of unsigned integer with zero
if (val < 0 || val > 255) { snprintf(pcWriteBuffer, xWriteBufferLen, "Invalid LoRa Preamble (0-255)\r\n"); return pdFALSE; }
..\User\module\mr16.c(81): warning: #177-D: variable "MR16_FSM" was declared but never referenced
..\User\module\mr16.c(94): warning: #177-D: variable "MR16_FSM" was declared but never referenced
static MR16_FSM_t MR16_FSM = MR16_FSM_NONE;
..\User\module\mr16.c(424): warning: #177-D: variable "baudrate_help" was declared but never referenced
..\User\module\mr16.c(748): warning: #177-D: variable "baudrate_help" was declared but never referenced
static const char baudrate_help[] =
..\User\module\mr16.c: 7 warnings, 0 errors
..\User\module\mr16.c: 11 warnings, 0 errors
linking...
Program Size: Code=44640 RO-data=20484 RW-data=272 ZI-data=19984
Program Size: Code=47432 RO-data=10572 RW-data=272 ZI-data=20016
FromELF: creating hex file...
"MR16\MR16.axf" - 0 Error(s), 7 Warning(s).
"MR16\MR16.axf" - 0 Error(s), 11 Warning(s).
<h2>Software Packages used:</h2>
@ -75,7 +82,7 @@ Package Vendor: Keil
* Component: ARM::CMSIS:CORE:5.4.0
Include file: CMSIS\Core\Include\tz_context.h
Build Time Elapsed: 00:00:02
Build Time Elapsed: 00:00:03
</pre>
</body>
</html>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -43,11 +43,15 @@ mr16\mr16.o: D:\cangming\ARM\ARMCC\Bin\..\include\stdio.h
mr16\mr16.o: D:\cangming\ARM\ARMCC\Bin\..\include\stdlib.h
mr16\mr16.o: ../User/bsp/flash.h
mr16\mr16.o: ../User/bsp/bsp.h
mr16\mr16.o: ../User/bsp/time.h
mr16\mr16.o: ../User/device/sx1281_driver/radio.h
mr16\mr16.o: ../User/device/lcd_driver/lcd.h
mr16\mr16.o: ../User/bsp/spi.h
mr16\mr16.o: ../Core/Inc/spi.h
mr16\mr16.o: ../User/bsp/gpio.h
mr16\mr16.o: ../User/component/crc16.h
mr16\mr16.o: ../User/component/user_math.h
mr16\mr16.o: D:\cangming\ARM\ARMCC\Bin\..\include\float.h
mr16\mr16.o: ../User/component/FreeRTOS_CLI.h
mr16\mr16.o: ../Middlewares/Third_Party/FreeRTOS/Source/include/FreeRTOS.h
mr16\mr16.o: ../Core/Inc/FreeRTOSConfig.h

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More