添加了adc DMA 接收,暂存

This commit is contained in:
小马_666 2024-09-14 09:18:45 +08:00
parent 6b8a2a8c24
commit d6d10cae75
17 changed files with 6067 additions and 5973 deletions

Binary file not shown.

View File

@ -27,24 +27,24 @@ Project File Date: 09/09/2024
<h2>Output:</h2>
*** Using Compiler 'V6.21', folder: 'C:\Keil_v5\ARM\ARMCLANG\Bin'
Build target 'USART1_Interrupt'
compiling slab.c...
compiling idle.c...
compiling cpu.c...
compiling bsp_button.c...
compiling slab.c...
compiling bsp_io_dev.c...
compiling idle.c...
compiling bsp_adc.c...
compiling bsp_flash.c...
compiling ipc.c...
linking...
Program Size: Code=33058 RO-data=7742 RW-data=144 ZI-data=11704
Program Size: Code=33458 RO-data=7742 RW-data=144 ZI-data=11760
FromELF: creating hex file...
After Build - User command #1: "D:\SXDT\Official_information\HDDZ\demo\CIU32_L051_PROJECT\USART1_Interrupt - RT-Thread\keil5_disp_size_bar\keil5_disp_size_bar.exe"
ram:
RW_IRAM1 :0x20000000
16.00 KB :|¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö______| 72.31 % ( 11.57 KB / 16.00 KB) [4536 B]
16.00 KB :|¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö______| 72.66 % ( 11.62 KB / 16.00 KB) [4480 B]
flash:
ER_IROM1 :0x8000000
64.00 KB :|¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö________| 62.26 % ( 39.84 KB / 64.00 KB) [24736 B]
64.00 KB :|¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö________| 62.87 % ( 40.23 KB / 64.00 KB) [24336 B]
".\CIU32_L051_M307R.axf" - 0 Error(s), 0 Warning(s).
<h2>Software Packages used:</h2>

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.

View File

@ -93,8 +93,8 @@
<flags>2</flags>
<showCmd>3</showCmd>
<MinPosition>
<xPos>-1</xPos>
<yPos>-1</yPos>
<xPos>-32000</xPos>
<yPos>-32000</yPos>
</MinPosition>
<MaxPosition>
<xPos>-1</xPos>

View File

@ -296,7 +296,7 @@ I (..\RTOS\components\drivers\inc\dev_pin.h)(0x66D9591B)
I (..\RTOS\components\finsh\finsh_api.hi.\LIB\agile_led\agile_led.h)(0x00000000)
I (..\RTOS\components\utilities\ulog\ulog.h)(0x66D94573)
I (..\RTOS\components\utilities\ulog\ulog_def.h)(0x666E44C6)
F (..\bsp\src\bsp_adc.c)(0x66E4DC78)(-xc -std=gnu99 --target=arm-arm-none-eabi -mcpu=cortex-m0plus -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -Oz -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../RTOS/inc -I ../RTOS/components/finsh -I ../drivers/inc -I ../Peripheral/CIU32L051_Lib/Include -I ../Peripheral/CMSIS/Core -I ../Peripheral/CMSIS/Device -I ../startup -I ../user/Include -I ../RTOS -I ../RTOS/components/utilities/ulog -I ../RTOS/components/utilities/ulog/backend -I ../RTOS/components/drivers/inc -I ../LIB/lwrb -I ../LIB/RTT -I ../bsp/inc -I ../LIB/LwUtil -I ../LIB/perf_counter -I ../LIB/agile_led -I ../LIB/FlexibleButton-master -D__UVISION_VERSION="539" -DCIU32L051 -DCIU32L051 -o ./bsp_adc.o -MD)
F (..\bsp\src\bsp_adc.c)(0x66E4E1A2)(-xc -std=gnu99 --target=arm-arm-none-eabi -mcpu=cortex-m0plus -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -Oz -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../RTOS/inc -I ../RTOS/components/finsh -I ../drivers/inc -I ../Peripheral/CIU32L051_Lib/Include -I ../Peripheral/CMSIS/Core -I ../Peripheral/CMSIS/Device -I ../startup -I ../user/Include -I ../RTOS -I ../RTOS/components/utilities/ulog -I ../RTOS/components/utilities/ulog/backend -I ../RTOS/components/drivers/inc -I ../LIB/lwrb -I ../LIB/RTT -I ../bsp/inc -I ../LIB/LwUtil -I ../LIB/perf_counter -I ../LIB/agile_led -I ../LIB/FlexibleButton-master -D__UVISION_VERSION="539" -DCIU32L051 -DCIU32L051 -o ./bsp_adc.o -MD)
I (..\RTOS\inc\rtthread.h\.\RTOS\rtconfig.h)(0x00000000)
I (..\RTOS\components\finsh\finsh_config.hh.\RTOS\inc\rtdebug.h)(0x00000000)
I (..\RTOS\inc\rtdef.hf.\RTOS\inc\stdarg.hh.\RTOS\inc\rtservice.h)(0x00000000)
@ -1534,7 +1534,7 @@ I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_wwdg.h)(0x65800BC5)
I (..\RTOS\components\drivers\inc\dev_pin.h)(0x66D9591B)
I (..\RTOS\components\finsh\finsh_api.hi.\RTOS\inc\rthw.h)(0x00000000)
I (..\drivers\inc\drv_gpio.h)(0x66D95A9E)
F (..\drivers\src\drv_uart.c)(0x66E3F7EF)(-xc -std=gnu99 --target=arm-arm-none-eabi -mcpu=cortex-m0plus -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -Oz -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../RTOS/inc -I ../RTOS/components/finsh -I ../drivers/inc -I ../Peripheral/CIU32L051_Lib/Include -I ../Peripheral/CMSIS/Core -I ../Peripheral/CMSIS/Device -I ../startup -I ../user/Include -I ../RTOS -I ../RTOS/components/utilities/ulog -I ../RTOS/components/utilities/ulog/backend -I ../RTOS/components/drivers/inc -I ../LIB/lwrb -I ../LIB/RTT -I ../bsp/inc -I ../LIB/LwUtil -I ../LIB/perf_counter -I ../LIB/agile_led -I ../LIB/FlexibleButton-master -D__UVISION_VERSION="539" -DCIU32L051 -DCIU32L051 -o ./drv_uart.o -MD)
F (..\drivers\src\drv_uart.c)(0x66E4DFAB)(-xc -std=gnu99 --target=arm-arm-none-eabi -mcpu=cortex-m0plus -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -Oz -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../RTOS/inc -I ../RTOS/components/finsh -I ../drivers/inc -I ../Peripheral/CIU32L051_Lib/Include -I ../Peripheral/CMSIS/Core -I ../Peripheral/CMSIS/Device -I ../startup -I ../user/Include -I ../RTOS -I ../RTOS/components/utilities/ulog -I ../RTOS/components/utilities/ulog/backend -I ../RTOS/components/drivers/inc -I ../LIB/lwrb -I ../LIB/RTT -I ../bsp/inc -I ../LIB/LwUtil -I ../LIB/perf_counter -I ../LIB/agile_led -I ../LIB/FlexibleButton-master -D__UVISION_VERSION="539" -DCIU32L051 -DCIU32L051 -o ./drv_uart.o -MD)
I (..\RTOS\inc\rtthread.ht.\RTOS\rtconfig.h)(0x00000000)
I (..\RTOS\components\finsh\finsh_config.hh.\RTOS\inc\rtdebug.h)(0x00000000)
I (..\RTOS\inc\rtdef.hf.\RTOS\inc\stdarg.hh.\RTOS\inc\rtservice.h)(0x00000000)

