对写入做了点优化
This commit is contained in:
parent
1e90139edb
commit
eb19651a5f
Binary file not shown.
|
@ -27,19 +27,19 @@ Project File Date: 09/02/2024
|
|||
<h2>Output:</h2>
|
||||
*** Using Compiler 'V6.21', folder: 'C:\Keil_v5\ARM\ARMCLANG\Bin'
|
||||
Build target 'USART1_Interrupt'
|
||||
compiling cpu.c...
|
||||
compiling slab.c...
|
||||
compiling cpu.c...
|
||||
compiling idle.c...
|
||||
../bsp/src/bsp_flash.c(16): warning: In file included from...
|
||||
compiling ulog.c...
|
||||
../bsp/src/bsp_flash.c(17): warning: In file included from...
|
||||
../LIB/perf_counter\perf_counter.h(285): warning: Please enable GNU extensions, it is required by __cycleof__() and __super_loop_monitor__() [-W#warnings]
|
||||
285 | #warning Please enable GNU extensions, it is required by __cycleof__() and \
|
||||
| ^
|
||||
1 warning generated.
|
||||
compiling bsp_flash.c...
|
||||
compiling ulog.c...
|
||||
compiling ipc.c...
|
||||
linking...
|
||||
Program Size: Code=28658 RO-data=5754 RW-data=128 ZI-data=8184
|
||||
Program Size: Code=28758 RO-data=5790 RW-data=128 ZI-data=8184
|
||||
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:
|
||||
|
@ -47,7 +47,7 @@ ram:
|
|||
16.00 KB :|¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö__________| 50.73 % ( 8.12 KB / 16.00 KB) [8072 B]
|
||||
flash:
|
||||
ER_IROM1 :0x8000000
|
||||
64.00 KB :|¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö__________| 52.51 % ( 33.61 KB / 64.00 KB) [31124 B]
|
||||
64.00 KB :|¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö__________| 52.72 % ( 33.74 KB / 64.00 KB) [30988 B]
|
||||
".\CIU32_L051_M307R.axf" - 0 Error(s), 1 Warning(s).
|
||||
|
||||
<h2>Software Packages used:</h2>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -3,9 +3,9 @@
|
|||
<title>Static Call Graph - [.\CIU32_L051_M307R.axf]</title></head>
|
||||
<body><HR>
|
||||
<H1>Static Call Graph for image .\CIU32_L051_M307R.axf</H1><HR>
|
||||
<BR><P>#<CALLGRAPH># ARM Linker, 6210000: Last Updated: Mon Sep 2 15:09:48 2024
|
||||
<BR><P>#<CALLGRAPH># ARM Linker, 6210000: Last Updated: Mon Sep 2 16:08:06 2024
|
||||
<BR><P>
|
||||
<H3>Maximum Stack Usage = 1008 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3>
|
||||
<H3>Maximum Stack Usage = 1048 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3>
|
||||
Call chain for Maximum Stack Depth:</H3>
|
||||
Hr_Thread_Entry ⇒ HR_ProcessData ⇒ Flash_GetRecord ⇒ ulog_output ⇒ ulog_voutput ⇒ output_lock ⇒ rt_mutex_take ⇒ rt_thread_control ⇒ rt_thread_startup ⇒ rt_thread_resume ⇒ rt_timer_stop ⇒ rt_object_get_type ⇒ rt_assert_handler ⇒ rt_kprintf ⇒ rt_hw_console_output ⇒ SEGGER_RTT_printf ⇒ SEGGER_RTT_vprintf ⇒ _PrintUnsigned ⇒ _StoreChar ⇒ SEGGER_RTT_Write ⇒ SEGGER_RTT_WriteNoLock ⇒ _WriteBlocking
|
||||
<P>
|
||||
|
@ -596,8 +596,8 @@ Global Symbols
|
|||
<BR>[Called By]<UL><LI><a href="#[7e]">>></a> Flash_Write_Record
|
||||
</UL>
|
||||
|
||||
<P><STRONG><a name="[78]"></a>Flash_GetIndex_Pos</STRONG> (Thumb, 192 bytes, Stack size 40 bytes, bsp_flash.o(.text.Flash_GetIndex_Pos))
|
||||
<BR><BR>[Stack]<UL><LI>Max Depth = 344<LI>Call Chain = Flash_GetIndex_Pos ⇒ SEGGER_RTT_printf ⇒ SEGGER_RTT_vprintf ⇒ _PrintUnsigned ⇒ _StoreChar ⇒ SEGGER_RTT_Write ⇒ SEGGER_RTT_WriteNoLock ⇒ _WriteBlocking
|
||||
<P><STRONG><a name="[78]"></a>Flash_GetIndex_Pos</STRONG> (Thumb, 204 bytes, Stack size 48 bytes, bsp_flash.o(.text.Flash_GetIndex_Pos))
|
||||
<BR><BR>[Stack]<UL><LI>Max Depth = 352<LI>Call Chain = Flash_GetIndex_Pos ⇒ SEGGER_RTT_printf ⇒ SEGGER_RTT_vprintf ⇒ _PrintUnsigned ⇒ _StoreChar ⇒ SEGGER_RTT_Write ⇒ SEGGER_RTT_WriteNoLock ⇒ _WriteBlocking
|
||||
</UL>
|
||||
<BR>[Calls]<UL><LI><a href="#[76]">>></a> SEGGER_RTT_printf
|
||||
</UL>
|
||||
|
@ -607,7 +607,7 @@ Global Symbols
|
|||
</UL>
|
||||
|
||||
<P><STRONG><a name="[26]"></a>Flash_GetNum_Records</STRONG> (Thumb, 18 bytes, Stack size 24 bytes, bsp_flash.o(.text.Flash_GetNum_Records))
|
||||
<BR><BR>[Stack]<UL><LI>Max Depth = 368<LI>Call Chain = Flash_GetNum_Records ⇒ Flash_GetIndex_Pos ⇒ SEGGER_RTT_printf ⇒ SEGGER_RTT_vprintf ⇒ _PrintUnsigned ⇒ _StoreChar ⇒ SEGGER_RTT_Write ⇒ SEGGER_RTT_WriteNoLock ⇒ _WriteBlocking
|
||||
<BR><BR>[Stack]<UL><LI>Max Depth = 376<LI>Call Chain = Flash_GetNum_Records ⇒ Flash_GetIndex_Pos ⇒ SEGGER_RTT_printf ⇒ SEGGER_RTT_vprintf ⇒ _PrintUnsigned ⇒ _StoreChar ⇒ SEGGER_RTT_Write ⇒ SEGGER_RTT_WriteNoLock ⇒ _WriteBlocking
|
||||
</UL>
|
||||
<BR>[Calls]<UL><LI><a href="#[78]">>></a> Flash_GetIndex_Pos
|
||||
</UL>
|
||||
|
@ -628,8 +628,8 @@ Global Symbols
|
|||
<BR>[Called By]<UL><LI><a href="#[86]">>></a> HR_ProcessData
|
||||
</UL>
|
||||
|
||||
<P><STRONG><a name="[7a]"></a>Flash_Read_Record</STRONG> (Thumb, 380 bytes, Stack size 88 bytes, bsp_flash.o(.text.Flash_Read_Record))
|
||||
<BR><BR>[Stack]<UL><LI>Max Depth = 432<LI>Call Chain = Flash_Read_Record ⇒ Flash_GetIndex_Pos ⇒ SEGGER_RTT_printf ⇒ SEGGER_RTT_vprintf ⇒ _PrintUnsigned ⇒ _StoreChar ⇒ SEGGER_RTT_Write ⇒ SEGGER_RTT_WriteNoLock ⇒ _WriteBlocking
|
||||
<P><STRONG><a name="[7a]"></a>Flash_Read_Record</STRONG> (Thumb, 384 bytes, Stack size 88 bytes, bsp_flash.o(.text.Flash_Read_Record))
|
||||
<BR><BR>[Stack]<UL><LI>Max Depth = 440<LI>Call Chain = Flash_Read_Record ⇒ Flash_GetIndex_Pos ⇒ SEGGER_RTT_printf ⇒ SEGGER_RTT_vprintf ⇒ _PrintUnsigned ⇒ _StoreChar ⇒ SEGGER_RTT_Write ⇒ SEGGER_RTT_WriteNoLock ⇒ _WriteBlocking
|
||||
</UL>
|
||||
<BR>[Calls]<UL><LI><a href="#[78]">>></a> Flash_GetIndex_Pos
|
||||
<LI><a href="#[7b]">>></a> Sum_Check
|
||||
|
@ -640,12 +640,13 @@ Global Symbols
|
|||
<LI><a href="#[79]">>></a> Flash_GetRecord
|
||||
</UL>
|
||||
|
||||
<P><STRONG><a name="[7e]"></a>Flash_Write_Record</STRONG> (Thumb, 468 bytes, Stack size 104 bytes, bsp_flash.o(.text.Flash_Write_Record))
|
||||
<BR><BR>[Stack]<UL><LI>Max Depth = 680<LI>Call Chain = Flash_Write_Record ⇒ Flash_WriteWord ⇒ ulog_output ⇒ ulog_voutput ⇒ output_lock ⇒ rt_mutex_take ⇒ rt_thread_control ⇒ rt_thread_startup ⇒ rt_thread_resume ⇒ rt_timer_stop ⇒ rt_object_get_type ⇒ rt_assert_handler ⇒ rt_kprintf ⇒ rt_hw_console_output ⇒ SEGGER_RTT_printf ⇒ SEGGER_RTT_vprintf ⇒ _PrintUnsigned ⇒ _StoreChar ⇒ SEGGER_RTT_Write ⇒ SEGGER_RTT_WriteNoLock ⇒ _WriteBlocking
|
||||
<P><STRONG><a name="[7e]"></a>Flash_Write_Record</STRONG> (Thumb, 492 bytes, Stack size 112 bytes, bsp_flash.o(.text.Flash_Write_Record))
|
||||
<BR><BR>[Stack]<UL><LI>Max Depth = 688<LI>Call Chain = Flash_Write_Record ⇒ Flash_WriteWord ⇒ ulog_output ⇒ ulog_voutput ⇒ output_lock ⇒ rt_mutex_take ⇒ rt_thread_control ⇒ rt_thread_startup ⇒ rt_thread_resume ⇒ rt_timer_stop ⇒ rt_object_get_type ⇒ rt_assert_handler ⇒ rt_kprintf ⇒ rt_hw_console_output ⇒ SEGGER_RTT_printf ⇒ SEGGER_RTT_vprintf ⇒ _PrintUnsigned ⇒ _StoreChar ⇒ SEGGER_RTT_Write ⇒ SEGGER_RTT_WriteNoLock ⇒ _WriteBlocking
|
||||
</UL>
|
||||
<BR>[Calls]<UL><LI><a href="#[7a]">>></a> Flash_Read_Record
|
||||
<LI><a href="#[78]">>></a> Flash_GetIndex_Pos
|
||||
<LI><a href="#[75]">>></a> Flash_ErasePage
|
||||
<LI><a href="#[7b]">>></a> Sum_Check
|
||||
<LI><a href="#[7c]">>></a> Flash_WriteWord
|
||||
<LI><a href="#[76]">>></a> SEGGER_RTT_printf
|
||||
<LI><a href="#[7f]">>></a> BSP_Rtc_Get_Calendar
|
||||
|
@ -674,8 +675,8 @@ Global Symbols
|
|||
<BR>[Called By]<UL><LI><a href="#[25]">>></a> Hr_Thread_Entry
|
||||
</UL>
|
||||
|
||||
<P><STRONG><a name="[86]"></a>HR_ProcessData</STRONG> (Thumb, 488 bytes, Stack size 360 bytes, bsp_history.o(.text.HR_ProcessData))
|
||||
<BR><BR>[Stack]<UL><LI>Max Depth = 968<LI>Call Chain = HR_ProcessData ⇒ Flash_GetRecord ⇒ ulog_output ⇒ ulog_voutput ⇒ output_lock ⇒ rt_mutex_take ⇒ rt_thread_control ⇒ rt_thread_startup ⇒ rt_thread_resume ⇒ rt_timer_stop ⇒ rt_object_get_type ⇒ rt_assert_handler ⇒ rt_kprintf ⇒ rt_hw_console_output ⇒ SEGGER_RTT_printf ⇒ SEGGER_RTT_vprintf ⇒ _PrintUnsigned ⇒ _StoreChar ⇒ SEGGER_RTT_Write ⇒ SEGGER_RTT_WriteNoLock ⇒ _WriteBlocking
|
||||
<P><STRONG><a name="[86]"></a>HR_ProcessData</STRONG> (Thumb, 548 bytes, Stack size 400 bytes, bsp_history.o(.text.HR_ProcessData))
|
||||
<BR><BR>[Stack]<UL><LI>Max Depth = 1008<LI>Call Chain = HR_ProcessData ⇒ Flash_GetRecord ⇒ ulog_output ⇒ ulog_voutput ⇒ output_lock ⇒ rt_mutex_take ⇒ rt_thread_control ⇒ rt_thread_startup ⇒ rt_thread_resume ⇒ rt_timer_stop ⇒ rt_object_get_type ⇒ rt_assert_handler ⇒ rt_kprintf ⇒ rt_hw_console_output ⇒ SEGGER_RTT_printf ⇒ SEGGER_RTT_vprintf ⇒ _PrintUnsigned ⇒ _StoreChar ⇒ SEGGER_RTT_Write ⇒ SEGGER_RTT_WriteNoLock ⇒ _WriteBlocking
|
||||
</UL>
|
||||
<BR>[Calls]<UL><LI><a href="#[76]">>></a> SEGGER_RTT_printf
|
||||
<LI><a href="#[89]">>></a> LPUART1_Write
|
||||
|
@ -839,7 +840,8 @@ Global Symbols
|
|||
</UL>
|
||||
|
||||
<P><STRONG><a name="[7b]"></a>Sum_Check</STRONG> (Thumb, 30 bytes, Stack size 0 bytes, bsp_flash.o(.text.Sum_Check))
|
||||
<BR><BR>[Called By]<UL><LI><a href="#[7a]">>></a> Flash_Read_Record
|
||||
<BR><BR>[Called By]<UL><LI><a href="#[7e]">>></a> Flash_Write_Record
|
||||
<LI><a href="#[7a]">>></a> Flash_Read_Record
|
||||
</UL>
|
||||
|
||||
<P><STRONG><a name="[5]"></a>SysTick_Handler</STRONG> (Thumb, 16 bytes, Stack size 8 bytes, board.o(.text.SysTick_Handler))
|
||||
|
@ -2644,7 +2646,7 @@ Local Symbols
|
|||
</UL>
|
||||
|
||||
<P><STRONG><a name="[25]"></a>Hr_Thread_Entry</STRONG> (Thumb, 140 bytes, Stack size 40 bytes, bsp_history.o(.text.Hr_Thread_Entry))
|
||||
<BR><BR>[Stack]<UL><LI>Max Depth = 1008<LI>Call Chain = Hr_Thread_Entry ⇒ HR_ProcessData ⇒ Flash_GetRecord ⇒ ulog_output ⇒ ulog_voutput ⇒ output_lock ⇒ rt_mutex_take ⇒ rt_thread_control ⇒ rt_thread_startup ⇒ rt_thread_resume ⇒ rt_timer_stop ⇒ rt_object_get_type ⇒ rt_assert_handler ⇒ rt_kprintf ⇒ rt_hw_console_output ⇒ SEGGER_RTT_printf ⇒ SEGGER_RTT_vprintf ⇒ _PrintUnsigned ⇒ _StoreChar ⇒ SEGGER_RTT_Write ⇒ SEGGER_RTT_WriteNoLock ⇒ _WriteBlocking
|
||||
<BR><BR>[Stack]<UL><LI>Max Depth = 1048<LI>Call Chain = Hr_Thread_Entry ⇒ HR_ProcessData ⇒ Flash_GetRecord ⇒ ulog_output ⇒ ulog_voutput ⇒ output_lock ⇒ rt_mutex_take ⇒ rt_thread_control ⇒ rt_thread_startup ⇒ rt_thread_resume ⇒ rt_timer_stop ⇒ rt_object_get_type ⇒ rt_assert_handler ⇒ rt_kprintf ⇒ rt_hw_console_output ⇒ SEGGER_RTT_printf ⇒ SEGGER_RTT_vprintf ⇒ _PrintUnsigned ⇒ _StoreChar ⇒ SEGGER_RTT_Write ⇒ SEGGER_RTT_WriteNoLock ⇒ _WriteBlocking
|
||||
</UL>
|
||||
<BR>[Calls]<UL><LI><a href="#[8e]">>></a> rt_free
|
||||
<LI><a href="#[8d]">>></a> ulog_hexdump
|
||||
|
@ -2689,7 +2691,7 @@ Local Symbols
|
|||
</UL>
|
||||
|
||||
<P><STRONG><a name="[3f]"></a>TEST_Flash_Write_Record</STRONG> (Thumb, 88 bytes, Stack size 32 bytes, bsp_flash.o(.text.TEST_Flash_Write_Record))
|
||||
<BR><BR>[Stack]<UL><LI>Max Depth = 712<LI>Call Chain = TEST_Flash_Write_Record ⇒ Flash_Write_Record ⇒ Flash_WriteWord ⇒ ulog_output ⇒ ulog_voutput ⇒ output_lock ⇒ rt_mutex_take ⇒ rt_thread_control ⇒ rt_thread_startup ⇒ rt_thread_resume ⇒ rt_timer_stop ⇒ rt_object_get_type ⇒ rt_assert_handler ⇒ rt_kprintf ⇒ rt_hw_console_output ⇒ SEGGER_RTT_printf ⇒ SEGGER_RTT_vprintf ⇒ _PrintUnsigned ⇒ _StoreChar ⇒ SEGGER_RTT_Write ⇒ SEGGER_RTT_WriteNoLock ⇒ _WriteBlocking
|
||||
<BR><BR>[Stack]<UL><LI>Max Depth = 720<LI>Call Chain = TEST_Flash_Write_Record ⇒ Flash_Write_Record ⇒ Flash_WriteWord ⇒ ulog_output ⇒ ulog_voutput ⇒ output_lock ⇒ rt_mutex_take ⇒ rt_thread_control ⇒ rt_thread_startup ⇒ rt_thread_resume ⇒ rt_timer_stop ⇒ rt_object_get_type ⇒ rt_assert_handler ⇒ rt_kprintf ⇒ rt_hw_console_output ⇒ SEGGER_RTT_printf ⇒ SEGGER_RTT_vprintf ⇒ _PrintUnsigned ⇒ _StoreChar ⇒ SEGGER_RTT_Write ⇒ SEGGER_RTT_WriteNoLock ⇒ _WriteBlocking
|
||||
</UL>
|
||||
<BR>[Calls]<UL><LI><a href="#[7e]">>></a> Flash_Write_Record
|
||||
<LI><a href="#[76]">>></a> SEGGER_RTT_printf
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -10,6 +10,7 @@
|
|||
<TargetName>USART1_Interrupt</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pArmCC>6210000::V6.21::ARMCLANG</pArmCC>
|
||||
<pCCUsed>6210000::V6.21::ARMCLANG</pCCUsed>
|
||||
<uAC6>1</uAC6>
|
||||
<TargetOption>
|
||||
|
@ -330,7 +331,7 @@
|
|||
<uGnu>1</uGnu>
|
||||
<useXO>0</useXO>
|
||||
<v6Lang>3</v6Lang>
|
||||
<v6LangP>3</v6LangP>
|
||||
<v6LangP>2</v6LangP>
|
||||
<vShortEn>1</vShortEn>
|
||||
<vShortWch>1</vShortWch>
|
||||
<v6Lto>0</v6Lto>
|
||||
|
|
|
@ -47,7 +47,7 @@ I (..\RTOS\inc\rthw.h\.\LIB\lwrb\lwrb.h)(0x00000000)
|
|||
I (C:\Keil_v5\ARM\ARMCLANG\include\string.hr\bsp\inc\bsp_rtc.h)(0x00000000)
|
||||
I (..\RTOS\components\utilities\ulog\ulog.h)(0x666E44C6)
|
||||
I (..\RTOS\components\utilities\ulog\ulog_def.h)(0x666E44C6)
|
||||
F (..\bsp\src\bsp_rtc.c)(0x66C825F1)(-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_rtc.o -MD)
|
||||
F (..\bsp\src\bsp_rtc.c)(0x66D56DC6)(-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_rtc.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)
|
||||
|
@ -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)(0x66D54867)(-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)(0x66D56FAC)(-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)(0x66D5648C)(-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)(0x66D5725A)(-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)
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
[Found keyword]: ----------Execution Region----------
|
||||
[name]: ER_IROM1
|
||||
[Exec base]: 0x8000000
|
||||
[Size]: 0x866c
|
||||
[Size]: 0x86f4
|
||||
[Max]: 0x10000
|
||||
[Found keyword]: ----------Execution Region----------
|
||||
[name]: RW_IRAM1
|
||||
|
@ -17,7 +17,7 @@
|
|||
RW_IRAM1 :0x20000000
|
||||
16.00 KB :|¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö¡ö__________| 50.73 % ( 8.12 KB / 16.00 KB) [8072 B]
|
||||
ER_IROM1 :0x8000000
|
||||
64.00 KB :|ĄöĄöĄöĄöĄöĄöĄöĄöĄöĄö__________| 52.51 % ( 33.61 KB / 64.00 KB) [31124 B]
|
||||
64.00 KB :|ĄöĄöĄöĄöĄöĄöĄöĄöĄöĄö__________| 52.72 % ( 33.74 KB / 64.00 KB) [30988 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,65 +1,65 @@
|
|||
File_name,flash percent,flash,ram,Code,RO_data,RW_data,ZI_data
|
||||
bsp_flash.o,10.751233%,3814,4,2360,1454,0,4
|
||||
cmd.o,10.116983%,3589,0,2592,997,0,0
|
||||
ipc.o,6.872446%,2438,0,1424,1014,0,0
|
||||
ulog.o,6.060606%,2150,589,1950,200,0,589
|
||||
thread.o,6.043693%,2144,12,1902,242,0,12
|
||||
kservice.o,5.620860%,1994,260,1738,256,0,260
|
||||
drv_uart.o,5.482734%,1945,2180,1916,29,0,2180
|
||||
mem.o,5.299507%,1880,72,1512,368,0,72
|
||||
shell.o,4.067653%,1443,281,1412,31,0,281
|
||||
bsp_history.o,3.991543%,1416,1684,1344,72,0,1684
|
||||
timer.o,3.261452%,1157,20,1002,155,0,20
|
||||
mc_p.l,2.878083%,1021,4,884,133,4,0
|
||||
segger_rtt_printf.o,2.813249%,998,0,998,0,0,0
|
||||
msh.o,2.663848%,945,0,784,161,0,0
|
||||
object.o,2.613108%,927,132,708,107,112,20
|
||||
segger_rtt.o,1.792812%,636,1208,610,26,0,1208
|
||||
bsp_rtc.o,1.767442%,627,0,528,99,0,0
|
||||
lwrb.o,1.725159%,612,0,612,0,0,0
|
||||
scheduler.o,1.415081%,502,280,484,18,0,280
|
||||
ciu32l051_std_lpuart.o,0.935870%,332,0,332,0,0,0
|
||||
main.o,0.913319%,324,0,244,80,0,0
|
||||
perf_counter.o,0.873855%,310,56,298,4,8,48
|
||||
cpuport.o,0.868217%,308,12,308,0,0,12
|
||||
idle.o,0.761099%,270,416,248,22,0,416
|
||||
components.o,0.687808%,244,0,228,16,0,0
|
||||
ciu32l051_std_rtc.o,0.665257%,236,0,236,0,0,0
|
||||
startup_ciu32l051.o,0.620155%,220,1024,28,192,0,1024
|
||||
context_rvds.o,0.608880%,216,0,216,0,0,0
|
||||
ciu32l051_std_rcc.o,0.608880%,216,0,216,0,0,0
|
||||
drv_common.o,0.575053%,204,0,204,0,0,0
|
||||
system_ciu32l051.o,0.563777%,200,4,164,32,4,0
|
||||
ciu32l051_std_flash.o,0.529951%,188,0,188,0,0,0
|
||||
ciu32l051_std_usart.o,0.524313%,186,0,186,0,0,0
|
||||
_strtoul.o,0.467935%,166,0,166,0,0,0
|
||||
perf_os_patch_rt_thread.o,0.445384%,158,0,154,4,0,0
|
||||
ciu32l051_std_gpio.o,0.434109%,154,0,154,0,0,0
|
||||
ctype_o.o,0.397463%,141,0,8,133,0,0
|
||||
board.o,0.366455%,130,0,130,0,0,0
|
||||
strtol.o,0.315715%,112,0,112,0,0,0
|
||||
ciu32l051_std_dma.o,0.281889%,100,0,100,0,0,0
|
||||
uldiv.o,0.270613%,96,0,96,0,0,0
|
||||
irq.o,0.248062%,88,12,88,0,0,12
|
||||
uidiv_div0.o,0.174771%,62,0,62,0,0,0
|
||||
console_be.o,0.152220%,54,48,50,4,0,48
|
||||
clock.o,0.152220%,54,4,54,0,0,4
|
||||
init.o,0.135307%,48,0,48,0,0,0
|
||||
cpp_init.o,0.112755%,40,0,40,0,0,0
|
||||
memseta.o,0.101480%,36,0,36,0,0,0
|
||||
memcpya.o,0.101480%,36,0,36,0,0,0
|
||||
llushr.o,0.095842%,34,0,34,0,0,0
|
||||
llshl.o,0.090204%,32,0,32,0,0,0
|
||||
strncmp.o,0.084567%,30,0,30,0,0,0
|
||||
handlers.o,0.084567%,30,0,30,0,0,0
|
||||
_chval.o,0.084567%,30,0,30,0,0,0
|
||||
strncpy.o,0.073291%,26,0,26,0,0,0
|
||||
memcmp.o,0.073291%,26,0,26,0,0,0
|
||||
atoi.o,0.073291%,26,0,26,0,0,0
|
||||
ciu32l051_std.o,0.067653%,24,0,24,0,0,0
|
||||
strlen.o,0.039464%,14,0,14,0,0,0
|
||||
errno.o,0.033827%,12,4,8,0,4,0
|
||||
entry9a.o,0.022551%,8,0,8,0,0,0
|
||||
entry2.o,0.022551%,8,0,8,0,0,0
|
||||
entry8a.o,0.011276%,4,0,4,0,0,0
|
||||
entry5.o,0.011276%,4,0,4,0,0,0
|
||||
bsp_flash.o,10.822195%,3854,4,2400,1454,0,4
|
||||
cmd.o,10.078064%,3589,0,2592,997,0,0
|
||||
ipc.o,6.846007%,2438,0,1424,1014,0,0
|
||||
ulog.o,6.037291%,2150,589,1950,200,0,589
|
||||
thread.o,6.020442%,2144,12,1902,242,0,12
|
||||
kservice.o,5.599236%,1994,260,1738,256,0,260
|
||||
drv_uart.o,5.461642%,1945,2180,1916,29,0,2180
|
||||
mem.o,5.279119%,1880,72,1512,368,0,72
|
||||
bsp_history.o,4.248568%,1513,1684,1404,109,0,1684
|
||||
shell.o,4.052005%,1443,281,1412,31,0,281
|
||||
timer.o,3.248905%,1157,20,1002,155,0,20
|
||||
mc_p.l,2.867011%,1021,4,884,133,4,0
|
||||
segger_rtt_printf.o,2.802426%,998,0,998,0,0,0
|
||||
msh.o,2.653600%,945,0,784,161,0,0
|
||||
object.o,2.603055%,927,132,708,107,112,20
|
||||
segger_rtt.o,1.785915%,636,1208,610,26,0,1208
|
||||
bsp_rtc.o,1.760643%,627,0,528,99,0,0
|
||||
lwrb.o,1.718522%,612,0,612,0,0,0
|
||||
scheduler.o,1.409637%,502,280,484,18,0,280
|
||||
ciu32l051_std_lpuart.o,0.932270%,332,0,332,0,0,0
|
||||
main.o,0.909806%,324,0,244,80,0,0
|
||||
perf_counter.o,0.870493%,310,56,298,4,8,48
|
||||
cpuport.o,0.864877%,308,12,308,0,0,12
|
||||
idle.o,0.758171%,270,416,248,22,0,416
|
||||
components.o,0.685162%,244,0,228,16,0,0
|
||||
ciu32l051_std_rtc.o,0.662698%,236,0,236,0,0,0
|
||||
startup_ciu32l051.o,0.617769%,220,1024,28,192,0,1024
|
||||
context_rvds.o,0.606537%,216,0,216,0,0,0
|
||||
ciu32l051_std_rcc.o,0.606537%,216,0,216,0,0,0
|
||||
drv_common.o,0.572841%,204,0,204,0,0,0
|
||||
system_ciu32l051.o,0.561608%,200,4,164,32,4,0
|
||||
ciu32l051_std_flash.o,0.527912%,188,0,188,0,0,0
|
||||
ciu32l051_std_usart.o,0.522296%,186,0,186,0,0,0
|
||||
_strtoul.o,0.466135%,166,0,166,0,0,0
|
||||
perf_os_patch_rt_thread.o,0.443671%,158,0,154,4,0,0
|
||||
ciu32l051_std_gpio.o,0.432438%,154,0,154,0,0,0
|
||||
ctype_o.o,0.395934%,141,0,8,133,0,0
|
||||
board.o,0.365045%,130,0,130,0,0,0
|
||||
strtol.o,0.314501%,112,0,112,0,0,0
|
||||
ciu32l051_std_dma.o,0.280804%,100,0,100,0,0,0
|
||||
uldiv.o,0.269572%,96,0,96,0,0,0
|
||||
irq.o,0.247108%,88,12,88,0,0,12
|
||||
uidiv_div0.o,0.174099%,62,0,62,0,0,0
|
||||
console_be.o,0.151634%,54,48,50,4,0,48
|
||||
clock.o,0.151634%,54,4,54,0,0,4
|
||||
init.o,0.134786%,48,0,48,0,0,0
|
||||
cpp_init.o,0.112322%,40,0,40,0,0,0
|
||||
memseta.o,0.101090%,36,0,36,0,0,0
|
||||
memcpya.o,0.101090%,36,0,36,0,0,0
|
||||
llushr.o,0.095473%,34,0,34,0,0,0
|
||||
llshl.o,0.089857%,32,0,32,0,0,0
|
||||
strncmp.o,0.084241%,30,0,30,0,0,0
|
||||
handlers.o,0.084241%,30,0,30,0,0,0
|
||||
_chval.o,0.084241%,30,0,30,0,0,0
|
||||
strncpy.o,0.073009%,26,0,26,0,0,0
|
||||
memcmp.o,0.073009%,26,0,26,0,0,0
|
||||
atoi.o,0.073009%,26,0,26,0,0,0
|
||||
ciu32l051_std.o,0.067393%,24,0,24,0,0,0
|
||||
strlen.o,0.039313%,14,0,14,0,0,0
|
||||
errno.o,0.033697%,12,4,8,0,4,0
|
||||
entry9a.o,0.022464%,8,0,8,0,0,0
|
||||
entry2.o,0.022464%,8,0,8,0,0,0
|
||||
entry8a.o,0.011232%,4,0,4,0,0,0
|
||||
entry5.o,0.011232%,4,0,4,0,0,0
|
||||
|
|
|
|
@ -1,6 +1,6 @@
|
|||
File_name,ram_percent,ram,flash,Code,RO_data,RW_data,ZI_data
|
||||
drv_uart.o,26.246088%,2180,1945,1916,29,0,2180
|
||||
bsp_history.o,20.274500%,1684,1416,1344,72,0,1684
|
||||
bsp_history.o,20.274500%,1684,1513,1404,109,0,1684
|
||||
segger_rtt.o,14.543703%,1208,636,610,26,0,1208
|
||||
startup_ciu32l051.o,12.328437%,1024,220,28,192,0,1024
|
||||
ulog.o,7.091259%,589,2150,1950,200,0,589
|
||||
|
@ -20,4 +20,4 @@ mc_p.l,0.048158%,4,1021,884,133,4,0
|
|||
errno.o,0.048158%,4,12,8,0,4,0
|
||||
system_ciu32l051.o,0.048158%,4,200,164,32,4,0
|
||||
clock.o,0.048158%,4,54,54,0,0,4
|
||||
bsp_flash.o,0.048158%,4,3814,2360,1454,0,4
|
||||
bsp_flash.o,0.048158%,4,3854,2400,1454,0,4
|
||||
|
|
|
BIN
MDK/bsp_flash.o
BIN
MDK/bsp_flash.o
Binary file not shown.
Binary file not shown.
BIN
MDK/bsp_rtc.o
BIN
MDK/bsp_rtc.o
Binary file not shown.
|
@ -160,7 +160,7 @@ typedef struct
|
|||
#pragma pack(push, 1)
|
||||
typedef union
|
||||
{
|
||||
struct
|
||||
struct __attribute__((packed))
|
||||
{
|
||||
uint32_t year : 4; // 16年
|
||||
uint32_t month : 4;
|
||||
|
@ -173,6 +173,7 @@ typedef union
|
|||
} TuFlashHrRecordFrame;
|
||||
#pragma pack(pop)
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kFactoryTimeId,
|
||||
|
|
|
@ -10,15 +10,12 @@
|
|||
#ifndef __BSP_HISTORY_H__
|
||||
#define __BSP_HISTORY_H__
|
||||
|
||||
|
||||
|
||||
#include "rtthread.h"
|
||||
#include "rtdef.h"
|
||||
|
||||
#define HR_THREAD_STACK_SIZE (1536)
|
||||
#define HR_THREAD_PRIORITY (10)
|
||||
#define HR_THREAD_TIMESLICE (5)
|
||||
|
||||
#define HR_THREAD_STACK_SIZE (1536)
|
||||
#define HR_THREAD_PRIORITY (10)
|
||||
#define HR_THREAD_TIMESLICE (5)
|
||||
|
||||
/*一组数据帧:帧头(1字节) + 控制码(2字节) + 帧长度(1字节) + 数据(n字节) + 校验码 + 帧尾(1字节)*/
|
||||
/*帧头:0xAA*/
|
||||
|
@ -43,33 +40,6 @@ typedef enum
|
|||
kPowerOnRecord, // at least 50
|
||||
kSensorFailureRecord, // at least 1
|
||||
kGetCurrentTime,
|
||||
|
||||
// 以下是在国标原基础上所扩展的
|
||||
kGetCurrentTimeSecond, // include second
|
||||
|
||||
kSetCurrentTime,
|
||||
kSetFactoryTime,
|
||||
kSetExpirationTime,
|
||||
|
||||
kSetAlarmValue,
|
||||
|
||||
kOutSysStatus, // 0x0E 不能动,因为说明书里面写好了
|
||||
|
||||
kGetAlarmValue,
|
||||
|
||||
kGetMqVoltage,
|
||||
|
||||
kSetSysStatus,
|
||||
kGetSysStatus,
|
||||
|
||||
kEraseRecords,
|
||||
|
||||
kGetFactoryTime,
|
||||
kGetExpirationTime,
|
||||
|
||||
// kGetEsig,
|
||||
|
||||
kReboot,
|
||||
} TeFrameC2;
|
||||
|
||||
#pragma pack(1)
|
||||
|
@ -85,7 +55,7 @@ typedef struct
|
|||
#pragma pack()
|
||||
|
||||
#pragma pack(1)
|
||||
typedef struct
|
||||
typedef struct
|
||||
{
|
||||
rt_uint8_t c1;
|
||||
TeFrameC2 c2;
|
||||
|
@ -102,16 +72,14 @@ typedef struct
|
|||
} TsRawFrameData;
|
||||
#pragma pack()
|
||||
|
||||
|
||||
|
||||
extern rt_sem_t hr_rx_sem;
|
||||
int BSP_HR_Init(void);
|
||||
|
||||
// TsFrameData *HR_GetFrameData(const rt_uint8_t *p_src, const rt_uint8_t src_len);
|
||||
// std_status_t HR_ProcessData(const TsFrameData *pHostFrameData);
|
||||
// uint8_t HR_ProcessData(const TsFrameData *pHostFrameData);
|
||||
// rt_uint8_t HR_ProcessData(const TsFrameData *pHostFrameData);
|
||||
TsFrameData *HR_GetFrameData(const rt_uint8_t *p_src, const rt_uint8_t src_len);
|
||||
std_status_t HR_ProcessData(const TsFrameData *pHostFrameData);
|
||||
uint8_t HR_ProcessData(const TsFrameData *pHostFrameData);
|
||||
rt_uint8_t HR_ProcessData(const TsFrameData *pHostFrameData);
|
||||
|
||||
// rt_uint8_t HR_GenerateRawFrame(TsRawFrameData *pRawData, rt_uint8_t c1, TeFrameC2 c2, const rt_uint8_t *p_src, rt_uint8_t src_len);
|
||||
rt_uint8_t HR_GenerateRawFrame(TsRawFrameData *pRawData, rt_uint8_t c1, TeFrameC2 c2, const rt_uint8_t *p_src, rt_uint8_t src_len);
|
||||
|
||||
#endif // !__BSP_HISTORY_H__
|
||||
|
|
|
@ -11,7 +11,6 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
|
||||
|
||||
void BSP_Rtc_Get_Calendar(uint8_t *rtcdate, uint8_t *rtctime);
|
||||
void BSP_Rtc_Alarm_Config(uint8_t hours, uint8_t minutes, uint8_t seconds);
|
||||
void BSP_Rtc_DateTime_Cfg(uint8_t years, uint8_t months, uint8_t days, uint8_t hour, uint8_t minute, uint8_t second, uint8_t week);
|
||||
|
|
|
@ -2,12 +2,13 @@
|
|||
* @Author: mbw
|
||||
* @Date: 2024-08-22 16:15:08
|
||||
* @LastEditors: mbw && 1600520629@qq.com
|
||||
* @LastEditTime: 2024-09-02 15:08:16
|
||||
* @LastEditTime: 2024-09-02 16:07:00
|
||||
* @FilePath: \USART1_Interrupt - RT-Thread\bsp\src\bsp_flash.c
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) 2024 by ${git_name_email}, All Rights Reserved.
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) 2024 by ${git_name_email}, All Rights Reserved.
|
||||
*/
|
||||
|
||||
#include "bsp_flash.h"
|
||||
#include "bsp_rtc.h"
|
||||
#include "rthw.h"
|
||||
|
@ -449,6 +450,10 @@ TsRecordIndex Flash_GetIndex_Pos(TeRecord record)
|
|||
{
|
||||
Index_Frame.hr_start_addr = start_addr_default;
|
||||
Index_Frame.hr_index_addr = Index_Frame.hr_start_addr;
|
||||
if (*(uint32_t *)(start_addr_default) == FLASH_DEFAULT_VALUE)
|
||||
{
|
||||
Index_Frame.hr_num = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return Index_Frame;
|
||||
|
@ -505,7 +510,7 @@ ErrorStatus Flash_Read_Record(TuFlashHrRecordFrame *pHrRecord, TeRecord record,
|
|||
RecoderFrame.hr_data = (*(uint32_t *)index_addr);
|
||||
sum_check = Sum_Check(RecoderFrame);
|
||||
|
||||
if (RecoderFrame.time.check_sum != sum_check)
|
||||
if (RecoderFrame.time.check_sum == sum_check)
|
||||
{
|
||||
RTT_LOG_D("Flash_Read_(%d)Record(%d):%04d-%02d-%02d,%02d:%02d", record, index,
|
||||
BASE_YEAR + pHrRecord->time.year, pHrRecord->time.month, pHrRecord->time.day,
|
||||
|
@ -579,6 +584,7 @@ ErrorStatus Flash_Write_Record(TeRecord record)
|
|||
RecoderFrame.time.year = (std_rtc_convert_bcd2bin(rtcdate[0]) - 24);//y
|
||||
RecoderFrame.time.month = std_rtc_convert_bcd2bin(rtcdate[1]);// m
|
||||
RecoderFrame.time.day = std_rtc_convert_bcd2bin(rtcdate[2]);//d
|
||||
RecoderFrame.time.check_sum = Sum_Check(RecoderFrame);
|
||||
|
||||
// RTT_LOG_D("sizof TuFlashHrRecordFrame(%d)", sizeof(TuFlashHrRecordFrame));
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ ErrorStatus HR_ProcessData(const TsFrameData *pHostFrameData)
|
|||
}
|
||||
break;
|
||||
}
|
||||
case kAlarmRcyRecord: // 查询第n条探测器报警恢复记录 AA 01 02 00 AD 55
|
||||
case kAlarmRcyRecord: // 查询第n条探测器报警恢复记录 AA 01 01 00 AC 55
|
||||
{
|
||||
LOG_D("kAlarmRcyRecord(%d)", c1);
|
||||
data_len = 7;
|
||||
|
@ -232,142 +232,24 @@ ErrorStatus HR_ProcessData(const TsFrameData *pHostFrameData)
|
|||
{
|
||||
uint8_t rtctime[3] = {0}, rtcdate[3] = {0};
|
||||
|
||||
RTT_LOG_D("kGetCurrentTime");
|
||||
|
||||
data_len = FRAME_DATA_LEN;
|
||||
|
||||
BSP_Rtc_Get_Calendar(rtcdate, rtctime);
|
||||
|
||||
data_field[0] = 0x14;
|
||||
data_field[1] = std_rtc_convert_bcd2bin(rtcdate[0]);
|
||||
data_field[0] = ((std_rtc_convert_bcd2bin(rtcdate[0]) + 2000) >> 8) & 0xFF;
|
||||
data_field[1] = (std_rtc_convert_bcd2bin(rtcdate[0]) + 2000) & 0xFF;
|
||||
data_field[2] = std_rtc_convert_bcd2bin(rtcdate[1]);
|
||||
data_field[3] = std_rtc_convert_bcd2bin(rtcdate[2]);
|
||||
data_field[4] = std_rtc_convert_bcd2bin(rtctime[0]);
|
||||
data_field[5] = std_rtc_convert_bcd2bin(rtctime[1]);
|
||||
data_field[5] = std_rtc_convert_bcd2bin(rtctime[2]);
|
||||
data_field[6] = std_rtc_convert_bcd2bin(rtctime[2]);
|
||||
|
||||
RTT_LOG_I("kGetCurrentTime: %04d-%02d-%02d %02d:%02d:%02d",
|
||||
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]));
|
||||
|
||||
goto send;
|
||||
}
|
||||
/*扩展命令*/
|
||||
#if 0
|
||||
case kGetCurrentTimeSecond: // AA 00 09 00 B3 55
|
||||
{
|
||||
LOG_D("kGetCurrentTimeSecond");
|
||||
|
||||
data_len = 7;
|
||||
|
||||
BSP_Rtc_Get_Calendar(rtcdate, rtctime);
|
||||
|
||||
data_field[0] = 0x14;
|
||||
data_field[1] = std_rtc_convert_bcd2bin(rtcdate[0]);
|
||||
data_field[2] = std_rtc_convert_bcd2bin(rtcdate[1]);
|
||||
data_field[3] = std_rtc_convert_bcd2bin(rtcdate[2]);
|
||||
data_field[4] = std_rtc_convert_bcd2bin(rtctime[0]);
|
||||
data_field[5] = std_rtc_convert_bcd2bin(rtctime[1]);
|
||||
data_field[5] = std_rtc_convert_bcd2bin(rtctime[2]);
|
||||
|
||||
goto send;
|
||||
|
||||
break;
|
||||
}
|
||||
case kSetCurrentTime: /*2024-03-25 17:34:56 AA 00 0A 07 07 E8 03 19 11 22 38 31 55*/
|
||||
{
|
||||
LOG_D("kSetCurrentTime");
|
||||
|
||||
data_len = 7;
|
||||
|
||||
RtcDateTime.hour = pHostFrameData->data[4];
|
||||
RtcDateTime.minute = pHostFrameData->data[5];
|
||||
RtcDateTime.second = pHostFrameData->data[6];
|
||||
RtcDateTime.day = pHostFrameData->data[3];
|
||||
RtcDateTime.month = pHostFrameData->data[2];
|
||||
RtcDateTime.year = (rt_uint16_t)(pHostFrameData->data[0] << 8 | pHostFrameData->data[1]);
|
||||
|
||||
// BSP_Rtc_DateTime_Cfg();
|
||||
// RTC_Set(RtcDateTime.year, RtcDateTime.month, RtcDateTime.day,
|
||||
// RtcDateTime.hour, RtcDateTime.minute, RtcDateTime.second);
|
||||
|
||||
// BSP_Rtc_Get_Calendar(rtcdate, rtctime);
|
||||
|
||||
data_field[0] = 0x14;
|
||||
data_field[1] = std_rtc_convert_bcd2bin(rtcdate[0]);
|
||||
data_field[2] = std_rtc_convert_bcd2bin(rtcdate[1]);
|
||||
data_field[3] = std_rtc_convert_bcd2bin(rtcdate[2]);
|
||||
data_field[4] = std_rtc_convert_bcd2bin(rtctime[0]);
|
||||
data_field[5] = std_rtc_convert_bcd2bin(rtctime[1]);
|
||||
data_field[5] = std_rtc_convert_bcd2bin(rtctime[2]);
|
||||
|
||||
goto send;
|
||||
|
||||
break;
|
||||
}
|
||||
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");
|
||||
data_len = 7;
|
||||
Flash_SetProductTimeLimit((rt_uint16_t)(pHostFrameData->data[0] << 8 | pHostFrameData->data[1]), pHostFrameData->data[2],
|
||||
pHostFrameData->data[3], pHostFrameData->data[4], pHostFrameData->data[5], kFactoryTimeId);
|
||||
// Flash_GetProductTimeLimit(&ReadLimitTime, kFactoryTimeId);
|
||||
|
||||
data_field[0] = (uint8_t)(ReadLimitTime.time.year >> 8);
|
||||
data_field[1] = (uint8_t)(ReadLimitTime.Struct.year);
|
||||
data_field[2] = ReadLimitTime.Struct.month;
|
||||
data_field[3] = ReadLimitTime.Struct.day;
|
||||
data_field[4] = ReadLimitTime.Struct.hour;
|
||||
data_field[5] = ReadLimitTime.Struct.minute;
|
||||
data_field[6] = ReadLimitTime.Struct.second;
|
||||
|
||||
goto send;
|
||||
|
||||
break;
|
||||
}
|
||||
case kSetExpirationTime: /*2028-3-26 9:30:00 AA 00 0C 07 07 EC 03 1A 09 1E 00 F4 55*/
|
||||
{
|
||||
LOG_D("kSetExpirationTime");
|
||||
|
||||
data_len = 7;
|
||||
|
||||
// Flash_SetProductTimeLimit((uint16_t)(pHostFrameData->data[0] << 8 | pHostFrameData->data[1]), pHostFrameData->data[2], pHostFrameData->data[3], pHostFrameData->data[4], pHostFrameData->data[5], pHostFrameData->data[6], kExpirationTimeId);
|
||||
// Flash_GetProductTimeLimit(&ReadLimitTime, kExpirationTimeId);
|
||||
|
||||
// data_field[0] = (uint8_t)(ReadLimitTime.Struct.year >> 8);
|
||||
// data_field[1] = (uint8_t)(ReadLimitTime.Struct.year);
|
||||
// data_field[2] = ReadLimitTime.Struct.month;
|
||||
// data_field[3] = ReadLimitTime.Struct.day;
|
||||
// data_field[4] = ReadLimitTime.Struct.hour;
|
||||
// data_field[5] = ReadLimitTime.Struct.minute;
|
||||
// data_field[6] = ReadLimitTime.Struct.second;
|
||||
|
||||
goto send;
|
||||
|
||||
break;
|
||||
}
|
||||
case kSetAlarmValue: /* 3000 AA 00 0D 02 0B B8 7C 55 */
|
||||
{
|
||||
// logDebug("设置传感器标定的报警阈值");
|
||||
data_len = 2;
|
||||
value = (uint16_t)(pHostFrameData->data[0] << 8) | pHostFrameData->data[1];
|
||||
// Flash_Set_AlarmLel(value);
|
||||
// LOG_D("kSetAlarmLelValue: %d\r\n", Flash_Get_AlarmLel());
|
||||
data_field[0] = (uint8_t)(value >> 8);
|
||||
data_field[1] = (uint8_t)(value);
|
||||
|
||||
goto send;
|
||||
|
||||
break;
|
||||
}
|
||||
case kGetAlarmValue: //*AA 00 0F 00 B9 55*/
|
||||
{
|
||||
data_len = 2;
|
||||
// value = Flash_Get_AlarmLel();
|
||||
LOG_D("kGetAlarmValue: %d\r\n", value);
|
||||
data_field[0] = (uint8_t)(value >> 8);
|
||||
data_field[1] = (uint8_t)(value);
|
||||
|
||||
goto send;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include "bsp_rtc.h"
|
||||
|
||||
|
||||
|
||||
/* 时钟精度ppm值,根据实测RTC时钟精度填写 */
|
||||
#define FRTC_PPM (-20L)
|
||||
#define TIMES_TO_GET_TR (0x03) /* 两次读日历不一致后再次循环次数 */
|
||||
|
@ -31,11 +33,11 @@ void RTC_TAMP_IRQHandler(void)
|
|||
/* 清除闹钟标志 */
|
||||
std_rtc_clear_flag(RTC_CLEAR_ALARM);
|
||||
}
|
||||
/* 秒周期中断处理流程 */
|
||||
if(std_rtc_get_wut_interrupt_enable(RTC_WUT_INTERRUPT_SEC) && std_rtc_get_interrupt_flag(RTC_INTERRUPT_FLAG_SEC))
|
||||
/* 周期中断处理流程 */
|
||||
if (std_rtc_get_wut_interrupt_enable(RTC_WUT_INTERRUPT_MIN) && std_rtc_get_interrupt_flag(RTC_INTERRUPT_FLAG_MIN))
|
||||
{
|
||||
/* 清除秒周期中断标志 */
|
||||
std_rtc_clear_flag(RTC_CLEAR_SEC);
|
||||
/* 清除周期中断标志 */
|
||||
std_rtc_clear_flag(RTC_INTERRUPT_FLAG_MIN);
|
||||
}
|
||||
/* leave interrupt */
|
||||
rt_interrupt_leave();
|
||||
|
@ -45,7 +47,7 @@ void RTC_TAMP_IRQHandler(void)
|
|||
* @brief RTC日期时间配置
|
||||
* @retval 无 BCD输入
|
||||
*/
|
||||
void BSP_Rtc_DateTime_Cfg(uint8_t years, uint8_t months, uint8_t days, uint8_t hour, uint8_t minute, uint8_t second, uint8_t week)
|
||||
void BSP_Rtc_DateTime_Cfg(uint8_t years, uint8_t months, uint8_t days, uint8_t hour, uint8_t minute, uint8_t second, uint8_t week)
|
||||
{
|
||||
std_rtc_time_t rtc_time = {0};
|
||||
std_rtc_date_t rtc_date = {0};
|
||||
|
@ -183,40 +185,38 @@ void BSP_Rtc_Alarm_Config(uint8_t hours, uint8_t minutes, uint8_t seconds)
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief RTC唤醒定时器配置
|
||||
* @retval 无
|
||||
*/
|
||||
* @brief RTC唤醒定时器配置
|
||||
* @retval 无
|
||||
*/
|
||||
void BSP_Rtc_Wakeup_Config(void)
|
||||
{
|
||||
/* 关闭RTC寄存器写保护 */
|
||||
std_rtc_write_protection_disable();
|
||||
|
||||
/* 使能秒周期、2Hz周期定时中断 */
|
||||
std_rtc_wut_interrupt_enable(RTC_WUT_INTERRUPT_SEC | RTC_WUT_INTERRUPT_2HZ);
|
||||
|
||||
|
||||
/* 使能分钟周期定时中断 */
|
||||
std_rtc_wut_interrupt_enable(RTC_WUT_INTERRUPT_MIN);
|
||||
|
||||
/* 使能RTC寄存器写保护 */
|
||||
std_rtc_write_protection_enable();
|
||||
|
||||
|
||||
/* 配置中断优先级 */
|
||||
NVIC_SetPriority(RTC_TAMP_IRQn, NVIC_PRIO_0);
|
||||
NVIC_SetPriority(RTC_TAMP_IRQn, NVIC_PRIO_0);
|
||||
/* 使能中断 */
|
||||
NVIC_EnableIRQ(RTC_TAMP_IRQn);
|
||||
NVIC_EnableIRQ(RTC_TAMP_IRQn);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 使能PMU低功耗配置
|
||||
* @retval 无
|
||||
*/
|
||||
* @brief 使能PMU低功耗配置
|
||||
* @retval 无
|
||||
*/
|
||||
void BSP_Pmu_LowPower_Config(void)
|
||||
{
|
||||
std_rcc_apb1_clk_enable(RCC_PERIPH_CLK_PMU);
|
||||
|
||||
|
||||
/* 使能超低功耗配置 */
|
||||
std_pmu_ultra_lowpower_enable();
|
||||
std_pmu_ultra_lowpower_enable();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief 获取日历日期与时间
|
||||
* @param rtcdate 输出日期信息
|
||||
|
@ -386,6 +386,7 @@ int BSP_RTC_Init(void)
|
|||
|
||||
/* RTC日期时间配置 */
|
||||
BSP_Rtc_DateTime_Cfg(0x24, 0x08, 0x23, 0x14, 0x03, 0x05, 0x05);
|
||||
|
||||
|
||||
return RT_EOK;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue