正在显示
54 个修改的文件
包含
106 行增加
和
10 行删除
@@ -21,7 +21,12 @@ | @@ -21,7 +21,12 @@ | ||
21 | #include "adc.h" | 21 | #include "adc.h" |
22 | 22 | ||
23 | /* USER CODE BEGIN 0 */ | 23 | /* USER CODE BEGIN 0 */ |
24 | +/** | ||
25 | + | ||
26 | + PA0 ==> ADC1_IN0 | ||
27 | + PA1 ==> ADC1_IN1 | ||
24 | 28 | ||
29 | +*/ | ||
25 | /* USER CODE END 0 */ | 30 | /* USER CODE END 0 */ |
26 | 31 | ||
27 | /* ADC1 init function */ | 32 | /* ADC1 init function */ |
@@ -14,11 +14,11 @@ ADC : LL库,ADC + DMA 双路采样.使用 DMA循环模式,在任务中获取 ADC的值 | @@ -14,11 +14,11 @@ ADC : LL库,ADC + DMA 双路采样.使用 DMA循环模式,在任务中获取 ADC的值 | ||
14 | 14 | ||
15 | 引脚 | 15 | 引脚 |
16 | 16 | ||
17 | -USART1 : | 17 | +USART1 : 通信串口 + DMA |
18 | PB3 ==> TX | 18 | PB3 ==> TX |
19 | PB7 ==> RX | 19 | PB7 ==> RX |
20 | 20 | ||
21 | -USART2 : | 21 | +USART2 : 调试串口 |
22 | PA2 ==> TX | 22 | PA2 ==> TX |
23 | PA3 ==> RX | 23 | PA3 ==> RX |
24 | 24 | ||
@@ -30,3 +30,38 @@ PWM : | @@ -30,3 +30,38 @@ PWM : | ||
30 | PA4 ==> TIM14_CH1 | 30 | PA4 ==> TIM14_CH1 |
31 | PA6 ==> TIM3_CH1 | 31 | PA6 ==> TIM3_CH1 |
32 | PA7 ==> TIM3_CH2 | 32 | PA7 ==> TIM3_CH2 |
33 | + | ||
34 | + | ||
35 | + | ||
36 | +ADC配置 注意信息 | ||
37 | + | ||
38 | +在使用 CubeMX 配置 ADC时, | ||
39 | +1: | ||
40 | +Sequencer 选择 Sequencer set to fully configurable 的话, | ||
41 | +Scan Conversion Mode 只有 Disable 可以选, 要想 Enable, 需要先将 | ||
42 | +Number Of Conversion 选择一个大于 1 的数,才有 Enable 选项 | ||
43 | + | ||
44 | +2: | ||
45 | +Continuous Conversion Mode 与 Discontinuous Conversion Mode 这两个选项的配置是相斥的, | ||
46 | +Continuous Conversion Mode 如果想 Enable,需要将 Discontinuous Conversion Mode 配置为 Disbale | ||
47 | + | ||
48 | + | ||
49 | + | ||
50 | + | ||
51 | + | ||
52 | + | ||
53 | + | ||
54 | + | ||
55 | + | ||
56 | + | ||
57 | + | ||
58 | + | ||
59 | + | ||
60 | + | ||
61 | + | ||
62 | + | ||
63 | + | ||
64 | + | ||
65 | + | ||
66 | + | ||
67 | + |
此 diff 太大无法显示。
@@ -27,7 +27,63 @@ Project File Date: 02/13/2025 | @@ -27,7 +27,63 @@ Project File Date: 02/13/2025 | ||
27 | <h2>Output:</h2> | 27 | <h2>Output:</h2> |
28 | *** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin' | 28 | *** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin' |
29 | Build target 'STM32G0_ProjectBase' | 29 | Build target 'STM32G0_ProjectBase' |
30 | -"STM32G0_ProjectBase\STM32G0_ProjectBase.axf" - 0 Error(s), 0 Warning(s). | 30 | +compiling stm32g0xx_it.c... |
31 | +compiling gpio.c... | ||
32 | +compiling dma.c... | ||
33 | +compiling adc.c... | ||
34 | +compiling tim.c... | ||
35 | +compiling main.c... | ||
36 | +compiling app_freertos.c... | ||
37 | +../Core/Src/app_freertos.c(111): warning: #550-D: variable "adc_1" was set but never used | ||
38 | + float adc_1,adc_2; | ||
39 | +../Core/Src/app_freertos.c(111): warning: #550-D: variable "adc_2" was set but never used | ||
40 | + float adc_1,adc_2; | ||
41 | +../Core/Src/app_freertos.c: 2 warnings, 0 errors | ||
42 | +compiling usart.c... | ||
43 | +compiling stm32g0xx_hal_timebase_tim.c... | ||
44 | +compiling stm32g0xx_ll_exti.c... | ||
45 | +compiling stm32g0xx_ll_dma.c... | ||
46 | +compiling stm32g0xx_ll_rcc.c... | ||
47 | +compiling stm32g0xx_ll_gpio.c... | ||
48 | +compiling stm32g0xx_ll_utils.c... | ||
49 | +compiling stm32g0xx_ll_adc.c... | ||
50 | +compiling stm32g0xx_hal_msp.c... | ||
51 | +compiling stm32g0xx_hal_flash_ex.c... | ||
52 | +compiling stm32g0xx_hal_gpio.c... | ||
53 | +compiling stm32g0xx_hal_rcc_ex.c... | ||
54 | +compiling stm32g0xx_hal_flash.c... | ||
55 | +compiling stm32g0xx_hal_dma_ex.c... | ||
56 | +compiling stm32g0xx_hal_rcc.c... | ||
57 | +compiling stm32g0xx_hal_dma.c... | ||
58 | +compiling stm32g0xx_hal_pwr.c... | ||
59 | +compiling stm32g0xx_hal_cortex.c... | ||
60 | +compiling stm32g0xx_hal.c... | ||
61 | +compiling stm32g0xx_hal_exti.c... | ||
62 | +compiling stm32g0xx_hal_pwr_ex.c... | ||
63 | +compiling croutine.c... | ||
64 | +compiling event_groups.c... | ||
65 | +compiling list.c... | ||
66 | +compiling stm32g0xx_hal_tim_ex.c... | ||
67 | +compiling stm32g0xx_ll_tim.c... | ||
68 | +compiling stream_buffer.c... | ||
69 | +compiling queue.c... | ||
70 | +compiling timers.c... | ||
71 | +compiling tasks.c... | ||
72 | +compiling heap_4.c... | ||
73 | +compiling port.c... | ||
74 | +compiling stm32g0xx_hal_tim.c... | ||
75 | +compiling cmsis_os.c... | ||
76 | +compiling stm32g0xx_ll_usart.c... | ||
77 | +compiling system_stm32g0xx.c... | ||
78 | +compiling uart_dma.c... | ||
79 | +compiling adc_dma.c... | ||
80 | +..\Core\User\bsp\adc_dma.c(26): warning: #940-D: missing return statement at end of non-void function "Adc_Dma_Initialize" | ||
81 | + } | ||
82 | +..\Core\User\bsp\adc_dma.c: 1 warning, 0 errors | ||
83 | +linking... | ||
84 | +Program Size: Code=8768 RO-data=440 RW-data=132 ZI-data=4924 | ||
85 | +FromELF: creating hex file... | ||
86 | +"STM32G0_ProjectBase\STM32G0_ProjectBase.axf" - 0 Error(s), 3 Warning(s). | ||
31 | 87 | ||
32 | <h2>Software Packages used:</h2> | 88 | <h2>Software Packages used:</h2> |
33 | 89 | ||
@@ -50,7 +106,7 @@ Package Vendor: Keil | @@ -50,7 +106,7 @@ Package Vendor: Keil | ||
50 | <h2>Collection of Component Files used:</h2> | 106 | <h2>Collection of Component Files used:</h2> |
51 | 107 | ||
52 | * Component: ARM::CMSIS:CORE:5.1.1 | 108 | * Component: ARM::CMSIS:CORE:5.1.1 |
53 | -Build Time Elapsed: 00:00:00 | 109 | +Build Time Elapsed: 00:00:13 |
54 | </pre> | 110 | </pre> |
55 | </body> | 111 | </body> |
56 | </html> | 112 | </html> |
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | <title>Static Call Graph - [STM32G0_ProjectBase\STM32G0_ProjectBase.axf]</title></head> | 3 | <title>Static Call Graph - [STM32G0_ProjectBase\STM32G0_ProjectBase.axf]</title></head> |
4 | <body><HR> | 4 | <body><HR> |
5 | <H1>Static Call Graph for image STM32G0_ProjectBase\STM32G0_ProjectBase.axf</H1><HR> | 5 | <H1>Static Call Graph for image STM32G0_ProjectBase\STM32G0_ProjectBase.axf</H1><HR> |
6 | -<BR><P>#<CALLGRAPH># ARM Linker, 5060750: Last Updated: Thu Feb 13 16:30:46 2025 | 6 | +<BR><P>#<CALLGRAPH># ARM Linker, 5060750: Last Updated: Thu Feb 13 17:44:15 2025 |
7 | <BR><P> | 7 | <BR><P> |
8 | <H3>Maximum Stack Usage = 176 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3> | 8 | <H3>Maximum Stack Usage = 176 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3> |
9 | Call chain for Maximum Stack Depth:</H3> | 9 | Call chain for Maximum Stack Depth:</H3> |
@@ -1344,7 +1344,7 @@ I (../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM0/portmacro.h) | @@ -1344,7 +1344,7 @@ I (../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM0/portmacro.h) | ||
1344 | I (../Middlewares/Third_Party/FreeRTOS/Source/include/mpu_wrappers.h)(0x63BD47F4) | 1344 | I (../Middlewares/Third_Party/FreeRTOS/Source/include/mpu_wrappers.h)(0x63BD47F4) |
1345 | I (../Middlewares/Third_Party/FreeRTOS/Source/include/task.h)(0x63BD47F4) | 1345 | I (../Middlewares/Third_Party/FreeRTOS/Source/include/task.h)(0x63BD47F4) |
1346 | I (../Middlewares/Third_Party/FreeRTOS/Source/include/list.h)(0x63BD47F4) | 1346 | I (../Middlewares/Third_Party/FreeRTOS/Source/include/list.h)(0x63BD47F4) |
1347 | -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) | 1347 | +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) |
1348 | I (../Middlewares/Third_Party/FreeRTOS/Source/include/FreeRTOS.h)(0x63BD47F4) | 1348 | I (../Middlewares/Third_Party/FreeRTOS/Source/include/FreeRTOS.h)(0x63BD47F4) |
1349 | I (C:\Keil_v5\ARM\ARMCC\include\stddef.h)(0x599ECD2C) | 1349 | I (C:\Keil_v5\ARM\ARMCC\include\stddef.h)(0x599ECD2C) |
1350 | I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x599ECD2E) | 1350 | 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) | @@ -1446,4 +1446,4 @@ I (../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_ll_pwr.h)(0x63BD4801) | ||
1446 | I (../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_ll_tim.h)(0x63BD4801) | 1446 | I (../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_ll_tim.h)(0x63BD4801) |
1447 | I (../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_ll_usart.h)(0x63BD4801) | 1447 | I (../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_ll_usart.h)(0x63BD4801) |
1448 | I (../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_ll_gpio.h)(0x63BD4801) | 1448 | I (../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_ll_gpio.h)(0x63BD4801) |
1449 | -F (..\Core\User\info.txt)(0x67ADB76A)() | 1449 | +F (..\Core\User\info.txt)(0x67ADBE5D)() |
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
1 | # 本地路径 | 1 | # 本地路径 |
2 | 2 | ||
3 | -D:\PSDK\psdk3.9.2\T60 | 3 | +D:\test_prj\STM32G0_ProjectBase |
4 | 4 | ||
5 | # 配置信息 | 5 | # 配置信息 |
6 | 6 | ||
@@ -10,11 +10,11 @@ MCU : STM32G030F6P6 | @@ -10,11 +10,11 @@ MCU : STM32G030F6P6 | ||
10 | 10 | ||
11 | 引脚 | 11 | 引脚 |
12 | 12 | ||
13 | -USART1 : | 13 | +USART1 : 通信串口 + DMA |
14 | PB3 ==> TX | 14 | PB3 ==> TX |
15 | PB7 ==> RX | 15 | PB7 ==> RX |
16 | 16 | ||
17 | -USART2 : | 17 | +USART2 : 调试串口 |
18 | PA2 ==> TX | 18 | PA2 ==> TX |
19 | PA3 ==> RX | 19 | PA3 ==> RX |
20 | 20 |
-
请 注册 或 登录 后发表评论