View File

@ -6,18 +6,18 @@
[Found keyword]: ----------Execution Region----------
[name]: ER_IROM1
[Exec base]: 0x8000000
[Size]: 0x9f60
[Size]: 0xa0f0
[Max]: 0x10000
[Found keyword]: ----------Execution Region----------
[name]: RW_IRAM1
[Exec base]: 0x20000000
[Size]: 0x2e48
[Size]: 0x2e80
[Max]: 0x4000
[parse_keil_map over printf bar]:
RW_IRAM1 :0x20000000
16.00 KB :|ĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄö______| 72.31 % ( 11.57 KB / 16.00 KB) [4536 B]
16.00 KB :|ĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄö______| 72.66 % ( 11.62 KB / 16.00 KB) [4480 B]
ER_IROM1 :0x8000000
64.00 KB :|ĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄö________| 62.26 % ( 39.84 KB / 64.00 KB) [24736 B]
64.00 KB :|ĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄö________| 62.87 % ( 40.23 KB / 64.00 KB) [24336 B]
[export csv]: ./USART1_Interrupt_sort_by_flash.csv
[export csv]: ./USART1_Interrupt_sort_by_ram.csv
[export xlsx]: USART1_Interrupt_analysis.xlsx

Binary file not shown.

View File

@ -1,75 +1,77 @@
File_name,flash percent,flash,ram,Code,RO_data,RW_data,ZI_data
cmd.o,10.634302%,4473,0,2872,1601,0,0
bsp_flash.o,9.098474%,3827,4,2880,947,0,4
ipc.o,5.834245%,2454,0,1440,1014,0,0
kservice.o,5.154296%,2168,268,1912,256,0,268
ulog.o,5.137654%,2161,589,1950,211,0,589
thread.o,5.097238%,2144,12,1902,242,0,12
mem.o,4.469593%,1880,72,1512,368,0,72
shell.o,4.277020%,1799,281,1768,31,0,281
drv_uart.o,3.630355%,1527,2436,1470,57,0,2436
bsp_history.o,3.501973%,1473,1684,1384,89,0,1684
agile_led.o,3.290381%,1384,1220,1184,200,0,1220
timer.o,2.750701%,1157,20,1002,155,0,20
object.o,2.536731%,1067,148,832,107,128,20
drv_gpio.o,2.482050%,1044,0,244,800,0,0
bsp_button.o,2.441634%,1027,684,636,391,0,684
device.o,2.420237%,1018,0,706,312,0,0
bsp_adc.o,2.358423%,992,1260,912,80,0,1260
msh.o,2.246683%,945,0,784,161,0,0
mc_p.l,2.089772%,879,4,742,133,4,0
bsp_rtc.o,1.661833%,699,6,600,99,0,6
lwrb.o,1.454995%,612,0,612,0,0,0
flexible_button.o,1.283819%,540,16,540,0,0,16
scheduler.o,1.193476%,502,280,484,18,0,280
dev_pin.o,1.145927%,482,56,420,62,0,56
mf_p.l,0.751272%,316,0,316,0,0,0
perf_counter.o,0.737007%,310,56,298,4,8,48
cpuport.o,0.732252%,308,12,308,0,0,12
idle.o,0.641910%,270,416,248,22,0,416
board.o,0.618135%,260,0,260,0,0,0
components.o,0.580096%,244,0,228,16,0,0
ciu32l051_std_rtc.o,0.561077%,236,0,236,0,0,0
startup_ciu32l051.o,0.523037%,220,1024,28,192,0,1024
context_rvds.o,0.513528%,216,0,216,0,0,0
ciu32l051_std_rcc.o,0.513528%,216,0,216,0,0,0
main.o,0.501640%,211,0,160,51,0,0
drv_common.o,0.484998%,204,0,204,0,0,0
system_ciu32l051.o,0.475489%,200,4,164,32,4,0
ciu32l051_std_flash.o,0.446959%,188,0,188,0,0,0
ciu32l051_std_usart.o,0.442204%,186,0,186,0,0,0
_strtoul.o,0.394655%,166,0,166,0,0,0
ciu32l051_std_gpio.o,0.366126%,154,0,154,0,0,0
ciu32l051_std_adc.o,0.351862%,148,0,148,0,0,0
ctype_o.o,0.335219%,141,0,8,133,0,0
fepilogue.o,0.309068%,130,0,130,0,0,0
segger_rtt.o,0.309068%,130,1208,104,26,0,1208
perf_os_patch_rt_thread.o,0.301935%,127,0,118,9,0,0
fmul.o,0.290048%,122,0,122,0,0,0
bsp_io_dev.o,0.268651%,113,12,100,13,0,12
strtol.o,0.266274%,112,0,112,0,0,0
ciu32l051_std_dma.o,0.237744%,100,0,100,0,0,0
console_be.o,0.213970%,90,48,86,4,0,48
irq.o,0.209215%,88,12,88,0,0,12
uidiv_div0.o,0.147401%,62,0,62,0,0,0
clock.o,0.128382%,54,4,54,0,0,4
ffixi.o,0.118872%,50,0,50,0,0,0
init.o,0.114117%,48,0,48,0,0,0
cpp_init.o,0.095098%,40,0,40,0,0,0
memseta.o,0.085588%,36,0,36,0,0,0
memcpya.o,0.085588%,36,0,36,0,0,0
strncmp.o,0.071323%,30,0,30,0,0,0
handlers.o,0.071323%,30,0,30,0,0,0
_chval.o,0.071323%,30,0,30,0,0,0
strncpy.o,0.061814%,26,0,26,0,0,0
memcmp.o,0.061814%,26,0,26,0,0,0
atoi.o,0.061814%,26,0,26,0,0,0
ciu32l051_std.o,0.057059%,24,0,24,0,0,0
strchr.o,0.047549%,20,0,20,0,0,0
ffltui.o,0.033284%,14,0,14,0,0,0
strlen.o,0.033284%,14,0,14,0,0,0
errno.o,0.028529%,12,4,8,0,4,0
entry9a.o,0.019020%,8,0,8,0,0,0
entry2.o,0.019020%,8,0,8,0,0,0
entry8a.o,0.009510%,4,0,4,0,0,0
entry5.o,0.009510%,4,0,4,0,0,0
cmd.o,10.493595%,4473,0,2872,1601,0,0
bsp_flash.o,8.978088%,3827,4,2880,947,0,4
ipc.o,5.757050%,2454,0,1440,1014,0,0
kservice.o,5.086098%,2168,268,1912,256,0,268
ulog.o,5.069676%,2161,589,1950,211,0,589
thread.o,5.029794%,2144,12,1902,242,0,12
mem.o,4.410454%,1880,72,1512,368,0,72
shell.o,4.220429%,1799,281,1768,31,0,281
drv_uart.o,3.582321%,1527,2436,1470,57,0,2436
bsp_history.o,3.455637%,1473,1684,1384,89,0,1684
agile_led.o,3.246845%,1384,1220,1184,200,0,1220
bsp_adc.o,2.880871%,1228,1320,1148,80,0,1320
timer.o,2.714306%,1157,20,1002,155,0,20
object.o,2.503167%,1067,148,832,107,128,20
drv_gpio.o,2.449209%,1044,0,244,800,0,0
bsp_button.o,2.409328%,1027,684,636,391,0,684
device.o,2.388214%,1018,0,706,312,0,0
msh.o,2.216957%,945,0,784,161,0,0
mc_p.l,2.062122%,879,4,742,133,4,0
bsp_rtc.o,1.639844%,699,6,600,99,0,6
lwrb.o,1.435743%,612,0,612,0,0,0
flexible_button.o,1.266832%,540,16,540,0,0,16
scheduler.o,1.177685%,502,280,484,18,0,280
dev_pin.o,1.130765%,482,56,420,62,0,56
mf_p.l,1.126073%,480,0,480,0,0,0
perf_counter.o,0.727256%,310,56,298,4,8,48
cpuport.o,0.722564%,308,12,308,0,0,12
idle.o,0.633416%,270,416,248,22,0,416
board.o,0.609956%,260,0,260,0,0,0
components.o,0.572421%,244,0,228,16,0,0
ciu32l051_std_rtc.o,0.553653%,236,0,236,0,0,0
startup_ciu32l051.o,0.516117%,220,1024,28,192,0,1024
context_rvds.o,0.506733%,216,0,216,0,0,0
ciu32l051_std_rcc.o,0.506733%,216,0,216,0,0,0
main.o,0.495003%,211,0,160,51,0,0
drv_common.o,0.478581%,204,0,204,0,0,0
system_ciu32l051.o,0.469197%,200,4,164,32,4,0
ciu32l051_std_flash.o,0.441045%,188,0,188,0,0,0
ciu32l051_std_usart.o,0.436353%,186,0,186,0,0,0
_strtoul.o,0.389434%,166,0,166,0,0,0
ciu32l051_std_gpio.o,0.361282%,154,0,154,0,0,0
ciu32l051_std_adc.o,0.347206%,148,0,148,0,0,0
ctype_o.o,0.330784%,141,0,8,133,0,0
fepilogue.o,0.304978%,130,0,130,0,0,0
segger_rtt.o,0.304978%,130,1208,104,26,0,1208
perf_os_patch_rt_thread.o,0.297940%,127,0,118,9,0,0
fdiv.o,0.290902%,124,0,124,0,0,0
fmul.o,0.286210%,122,0,122,0,0,0
bsp_io_dev.o,0.265096%,113,12,100,13,0,12
strtol.o,0.262750%,112,0,112,0,0,0
ciu32l051_std_dma.o,0.234599%,100,0,100,0,0,0
console_be.o,0.211139%,90,48,86,4,0,48
irq.o,0.206447%,88,12,88,0,0,12
uidiv_div0.o,0.145451%,62,0,62,0,0,0
clock.o,0.126683%,54,4,54,0,0,4
ffixi.o,0.117299%,50,0,50,0,0,0
init.o,0.112607%,48,0,48,0,0,0
f2d.o,0.093839%,40,0,40,0,0,0
cpp_init.o,0.093839%,40,0,40,0,0,0
memseta.o,0.084455%,36,0,36,0,0,0
memcpya.o,0.084455%,36,0,36,0,0,0
strncmp.o,0.070380%,30,0,30,0,0,0
handlers.o,0.070380%,30,0,30,0,0,0
_chval.o,0.070380%,30,0,30,0,0,0
strncpy.o,0.060996%,26,0,26,0,0,0
memcmp.o,0.060996%,26,0,26,0,0,0
atoi.o,0.060996%,26,0,26,0,0,0
ciu32l051_std.o,0.056304%,24,0,24,0,0,0
strchr.o,0.046920%,20,0,20,0,0,0
ffltui.o,0.032844%,14,0,14,0,0,0
strlen.o,0.032844%,14,0,14,0,0,0
errno.o,0.028152%,12,4,8,0,4,0
entry9a.o,0.018768%,8,0,8,0,0,0
entry2.o,0.018768%,8,0,8,0,0,0
entry8a.o,0.009384%,4,0,4,0,0,0
entry5.o,0.009384%,4,0,4,0,0,0

