解决了使用组件初始化会出现的硬件错误问题,修改了flash_readword函数中取地址的写法

This commit is contained in:
小马_666 2024-09-04 12:29:34 +08:00
parent d9b0473928
commit fb914e8ed7
23 changed files with 5262 additions and 5425 deletions

Binary file not shown.

View File

@ -39,15 +39,15 @@ compiling ulog.c...
compiling bsp_flash.c...
compiling ipc.c...
linking...
Program Size: Code=30106 RO-data=5894 RW-data=128 ZI-data=8192
Program Size: Code=29366 RO-data=5834 RW-data=128 ZI-data=9192
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 :|¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö__________| 50.78 % ( 8.12 KB / 16.00 KB) [8064 B]
16.00 KB :|¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö_________| 56.88 % ( 9.10 KB / 16.00 KB) [7064 B]
flash:
ER_IROM1 :0x8000000
64.00 KB :|¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö__________| 54.93 % ( 35.16 KB / 64.00 KB) [29536 B]
64.00 KB :|¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö__________| 53.71 % ( 34.38 KB / 64.00 KB) [30336 B]
".\CIU32_L051_M307R.axf" - 0 Error(s), 1 Warning(s).
<h2>Software Packages used:</h2>
@ -61,7 +61,7 @@ Package Vendor: HED
C:/Users/16005/AppData/Local/Arm/Packs/HED/CIU32L0xx_DFP/1.2.5/Drivers/CMSIS/Device/CIU32L051/Include
<h2>Collection of Component Files used:</h2>
Build Time Elapsed: 00:00:02
Build Time Elapsed: 00:00:01
</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

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
Dependencies for Project 'USART1_Interrupt', Target 'USART1_Interrupt': (DO NOT MODIFY !)
CompilerVersion: 6210000::V6.21::ARMCLANG
F (..\user\Source\main.c)(0x66CEBF5B)(-xc -std=c99 --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 -D__UVISION_VERSION="539" -DCIU32L051 -DCIU32L051 -o ./main.o -MD)
F (..\user\Source\main.c)(0x66D7D723)(-xc -std=c99 --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 -D__UVISION_VERSION="539" -DCIU32L051 -DCIU32L051 -o ./main.o -MD)
I (..\RTOS\components\finsh\finsh_config.ha.\RTOS\inc\rtdebug.h)(0x00000000)
I (..\RTOS\inc\rtdef.hf.\RTOS\inc\stdarg.ha.\RTOS\inc\rtservice.h)(0x00000000)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std.h)(0x66138664)
@ -91,7 +91,7 @@ I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_usart.h)(0x65800BC6)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_vrefbuf.h)(0x65800BC6)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_wwdg.h)(0x65800BC5)
I (..\RTOS\components\finsh\finsh_api.h)(0x66C2AAF0)
F (..\bsp\src\bsp_history.c)(0x66D6BEB2)(-xc -std=c99 --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 -D__UVISION_VERSION="539" -DCIU32L051 -DCIU32L051 -o ./bsp_history.o -MD)
F (..\bsp\src\bsp_history.c)(0x66D7CFC4)(-xc -std=c99 --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 -D__UVISION_VERSION="539" -DCIU32L051 -DCIU32L051 -o ./bsp_history.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)
@ -142,7 +142,7 @@ I (..\LIB\RTT\SEGGER_RTT.he.\LIB\RTT\SEGGER_RTT_Conf.h)(0x00000000)
I (C:\Keil_v5\ARM\ARMCLANG\include\stdlib.h)(0x6569B012)
I (..\RTOS\components\utilities\ulog\ulog.h)(0x666E44C6)
I (..\RTOS\components\utilities\ulog\ulog_def.h)(0x666E44C6)
F (..\bsp\src\bsp_flash.c)(0x66D6D559)(-xc -std=c99 --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 -D__UVISION_VERSION="539" -DCIU32L051 -DCIU32L051 -o ./bsp_flash.o -MD)
F (..\bsp\src\bsp_flash.c)(0x66D7E1CF)(-xc -std=c99 --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 -D__UVISION_VERSION="539" -DCIU32L051 -DCIU32L051 -o ./bsp_flash.o -MD)
I (..\RTOS\inc\rtthread.hl.\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)
@ -1555,7 +1555,7 @@ I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_trng.h)(0x65800BC5)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_usart.h)(0x65800BC6)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_vrefbuf.h)(0x65800BC6)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_wwdg.h)(0x65800BC5)
F (..\Peripheral\CIU32L051_Lib\Source\ciu32l051_std_flash.c)(0x66D6BCE5)(-xc -std=c99 --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 -D__UVISION_VERSION="539" -DCIU32L051 -DCIU32L051 -o ./ciu32l051_std_flash.o -MD)
F (..\Peripheral\CIU32L051_Lib\Source\ciu32l051_std_flash.c)(0x66D7B363)(-xc -std=c99 --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 -D__UVISION_VERSION="539" -DCIU32L051 -DCIU32L051 -o ./ciu32l051_std_flash.o -MD)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std.h)(0x66138664)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_config.h)(0x65800BC6)
I (..\Peripheral\CIU32L051_Lib\Include\ciu32l051_std_rcc.h)(0x65E679B7)

