添加了adc DMA 接收,暂存
This commit is contained in:
parent
6b8a2a8c24
commit
d6d10cae75
Binary file not shown.
|
@ -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.
|
@ -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>
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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.
|
@ -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,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
|
||||
|
|
|
BIN
MDK/bsp_adc.o
BIN
MDK/bsp_adc.o
Binary file not shown.
BIN
MDK/drv_uart.o
BIN
MDK/drv_uart.o
Binary file not shown.
|
@ -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;
|
||||
|
||||
// 存储采集的数据
|
||||
|
|
|
@ -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);
|
||||
// }
|
||||
// }
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <ulog.h>
|
||||
|
||||
// #define UART1_DMA_RX_ENABLE
|
||||
|
||||
/*-------------------------------------用户自定义-----------------*/
|
||||
|
||||
/* 定时器的控制块 */
|
||||
|
|
Loading…
Reference in New Issue