1 File_name flash percent flash ram Code RO_data RW_data ZI_data
2 cmd.o 10.634302% 10.493595% 4473 0 2872 1601 0 0
3 bsp_flash.o 9.098474% 8.978088% 3827 4 2880 947 0 4
4 ipc.o 5.834245% 5.757050% 2454 0 1440 1014 0 0
5 kservice.o 5.154296% 5.086098% 2168 268 1912 256 0 268
6 ulog.o 5.137654% 5.069676% 2161 589 1950 211 0 589
7 thread.o 5.097238% 5.029794% 2144 12 1902 242 0 12
8 mem.o 4.469593% 4.410454% 1880 72 1512 368 0 72
9 shell.o 4.277020% 4.220429% 1799 281 1768 31 0 281
10 drv_uart.o 3.630355% 3.582321% 1527 2436 1470 57 0 2436
11 bsp_history.o 3.501973% 3.455637% 1473 1684 1384 89 0 1684
12 agile_led.o 3.290381% 3.246845% 1384 1220 1184 200 0 1220
13 timer.o bsp_adc.o 2.750701% 2.880871% 1157 1228 20 1320 1002 1148 155 80 0 20 1320
14 object.o timer.o 2.536731% 2.714306% 1067 1157 148 20 832 1002 107 155 128 0 20
15 drv_gpio.o object.o 2.482050% 2.503167% 1044 1067 0 148 244 832 800 107 0 128 0 20
16 bsp_button.o drv_gpio.o 2.441634% 2.449209% 1027 1044 684 0 636 244 391 800 0 684 0
17 device.o bsp_button.o 2.420237% 2.409328% 1018 1027 0 684 706 636 312 391 0 0 684
18 bsp_adc.o device.o 2.358423% 2.388214% 992 1018 1260 0 912 706 80 312 0 1260 0
19 msh.o 2.246683% 2.216957% 945 0 784 161 0 0
20 mc_p.l 2.089772% 2.062122% 879 4 742 133 4 0
21 bsp_rtc.o 1.661833% 1.639844% 699 6 600 99 0 6
22 lwrb.o 1.454995% 1.435743% 612 0 612 0 0 0
23 flexible_button.o 1.283819% 1.266832% 540 16 540 0 0 16
24 scheduler.o 1.193476% 1.177685% 502 280 484 18 0 280
25 dev_pin.o 1.145927% 1.130765% 482 56 420 62 0 56
26 mf_p.l 0.751272% 1.126073% 316 480 0 316 480 0 0 0
27 perf_counter.o 0.737007% 0.727256% 310 56 298 4 8 48
28 cpuport.o 0.732252% 0.722564% 308 12 308 0 0 12
29 idle.o 0.641910% 0.633416% 270 416 248 22 0 416
30 board.o 0.618135% 0.609956% 260 0 260 0 0 0
31 components.o 0.580096% 0.572421% 244 0 228 16 0 0
32 ciu32l051_std_rtc.o 0.561077% 0.553653% 236 0 236 0 0 0
33 startup_ciu32l051.o 0.523037% 0.516117% 220 1024 28 192 0 1024
34 context_rvds.o 0.513528% 0.506733% 216 0 216 0 0 0
35 ciu32l051_std_rcc.o 0.513528% 0.506733% 216 0 216 0 0 0
36 main.o 0.501640% 0.495003% 211 0 160 51 0 0
37 drv_common.o 0.484998% 0.478581% 204 0 204 0 0 0
38 system_ciu32l051.o 0.475489% 0.469197% 200 4 164 32 4 0
39 ciu32l051_std_flash.o 0.446959% 0.441045% 188 0 188 0 0 0
40 ciu32l051_std_usart.o 0.442204% 0.436353% 186 0 186 0 0 0
41 _strtoul.o 0.394655% 0.389434% 166 0 166 0 0 0
42 ciu32l051_std_gpio.o 0.366126% 0.361282% 154 0 154 0 0 0
43 ciu32l051_std_adc.o 0.351862% 0.347206% 148 0 148 0 0 0
44 ctype_o.o 0.335219% 0.330784% 141 0 8 133 0 0
45 fepilogue.o 0.309068% 0.304978% 130 0 130 0 0 0
46 segger_rtt.o 0.309068% 0.304978% 130 1208 104 26 0 1208
47 perf_os_patch_rt_thread.o 0.301935% 0.297940% 127 0 118 9 0 0
48 fmul.o fdiv.o 0.290048% 0.290902% 122 124 0 122 124 0 0 0
49 bsp_io_dev.o fmul.o 0.268651% 0.286210% 113 122 12 0 100 122 13 0 0 12 0
50 strtol.o bsp_io_dev.o 0.266274% 0.265096% 112 113 0 12 112 100 0 13 0 0 12
51 ciu32l051_std_dma.o strtol.o 0.237744% 0.262750% 100 112 0 100 112 0 0 0
52 console_be.o ciu32l051_std_dma.o 0.213970% 0.234599% 90 100 48 0 86 100 4 0 0 48 0
53 irq.o console_be.o 0.209215% 0.211139% 88 90 12 48 88 86 0 4 0 12 48
54 uidiv_div0.o irq.o 0.147401% 0.206447% 62 88 0 12 62 88 0 0 0 12
55 clock.o uidiv_div0.o 0.128382% 0.145451% 54 62 4 0 54 62 0 0 4 0
56 ffixi.o clock.o 0.118872% 0.126683% 50 54 0 4 50 54 0 0 0 4
57 init.o ffixi.o 0.114117% 0.117299% 48 50 0 48 50 0 0 0
58 cpp_init.o init.o 0.095098% 0.112607% 40 48 0 40 48 0 0 0
59 memseta.o f2d.o 0.085588% 0.093839% 36 40 0 36 40 0 0 0
60 memcpya.o cpp_init.o 0.085588% 0.093839% 36 40 0 36 40 0 0 0
61 strncmp.o memseta.o 0.071323% 0.084455% 30 36 0 30 36 0 0 0
62 handlers.o memcpya.o 0.071323% 0.084455% 30 36 0 30 36 0 0 0
63 _chval.o strncmp.o 0.071323% 0.070380% 30 0 30 0 0 0
64 strncpy.o handlers.o 0.061814% 0.070380% 26 30 0 26 30 0 0 0
65 memcmp.o _chval.o 0.061814% 0.070380% 26 30 0 26 30 0 0 0
66 atoi.o strncpy.o 0.061814% 0.060996% 26 0 26 0 0 0
67 ciu32l051_std.o memcmp.o 0.057059% 0.060996% 24 26 0 24 26 0 0 0
68 strchr.o atoi.o 0.047549% 0.060996% 20 26 0 20 26 0 0 0
69 ffltui.o ciu32l051_std.o 0.033284% 0.056304% 14 24 0 14 24 0 0 0
70 strlen.o strchr.o 0.033284% 0.046920% 14 20 0 14 20 0 0 0
71 errno.o ffltui.o 0.028529% 0.032844% 12 14 4 0 8 14 0 4 0 0
72 entry9a.o strlen.o 0.019020% 0.032844% 8 14 0 8 14 0 0 0
73 entry2.o errno.o 0.019020% 0.028152% 8 12 0 4 8 0 0 4 0
74 entry8a.o entry9a.o 0.009510% 0.018768% 4 8 0 4 8 0 0 0
75 entry5.o entry2.o 0.009510% 0.018768% 4 8 0 4 8 0 0 0
76 entry8a.o 0.009384% 4 0 4 0 0 0
77 entry5.o 0.009384% 4 0 4 0 0 0

