作者 黄文协

本地路径更新

正在显示 54 个修改的文件 包含 106 行增加10 行删除
... ... @@ -21,7 +21,12 @@
#include "adc.h"
/* USER CODE BEGIN 0 */
/**
PA0 ==> ADC1_IN0
PA1 ==> ADC1_IN1
*/
/* USER CODE END 0 */
/* ADC1 init function */
... ...
... ... @@ -14,11 +14,11 @@ ADC : LL库,ADC + DMA 双路采样.使用 DMA循环模式,在任务中获取 ADC的值
引脚
USART1 :
USART1 : 通信串口 + DMA
PB3 ==> TX
PB7 ==> RX
USART2 :
USART2 : 调试串口
PA2 ==> TX
PA3 ==> RX
... ... @@ -30,3 +30,38 @@ PWM :
PA4 ==> TIM14_CH1
PA6 ==> TIM3_CH1
PA7 ==> TIM3_CH2
ADC配置 注意信息
在使用 CubeMX 配置 ADC时,
1:
Sequencer 选择 Sequencer set to fully configurable 的话,
Scan Conversion Mode 只有 Disable 可以选, 要想 Enable, 需要先将
Number Of Conversion 选择一个大于 1 的数,才有 Enable 选项
2:
Continuous Conversion Mode 与 Discontinuous Conversion Mode 这两个选项的配置是相斥的,
Continuous Conversion Mode 如果想 Enable,需要将 Discontinuous Conversion Mode 配置为 Disbale
... ...
... ... @@ -27,7 +27,63 @@ Project File Date: 02/13/2025
<h2>Output:</h2>
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'STM32G0_ProjectBase'
"STM32G0_ProjectBase\STM32G0_ProjectBase.axf" - 0 Error(s), 0 Warning(s).
compiling stm32g0xx_it.c...
compiling gpio.c...
compiling dma.c...
compiling adc.c...
compiling tim.c...
compiling main.c...
compiling app_freertos.c...
../Core/Src/app_freertos.c(111): warning: #550-D: variable "adc_1" was set but never used
float adc_1,adc_2;
../Core/Src/app_freertos.c(111): warning: #550-D: variable "adc_2" was set but never used
float adc_1,adc_2;
../Core/Src/app_freertos.c: 2 warnings, 0 errors
compiling usart.c...
compiling stm32g0xx_hal_timebase_tim.c...
compiling stm32g0xx_ll_exti.c...
compiling stm32g0xx_ll_dma.c...
compiling stm32g0xx_ll_rcc.c...
compiling stm32g0xx_ll_gpio.c...
compiling stm32g0xx_ll_utils.c...
compiling stm32g0xx_ll_adc.c...
compiling stm32g0xx_hal_msp.c...
compiling stm32g0xx_hal_flash_ex.c...
compiling stm32g0xx_hal_gpio.c...
compiling stm32g0xx_hal_rcc_ex.c...
compiling stm32g0xx_hal_flash.c...
compiling stm32g0xx_hal_dma_ex.c...
compiling stm32g0xx_hal_rcc.c...
compiling stm32g0xx_hal_dma.c...
compiling stm32g0xx_hal_pwr.c...
compiling stm32g0xx_hal_cortex.c...
compiling stm32g0xx_hal.c...
compiling stm32g0xx_hal_exti.c...
compiling stm32g0xx_hal_pwr_ex.c...
compiling croutine.c...
compiling event_groups.c...
compiling list.c...
compiling stm32g0xx_hal_tim_ex.c...
compiling stm32g0xx_ll_tim.c...
compiling stream_buffer.c...
compiling queue.c...
compiling timers.c...
compiling tasks.c...
compiling heap_4.c...
compiling port.c...
compiling stm32g0xx_hal_tim.c...
compiling cmsis_os.c...
compiling stm32g0xx_ll_usart.c...
compiling system_stm32g0xx.c...
compiling uart_dma.c...
compiling adc_dma.c...
..\Core\User\bsp\adc_dma.c(26): warning: #940-D: missing return statement at end of non-void function "Adc_Dma_Initialize"
}
..\Core\User\bsp\adc_dma.c: 1 warning, 0 errors
linking...
Program Size: Code=8768 RO-data=440 RW-data=132 ZI-data=4924
FromELF: creating hex file...
"STM32G0_ProjectBase\STM32G0_ProjectBase.axf" - 0 Error(s), 3 Warning(s).
<h2>Software Packages used:</h2>
... ... @@ -50,7 +106,7 @@ Package Vendor: Keil
<h2>Collection of Component Files used:</h2>
* Component: ARM::CMSIS:CORE:5.1.1
Build Time Elapsed: 00:00:00
Build Time Elapsed: 00:00:13
</pre>
</body>
</html>
... ...
... ... @@ -3,7 +3,7 @@
<title>Static Call Graph - [STM32G0_ProjectBase\STM32G0_ProjectBase.axf]</title></head>
<body><HR>
<H1>Static Call Graph for image STM32G0_ProjectBase\STM32G0_ProjectBase.axf</H1><HR>
<BR><P>#&#060CALLGRAPH&#062# ARM Linker, 5060750: Last Updated: Thu Feb 13 16:30:46 2025
<BR><P>#&#060CALLGRAPH&#062# ARM Linker, 5060750: Last Updated: Thu Feb 13 17:44:15 2025
<BR><P>
<H3>Maximum Stack Usage = 176 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3>
Call chain for Maximum Stack Depth:</H3>
... ...
... ... @@ -1344,7 +1344,7 @@ I (../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM0/portmacro.h)
I (../Middlewares/Third_Party/FreeRTOS/Source/include/mpu_wrappers.h)(0x63BD47F4)
I (../Middlewares/Third_Party/FreeRTOS/Source/include/task.h)(0x63BD47F4)
I (../Middlewares/Third_Party/FreeRTOS/Source/include/list.h)(0x63BD47F4)
F (../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM0/port.c)(0x63BD47F4)(--c99 -c --cpu Cortex-M0+ -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Core/Inc -I ../Drivers/STM32G0xx_HAL_Driver/Inc -I ../Drivers/STM32G0xx_HAL_Driver/Inc/Legacy -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM0 -I ../Drivers/CMSIS/Device/ST/STM32G0xx/Include -I ../Drivers/CMSIS/Include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS -I ..\Core\User\bsp -I.\RTE\_STM32G0_ProjectBase -IC:\Keil_v5\ARM\PACK\ARM\CMSIS\5.3.0\CMSIS\Include -IC:\Keil_v5\ARM\PACK\Keil\STM32G0xx_DFP\1.3.0\Drivers\CMSIS\Device\ST\STM32G0xx\Include -D__UVISION_VERSION="525" -D_RTE_ -DSTM32G030xx -DUSE_FULL_LL_DRIVER -DSTM32G030xx -DUSE_HAL_DRIVER -o stm32g0_projectbase\port.o --omf_browse stm32g0_projectbase\port.crf --depend stm32g0_projectbase\port.d)
F (../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM0/port.c)(0x67ADBEC0)(--c99 -c --cpu Cortex-M0+ -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Core/Inc -I ../Drivers/STM32G0xx_HAL_Driver/Inc -I ../Drivers/STM32G0xx_HAL_Driver/Inc/Legacy -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM0 -I ../Drivers/CMSIS/Device/ST/STM32G0xx/Include -I ../Drivers/CMSIS/Include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS -I ..\Core\User\bsp -I.\RTE\_STM32G0_ProjectBase -IC:\Keil_v5\ARM\PACK\ARM\CMSIS\5.3.0\CMSIS\Include -IC:\Keil_v5\ARM\PACK\Keil\STM32G0xx_DFP\1.3.0\Drivers\CMSIS\Device\ST\STM32G0xx\Include -D__UVISION_VERSION="525" -D_RTE_ -DSTM32G030xx -DUSE_FULL_LL_DRIVER -DSTM32G030xx -DUSE_HAL_DRIVER -o stm32g0_projectbase\port.o --omf_browse stm32g0_projectbase\port.crf --depend stm32g0_projectbase\port.d)
I (../Middlewares/Third_Party/FreeRTOS/Source/include/FreeRTOS.h)(0x63BD47F4)
I (C:\Keil_v5\ARM\ARMCC\include\stddef.h)(0x599ECD2C)
I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x599ECD2E)
... ... @@ -1446,4 +1446,4 @@ I (../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_ll_pwr.h)(0x63BD4801)
I (../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_ll_tim.h)(0x63BD4801)
I (../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_ll_usart.h)(0x63BD4801)
I (../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_ll_gpio.h)(0x63BD4801)
F (..\Core\User\info.txt)(0x67ADB76A)()
F (..\Core\User\info.txt)(0x67ADBE5D)()
... ...
# 本地路径
D:\PSDK\psdk3.9.2\T60
D:\test_prj\STM32G0_ProjectBase
# 配置信息
... ... @@ -10,11 +10,11 @@ MCU : STM32G030F6P6
引脚
USART1 :
USART1 : 通信串口 + DMA
PB3 ==> TX
PB7 ==> RX
USART2 :
USART2 : 调试串口
PA2 ==> TX
PA3 ==> RX
... ...