View File

@ -6,18 +6,18 @@
[Found keyword]: ----------Execution Region----------
[name]: ER_IROM1
[Exec base]: 0x8000000
[Size]: 0x8ca0
[Size]: 0x8980
[Max]: 0x10000
[Found keyword]: ----------Execution Region----------
[name]: RW_IRAM1
[Exec base]: 0x20000000
[Size]: 0x2080
[Size]: 0x2468
[Max]: 0x4000
[parse_keil_map over printf bar]:
RW_IRAM1 :0x20000000
16.00 KB :|ĄöĄöĄöĄöĄöĄöĄöĄöĄöĄö__________| 50.78 % ( 8.12 KB / 16.00 KB) [8064 B]
16.00 KB :|ĄöĄöĄöĄöĄöĄöĄöĄöĄöĄöĄö_________| 56.88 % ( 9.10 KB / 16.00 KB) [7064 B]
ER_IROM1 :0x8000000
64.00 KB :|ĄöĄöĄöĄöĄöĄöĄöĄöĄöĄö__________| 54.93 % ( 35.16 KB / 64.00 KB) [29536 B]
64.00 KB :|ĄöĄöĄöĄöĄöĄöĄöĄöĄöĄö__________| 53.71 % ( 34.38 KB / 64.00 KB) [30336 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,65 +1,65 @@
File_name,flash percent,flash,ram,Code,RO_data,RW_data,ZI_data
bsp_flash.o,13.934979%,5165,4,3656,1509,0,4
cmd.o,9.682989%,3589,0,2592,997,0,0
ipc.o,6.577634%,2438,0,1424,1014,0,0
ulog.o,5.800621%,2150,589,1950,200,0,589
thread.o,5.784433%,2144,12,1902,242,0,12
drv_uart.o,5.393228%,1999,2180,1920,79,0,2180
kservice.o,5.379738%,1994,260,1738,256,0,260
mem.o,5.072171%,1880,72,1512,368,0,72
bsp_history.o,4.092810%,1517,1684,1408,109,0,1684
shell.o,3.893161%,1443,281,1412,31,0,281
timer.o,3.121543%,1157,20,1002,155,0,20
mc_p.l,2.754620%,1021,4,884,133,4,0
segger_rtt_printf.o,2.692567%,998,0,998,0,0,0
msh.o,2.549575%,945,0,784,161,0,0
object.o,2.501012%,927,132,708,107,112,20
bsp_rtc.o,1.885876%,699,6,600,99,0,6
segger_rtt.o,1.715904%,636,1208,610,26,0,1208
lwrb.o,1.651153%,612,0,612,0,0,0
scheduler.o,1.354377%,502,280,484,18,0,280
ciu32l051_std_lpuart.o,0.895724%,332,0,332,0,0,0
main.o,0.874140%,324,0,244,80,0,0
perf_counter.o,0.836369%,310,56,298,4,8,48
cpuport.o,0.830973%,308,12,308,0,0,12
idle.o,0.728450%,270,416,248,22,0,416
components.o,0.658303%,244,0,228,16,0,0
ciu32l051_std_rtc.o,0.636719%,236,0,236,0,0,0
startup_ciu32l051.o,0.593552%,220,1024,28,192,0,1024
context_rvds.o,0.582760%,216,0,216,0,0,0
ciu32l051_std_rcc.o,0.582760%,216,0,216,0,0,0
drv_common.o,0.550384%,204,0,204,0,0,0
system_ciu32l051.o,0.539593%,200,4,164,32,4,0
ciu32l051_std_flash.o,0.539593%,200,0,200,0,0,0
ciu32l051_std_usart.o,0.501821%,186,0,186,0,0,0
_strtoul.o,0.447862%,166,0,166,0,0,0
perf_os_patch_rt_thread.o,0.426278%,158,0,154,4,0,0
ciu32l051_std_gpio.o,0.415486%,154,0,154,0,0,0
ctype_o.o,0.380413%,141,0,8,133,0,0
board.o,0.350735%,130,0,130,0,0,0
strtol.o,0.302172%,112,0,112,0,0,0
ciu32l051_std_dma.o,0.269796%,100,0,100,0,0,0
uldiv.o,0.259004%,96,0,96,0,0,0
irq.o,0.237421%,88,12,88,0,0,12
uidiv_div0.o,0.167274%,62,0,62,0,0,0
console_be.o,0.145690%,54,48,50,4,0,48
clock.o,0.145690%,54,4,54,0,0,4
init.o,0.129502%,48,0,48,0,0,0
cpp_init.o,0.107919%,40,0,40,0,0,0
memseta.o,0.097127%,36,0,36,0,0,0
memcpya.o,0.097127%,36,0,36,0,0,0
llushr.o,0.091731%,34,0,34,0,0,0
llshl.o,0.086335%,32,0,32,0,0,0
strncmp.o,0.080939%,30,0,30,0,0,0
handlers.o,0.080939%,30,0,30,0,0,0
_chval.o,0.080939%,30,0,30,0,0,0
strncpy.o,0.070147%,26,0,26,0,0,0
memcmp.o,0.070147%,26,0,26,0,0,0
atoi.o,0.070147%,26,0,26,0,0,0
ciu32l051_std.o,0.064751%,24,0,24,0,0,0
strlen.o,0.037771%,14,0,14,0,0,0
errno.o,0.032376%,12,4,8,0,4,0
entry9a.o,0.021584%,8,0,8,0,0,0
entry2.o,0.021584%,8,0,8,0,0,0
entry8a.o,0.010792%,4,0,4,0,0,0
entry5.o,0.010792%,4,0,4,0,0,0
bsp_flash.o,13.508520%,4899,4,3420,1479,0,4
cmd.o,9.896321%,3589,0,2592,997,0,0
ipc.o,6.722550%,2438,0,1424,1014,0,0
ulog.o,5.936690%,2153,589,1950,203,0,589
thread.o,5.911873%,2144,12,1902,242,0,12
kservice.o,5.498263%,1994,260,1738,256,0,260
mem.o,5.183919%,1880,72,1512,368,0,72
drv_uart.o,4.927480%,1787,3180,1708,79,0,3180
bsp_history.o,4.171952%,1513,1684,1404,109,0,1684
shell.o,3.978933%,1443,281,1412,31,0,281
timer.o,3.190316%,1157,20,1002,155,0,20
mc_p.l,2.815309%,1021,4,884,133,4,0
segger_rtt_printf.o,2.751889%,998,0,998,0,0,0
msh.o,2.605747%,945,0,784,161,0,0
object.o,2.556113%,927,132,708,107,112,20
bsp_rtc.o,1.927425%,699,6,600,99,0,6
segger_rtt.o,1.753709%,636,1208,610,26,0,1208
lwrb.o,1.494513%,542,0,542,0,0,0
scheduler.o,1.384217%,502,280,484,18,0,280
ciu32l051_std_lpuart.o,0.915458%,332,0,332,0,0,0
perf_counter.o,0.854795%,310,56,298,4,8,48
cpuport.o,0.849280%,308,12,308,0,0,12
idle.o,0.744499%,270,416,248,22,0,416
components.o,0.672807%,244,0,228,16,0,0
ciu32l051_std_rtc.o,0.650747%,236,0,236,0,0,0
startup_ciu32l051.o,0.606629%,220,1024,28,192,0,1024
context_rvds.o,0.595599%,216,0,216,0,0,0
ciu32l051_std_rcc.o,0.595599%,216,0,216,0,0,0
drv_common.o,0.562510%,204,0,204,0,0,0
system_ciu32l051.o,0.551481%,200,4,164,32,4,0
ciu32l051_std_flash.o,0.518392%,188,0,188,0,0,0
ciu32l051_std_usart.o,0.512877%,186,0,186,0,0,0
_strtoul.o,0.457729%,166,0,166,0,0,0
perf_os_patch_rt_thread.o,0.435670%,158,0,154,4,0,0
ciu32l051_std_gpio.o,0.424640%,154,0,154,0,0,0
ctype_o.o,0.388794%,141,0,8,133,0,0
board.o,0.358462%,130,0,130,0,0,0
strtol.o,0.308829%,112,0,112,0,0,0
ciu32l051_std_dma.o,0.275740%,100,0,100,0,0,0
uldiv.o,0.264711%,96,0,96,0,0,0
irq.o,0.242652%,88,12,88,0,0,12
main.o,0.237137%,86,0,40,46,0,0
uidiv_div0.o,0.170959%,62,0,62,0,0,0
console_be.o,0.148900%,54,48,50,4,0,48
clock.o,0.148900%,54,4,54,0,0,4
init.o,0.132355%,48,0,48,0,0,0
cpp_init.o,0.110296%,40,0,40,0,0,0
memseta.o,0.099267%,36,0,36,0,0,0
memcpya.o,0.099267%,36,0,36,0,0,0
llushr.o,0.093752%,34,0,34,0,0,0
llshl.o,0.088237%,32,0,32,0,0,0
strncmp.o,0.082722%,30,0,30,0,0,0
handlers.o,0.082722%,30,0,30,0,0,0
_chval.o,0.082722%,30,0,30,0,0,0
strncpy.o,0.071692%,26,0,26,0,0,0
memcmp.o,0.071692%,26,0,26,0,0,0
atoi.o,0.071692%,26,0,26,0,0,0
ciu32l051_std.o,0.066178%,24,0,24,0,0,0
strlen.o,0.038604%,14,0,14,0,0,0
errno.o,0.033089%,12,4,8,0,4,0
entry9a.o,0.022059%,8,0,8,0,0,0
entry2.o,0.022059%,8,0,8,0,0,0
entry8a.o,0.011030%,4,0,4,0,0,0
entry5.o,0.011030%,4,0,4,0,0,0

1 File_name flash percent flash ram Code RO_data RW_data ZI_data
2 bsp_flash.o 13.934979% 13.508520% 5165 4899 4 3656 3420 1509 1479 0 4
3 cmd.o 9.682989% 9.896321% 3589 0 2592 997 0 0
4 ipc.o 6.577634% 6.722550% 2438 0 1424 1014 0 0
5 ulog.o 5.800621% 5.936690% 2150 2153 589 1950 200 203 0 589
6 thread.o 5.784433% 5.911873% 2144 12 1902 242 0 12
7 drv_uart.o kservice.o 5.393228% 5.498263% 1999 1994 2180 260 1920 1738 79 256 0 2180 260
8 kservice.o mem.o 5.379738% 5.183919% 1994 1880 260 72 1738 1512 256 368 0 260 72
9 mem.o drv_uart.o 5.072171% 4.927480% 1880 1787 72 3180 1512 1708 368 79 0 72 3180
10 bsp_history.o 4.092810% 4.171952% 1517 1513 1684 1408 1404 109 0 1684
11 shell.o 3.893161% 3.978933% 1443 281 1412 31 0 281
12 timer.o 3.121543% 3.190316% 1157 20 1002 155 0 20
13 mc_p.l 2.754620% 2.815309% 1021 4 884 133 4 0
14 segger_rtt_printf.o 2.692567% 2.751889% 998 0 998 0 0 0
15 msh.o 2.549575% 2.605747% 945 0 784 161 0 0
16 object.o 2.501012% 2.556113% 927 132 708 107 112 20
17 bsp_rtc.o 1.885876% 1.927425% 699 6 600 99 0 6
18 segger_rtt.o 1.715904% 1.753709% 636 1208 610 26 0 1208
19 lwrb.o 1.651153% 1.494513% 612 542 0 612 542 0 0 0
20 scheduler.o 1.354377% 1.384217% 502 280 484 18 0 280
21 ciu32l051_std_lpuart.o 0.895724% 0.915458% 332 0 332 0 0 0
22 main.o perf_counter.o 0.874140% 0.854795% 324 310 0 56 244 298 80 4 0 8 0 48
23 perf_counter.o cpuport.o 0.836369% 0.849280% 310 308 56 12 298 308 4 0 8 0 48 12
24 cpuport.o idle.o 0.830973% 0.744499% 308 270 12 416 308 248 0 22 0 12 416
25 idle.o components.o 0.728450% 0.672807% 270 244 416 0 248 228 22 16 0 416 0
26 components.o ciu32l051_std_rtc.o 0.658303% 0.650747% 244 236 0 228 236 16 0 0 0
27 ciu32l051_std_rtc.o startup_ciu32l051.o 0.636719% 0.606629% 236 220 0 1024 236 28 0 192 0 0 1024
28 startup_ciu32l051.o context_rvds.o 0.593552% 0.595599% 220 216 1024 0 28 216 192 0 0 1024 0
29 context_rvds.o ciu32l051_std_rcc.o 0.582760% 0.595599% 216 0 216 0 0 0
30 ciu32l051_std_rcc.o drv_common.o 0.582760% 0.562510% 216 204 0 216 204 0 0 0
31 drv_common.o system_ciu32l051.o 0.550384% 0.551481% 204 200 0 4 204 164 0 32 0 4 0
32 system_ciu32l051.o ciu32l051_std_flash.o 0.539593% 0.518392% 200 188 4 0 164 188 32 0 4 0 0
33 ciu32l051_std_flash.o ciu32l051_std_usart.o 0.539593% 0.512877% 200 186 0 200 186 0 0 0
34 ciu32l051_std_usart.o _strtoul.o 0.501821% 0.457729% 186 166 0 186 166 0 0 0
35 _strtoul.o perf_os_patch_rt_thread.o 0.447862% 0.435670% 166 158 0 166 154 0 4 0 0
36 perf_os_patch_rt_thread.o ciu32l051_std_gpio.o 0.426278% 0.424640% 158 154 0 154 4 0 0 0
37 ciu32l051_std_gpio.o ctype_o.o 0.415486% 0.388794% 154 141 0 154 8 0 133 0 0
38 ctype_o.o board.o 0.380413% 0.358462% 141 130 0 8 130 133 0 0 0
39 board.o strtol.o 0.350735% 0.308829% 130 112 0 130 112 0 0 0
40 strtol.o ciu32l051_std_dma.o 0.302172% 0.275740% 112 100 0 112 100 0 0 0
41 ciu32l051_std_dma.o uldiv.o 0.269796% 0.264711% 100 96 0 100 96 0 0 0
42 uldiv.o irq.o 0.259004% 0.242652% 96 88 0 12 96 88 0 0 0 12
43 irq.o main.o 0.237421% 0.237137% 88 86 12 0 88 40 0 46 0 12 0
44 uidiv_div0.o 0.167274% 0.170959% 62 0 62 0 0 0
45 console_be.o 0.145690% 0.148900% 54 48 50 4 0 48
46 clock.o 0.145690% 0.148900% 54 4 54 0 0 4
47 init.o 0.129502% 0.132355% 48 0 48 0 0 0
48 cpp_init.o 0.107919% 0.110296% 40 0 40 0 0 0
49 memseta.o 0.097127% 0.099267% 36 0 36 0 0 0
50 memcpya.o 0.097127% 0.099267% 36 0 36 0 0 0
51 llushr.o 0.091731% 0.093752% 34 0 34 0 0 0
52 llshl.o 0.086335% 0.088237% 32 0 32 0 0 0
53 strncmp.o 0.080939% 0.082722% 30 0 30 0 0 0
54 handlers.o 0.080939% 0.082722% 30 0 30 0 0 0
55 _chval.o 0.080939% 0.082722% 30 0 30 0 0 0
56 strncpy.o 0.070147% 0.071692% 26 0 26 0 0 0
57 memcmp.o 0.070147% 0.071692% 26 0 26 0 0 0
58 atoi.o 0.070147% 0.071692% 26 0 26 0 0 0
59 ciu32l051_std.o 0.064751% 0.066178% 24 0 24 0 0 0
60 strlen.o 0.037771% 0.038604% 14 0 14 0 0 0
61 errno.o 0.032376% 0.033089% 12 4 8 0 4 0
62 entry9a.o 0.021584% 0.022059% 8 0 8 0 0 0
63 entry2.o 0.021584% 0.022059% 8 0 8 0 0 0
64 entry8a.o 0.010792% 0.011030% 4 0 4 0 0 0
65 entry5.o 0.010792% 0.011030% 4 0 4 0 0 0

View File

@ -1,24 +1,24 @@
File_name,ram_percent,ram,flash,Code,RO_data,RW_data,ZI_data
drv_uart.o,26.227142%,2180,1999,1920,79,0,2180
bsp_history.o,20.259865%,1684,1517,1408,109,0,1684
segger_rtt.o,14.533205%,1208,636,610,26,0,1208
startup_ciu32l051.o,12.319538%,1024,220,28,192,0,1024
ulog.o,7.086141%,589,2150,1950,200,0,589
idle.o,5.004812%,416,270,248,22,0,416
shell.o,3.380655%,281,1443,1412,31,0,281
scheduler.o,3.368624%,280,502,484,18,0,280
kservice.o,3.128008%,260,1994,1738,256,0,260
object.o,1.588066%,132,927,708,107,112,20
mem.o,0.866217%,72,1880,1512,368,0,72
perf_counter.o,0.673725%,56,310,298,4,8,48
console_be.o,0.577478%,48,54,50,4,0,48
timer.o,0.240616%,20,1157,1002,155,0,20
thread.o,0.144370%,12,2144,1902,242,0,12
irq.o,0.144370%,12,88,88,0,0,12
cpuport.o,0.144370%,12,308,308,0,0,12
bsp_rtc.o,0.072185%,6,699,600,99,0,6
mc_p.l,0.048123%,4,1021,884,133,4,0
errno.o,0.048123%,4,12,8,0,4,0
system_ciu32l051.o,0.048123%,4,200,164,32,4,0
clock.o,0.048123%,4,54,54,0,0,4
bsp_flash.o,0.048123%,4,5165,3656,1509,0,4
drv_uart.o,34.149483%,3180,1787,1708,79,0,3180
bsp_history.o,18.084192%,1684,1513,1404,109,0,1684
segger_rtt.o,12.972508%,1208,636,610,26,0,1208
startup_ciu32l051.o,10.996564%,1024,220,28,192,0,1024
ulog.o,6.325172%,589,2153,1950,203,0,589
idle.o,4.467354%,416,270,248,22,0,416
shell.o,3.017612%,281,1443,1412,31,0,281
scheduler.o,3.006873%,280,502,484,18,0,280
kservice.o,2.792096%,260,1994,1738,256,0,260
object.o,1.417526%,132,927,708,107,112,20
mem.o,0.773196%,72,1880,1512,368,0,72
perf_counter.o,0.601375%,56,310,298,4,8,48
console_be.o,0.515464%,48,54,50,4,0,48
timer.o,0.214777%,20,1157,1002,155,0,20
thread.o,0.128866%,12,2144,1902,242,0,12
irq.o,0.128866%,12,88,88,0,0,12
cpuport.o,0.128866%,12,308,308,0,0,12
bsp_rtc.o,0.064433%,6,699,600,99,0,6
mc_p.l,0.042955%,4,1021,884,133,4,0
errno.o,0.042955%,4,12,8,0,4,0
system_ciu32l051.o,0.042955%,4,200,164,32,4,0
clock.o,0.042955%,4,54,54,0,0,4
bsp_flash.o,0.042955%,4,4899,3420,1479,0,4

1 File_name ram_percent ram flash Code RO_data RW_data ZI_data
2 drv_uart.o 26.227142% 34.149483% 2180 3180 1999 1787 1920 1708 79 0 2180 3180
3 bsp_history.o 20.259865% 18.084192% 1684 1517 1513 1408 1404 109 0 1684
4 segger_rtt.o 14.533205% 12.972508% 1208 636 610 26 0 1208
5 startup_ciu32l051.o 12.319538% 10.996564% 1024 220 28 192 0 1024
6 ulog.o 7.086141% 6.325172% 589 2150 2153 1950 200 203 0 589
7 idle.o 5.004812% 4.467354% 416 270 248 22 0 416
8 shell.o 3.380655% 3.017612% 281 1443 1412 31 0 281
9 scheduler.o 3.368624% 3.006873% 280 502 484 18 0 280
10 kservice.o 3.128008% 2.792096% 260 1994 1738 256 0 260
11 object.o 1.588066% 1.417526% 132 927 708 107 112 20
12 mem.o 0.866217% 0.773196% 72 1880 1512 368 0 72
13 perf_counter.o 0.673725% 0.601375% 56 310 298 4 8 48
14 console_be.o 0.577478% 0.515464% 48 54 50 4 0 48
15 timer.o 0.240616% 0.214777% 20 1157 1002 155 0 20
16 thread.o 0.144370% 0.128866% 12 2144 1902 242 0 12
17 irq.o 0.144370% 0.128866% 12 88 88 0 0 12
18 cpuport.o 0.144370% 0.128866% 12 308 308 0 0 12
19 bsp_rtc.o 0.072185% 0.064433% 6 699 600 99 0 6
20 mc_p.l 0.048123% 0.042955% 4 1021 884 133 4 0
21 errno.o 0.048123% 0.042955% 4 12 8 0 4 0
22 system_ciu32l051.o 0.048123% 0.042955% 4 200 164 32 4 0
23 clock.o 0.048123% 0.042955% 4 54 54 0 0 4
24 bsp_flash.o 0.048123% 0.042955% 4 5165 4899 3656 3420 1509 1479 0 4

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

@ -120,10 +120,8 @@ std_status_t std_flash_word_program(uint32_t address, uint32_t prog_data)
{
/* 进入编程模式 */
std_flash_program_enable();
/* 向目标地址写入数据 */
*(uint32_t *)address = (uint32_t)prog_data;
/* 查询Flash忙状态及错误状态等待擦除完成 */
status = std_flash_wait_for_last_operation(FLASH_WAIT_PROGRAM);

View File

@ -2,7 +2,7 @@
* @Author: mbw
* @Date: 2024-08-22 16:15:08
* @LastEditors: mbw && 1600520629@qq.com
* @LastEditTime: 2024-09-04 08:59:24
* @LastEditTime: 2024-09-04 11:52:14
* @FilePath: \USART1_Interrupt - RT-Thread\bsp\src\bsp_flash.c
* @Description:
*
@ -62,7 +62,7 @@ const uint32_t hr_record_info_start_addr[9] = {
FLASH_UPDATE_TIME_ADDR,
};
static rt_ubase_t interrupt_value;
rt_ubase_t level = 0;
static void BSP_Flash_UnLock(void)
{
std_flash_unlock();
@ -76,12 +76,12 @@ static void BSP_Flash_Lock(void)
static void Flash_Interrupt_Disable(void)
{
interrupt_value = rt_hw_interrupt_disable();
level = rt_hw_interrupt_disable();
}
static void Flash_Interrupt_Enable(void)
{
rt_hw_interrupt_enable(interrupt_value);
rt_hw_interrupt_enable(level);
}
// 计算校验和的函数
@ -112,9 +112,14 @@ static size_t Flash_ReadWord(uint32_t addr, uint32_t *buf, size_t len)
RTT_LOG_E("addr %#X is not aligned\r\n", addr);
return ERROR;
}
for (size_t i = 0; i < len; i++, buf += 4, addr += 4, read_len++)
for (size_t i = 0; i < len; i++, read_len++)
{
*(uint32_t *)buf = *(uint32_t *)addr;
buf[i] = ((uint32_t *)addr)[i];
if (buf[i] != ((uint32_t *)addr)[i])
{
RTT_LOG_E("Flash_Read Data Mismatch at addr %#X, expected %d got %d", addr, *(uint32_t *)buf, *(uint32_t *)addr);
return ERROR;
}
}
return read_len;
@ -139,19 +144,19 @@ static std_status_t Flash_WriteWord(uint32_t addr, uint32_t write_data)
if (std_flash_get_lock_status() == false)
{
/* 进入编程模式 */
std_flash_program_enable();
// std_flash_program_enable();
Flash_Interrupt_Disable();
if (std_flash_word_program(addr, write_data) != SUCCESS) // 写入操作 字节写入
{
Flash_Interrupt_Enable();
LOG_D("addr = %#X, read %d", addr, *(uint32_t *)addr);
std_flash_program_disable();
// std_flash_program_disable();
BSP_Flash_Lock();
return ERROR;
}
Flash_Interrupt_Enable();
std_flash_program_disable();
// std_flash_program_disable();
BSP_Flash_Lock();
if (*(uint32_t *)addr != write_data)
{
@ -337,18 +342,27 @@ static std_status_t Flash_WritePage(uint32_t addr, uint32_t *buf, size_t len)
}
#endif
std_status_t Flash_ErasePage(uint32_t index)
{
std_flash_unlock();
RTT_LOG_D("ErasePage %d", index);
// Flash_Interrupt_Disable();
std_status_t status = std_flash_erase(FLASH_ERASE_PAGE, index);
// Flash_Interrupt_Enable();
std_flash_lock();
return status;
}
/**
* @description:
* @return {*}
*/
void Flash_ErasePage_ConfigInfo(void)
{
std_flash_unlock();
if (std_flash_page_erase(FLASH_HR_INFO_PAGE) != SUCCESS)
if (Flash_ErasePage(FLASH_HR_INFO_PAGE) != SUCCESS)
{
RTT_LOG_E("error_page = %#x\r\n");
}
std_flash_lock();
}
ErrorStatus BSP_Flash_Program_InfoPage(uint32_t address, uint32_t *data_buf)
@ -365,9 +379,12 @@ ErrorStatus BSP_Flash_Program_InfoPage(uint32_t address, uint32_t *data_buf)
return ERROR;
}
}
rt_thread_mdelay(2);
return ret;
}
/**
* @description:
* @param {uint8_t*} frame
@ -383,15 +400,7 @@ uint32_t Flash_Get_Current_Page(uint32_t addr)
{
return (addr - FLASH_START_ADDR) / FLASH_PAGE_BYTE_SIZE;
}
std_status_t Flash_ErasePage(uint32_t index)
{
std_flash_unlock();
RTT_LOG_D("ErasePage %d", index);
std_status_t status = std_flash_erase(FLASH_ERASE_PAGE, index);
std_flash_lock();
return status;
}
/**
* @description:
* @param {TeRecord} addr
@ -410,7 +419,6 @@ ErrorStatus Flash_ErasePage_Records(TeRecord record, uint8_t page_offset)
return ERROR;
}
if (Flash_ErasePage(erase_page) != SUCCESS)
{
RTT_LOG_E("Flash_ErasePage failed\r\n");
@ -448,11 +456,9 @@ ErrorStatus BSP_Flash_EraseRecodrs(void)
return ERROR;
}
}
}
/*擦除初始信息区*/
Flash_ErasePage_ConfigInfo();
return SUCCESS;
}
/**
@ -488,8 +494,6 @@ ErrorStatus Flash_GetProductTimeLimit(TuFlashHrRecordFrame *pLimitTime, TeFlashP
RTT_LOG_E("FactoryTime check_sum error\r\n");
return ERROR;
}
RTT_LOG_D("FactoryTime: %#X", pLimitTime->hr_data);
RTT_LOG_D("Flash_Read_FactoryTime:%04d-%02d-%02d,%02d:%02d",
BASE_YEAR + pLimitTime->time.year, pLimitTime->time.month, pLimitTime->time.day,
pLimitTime->time.hour, pLimitTime->time.minute);
@ -509,9 +513,6 @@ ErrorStatus Flash_GetProductTimeLimit(TuFlashHrRecordFrame *pLimitTime, TeFlashP
RTT_LOG_E("ExpirationTime check_sum error\r\n");
return ERROR;
}
RTT_LOG_D("kExpirationTimeId: %#X", pLimitTime->hr_data);
RTT_LOG_D("Flash_Read_ExpirationTime:%04d-%02d-%02d,%02d:%02d",
BASE_YEAR + pLimitTime->time.year, pLimitTime->time.month, pLimitTime->time.day,
pLimitTime->time.hour, pLimitTime->time.minute);
@ -537,6 +538,7 @@ void Flash_SetProductTimeLimit(uint16_t year, uint8_t mon, uint8_t day, uint8_t
TuFlashHrRecordFrame ReadLimitTime;
uint32_t page_buf[FLASH_PAGE_RECORD_WORD_NUM] = {0}; // 暂存最后一页的值
Flash_ErasePage_ReadConfigInfo(page_buf);
LimitTime.time.year = year - BASE_YEAR;
@ -554,10 +556,11 @@ void Flash_SetProductTimeLimit(uint16_t year, uint8_t mon, uint8_t day, uint8_t
{
page_buf[kFlashExpirationTime] = LimitTime.hr_data;
}
RTT_LOG_D("Flash_SetProductTimeLimit((%d)):%04d-%02d-%02d,%02d:%02d ", id, year, mon, day, hour, min);
// RTT_LOG_D("Flash_SetProductTimeLimit((%d)):%04d-%02d-%02d,%02d:%02d ", id, year, mon, day, hour, min);
Flash_Write_ConfigInfo(&page_buf[0]);
Flash_GetProductTimeLimit(&ReadLimitTime, id);
}
#endif
/**
* @description:
@ -568,23 +571,24 @@ int BSP_Flash_Init(void)
if (*(uint32_t *)FLASH_CONFIG_INFO_START_ADDR != FLASH_FIRST_INIT_VALUE)
{
uint32_t info_page_buf[FLASH_PAGE_RECORD_WORD_NUM / 2] = {0};
uint32_t info_page_buf[FLASH_PAGE_RECORD_WORD_NUM] = {0};
BSP_Flash_EraseRecodrs(); // 擦除历史数据区
// TODO: 此处需要完善,比如写入初始化标志位,写入产品信息,写入出厂时间,写入到期时间
info_page_buf[kFlashInitFlag] = FLASH_FIRST_INIT_VALUE;
if (Flash_Write_ConfigInfo(info_page_buf) != STD_OK)
{
RTT_LOG_E("Flash_Write_ConfigInfo failed\r\n");
return RT_ERROR;
}
// info_page_buf[kFlashInitFlag] = FLASH_FIRST_INIT_VALUE;
// if (Flash_Write_ConfigInfo(info_page_buf) != STD_OK)
// {
// RTT_LOG_E("Flash_Write_ConfigInfo failed\r\n");
// return RT_ERROR;
// }
Flash_SetProductTimeLimit(2024, 1, 2, 3, 4, kFactoryTimeId);
rt_thread_mdelay(100);
Flash_SetProductTimeLimit(2024 + 10, 1, 2, 3, 4, kExpirationTimeId);
}
return RT_EOK;
}
INIT_APP_EXPORT(BSP_Flash_Init);
#if 1
/**
@ -709,9 +713,8 @@ ErrorStatus Flash_Read_Record(TuFlashHrRecordFrame *pHrRecord, TeRecord record,
pHrRecord->time.hour, pHrRecord->time.minute);
RTT_LOG_D("read :hr_start_addr = %#x, index_addr: %#x, hr_num: %d, hr_page:%d, read_data : %#X\r\n",
Index_Frame.hr_start_addr, index_addr, Index_Frame.hr_num, Index_Frame.hr_page, pHrRecord.hr_data);
Index_Frame.hr_start_addr, index_addr, Index_Frame.hr_num, Index_Frame.hr_page, pHrRecord->hr_data);
return SUCCESS;
}
else

View File

@ -230,11 +230,11 @@ ErrorStatus HR_ProcessData(const TsFrameData *pHostFrameData)
}
case kGetCurrentTime: // AA 00 08 00 B2 55
{
// uint8_t rtctime[3] = {0}, rtcdate[3] = {0};
uint8_t rtctime[3] = {0}, rtcdate[3] = {0};
data_len = FRAME_DATA_LEN;
// BSP_Rtc_Get_Calendar(rtcdate, rtctime);
BSP_Rtc_Get_Calendar(rtcdate, rtctime);
data_field[0] = ((std_rtc_convert_bcd2bin(rtcdate[0]) + 2000) >> 8) & 0xFF;
data_field[1] = (std_rtc_convert_bcd2bin(rtcdate[0]) + 2000) & 0xFF;
@ -250,6 +250,7 @@ ErrorStatus HR_ProcessData(const TsFrameData *pHostFrameData)
goto send;
}
/*扩展指令*/
// case kSetFactoryTime: /*2024-03-26 9:30:00 AA 00 0B 07 07 E8 03 1A 09 1E 00 EF 55*/
// {
// LOG_D("kSetFactoryTime\r\n");
@ -335,8 +336,8 @@ static void hr_send_thread_entry(void *param)
static void Hr_Thread_Entry(void *param)
{
rt_uint8_t buf[32] = {0};
BSP_Flash_Init();
rt_thread_mdelay(100);
// BSP_Flash_Init();
// rt_thread_mdelay(100);
while (1)
{
rt_sem_take(hr_rx_sem, RT_WAITING_FOREVER); // 等待信号量

View File

@ -2,7 +2,7 @@
* @Author: mbw
* @Date: 2024-08-20 15:51:16
* @LastEditors: mbw && 1600520629@qq.com
* @LastEditTime: 2024-08-29 16:19:28
* @LastEditTime: 2024-09-04 11:54:28
* @FilePath: \USART1_Interrupt - RT-Thread\drivers\inc\drv_uart.h
* @Description:
* @
@ -45,7 +45,7 @@ typedef enum
/*------------------------------------------defines---------------------------------------------*/
/***********************UART1**************************** */
#define UART1_DMA_RX_THREAD_STACK_SIZE (1024)
#define UART1_DMA_RX_THREAD_STACK_SIZE (2024)
#define UART1_DMA_RX_THREAD_PRIORITY (20)
#define UART1_DMA_RX_THREAD_TIMESLICE (5)

View File

@ -2,7 +2,7 @@
* @Author: mbw
* @Date: 2024-08-19 10:10:06
* @LastEditors: mbw && 1600520629@qq.com
* @LastEditTime: 2024-08-28 14:09:18
* @LastEditTime: 2024-09-04 11:42:27
* @FilePath: \USART1_Interrupt - RT-Thread\user\Source\main.c
* @Description:
*
@ -41,11 +41,11 @@ int main(void)
{
// uint8_t rtctime[3], rtcdate[3];
LOG_I("test CIU32 L051 RT-Thread!\r\n");
LOG_I("SystemCoreClock = %d MHZ\n", SystemCoreClock/1000000);
// LOG_I("test CIU32 L051 RT-Thread!\r\n");
// LOG_I("SystemCoreClock = %d MHZ\n", SystemCoreClock/1000000);
UART1_SendString("test CIU32 L051 uart1 dma send RT-Thread!\r\n");
LPUART1_SendString("test CIU32 L051 Lpuart1 interrupt send RT-Thread!\r\n");
// UART1_SendString("test CIU32 L051 uart1 dma send RT-Thread!\r\n");
// LPUART1_SendString("test CIU32 L051 Lpuart1 interrupt send RT-Thread!\r\n");
while (1)
{
@ -56,7 +56,7 @@ int main(void)
// LOG_D("RTC Time: %04d-%02d-%02d %02d:%02d:%02d\n",
// 2000 + std_rtc_convert_bcd2bin(rtcdate[0]),std_rtc_convert_bcd2bin(rtcdate[1]), std_rtc_convert_bcd2bin(rtcdate[2]),
// std_rtc_convert_bcd2bin(rtctime[0]), std_rtc_convert_bcd2bin(rtctime[1]), std_rtc_convert_bcd2bin(rtctime[2]));
rt_thread_mdelay(50000);
rt_thread_mdelay(10);
}
}