View File

@ -1,30 +1,30 @@
File_name,ram_percent,ram,flash,Code,RO_data,RW_data,ZI_data
drv_uart.o,20.574324%,2436,1527,1470,57,0,2436
bsp_history.o,14.222973%,1684,1473,1384,89,0,1684
bsp_adc.o,10.641891%,1260,992,912,80,0,1260
agile_led.o,10.304054%,1220,1384,1184,200,0,1220
segger_rtt.o,10.202703%,1208,130,104,26,0,1208
startup_ciu32l051.o,8.648648%,1024,220,28,192,0,1024
bsp_button.o,5.777027%,684,1027,636,391,0,684
ulog.o,4.974662%,589,2161,1950,211,0,589
idle.o,3.513514%,416,270,248,22,0,416
shell.o,2.373311%,281,1799,1768,31,0,281
scheduler.o,2.364865%,280,502,484,18,0,280
kservice.o,2.263514%,268,2168,1912,256,0,268
object.o,1.250000%,148,1067,832,107,128,20
mem.o,0.608108%,72,1880,1512,368,0,72
perf_counter.o,0.472973%,56,310,298,4,8,48
dev_pin.o,0.472973%,56,482,420,62,0,56
console_be.o,0.405405%,48,90,86,4,0,48
timer.o,0.168919%,20,1157,1002,155,0,20
flexible_button.o,0.135135%,16,540,540,0,0,16
thread.o,0.101351%,12,2144,1902,242,0,12
irq.o,0.101351%,12,88,88,0,0,12
cpuport.o,0.101351%,12,308,308,0,0,12
bsp_io_dev.o,0.101351%,12,113,100,13,0,12
bsp_rtc.o,0.050676%,6,699,600,99,0,6
mc_p.l,0.033784%,4,879,742,133,4,0
errno.o,0.033784%,4,12,8,0,4,0
system_ciu32l051.o,0.033784%,4,200,164,32,4,0
clock.o,0.033784%,4,54,54,0,0,4
bsp_flash.o,0.033784%,4,3827,2880,947,0,4
drv_uart.o,20.470589%,2436,1527,1470,57,0,2436
bsp_history.o,14.151260%,1684,1473,1384,89,0,1684
bsp_adc.o,11.092437%,1320,1228,1148,80,0,1320
agile_led.o,10.252101%,1220,1384,1184,200,0,1220
segger_rtt.o,10.151260%,1208,130,104,26,0,1208
startup_ciu32l051.o,8.605042%,1024,220,28,192,0,1024
bsp_button.o,5.747899%,684,1027,636,391,0,684
ulog.o,4.949580%,589,2161,1950,211,0,589
idle.o,3.495798%,416,270,248,22,0,416
shell.o,2.361345%,281,1799,1768,31,0,281
scheduler.o,2.352941%,280,502,484,18,0,280
kservice.o,2.252101%,268,2168,1912,256,0,268
object.o,1.243698%,148,1067,832,107,128,20
mem.o,0.605042%,72,1880,1512,368,0,72
perf_counter.o,0.470588%,56,310,298,4,8,48
dev_pin.o,0.470588%,56,482,420,62,0,56
console_be.o,0.403361%,48,90,86,4,0,48
timer.o,0.168067%,20,1157,1002,155,0,20
flexible_button.o,0.134454%,16,540,540,0,0,16
thread.o,0.100840%,12,2144,1902,242,0,12
irq.o,0.100840%,12,88,88,0,0,12
cpuport.o,0.100840%,12,308,308,0,0,12
bsp_io_dev.o,0.100840%,12,113,100,13,0,12
bsp_rtc.o,0.050420%,6,699,600,99,0,6
mc_p.l,0.033613%,4,879,742,133,4,0
errno.o,0.033613%,4,12,8,0,4,0
system_ciu32l051.o,0.033613%,4,200,164,32,4,0
clock.o,0.033613%,4,54,54,0,0,4
bsp_flash.o,0.033613%,4,3827,2880,947,0,4

1 File_name ram_percent ram flash Code RO_data RW_data ZI_data
2 drv_uart.o 20.574324% 20.470589% 2436 1527 1470 57 0 2436
3 bsp_history.o 14.222973% 14.151260% 1684 1473 1384 89 0 1684
4 bsp_adc.o 10.641891% 11.092437% 1260 1320 992 1228 912 1148 80 0 1260 1320
5 agile_led.o 10.304054% 10.252101% 1220 1384 1184 200 0 1220
6 segger_rtt.o 10.202703% 10.151260% 1208 130 104 26 0 1208
7 startup_ciu32l051.o 8.648648% 8.605042% 1024 220 28 192 0 1024
8 bsp_button.o 5.777027% 5.747899% 684 1027 636 391 0 684
9 ulog.o 4.974662% 4.949580% 589 2161 1950 211 0 589
10 idle.o 3.513514% 3.495798% 416 270 248 22 0 416
11 shell.o 2.373311% 2.361345% 281 1799 1768 31 0 281
12 scheduler.o 2.364865% 2.352941% 280 502 484 18 0 280
13 kservice.o 2.263514% 2.252101% 268 2168 1912 256 0 268
14 object.o 1.250000% 1.243698% 148 1067 832 107 128 20
15 mem.o 0.608108% 0.605042% 72 1880 1512 368 0 72
16 perf_counter.o 0.472973% 0.470588% 56 310 298 4 8 48
17 dev_pin.o 0.472973% 0.470588% 56 482 420 62 0 56
18 console_be.o 0.405405% 0.403361% 48 90 86 4 0 48
19 timer.o 0.168919% 0.168067% 20 1157 1002 155 0 20
20 flexible_button.o 0.135135% 0.134454% 16 540 540 0 0 16
21 thread.o 0.101351% 0.100840% 12 2144 1902 242 0 12
22 irq.o 0.101351% 0.100840% 12 88 88 0 0 12
23 cpuport.o 0.101351% 0.100840% 12 308 308 0 0 12
24 bsp_io_dev.o 0.101351% 0.100840% 12 113 100 13 0 12
25 bsp_rtc.o 0.050676% 0.050420% 6 699 600 99 0 6
26 mc_p.l 0.033784% 0.033613% 4 879 742 133 4 0
27 errno.o 0.033784% 0.033613% 4 12 8 0 4 0
28 system_ciu32l051.o 0.033784% 0.033613% 4 200 164 32 4 0
29 clock.o 0.033784% 0.033613% 4 54 54 0 0 4
30 bsp_flash.o 0.033784% 0.033613% 4 3827 2880 947 0 4

Binary file not shown.

Binary file not shown.

View File

@ -2,7 +2,7 @@
* @Author: mbw
* @Date: 2024-09-05 15:04:14
* @LastEditors: mbw && 1600520629@qq.com
* @LastEditTime: 2024-09-13 17:18:49
* @LastEditTime: 2024-09-14 09:10:51
* @FilePath: \USART1_Interrupt - RT-Thread\bsp\inc\bsp_adc.h
* @Description:
* @
@ -13,9 +13,9 @@
#include "rtthread.h"
// ADC要采集的通道个数
#define NUM_OF_CHANNEL (2U)
#define NUM_OF_CHANNEL (1U)
// ADC要采集的次数
#define ADC_TIMES (30U)
#define ADC_TIMES (10U)
#define ADC_BUFFER_SIZE (NUM_OF_CHANNEL * ADC_TIMES)
/***************************12V输入的检测用来实现掉电检测****************************/
@ -29,7 +29,7 @@
typedef enum
{
kVinAdc = 0U,
kVbgrAdc
// kVbgrAdc
} TeAdcIndex;
// 存储采集的数据

View File

@ -9,6 +9,7 @@
#include <ulog.h> // 必须在 LOG_TAG 与 LOG_LVL 下面
#define ADC_TEST_ENABLE
#define ADC_DMA_RX_ENABLE
struct rt_semaphore sem_vin;
static struct rt_timer vin_timer;
@ -49,32 +50,10 @@ float Get_ADC_Average(TeAdcIndex index)
return average;
}
/**
* @brief ADC通道采样值为实际电压值
* @note VBGR来计算ADC参考电压VDDA的实际电压
* mV
* @retval uint32_t
*/
uint16_t BSP_Get_Channel_Voltage(void)
{
uint16_t get_channel_voltage = 0U;
// if ((Get_ADC_Average(kVinAdc) != 0U)&&(Get_ADC_Average(kVbgrAdc) != 0))
// {
// /* 计算采样通道电压值*/
// get_channel_voltage = (uint32_t)((Get_ADC_Average(kVinAdc)* (*VBGR_CAL_ADDR) * VBGR_CAL_VREF) / (Get_ADC_Average(kVbgrAdc)* ADC_CONVER_SCALE));
// }
get_channel_voltage = std_adc_get_conversion_value();
/* 返回通道采样电压 */
return get_channel_voltage;
}
float Get_VIN_Voltage(void)
{
float vin_voltage = BSP_Get_Channel_Voltage() * VIN_VOLTAGE_RATIO;
return vin_voltage;
return (Get_ADC_Average(kVinAdc) * VIN_VOLTAGE_RATIO * 3 / 4095);
}
rt_uint16_t Get_VIN_VoltageInt1000x(void)
@ -135,7 +114,7 @@ __STATIC_INLINE void Vrefbuf_Init(void)
while (!std_vrefbuf_get_ready_status());
}
#if 0
#if 1
static void _Adc_Dma_Init(void)
{
std_dma_init_t dma_init_param = {0};
@ -167,8 +146,8 @@ void _Adc_Dma_Config(void)
dma_config.dma_channel = DMA_CHANNEL_0;
dma_config.src_addr = (uint32_t)&ADC->DR;
dma_config.dst_addr = (uint32_t)adc_buffer;
// dma_config.data_number = ADC_BUFFER_SIZE;
dma_config.data_number = 2;
dma_config.data_number = ADC_BUFFER_SIZE;
// dma_config.data_number = 2;
std_dma_start_transmit(&dma_config);
}
#endif
@ -200,7 +179,7 @@ void _Adc_init(void)
std_adc_analog_watchdog_monit_channel(ADC_AWDG_CHANNEL_3); /* 看门狗监控通道选择通道 */
std_adc_analog_watchdog_thresholds_config(VIN_ADC_HIGH_THRESHOLD, VIN_ADC_LOW_THRESHOLD); /* 配置看门狗监控阈值 */
// std_adc_dma_enable();/* 使能DMA */
std_adc_dma_enable();/* 使能DMA */
std_adc_wait_mode_enable(); /* 配置wait模式避免数据未及时读取转换溢出 */
/* ADC参考电压源选择 */
@ -217,17 +196,17 @@ void _Adc_init(void)
std_adc_clear_flag(ADC_FLAG_EOCAL);
LOG_D("adc calibration: %d", std_adc_get_conversion_value());
std_adc_calibration_factor_config(std_adc_get_conversion_value());// 配置ADC校准值
std_adc_calibration_factor_config(std_adc_get_conversion_value()); // 配置ADC校准值
std_adc_clear_flag(ADC_FLAG_ALL); /* 清除ADC转换状态确保之前状态不影响转换 */
/* 在使能相关中断之前IER寄存器恢复默认状态之后根据参数配置使能相关中断 */
std_adc_interrupt_disable(ADC_INTERRUPT_EOC | ADC_INTERRUPT_EOS | ADC_INTERRUPT_OVRN | ADC_INTERRUPT_AWDG1);
std_adc_interrupt_enable(ADC_INTERRUPT_EOC);/* 通道转换完成中断使能 */
std_adc_interrupt_enable(ADC_INTERRUPT_EOC); /* 通道转换完成中断使能,这个在测试中,似乎必须加,不加就会出问题,还没找到原因 */
std_adc_interrupt_enable(ADC_INTERRUPT_AWDG1); /* 看门狗中断使能 */
std_adc_start_conversion();
}
/**
@ -245,10 +224,12 @@ void Vin_Cfg(void)
{
_Adc_Gpio_Init();
Vrefbuf_Init();
_Adc_Dma_Init();
_Adc_Dma_Config();
_Adc_init();
_Adc_Nvic_Init();
// _Adc_Dma_Init();
// _Adc_Dma_Config();
}
static void vin_thread_entry(void *param)
@ -259,7 +240,7 @@ static void vin_thread_entry(void *param)
while (1)
{
rt_sem_take(&sem_vin, RT_WAITING_FOREVER);
LOG_D("std_adc_get_conversion_value %d", std_adc_get_conversion_value());
LOG_D("std_adc_get_conversion_value %d", std_adc_get_conversion_value());
// Send_Laser_Alarm_Event(kPowerDownEvent);
}
}
@ -268,6 +249,7 @@ void vin_timer_entry(void *parameter)
{
std_adc_start_conversion(); /* 启动转换 */
}
int BSP_Vin_Detection_Init(void)
{
rt_sem_init(&sem_vin, "sem_vin", 0, RT_IPC_FLAG_PRIO);
@ -275,7 +257,7 @@ int BSP_Vin_Detection_Init(void)
rt_timer_init(&vin_timer, "vin_timer", /* 定时器名字是 vin_timer */
vin_timer_entry, /* 超时时回调的处理函数 */
RT_NULL, /* 超时函数的入口参数 */
1000, /* 定时长度,以 OS Tick 为单位,即 1000个 OS Tick */
100, /* 定时长度,以 OS Tick 为单位,即 100个 OS Tick */
RT_TIMER_FLAG_PERIODIC); /* 周期性定时器 */
rt_timer_start(&vin_timer);
@ -322,3 +304,16 @@ void ADC_COMP_IRQHandler(void)
/* leave interrupt */
rt_interrupt_leave();
}
// /**
// * @brief DMA通道0中断服务函数
// * @retval 无
// */
// void DMA_Channel0_IRQHandler(void)
// {
// if((std_dma_get_interrupt_enable(DMA_CHANNEL_0, DMA_INTERRUPT_TF)) && (std_dma_get_flag(DMA_FLAG_TF0)))
// {
// /* 清除DMA通道转换完成标志 */
// std_dma_clear_flag(DMA_FLAG_TF0);
// }
// }

View File

@ -29,6 +29,7 @@
#include <ulog.h>
// #define UART1_DMA_RX_ENABLE
/*-------------------------------------用户自定义-----------------*/
/* 定时器的控制块 */