From 842bb64195f958b050867c50db66fc0aa413dafb Mon Sep 17 00:00:00 2001 From: QuakeGod <quakegod@sina.com> Date: 星期六, 27 七月 2024 10:42:56 +0800 Subject: [PATCH] KBus upgrade --- KMini_CCT6/Src/LidarPos.c | 94 KMini_CCT6/Inc/OrdLidar.h | 174 KMini_CCT6/Src/YDLidar.c | 389 + KPLC/Inc/main.h | 2 KBus/Inc/BoardType.h | 40 ComLib/Src/KBus.c | 748 ++ Radio_LLCC68/Radio/KWireLess.h | 129 Radio_LLCC68/Radio/KWireLess.c | 301 + ComLib/Src/KMachine.c | 556 + MDK-ARM/Radio_LLCC68_C8T6_8路无线模块.uvprojx | 31 ComLib/Inc/GlobalDef.h | 44 KBus/MDK-ARM/KBus_C8T6_分布IO模块_8路16路.uvprojx | 132 KMini_CCT6/Inc/SLP.h | 53 KBus/Src/BoardType.c | 102 ComLib/Src/ModbusRTU.c | 12 KSingleLineBus/KSingleLineBus_单总线.uvopt | 51 ComLib/Src/GlobalDef.c | 10 Ext_FPx/Src/FPx.c | 63 KSingleLineBus/KSingleLineBus_单总线.uvproj | 0 KMini_CCT6/Inc/stm32f0xx_ll_rcc.h | 2257 ++++++++++ MDK-ARM/KLink_C8T6.uvprojx | 0 Ext_FPx/MDK-ARM/startup_stm32f030x8.s | 252 + MDK-ARM/F030C8T6_KAD_4路模拟量.uvprojx | 0 KMini_CCT6/Inc/BSP.h | 1 MDK-ARM/KPLC_C8T6_简易PLC.uvprojx | 13 Radio_LLCC68/Inc/BoardType.h | 54 KMini_CCT6/Src/BSP.c | 58 ComLib/Src/debug.c | 62 CCT6_BootLoader/MDK-ARM/CCT6_BtLdr.uvprojx | 5 Radio_LLCC68/Src/BoardType.c | 98 KPLC/Src/main.c | 115 Ext_FPx/Inc/FPx.h | 10 Ext_FPx/MDK-ARM/Ext_FPx_C8T6_松下扩展.uvprojx | 128 KMini_CCT6/Inc/main.h | 3 KPLC/Inc/BoardType.h | 41 MDK-ARM/RTE/_F030C8T6_KLink/RTE_Components.h | 2 Radio_LLCC68/Radio/src/radio.c | 4 ComLib/Src/BSP.c | 63 KMini_CCT6/Src/BoardType.c | 92 KPLC/Src/BoardType.c | 95 MDK-ARM/KMini_C8T6.uvprojx | 0 CCT6_TestApp1/Inc/BoardType.h | 39 CCT6_TestApp1/Src/SLP.c | 123 KSingleLineBus/user/main.c | 28 ComLib/Src/MyQueue.c | 12 KMini_CCT6/Src/main.c | 411 + KBus/Src/main.c | 178 KMini_CCT6/Inc/stm32f0xx_hal_conf.h | 2 CCT6_TestApp1/Inc/functions.h | 1 KMini_CCT6/Src/OrdLidar.c | 348 + C8T6_TestApp1/Inc/BoardType.h | 2 KMini_CCT6/Inc/FP0.h | 130 CCT6_TestApp1/Src/functions.c | 19 KSingleLineBus/Objects/SLP.obj | 0 C8T6_TestApp1/Src/BoardType.c | 35 ComLib/Inc/KMachine.h | 307 Radio_LLCC68/Inc/ATModem.h | 32 CCT6_TestApp1/Src/BoardType.c | 92 Radio_LLCC68/Inc/main.h | 2 KSingleLineBus/SLP.c | 121 KSingleLineBus/SLP.h | 50 KMini_CCT6/Inc/YDLidar.h | 79 CCT6_TestApp1/Inc/SLP.h | 53 KBus/Inc/main.h | 2 Ext_FPx/Src/main.c | 121 KMini_CCT6/Inc/BoardType.h | 37 MDK-ARM/RTE/_F030C8T6_KNet/RTE_Components.h | 2 ComLib/Inc/KLink.h | 23 Ext_FPx/Inc/BoardType.h | 42 CCT6_TestApp1/Inc/main.h | 2 MDK-ARM/RTE/_F030C8T6_KBus/RTE_Components.h | 2 CCT6_TestApp1/MDK-ARM/F030CCT6_TestApp1.uvprojx | 10 KMini_CCT6/Src/SLP.c | 123 KSingleLineBus/Listings/demo.m51 | 864 ++- ComLib/Src/PLCfunctions.c | 452 - KSingleLineBus/Objects/main.obj | 0 ComLib/Inc/PLCfunctions.h | 137 KSingleLineBus/Objects/demo | 0 ComLib/Src/KLink.c | 176 Ext_FPx/Src/BoardType.c | 93 MDK-ARM/F030C8T6_KNet_网口模块.uvprojx | 0 ComLib/Src/functions.c | 21 KMini_CCT6/Inc/functions.h | 39 C8T6_BootLoader/MDK-ARM/C8T6_BtLdr.uvprojx | 7 MDK-ARM/F030C8T6_KBox_控制盒子.uvprojx | 0 Radio_LLCC68/Src/main.c | 197 KMini_CCT6/Src/functions.c | 66 KMini_CCT6/Src/stm32f0xx_it.c | 56 ComLib/Inc/KBus.h | 526 ++ C8T6_BootLoader/Src/main.c | 117 ComLib/Inc/MyQueue.h | 21 MDK-ARM/KMini_New_CCT6.uvprojx | 25 CCT6_TestApp1/Src/main.c | 125 Radio_LLCC68/Src/ATModem.c | 29 KSingleLineBus/Objects/SLP.__i | 1 /dev/null | 15 KMini_CCT6/Inc/LindarPos.h | 0 C8T6_TestApp1/Src/main.c | 21 KBus/MDK-ARM/startup_stm32f030x8.s | 252 + ComLib/Inc/KBusDefine.h | 387 - KNet.uvmpw | 91 CCT6_BootLoader/Src/main.c | 60 102 files changed, 9,596 insertions(+), 2,894 deletions(-) diff --git a/C8T6_BootLoader/MDK-ARM/C8T6_BtLdr.uvprojx b/C8T6_BootLoader/MDK-ARM/C8T6_BtLdr.uvprojx index 5389467..6724824 100644 --- a/C8T6_BootLoader/MDK-ARM/C8T6_BtLdr.uvprojx +++ b/C8T6_BootLoader/MDK-ARM/C8T6_BtLdr.uvprojx @@ -81,7 +81,7 @@ <AfterMake> <RunUserProg1>1</RunUserProg1> <RunUserProg2>0</RunUserProg2> - <UserProg1Name>fromelf --bin --output="@L.bin" "#L"</UserProg1Name> + <UserProg1Name>fromelf --bin --output="../@L.bin" "#L"</UserProg1Name> <UserProg2Name></UserProg2Name> <UserProg1Dos16Mode>0</UserProg1Dos16Mode> <UserProg2Dos16Mode>0</UserProg2Dos16Mode> @@ -594,6 +594,11 @@ <FileType>1</FileType> <FilePath>..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_ll_rtc.c</FilePath> </File> + <File> + <FileName>stm32f0xx_ll_flash.c</FileName> + <FileType>1</FileType> + <FilePath>..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_ll_flash.c</FilePath> + </File> </Files> </Group> </Groups> diff --git a/C8T6_BootLoader/Src/main.c b/C8T6_BootLoader/Src/main.c index 77365f5..d874889 100644 --- a/C8T6_BootLoader/Src/main.c +++ b/C8T6_BootLoader/Src/main.c @@ -46,6 +46,7 @@ #include "Functions.h" #include "string.h" #include "BSP.h" +#include "stm32f0xx_ll_flash.h" /* USER CODE END Includes */ @@ -57,6 +58,57 @@ unsigned char SlowFlicker=0; unsigned char FastFlicker=0; + +typedef struct tagInfoBlockHdr { + unsigned short nBlkSign; // 寮�濮嬫爣蹇� + unsigned short nBlkTypeVer; // 绫诲瀷鍜岀増鏈� + unsigned short nBlkSize; // Block 澶у皬, 鍖呮嫭寮�濮嬪拰缁撴潫鏍囧織 + unsigned short Pad1; +}stInfoBlockHdr; + +typedef struct tagInfoBlockTail { + + unsigned short CRC16; + unsigned short EndSign; +}stInfoBlockTail; + +typedef struct tagBtLdrInfoBlock { + stInfoBlockHdr Hdr; + unsigned short nBtldrVer; + unsigned short nBtldrDevice; + unsigned short nBtldrSize; // 璁捐澶у皬 + unsigned short nBtldrDataSize; //浠g爜澶у皬 + unsigned int nBtldr_AppAddr; + unsigned int nBtldr_NewAppInfoAddr; + unsigned int nBtldr_NewAppAddr; + stInfoBlockTail tail; +}stBtLdrInfoBlock; +// /* +typedef struct { + uint32_t addr_Code_RO_Data_limit; + +}addr_data_def; +// */ +extern int Region$$Table$$Base; +addr_data_def const * paddr = (addr_data_def *)&Region$$Table$$Base; + +const stBtLdrInfoBlock theBtldrInfoBlock __attribute__((at(0x08000100))) = { + 0xAA55, // StartSign + 0x0101, // BlockType + sizeof(stBtLdrInfoBlock), //BlockSize + 0, // Pad, + 0x0100, //BtLdrVer + 0x0100, //BtLdrDevice; + 0x1000, //BtLdrSize; + 0x0C00, //BtLdrDataSize; + 0x08001000, //nBtldr_AppAddr + (int)&Region$$Table$$Base, //nBtldr_NewAppInfoAddr + 0x08009000, //nBtldr_NewAppAddr + 0xEEEE, //crc16; + 0xAA55 //EndSign; +}; + +// const int END_SIGN __attribute__((at(0x08000FD8))); // = 0x55aa; uint32_t us1,us2,us3,us4,us5,us6; @@ -73,6 +125,7 @@ /* USER CODE BEGIN 0 */ /* Table of CRC values for high-order byte */ +/* const uint8_t crctablehi[] = { 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, @@ -93,7 +146,9 @@ 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40 }; +*/ /* Table of CRC values for low-order byte */ +/* const uint8_t crctablelo[] = { 0x00, 0xC0, 0xC1, 0x01, 0xC3, 0x03, 0x02, 0xC2, 0xC6, 0x06, 0x07, 0xC7, 0x05, 0xC5, 0xC4, 0x04, 0xCC, 0x0C, 0x0D, 0xCD, 0x0F, 0xCF, 0xCE, 0x0E, 0x0A, 0xCA, 0xCB, 0x0B, 0xC9, 0x09, @@ -114,7 +169,8 @@ 0x44, 0x84, 0x85, 0x45, 0x87, 0x47, 0x46, 0x86, 0x82, 0x42, 0x43, 0x83, 0x41, 0x81, 0x80, 0x40 }; - +*/ +/* uint16_t crc16table(const uint8_t *ptr, uint16_t len) { uint8_t crchi = 0xff; @@ -128,6 +184,7 @@ } return (crchi << 8 | crclo); } +*/ void HAL_SYSTICK_Callback(void) { @@ -142,8 +199,8 @@ } #define ApplicationAddress 0x08001000 //搴旂敤绋嬪簭棣栧湴鍧�瀹氫箟 -#define NewAppInfoBlockAddress 0x08008000 // 瀛樺偍鐨勬柊搴旂敤绋嬪簭淇℃伅鍧楃殑鍦板潃 -#define NewAppAddress 0x08009000 // 瀛樺偍鐨勬柊搴旂敤绋嬪簭鐨勫湴鍧� +#define NEW_APP_INFOBLOCK_ADDR 0x08008000 // 瀛樺偍鐨勬柊搴旂敤绋嬪簭淇℃伅鍧楃殑鍦板潃 +#define NEW_APP_ADDR 0x08009000 // 瀛樺偍鐨勬柊搴旂敤绋嬪簭鐨勫湴鍧� typedef struct tagNewAppInfoBlock { @@ -186,38 +243,32 @@ int EraseFlashMem(void * pAddrFlash, unsigned int Pages) { - HAL_StatusTypeDef res; - res = HAL_FLASH_Unlock(); - uint32_t ErrNo; - FLASH_EraseInitTypeDef erase1; - erase1.NbPages=Pages; - erase1.PageAddress=(unsigned int)pAddrFlash; - erase1.TypeErase=FLASH_TYPEERASE_PAGES; - res = HAL_FLASHEx_Erase(&erase1,&ErrNo); - res = HAL_FLASH_Lock(); + ErrorStatus res; + res = LL_Flash_Unlock(); +// uint32_t ErrNo; + res = LL_Flash_PageErase(pAddrFlash,Pages); + LL_FLASH_Lock(FLASH); return res; } int EraseAndWriteToFlashMem(void * pBuf, void * pAddrFlash, unsigned int nByteSize) { - HAL_StatusTypeDef res; - res = HAL_FLASH_Unlock(); - uint32_t ErrNo; - FLASH_EraseInitTypeDef erase1; - erase1.NbPages= (nByteSize-1) / FLASH_PAGE_SIZE + 1; - erase1.PageAddress=(unsigned int)pAddrFlash; - erase1.TypeErase=FLASH_TYPEERASE_PAGES; - res = HAL_FLASHEx_Erase(&erase1,&ErrNo); - - + ErrorStatus res; + res = LL_Flash_Unlock(); +// __disable_irq(); + int NbPages = (nByteSize-1) / FLASH_PAGE_SIZE + 1; + res = LL_Flash_PageErase(pAddrFlash,NbPages); for (int i=0;i<(nByteSize+1)/2;i++) { - res = HAL_FLASH_Program(FLASH_TYPEPROGRAM_HALFWORD, (uint32_t)pAddrFlash + i*2, ((uint16_t *)pBuf)[i]); - if ((i&0x7ff) == 0) {ToggleRunLed(); ToggleErrLed();} + unsigned short value = ((uint8_t *)pBuf)[i*2] + (((uint8_t *)pBuf)[i*2 +1] << 8); + res = LL_FLASH_Program(ProgaraType_DATA16, (uint32_t)pAddrFlash + i*2, value); + if (res == ERROR) break; } - res = HAL_FLASH_Lock(); +// __enable_irq(); + LL_FLASH_Lock(FLASH); + if (res == ERROR) return 1; return res; } @@ -268,12 +319,24 @@ SetErrLed(0); //Turn Off Err Led // check for app update ///* + int FlashSize = *(unsigned short *)FLASHSIZE_BASE; + int NewAppAddress ; + int NewAppInfoBlockAddress ; + if (FlashSize == 64) { + NewAppInfoBlockAddress = 0x08008000; + NewAppAddress = 0x08009000U; + }else if (FlashSize == 256) { + NewAppInfoBlockAddress = 0x08020000; + NewAppAddress = 0x08021000U; + } + pNewAppInfoBlock ptheNewAppInfoBlock = (pNewAppInfoBlock) NewAppInfoBlockAddress; if (ptheNewAppInfoBlock->Sign == 0x55AA) { //check length and CRC; int length = ptheNewAppInfoBlock->Length; - int nCRC = crc16table((uint8_t *)NewAppAddress,length); + int nCRC; // = crc16table((uint8_t *)NewAppAddress,length); + nCRC = crc16bitbybit((uint8_t *)NewAppAddress,length); if (nCRC == ptheNewAppInfoBlock->nCRC) { // copy program @@ -298,7 +361,7 @@ LL_mDelay(100); // ToggleRunLed(); -// ToggleErrLed(); + ToggleErrLed(); ToggleErr2Led(); // LL_IWDG_ReloadCounter(IWDG); diff --git a/C8T6_TestApp1/Inc/BoardType.h b/C8T6_TestApp1/Inc/BoardType.h index 243e281..9980951 100644 --- a/C8T6_TestApp1/Inc/BoardType.h +++ b/C8T6_TestApp1/Inc/BoardType.h @@ -57,7 +57,7 @@ #define HSE_VALUE ((uint32_t)8000000) /*!< Value of the External oscillator in Hz */ #endif - +// #define ENABLE_PLC 0 #define GetBoardType() (BOARD_TYPE) diff --git a/C8T6_TestApp1/MDK-ARM/F030C8T6_TestApp1/F030C8T6_TestApp1.hex b/C8T6_TestApp1/MDK-ARM/F030C8T6_TestApp1/F030C8T6_TestApp1.hex deleted file mode 100644 index c650f6e..0000000 --- a/C8T6_TestApp1/MDK-ARM/F030C8T6_TestApp1/F030C8T6_TestApp1.hex +++ /dev/null @@ -1,1467 +0,0 @@ -:020000040800F2 -:10100000681F0020CD1000085945000889230008FA -:1010100000000000000000000000000000000000D0 -:101020000000000000000000000000000550000863 -:101030000000000000000000F945000845550008C8 -:10104000DF10000800000000DF100008DF100008BB -:10105000DF100008DF100008DF100008DF100008B4 -:1010600000000000DF100008F513000895140008C8 -:10107000DF100008DF100008DF100008000000008B -:10108000DF1000085556000800000000DF100008BF -:10109000DF100008DF100008DF100008DF10000874 -:1010A000DF1000083D4F0008DF1000086D560008F3 -:1010B000F55600080348854600F0D6F8004800477A -:1010C0006D600008681F00200844F047044880470E -:1010D00004480047FEE7FEE7FEE7FEE7FEE7FEE71F -:1010E000F9550008B510000830B50B460146002040 -:1010F0002022012409E00D46D5409D4205D31D461E -:101100009540491B2546954040191546521E002D15 -:10111000F1DC30BD70B500242546002801DA012439 -:101120004042002901DA01254942FFF7DDFFAC42C8 -:1011300000D04042002C00D0494270BDF8B50024D8 -:101140002546002904DA0E46012400214042B1411F -:10115000002B04DA1E46002352420125B34100F061 -:1011600052F88C4617461E46AC4203D0002540423A -:101170008D41AC46002C02D0002657429E4161466C -:101180003A46334601B0F0BD10B5202A04DB0846CC -:10119000203AD040002110BD0B46D340D04020243F -:1011A000A21A91400843194610BD03460B439B0702 -:1011B00003D009E008C9121F08C0042AFAD203E0CC -:1011C0000B780370401C491C521EF9D27047D2B2F2 -:1011D00001E00270401C491EFBD270470022F6E776 -:1011E00010B513460A4604461946FFF7F0FF20469D -:1011F00010BD0321001D401E037812021A43491E30 -:10120000F9D510467047F0B51FB40646002082B0ED -:1012100005464024019100901BE0019922460F46AB -:101220003046FFF7B1FF049A059B801A994110D30D -:1012300010461946224600F029F8361A8F410197C8 -:10124000224601200021009F00F020F838184D416F -:1012500000902046641E0028DFDC019B0098294690 -:10126000324607B0F0BD0000064C0125064E05E0F1 -:10127000E36807CC2B430C3C98471034B442F7D3B7 -:10128000FFF71CFF646A0008846A000810B5202A72 -:1012900004DB0146203A9140002010BD91402023FC -:1012A0009C1A0346E3401943904010BDF0B51E4F11 -:1012B00085B03D691D4C6D1C3D612668A468029493 -:1012C00000966C4665800190218162810393386AA3 -:1012D00001011748091800220B4610461C5CFF2C20 -:1012E00004D1401C1028F9D3002A17D010226846D8 -:1012F00000F002F9386AF861401C386200010121EF -:1013000009031030884201D900203862F868094981 -:10131000401CF8604867002005B0F0BD1022684608 -:1013200004F074FBE6E7000064010020186A00087E -:1013300000D0000870160020002911D082685218D1 -:1013400082604368934200DCD21A00238361C36841 -:10135000934201D101234361826002695218026104 -:1013600008467047F0B50020174D0127144B154C67 -:101370003F03E86017E0625A144EB24212D1EA68A5 -:101380000919521CEA604A882E69B24205D92A61BD -:10139000E8614A686A61421C2A624988994201D21E -:1013A0000B46A861401C0101B942E4D3286A000140 -:1013B0001030B84201D900202862E868F0BD000072 -:1013C000FFC99A3B00D0000864010020AA55000024 -:1013D00010B50421054800F0BFF8054800218161DF -:1013E000C1610161C1600162084610BD00D0000802 -:1013F0006401002070B5234DE86A401CE862224C6D -:1014000020688006C00F11D02868296B401828601A -:10141000296B28465830064600F058F820206060B6 -:10142000B06900280AD0002028636872206880050F -:10143000C00F02D001204002606070BD304600F055 -:1014400027FB12494A78A3585B085B00A350F36856 -:1014500032684E78D2180C4B0C33F2500A4B4A7853 -:101460001B1DD658360C36040643D65049786258B0 -:1014700001231A4362502863054881688022114382 -:101480008160D3E758030020000002402D6A000865 -:10149000003801400B49C86A401CC8620A4802680B -:1014A0009204D20F05D001225203426000220A6347 -:1014B0004A7201688903C90F02D0012149044160C1 -:1014C00070470000EC0300200000024010B5002926 -:1014D00010D0C26843685218934200DCD21A00232D -:1014E0004361C2608468944204D1012282618360B6 -:1014F000C360C361084610BDF8B516460F460546E1 -:1015000002F020FA701E800A401C81B2384602F0B8 -:10151000F1F90024761C76080EE06000421952783A -:10152000295C120289188AB2C1190023022002F034 -:10153000ADF9002802D0641CA642EED8054A116914 -:10154000802319431161002801D00020F8BD01203B -:10155000F8BD00000020024070B50C46054602F0C0 -:10156000F1F9A1B2284602F0C5F9034801698022C9 -:1015700011430161002070BD0020024010B500231E -:101580001A4605E0845C2407240FE318DBB2521CE2 -:101590008A42F7DB1807000F10BD000010B50300EA -:1015A00004F072FA081717171717171705170A4AC2 -:1015B0000A4B002041008C18C918248C401C0C8454 -:1015C0001028F7DB002041005C5A401C54521028C0 -:1015D000F9DB002010BD0000241B0020180C0020A7 -:1015E000F3B5074681B0002000903D78FF206E07DC -:1015F000EC08760FE40004F027FD802C01D20020D7 -:10160000FEBD304601266349030004F03DFA08059B -:10161000393D41969A9EAEBE5F480278002A02D0BC -:101620004278A24229D18A885B4F521C8A80403F6F -:101630003D7005468078302108437870E87808438B -:10164000B8703520F87004213846FFF797FF302135 -:10165000084338710D207871112004F0F5FC062143 -:10166000384600F09FF86C702E70287E002804D059 -:1016700000226B691146052098474848067067E0CC -:10168000C888401CC88063E00889401C08815FE06E -:10169000414A10780028F0D05078A042EDD1488916 -:1016A0001446401C48810020D2780DE04100C91941 -:1016B0004B7889781B010907090F5B1836491C31E3 -:1016C000091820310B70401C8242EFDC207E00287C -:1016D00004D0002263691146072098472E4A002053 -:1016E000403A134615705C330BE0195C0D0941005C -:1016F000891830354D701D5C2D072D0F30358D70DC -:10170000401CA1788142F0DC0806C00D401CC1B22B -:1017100021484038FFF732FF30210843A1781E4AA4 -:101720004900403A8A1850700D2090701A48C91C20 -:10173000C9B2403800F036F89FE78889401C88819C -:1017400006E0C889401CC88102E0088A401C088263 -:1017500002980007C10E124809181B2080010818C2 -:10176000818C491C81840098FEBD488A401C4882B7 -:1017700009480178002980D04078A042DCD10120BE -:10178000C0020921C906886177E7088B401C0883DD -:1017900073E70000B0170020081B0020DC000020C9 -:1017A000F010002070B503460C460807C10E14481F -:1017B000002509180520C0010818818A114E491C0E -:1017C00081823078002819D1224619460E48FFF749 -:1017D000ECFC0E4804700E48002101700A490078A4 -:1017E000085C0C4908730121317004F02DFC0A4992 -:1017F0008020886100010921C9068862284670BDE1 -:10180000F0100020E200002018030020E00000207B -:10181000E100002000300140001400480249486106 -:101820000120087600207047081B002010B51349DE -:1018300000200870124908701248134C00780028E4 -:1018400015D0012816D0411CA170E0700120C00203 -:101850000921C906886288620C49802088620A20B2 -:1018600000F0D0F900F0B8F9E060002010BD0120D0 -:10187000A070EAE70320A0700220E6E7E200002063 -:10188000DC00002023010020081B00200014004879 -:10189000F8B5404D01214902284602F0BBF801216C -:1018A000C6B2009140213C4802F0B4F8C4B2012114 -:1018B0000920C902C00602F0ADF84021284602F016 -:1018C000A9F8C0B2354F002500281AD000203946AB -:1018D0001C31FA7803E00B1820331D70401C824243 -:1018E000F9DC387E00280CD000227B6911460520E7 -:1018F0009847387E002804D000227B6911460720D3 -:101900009847002E02D100F067F9F8603869002886 -:101910000FD1002E0DD000F05FF9F968401A204970 -:10192000884206DB0120C0020921C9068861012026 -:101930003861002C06D1387A002803D01948018D6F -:10194000C184058500981849184A00281AD0002C2F -:101950001AD0387A00280BD1012010700D7014486D -:10196000066840239E4306600D7006681E430660AD -:1019700010480078002809D11078002806D10120ED -:10198000107002E0002C01D115700D703C72002027 -:10199000F8BD00000004004800140048081B0020A7 -:1019A0001027000070180020DE000020DC0000205E -:1019B00000380040E2000020024A9070D170002000 -:1019C00070470000081B00200A07120F01219140F8 -:1019D000014201D001207047002070470A07120F12 -:1019E00001219140014201D0012070470020704741 -:1019F000F8B50B051B0E254C5B001C1909239B0138 -:101A0000E31800930523DB01E618012307469B0238 -:101A10000A07E5180020120F3B0004F035F809060C -:101A20000A0E12191D21282F2E00FF2928D80098F0 -:101A30001BE0FF2924D8009808E0FF2920D8B08AAD -:101A400018E080291CD20F2080012018808E11E020 -:101A5000802915D2A88A0DE0402911D2B08E09E064 -:101A600040290DD20B2080010EE0808A02E08029FF -:101A700006D2A88E1146FFF7B1FFF8BD802901D329 -:101A80000020F8BD0920C0012018EEE7F01000206A -:101A9000C1688268914201DA501A7047914202DCB3 -:101AA0004269002A02D04068401A704780690028C5 -:101AB000FBD000207047C2688168914201DA501A59 -:101AC0007047914202DC8269002A02D04068401AC5 -:101AD000704740690028FBD000207047064901226A -:101AE0008969120308180101914201D3FF380138B6 -:101AF00002490001401870476401002000D000082E -:101B0000F0B5334C4B001C190923DB01E5180B23FE -:101B10000246DB010020E318892A25D00EDC2C4F79 -:101B20002C4B4E00F619F618803A130003F0ACFF68 -:101B3000091F1F152125292E333A15008D2A3FD064 -:101B40000CDC8A2A33D08B2A35D08C2A05D1402947 -:101B50003ADA0B2080012018808EF0BD992A03D03C -:101B6000A12A01D0FE2AF8D180292DDA2EE00846DC -:101B7000F0BD102928DAB08AF0BD102924DAB08E21 -:101B8000F0BD102920DA0520C00108E008291BDA81 -:101B90000F208001DFE7082916DA012080022018D3 -:101BA000808AF0BD80290FDA3420285EF0BD8029BC -:101BB0000ADAA88AF0BD402906DA0D208001CAE7BA -:101BC000402901DAA88EF0BD0020F0BD988EF0BD4E -:101BD000F01000204002000010B5074A1069074BC2 -:101BE00099691469A04201D010699969044A514366 -:101BF0000914401A10BD0000DC00002000E000E0E5 -:101C00005505000031B500F00BF8009C0546601C3E -:101C100000D0641C00F004F8401BA042FAD338BD89 -:101C20000148006870470000B401002002480168C4 -:101C3000491C016070470000B401002010B506483F -:101C40000168102211430160002000F007F800F045 -:101C500017F8002010BD00000020024010B5044617 -:101C600000F040F97D21C900FFF73EFA00F070FB5B -:101C700000222146501E00F025F8002010BD000073 -:101C800008B50F48816901221143816181691140C2 -:101C90000091C26901040A43C261C0690022084080 -:101CA00000901146501F00F00DF800221146901EC2 -:101CB00000F008F800221146501E00F003F808BD9D -:101CC0000010024010B502F075FC10BDF8B50446D6 -:101CD0000068364DC00354D5E8690026C00007D41B -:101CE000E86929040843E861E86908400126009092 -:101CF0002F480168C90511D4014608688A151043A8 -:101D00000860FFF78DFF074604E0FFF789FFC01B5F -:101D1000642823D826480068C005F6D5286A032120 -:101D2000090208401FD062680A4082421BD0286A1C -:101D30002A6A8843012109040A432A622A6A8A43DB -:101D40002A622862C0070ED0FFF76AFF074607E045 -:101D5000FFF766FFC11B1748814201D90320F8BD78 -:101D6000286A8007F4D5286A03210902884361683C -:101D700008432862002E04D0E8690121090788433E -:101D8000E8612078C00705D0286BA1688008800032 -:101D9000084328632078800605D5286B10218843E6 -:101DA000E168084328630020F8BD000000100240ED -:101DB0000070004088130000F8B5044644480E4601 -:101DC0000068C007C00FB0420AD241480168490804 -:101DD0004900314301600068C007C00FB0425CD1C8 -:101DE00020783C4F800705D57868F0218843A168AA -:101DF000084378602078C0073FD06068012813D07E -:101E00003968022813D08907002946DA79688908D9 -:101E1000890001437960FFF703FF054660680128E8 -:101E20000DD0022817D024E039688903ECE7890136 -:101E3000EAE7FFF7F5FE411B2748814217D878688B -:101E40000007800F0128F4D117E0FFF7E9FE411BDE -:101E5000214881420BD878680007800F0228F4D10E -:101E60000BE0FFF7DDFE411B1B48814201D9032037 -:101E7000F8BD78680007800FF3D115480168C907DD -:101E8000C90FB1420BD901684908490031430160CB -:101E90000068C007C00FB04201D00120F8BD207813 -:101EA000400706D57868072109028843E16808439E -:101EB000786000F01DF87968084A0906090F515C3E -:101EC000C840074908600020FFF7C8FE0020F8BDA1 -:101ED0000020024000100240881300004C6A0008F5 -:101EE000B00100200148006870470000B0010020E8 -:101EF00010B513A00FC888B06C460FC414A00FC84B -:101F00000FC4174B5A680C2011460140154804298C -:101F100002D0082902D0144808B010BD9102090F60 -:101F20006C46645CD96A04AB0907090F595CD2039B -:101F300003D5FFF7D9F86043EEE70C486043EBE7C1 -:101F400002030405060708090A0B0C0D0E0F1010FA -:101F50000102030405060708090A0B0C0D0E0F10F9 -:101F600000100240001BB70000127A0000093D007B -:101F7000FEB504460078D04DC00746D0686800071B -:101F8000800F012807D068680007800F022809D158 -:101F90006868C00306D52868800336D560680028C5 -:101FA0007ED032E001216068090401280AD08A004D -:101FB000002801D005280FD02868884328602868A9 -:101FC000904301E02868084328606068002810D02A -:101FD000FFF726FE064608E0286810432860F1E770 -:101FE000FFF71EFE801B64286FD828688003F7D592 -:101FF0000BE0FFF715FE064604E0FFF711FE801B1D -:102000006428F1D828688003F7D420780126800757 -:1020100000283BDA68680007800F07D0686800076F -:10202000800F022809D16868C00306D42868800799 -:1020300015D5E068012833D111E0E0680028286850 -:1020400015D030432860FFF7EBFD074604E0FFF7AB -:10205000E7FDC01B0228C7D828688007F7D5286885 -:10206000F82188432169C900084328600EE0400830 -:1020700040002860FFF7D4FD074604E0FFF7D0FDDD -:10208000C01B0228B0D828688007F7D42078000742 -:1020900024D5E0690028686A10D03043686200E007 -:1020A00007E1FFF7BDFD074604E0FFF7B9FDC01BE0 -:1020B000022899D8686A8007F7D50FE040084000E9 -:1020C0006862FFF7ADFD074605E09DE0FFF7A8FD5C -:1020D000C01B022888D8686A8007F7D420780427B4 -:1020E0004007002860DA00200190E869C00008D4A9 -:1020F000E969B8060143E961E969014001200091FD -:1021000001906E480168C90511D401688215114318 -:102110000160FFF785FD009005E0FFF781FD009964 -:10212000401A642870D865480068C005F5D5A068D5 -:1021300001280AD0002801D0052810D0286A4008BC -:1021400040002862286AB84301E0286A30432862C8 -:10215000A068002812D0FFF763FD00900AE0286A0B -:1021600038432862F1E7FFF75BFD0099411A5448B4 -:10217000814249D8286A8007F5D50DE0FFF750FD68 -:10218000009006E0FFF74CFD0099411A4C4881424F -:102190003AD8286A8007F5D40198002804D0E96964 -:1021A000012000078143E9612078C00635D56069C8 -:1021B00001280CD0401D686B23D038436863686BDE -:1021C000400840006863FFF72BFD064622E0686B7D -:1021D00038436863686B30436863FFF721FD064648 -:1021E00004E0FFF71DFD801B02285BD8686B8007A9 -:1021F000F7D5686BF8218843A169C9000843686373 -:102200000BE0B8436863F4E74CE0FFF709FD801B7F -:10221000022847D8686B8007F7D4206A002846D088 -:1022200069680907890F022943D001273F06022860 -:10223000286805D0B8432860FFF7F2FC044633E075 -:10224000B8432860FFF7ECFC064604E0FFF7E8FC23 -:10225000801B022826D828688001F7D4E86AE16A42 -:10226000000900010843E862616AA06A08436968DE -:102270003D2212049143084368602868384328606F -:10228000FFF7CEFC044604E0FFF7CAFC001B02285F -:1022900008D828688001F7D509E0FFF7C1FC001BCA -:1022A000022801D90320FEBD28688001F5D4002052 -:1022B000FEBD0120FEBD0000001002400070004085 -:1022C00088130000042204490428086902D09043BE -:1022D000086170471043FBE700E000E01548016823 -:1022E0006431016014480168491C016013490868A1 -:1022F000401C08601249134AC868401CC8609042DC -:1023000016DB0020C8601048816D491C8165016D95 -:10231000491C0165416D491C41650C49088B002829 -:1023200006D0401E80B20883782801D9782008831F -:1023300070470000EC000020E80000204C01002065 -:10234000880100201027000070160020A41800202B -:10235000094910B5401E884201D9012010BD074C23 -:1023600060610321081F02F025F90020A061072009 -:102370002061002010BD0000FFFFFF0000E000E032 -:1023800010B5FFF7ABFF10BDFEE7000010B5002150 -:102390000F4A0846516043009B18401C1981FF28D2 -:1023A000F9DD002005230B4ADB014400A418E418E2 -:1023B000401CA1821028F8DB00200923DB01440027 -:1023C000A418E418401CA186FF28F8DD002010BDE9 -:1023D000680E0020F010002010B5402802DB00201D -:1023E000C04310BD10221143C200094B4000D21857 -:1023F000C01858240D23A1529B010021C3189986AF -:10240000E300C0188186034800685065084610BD87 -:10241000F0100020B401002070B504461E4638308C -:10242000049D03F005FE20462A463146583003F04D -:10243000FFFD002070BD000070B5104D064601463E -:102440002846FEF767FE0E4CE061FFF74BFD29467C -:10245000FEF74AFE60610B48314600680546FEF70C -:1024600043FEA0612A46002307480F21FEF766FEBF -:102470002081E06964302061002070BD40420F007F -:10248000DC000020B0010020000040420B0119498F -:1024900030B55B18FF33097F113319700221597071 -:1024A0001449002020310C7F9C704C7FDC708C7FA5 -:1024B0001C71CC7F5C710C46203425789D71657849 -:1024C000DD710B7F15795B190B774B7F55795B19A4 -:1024D0004B778B7F95795B198B77CB7F157A5B195F -:1024E000CB772178937AC91821706178D27A8918CC -:1024F000617030BD000A0020034610B5002002467E -:1025000002E09C5C6040521C8A42FADB10BD000075 -:10251000F0B50B0003F0B8FA081D1D1D1D1D1D1D93 -:10252000051D0D4E0D4D002041008A194919128CD0 -:10253000401C0A841028F7DB0020094F0F239B0161 -:102540004100CC19E4186A5AA286401C7252102825 -:10255000F6DB0020F0BD0000241B0020180C00203A -:10256000F0100020F8B508460D460978552901D02D -:10257000252903D0012A01DD451C521E344F602459 -:1025800079792B786143334C0919334C252B30D0A2 -:10259000A3685B1CA360CB695B1CCB61B978002985 -:1025A0000FD0F97800290FD001292C4913D0072327 -:1025B0001B02C9180A7501462948FEF7F6FD0020DE -:1025C000F8700020C043F8BD2549264B55390A75DF -:1025D0000146224807E037235B01C9180A75014606 -:1025E000204B1E482033C018FEF7DFFDF878401C52 -:1025F000E6E76E79802E06DDE068401CE060086A40 -:10260000401C0862DDE7334608339A4208D2086A64 -:10261000401C0862E068401CE0600220C043F8BD36 -:10262000B11DFFF769FFA919897981420DD0206991 -:10263000401C206179796020414306480818416AAE -:10264000491C41620320C043F8BD0020F8BD0000D2 -:1026500018010020800600206C040020F0100020EB -:1026600005180020D506000010B50020124C0346C6 -:102670002071D2B2002905D021706370A370A272BC -:10268000E37005E0237001216170A370A272E27013 -:102690000A4C00226021514309194B608B600B6189 -:1026A0004B618B61CB610B628B624B62CB62521CC4 -:1026B0000B63092AEEDB10BD000A00208006002013 -:1026C0000C20414307480818002150300180418008 -:1026D000082202714271817101728172C1720846D1 -:1026E00070470000000A0020F8B50E460446252079 -:1026F000069F079D089920706270A670E37027718D -:102700002F46002008376619372B30D01FDC332BBB -:102710001CD006DC002B19D0312B28D0322B15D140 -:1027200025E0342B12D0352B10D0362B0ED165710D -:10273000002D03D02A46A01DFEF737FDA91D204617 -:10274000FFF7DAFEB0710D20F0713846F8BD612B4D -:102750000DD006DC382B0AD0412B08D0422BF5D106 -:1027600005E0622B03D0632B01D0642BEED16571A1 -:10277000E0E70000F1B584B0FFF752FA0546FFF735 -:102780002BFA664E04463079002802D0012802D088 -:1027900004E001203071049800F098F930790228A3 -:1027A00001D1032030715E48C179002906D0017A39 -:1027B000002903D0C168611A322905D8C1687D2279 -:1027C000611AD200914266D95548007A55490028CD -:1027D00064D053486023407901225843524B1A5029 -:1027E000642048644E4E7079401CC0B27071F17A1A -:1027F000884208D9706A7462201AB062B079401CAD -:10280000B071012070714948727981184348CB7FBB -:102810008038037020310B7843704B78837089784F -:10282000C1700571290A4171290C8171290EC1718C -:102830006B46F4601978B37989089B0789009B0F70 -:1028400019436B4619706023374C5343E358002BF0 -:1028500061D0EF2319406B46197008230193009152 -:102860000290412300213248FFF73EFF02463049E3 -:10287000049802F009FC707960214843001941680E -:10288000491C4160C268F1688A1A4263C160002035 -:102890003563F0713072002005B0F0BD204B186A2E -:1028A000401C186223484268521C42605E796020D6 -:1028B000374646431C4830180269521C026142697F -:1028C000521C4261DB79002B02D1836A5B1C83625C -:1028D00083699A4200D98261134B032A82D900206E -:1028E0009851C8228A6411490E46C855183E307D59 -:1028F000002800D176E7002337691A46052104989D -:10290000B847307D0028F5D0002336691A460721E4 -:102910000498B04766E7102319439CE7000A00209B -:10292000180100207016002080060020180C0020DE -:10293000800500206C040020F8B5844608780C4619 -:10294000552801D0252802D0012A00DD4C1C6079D1 -:102950003B4D00906979602041433A482B46091865 -:102960008868401C8860DF6ADE68E078A278BE1B59 -:102970009B69352821D002DC32281ED10AE0382894 -:102980001BD002DC362818D115E0412815D042288A -:1029900013D114E06E619E4200DDAE612A48A37936 -:1029A00083540020CE624861086BB04200D20E63AF -:1029B0000120287201E00120E8710020F8BD6E615D -:1029C0009E4200DDAE61204BA17998180646203E5C -:1029D000F177E1799954217A4170617A8170A17A15 -:1029E000C170E17A0171217B4171617B817118466F -:1029F0001838017D002905D0002306691A460721F1 -:102A00006046B0476A79602042430E48002116189C -:102A100071616869F062316B814200D23063009865 -:102A20000E28C5DB2046E77B1030FEF7E2FBE17C99 -:102A30000002000A09060843B90071188863B7E765 -:102A40001801002080060020180C0020F7B515465C -:102A50000C46FFF7C1F81A4EF06221780020552984 -:102A600003D1012D01DD641C6D1E317800290FD0CA -:102A70000127F7712A4621460098FFF773FD0028C9 -:102A800005D137722A4621460098FFF755FFFEBD53 -:102A900071780029FBD00B4E2A46B06B2146401CB2 -:102AA000B063009800F060F80028F0D106482A468C -:102AB000406C30652146009800F0CEF8FEBD000065 -:102AC00018010020800600207016002070B5064610 -:102AD0000025FFF7A5F8FFF77FF81D4C0122A1792B -:102AE000002901D1A271A062E17900292DD1A16A4A -:102AF0007D23411ADB00994227D90021A171216A67 -:102B0000032902DAA271A0621FE003291DDD30460D -:102B1000E169FFF7D5FDE1690C2048430219304611 -:102B20005032FFF7B3FCE069401CE061A17A8842B3 -:102B30000BDD022020710748017D002905D000230C -:102B400004691A4605213046A047284670BD00009A -:102B5000000A0020000C00200248016101210175DB -:102B600000207047000C0020F0B508460D4609789B -:102B7000552901D0252903D0012A01DD451C521E0B -:102B8000297800231A4FDB431A4C252906D0A06868 -:102B9000401CA060386C401C386409E014496E7910 -:102BA000896C491C802E05DDE068401CE060B9643A -:102BB0001846F0BD334608339A4206D2B964E0683D -:102BC000401CE0600220C043F0BDB11DFFF794FC43 -:102BD000A9198979814208D02069401C2061F86CCC -:102BE000401CF8640320C043F0BD0020F0BD00008D -:102BF000800600206C040020F8B5FEF7EDFF134BB3 -:102C00001A69197900291FD05C7A1149002C05D066 -:102C10007D20800148640020587215E00C4E0D4C58 -:102C2000851A8036A54204D97D2292018A64012248 -:102C300006E01219904207D97D2292018A6402228D -:102C40008A67C867186930600020F8BD1801002045 -:102C500070160020E02E0000F7B5087884B00C460E -:102C6000552802D1012A00DD4C1C6D480168491C21 -:102C70000160637960786B4903916B49694F0D7905 -:102C80008037A84208D0FF2806D0786C401C7864B2 -:102C90000020C04307B0F0BDA84201D0FF287DD17D -:102CA0006148C26A026101214172E0785F493728B8 -:102CB00074D00CDC3328FBD004DC0028F8D0312899 -:102CC000EDD119E03428F3D0352867D125E0584BF1 -:102CD000DD1DFF35FA352A7D2E6961285ED004DCC2 -:102CE00038285BD0412859D120E0622856D063288B -:102CF00054D0642852D17EE0A07908704B48203827 -:102D00000078A071484802612179A01D01930091CB -:102D1000322302900022294661E0002021793623E7 -:102D20000091019002460290012158E0A0790870BC -:102D3000E0794870207A8870607AC870E17AA07A69 -:102D4000090240189863002A0DD000231A46062174 -:102D50000498B047287D002805D000232D691A4625 -:102D600007210498A84731482F4920388A7A0378E8 -:102D7000A3714378E37183782372C3786372037914 -:102D8000A3724379E37283792373C07960739000EF -:102D9000E273C019038F2374038F00E03DE01B0A28 -:102DA0006374836B521C1B0CA374806B000EE07465 -:102DB000D0B288720A2801D30020887220796A462E -:102DC0001070C00603D57D201A4A800190642079D6 -:102DD000A31D0E226D460DC54223097900220398DA -:102DE000FFF782FC0246F86B401CF86303990498D5 -:102DF00002F04AF911E0E179A07909024018217A3C -:102E0000647A09042406091940189863002A04D03A -:102E100000231A4606210498B04700203AE7000034 -:102E20006C0400200006002018010020380C00204F -:102E3000000A002070160020034610B5002002464C -:102E400002E09C5C6040521C8A42FADB10BD30B547 -:102E50000D46084609781446252901D0012030BDC9 -:102E6000062C01D2032030BD611EFFF7E5FF2919B2 -:102E70002039C97F814201D0042030BD002030BDFF -:102E800070B51E4604460B465520049D05992070DA -:102E90006370A270E6702571EE2E10D02A46601D78 -:102EA000FEF783F9691D2046FFF7C6FF61194871D7 -:102EB000A81D052E02DA002E00D1002070BD0521CC -:102EC0002046FFF7B9FF60710620F2E7FEB516460F -:102ED0000F460546FFF7BBFF040014D0E0B2694679 -:102EE0000872009002A90B4801910278401E0178F7 -:102EF000EE230948FFF7C4FF02460749284602F0BF -:102F0000C3F82046FEBD32463946284600F006F892 -:102F1000FEBD000051010020E80C0020F7B588B08C -:102F20004A78F848039242688260421C15788E788D -:102F30002D0936072D01360F0B7935431570F24AEE -:102F400002920078039A84460C46624501D0FF2A1B -:102F50002FD12146E7780931EC4A002605914F2F01 -:102F600074D02EDCEA480121192F70D016DC072F0F -:102F700026D008DC002F1CD0012F55D0032F58D0AD -:102F8000052F47D183E0112F71D0162F70D0E14962 -:102F9000172F08686DD0182F3CD15CE2312F76D006 -:102FA00008DC212F67D0222F70D0232FE3D0242FCD -:102FB00030D14AE3322F03D0332F68D0342F29D1B8 -:102FC000DAE00420642F7DD012DC562F7BD008DCA1 -:102FD000502F79D0532F78D0542F77D0552F19D127 -:102FE000B6E2572F73D0582F72D0632F12D1C9E297 -:102FF000692F2DD008DC652F6BD0662F2DD0672F61 -:1030000031D0682F06D1D6E26B2F24D0732F70D029 -:10301000742F6FD002206946087404A90191EE2331 -:103020002A460090614608E0641D00930194012344 -:1030300049E2B9491820A6E203990298FFF720FF58 -:1030400002460299089802F01FF8FEE237E220E2F9 -:10305000B2490C2097E2B24995E2B14910395020AB -:1030600091E23B462FE2E1790020A74A08E0C5E162 -:10307000D3E1E9E10BE0EFE023185B7A1354401C45 -:103080008842F9DBA04802F043FCC2E254E1A27995 -:10309000617912028918E27989B2882B2BD0892BA9 -:1030A0002DD08A2B2FD0832B32D0842B35D0852B5B -:1030B00038D0862B3BD0872B3ED08B2B41D08C2B0E -:1030C00044D007E062E24CE2F7E101E217E2FCE102 -:1030D00050E268E2FE2B12D0A92B3CD0B32B3ED09D -:1030E000992B3FD0A12B42D087481038401800922E -:1030F000A5E179E290E2490009188A483AE04900DE -:103100000918894836E0490009188648203831E016 -:1031100049000918952080002CE0490009189D20DD -:10312000800027E049000918A520800022E049001E -:103130000918FD2080001DE0490009187948A038D1 -:1031400018E049000918DD20800013E04900091843 -:10315000BD2080000EE04900091874480AE04900CB -:10316000734807E0734849000818001DBFE749008D -:103170000120C0060818BAE7A279617912028918FD -:10318000E27989B2882B23D0892B25D08A2B27D0AE -:10319000832B2AD0842B2DD0852B30D0862B33D077 -:1031A000872B36D08B2B39D08C2B3CD0FE2B40D0AC -:1031B000A92B42D0B32B44D0992B45D0A12B46D07C -:1031C00051481038401800220599FDF7EEFF20E223 -:1031D0004900091853483DE049000918524839E0B0 -:1031E000490009184F48203834E049000918952053 -:1031F00080002FE0490009189D2080002AE0490046 -:103200000918A520800025E049000918FD2080004C -:1032100020E0490009184348A0381BE0490009187C -:10322000DD20800003E049000918BD208000081857 -:10323000C9E7490009183C48F9E7490009183B4823 -:10324000F5E749003A48F2E749003A4802E0490008 -:103250000120C0060818B7E76279A4792402121980 -:103260000924A40192B2002B14D0012B19D0022BF7 -:1032700023D0032B27D0042B2DD0052B31D0062BA8 -:103280002FD0082B36D06846067404A8212300915D -:10329000019018E113095B001818001930E00120B3 -:1032A00025E013095B001818001912E013071B0F23 -:1032B0000A469A401040F2D119E013095B00181831 -:1032C0000523DB011BE013095B0018180F239B018A -:1032D000C018808EEAE713095B00181801239B02CF -:1032E0000DE0D20010184030007E4006C00F6A4644 -:1032F0001074CAE713095B0018180923DB01C01812 -:10330000808AD3E750010020E80C0020A418002098 -:10331000F0100020680E00207E690008ACF7FF1F47 -:10332000107C0008B4040000B4050000B4060000DE -:103330008006002070100020A2796179120289189D -:103340008DB2002B17D0012B1ED0022B25D0032BC2 -:103350002CD0042B33D04021052B38D0062B36D06F -:10336000072B3FD06846067404A80190B848009621 -:103370000278222360E62B095B0029071B18090F3E -:103380009520E279800035E02B095B0029071B18A6 -:10339000090F9D20E27980002CE02B095B002907B2 -:1033A0001B18090FA520E279800023E02B095B00A0 -:1033B00029071B18090FFD20E27980001AE0290770 -:1033C0002B09090F5B001B18E279A24812E0EA0002 -:1033D00010184030028B8A43E179C907490E0A432D -:1033E0000283C1E72B095B001B1829079948E27982 -:1033F000090F8030181801F06BFEB5E7002B02D0E2 -:10340000012B03D005E102F05BF802E102F020F8A5 -:10341000FFE08F48E37802780EE6A179607909022F -:103420004018E1798C4C80B2002B0AD08B4E012BD6 -:1034300002D0928A002A04D04000801900910190A5 -:103440000FE640000019F9E7002800D00E60009652 -:103450001723019637E0002800D00E60A17960792B -:103460000902401885B2E27900207D4903E027185F -:103470007F7A0F54401C9042F9DB7949284602F0CC -:103480006FFA093472480096019604940278182362 -:10349000D2E5A37960791B02C018D082908A0028F7 -:1034A00009D096826F4801F0AFFD694800960196F9 -:1034B00002781923C0E59182F4E7138300E01683B4 -:1034C00000960196E3782A46B6E5664920205AE040 -:1034D000A179607909024018634980B20A18E1793C -:1034E000121D782801D3002105E00B18782B02D992 -:1034F0007821081A81B2C8B201920090B1E5A17991 -:10350000607909024018584980B20B18E2791B1DF6 -:10351000782801D3002205E01118782902D97821F2 -:10352000081A82B218460599FDF73FFE00960196EB -:103530004748E378027803990298FFF7A1FC024616 -:103540000299089801F0A0FD474802F029FA7CE0B2 -:10355000454802F025FA3E48009601960278552328 -:103560006AE5404801F050FD39480096019602781E -:10357000562361E5032109023C48FDF72FFE009622 -:1035800001966EE53A49019100906AE5A17960796A -:1035900009024018E17980B20D01FEF79FFAE9B205 -:1035A0000091019035E7FDF713FF29480096019639 -:1035B0000278652340E5009665232A460196039923 -:1035C0000298FFF75DFC02460299089801F05CFD45 -:1035D000012080F31088BFF34F8F27492548C8602A -:1035E000BFF34F8F00BFFDE7A17960790902401852 -:1035F00080B2E279059902F099F9002809D0C0B2A9 -:10360000009004A9124801910278EE23401E01782F -:1036100013E500960196FCE6A1796079090240184D -:1036200080B20690E47900963B462A4601960399BB -:103630000298FFF725FC02460299089801F024FD44 -:1036400022460599069802F081F900200BB0F0BDE2 -:1036500051010020140400000080000800A00008B0 -:10366000E80C0020A4180020701000208006002024 -:10367000E41600200400FA0500ED00E070B5FDF747 -:1036800071FE164800F0E2FA154D164C6869A06507 -:103690001248816861658188491C81808088E06466 -:1036A0000E4801F0B1FC2868206768686067A86868 -:1036B000A06701220C4B1146A06DFDF7F7FD2046D7 -:1036C0008030E9680160A9694160E9698160296920 -:1036D000C160296A0161002070BD0000A4180020AB -:1036E00064010020701600203930000008B504493C -:1036F0004A6902434A6149690140009108BD0000DE -:103700000010024008B50449CA690243CA61C96988 -:103710000140009108BD00000010024008B50449B6 -:103720008A6902438A6189690140009108BD0000ED -:103730000010024070B5094E04467618203E049DE4 -:103740000C34F17F0830102D03D00A50F07F035164 -:1037500070BD0A51F17F0B5070BD00005865000824 -:10376000044A51182039C97F425852085200425029 -:103770007047000058650008044A51182039C97F75 -:10378000425801231A434250704700005865000810 -:10379000044A51182039C97F425802231A43425023 -:1037A0007047000058650008054B10B559182039BE -:1037B000C97F435803242403A3431343435010BD3C -:1037C000286A0008054B59182039C97F001D0B587D -:1037D0001B0C1B0413430B50704700005865000876 -:1037E000054B10B559182039C97F4358034C234065 -:1037F0001343435010BD0000286A0008EFBFFFFFCD -:10380000054B10B559182039C97F43588024A3436C -:103810001343435010BD0000286A0008054B10B543 -:1038200059182039C97F43580324A402A3431343E2 -:10383000435010BD286A0008054B10B559182039AF -:10384000C97F43582024A3431343435010BD0000B5 -:10385000286A0008054B10B559182039C97F43580C -:103860004024A3431343435010BD0000286A0008BE -:10387000054B10B559182039C97F43580324240239 -:10388000A3431343435010BD286A0008F0B51FB48A -:103890000024022804D0012804D00425144F12E08B -:1038A0000125FBE70225F9E7019861000E182201C6 -:1038B00003990298FDF768FC3969012211433961C7 -:1038C0003080641CE4B2AC42EED3F868C007C00F8D -:1038D000FBD1F8688006C00F08D0F86820210843A3 -:1038E000F8603869400840003861012005B0F0BD3B -:1038F00000200240890210B50B1811491AE00C692A -:10390000022214430C6148610A69402422430A617F -:10391000CA68D207D20FFBD1CA689206D20F0DD067 -:10392000CA6820242243CA600C69022294430C61B5 -:10393000520280189842E2D3012010BD002010BD31 -:10394000002002400748C168C907C90FFBD10169BF -:103950008022114203D004494160044941600120A2 -:10396000704700000020024023016745AB89EFCD7E -:10397000F0B500233CE001249C40224037D04F6842 -:1039800006681446544365006519AE4367433E43D9 -:1039900006604E68012E01D0022E05D18F68866820 -:1039A0006743AE433E4386600F69C668AE43254613 -:1039B0007D432E43C6604D68022D18D14D69FF2A04 -:1039C00009D8066A544354432201121B96436C43A0 -:1039D000264306620BE0140A2246624362436243B6 -:1039E0001401A61A446A6A43B443144344625B1C3C -:1039F0000A681446DC40BED14A68012A01D0022A76 -:103A000006D10A68C968436893434A431343436035 -:103A10000120F0BD0069814301D0002070470120E2 -:103A2000704710B5044601F0D3F9206001F0B6F9F3 -:103A3000606001F0C1F9A06010BD0000014610B542 -:103A4000002000290FD1104A116B8907890F012925 -:103A50000AD0022911D0032909D001F0B9F901F0E7 -:103A60009DF901F0A9F910BD01F0B2F910BD11687E -:103A70008907C90FFAD0054810BD116A8907C90F17 -:103A8000FAD00120C00310BD0010024000127A00DD -:103A900010B5036800225B06DB0F25D10CC98C68CA -:103AA0001A434B6823431A43CB681A430B691A43E2 -:103AB0004B691A438B691A4303680C4C23401A4321 -:103AC000026042680A4B1A40CB681B0C1A430B6811 -:103AD0001A43426001238A695B0308399A4202D182 -:103AE000898C89B201610122104610BD4000FFFFA0 -:103AF000FBF0FFFFF0B50268194B1A4C984201D059 -:103B0000A04203D17025AA434D682A43164D174E93 -:103B1000174F98420AD0A04208D0164CA04205D0B8 -:103B2000A84203D0B04201D0B84204D103242402F9 -:103B3000A243CC68224302608A68C2620A88826219 -:103B4000984205D0A84203D0B04201D0B84201D17A -:103B5000097C016341690122114341611046F0BDB6 -:103B6000002C01400004004000400140004401409E -:103B7000004801400020004041680122D2029143E8 -:103B8000416081680822914381607047FEB5044618 -:103B900000680D460026C007C00F43D1E968686879 -:103BA000AA69084329691143084321681E4A114044 -:103BB00008432060A868616803221203914301430F -:103BC00061606869A168121191430143A1601748BF -:103BD000844203D10020FFF731FF06E014488442FD -:103BE00020D16846FFF71DFF029800281AD02968E7 -:103BF000002917D00126AA69F3039A420CD140008C -:103C00004A088018FDF770FA0A4980B2014000079F -:103C1000420F0A43E26005E04A081018FDF764FA13 -:103C200080B2E0603046FEBDF369FFFF003801401E -:103C300000440040F0FF000010B580220249FDF76B -:103C4000B4FA002010BD000098690008F0B5154ACC -:103C500000215514144C154F0CE0D65ABE4208D121 -:103C60009B185B886668B34203D90AC44B1C236067 -:103C7000083C491C4B01AB42EFD3216801230029CA -:103C800005DB49018918202201F0D8F800E0838083 -:103C9000A06840012030A84201D90020A060002087 -:103CA000F0BD000000C8000864010020AA55000013 -:103CB0001FB50B46024604A1684601F0D1FE01463D -:103CC000684601F049F81FBD201B5B25643B256455 -:103CD0004800000010B50120FFF708FD00210A2070 -:103CE00000F046FC0A2000F039FC00210B2000F017 -:103CF0003FFC0B2000F032FC10BD0000F0B50120AD -:103D000087B04004FFF7F2FC01208004FFF7EEFCCF -:103D10000120C004FFF7EAFC01208005FFF7E6FC64 -:103D20000126C020002403256A46049631C20927D3 -:103D3000FF0669463846FFF71BFE8020694631C101 -:103D4000694638460494FFF713FE93200001009063 -:103D5000039469460196029504943846FFF708FEDD -:103D60003002B86168026A46049631C26946384634 -:103D7000FFF7FEFD29486A46049631C26946284885 -:103D8000FFF7F6FD274800900394694601960295D7 -:103D900004942348FFF7ECFD0720400300900294B1 -:103DA00003946946019604941F48FFF7E1FDF02053 -:103DB0006A46049631C269463846FFF7D9FD30029B -:103DC000B86140006A46049631C269461448FFF75C -:103DD000CFFD40206A46049631C269461348FFF77A -:103DE000C7FDF0020090694601960295049438469A -:103DF000FFF7BEFD8020009069460196029504946D -:103E00000A48FFF7B5FD40206A46049631C269466C -:103E10000348FFF7ADFD07B0F0BD00000704000048 -:103E200000040048C0FC00000008004800140048DE -:103E30000848074901600849016004214160074AB8 -:103E40008260C1684907FCD1026105490160704781 -:103E5000CCCC00000030004055550000FF0F0000A2 -:103E6000AAAA0000F0B591B0282106A8FDF7B6F97E -:103E700018216846FDF7B2F901200003FFF74EFC58 -:103E800001208004FFF732FC0024082502260327C6 -:103E9000039404946A460594E0C269462248FFF7F9 -:103EA00067FD102069460394C1C101200490694652 -:103EB00005941D48FFF75CFD2020039404946A4696 -:103EC0000594C1C269461848FFF752FD0021192028 -:103ED00000F04EFB192000F041FB07200002089083 -:103EE000012006940A9040020B90099480200794C8 -:103EF0000E940D9007200D4C0F900C9506A92046AE -:103F0000FFF7C6FD60681021884360606068A843C1 -:103F1000606060680902884308436060206840214F -:103F20000843206011B0F0BD00040048003001409B -:103F300010B586B014216846FDF750F91020FFF740 -:103F4000E1FB0021112000F013FB112000F006FB23 -:103F50002F2069460880002001900848084C0290F4 -:103F60002046FFF7C7FD2068802188432060E06875 -:103F700001210843E06006B010BD0000E703000027 -:103F80000010004070B501208EB08003FFF7C6FB23 -:103F9000032040020790022008900320002409908B -:103FA000012509200A9407A90C950B94C006FFF778 -:103FB000DFFC3A4E102202213046FFF711FC0022AE -:103FC00002213046FFF7F0FB002202213046FFF7C6 -:103FD00033FC002202213046FFF73CFC8022022104 -:103FE0003046FFF70DFC002202213046FFF740FC6F -:103FF000002202213046FFF711FC00220321304647 -:10400000FFF7EEFB002203213046FFF7CDFB002235 -:1040100003213046FFF710FC002203213046FFF752 -:1040200019FC802203213046FFF7EAFB002203211E -:104030003046FFF71DFC002203213046FFF7EEFB60 -:1040400000211B2000F094FA1B2000F087FA14488E -:1040500069460068009001940294039405940694C4 -:104060000C20104C04902046FFF790FD6068290555 -:10407000084360606068490003225205904308438A -:104080006060A06849120843A0602046FFF774FDF5 -:104090002068284320600EB070BD00000000024080 -:1040A000000100200038014070B58EB01C21684628 -:1040B000FDF794F8182107A8FDF790F8012464048F -:1040C0002046FFF71FFB2046FFF710FB0E2007904E -:1040D00002200890032001250990002409200A9558 -:1040E00007A90C950B94C006FFF742FC414E102225 -:1040F00004213046FFF774FB002204213046FFF70D -:1041000053FB002204213046FFF796FB00220421D6 -:104110003046FFF79FFB802204213046FFF770FBFB -:10412000002204213046FFF7A3FB00220421304681 -:10413000FFF774FB002205213046FFF751FB0022F8 -:1041400005213046FFF730FB002205213046FFF7FE -:1041500073FB002205213046FFF77CFB80220521FE -:104160003046FFF74DFB002205213046FFF780FB6C -:10417000002205213046FFF751FB00211C2000F0F2 -:10418000F7F91C2000F0EAF9A61EFF21304600F0E6 -:10419000EFF9304600F0E2F91748EE0300680090AE -:1041A0000194029403940C2004AA51C2134C694652 -:1041B0002046FFF7EBFCA06821140843A060A0682C -:1041C000B0433043A06020681F214905884308435D -:1041D000206020684911884308432060A068A1142A -:1041E0000843A0602046FFF7C7FC206828432060F2 -:1041F0000EB070BD000002400401002000440040E9 -:1042000000B50846042A02D80020C04300BD01784A -:104210007F2902D90120C04300BD41784906490EDB -:104220001F2902D90220C04300BD114601F0CAFE79 -:104230000028F9D0042000BDF7B588B00F460A9ACF -:104240000898FFF7DDFF0690002803D00020C04348 -:104250000BB0F0BDBD483A7800783946824273D140 -:104260008C784A78CB78B98824024DBAB8491C4377 -:1042700008704A7001200790200521070226000ED1 -:10428000090F130001F000FC11A60A508DA7BFDD35 -:10429000A6A6A6A6A6A6A6A6E9F0A600E81DC008A2 -:1042A000AB4903908870002038E000270120059773 -:1042B00001900098C000049026E021070122200907 -:1042C000090FD202944207D24200A24812180920D4 -:1042D00080011018808E05E042009E481018FF30C3 -:1042E0008130808AFDF770FB002801D001980743D8 -:1042F0000198641C4006000E01900598A4B2401C71 -:104300000590082804DA049805994018A842D4DBDF -:104310008F4800994018C7700098401C039900907E -:104320008842C2DB761854E0E81DC0088849039033 -:104330008870002030E00020009001200190029859 -:104340000027C00004901DE0FDE02005000E4200A3 -:10435000804821071218092080011018090F808A4F -:10436000FDF732FB002803D0019900980843009024 -:104370000198641C4006000E7F1CA4B20190082F17 -:1043800003DA0498C019A842DFDB7149029A009849 -:104390008918C8700298401C039902908842CADBB1 -:1043A000C0E768006A498446887000200EE0211842 -:1043B0004A006849470052180921C9015118898EDD -:1043C000634A0B0ABA18D3701171401CA842EEDB85 -:1043D00017E0761C8DE068005D4A844690700020EE -:1043E0000DE021184B005B4947005B18092189014A -:1043F0005918898ABF180B0AFB703971401CA842F2 -:10440000EFDB6644E5E7002D12D0FF221202954251 -:1044100007D142004F4812189D208000101800F06C -:104420004FFE39464A480A9AFCF7BFFE0A9E85E0CD -:104430004200484812189D208000101800F050FDDE -:10444000EFE738797979000208434249620052184F -:104450000921C90151188886E3E7E81DC0083C49D5 -:1044600003908870002036E047E03818C07900904B -:1044700001200190002005900298C000049024E0E3 -:10448000210701222009090FD2029442009B019AC0 -:1044900007D21A4043002F481B189D20800018188F -:1044A00005E01A4043002B481818FF30953000F003 -:1044B0001BFE0198641C4006000E01900598A4B2F2 -:1044C000401C0590082804DA049805994018A84271 -:1044D000D6DB0298401C039902908842C5DB1C4839 -:1044E000B9788170F978C170397901717979417140 -:1044F000361D0698002814D025E000200EE041006B -:10450000C919CA79097A12020A4321184B001149C4 -:104510005B180921C90159188A86401CA842EEDBA4 -:10452000DDE70798002809D0B1B2094801F04AFD3B -:1045300007498855000A89194870B61C3246044953 -:10454000089800F0A1FD002082E600005C01002038 -:10455000E80D0020F010002070470000C106C90ED1 -:1045600001208840014908607047000000E100E038 -:104570008307FF22DB0E9A408907090E9940002825 -:104580000BDA0007000F0838830808489B0018184A -:10459000C36993430B43C3617047830804489B007E -:1045A0001818036893430B430360704700ED00E065 -:1045B00000E400E08307FF22DB0E9A408907090E22 -:1045C000994000280BDA0007000F083883080848D4 -:1045D0009B001818C36993430B43C361704783085A -:1045E00004489B001818036893430B43036070470B -:1045F00000ED00E000E400E010B501200449C00631 -:10460000486004480168491C016000F005F810BDCD -:1046100000ED00E0FC00002070B50D484178002559 -:10462000002904D04570C1780A48FCF7D9FF0A4E2A -:10463000F06F00280BD0094C094902202268FEF7D0 -:1046400005FA2560F5678021054801F0D9F870BDAD -:10465000DC000020D8020020EC0300200C01002028 -:104660000005002010B50648054B00780021403BAE -:104670005A1840325478491C14700F29F8DB10BDC9 -:1046800030110020F3B5FA4D85B0286800286FD0AE -:10469000686800281CD000220D21082000F03AFD97 -:1046A00000221146082000F035FD012211460820A5 -:1046B00000F030FD00200146EE4A13184033401C44 -:1046C00019701028F8DB00260121144640347BE2E3 -:1046D0000122E1E7B2000598059B805CD7187A7843 -:1046E000019201257B8800931B2873D012DC0246BF -:1046F000030001F0C9F91B5C7272727272723E3E65 -:104700003E3E3E3E5C5C5CA7A7A73E3EBEBEBEBE34 -:10471000BEBE5C00342870D011DC01461C390B0091 -:1047200001F0B2F918A7A7A7A7A7A7A7A7A7A7A7A8 -:10473000454545454545454545454545F7453A289F -:1047400073D008DC014635390B0001F09DF905E214 -:104750006E56E26E3000DC2804D004DC3B28EFD03B -:10476000C82824D120E1DD28FCD0FA28F9D11BE1AA -:1047700033E2D01F030001F087F90E080A10181B5E -:104780001D1A1A1A1A1A1A20261A207C4AE0FFF754 -:1047900069FF00281FD0207C3AE0FFF763FF002864 -:1047A00016D1207C002813D125E000F0C3FAF5E1F2 -:1047B0002078F7E7FFF756FF1DE0207C00280AD09D -:1047C000002905D007E0207C002804D1002902D070 -:1047D000012010E04DE000200DE0130001F054F93D -:1047E000070C050E111B262E0C0000F0A3FA0099F1 -:1047F0000198FDF7FDF82074D0E11AE100F09AFA73 -:104800000CE0207C0028E6D000990198FDF7F0F834 -:104810000028E0D0DCE7207C0028DCD0009901985B -:10482000FDF7E6F80028D6D1D2E758E1207C002831 -:10483000CED100990198FDF7DBF8B3E7207C002882 -:10484000ECD0C5E7102804D0112804D0122AAED12C -:104850000AE0227C03E0207C0028A8D001220099F5 -:10486000019800F057FC99E1207C00289FD000229D -:10487000F5E715383D79030001F006F9120A121523 -:10488000181B0F1E3C4C5B6A2D798185898D7D94A8 -:1048900000F050FA13E0207484E000F04BFA1DE0C1 -:1048A00000F048FA29E000F045FA36E000F042FA5C -:1048B00042E000F03FFA4EE0207C002870D028460D -:1048C0000099FDF71DF90546F9887879FDF718F983 -:1048D000854263D064E0207C002861D0284600999E -:1048E000FDF70EF90546F9887879FDF709F9854253 -:1048F00054D155E0207C002852D028460099FDF77D -:10490000FFF80546F9887879FDF7FAF8854245DB26 -:1049100046E0B1E0207C002842D028460099FDF70F -:10492000EFF80546F9887879FDF7EAF8854235DC35 -:1049300036E0207C002833D028460099FDF7E0F8C7 -:104940000546F9887879FDF7DBF8854226DD27E012 -:10495000207C002824D028460099FDF7D1F8054690 -:10496000F9887879FDF7CCF8854217DA18E0207CD1 -:10497000002813D1A3E7207C00280FD1AEE7207CCC -:1049800000280BD1B9E7207C002807D1C5E7207C9F -:10499000002803D1D0E7207C0028DCD001207AE772 -:1049A000002078E70225F9E03F791546C8280DD0A8 -:1049B000DC2823D0DD282AD0FA28F3D12D48E900BD -:1049C00008184030007EC0062AD508E02948E900D2 -:1049D00008184030007EC00601D4002121E0207C70 -:1049E000002822D038460099FDF78AF8014628466B -:1049F00000F07EFA284600F0F5F84CE71D48E90083 -:104A000008184030007EC006E9D4012109E01948A9 -:104A1000E90008184030007EC006E0D4022100E022 -:104A200003212846FDF7D8FCD9E7284600F068FDA9 -:104A3000E0E73F790225342802D0372816D108E074 -:104A4000207C002812D038460099FDF759F8401C08 -:104A500007E0207C002809D038460099FDF750F87F -:104A6000401E02463846009900F0CCFB96E000005C -:104A7000680E0020F01000203D7979790291F988C4 -:104A80000191332814D035281BD038288AD1207CB6 -:104A9000002887D00298FDF733F80746284600998A -:104AA000FDF72EF83A1A0199029800F0ABFB79E76E -:104AB000207C0028FBD028460099FDF721F802460B -:104AC000F1E7207C0028F2D028460099FDF718F87D -:104AD000054601990298FDF713F82A18E3E73A7999 -:104AE00079790291F9880191797A03917D89362843 -:104AF00006D0392812D03A281FD03B284DD131E0BA -:104B0000207C002849D010460099FCF7F9FF0746A1 -:104B100001990298FCF7F4FF3A180CE0207C002879 -:104B20003BD010460099FCF7EBFF0746019902982D -:104B3000FCF7E6FF3A1A29462CE0207C00282CD00E -:104B400010460099FCF7DCFF07B201990298FCF7C8 -:104B5000D7FF00B247433A462946039800F052FB7C -:104B60003A1416E0207C002817D010460099FCF774 -:104B7000C7FF07B201990298FCF7C2FF01B238469D -:104B8000FCF7C8FA02B20F462946039800F03AFB38 -:104B90003A46691C039800F035FB032530114100AB -:104BA0000F48012308183107090F02898B40194665 -:104BB000114000D00121277C0830002F01D01A437A -:104BC00000E09A43028076190698864200DA81E571 -:104BD00003494868401C4860002007B0F0BD000051 -:104BE000680E0020FEB50746402802DB0020C043C7 -:104BF000FEBD2C48F9000E1800964036348BE106B5 -:104C000001D40020FEBDA1063CD561063FD4264953 -:104C1000096800980A25406D0190081AA1070FD075 -:104C2000A107890F012905D0022905D0E143890791 -:104C300005D005E0642503E07D25ED0000E01B4D77 -:104C4000A84224DB2946FCF765FA014615487A009C -:104C500012180B20800110188446808E019B40188A -:104C600069435B18009980B24B650D218901511889 -:104C7000898E814203D8084640210C433483614623 -:104C8000888604E0600602D5402084433483307E69 -:104C9000B9B24006C20F052000F03CFA307E400653 -:104CA000C00FFEBDF0100020B4010020102700004E -:104CB000F7B50446FCF7FFFE054602992068A942B5 -:104CC000A16806DC4018029A0199FCF76EFA029975 -:104CD00019E040182A460199FCF767FA2946204650 -:104CE000FCF72AFB2046FCF7E6FE06460298471B27 -:104CF000B7420DDCA16820683A464018019949196D -:104D0000FCF753FA39462046FCF716FB0298FEBD25 -:104D1000002E0CDDA168206832464018019949191F -:104D2000FCF743FA31462046FCF706FBAD1928464E -:104D3000FEBD0000074A0F2011183F235B5C403185 -:104D4000401E0B700028F7DC02494031087C0870D7 -:104D500070470000F010002010B50C460A460146CE -:104D60000348FFF7A5FF00F033FD204610BD00000B -:104D7000B003002010B50C460A4601460348FFF771 -:104D800097FF00F025FD204610BD0000B003002075 -:104D900010B50C4600F084FD204610BD044949685A -:104DA000F0221140034A0909515CC84070470000D5 -:104DB000001002404C6A000803494968034A49054B -:104DC000490F515CC8407047001002405C6A0008FF -:104DD00010B5074841680C200140064805D0042959 -:104DE00004D0082901D100F009F810BD024810BD17 -:104DF0000010024000127A00001BB70010B50C4CE6 -:104E00006168012212040B48114002D0914200D186 -:104E10000948E16A0907090F491CFCF765F961684F -:104E20000F2292041140890C891C484310BD0000D8 -:104E30000010024000093D00001BB70070B5D417F8 -:104E4000A40F0023A418A51003E09C000E590651DE -:104E50005B1C9D42F9DCD40F6B00A418651003E0C5 -:104E60005C000E5B06535B1C9D42F9DC104670BD76 -:104E70000920C006006901090F208843704700001F -:104E8000F8B5002384468025DB43124800242146E0 -:104E90002A464A43121817880F4EB74209D17E2678 -:104EA000B75A0E4EB74204D15288A24201DD0B46DA -:104EB0001446491C0829EBDB082B06D26B43191852 -:104EC00080226046FFF7BAFF02E06046FEF7B4FEBC -:104ED0000020F8BD00C00008AA550000A55A000037 -:104EE0000B0702881B0F012199408A4302807047FB -:104EF00030B5402802DB0020C04330BD0D4CC2005D -:104F000013191A464032157EAD0611D4400000191F -:104F10000D24A4010419A1860B240021A401001969 -:104F20008186054800685865108B2021084310834E -:104F3000002030BDF0100020B401002010B500F0BA -:104F400001F810BDF0B5284EB068C007C00F42D0C0 -:104F5000F0682649C5B2C86A254C401CC862088D55 -:104F6000401C0885A079002802D1284601F06CF881 -:104F7000A0790027002813D11E48A1784554A078B5 -:104F8000401CA0700D2D0BD1A07801F05DF8A07829 -:104F9000E07001206070A770277017490007486013 -:104FA000A079002817D06079401C60711348016B0C -:104FB000491C01636079217988420DD30120C00228 -:104FC0000921C9068861A7710120E0712070A770CE -:104FD0000B4980208862F0BD064861794030405C12 -:104FE000307301F031F8F0BD00300140701800203E -:104FF000DC000020D802002000ED00E07017002047 -:10500000001400487047000070B51A4C6168491CD4 -:10501000616019490180A18841801849CA6C828069 -:10502000496D8160112181831549C183A1684A01BD -:105030001449511800250B462A469E5CFF2E04D1C8 -:10504000521C202AF9D3002D10D02022FCF754FA4C -:10505000A0682060401CA06040010121890220302E -:10506000884201D90020A060002070BD202200F0FD -:10507000CDFCEDE764010020AA5500007016002069 -:10508000A55A000000C8000810B514460A460128B9 -:1050900002D0022806D00DE021461046FFF76AFE36 -:1050A000054804E021461046FFF772FE0348816F71 -:1050B000491C8167204610BD58030020EC030020E6 -:1050C0000B0702881B0F012199400A430280704799 -:1050D0000907090F01238B400188002A01D01943D9 -:1050E00000E099430180704710B5002A02D0FFF715 -:1050F000E7FF10BDFFF7F4FE10BD0907090F0123FC -:105100008B400188002A01D0194300E099430180B7 -:105110007047000070B50B051B0E204C5B000D079F -:105120001C192D0F030000F0AFFC09060B14191E0B -:1051300022272C313600FF292DD89520800003E04E -:10514000FF2928D89D20800020182946FFF7D5FF89 -:1051500021E0FF291FD8A5208000F5E780291AD279 -:10516000FD208000F0E7802915D20D48ECE74029AA -:1051700011D2AD208000E7E740290CD2B520800095 -:10518000E2E7802907D206482030DDE7802902D2F5 -:1051900003488030D8E7002070BD0000F0100020E8 -:1051A000140400000121C903034A002801D09162C0 -:1051B0007047916170470000000800480121890391 -:1051C000034A002801D09162704791617047000046 -:1051D000000800480121C903034A002801D0916159 -:1051E00070479162704700000008004801214903A0 -:1051F000034A002801D09162704791617047000016 -:1052000000080048F0B5304C4B001C190923DB01A5 -:10521000E6180B23DB01E51892B28A283DD00EDC9C -:10522000294F4B00DF1909239B01FF188338030026 -:1052300000F02AFC0714181C21262D464800992846 -:105240003ED006DC8B282CD08C2831D08D2839D14B -:1052500033E0A12834D0FE2834D131E0102931DAEE -:10526000BA822FE010292DDABA862BE0102929DA2C -:105270000520C00108E0082924DA0F20800114E08D -:1052800008291FDA01208002201882821AE0802972 -:1052900018DAB28616E0AA8614E0802912DAB28201 -:1052A00010E040290EDA0D2080012018828609E0E6 -:1052B000402907DA0B208001F7E7402902DAE8E706 -:1052C0008029E8DB0020F0BDF0100020F0B58DB0A3 -:1052D000002500F035FEFCF77FFC059010213A48D0 -:1052E00000F090FE0790FCF777FC04901021364800 -:1052F00000F032FE0690FCF76FFC0390102132485C -:1053000000F048FE0190FCF767FC064610212E488D -:1053100000F058FE0090FCF75FFC2C4A04469068B1 -:10532000012108439060881E106129481061264BB6 -:105330000021585C1070491C1029FADB1768FCF733 -:105340004BFC0B900199009802970190214F00911E -:10535000781921A1069B079A00F082FB45190B984A -:10536000A11B001B01910290039A04990398B21AA1 -:10537000431A009208460599421A781920A100F0B4 -:105380006FFB441908A8FEF74CFB26484268012031 -:10539000000402403819134623A100F061FB0419F0 -:1053A000381926A1089A00F05BFB01193846FFF76F -:1053B000D3FC01210D20FEF77BFC244903208860EB -:1053C00000200DB0F0BD000048650008003002402C -:1053D00001A00000D80100200D0A435243202025DF -:1053E000303458202025303458202025303458209F -:1053F00020253034582020253034580D0A00000074 -:1054000074696D6520253034642020253034642093 -:105410002025303464202025303464202025303489 -:10542000640D0A00001002404D61696E536F757281 -:105430006365202578202564200D0A007379736345 -:105440006C6B202564200D0A00000000C0000020C5 -:1054500030B50021174D0846696042005219401CC2 -:105460001181FF28F9DD00200522134CD2014300F1 -:105470001B199B18401C99821028F8DB0020092278 -:10548000D20143001B199B18401C9986FF28F8DDA8 -:1054900000201022C100091940310B8B401C93439E -:1054A0000B834028F6DB0120044928604882002055 -:1054B00030BD0000680E0020F0100020A41800206D -:1054C00010B500210C48092201600C4B08469201DE -:1054D0004400E418A418401CA1861028F8DB002022 -:1054E000012292024400E418A418401CA18208285A -:1054F000F8DB002010BD0000680E0020F010002036 -:1055000010B5402802DB0020C04310BD0B4BC1008A -:10551000CA18114640310C7EA4060DD54000C018B3 -:105520000B2300249B01C018848605480068506541 -:10553000088B202290430883002010BDF01000202B -:10554000B401002010B5FCF771FBFCF719FF10BD8A -:1055500070B594B030216846FBF740FE0024022568 -:1055600001260E94E8030990009605200F94C004CC -:105570000D9401960A900C9408950B956846FCF7DB -:10558000F7FC002803D0862115A000F067FA072059 -:105590000C900E9401210D950F940CA8FCF70CFCB7 -:1055A000002803D092210EA000F058FA109610A8FF -:1055B0001296FCF78BFB002803D0A12108A000F075 -:1055C0004DFA4B208001FCF7C3FE0420FCF77AFE65 -:1055D00000221146501EFCF775FB14B070BD000090 -:1055E0002E2E5C2E2E2F436F6D4C69625C537263BE -:1055F0005C4253502E63000013480168012211439E -:1056000001604168114A114041600168104A11402F -:1056100001600168012292049143016041683F22C8 -:10562000120491434160C16A09090901C162016B19 -:10563000FF22143291430163416B490849004163E1 -:105640000021816070470000001002400CB8FF0884 -:10565000FFFFF6FE04480169C907C90F02D0012106 -:10566000C9430161704700000010004070B51B4C39 -:10567000E0691B498006C00F11D01A4A0120106052 -:10568000194A10600869401C0861A28C4868401CD7 -:105690004860174B154D18682A54401C1860E06983 -:1056A0000007C00F04D008202062C869401CC861F0 -:1056B0002068C006C00F07D0E069C006C00F03D045 -:1056C0001020206200F03CF8E0694006C00F03D0D3 -:1056D0004020206200F074F870BD000000380140E6 -:1056E0005803002010010020140100208004002035 -:1056F0000801002010B5104CE069E0690007C00FF8 -:1057000005D0082020620D48C169491CC16120688C -:10571000C006C00F07D0E069C006C00F03D010203C -:10572000206200F09DF8E0694006C00F03D04020E1 -:10573000206200F0E5F810BD00440040EC030020BA -:105740000548416A491C416204490968002901DD94 -:105750000121C167704700005803002008010020A4 -:10576000F8B5144D0C46064602212846FDF7F8FF11 -:1057700010200090104B324602212846FDF7DAFF38 -:10578000224602212846FEF71DF802212846FDF791 -:10579000F3FF0A4804630121417202212846FDF704 -:1057A000F7FF054828388168802211438160204630 -:1057B000F8BD0000000002402838014058030020D6 -:1057C0000248016A491C016270470000580300202A -:1057D00010B50A48407A00280DD1084C206F583483 -:1057E000002808D12046FCF753F90146E2682068FA -:1057F0008018FFF7B5FF002010BD000058030020FF -:10580000F8B5144D0C46064605212846FDF7A8FFBD -:10581000002000903346104A05212846FDF78AFFF4 -:10582000224605212846FDF7CDFF05212846FDF734 -:10583000A3FF0A4844630121817205212846FDF730 -:10584000A7FF054824388168402211438160002069 -:10585000F8BD00000000024024440040EC0300209A -:105860000A480B4900794058802180B2081A09493A -:10587000012208600849CA674A6A521C4A62002825 -:1058800003DD01200549000748607047586500089E -:10589000040002400C010020EC03002000ED00E0B9 -:1058A000F8B5144D0C46064604212846FDF758FF6E -:1058B00010200090104B324604212846FDF73AFF95 -:1058C000224604212846FDF77DFF04212846FDF7E6 -:1058D00053FF0A4804630121417204212846FDF761 -:1058E00057FF05482838816880221143816020468F -:1058F000F8BD00000000024028440040EC030020F6 -:105900000248016A491C016270470000EC03002054 -:1059100010B5054C0A46638821465B1C4380FBF7A3 -:10592000EBFD002010BD0000007C00080B4610B508 -:10593000054984054118002C184602D000F066F88D -:1059400010BDFBF7D9FD10BD009000080B460349C0 -:1059500010B541181846FBF7CFFD10BD00800008B8 -:1059600070B50C460B494118002B08D00A4D45195B -:10597000012B03D0094B9B8A002B00D129468005BF -:10598000204603D000F042F8002070BDFBF7B4FDC4 -:10599000FAE700000080000800A00008A41800201A -:1059A000F8B54188174A491C4180154901807E217C -:1059B00000250A52ED43802300221146124C002696 -:1059C00059430C19314603E0675CFF2F04D1491C91 -:1059D0009942F9DB002E03D0521C082AEDDB00E0CF -:1059E0001546082D06D208495D436918802200F04B -:1059F0000DF803E080220449FBF77EFD0020F8BD8E -:105A0000AA550000A55A000000C00008F8B51646C7 -:105A10000F460546FDF796FF0024761C76080EE03B -:105A2000600042195278295C120289188AB2C119A1 -:105A300000230220FDF72AFF002802D0641CA642A2 -:105A4000EED8054A1169802319431161002801D05D -:105A50000020F8BD0120F8BD00200240FEE7000054 -:105A60000FB410B504A9074B02AA039800F028F858 -:105A7000044602A9002000F05DFA204610BC08BCD4 -:105A800004B01847355F000830B47446641E2578AA -:105A9000641CAB4200D21D46635D5B00E31830BC62 -:105AA000184702E008C8121F08C1002AFAD170473F -:105AB0007047002001E001C1121F002AFBD170478E -:105AC000FFB591B00F460546002606E025280AD00E -:105AD000149A139990476D1C761C28780028F5D1EC -:105AE000304615B0F0BD002400940121F34A029421 -:105AF00000E004436D1C2B780846203B9840104280 -:105B0000F7D128782A280ED0022128780246303A88 -:105B1000092A15D8009A0A235A43303A80180C43B0 -:105B20006D1C0090F1E701CF0090002805DA0120FC -:105B300040030443009840420090022004436D1C3F -:105B400028782E2815D10420044368786D1C2A2853 -:105B50000AD101CF6D1C02900BE002990A22514339 -:105B6000303940186D1C02902878014630390929D7 -:105B7000F3D928786C2810D006DC4C281AD0682875 -:105B80000ED06A2817D104E0742813D07A2812D1D5 -:105B900010E00120400504430CE00121090501E06B -:105BA000032109050C436978814203D101200005D6 -:105BB00024186D1C6D1C287803906E281ED00CDCF8 -:105BC000632831D004DC00288AD0582811D1B2E0F3 -:105BD00064287BD069280CD178E073282DD004DCB0 -:105BE0006F2870D0702804D1A7E075286CD0782871 -:105BF0006BD0149A13999047761C62E06002400FB4 -:105C0000022807D003280AD0042838680AD0066082 -:105C10003F1D56E03868F11706604160F8E73868C4 -:105C20000680F5E70670F3E73878694608740020C7 -:105C3000487404A80390012003E038680390002012 -:105C4000C0433F1D61070FD5002101E00199491CA8 -:105C5000029A0191914213DA8142F7DB019A03998A -:105C6000895C0029F2D10BE0002101E00199491C77 -:105C700001918142FADB019A0399895C0029F5D1EF -:105C800001990098139A401A00902146149B00F045 -:105C90003BF901998019461807E0039803990078A9 -:105CA000491C0391149A139990470198401E019042 -:105CB000401CF2D12146149B139A009800F014F96D -:105CC00086196D1C09E741E033E034E00A20002129 -:105CD000049005916002410F022905D001CFC2173F -:105CE0009446032905D007E0FF1DFF08FF0003CFFE -:105CF00006E000B2C2179446042902D140B2C1178F -:105D00008C4600226146944506DA0A46002140424C -:105D100091418C462D2102E0210504D52B216A46B4 -:105D20001176012103E0E10701D02021F7E701917D -:105D300054E00A200BE0102009E01020049000211C -:105D40000420044308200591029003E0082000216C -:105D5000059104906002410F022905D001CF002275 -:105D60009446032906D006E0FF1DFF08FF0003CF7D -:105D70008C4603E080B2042900D1C0B20021019119 -:105D800021072BD50399702906D0049A1021059B71 -:105D90004A401A4305D00EE040216A46117601219F -:105DA00008E06146014306D030216A461176039926 -:105DB000517602210191049A0821059B4A401A4319 -:105DC0000CD16146014301D1610707D530216A46F4 -:105DD0001176012101910299491E029103995829D6 -:105DE00004D037A103910FA90F910DE039A1F9E774 -:105DF0006146059B049AFBF706FA039B8C469B5C65 -:105E00000F9A521E0F92137061460143F0D10F9802 -:105E100007A9081A20300390600704D50120000468 -:105E20008443029801E0012002900399884201DD39 -:105E3000401A00E0002041180290019809180098CB -:105E4000401A0090E00306D42146149B139A009850 -:105E500000F05AF886190020049008E006A9085CB2 -:105E6000149A139990470498401C761C0490019949 -:105E70008842F3DBE0030CD52146149B139A00986B -:105E800000F042F8861904E0149A302013999047E4 -:105E9000761C0299481E02900029F5DC08E00F9854 -:105EA0000F990078491C0F91149A13999047761C0A -:105EB0000399481E03900029F1DCFBE60928010044 -:105EC0003031323334353637383961626364656670 -:105ED0000000000030313233343536373839414232 -:105EE0004344454600000000F8B5044600251E4620 -:105EF0001746880404D405E039462020B0476D1CBD -:105F0000641EF9D52846F8BDFFB50446002581B0CA -:105F10001E46C80301D5302700E02027880404D599 -:105F200005E038460399B0476D1C641EF9D5284634 -:105F300005B0F0BD0A68531C0B601070704700007C -:105F400010B50A2101A0FEF707FF10BD1B5B324A06 -:105F50001B5B303B3048000030B503460B4800293E -:105F600000D101210A4C491E0ED31A78504000225C -:105F7000C50702D04008604000E04008521CD2B281 -:105F8000082AF5D35B1CEEE730BD0000FFFF0000E0 -:105F900001A0000070B50A4DFF23EE1D1A46F93628 -:105FA00005E0047854402A5D5A40335D401C0C469D -:105FB000491E89B2002CF4D11802104370BD0000B4 -:105FC0005E67000870B504460C4800220C4E11E0D4 -:105FD0002378521C1D4645402D07ED0E755B0009C8 -:105FE0004540180968400007C00E305A2B09584038 -:105FF00092B2641C8A42EBD370BD0000FFFF000028 -:106000005E69000810B5084A084B07E00478544060 -:106010002406E40D1C5B120A6240401C491EF5D2A6 -:10602000D04380B210BD0000FFFF00005E65000895 -:1060300006C00021016041608160C16001220261EF -:106040004161084670470000074910B54A8D0B466C -:106050004C3BD054488D401C80B24885642801D305 -:106060005120488510BD00007018002088B0002025 -:1060700080F31088F74E0127FF2037830530F64B59 -:1060800080220090991AF548FCF7C6F94020F44B9D -:106090000246191A0090F348FCF7BEF9FBF7CEFD53 -:1060A000F14C0025F1482567C06A6066F048006839 -:1060B000A066F048406AE066FFF74AFAEF49EE480A -:1060C0000860FCF7B9F9FDF719FEFDF703FEFDF7CF -:1060D000D5FAEB48FEF7D4FE3783FEF7C9FEA0637E -:1060E0006063E848E84E027831780220FCF7BCFA99 -:1060F000E6490220FCF730FD606B102108430107E0 -:10610000090FE34A60631170C00603D5E148377098 -:10611000057002E0DF4835700770DA480170FBF760 -:1061200085FBDD48FBF77AFB05210820FBF744FCE3 -:10613000D7480178D3480170D84901200870E12080 -:10614000D74940020860FDF71DFFFDF7ADFFFDF7E1 -:1061500089FED4484168402739434160FDF768FE15 -:10616000FDF7E6FED0480168012211430160CF48E7 -:10617000016820221143016001681022114301606F -:106180000168394301608021C948FFF739FBC948DC -:1061900001681022114301600168394301600A203F -:1061A000FBF730FD0120FFF721F80020FFF706F88C -:1061B0000020FFF70FF8FFF789F8FBF70DFDA54F5B -:1061C00060663D827D82AE48C0883882388A012868 -:1061D0000AD1FCF7DBF8208F202108407882788AEA -:1061E000002801D0FFF734F9B34E0127B34D00204A -:1061F00028706F70FBF7F0FC2861FBF711FD06902B -:10620000FEF736FE05469348008AC0070BD0A80665 -:10621000208F04D5800606D4FFF71AF903E0800624 -:1062200001D5FFF74DF9A5630698E0630920C00684 -:106230000069B084A2480069F084A24800693085F2 -:10624000A14800697085FBF723FBFBF7C5FC9B4D5C -:1062500068618048008A01280BD17E48818A002924 -:106260001FD09A49A960C18A99480160A868FEF7C1 -:1062700009FA606E69696166081AA066E16E884273 -:1062800000D2E066216F884200D92067FBF7A4FCAA -:10629000A8617D480078002817D08E490020CB786F -:1062A0000AE08D49DEE78D49091820310A788C49CA -:1062B000091820310A70401C8342F4DC71480078D0 -:1062C000002802D00220FCF755FA0698800401D578 -:1062D0002F7001E0002028700698000501D56F702E -:1062E00001E0002068706B480078002811D002207F -:1062F000FCF782FC7B490868800401D52F7001E01F -:10630000002028700868000501D56F7001E00020AA -:106310006870606C002801D0401E6064A06C00288A -:1063200001D0401EA0644B48018B00293FD0687803 -:10633000FEF75CFF6878FEF741FF6878FEF732FFF2 -:106340006878002801D1012000E00020FEF742FF1C -:10635000FBF742FCE861FBF73FFC2862FBF73CFCE3 -:106360000A2168620846FAF7AFFE0020401C402868 -:10637000FCDB206C5C49401C20640868002836DD8A -:10638000364AD26F002A32D082B258490120FDF736 -:1063900053FF002805D05448544902680120FCF7F7 -:1063A00095FD5149002008602C49C86732E0008AF9 -:1063B00001280FD0606C002810D06878FEF716FF17 -:1063C000A06C00280CD06878FEF7F8FE6878FEF71D -:1063D000E9FEBAE7464800680028EFD02878EDE7E4 -:1063E0000020FEF7EBFE0020FEF7DCFEABE74149A4 -:1063F000686888420DD92D48416801221205114371 -:1064000041604168530003225205914319434160A2 -:1064100001E0401C68601F480078002802D000207E -:10642000FBF7F0FB182234496846FAF7BEFE244D0C -:10643000002013494200511840310A891105130BFD -:106440001207090E120F00296CD0002B56D0012B19 -:1064500059D067E0A41800204419002058030020F8 -:10646000881A0020EC0300207016002080F7FF1F20 -:10647000FC0000200010024010270000D80000207F -:1064800070100020230100201801002011250008B1 -:106490001C010020190100209D1500081D0100208D -:1064A0000001002000300140001000400038014091 -:1064B00000050020004400407018002088010020E2 -:1064C0000004004800080048000C004800A0000834 -:1064D00060010020081B002000800008241B002011 -:1064E000180C00204C01002008010020800400202E -:1064F000680E0020C0270900346A00080F4B5918A5 -:1065000009239B0103E00D4B591813235B01C918A4 -:10651000C97C3B469340194204D0820069468958A1 -:10652000A96103E0820069468958A962401C0628D7 -:1065300000DA7EE703490248086057E6F0100020C1 -:10654000AAAA000000300040112233445566778823 -:1065500099AABBCCDDEEFF00081C304458000000B7 -:10656000891112239B322446AD573665BF74488C7F -:10657000C19D5AAFD3BE6CCAE5DB7EE9F7F8811046 -:10658000080193331A22A5562C47B7753E64C99C5F -:10659000408DDBBF52AEEDDA64CBFFF976E8022125 -:1065A0008B30100299132667AF763444BD554AAD3F -:1065B000C3BC588ED19F6EEBE7FA7CC8F5D9833106 -:1065C0000A2091121803A7772E66B5543C45CBBD1F -:1065D00042ACD99E508FEFFB66EAFDD874C90442E5 -:1065E0008D5316619F702004A9153227BB364CCEFF -:1065F000C5DF5EEDD7FC6888E1997AABF3BA8552C6 -:106600000C4397711E60A1142805B3373A26CDDEDE -:1066100044CFDFFD56ECE9986089FBBB72AA0663A4 -:106620008F7214409D512225AB343006B9174EEFBE -:10663000C7FE5CCCD5DD6AA9E3B8788AF19B877385 -:106640000E6295501C41A3352A24B1163807CFFF9E -:1066500046EEDDDC54CDEBB962A8F99A708B088464 -:1066600081951AA793B62CC2A5D33EE1B7F0400896 -:10667000C919522BDB3A644EED5F766DFF7C89942D -:1066800000859BB712A6ADD224C3BFF136E0C11876 -:106690004809D33B5A2AE55E6C4FF77D7E6C0AA50C -:1066A00083B4188691972EE3A7F23CC0B5D1422956 -:1066B000CB38500AD91B666FEF7E744CFD5D8BB5ED -:1066C00002A499961087AFF326E2BDD034C1C33936 -:1066D0004A28D11A580BE77F6E6EF55C7C4D0CC6CC -:1066E00085D71EE597F42880A1913AA3B3B2444A16 -:1066F000CD5B5669DF78600CE91D722FFB3E8DD6AD -:1067000004C79FF516E4A9902081BBB332A2C55AF5 -:106710004C4BD7795E68E11C680DF33F7A2E0EE78B -:1067200087F61CC495D52AA1A3B03882B193466BD5 -:10673000CF7A5448DD59622DEB3C700EF91F8FF76C -:1067400006E69DD414C5ABB122A0B9923083C77BB5 -:106750004E6AD5585C49E33D6A2CF11E780F00C1A2 -:10676000814001C0804101C0804100C1814001C021 -:10677000804100C1814000C1814001C0804101C011 -:10678000804100C1814000C1814001C0804100C101 -:10679000814001C0804101C0804100C1814001C0F1 -:1067A000804100C1814000C1814001C0804100C1E1 -:1067B000814001C0804101C0804100C1814000C1D1 -:1067C000814001C0804101C0804100C1814001C0C1 -:1067D000804100C1814000C1814001C0804101C0B1 -:1067E000804100C1814000C1814001C0804100C1A1 -:1067F000814001C0804101C0804100C1814000C191 -:10680000814001C0804101C0804100C1814001C080 -:10681000804100C1814000C1814001C0804100C170 -:10682000814001C0804101C0804100C1814001C060 -:10683000804100C1814000C1814001C0804101C050 -:10684000804100C1814000C1814001C0804100C140 -:10685000814001C0804101C0804100C1814000C031 -:10686000C101C30302C2C60607C705C5C404CC0CD8 -:106870000DCD0FCFCE0E0ACACB0BC90908C8D81848 -:1068800019D91BDBDA1A1EDEDF1FDD1D1CDC14D458 -:10689000D515D71716D6D21213D311D1D010F03088 -:1068A00031F133F3F23236F6F737F53534F43CFC98 -:1068B000FD3DFF3F3EFEFA3A3BFB39F9F83828E848 -:1068C000E929EB2B2AEAEE2E2FEF2DEDEC2CE42418 -:1068D00025E527E7E62622E2E323E12120E0A06088 -:1068E00061A163A3A26266A6A767A56564A46CAC58 -:1068F000AD6DAF6F6EAEAA6A6BAB69A9A86878B8C8 -:10690000B979BB7B7ABABE7E7FBF7DBDBC7CB474D7 -:1069100075B577B7B67672B2B373B17170B0509087 -:1069200091519353529296565797559594549C5C17 -:106930005D9D5F9F9E5E5A9A9B5B995958988848C7 -:1069400049894B8B8A4A4E8E8F4F8D4D4C8C448497 -:1069500085458747468682424383418180400000C7 -:1069600001CC01D8001401F0003C002801E401A092 -:10697000006C007801B40050019C01880044030EB3 -:1069800009010201040104010006000000000000EA -:106990000000000006000000AA55000000010000F1 -:1069A00000000000010001000009000000000000DC -:1069B00000000200000000090000000000000000CC -:1069C00000000000000000000000000000000000C7 -:1069D00010101010101010101010101010101010B7 -:1069E0001000200030004000500060000300000054 -:1069F0000400000005000000060000000700000081 -:106A000008000000090000000A0000000B00000060 -:106A10000C0000001100A55AAA550000000000005B -:106A20000000000000000000081C304458081C3022 -:106A3000445800000004000000080000001000009E -:106A40000020000000400000008000000000000066 -:106A5000000000000102030406070809000000000E -:106A600001020304846A0008C0000020F80000004E -:106A7000A25A00087C6B0008B8010020B01D00007D -:106A8000B25A0008000000000000000000000000F2 -:106A900000000000000000000100000010270000BE -:106AA00000000000000000000000000000000000E6 -:106AB00000000000000000000000000000000000D6 -:106AC0000000000000C2010040420F000000000072 -:106AD00000000000000000000000000000000100B5 -:106AE00000000001010100000000000000000000A3 -:106AF0000000000000000000000000000000000096 -:106B00000000000000000000000000000000000085 -:106B10000000000001000000000000000000000074 -:106B20000100000097000000FFFFFFFF00000000D1 -:106B30000000000000000000000000000000000055 -:106B40000000000000000000000000000000000045 -:106B500000000000008000080000000000000000AD -:106B60000000000000000000000000000000000025 -:0C6B700000000000001BB7000000000047 -:04000005080010B52A -:00000001FF diff --git a/C8T6_TestApp1/MDK-ARM/F030C8T6_TestApp1/F030C8T6_TestApp1.map b/C8T6_TestApp1/MDK-ARM/F030C8T6_TestApp1/F030C8T6_TestApp1.map deleted file mode 100644 index 021cd15..0000000 --- a/C8T6_TestApp1/MDK-ARM/F030C8T6_TestApp1/F030C8T6_TestApp1.map +++ /dev/null @@ -1,2712 +0,0 @@ -Component: ARM Compiler 5.06 update 4 (build 422) Tool: armlink [4d35d2] - -============================================================================== - -Section Cross References - - startup_stm32f030x8.o(RESET) refers to startup_stm32f030x8.o(STACK) for __initial_sp - startup_stm32f030x8.o(RESET) refers to startup_stm32f030x8.o(.text) for Reset_Handler - startup_stm32f030x8.o(RESET) refers to stm32f0xx_it.o(i.NMI_Handler) for NMI_Handler - startup_stm32f030x8.o(RESET) refers to stm32f0xx_it.o(i.HardFault_Handler) for HardFault_Handler - startup_stm32f030x8.o(RESET) refers to stm32f0xx_it.o(i.SVC_Handler) for SVC_Handler - startup_stm32f030x8.o(RESET) refers to stm32f0xx_it.o(i.PendSV_Handler) for PendSV_Handler - startup_stm32f030x8.o(RESET) refers to stm32f0xx_it.o(i.SysTick_Handler) for SysTick_Handler - startup_stm32f030x8.o(RESET) refers to stm32f0xx_it.o(i.DMA1_Channel2_3_IRQHandler) for DMA1_Channel2_3_IRQHandler - startup_stm32f030x8.o(RESET) refers to stm32f0xx_it.o(i.DMA1_Channel4_5_IRQHandler) for DMA1_Channel4_5_IRQHandler - startup_stm32f030x8.o(RESET) refers to stm32f0xx_it.o(i.TIM6_IRQHandler) for TIM6_IRQHandler - startup_stm32f030x8.o(RESET) refers to stm32f0xx_it.o(i.SPI1_IRQHandler) for SPI1_IRQHandler - startup_stm32f030x8.o(RESET) refers to stm32f0xx_it.o(i.USART1_IRQHandler) for USART1_IRQHandler - startup_stm32f030x8.o(RESET) refers to stm32f0xx_it.o(i.USART2_IRQHandler) for USART2_IRQHandler - startup_stm32f030x8.o(.text) refers to system_stm32f0xx.o(i.SystemInit) for SystemInit - startup_stm32f030x8.o(.text) refers to entry.o(.ARM.Collect$$$$00000000) for __main - debug.o(i.ADCProcess) refers to debug.o(.data) for .data - debug.o(i.ADCProcess) refers to kmachine.o(.bss) for KMem - debug.o(i.ADCProcess) refers to kmachine.o(.data) for PowerDownEvent - debug.o(i.ADCProcess) refers to debug.o(.bss) for .bss - debug.o(i.FormatHex) refers to printf8.o(i.__0sprintf$8) for __2sprintf - debug.o(i.Locate) refers to printf8.o(i.__0sprintf$8) for __2sprintf - debug.o(i.Locate) refers to functions.o(i.PutStr) for PutStr - debug.o(i.PowerDownProcess) refers to kmachine.o(i.AddEventLog) for AddEventLog - debug.o(i.PowerDownProcess) refers to kmachine.o(i.SaveRunStat) for SaveRunStat - debug.o(i.PowerDownProcess) refers to kmachine.o(.bss) for KMem - debug.o(i.PowerRecoverProcess) refers to kmachine.o(.bss) for KMem - debug.o(i.ShowInitInfo) refers to debug.o(i.clearscreen) for clearscreen - debug.o(i.ShowInitInfo) refers to functions.o(i.GetuS) for GetuS - debug.o(i.ShowInitInfo) refers to functions.o(i.crc_check) for crc_check - debug.o(i.ShowInitInfo) refers to functions.o(i.crc16bitbybit) for crc16bitbybit - debug.o(i.ShowInitInfo) refers to functions.o(i.crc16table) for crc16table - debug.o(i.ShowInitInfo) refers to modbusrtu.o(i.crc16tablefast) for crc16tablefast - debug.o(i.ShowInitInfo) refers to printf8.o(i.__0sprintf$8) for __2sprintf - debug.o(i.ShowInitInfo) refers to stm32f0xx_ll_rcc.o(i.LL_RCC_GetSystemClocksFreq) for LL_RCC_GetSystemClocksFreq - debug.o(i.ShowInitInfo) refers to functions.o(i.PutStr) for PutStr - debug.o(i.ShowInitInfo) refers to debug.o(i.Locate) for Locate - debug.o(i.ShowInitInfo) refers to debug.o(.constdata) for .constdata - debug.o(i.ShowInitInfo) refers to debug.o(.bss) for .bss - debug.o(i.ShowInitInfo) refers to debug.o(.data) for .data - debug.o(i.ShowRunningInfo) refers to stm32f0xx_hal_rcc.o(i.HAL_RCC_GetPCLK1Freq) for HAL_RCC_GetPCLK1Freq - debug.o(i.ShowRunningInfo) refers to uidiv.o(.text) for __aeabi_uidivmod - debug.o(i.ShowRunningInfo) refers to stm32f0xx_hal.o(i.HAL_GetTick) for HAL_GetTick - debug.o(i.ShowRunningInfo) refers to functions.o(i.GetuS) for GetuS - debug.o(i.ShowRunningInfo) refers to debug.o(i.Locate) for Locate - debug.o(i.ShowRunningInfo) refers to printf8.o(i.__0sprintf$8) for __2sprintf - debug.o(i.ShowRunningInfo) refers to functions.o(i.PutStr) for PutStr - debug.o(i.ShowRunningInfo) refers to globaldef.o(.data) for Uart1BaudFirstGot - debug.o(i.ShowRunningInfo) refers to debug.o(.data) for .data - debug.o(i.ShowRunningInfo) refers to kmachine.o(.bss) for KMem - debug.o(i.ShowRunningInfo) refers to globaldef.o(.bss) for Uart1Stat - debug.o(i.ShowRunningInfo) refers to kbus.o(.data) for bKBusSlave - debug.o(i.ShowRunningInfo) refers to kbus.o(.data) for bKBusRepeater - debug.o(i.ShowRunningInfo) refers to debug.o(.conststring) for .conststring - debug.o(i.ShowRunningInfo) refers to debug.o(.bss) for .bss - debug.o(i.clearscreen) refers to functions.o(i.PutStr) for PutStr - functions.o(i.InitUartstat) refers to myqueue.o(i.initQueue) for initQueue - functions.o(i.InituS) refers to idiv.o(.text) for __aeabi_idivmod - functions.o(i.InituS) refers to stm32f0xx_hal_rcc.o(i.HAL_RCC_GetHCLKFreq) for HAL_RCC_GetHCLKFreq - functions.o(i.InituS) refers to uidiv.o(.text) for __aeabi_uidivmod - functions.o(i.InituS) refers to ldiv.o(.text) for __aeabi_ldivmod - functions.o(i.InituS) refers to functions.o(.data) for .data - functions.o(i.InituS) refers to system_stm32f0xx.o(.data) for SystemCoreClock - functions.o(i.LL_DMA_ConfigAddresses) refers to functions.o(.constdata) for .constdata - functions.o(i.LL_DMA_DisableChannel) refers to functions.o(.constdata) for .constdata - functions.o(i.LL_DMA_EnableChannel) refers to functions.o(.constdata) for .constdata - functions.o(i.LL_DMA_EnableIT_TC) refers to functions.o(.constdata) for .constdata - functions.o(i.LL_DMA_SetDataLength) refers to functions.o(.constdata) for .constdata - functions.o(i.PendSvCallBack) refers to fpx.o(i.FPxParsePkt) for FPxParsePkt - functions.o(i.PendSvCallBack) refers to kbus.o(i.KBusParsePacket) for KBusParsePacket - functions.o(i.PendSvCallBack) refers to functions.o(i.Uart2RecvDMA) for Uart2RecvDMA - functions.o(i.PendSvCallBack) refers to functions.o(.data) for .data - functions.o(i.PendSvCallBack) refers to functions.o(.bss) for .bss - functions.o(i.PendSvCallBack) refers to globaldef.o(.bss) for Uart2Stat - functions.o(i.PendSvCallBack) refers to globaldef.o(.data) for Uart2RecvBuf1DataLen - functions.o(i.PendSvCallBack) refers to globaldef.o(.bss) for Uart2RecvBuf1 - functions.o(i.PutOutputSPI2) refers to kmachine.o(.bss) for KMem - functions.o(i.PutStr) refers to myqueue.o(i.PushIn) for PushIn - functions.o(i.PutStr) refers to functions.o(i.Uart1TriggerSendDMA) for Uart1TriggerSendDMA - functions.o(i.PutStr) refers to globaldef.o(.bss) for Uart1Stat - functions.o(i.PutStr1) refers to myqueue.o(i.PushIn) for PushIn - functions.o(i.PutStr1) refers to functions.o(i.Uart1TriggerSendDMA) for Uart1TriggerSendDMA - functions.o(i.PutStr1) refers to globaldef.o(.bss) for Uart1Stat - functions.o(i.PutStr2) refers to functions.o(i.Uart2SendDMA) for Uart2SendDMA - functions.o(i.ReadConfig_3) refers to functions.o(i.Input165) for Input165 - functions.o(i.ReadConfig_4) refers to functions.o(i.Input165) for Input165 - functions.o(i.ReadConfig_5) refers to functions.o(i.Input165Cfg) for Input165Cfg - functions.o(i.SPI1_IRQ_CallBack) refers to functions.o(i.logData) for logData - functions.o(i.SPI1_IRQ_CallBack) refers to kmachine.o(.bss) for KMem - functions.o(i.SPI1_IRQ_CallBack) refers to functions.o(.data) for .data - functions.o(i.SPI1_IRQ_CallBack) refers to functions.o(.bss) for .bss - functions.o(i.SendPacket) refers to functions.o(i.PutStr1) for PutStr1 - functions.o(i.SendPacket) refers to functions.o(i.PutStr2) for PutStr2 - functions.o(i.SendPacket) refers to globaldef.o(.bss) for Uart1Stat - functions.o(i.SendPacket) refers to globaldef.o(.bss) for Uart2Stat - functions.o(i.Uart1RecvDone) refers to globaldef.o(.bss) for Uart1Stat - functions.o(i.Uart1RecvDone) refers to globaldef.o(.data) for Uart1RecvBuf1DataLen - functions.o(i.Uart1SendDMA) refers to functions.o(i.LL_DMA_DisableChannel) for LL_DMA_DisableChannel - functions.o(i.Uart1SendDMA) refers to functions.o(i.LL_DMA_ConfigAddresses) for LL_DMA_ConfigAddresses - functions.o(i.Uart1SendDMA) refers to functions.o(i.LL_DMA_SetDataLength) for LL_DMA_SetDataLength - functions.o(i.Uart1SendDMA) refers to functions.o(i.LL_DMA_EnableChannel) for LL_DMA_EnableChannel - functions.o(i.Uart1SendDMA) refers to functions.o(i.LL_DMA_EnableIT_TC) for LL_DMA_EnableIT_TC - functions.o(i.Uart1SendDMA) refers to globaldef.o(.bss) for Uart1Stat - functions.o(i.Uart1SendDone) refers to globaldef.o(.bss) for Uart1Stat - functions.o(i.Uart1TriggerSendDMA) refers to myqueue.o(i.GetContinueData) for GetContinueData - functions.o(i.Uart1TriggerSendDMA) refers to functions.o(i.Uart1SendDMA) for Uart1SendDMA - functions.o(i.Uart1TriggerSendDMA) refers to globaldef.o(.bss) for Uart1Stat - functions.o(i.Uart2RecvDMA) refers to functions.o(i.LL_DMA_DisableChannel) for LL_DMA_DisableChannel - functions.o(i.Uart2RecvDMA) refers to functions.o(i.LL_DMA_ConfigAddresses) for LL_DMA_ConfigAddresses - functions.o(i.Uart2RecvDMA) refers to functions.o(i.LL_DMA_SetDataLength) for LL_DMA_SetDataLength - functions.o(i.Uart2RecvDMA) refers to functions.o(i.LL_DMA_EnableChannel) for LL_DMA_EnableChannel - functions.o(i.Uart2RecvDMA) refers to functions.o(i.LL_DMA_EnableIT_TC) for LL_DMA_EnableIT_TC - functions.o(i.Uart2RecvDMA) refers to globaldef.o(.bss) for Uart2Stat - functions.o(i.Uart2RecvDone) refers to functions.o(.constdata) for .constdata - functions.o(i.Uart2RecvDone) refers to globaldef.o(.data) for Uart2RecvBuf1DataLen - functions.o(i.Uart2RecvDone) refers to globaldef.o(.bss) for Uart2Stat - functions.o(i.Uart2SendDMA) refers to functions.o(i.LL_DMA_DisableChannel) for LL_DMA_DisableChannel - functions.o(i.Uart2SendDMA) refers to functions.o(i.LL_DMA_ConfigAddresses) for LL_DMA_ConfigAddresses - functions.o(i.Uart2SendDMA) refers to functions.o(i.LL_DMA_SetDataLength) for LL_DMA_SetDataLength - functions.o(i.Uart2SendDMA) refers to functions.o(i.LL_DMA_EnableChannel) for LL_DMA_EnableChannel - functions.o(i.Uart2SendDMA) refers to functions.o(i.LL_DMA_EnableIT_TC) for LL_DMA_EnableIT_TC - functions.o(i.Uart2SendDMA) refers to globaldef.o(.bss) for Uart2Stat - functions.o(i.Uart2SendDone) refers to globaldef.o(.bss) for Uart2Stat - functions.o(i.Uart2TriggerSendDMA) refers to myqueue.o(i.GetContinueData) for GetContinueData - functions.o(i.Uart2TriggerSendDMA) refers to functions.o(i.Uart2SendDMA) for Uart2SendDMA - functions.o(i.Uart2TriggerSendDMA) refers to globaldef.o(.bss) for Uart2Stat - functions.o(i.crc16table) refers to functions.o(.constdata) for .constdata - functions.o(i.crc_check) refers to functions.o(.constdata) for .constdata - functions.o(i.logData) refers to kmachine.o(.bss) for KMem - functions.o(i.modbuscrc16test) refers to printf8.o(i.__0printf$8) for __2printf - functions.o(i.modbuscrc16test) refers to functions.o(i.crc16table) for crc16table - functions.o(i.modbuscrc16test) refers to functions.o(i.crc16bitbybit) for crc16bitbybit - functions.o(i.modbuscrc16test) refers to functions.o(.conststring) for .conststring - kbus.o(i.KBusAddChildAddrByInfo) refers to kbus.o(.bss) for .bss - kbus.o(i.KBusCheckPacket) refers to memcpya.o(.text) for __aeabi_memcpy - kbus.o(i.KBusCheckPacket) refers to kbus.o(i.KBusBCC) for KBusBCC - kbus.o(i.KBusCheckPacket) refers to kbus.o(.data) for .data - kbus.o(i.KBusCheckPacket) refers to kbus.o(.bss) for .bss - kbus.o(i.KBusCheckPacket) refers to globaldef.o(.bss) for Uart2Stat - kbus.o(i.KBusCheckPacket) refers to kmachine.o(.bss) for KMem - kbus.o(i.KBusInit) refers to kbus.o(.bss) for .bss - kbus.o(i.KBusMakeDefaultClildInfo) refers to kbus.o(.bss) for .bss - kbus.o(i.KBusMakePacket) refers to memcpya.o(.text) for __aeabi_memcpy - kbus.o(i.KBusMakePacket) refers to kbus.o(i.KBusBCC) for KBusBCC - kbus.o(i.KBusMasterFunc) refers to stm32f0xx_hal.o(i.HAL_GetTick) for HAL_GetTick - kbus.o(i.KBusMasterFunc) refers to functions.o(i.GetuS) for GetuS - kbus.o(i.KBusMasterFunc) refers to kbus.o(i.KBusSearchChild) for KBusSearchChild - kbus.o(i.KBusMasterFunc) refers to kbus.o(i.KBusMakePacket) for KBusMakePacket - kbus.o(i.KBusMasterFunc) refers to functions.o(i.SendPacket) for SendPacket - kbus.o(i.KBusMasterFunc) refers to kbus.o(.bss) for .bss - kbus.o(i.KBusMasterFunc) refers to kbus.o(.data) for .data - kbus.o(i.KBusMasterFunc) refers to kmachine.o(.bss) for KMem - kbus.o(i.KBusMasterFunc) refers to globaldef.o(.bss) for Uart2Stat - kbus.o(i.KBusMasterParsePacket) refers to uread4.o(.text) for __aeabi_uread4 - kbus.o(i.KBusMasterParsePacket) refers to kbus.o(.data) for .data - kbus.o(i.KBusMasterParsePacket) refers to kbus.o(.bss) for .bss - kbus.o(i.KBusParsePacket) refers to functions.o(i.GetuS) for GetuS - kbus.o(i.KBusParsePacket) refers to kbus.o(i.KBusCheckPacket) for KBusCheckPacket - kbus.o(i.KBusParsePacket) refers to kbus.o(i.KBusMasterParsePacket) for KBusMasterParsePacket - kbus.o(i.KBusParsePacket) refers to kbus.o(i.KBusSlaveCheckPacket) for KBusSlaveCheckPacket - kbus.o(i.KBusParsePacket) refers to kbus.o(i.KBusSlaveParsePacket) for KBusSlaveParsePacket - kbus.o(i.KBusParsePacket) refers to kbus.o(.data) for .data - kbus.o(i.KBusParsePacket) refers to kbus.o(.bss) for .bss - kbus.o(i.KBusParsePacket) refers to kmachine.o(.bss) for KMem - kbus.o(i.KBusRepeaterFunc) refers to functions.o(i.ToggleRunLed) for ToggleRunLed - kbus.o(i.KBusRepeaterFunc) refers to kmachine.o(.bss) for KMem - kbus.o(i.KBusRepeaterFunc) refers to kbus.o(.data) for .data - kbus.o(i.KBusSearchChild) refers to stm32f0xx_hal.o(i.HAL_GetTick) for HAL_GetTick - kbus.o(i.KBusSearchChild) refers to functions.o(i.GetuS) for GetuS - kbus.o(i.KBusSearchChild) refers to kbus.o(i.KBusMakeDefaultClildInfo) for KBusMakeDefaultClildInfo - kbus.o(i.KBusSearchChild) refers to kbus.o(i.KBusAddChildAddrByInfo) for KBusAddChildAddrByInfo - kbus.o(i.KBusSearchChild) refers to kbus.o(.bss) for .bss - kbus.o(i.KBusSetCallBackFunc) refers to kbus.o(.bss) for .bss - kbus.o(i.KBusSlaveCheckPacket) refers to kbus.o(i.KBusBCC) for KBusBCC - kbus.o(i.KBusSlaveCheckPacket) refers to kbus.o(.bss) for .bss - kbus.o(i.KBusSlaveCheckPacket) refers to globaldef.o(.bss) for Uart2Stat - kbus.o(i.KBusSlaveFunc) refers to functions.o(i.GetuS) for GetuS - kbus.o(i.KBusSlaveFunc) refers to kbus.o(.data) for .data - kbus.o(i.KBusSlaveFunc) refers to kmachine.o(.bss) for KMem - kbus.o(i.KBusSlaveParsePacket) refers to kbus.o(i.KBusMakePacket) for KBusMakePacket - kbus.o(i.KBusSlaveParsePacket) refers to functions.o(i.SendPacket) for SendPacket - kbus.o(i.KBusSlaveParsePacket) refers to globaldef.o(.bss) for Uart2Stat - kbus.o(i.KBusSlaveParsePacket) refers to kbus.o(.bss) for .bss - kbus.o(i.KBusSlaveParsePacket) refers to kbus.o(.data) for .data - kbus.o(i.KBusSlaveParsePacket) refers to kmachine.o(.bss) for KMem - kbus.o(i.KBusUpdateChildInfo) refers to kbus.o(.bss) for .bss - klink.o(i.KLCheckPacket) refers to klink.o(i.KLBCC) for KLBCC - klink.o(i.KLMakeRplyPacket) refers to memcpya.o(.text) for __aeabi_memcpy - klink.o(i.KLMakeRplyPacket) refers to klink.o(i.KLBCC) for KLBCC - klink.o(i.KLParsePacket) refers to klink.o(i.KLCheckPacket) for KLCheckPacket - klink.o(i.KLParsePacket) refers to klink.o(i.KLMakeRplyPacket) for KLMakeRplyPacket - klink.o(i.KLParsePacket) refers to functions.o(i.SendPacket) for SendPacket - klink.o(i.KLParsePacket) refers to klink.o(i.KLParseReqPacket) for KLParseReqPacket - klink.o(i.KLParsePacket) refers to klink.o(.data) for .data - klink.o(i.KLParsePacket) refers to klink.o(.bss) for .bss - klink.o(i.KLParseReqPacket) refers to klink.o(i.KLMakeRplyPacket) for KLMakeRplyPacket - klink.o(i.KLParseReqPacket) refers to functions.o(i.SendPacket) for SendPacket - klink.o(i.KLParseReqPacket) refers to kmachine.o(i.WriteFactoryData) for WriteFactoryData - klink.o(i.KLParseReqPacket) refers to memcpya.o(.text) for __aeabi_memcpy - klink.o(i.KLParseReqPacket) refers to klink.o(.data) for .data - klink.o(i.KLParseReqPacket) refers to klink.o(.bss) for .bss - klink.o(i.KLParseReqPacket) refers to kmachine.o(.bss) for KMRunStat - klink.o(i.KLParseReqPacket) refers to plcfunctions.o(.bss) for PLCMem - klink.o(i.KLParseReqPacket) refers to kmachine.o(.constdata) for KMInfoBlock - klink.o(i.KLParseReqPacket) refers to kbus.o(.bss) for KBusChnStats - klink.o(i.KLParseReqPacket) refers to kmachine.o(.bss) for storedKMSysCfg - klink.o(i.KLParseReqPacket) refers to klink.o(i.SetBitValue) for SetBitValue - klink.o(i.KLParseReqPacket) refers to plcfunctions.o(i.StopPLC) for StopPLC - klink.o(i.KLParseReqPacket) refers to plcfunctions.o(i.StartPLC) for StartPLC - klink.o(i.KLParseReqPacket) refers to kmachine.o(i.WriteProgram) for WriteProgram - klink.o(i.KLParseReqPacket) refers to kmachine.o(i.SaveRunStat) for SaveRunStat - klink.o(i.KLParseReqPacket) refers to kmachine.o(i.WriteSysCfgToFlash) for WriteSysCfgToFlash - klink.o(i.KLParseReqPacket) refers to memseta.o(.text) for __aeabi_memclr4 - klink.o(i.KLParseReqPacket) refers to kmachine.o(i.GetEventLogAddr) for GetEventLogAddr - klink.o(i.KLParseReqPacket) refers to kmachine.o(i.ClearEventLog) for ClearEventLog - klink.o(i.KLParseReqPacket) refers to kmachine.o(i.WriteNewApp) for WriteNewApp - klink.o(i.KLParseReqPacket) refers to kmachine.o(i.WriteNewAppInfo) for WriteNewAppInfo - modbusrtu.o(i.ModBusSlaveCheckPkg) refers to modbusrtu.o(i.crc16tablefast) for crc16tablefast - modbusrtu.o(i.ModBusSlaveParsePkg) refers to modbusrtu.o(i.ModBusSlaveCheckPkg) for ModBusSlaveCheckPkg - modbusrtu.o(i.ModBusSlaveParsePkg) refers to modbusrtu.o(i.__ARM_common_switch8) for __ARM_common_switch8 - modbusrtu.o(i.ModBusSlaveParsePkg) refers to modbusrtu.o(i.GetBitValue) for GetBitValue - modbusrtu.o(i.ModBusSlaveParsePkg) refers to modbusrtu.o(i.SetAddrBit) for SetAddrBit - modbusrtu.o(i.ModBusSlaveParsePkg) refers to memcpya.o(.text) for __aeabi_memcpy - modbusrtu.o(i.ModBusSlaveParsePkg) refers to modbusrtu.o(i.ResetBit) for ResetBit - modbusrtu.o(i.ModBusSlaveParsePkg) refers to modbusrtu.o(i.SetBitValue) for SetBitValue - modbusrtu.o(i.ModBusSlaveParsePkg) refers to modbusrtu.o(i.crc16tablefast) for crc16tablefast - modbusrtu.o(i.ModBusSlaveParsePkg) refers to functions.o(i.SendPacket) for SendPacket - modbusrtu.o(i.ModBusSlaveParsePkg) refers to modbusrtu.o(.data) for .data - modbusrtu.o(i.ModBusSlaveParsePkg) refers to modbusrtu.o(.bss) for .bss - modbusrtu.o(i.ModBusSlaveParsePkg) refers to kmachine.o(.bss) for KMem - modbusrtu.o(i.SetBitValue) refers to modbusrtu.o(i.SetAddrBit) for SetAddrBit - modbusrtu.o(i.SetBitValue) refers to modbusrtu.o(i.ResetBit) for ResetBit - modbusrtu.o(i.crc16tablefast) refers to modbusrtu.o(.constdata) for .constdata - myqueue.o(i.CopyData) refers to myqueue.o(i.GetContinueData) for GetContinueData - myqueue.o(i.CopyData) refers to memcpya.o(.text) for __aeabi_memcpy - myqueue.o(i.PopOne) refers to myqueue.o(i.DelData) for DelData - myqueue.o(i.PopOut) refers to myqueue.o(i.CopyData) for CopyData - myqueue.o(i.PopOut) refers to myqueue.o(i.DelData) for DelData - myqueue.o(i.PushIn) refers to myqueue.o(i.GetContinueEmptyRoom) for GetContinueEmptyRoom - myqueue.o(i.PushIn) refers to memcpya.o(.text) for __aeabi_memcpy - myqueue.o(i.PushIn) refers to myqueue.o(i.AddSpace) for AddSpace - myqueue.o(i.PushOne) refers to myqueue.o(i.AddSpace) for AddSpace - plcfunctions.o(i.GetTimerEV) refers to kmachine.o(.bss) for KMem - plcfunctions.o(i.GetTimerSV) refers to kmachine.o(.bss) for KMem - plcfunctions.o(i.InitPLC) refers to plcfunctions.o(.bss) for .bss - plcfunctions.o(i.InitPLC) refers to kmachine.o(.bss) for KMem - plcfunctions.o(i.InitTimer) refers to kmachine.o(.bss) for KMem - plcfunctions.o(i.InitTimer) refers to stm32f0xx_hal.o(.data) for uwTick - plcfunctions.o(i.IsTimerOn) refers to plcfunctions.o(i.ProcessTimer) for ProcessTimer - plcfunctions.o(i.IsTimerOn) refers to kmachine.o(.bss) for KMem - plcfunctions.o(i.PopOutVal) refers to kmachine.o(.bss) for KMem - plcfunctions.o(i.ProcessPLCBinProg) refers to kmachine.o(i.SetCoilValue) for SetCoilValue - plcfunctions.o(i.ProcessPLCBinProg) refers to modbusrtu.o(i.__ARM_common_switch8) for __ARM_common_switch8 - plcfunctions.o(i.ProcessPLCBinProg) refers to plcfunctions.o(i.PopOutVal) for PopOutVal - plcfunctions.o(i.ProcessPLCBinProg) refers to plcfunctions.o(i.PushInVal) for PushInVal - plcfunctions.o(i.ProcessPLCBinProg) refers to kmachine.o(i.GetCoilValue) for GetCoilValue - plcfunctions.o(i.ProcessPLCBinProg) refers to kmachine.o(i.GetVarData) for GetVarData - plcfunctions.o(i.ProcessPLCBinProg) refers to plcfunctions.o(i.RunTimer) for RunTimer - plcfunctions.o(i.ProcessPLCBinProg) refers to plcfunctions.o(i.ProcessTimer) for ProcessTimer - plcfunctions.o(i.ProcessPLCBinProg) refers to plcfunctions.o(i.InitTimer) for InitTimer - plcfunctions.o(i.ProcessPLCBinProg) refers to plcfunctions.o(i.StopTimer) for StopTimer - plcfunctions.o(i.ProcessPLCBinProg) refers to kmachine.o(i.SetVarData) for SetVarData - plcfunctions.o(i.ProcessPLCBinProg) refers to plcfunctions.o(.bss) for .bss - plcfunctions.o(i.ProcessPLCBinProg) refers to kmachine.o(.bss) for KMem - plcfunctions.o(i.ProcessPLCBinProg) refers to idiv.o(.text) for __aeabi_idivmod - plcfunctions.o(i.ProcessTimer) refers to idiv.o(.text) for __aeabi_idivmod - plcfunctions.o(i.ProcessTimer) refers to kmachine.o(i.SetCoilValue) for SetCoilValue - plcfunctions.o(i.ProcessTimer) refers to kmachine.o(.bss) for KMem - plcfunctions.o(i.ProcessTimer) refers to stm32f0xx_hal.o(.data) for uwTick - plcfunctions.o(i.PushInVal) refers to kmachine.o(.bss) for KMem - plcfunctions.o(i.ResetTimer) refers to kmachine.o(.bss) for KMem - plcfunctions.o(i.ResetTimer) refers to stm32f0xx_hal.o(.data) for uwTick - plcfunctions.o(i.RunTimer) refers to kmachine.o(.bss) for KMem - plcfunctions.o(i.RunTimer) refers to stm32f0xx_hal.o(.data) for uwTick - plcfunctions.o(i.SetTimerValue) refers to plcfunctions.o(i.RunTimer) for RunTimer - plcfunctions.o(i.SetTimerValue) refers to plcfunctions.o(i.StopTimer) for StopTimer - plcfunctions.o(i.SetTimerValue) refers to kmachine.o(.bss) for KMem - plcfunctions.o(i.StartPLC) refers to plcfunctions.o(.bss) for .bss - plcfunctions.o(i.StartPLC) refers to kmachine.o(.bss) for KMem - plcfunctions.o(i.StopPLC) refers to plcfunctions.o(.bss) for .bss - plcfunctions.o(i.StopPLC) refers to kmachine.o(.bss) for KMem - plcfunctions.o(i.StopTimer) refers to kmachine.o(.bss) for KMem - plcfunctions.o(i.StopTimer) refers to stm32f0xx_hal.o(.data) for uwTick - stm32f0xx_hal_msp.o(i.HAL_MspInit) refers to stm32f0xx_hal_cortex.o(i.HAL_NVIC_SetPriority) for HAL_NVIC_SetPriority - kmachine.o(i.AddEventLog) refers to kmachine.o(i.EraseAndWriteToFlashMem) for EraseAndWriteToFlashMem - kmachine.o(i.AddEventLog) refers to kmachine.o(i.WriteToFlashMemNoErase) for WriteToFlashMemNoErase - kmachine.o(i.AddEventLog) refers to kmachine.o(.data) for .data - kmachine.o(i.AddEventLog) refers to kmachine.o(.constdata) for .constdata - kmachine.o(i.AddEventLog) refers to kmachine.o(.bss) for .bss - kmachine.o(i.CheckEventLog) refers to kmachine.o(.data) for .data - kmachine.o(i.ClearEventLog) refers to kmachine.o(i.EraseFlashMem) for EraseFlashMem - kmachine.o(i.ClearEventLog) refers to kmachine.o(.data) for .data - kmachine.o(i.EraseAndWriteToFlashMem) refers to stm32f0xx_ll_flash.o(i.LL_Flash_Unlock) for LL_Flash_Unlock - kmachine.o(i.EraseAndWriteToFlashMem) refers to stm32f0xx_ll_flash.o(i.LL_Flash_PageErase) for LL_Flash_PageErase - kmachine.o(i.EraseAndWriteToFlashMem) refers to stm32f0xx_ll_flash.o(i.LL_FLASH_Program) for LL_FLASH_Program - kmachine.o(i.EraseFlashMem) refers to stm32f0xx_ll_flash.o(i.LL_Flash_Unlock) for LL_Flash_Unlock - kmachine.o(i.EraseFlashMem) refers to stm32f0xx_ll_flash.o(i.LL_Flash_PageErase) for LL_Flash_PageErase - kmachine.o(i.GetCoilValue) refers to modbusrtu.o(i.__ARM_common_switch8) for __ARM_common_switch8 - kmachine.o(i.GetCoilValue) refers to kmachine.o(i.GetBitValue) for GetBitValue - kmachine.o(i.GetCoilValue) refers to kmachine.o(.bss) for .bss - kmachine.o(i.GetEventLogAddr) refers to kmachine.o(.data) for .data - kmachine.o(i.GetVarData) refers to modbusrtu.o(i.__ARM_common_switch8) for __ARM_common_switch8 - kmachine.o(i.GetVarData) refers to kmachine.o(.bss) for .bss - kmachine.o(i.KMachineInit) refers to kmachine.o(i.CheckEventLog) for CheckEventLog - kmachine.o(i.KMachineInit) refers to kmachine.o(i.LoadRunStat) for LoadRunStat - kmachine.o(i.KMachineInit) refers to kmachine.o(i.SaveRunStat) for SaveRunStat - kmachine.o(i.KMachineInit) refers to kmachine.o(i.AddEventLog) for AddEventLog - kmachine.o(i.KMachineInit) refers to kmachine.o(.bss) for .bss - kmachine.o(i.KMachineInit) refers to kmachine.o(.data) for .data - kmachine.o(i.LoadDefaultSysCfg) refers to memcpya.o(.text) for __aeabi_memcpy4 - kmachine.o(i.LoadDefaultSysCfg) refers to kmachine.o(.constdata) for .constdata - kmachine.o(i.LoadRunStat) refers to kmachine.o(i.ReadFlashMem) for ReadFlashMem - kmachine.o(i.LoadRunStat) refers to kmachine.o(.data) for .data - kmachine.o(i.ReadFactoryData) refers to memcpya.o(.text) for __aeabi_memcpy - kmachine.o(i.ReadProgram) refers to kmachine.o(i.ReadFlashMem) for ReadFlashMem - kmachine.o(i.ReadProgram) refers to kmachine.o(.bss) for .bss - kmachine.o(i.ReadSysCfgFromFlash) refers to kmachine.o(i.ReadFlashMem) for ReadFlashMem - kmachine.o(i.ReadSysCfgFromFlash) refers to kmachine.o(i.LoadDefaultSysCfg) for LoadDefaultSysCfg - kmachine.o(i.SaveRunStat) refers to kmachine.o(i.EraseAndWriteToFlashMem) for EraseAndWriteToFlashMem - kmachine.o(i.SaveRunStat) refers to kmachine.o(i.WriteToFlashMemNoErase) for WriteToFlashMemNoErase - kmachine.o(i.SaveRunStat) refers to kmachine.o(.data) for .data - kmachine.o(i.SaveRunStat) refers to kmachine.o(.bss) for .bss - kmachine.o(i.SetCoilValue) refers to modbusrtu.o(i.__ARM_common_switch8) for __ARM_common_switch8 - kmachine.o(i.SetCoilValue) refers to kmachine.o(i.SetBitValue) for SetBitValue - kmachine.o(i.SetCoilValue) refers to kmachine.o(.bss) for .bss - kmachine.o(i.SetVarData) refers to modbusrtu.o(i.__ARM_common_switch8) for __ARM_common_switch8 - kmachine.o(i.SetVarData) refers to kmachine.o(.bss) for .bss - kmachine.o(i.WriteFactoryData) refers to kmachine.o(i.EraseAndWriteToFlashMem) for EraseAndWriteToFlashMem - kmachine.o(i.WriteNewApp) refers to kmachine.o(i.WriteToFlashMemNoErase) for WriteToFlashMemNoErase - kmachine.o(i.WriteNewApp) refers to kmachine.o(i.EraseAndWriteToFlashMem) for EraseAndWriteToFlashMem - kmachine.o(i.WriteNewAppInfo) refers to kmachine.o(i.EraseAndWriteToFlashMem) for EraseAndWriteToFlashMem - kmachine.o(i.WriteProgram) refers to kmachine.o(i.WriteToFlashMemNoErase) for WriteToFlashMemNoErase - kmachine.o(i.WriteProgram) refers to kmachine.o(i.EraseAndWriteToFlashMem) for EraseAndWriteToFlashMem - kmachine.o(i.WriteProgram) refers to kmachine.o(.bss) for .bss - kmachine.o(i.WriteSysCfgToFlash) refers to kmachine.o(i.WriteToFlashMemNoErase) for WriteToFlashMemNoErase - kmachine.o(i.WriteSysCfgToFlash) refers to kmachine.o(i.EraseAndWriteToFlashMem) for EraseAndWriteToFlashMem - kmachine.o(i.WriteToFlashMemNoErase) refers to stm32f0xx_ll_flash.o(i.LL_Flash_Unlock) for LL_Flash_Unlock - kmachine.o(i.WriteToFlashMemNoErase) refers to stm32f0xx_ll_flash.o(i.LL_FLASH_Program) for LL_FLASH_Program - kmachine.o(i.next_pow_of_2) refers to kmachine.o(i.is_pow_of_2) for is_pow_of_2 - bsp.o(i.LL_DMA_SetChannelPriorityLevel) refers to bsp.o(.constdata) for .constdata - bsp.o(i.LL_DMA_SetDataTransferDirection) refers to bsp.o(.constdata) for .constdata - bsp.o(i.LL_DMA_SetMemoryIncMode) refers to bsp.o(.constdata) for .constdata - bsp.o(i.LL_DMA_SetMemorySize) refers to bsp.o(.constdata) for .constdata - bsp.o(i.LL_DMA_SetMode) refers to bsp.o(.constdata) for .constdata - bsp.o(i.LL_DMA_SetPeriphIncMode) refers to bsp.o(.constdata) for .constdata - bsp.o(i.LL_DMA_SetPeriphSize) refers to bsp.o(.constdata) for .constdata - bsp.o(i.MX_ADC_Init) refers to bsp.o(i.LL_APB1_GRP2_EnableClock) for LL_APB1_GRP2_EnableClock - bsp.o(i.MX_ADC_Init) refers to stm32f0xx_ll_adc.o(i.LL_ADC_Init) for LL_ADC_Init - bsp.o(i.MX_ADC_Init) refers to stm32f0xx_ll_adc.o(i.LL_ADC_REG_Init) for LL_ADC_REG_Init - bsp.o(i.MX_DMA_Init) refers to bsp.o(i.LL_AHB1_GRP1_EnableClock) for LL_AHB1_GRP1_EnableClock - bsp.o(i.MX_DMA_Init) refers to bsp.o(i.NVIC_SetPriority) for NVIC_SetPriority - bsp.o(i.MX_DMA_Init) refers to bsp.o(i.NVIC_EnableIRQ) for NVIC_EnableIRQ - bsp.o(i.MX_GPIO_Init) refers to bsp.o(i.LL_AHB1_GRP1_EnableClock) for LL_AHB1_GRP1_EnableClock - bsp.o(i.MX_GPIO_Init) refers to stm32f0xx_ll_gpio.o(i.LL_GPIO_Init) for LL_GPIO_Init - bsp.o(i.MX_SPI1_Init) refers to memseta.o(.text) for __aeabi_memclr4 - bsp.o(i.MX_SPI1_Init) refers to bsp.o(i.LL_APB1_GRP2_EnableClock) for LL_APB1_GRP2_EnableClock - bsp.o(i.MX_SPI1_Init) refers to bsp.o(i.LL_AHB1_GRP1_EnableClock) for LL_AHB1_GRP1_EnableClock - bsp.o(i.MX_SPI1_Init) refers to stm32f0xx_ll_gpio.o(i.LL_GPIO_Init) for LL_GPIO_Init - bsp.o(i.MX_SPI1_Init) refers to bsp.o(i.NVIC_SetPriority) for NVIC_SetPriority - bsp.o(i.MX_SPI1_Init) refers to bsp.o(i.NVIC_EnableIRQ) for NVIC_EnableIRQ - bsp.o(i.MX_SPI1_Init) refers to stm32f0xx_ll_spi.o(i.LL_SPI_Init) for LL_SPI_Init - bsp.o(i.MX_SPI2_Init) refers to memseta.o(.text) for __aeabi_memclr4 - bsp.o(i.MX_SPI2_Init) refers to bsp.o(i.LL_APB1_GRP1_EnableClock) for LL_APB1_GRP1_EnableClock - bsp.o(i.MX_SPI2_Init) refers to bsp.o(i.LL_AHB1_GRP1_EnableClock) for LL_AHB1_GRP1_EnableClock - bsp.o(i.MX_SPI2_Init) refers to stm32f0xx_ll_gpio.o(i.LL_GPIO_Init) for LL_GPIO_Init - bsp.o(i.MX_SPI2_Init) refers to stm32f0xx_ll_spi.o(i.LL_SPI_Init) for LL_SPI_Init - bsp.o(i.MX_TIM6_Init) refers to memseta.o(.text) for __aeabi_memclr4 - bsp.o(i.MX_TIM6_Init) refers to bsp.o(i.LL_APB1_GRP1_EnableClock) for LL_APB1_GRP1_EnableClock - bsp.o(i.MX_TIM6_Init) refers to bsp.o(i.NVIC_SetPriority) for NVIC_SetPriority - bsp.o(i.MX_TIM6_Init) refers to bsp.o(i.NVIC_EnableIRQ) for NVIC_EnableIRQ - bsp.o(i.MX_TIM6_Init) refers to stm32f0xx_ll_tim.o(i.LL_TIM_Init) for LL_TIM_Init - bsp.o(i.MX_USART1_UART_Init) refers to bsp.o(i.LL_APB1_GRP2_EnableClock) for LL_APB1_GRP2_EnableClock - bsp.o(i.MX_USART1_UART_Init) refers to stm32f0xx_ll_gpio.o(i.LL_GPIO_Init) for LL_GPIO_Init - bsp.o(i.MX_USART1_UART_Init) refers to bsp.o(i.LL_DMA_SetDataTransferDirection) for LL_DMA_SetDataTransferDirection - bsp.o(i.MX_USART1_UART_Init) refers to bsp.o(i.LL_DMA_SetChannelPriorityLevel) for LL_DMA_SetChannelPriorityLevel - bsp.o(i.MX_USART1_UART_Init) refers to bsp.o(i.LL_DMA_SetMode) for LL_DMA_SetMode - bsp.o(i.MX_USART1_UART_Init) refers to bsp.o(i.LL_DMA_SetPeriphIncMode) for LL_DMA_SetPeriphIncMode - bsp.o(i.MX_USART1_UART_Init) refers to bsp.o(i.LL_DMA_SetMemoryIncMode) for LL_DMA_SetMemoryIncMode - bsp.o(i.MX_USART1_UART_Init) refers to bsp.o(i.LL_DMA_SetPeriphSize) for LL_DMA_SetPeriphSize - bsp.o(i.MX_USART1_UART_Init) refers to bsp.o(i.LL_DMA_SetMemorySize) for LL_DMA_SetMemorySize - bsp.o(i.MX_USART1_UART_Init) refers to bsp.o(i.NVIC_SetPriority) for NVIC_SetPriority - bsp.o(i.MX_USART1_UART_Init) refers to bsp.o(i.NVIC_EnableIRQ) for NVIC_EnableIRQ - bsp.o(i.MX_USART1_UART_Init) refers to stm32f0xx_ll_usart.o(i.LL_USART_Init) for LL_USART_Init - bsp.o(i.MX_USART1_UART_Init) refers to bsp.o(i.LL_USART_ConfigAsyncMode) for LL_USART_ConfigAsyncMode - bsp.o(i.MX_USART1_UART_Init) refers to globaldef.o(.data) for Uart1Baud - bsp.o(i.MX_USART2_UART_Init) refers to memseta.o(.text) for __aeabi_memclr4 - bsp.o(i.MX_USART2_UART_Init) refers to bsp.o(i.LL_APB1_GRP1_EnableClock) for LL_APB1_GRP1_EnableClock - bsp.o(i.MX_USART2_UART_Init) refers to bsp.o(i.LL_AHB1_GRP1_EnableClock) for LL_AHB1_GRP1_EnableClock - bsp.o(i.MX_USART2_UART_Init) refers to stm32f0xx_ll_gpio.o(i.LL_GPIO_Init) for LL_GPIO_Init - bsp.o(i.MX_USART2_UART_Init) refers to bsp.o(i.LL_DMA_SetDataTransferDirection) for LL_DMA_SetDataTransferDirection - bsp.o(i.MX_USART2_UART_Init) refers to bsp.o(i.LL_DMA_SetChannelPriorityLevel) for LL_DMA_SetChannelPriorityLevel - bsp.o(i.MX_USART2_UART_Init) refers to bsp.o(i.LL_DMA_SetMode) for LL_DMA_SetMode - bsp.o(i.MX_USART2_UART_Init) refers to bsp.o(i.LL_DMA_SetPeriphIncMode) for LL_DMA_SetPeriphIncMode - bsp.o(i.MX_USART2_UART_Init) refers to bsp.o(i.LL_DMA_SetMemoryIncMode) for LL_DMA_SetMemoryIncMode - bsp.o(i.MX_USART2_UART_Init) refers to bsp.o(i.LL_DMA_SetPeriphSize) for LL_DMA_SetPeriphSize - bsp.o(i.MX_USART2_UART_Init) refers to bsp.o(i.LL_DMA_SetMemorySize) for LL_DMA_SetMemorySize - bsp.o(i.MX_USART2_UART_Init) refers to bsp.o(i.NVIC_SetPriority) for NVIC_SetPriority - bsp.o(i.MX_USART2_UART_Init) refers to bsp.o(i.NVIC_EnableIRQ) for NVIC_EnableIRQ - bsp.o(i.MX_USART2_UART_Init) refers to stm32f0xx_ll_usart.o(i.LL_USART_Init) for LL_USART_Init - bsp.o(i.MX_USART2_UART_Init) refers to bsp.o(i.LL_USART_ConfigAsyncMode) for LL_USART_ConfigAsyncMode - bsp.o(i.MX_USART2_UART_Init) refers to globaldef.o(.data) for Uart2Baud - bsp.o(i.SystemClock_Config) refers to memseta.o(.text) for __aeabi_memclr4 - bsp.o(i.SystemClock_Config) refers to stm32f0xx_hal_rcc.o(i.HAL_RCC_OscConfig) for HAL_RCC_OscConfig - bsp.o(i.SystemClock_Config) refers to main.o(i._Error_Handler) for _Error_Handler - bsp.o(i.SystemClock_Config) refers to stm32f0xx_hal_rcc.o(i.HAL_RCC_ClockConfig) for HAL_RCC_ClockConfig - bsp.o(i.SystemClock_Config) refers to stm32f0xx_hal_rcc_ex.o(i.HAL_RCCEx_PeriphCLKConfig) for HAL_RCCEx_PeriphCLKConfig - bsp.o(i.SystemClock_Config) refers to stm32f0xx_hal_cortex.o(i.HAL_SYSTICK_Config) for HAL_SYSTICK_Config - bsp.o(i.SystemClock_Config) refers to stm32f0xx_hal_cortex.o(i.HAL_SYSTICK_CLKSourceConfig) for HAL_SYSTICK_CLKSourceConfig - bsp.o(i.SystemClock_Config) refers to stm32f0xx_hal_cortex.o(i.HAL_NVIC_SetPriority) for HAL_NVIC_SetPriority - stm32f0xx_it.o(i.DMA1_Channel2_3_IRQHandler) refers to myqueue.o(i.DelData) for DelData - stm32f0xx_it.o(i.DMA1_Channel2_3_IRQHandler) refers to myqueue.o(i.GetContinueData) for GetContinueData - stm32f0xx_it.o(i.DMA1_Channel2_3_IRQHandler) refers to globaldef.o(.bss) for Uart1Stat - stm32f0xx_it.o(i.DMA1_Channel2_3_IRQHandler) refers to stm32f0xx_it.o(.constdata) for .constdata - stm32f0xx_it.o(i.DMA1_Channel4_5_IRQHandler) refers to globaldef.o(.bss) for Uart2Stat - stm32f0xx_it.o(i.PendSV_Handler) refers to functions.o(i.PendSvCallBack) for PendSvCallBack - stm32f0xx_it.o(i.PendSV_Handler) refers to globaldef.o(.data) for PendSvCount - stm32f0xx_it.o(i.SPI1_IRQHandler) refers to functions.o(i.SPI1_IRQ_CallBack) for SPI1_IRQ_CallBack - stm32f0xx_it.o(i.SysTick_Handler) refers to stm32f0xx_hal.o(i.HAL_IncTick) for HAL_IncTick - stm32f0xx_it.o(i.SysTick_Handler) refers to stm32f0xx_hal_cortex.o(i.HAL_SYSTICK_IRQHandler) for HAL_SYSTICK_IRQHandler - stm32f0xx_it.o(i.USART1_IRQHandler) refers to functions.o(i.Uart1RecvDone) for Uart1RecvDone - stm32f0xx_it.o(i.USART1_IRQHandler) refers to functions.o(i.Uart1SendDone) for Uart1SendDone - stm32f0xx_it.o(i.USART1_IRQHandler) refers to globaldef.o(.bss) for Uart1Stat - stm32f0xx_it.o(i.USART1_IRQHandler) refers to globaldef.o(.data) for Uart1BaudGot - stm32f0xx_it.o(i.USART1_IRQHandler) refers to globaldef.o(.data) for Uart1BaudFirstGot - stm32f0xx_it.o(i.USART1_IRQHandler) refers to globaldef.o(.bss) for Uart1RecvBuf1 - stm32f0xx_it.o(i.USART1_IRQHandler) refers to globaldef.o(.data) for Uart1RecvBuf1DataLen - stm32f0xx_it.o(i.USART2_IRQHandler) refers to functions.o(i.Uart2RecvDone) for Uart2RecvDone - stm32f0xx_it.o(i.USART2_IRQHandler) refers to functions.o(i.Uart2SendDone) for Uart2SendDone - stm32f0xx_it.o(i.USART2_IRQHandler) refers to globaldef.o(.bss) for Uart2Stat - main.o(i.FPxCallBackFunc) refers to modbusrtu.o(i.__ARM_common_switch8) for __ARM_common_switch8 - main.o(i.FPxCallBackFunc) refers to fpx.o(.bss) for FPxMem - main.o(i.FPxCallBackFunc) refers to kbus.o(.bss) for KBusMem - main.o(i.HAL_SYSTICK_Callback) refers to functions.o(.data) for CurTickuS - main.o(i.HAL_SYSTICK_Callback) refers to kbus.o(.data) for nSlaveTick - main.o(i.HAL_SYSTICK_Callback) refers to main.o(.data) for .data - main.o(i.HAL_SYSTICK_Callback) refers to kmachine.o(.bss) for KMem - main.o(i.KBusCallBackFunc) refers to modbusrtu.o(i.__ARM_common_switch8) for __ARM_common_switch8 - main.o(i.KBusCallBackFunc) refers to fpx.o(.bss) for FPxMem - main.o(i.KBusCallBackFunc) refers to kbus.o(.bss) for KBusMem - main.o(i.KBusCallBackFunc) refers to kmachine.o(.bss) for KMem - main.o(i.main) refers to functions.o(i.InitUartstat) for InitUartstat - main.o(i.main) refers to stm32f0xx_hal.o(i.HAL_Init) for HAL_Init - main.o(i.main) refers to bsp.o(i.SystemClock_Config) for SystemClock_Config - main.o(i.main) refers to functions.o(i.InituS) for InituS - main.o(i.main) refers to bsp.o(i.MX_GPIO_Init) for MX_GPIO_Init - main.o(i.main) refers to bsp.o(i.MX_DMA_Init) for MX_DMA_Init - main.o(i.main) refers to kmachine.o(i.KMachineInit) for KMachineInit - main.o(i.main) refers to kmachine.o(i.ReadSysCfgFromFlash) for ReadSysCfgFromFlash - main.o(i.main) refers to functions.o(i.ReadJumperSW) for ReadJumperSW - main.o(i.main) refers to kbus.o(i.KBusInit) for KBusInit - main.o(i.main) refers to kbus.o(i.KBusSetCallBackFunc) for KBusSetCallBackFunc - main.o(i.main) refers to fpx.o(i.FPx_Init) for FPx_Init - main.o(i.main) refers to fpx.o(i.FPxSetCallBackFunc) for FPxSetCallBackFunc - main.o(i.main) refers to fpx.o(i.FPx_SetIOCount) for FPx_SetIOCount - main.o(i.main) refers to bsp.o(i.MX_USART1_UART_Init) for MX_USART1_UART_Init - main.o(i.main) refers to bsp.o(i.MX_USART2_UART_Init) for MX_USART2_UART_Init - main.o(i.main) refers to bsp.o(i.MX_SPI1_Init) for MX_SPI1_Init - main.o(i.main) refers to bsp.o(i.MX_IWDG_Init) for MX_IWDG_Init - main.o(i.main) refers to bsp.o(i.MX_TIM6_Init) for MX_TIM6_Init - main.o(i.main) refers to functions.o(i.Uart2RecvDMA) for Uart2RecvDMA - main.o(i.main) refers to stm32f0xx_hal.o(i.HAL_Delay) for HAL_Delay - main.o(i.main) refers to functions.o(i.SetRunLed) for SetRunLed - main.o(i.main) refers to functions.o(i.SetErrLed) for SetErrLed - main.o(i.main) refers to functions.o(i.SetOutStat) for SetOutStat - main.o(i.main) refers to debug.o(i.ShowInitInfo) for ShowInitInfo - main.o(i.main) refers to functions.o(i.GetuS) for GetuS - main.o(i.main) refers to plcfunctions.o(i.InitPLC) for InitPLC - main.o(i.main) refers to plcfunctions.o(i.StartPLC) for StartPLC - main.o(i.main) refers to stm32f0xx_hal.o(i.HAL_GetTick) for HAL_GetTick - main.o(i.main) refers to plcfunctions.o(i.StopPLC) for StopPLC - main.o(i.main) refers to fpx.o(i.FPx_Proc) for FPx_Proc - main.o(i.main) refers to plcfunctions.o(i.ProcessPLCBinProg) for ProcessPLCBinProg - main.o(i.main) refers to kbus.o(i.KBusMasterFunc) for KBusMasterFunc - main.o(i.main) refers to kbus.o(i.KBusSlaveFunc) for KBusSlaveFunc - main.o(i.main) refers to functions.o(i.SetErr2Led) for SetErr2Led - main.o(i.main) refers to debug.o(.emb_text) for add1 - main.o(i.main) refers to modbusrtu.o(i.ModBusSlaveParsePkg) for ModBusSlaveParsePkg - main.o(i.main) refers to klink.o(i.KLParsePacket) for KLParsePacket - main.o(i.main) refers to memcpya.o(.text) for __aeabi_memcpy4 - main.o(i.main) refers to kmachine.o(.bss) for KMRunStat - main.o(i.main) refers to main.o(.bss) for .bss - main.o(i.main) refers to globaldef.o(.bss) for Uart1Stat - main.o(i.main) refers to globaldef.o(.bss) for Uart2Stat - main.o(i.main) refers to globaldef.o(.data) for PendSvCount - main.o(i.main) refers to functions.o(.data) for TickFreq - main.o(i.main) refers to kmachine.o(.bss) for storedKMSysCfg - main.o(i.main) refers to kbus.o(.data) for nChilds - main.o(i.main) refers to main.o(i.KBusCallBackFunc) for KBusCallBackFunc - main.o(i.main) refers to main.o(i.FPxCallBackFunc) for FPxCallBackFunc - main.o(i.main) refers to globaldef.o(.data) for Uart1Baud - main.o(i.main) refers to globaldef.o(.bss) for Uart2RecvBuf1 - main.o(i.main) refers to main.o(.data) for .data - main.o(i.main) refers to plcfunctions.o(.data) for nSizeProg1 - main.o(i.main) refers to fpx.o(.bss) for FPxStat - main.o(i.main) refers to kbus.o(.bss) for KBusMem - main.o(i.main) refers to kbus.o(.data) for nSlaveTick - main.o(i.main) refers to globaldef.o(.data) for Uart1RecvBuf1DataLen - main.o(i.main) refers to globaldef.o(.bss) for Uart1RecvBuf1 - main.o(i.main) refers to plcfunctions.o(.bss) for PLCMem - main.o(i.main) refers to main.o(.constdata) for .constdata - fpx.o(i.FPxParsePkt) refers to functions.o(i.logData) for logData - fpx.o(i.FPxParsePkt) refers to modbusrtu.o(i.__ARM_common_switch8) for __ARM_common_switch8 - fpx.o(i.FPxParsePkt) refers to fpx.o(i.FPxCalBCC) for FPxCalBCC - fpx.o(i.FPxParsePkt) refers to fpx.o(i.FPxSendPkt) for FPxSendPkt - fpx.o(i.FPxParsePkt) refers to kmachine.o(.bss) for KMem - fpx.o(i.FPxParsePkt) refers to fpx.o(.bss) for .bss - fpx.o(i.FPxParsePkt) refers to functions.o(.data) for bSPI1Recving - fpx.o(i.FPxSendPkt) refers to memcpya.o(.text) for __aeabi_memcpy - fpx.o(i.FPxSendPkt) refers to functions.o(i.logData) for logData - fpx.o(i.FPxSendPkt) refers to kmachine.o(.bss) for KMem - fpx.o(i.FPxSendPkt) refers to functions.o(.data) for bSPI1Sending - fpx.o(i.FPxSendPkt) refers to functions.o(.bss) for SPI1SendBuf - fpx.o(i.FPxSetCallBackFunc) refers to fpx.o(.bss) for .bss - fpx.o(i.FPx_Init) refers to stm32f0xx_hal.o(i.HAL_Delay) for HAL_Delay - fpx.o(i.FPx_Init) refers to functions.o(i.GetuS) for GetuS - fpx.o(i.FPx_Init) refers to functions.o(.data) for bSPI1Sending - fpx.o(i.FPx_Init) refers to kbus.o(.data) for nChilds - fpx.o(i.FPx_Init) refers to fpx.o(.bss) for .bss - fpx.o(i.FPx_Proc) refers to fpx.o(i.LL_GPIO_IsInputPinSet) for LL_GPIO_IsInputPinSet - fpx.o(i.FPx_Proc) refers to functions.o(i.GetuS) for GetuS - fpx.o(i.FPx_Proc) refers to fpx.o(.bss) for .bss - fpx.o(i.FPx_Proc) refers to kmachine.o(.bss) for KMem - fpx.o(i.FPx_Proc) refers to functions.o(.data) for nSPI1RecvPos - fpx.o(i.FPx_SetIOCount) refers to fpx.o(.bss) for .bss - system_stm32f0xx.o(i.SystemCoreClockUpdate) refers to uidiv.o(.text) for __aeabi_uidivmod - system_stm32f0xx.o(i.SystemCoreClockUpdate) refers to system_stm32f0xx.o(.data) for .data - system_stm32f0xx.o(i.SystemCoreClockUpdate) refers to system_stm32f0xx.o(.constdata) for .constdata - stm32f0xx_ll_gpio.o(i.LL_GPIO_DeInit) refers to stm32f0xx_ll_gpio.o(i.LL_AHB1_GRP1_ForceReset) for LL_AHB1_GRP1_ForceReset - stm32f0xx_ll_gpio.o(i.LL_GPIO_DeInit) refers to stm32f0xx_ll_gpio.o(i.LL_AHB1_GRP1_ReleaseReset) for LL_AHB1_GRP1_ReleaseReset - stm32f0xx_ll_dma.o(i.LL_DMA_Init) refers to stm32f0xx_ll_dma.o(.constdata) for .constdata - stm32f0xx_ll_usart.o(i.LL_USART_Init) refers to stm32f0xx_ll_rcc.o(i.LL_RCC_GetUSARTClockFreq) for LL_RCC_GetUSARTClockFreq - stm32f0xx_ll_usart.o(i.LL_USART_Init) refers to stm32f0xx_ll_rcc.o(i.LL_RCC_GetSystemClocksFreq) for LL_RCC_GetSystemClocksFreq - stm32f0xx_ll_usart.o(i.LL_USART_Init) refers to uidiv.o(.text) for __aeabi_uidivmod - stm32f0xx_ll_rcc.o(i.LL_RCC_GetI2CClockFreq) refers to stm32f0xx_ll_rcc.o(i.RCC_GetSystemClockFreq) for RCC_GetSystemClockFreq - stm32f0xx_ll_rcc.o(i.LL_RCC_GetSystemClocksFreq) refers to stm32f0xx_ll_rcc.o(i.RCC_GetSystemClockFreq) for RCC_GetSystemClockFreq - stm32f0xx_ll_rcc.o(i.LL_RCC_GetSystemClocksFreq) refers to stm32f0xx_ll_rcc.o(i.RCC_GetHCLKClockFreq) for RCC_GetHCLKClockFreq - stm32f0xx_ll_rcc.o(i.LL_RCC_GetSystemClocksFreq) refers to stm32f0xx_ll_rcc.o(i.RCC_GetPCLK1ClockFreq) for RCC_GetPCLK1ClockFreq - stm32f0xx_ll_rcc.o(i.LL_RCC_GetUSARTClockFreq) refers to stm32f0xx_ll_rcc.o(i.RCC_GetSystemClockFreq) for RCC_GetSystemClockFreq - stm32f0xx_ll_rcc.o(i.LL_RCC_GetUSARTClockFreq) refers to stm32f0xx_ll_rcc.o(i.RCC_GetHCLKClockFreq) for RCC_GetHCLKClockFreq - stm32f0xx_ll_rcc.o(i.LL_RCC_GetUSARTClockFreq) refers to stm32f0xx_ll_rcc.o(i.RCC_GetPCLK1ClockFreq) for RCC_GetPCLK1ClockFreq - stm32f0xx_ll_rcc.o(i.RCC_GetHCLKClockFreq) refers to system_stm32f0xx.o(.constdata) for AHBPrescTable - stm32f0xx_ll_rcc.o(i.RCC_GetPCLK1ClockFreq) refers to system_stm32f0xx.o(.constdata) for APBPrescTable - stm32f0xx_ll_rcc.o(i.RCC_GetSystemClockFreq) refers to stm32f0xx_ll_rcc.o(i.RCC_PLL_GetFreqDomain_SYS) for RCC_PLL_GetFreqDomain_SYS - stm32f0xx_ll_rcc.o(i.RCC_PLL_GetFreqDomain_SYS) refers to uidiv.o(.text) for __aeabi_uidivmod - stm32f0xx_hal_rcc.o(i.HAL_RCC_ClockConfig) refers to stm32f0xx_hal.o(i.HAL_GetTick) for HAL_GetTick - stm32f0xx_hal_rcc.o(i.HAL_RCC_ClockConfig) refers to stm32f0xx_hal_rcc.o(i.HAL_RCC_GetSysClockFreq) for HAL_RCC_GetSysClockFreq - stm32f0xx_hal_rcc.o(i.HAL_RCC_ClockConfig) refers to stm32f0xx_hal.o(i.HAL_InitTick) for HAL_InitTick - stm32f0xx_hal_rcc.o(i.HAL_RCC_ClockConfig) refers to system_stm32f0xx.o(.constdata) for AHBPrescTable - stm32f0xx_hal_rcc.o(i.HAL_RCC_ClockConfig) refers to system_stm32f0xx.o(.data) for SystemCoreClock - stm32f0xx_hal_rcc.o(i.HAL_RCC_DeInit) refers to system_stm32f0xx.o(.data) for SystemCoreClock - stm32f0xx_hal_rcc.o(i.HAL_RCC_GetHCLKFreq) refers to system_stm32f0xx.o(.data) for SystemCoreClock - stm32f0xx_hal_rcc.o(i.HAL_RCC_GetPCLK1Freq) refers to system_stm32f0xx.o(.data) for SystemCoreClock - stm32f0xx_hal_rcc.o(i.HAL_RCC_GetPCLK1Freq) refers to system_stm32f0xx.o(.constdata) for APBPrescTable - stm32f0xx_hal_rcc.o(i.HAL_RCC_GetSysClockFreq) refers to uidiv.o(.text) for __aeabi_uidivmod - stm32f0xx_hal_rcc.o(i.HAL_RCC_MCOConfig) refers to stm32f0xx_hal_gpio.o(i.HAL_GPIO_Init) for HAL_GPIO_Init - stm32f0xx_hal_rcc.o(i.HAL_RCC_NMI_IRQHandler) refers to stm32f0xx_hal_rcc.o(i.HAL_RCC_CSSCallback) for HAL_RCC_CSSCallback - stm32f0xx_hal_rcc.o(i.HAL_RCC_OscConfig) refers to stm32f0xx_hal.o(i.HAL_GetTick) for HAL_GetTick - stm32f0xx_hal_rcc_ex.o(i.HAL_RCCEx_GetPeriphCLKFreq) refers to stm32f0xx_hal_rcc.o(i.HAL_RCC_GetPCLK1Freq) for HAL_RCC_GetPCLK1Freq - stm32f0xx_hal_rcc_ex.o(i.HAL_RCCEx_GetPeriphCLKFreq) refers to stm32f0xx_hal_rcc.o(i.HAL_RCC_GetSysClockFreq) for HAL_RCC_GetSysClockFreq - stm32f0xx_hal_rcc_ex.o(i.HAL_RCCEx_PeriphCLKConfig) refers to stm32f0xx_hal.o(i.HAL_GetTick) for HAL_GetTick - stm32f0xx_hal.o(i.HAL_DeInit) refers to stm32f0xx_hal.o(i.HAL_MspDeInit) for HAL_MspDeInit - stm32f0xx_hal.o(i.HAL_Delay) refers to stm32f0xx_hal.o(i.HAL_GetTick) for HAL_GetTick - stm32f0xx_hal.o(i.HAL_GetTick) refers to stm32f0xx_hal.o(.data) for .data - stm32f0xx_hal.o(i.HAL_IncTick) refers to stm32f0xx_hal.o(.data) for .data - stm32f0xx_hal.o(i.HAL_Init) refers to stm32f0xx_hal.o(i.HAL_InitTick) for HAL_InitTick - stm32f0xx_hal.o(i.HAL_Init) refers to stm32f0xx_hal_msp.o(i.HAL_MspInit) for HAL_MspInit - stm32f0xx_hal.o(i.HAL_InitTick) refers to stm32f0xx_hal_rcc.o(i.HAL_RCC_GetHCLKFreq) for HAL_RCC_GetHCLKFreq - stm32f0xx_hal.o(i.HAL_InitTick) refers to uidiv.o(.text) for __aeabi_uidivmod - stm32f0xx_hal.o(i.HAL_InitTick) refers to stm32f0xx_hal_cortex.o(i.HAL_SYSTICK_Config) for HAL_SYSTICK_Config - stm32f0xx_hal.o(i.HAL_InitTick) refers to stm32f0xx_hal_cortex.o(i.HAL_NVIC_SetPriority) for HAL_NVIC_SetPriority - stm32f0xx_hal_i2c.o(i.HAL_I2C_DeInit) refers to stm32f0xx_hal_i2c.o(i.HAL_I2C_MspDeInit) for HAL_I2C_MspDeInit - stm32f0xx_hal_i2c.o(i.HAL_I2C_DisableListen_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_Disable_IRQ) for I2C_Disable_IRQ - stm32f0xx_hal_i2c.o(i.HAL_I2C_ER_IRQHandler) refers to stm32f0xx_hal_i2c.o(i.I2C_ITError) for I2C_ITError - stm32f0xx_hal_i2c.o(i.HAL_I2C_EnableListen_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_Enable_IRQ) for I2C_Enable_IRQ - stm32f0xx_hal_i2c.o(i.HAL_I2C_EnableListen_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_Slave_ISR_IT) for I2C_Slave_ISR_IT - stm32f0xx_hal_i2c.o(i.HAL_I2C_Init) refers to stm32f0xx_hal_i2c.o(i.HAL_I2C_MspInit) for HAL_I2C_MspInit - stm32f0xx_hal_i2c.o(i.HAL_I2C_IsDeviceReady) refers to stm32f0xx_hal.o(i.HAL_GetTick) for HAL_GetTick - stm32f0xx_hal_i2c.o(i.HAL_I2C_IsDeviceReady) refers to stm32f0xx_hal_i2c.o(i.I2C_WaitOnFlagUntilTimeout) for I2C_WaitOnFlagUntilTimeout - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Abort_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_Disable_IRQ) for I2C_Disable_IRQ - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Abort_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_TransferConfig) for I2C_TransferConfig - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Abort_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_Enable_IRQ) for I2C_Enable_IRQ - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Receive) refers to stm32f0xx_hal.o(i.HAL_GetTick) for HAL_GetTick - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Receive) refers to stm32f0xx_hal_i2c.o(i.I2C_WaitOnFlagUntilTimeout) for I2C_WaitOnFlagUntilTimeout - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Receive) refers to stm32f0xx_hal_i2c.o(i.I2C_TransferConfig) for I2C_TransferConfig - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Receive) refers to stm32f0xx_hal_i2c.o(i.I2C_WaitOnRXNEFlagUntilTimeout) for I2C_WaitOnRXNEFlagUntilTimeout - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Receive) refers to stm32f0xx_hal_i2c.o(i.I2C_WaitOnSTOPFlagUntilTimeout) for I2C_WaitOnSTOPFlagUntilTimeout - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Receive_DMA) refers to stm32f0xx_hal_dma.o(i.HAL_DMA_Start_IT) for HAL_DMA_Start_IT - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Receive_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_TransferConfig) for I2C_TransferConfig - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Receive_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_Enable_IRQ) for I2C_Enable_IRQ - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Receive_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_Master_ISR_DMA) for I2C_Master_ISR_DMA - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Receive_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_DMAMasterReceiveCplt) for I2C_DMAMasterReceiveCplt - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Receive_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_DMAError) for I2C_DMAError - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Receive_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_Master_ISR_IT) for I2C_Master_ISR_IT - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Receive_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_TransferConfig) for I2C_TransferConfig - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Receive_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_Enable_IRQ) for I2C_Enable_IRQ - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Receive_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_Master_ISR_IT) for I2C_Master_ISR_IT - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Sequential_Receive_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_TransferConfig) for I2C_TransferConfig - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Sequential_Receive_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_Enable_IRQ) for I2C_Enable_IRQ - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Sequential_Receive_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_Master_ISR_IT) for I2C_Master_ISR_IT - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Sequential_Transmit_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_TransferConfig) for I2C_TransferConfig - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Sequential_Transmit_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_Enable_IRQ) for I2C_Enable_IRQ - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Sequential_Transmit_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_Master_ISR_IT) for I2C_Master_ISR_IT - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Transmit) refers to stm32f0xx_hal.o(i.HAL_GetTick) for HAL_GetTick - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Transmit) refers to stm32f0xx_hal_i2c.o(i.I2C_WaitOnFlagUntilTimeout) for I2C_WaitOnFlagUntilTimeout - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Transmit) refers to stm32f0xx_hal_i2c.o(i.I2C_TransferConfig) for I2C_TransferConfig - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Transmit) refers to stm32f0xx_hal_i2c.o(i.I2C_WaitOnTXISFlagUntilTimeout) for I2C_WaitOnTXISFlagUntilTimeout - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Transmit) refers to stm32f0xx_hal_i2c.o(i.I2C_WaitOnSTOPFlagUntilTimeout) for I2C_WaitOnSTOPFlagUntilTimeout - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Transmit_DMA) refers to stm32f0xx_hal_dma.o(i.HAL_DMA_Start_IT) for HAL_DMA_Start_IT - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Transmit_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_TransferConfig) for I2C_TransferConfig - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Transmit_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_Enable_IRQ) for I2C_Enable_IRQ - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Transmit_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_Master_ISR_DMA) for I2C_Master_ISR_DMA - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Transmit_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_DMAMasterTransmitCplt) for I2C_DMAMasterTransmitCplt - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Transmit_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_DMAError) for I2C_DMAError - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Transmit_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_Master_ISR_IT) for I2C_Master_ISR_IT - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Transmit_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_TransferConfig) for I2C_TransferConfig - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Transmit_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_Enable_IRQ) for I2C_Enable_IRQ - stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Transmit_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_Master_ISR_IT) for I2C_Master_ISR_IT - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Read) refers to stm32f0xx_hal.o(i.HAL_GetTick) for HAL_GetTick - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Read) refers to stm32f0xx_hal_i2c.o(i.I2C_WaitOnFlagUntilTimeout) for I2C_WaitOnFlagUntilTimeout - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Read) refers to stm32f0xx_hal_i2c.o(i.I2C_RequestMemoryRead) for I2C_RequestMemoryRead - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Read) refers to stm32f0xx_hal_i2c.o(i.I2C_TransferConfig) for I2C_TransferConfig - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Read) refers to stm32f0xx_hal_i2c.o(i.I2C_WaitOnSTOPFlagUntilTimeout) for I2C_WaitOnSTOPFlagUntilTimeout - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Read_DMA) refers to stm32f0xx_hal.o(i.HAL_GetTick) for HAL_GetTick - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Read_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_RequestMemoryRead) for I2C_RequestMemoryRead - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Read_DMA) refers to stm32f0xx_hal_dma.o(i.HAL_DMA_Start_IT) for HAL_DMA_Start_IT - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Read_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_TransferConfig) for I2C_TransferConfig - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Read_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_Enable_IRQ) for I2C_Enable_IRQ - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Read_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_Master_ISR_DMA) for I2C_Master_ISR_DMA - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Read_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_DMAMasterReceiveCplt) for I2C_DMAMasterReceiveCplt - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Read_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_DMAError) for I2C_DMAError - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Read_IT) refers to stm32f0xx_hal.o(i.HAL_GetTick) for HAL_GetTick - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Read_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_RequestMemoryRead) for I2C_RequestMemoryRead - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Read_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_TransferConfig) for I2C_TransferConfig - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Read_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_Enable_IRQ) for I2C_Enable_IRQ - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Read_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_Master_ISR_IT) for I2C_Master_ISR_IT - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Write) refers to stm32f0xx_hal.o(i.HAL_GetTick) for HAL_GetTick - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Write) refers to stm32f0xx_hal_i2c.o(i.I2C_WaitOnFlagUntilTimeout) for I2C_WaitOnFlagUntilTimeout - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Write) refers to stm32f0xx_hal_i2c.o(i.I2C_RequestMemoryWrite) for I2C_RequestMemoryWrite - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Write) refers to stm32f0xx_hal_i2c.o(i.I2C_TransferConfig) for I2C_TransferConfig - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Write) refers to stm32f0xx_hal_i2c.o(i.I2C_WaitOnTXISFlagUntilTimeout) for I2C_WaitOnTXISFlagUntilTimeout - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Write) refers to stm32f0xx_hal_i2c.o(i.I2C_WaitOnSTOPFlagUntilTimeout) for I2C_WaitOnSTOPFlagUntilTimeout - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Write_DMA) refers to stm32f0xx_hal.o(i.HAL_GetTick) for HAL_GetTick - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Write_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_RequestMemoryWrite) for I2C_RequestMemoryWrite - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Write_DMA) refers to stm32f0xx_hal_dma.o(i.HAL_DMA_Start_IT) for HAL_DMA_Start_IT - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Write_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_TransferConfig) for I2C_TransferConfig - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Write_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_Enable_IRQ) for I2C_Enable_IRQ - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Write_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_Master_ISR_DMA) for I2C_Master_ISR_DMA - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Write_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_DMAMasterTransmitCplt) for I2C_DMAMasterTransmitCplt - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Write_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_DMAError) for I2C_DMAError - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Write_IT) refers to stm32f0xx_hal.o(i.HAL_GetTick) for HAL_GetTick - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Write_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_RequestMemoryWrite) for I2C_RequestMemoryWrite - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Write_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_TransferConfig) for I2C_TransferConfig - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Write_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_Enable_IRQ) for I2C_Enable_IRQ - stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Write_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_Master_ISR_IT) for I2C_Master_ISR_IT - stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Receive) refers to stm32f0xx_hal.o(i.HAL_GetTick) for HAL_GetTick - stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Receive) refers to stm32f0xx_hal_i2c.o(i.I2C_WaitOnFlagUntilTimeout) for I2C_WaitOnFlagUntilTimeout - stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Receive) refers to stm32f0xx_hal_i2c.o(i.I2C_WaitOnRXNEFlagUntilTimeout) for I2C_WaitOnRXNEFlagUntilTimeout - stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Receive) refers to stm32f0xx_hal_i2c.o(i.I2C_WaitOnSTOPFlagUntilTimeout) for I2C_WaitOnSTOPFlagUntilTimeout - stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Receive_DMA) refers to stm32f0xx_hal_dma.o(i.HAL_DMA_Start_IT) for HAL_DMA_Start_IT - stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Receive_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_Enable_IRQ) for I2C_Enable_IRQ - stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Receive_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_Slave_ISR_DMA) for I2C_Slave_ISR_DMA - stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Receive_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_DMASlaveReceiveCplt) for I2C_DMASlaveReceiveCplt - stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Receive_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_DMAError) for I2C_DMAError - stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Receive_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_Enable_IRQ) for I2C_Enable_IRQ - stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Receive_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_Slave_ISR_IT) for I2C_Slave_ISR_IT - stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Sequential_Receive_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_Disable_IRQ) for I2C_Disable_IRQ - stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Sequential_Receive_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_Enable_IRQ) for I2C_Enable_IRQ - stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Sequential_Receive_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_Slave_ISR_IT) for I2C_Slave_ISR_IT - stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Sequential_Transmit_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_Disable_IRQ) for I2C_Disable_IRQ - stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Sequential_Transmit_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_Enable_IRQ) for I2C_Enable_IRQ - stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Sequential_Transmit_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_Slave_ISR_IT) for I2C_Slave_ISR_IT - stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Transmit) refers to stm32f0xx_hal.o(i.HAL_GetTick) for HAL_GetTick - stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Transmit) refers to stm32f0xx_hal_i2c.o(i.I2C_WaitOnFlagUntilTimeout) for I2C_WaitOnFlagUntilTimeout - stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Transmit) refers to stm32f0xx_hal_i2c.o(i.I2C_WaitOnTXISFlagUntilTimeout) for I2C_WaitOnTXISFlagUntilTimeout - stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Transmit) refers to stm32f0xx_hal_i2c.o(i.I2C_WaitOnSTOPFlagUntilTimeout) for I2C_WaitOnSTOPFlagUntilTimeout - stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Transmit_DMA) refers to stm32f0xx_hal_dma.o(i.HAL_DMA_Start_IT) for HAL_DMA_Start_IT - stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Transmit_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_Enable_IRQ) for I2C_Enable_IRQ - stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Transmit_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_Slave_ISR_DMA) for I2C_Slave_ISR_DMA - stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Transmit_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_DMASlaveTransmitCplt) for I2C_DMASlaveTransmitCplt - stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Transmit_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_DMAError) for I2C_DMAError - stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Transmit_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_Enable_IRQ) for I2C_Enable_IRQ - stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Transmit_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_Slave_ISR_IT) for I2C_Slave_ISR_IT - stm32f0xx_hal_i2c.o(i.I2C_DMAAbort) refers to stm32f0xx_hal_i2c.o(i.HAL_I2C_ErrorCallback) for HAL_I2C_ErrorCallback - stm32f0xx_hal_i2c.o(i.I2C_DMAAbort) refers to stm32f0xx_hal_i2c.o(i.HAL_I2C_AbortCpltCallback) for HAL_I2C_AbortCpltCallback - stm32f0xx_hal_i2c.o(i.I2C_DMAError) refers to stm32f0xx_hal_i2c.o(i.I2C_ITError) for I2C_ITError - stm32f0xx_hal_i2c.o(i.I2C_DMAMasterReceiveCplt) refers to stm32f0xx_hal_i2c.o(i.I2C_Enable_IRQ) for I2C_Enable_IRQ - stm32f0xx_hal_i2c.o(i.I2C_DMAMasterReceiveCplt) refers to stm32f0xx_hal_dma.o(i.HAL_DMA_Start_IT) for HAL_DMA_Start_IT - stm32f0xx_hal_i2c.o(i.I2C_DMAMasterTransmitCplt) refers to stm32f0xx_hal_i2c.o(i.I2C_Enable_IRQ) for I2C_Enable_IRQ - stm32f0xx_hal_i2c.o(i.I2C_DMAMasterTransmitCplt) refers to stm32f0xx_hal_dma.o(i.HAL_DMA_Start_IT) for HAL_DMA_Start_IT - stm32f0xx_hal_i2c.o(i.I2C_Enable_IRQ) refers to stm32f0xx_hal_i2c.o(i.I2C_Master_ISR_DMA) for I2C_Master_ISR_DMA - stm32f0xx_hal_i2c.o(i.I2C_Enable_IRQ) refers to stm32f0xx_hal_i2c.o(i.I2C_Slave_ISR_DMA) for I2C_Slave_ISR_DMA - stm32f0xx_hal_i2c.o(i.I2C_ITAddrCplt) refers to stm32f0xx_hal_i2c.o(i.I2C_Disable_IRQ) for I2C_Disable_IRQ - stm32f0xx_hal_i2c.o(i.I2C_ITAddrCplt) refers to stm32f0xx_hal_i2c.o(i.HAL_I2C_AddrCallback) for HAL_I2C_AddrCallback - stm32f0xx_hal_i2c.o(i.I2C_ITError) refers to stm32f0xx_hal_i2c.o(i.I2C_Disable_IRQ) for I2C_Disable_IRQ - stm32f0xx_hal_i2c.o(i.I2C_ITError) refers to stm32f0xx_hal_dma.o(i.HAL_DMA_Abort_IT) for HAL_DMA_Abort_IT - stm32f0xx_hal_i2c.o(i.I2C_ITError) refers to stm32f0xx_hal_i2c.o(i.HAL_I2C_ErrorCallback) for HAL_I2C_ErrorCallback - stm32f0xx_hal_i2c.o(i.I2C_ITError) refers to stm32f0xx_hal_i2c.o(i.HAL_I2C_AbortCpltCallback) for HAL_I2C_AbortCpltCallback - stm32f0xx_hal_i2c.o(i.I2C_ITError) refers to stm32f0xx_hal_i2c.o(i.I2C_DMAAbort) for I2C_DMAAbort - stm32f0xx_hal_i2c.o(i.I2C_ITError) refers to stm32f0xx_hal_i2c.o(i.I2C_Slave_ISR_IT) for I2C_Slave_ISR_IT - stm32f0xx_hal_i2c.o(i.I2C_ITListenCplt) refers to stm32f0xx_hal_i2c.o(i.I2C_Disable_IRQ) for I2C_Disable_IRQ - stm32f0xx_hal_i2c.o(i.I2C_ITListenCplt) refers to stm32f0xx_hal_i2c.o(i.HAL_I2C_ListenCpltCallback) for HAL_I2C_ListenCpltCallback - stm32f0xx_hal_i2c.o(i.I2C_ITMasterCplt) refers to stm32f0xx_hal_i2c.o(i.I2C_Flush_TXDR) for I2C_Flush_TXDR - stm32f0xx_hal_i2c.o(i.I2C_ITMasterCplt) refers to stm32f0xx_hal_i2c.o(i.I2C_Disable_IRQ) for I2C_Disable_IRQ - stm32f0xx_hal_i2c.o(i.I2C_ITMasterCplt) refers to stm32f0xx_hal_i2c.o(i.HAL_I2C_MasterRxCpltCallback) for HAL_I2C_MasterRxCpltCallback - stm32f0xx_hal_i2c.o(i.I2C_ITMasterCplt) refers to stm32f0xx_hal_i2c.o(i.I2C_ITError) for I2C_ITError - stm32f0xx_hal_i2c.o(i.I2C_ITMasterCplt) refers to stm32f0xx_hal_i2c.o(i.HAL_I2C_MasterTxCpltCallback) for HAL_I2C_MasterTxCpltCallback - stm32f0xx_hal_i2c.o(i.I2C_ITMasterCplt) refers to stm32f0xx_hal_i2c.o(i.HAL_I2C_MemTxCpltCallback) for HAL_I2C_MemTxCpltCallback - stm32f0xx_hal_i2c.o(i.I2C_ITMasterCplt) refers to stm32f0xx_hal_i2c.o(i.HAL_I2C_MemRxCpltCallback) for HAL_I2C_MemRxCpltCallback - stm32f0xx_hal_i2c.o(i.I2C_ITMasterSequentialCplt) refers to stm32f0xx_hal_i2c.o(i.I2C_Disable_IRQ) for I2C_Disable_IRQ - stm32f0xx_hal_i2c.o(i.I2C_ITMasterSequentialCplt) refers to stm32f0xx_hal_i2c.o(i.HAL_I2C_MasterRxCpltCallback) for HAL_I2C_MasterRxCpltCallback - stm32f0xx_hal_i2c.o(i.I2C_ITMasterSequentialCplt) refers to stm32f0xx_hal_i2c.o(i.HAL_I2C_MasterTxCpltCallback) for HAL_I2C_MasterTxCpltCallback - stm32f0xx_hal_i2c.o(i.I2C_ITSlaveCplt) refers to stm32f0xx_hal_i2c.o(i.I2C_Disable_IRQ) for I2C_Disable_IRQ - stm32f0xx_hal_i2c.o(i.I2C_ITSlaveCplt) refers to stm32f0xx_hal_i2c.o(i.I2C_Flush_TXDR) for I2C_Flush_TXDR - stm32f0xx_hal_i2c.o(i.I2C_ITSlaveCplt) refers to stm32f0xx_hal_i2c.o(i.I2C_ITError) for I2C_ITError - stm32f0xx_hal_i2c.o(i.I2C_ITSlaveCplt) refers to stm32f0xx_hal_i2c.o(i.I2C_ITListenCplt) for I2C_ITListenCplt - stm32f0xx_hal_i2c.o(i.I2C_ITSlaveCplt) refers to stm32f0xx_hal_i2c.o(i.HAL_I2C_ListenCpltCallback) for HAL_I2C_ListenCpltCallback - stm32f0xx_hal_i2c.o(i.I2C_ITSlaveCplt) refers to stm32f0xx_hal_i2c.o(i.HAL_I2C_SlaveTxCpltCallback) for HAL_I2C_SlaveTxCpltCallback - stm32f0xx_hal_i2c.o(i.I2C_ITSlaveCplt) refers to stm32f0xx_hal_i2c.o(i.HAL_I2C_SlaveRxCpltCallback) for HAL_I2C_SlaveRxCpltCallback - stm32f0xx_hal_i2c.o(i.I2C_ITSlaveSequentialCplt) refers to stm32f0xx_hal_i2c.o(i.I2C_Disable_IRQ) for I2C_Disable_IRQ - stm32f0xx_hal_i2c.o(i.I2C_ITSlaveSequentialCplt) refers to stm32f0xx_hal_i2c.o(i.HAL_I2C_SlaveRxCpltCallback) for HAL_I2C_SlaveRxCpltCallback - stm32f0xx_hal_i2c.o(i.I2C_ITSlaveSequentialCplt) refers to stm32f0xx_hal_i2c.o(i.HAL_I2C_SlaveTxCpltCallback) for HAL_I2C_SlaveTxCpltCallback - stm32f0xx_hal_i2c.o(i.I2C_IsAcknowledgeFailed) refers to stm32f0xx_hal.o(i.HAL_GetTick) for HAL_GetTick - stm32f0xx_hal_i2c.o(i.I2C_IsAcknowledgeFailed) refers to stm32f0xx_hal_i2c.o(i.I2C_Flush_TXDR) for I2C_Flush_TXDR - stm32f0xx_hal_i2c.o(i.I2C_Master_ISR_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_Enable_IRQ) for I2C_Enable_IRQ - stm32f0xx_hal_i2c.o(i.I2C_Master_ISR_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_Flush_TXDR) for I2C_Flush_TXDR - stm32f0xx_hal_i2c.o(i.I2C_Master_ISR_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_TransferConfig) for I2C_TransferConfig - stm32f0xx_hal_i2c.o(i.I2C_Master_ISR_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_ITError) for I2C_ITError - stm32f0xx_hal_i2c.o(i.I2C_Master_ISR_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_ITMasterCplt) for I2C_ITMasterCplt - stm32f0xx_hal_i2c.o(i.I2C_Master_ISR_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_Flush_TXDR) for I2C_Flush_TXDR - stm32f0xx_hal_i2c.o(i.I2C_Master_ISR_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_TransferConfig) for I2C_TransferConfig - stm32f0xx_hal_i2c.o(i.I2C_Master_ISR_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_ITError) for I2C_ITError - stm32f0xx_hal_i2c.o(i.I2C_Master_ISR_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_ITMasterCplt) for I2C_ITMasterCplt - stm32f0xx_hal_i2c.o(i.I2C_Master_ISR_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_ITMasterSequentialCplt) for I2C_ITMasterSequentialCplt - stm32f0xx_hal_i2c.o(i.I2C_RequestMemoryRead) refers to stm32f0xx_hal_i2c.o(i.I2C_TransferConfig) for I2C_TransferConfig - stm32f0xx_hal_i2c.o(i.I2C_RequestMemoryRead) refers to stm32f0xx_hal_i2c.o(i.I2C_WaitOnTXISFlagUntilTimeout) for I2C_WaitOnTXISFlagUntilTimeout - stm32f0xx_hal_i2c.o(i.I2C_RequestMemoryRead) refers to stm32f0xx_hal_i2c.o(i.I2C_WaitOnFlagUntilTimeout) for I2C_WaitOnFlagUntilTimeout - stm32f0xx_hal_i2c.o(i.I2C_RequestMemoryWrite) refers to stm32f0xx_hal_i2c.o(i.I2C_TransferConfig) for I2C_TransferConfig - stm32f0xx_hal_i2c.o(i.I2C_RequestMemoryWrite) refers to stm32f0xx_hal_i2c.o(i.I2C_WaitOnTXISFlagUntilTimeout) for I2C_WaitOnTXISFlagUntilTimeout - stm32f0xx_hal_i2c.o(i.I2C_RequestMemoryWrite) refers to stm32f0xx_hal_i2c.o(i.I2C_WaitOnFlagUntilTimeout) for I2C_WaitOnFlagUntilTimeout - stm32f0xx_hal_i2c.o(i.I2C_Slave_ISR_DMA) refers to stm32f0xx_hal_i2c.o(i.I2C_ITSlaveCplt) for I2C_ITSlaveCplt - stm32f0xx_hal_i2c.o(i.I2C_Slave_ISR_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_ITListenCplt) for I2C_ITListenCplt - stm32f0xx_hal_i2c.o(i.I2C_Slave_ISR_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_Flush_TXDR) for I2C_Flush_TXDR - stm32f0xx_hal_i2c.o(i.I2C_Slave_ISR_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_ITAddrCplt) for I2C_ITAddrCplt - stm32f0xx_hal_i2c.o(i.I2C_Slave_ISR_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_ITSlaveSequentialCplt) for I2C_ITSlaveSequentialCplt - stm32f0xx_hal_i2c.o(i.I2C_Slave_ISR_IT) refers to stm32f0xx_hal_i2c.o(i.I2C_ITSlaveCplt) for I2C_ITSlaveCplt - stm32f0xx_hal_i2c.o(i.I2C_WaitOnFlagUntilTimeout) refers to stm32f0xx_hal.o(i.HAL_GetTick) for HAL_GetTick - stm32f0xx_hal_i2c.o(i.I2C_WaitOnRXNEFlagUntilTimeout) refers to stm32f0xx_hal_i2c.o(i.I2C_IsAcknowledgeFailed) for I2C_IsAcknowledgeFailed - stm32f0xx_hal_i2c.o(i.I2C_WaitOnRXNEFlagUntilTimeout) refers to stm32f0xx_hal.o(i.HAL_GetTick) for HAL_GetTick - stm32f0xx_hal_i2c.o(i.I2C_WaitOnSTOPFlagUntilTimeout) refers to stm32f0xx_hal_i2c.o(i.I2C_IsAcknowledgeFailed) for I2C_IsAcknowledgeFailed - stm32f0xx_hal_i2c.o(i.I2C_WaitOnSTOPFlagUntilTimeout) refers to stm32f0xx_hal.o(i.HAL_GetTick) for HAL_GetTick - stm32f0xx_hal_i2c.o(i.I2C_WaitOnTXISFlagUntilTimeout) refers to stm32f0xx_hal_i2c.o(i.I2C_IsAcknowledgeFailed) for I2C_IsAcknowledgeFailed - stm32f0xx_hal_i2c.o(i.I2C_WaitOnTXISFlagUntilTimeout) refers to stm32f0xx_hal.o(i.HAL_GetTick) for HAL_GetTick - stm32f0xx_hal_gpio.o(i.HAL_GPIO_EXTI_IRQHandler) refers to stm32f0xx_hal_gpio.o(i.HAL_GPIO_EXTI_Callback) for HAL_GPIO_EXTI_Callback - stm32f0xx_hal_dma.o(i.DMA_CalcBaseAndBitshift) refers to uidiv.o(.text) for __aeabi_uidivmod - stm32f0xx_hal_dma.o(i.HAL_DMA_DeInit) refers to stm32f0xx_hal_dma.o(i.DMA_CalcBaseAndBitshift) for DMA_CalcBaseAndBitshift - stm32f0xx_hal_dma.o(i.HAL_DMA_Init) refers to stm32f0xx_hal_dma.o(i.DMA_CalcBaseAndBitshift) for DMA_CalcBaseAndBitshift - stm32f0xx_hal_dma.o(i.HAL_DMA_PollForTransfer) refers to stm32f0xx_hal.o(i.HAL_GetTick) for HAL_GetTick - stm32f0xx_hal_dma.o(i.HAL_DMA_Start) refers to stm32f0xx_hal_dma.o(i.DMA_SetConfig) for DMA_SetConfig - stm32f0xx_hal_dma.o(i.HAL_DMA_Start_IT) refers to stm32f0xx_hal_dma.o(i.DMA_SetConfig) for DMA_SetConfig - stm32f0xx_hal_dma.o(i.HAL_DMA_UnRegisterCallback) refers to modbusrtu.o(i.__ARM_common_switch8) for __ARM_common_switch8 - stm32f0xx_hal_cortex.o(i.HAL_NVIC_SetPriority) refers to stm32f0xx_hal_cortex.o(i.NVIC_SetPriority) for NVIC_SetPriority - stm32f0xx_hal_cortex.o(i.HAL_SYSTICK_Config) refers to stm32f0xx_hal_cortex.o(i.NVIC_SetPriority) for NVIC_SetPriority - stm32f0xx_hal_cortex.o(i.HAL_SYSTICK_IRQHandler) refers to main.o(i.HAL_SYSTICK_Callback) for HAL_SYSTICK_Callback - stm32f0xx_hal_flash.o(i.FLASH_Program_HalfWord) refers to stm32f0xx_hal_flash.o(.bss) for .bss - stm32f0xx_hal_flash.o(i.FLASH_SetErrorCode) refers to stm32f0xx_hal_flash.o(.bss) for .bss - stm32f0xx_hal_flash.o(i.FLASH_WaitForLastOperation) refers to stm32f0xx_hal.o(i.HAL_GetTick) for HAL_GetTick - stm32f0xx_hal_flash.o(i.FLASH_WaitForLastOperation) refers to stm32f0xx_hal_flash.o(i.FLASH_SetErrorCode) for FLASH_SetErrorCode - stm32f0xx_hal_flash.o(i.HAL_FLASH_GetError) refers to stm32f0xx_hal_flash.o(.bss) for .bss - stm32f0xx_hal_flash.o(i.HAL_FLASH_IRQHandler) refers to stm32f0xx_hal_flash.o(i.FLASH_SetErrorCode) for FLASH_SetErrorCode - stm32f0xx_hal_flash.o(i.HAL_FLASH_IRQHandler) refers to stm32f0xx_hal_flash.o(i.HAL_FLASH_OperationErrorCallback) for HAL_FLASH_OperationErrorCallback - stm32f0xx_hal_flash.o(i.HAL_FLASH_IRQHandler) refers to stm32f0xx_hal_flash.o(i.FLASH_Program_HalfWord) for FLASH_Program_HalfWord - stm32f0xx_hal_flash.o(i.HAL_FLASH_IRQHandler) refers to stm32f0xx_hal_flash.o(i.HAL_FLASH_EndOfOperationCallback) for HAL_FLASH_EndOfOperationCallback - stm32f0xx_hal_flash.o(i.HAL_FLASH_IRQHandler) refers to stm32f0xx_hal_flash_ex.o(i.FLASH_PageErase) for FLASH_PageErase - stm32f0xx_hal_flash.o(i.HAL_FLASH_IRQHandler) refers to stm32f0xx_hal_flash.o(.bss) for .bss - stm32f0xx_hal_flash.o(i.HAL_FLASH_OB_Launch) refers to stm32f0xx_hal_flash.o(i.FLASH_WaitForLastOperation) for FLASH_WaitForLastOperation - stm32f0xx_hal_flash.o(i.HAL_FLASH_Program) refers to stm32f0xx_hal_flash.o(i.FLASH_WaitForLastOperation) for FLASH_WaitForLastOperation - stm32f0xx_hal_flash.o(i.HAL_FLASH_Program) refers to llushr.o(.text) for __aeabi_llsr - stm32f0xx_hal_flash.o(i.HAL_FLASH_Program) refers to stm32f0xx_hal_flash.o(i.FLASH_Program_HalfWord) for FLASH_Program_HalfWord - stm32f0xx_hal_flash.o(i.HAL_FLASH_Program) refers to stm32f0xx_hal_flash.o(.bss) for .bss - stm32f0xx_hal_flash.o(i.HAL_FLASH_Program_IT) refers to stm32f0xx_hal_flash.o(i.FLASH_Program_HalfWord) for FLASH_Program_HalfWord - stm32f0xx_hal_flash.o(i.HAL_FLASH_Program_IT) refers to stm32f0xx_hal_flash.o(.bss) for .bss - stm32f0xx_hal_flash_ex.o(i.FLASH_MassErase) refers to stm32f0xx_hal_flash.o(.bss) for pFlash - stm32f0xx_hal_flash_ex.o(i.FLASH_OB_DisableWRP) refers to stm32f0xx_hal_flash.o(i.FLASH_WaitForLastOperation) for FLASH_WaitForLastOperation - stm32f0xx_hal_flash_ex.o(i.FLASH_OB_DisableWRP) refers to stm32f0xx_hal_flash_ex.o(i.HAL_FLASHEx_OBErase) for HAL_FLASHEx_OBErase - stm32f0xx_hal_flash_ex.o(i.FLASH_OB_DisableWRP) refers to stm32f0xx_hal_flash.o(.bss) for pFlash - stm32f0xx_hal_flash_ex.o(i.FLASH_OB_EnableWRP) refers to stm32f0xx_hal_flash.o(i.FLASH_WaitForLastOperation) for FLASH_WaitForLastOperation - stm32f0xx_hal_flash_ex.o(i.FLASH_OB_EnableWRP) refers to stm32f0xx_hal_flash_ex.o(i.HAL_FLASHEx_OBErase) for HAL_FLASHEx_OBErase - stm32f0xx_hal_flash_ex.o(i.FLASH_OB_EnableWRP) refers to stm32f0xx_hal_flash.o(.bss) for pFlash - stm32f0xx_hal_flash_ex.o(i.FLASH_OB_RDP_LevelConfig) refers to stm32f0xx_hal_flash.o(i.FLASH_WaitForLastOperation) for FLASH_WaitForLastOperation - stm32f0xx_hal_flash_ex.o(i.FLASH_OB_RDP_LevelConfig) refers to stm32f0xx_hal_flash.o(.bss) for pFlash - stm32f0xx_hal_flash_ex.o(i.FLASH_PageErase) refers to stm32f0xx_hal_flash.o(.bss) for pFlash - stm32f0xx_hal_flash_ex.o(i.HAL_FLASHEx_Erase) refers to stm32f0xx_hal_flash.o(i.FLASH_WaitForLastOperation) for FLASH_WaitForLastOperation - stm32f0xx_hal_flash_ex.o(i.HAL_FLASHEx_Erase) refers to stm32f0xx_hal_flash_ex.o(i.FLASH_MassErase) for FLASH_MassErase - stm32f0xx_hal_flash_ex.o(i.HAL_FLASHEx_Erase) refers to stm32f0xx_hal_flash_ex.o(i.FLASH_PageErase) for FLASH_PageErase - stm32f0xx_hal_flash_ex.o(i.HAL_FLASHEx_Erase) refers to stm32f0xx_hal_flash.o(.bss) for pFlash - stm32f0xx_hal_flash_ex.o(i.HAL_FLASHEx_Erase_IT) refers to stm32f0xx_hal_flash_ex.o(i.FLASH_PageErase) for FLASH_PageErase - stm32f0xx_hal_flash_ex.o(i.HAL_FLASHEx_Erase_IT) refers to stm32f0xx_hal_flash_ex.o(i.FLASH_MassErase) for FLASH_MassErase - stm32f0xx_hal_flash_ex.o(i.HAL_FLASHEx_Erase_IT) refers to stm32f0xx_hal_flash.o(.bss) for pFlash - stm32f0xx_hal_flash_ex.o(i.HAL_FLASHEx_OBErase) refers to stm32f0xx_hal_flash_ex.o(i.FLASH_OB_GetRDP) for FLASH_OB_GetRDP - stm32f0xx_hal_flash_ex.o(i.HAL_FLASHEx_OBErase) refers to stm32f0xx_hal_flash.o(i.FLASH_WaitForLastOperation) for FLASH_WaitForLastOperation - stm32f0xx_hal_flash_ex.o(i.HAL_FLASHEx_OBErase) refers to stm32f0xx_hal_flash_ex.o(i.FLASH_OB_RDP_LevelConfig) for FLASH_OB_RDP_LevelConfig - stm32f0xx_hal_flash_ex.o(i.HAL_FLASHEx_OBErase) refers to stm32f0xx_hal_flash.o(.bss) for pFlash - stm32f0xx_hal_flash_ex.o(i.HAL_FLASHEx_OBGetConfig) refers to stm32f0xx_hal_flash_ex.o(i.FLASH_OB_GetRDP) for FLASH_OB_GetRDP - stm32f0xx_hal_flash_ex.o(i.HAL_FLASHEx_OBProgram) refers to stm32f0xx_hal_flash_ex.o(i.FLASH_OB_DisableWRP) for FLASH_OB_DisableWRP - stm32f0xx_hal_flash_ex.o(i.HAL_FLASHEx_OBProgram) refers to stm32f0xx_hal_flash_ex.o(i.FLASH_OB_EnableWRP) for FLASH_OB_EnableWRP - stm32f0xx_hal_flash_ex.o(i.HAL_FLASHEx_OBProgram) refers to stm32f0xx_hal_flash_ex.o(i.FLASH_OB_RDP_LevelConfig) for FLASH_OB_RDP_LevelConfig - stm32f0xx_hal_flash_ex.o(i.HAL_FLASHEx_OBProgram) refers to stm32f0xx_hal_flash.o(i.FLASH_WaitForLastOperation) for FLASH_WaitForLastOperation - stm32f0xx_hal_flash_ex.o(i.HAL_FLASHEx_OBProgram) refers to stm32f0xx_hal_flash.o(.bss) for pFlash - stm32f0xx_ll_utils.o(i.LL_Init1msTick) refers to uidiv.o(.text) for __aeabi_uidivmod - stm32f0xx_ll_utils.o(i.LL_PLL_ConfigSystemClock_HSE) refers to stm32f0xx_ll_utils.o(i.UTILS_PLL_IsBusy) for UTILS_PLL_IsBusy - stm32f0xx_ll_utils.o(i.LL_PLL_ConfigSystemClock_HSE) refers to stm32f0xx_ll_utils.o(i.UTILS_GetPLLOutputFrequency) for UTILS_GetPLLOutputFrequency - stm32f0xx_ll_utils.o(i.LL_PLL_ConfigSystemClock_HSE) refers to stm32f0xx_ll_utils.o(i.LL_RCC_PLL_ConfigDomain_SYS) for LL_RCC_PLL_ConfigDomain_SYS - stm32f0xx_ll_utils.o(i.LL_PLL_ConfigSystemClock_HSE) refers to stm32f0xx_ll_utils.o(i.UTILS_EnablePLLAndSwitchSystem) for UTILS_EnablePLLAndSwitchSystem - stm32f0xx_ll_utils.o(i.LL_PLL_ConfigSystemClock_HSI) refers to stm32f0xx_ll_utils.o(i.UTILS_PLL_IsBusy) for UTILS_PLL_IsBusy - stm32f0xx_ll_utils.o(i.LL_PLL_ConfigSystemClock_HSI) refers to stm32f0xx_ll_utils.o(i.UTILS_GetPLLOutputFrequency) for UTILS_GetPLLOutputFrequency - stm32f0xx_ll_utils.o(i.LL_PLL_ConfigSystemClock_HSI) refers to stm32f0xx_ll_utils.o(i.LL_RCC_PLL_ConfigDomain_SYS) for LL_RCC_PLL_ConfigDomain_SYS - stm32f0xx_ll_utils.o(i.LL_PLL_ConfigSystemClock_HSI) refers to stm32f0xx_ll_utils.o(i.UTILS_EnablePLLAndSwitchSystem) for UTILS_EnablePLLAndSwitchSystem - stm32f0xx_ll_utils.o(i.LL_SetSystemCoreClock) refers to system_stm32f0xx.o(.data) for SystemCoreClock - stm32f0xx_ll_utils.o(i.UTILS_EnablePLLAndSwitchSystem) refers to stm32f0xx_ll_utils.o(i.UTILS_SetFlashLatency) for UTILS_SetFlashLatency - stm32f0xx_ll_utils.o(i.UTILS_EnablePLLAndSwitchSystem) refers to system_stm32f0xx.o(.constdata) for AHBPrescTable - stm32f0xx_ll_utils.o(i.UTILS_EnablePLLAndSwitchSystem) refers to system_stm32f0xx.o(.data) for SystemCoreClock - stm32f0xx_ll_utils.o(i.UTILS_GetPLLOutputFrequency) refers to uidiv.o(.text) for __aeabi_uidivmod - stm32f0xx_ll_tim.o(i.LL_TIM_DeInit) refers to stm32f0xx_ll_tim.o(i.LL_APB1_GRP2_ForceReset) for LL_APB1_GRP2_ForceReset - stm32f0xx_ll_tim.o(i.LL_TIM_DeInit) refers to stm32f0xx_ll_tim.o(i.LL_APB1_GRP2_ReleaseReset) for LL_APB1_GRP2_ReleaseReset - stm32f0xx_ll_tim.o(i.LL_TIM_OC_Init) refers to stm32f0xx_ll_tim.o(i.OC4Config) for OC4Config - stm32f0xx_ll_tim.o(i.LL_TIM_OC_Init) refers to stm32f0xx_ll_tim.o(i.OC1Config) for OC1Config - stm32f0xx_ll_tim.o(i.LL_TIM_OC_Init) refers to stm32f0xx_ll_tim.o(i.OC2Config) for OC2Config - stm32f0xx_ll_tim.o(i.LL_TIM_OC_Init) refers to stm32f0xx_ll_tim.o(i.OC3Config) for OC3Config - stm32f0xx_ll_flash.o(i.LL_FLASH_Program) refers to llushr.o(.text) for __aeabi_llsr - entry.o(.ARM.Collect$$$$00000000) refers (Special) to entry10a.o(.ARM.Collect$$$$0000000D) for __rt_final_cpp - entry.o(.ARM.Collect$$$$00000000) refers (Special) to entry11a.o(.ARM.Collect$$$$0000000F) for __rt_final_exit - entry.o(.ARM.Collect$$$$00000000) refers (Special) to entry7b.o(.ARM.Collect$$$$00000008) for _main_clock - entry.o(.ARM.Collect$$$$00000000) refers (Special) to entry8b.o(.ARM.Collect$$$$0000000A) for _main_cpp_init - entry.o(.ARM.Collect$$$$00000000) refers (Special) to entry9a.o(.ARM.Collect$$$$0000000B) for _main_init - entry.o(.ARM.Collect$$$$00000000) refers (Special) to entry5.o(.ARM.Collect$$$$00000004) for _main_scatterload - entry.o(.ARM.Collect$$$$00000000) refers (Special) to entry2.o(.ARM.Collect$$$$00000001) for _main_stk - idiv.o(.text) refers to uidiv.o(.text) for __aeabi_uidivmod - ldiv.o(.text) refers to uldiv.o(.text) for __aeabi_uldivmod - printfb.o(i.__0fprintf$bare) refers to printfb.o(i._printf_core) for _printf_core - printfb.o(i.__0fprintf$bare) refers to fputc.o(i.fputc) for fputc - printfb.o(i.__0printf$bare) refers to printfb.o(i._printf_core) for _printf_core - printfb.o(i.__0printf$bare) refers to fputc.o(i.fputc) for fputc - printfb.o(i.__0printf$bare) refers to stdout.o(.data) for __stdout - printfb.o(i.__0snprintf$bare) refers to printfb.o(i._printf_core) for _printf_core - printfb.o(i.__0snprintf$bare) refers to printfb.o(i._snputc) for _snputc - printfb.o(i.__0sprintf$bare) refers to printfb.o(i._printf_core) for _printf_core - printfb.o(i.__0sprintf$bare) refers to printfb.o(i._sputc) for _sputc - printfb.o(i.__0vfprintf$bare) refers to printfb.o(i._printf_core) for _printf_core - printfb.o(i.__0vfprintf$bare) refers to fputc.o(i.fputc) for fputc - printfb.o(i.__0vprintf$bare) refers to printfb.o(i._printf_core) for _printf_core - printfb.o(i.__0vprintf$bare) refers to fputc.o(i.fputc) for fputc - printfb.o(i.__0vprintf$bare) refers to stdout.o(.data) for __stdout - printfb.o(i.__0vsnprintf$bare) refers to printfb.o(i._printf_core) for _printf_core - printfb.o(i.__0vsnprintf$bare) refers to printfb.o(i._snputc) for _snputc - printfb.o(i.__0vsprintf$bare) refers to printfb.o(i._printf_core) for _printf_core - printfb.o(i.__0vsprintf$bare) refers to printfb.o(i._sputc) for _sputc - printf0.o(i.__0fprintf$0) refers to printf0.o(i._printf_core) for _printf_core - printf0.o(i.__0fprintf$0) refers to fputc.o(i.fputc) for fputc - printf0.o(i.__0printf$0) refers to printf0.o(i._printf_core) for _printf_core - printf0.o(i.__0printf$0) refers to fputc.o(i.fputc) for fputc - printf0.o(i.__0printf$0) refers to stdout.o(.data) for __stdout - printf0.o(i.__0snprintf$0) refers to printf0.o(i._printf_core) for _printf_core - printf0.o(i.__0snprintf$0) refers to printf0.o(i._snputc) for _snputc - printf0.o(i.__0sprintf$0) refers to printf0.o(i._printf_core) for _printf_core - printf0.o(i.__0sprintf$0) refers to printf0.o(i._sputc) for _sputc - printf0.o(i.__0vfprintf$0) refers to printf0.o(i._printf_core) for _printf_core - printf0.o(i.__0vfprintf$0) refers to fputc.o(i.fputc) for fputc - printf0.o(i.__0vprintf$0) refers to printf0.o(i._printf_core) for _printf_core - printf0.o(i.__0vprintf$0) refers to fputc.o(i.fputc) for fputc - printf0.o(i.__0vprintf$0) refers to stdout.o(.data) for __stdout - printf0.o(i.__0vsnprintf$0) refers to printf0.o(i._printf_core) for _printf_core - printf0.o(i.__0vsnprintf$0) refers to printf0.o(i._snputc) for _snputc - printf0.o(i.__0vsprintf$0) refers to printf0.o(i._printf_core) for _printf_core - printf0.o(i.__0vsprintf$0) refers to printf0.o(i._sputc) for _sputc - printf1.o(i.__0fprintf$1) refers to printf1.o(i._printf_core) for _printf_core - printf1.o(i.__0fprintf$1) refers to fputc.o(i.fputc) for fputc - printf1.o(i.__0printf$1) refers to printf1.o(i._printf_core) for _printf_core - printf1.o(i.__0printf$1) refers to fputc.o(i.fputc) for fputc - printf1.o(i.__0printf$1) refers to stdout.o(.data) for __stdout - printf1.o(i.__0snprintf$1) refers to printf1.o(i._printf_core) for _printf_core - printf1.o(i.__0snprintf$1) refers to printf1.o(i._snputc) for _snputc - printf1.o(i.__0sprintf$1) refers to printf1.o(i._printf_core) for _printf_core - printf1.o(i.__0sprintf$1) refers to printf1.o(i._sputc) for _sputc - printf1.o(i.__0vfprintf$1) refers to printf1.o(i._printf_core) for _printf_core - printf1.o(i.__0vfprintf$1) refers to fputc.o(i.fputc) for fputc - printf1.o(i.__0vprintf$1) refers to printf1.o(i._printf_core) for _printf_core - printf1.o(i.__0vprintf$1) refers to fputc.o(i.fputc) for fputc - printf1.o(i.__0vprintf$1) refers to stdout.o(.data) for __stdout - printf1.o(i.__0vsnprintf$1) refers to printf1.o(i._printf_core) for _printf_core - printf1.o(i.__0vsnprintf$1) refers to printf1.o(i._snputc) for _snputc - printf1.o(i.__0vsprintf$1) refers to printf1.o(i._printf_core) for _printf_core - printf1.o(i.__0vsprintf$1) refers to printf1.o(i._sputc) for _sputc - printf1.o(i._printf_core) refers to uidiv.o(.text) for __aeabi_uidivmod - printf2.o(i.__0fprintf$2) refers to printf2.o(i._printf_core) for _printf_core - printf2.o(i.__0fprintf$2) refers to fputc.o(i.fputc) for fputc - printf2.o(i.__0printf$2) refers to printf2.o(i._printf_core) for _printf_core - printf2.o(i.__0printf$2) refers to fputc.o(i.fputc) for fputc - printf2.o(i.__0printf$2) refers to stdout.o(.data) for __stdout - printf2.o(i.__0snprintf$2) refers to printf2.o(i._printf_core) for _printf_core - printf2.o(i.__0snprintf$2) refers to printf2.o(i._snputc) for _snputc - printf2.o(i.__0sprintf$2) refers to printf2.o(i._printf_core) for _printf_core - printf2.o(i.__0sprintf$2) refers to printf2.o(i._sputc) for _sputc - printf2.o(i.__0vfprintf$2) refers to printf2.o(i._printf_core) for _printf_core - printf2.o(i.__0vfprintf$2) refers to fputc.o(i.fputc) for fputc - printf2.o(i.__0vprintf$2) refers to printf2.o(i._printf_core) for _printf_core - printf2.o(i.__0vprintf$2) refers to fputc.o(i.fputc) for fputc - printf2.o(i.__0vprintf$2) refers to stdout.o(.data) for __stdout - printf2.o(i.__0vsnprintf$2) refers to printf2.o(i._printf_core) for _printf_core - printf2.o(i.__0vsnprintf$2) refers to printf2.o(i._snputc) for _snputc - printf2.o(i.__0vsprintf$2) refers to printf2.o(i._printf_core) for _printf_core - printf2.o(i.__0vsprintf$2) refers to printf2.o(i._sputc) for _sputc - printf3.o(i.__0fprintf$3) refers to printf3.o(i._printf_core) for _printf_core - printf3.o(i.__0fprintf$3) refers to fputc.o(i.fputc) for fputc - printf3.o(i.__0printf$3) refers to printf3.o(i._printf_core) for _printf_core - printf3.o(i.__0printf$3) refers to fputc.o(i.fputc) for fputc - printf3.o(i.__0printf$3) refers to stdout.o(.data) for __stdout - printf3.o(i.__0snprintf$3) refers to printf3.o(i._printf_core) for _printf_core - printf3.o(i.__0snprintf$3) refers to printf3.o(i._snputc) for _snputc - printf3.o(i.__0sprintf$3) refers to printf3.o(i._printf_core) for _printf_core - printf3.o(i.__0sprintf$3) refers to printf3.o(i._sputc) for _sputc - printf3.o(i.__0vfprintf$3) refers to printf3.o(i._printf_core) for _printf_core - printf3.o(i.__0vfprintf$3) refers to fputc.o(i.fputc) for fputc - printf3.o(i.__0vprintf$3) refers to printf3.o(i._printf_core) for _printf_core - printf3.o(i.__0vprintf$3) refers to fputc.o(i.fputc) for fputc - printf3.o(i.__0vprintf$3) refers to stdout.o(.data) for __stdout - printf3.o(i.__0vsnprintf$3) refers to printf3.o(i._printf_core) for _printf_core - printf3.o(i.__0vsnprintf$3) refers to printf3.o(i._snputc) for _snputc - printf3.o(i.__0vsprintf$3) refers to printf3.o(i._printf_core) for _printf_core - printf3.o(i.__0vsprintf$3) refers to printf3.o(i._sputc) for _sputc - printf3.o(i._printf_core) refers to uidiv.o(.text) for __aeabi_uidivmod - printf4.o(i.__0fprintf$4) refers to printf4.o(i._printf_core) for _printf_core - printf4.o(i.__0fprintf$4) refers to fputc.o(i.fputc) for fputc - printf4.o(i.__0printf$4) refers to printf4.o(i._printf_core) for _printf_core - printf4.o(i.__0printf$4) refers to fputc.o(i.fputc) for fputc - printf4.o(i.__0printf$4) refers to stdout.o(.data) for __stdout - printf4.o(i.__0snprintf$4) refers to printf4.o(i._printf_core) for _printf_core - printf4.o(i.__0snprintf$4) refers to printf4.o(i._snputc) for _snputc - printf4.o(i.__0sprintf$4) refers to printf4.o(i._printf_core) for _printf_core - printf4.o(i.__0sprintf$4) refers to printf4.o(i._sputc) for _sputc - printf4.o(i.__0vfprintf$4) refers to printf4.o(i._printf_core) for _printf_core - printf4.o(i.__0vfprintf$4) refers to fputc.o(i.fputc) for fputc - printf4.o(i.__0vprintf$4) refers to printf4.o(i._printf_core) for _printf_core - printf4.o(i.__0vprintf$4) refers to fputc.o(i.fputc) for fputc - printf4.o(i.__0vprintf$4) refers to stdout.o(.data) for __stdout - printf4.o(i.__0vsnprintf$4) refers to printf4.o(i._printf_core) for _printf_core - printf4.o(i.__0vsnprintf$4) refers to printf4.o(i._snputc) for _snputc - printf4.o(i.__0vsprintf$4) refers to printf4.o(i._printf_core) for _printf_core - printf4.o(i.__0vsprintf$4) refers to printf4.o(i._sputc) for _sputc - printf4.o(i._printf_core) refers to uldiv.o(.text) for __aeabi_uldivmod - printf5.o(i.__0fprintf$5) refers to printf5.o(i._printf_core) for _printf_core - printf5.o(i.__0fprintf$5) refers to fputc.o(i.fputc) for fputc - printf5.o(i.__0printf$5) refers to printf5.o(i._printf_core) for _printf_core - printf5.o(i.__0printf$5) refers to fputc.o(i.fputc) for fputc - printf5.o(i.__0printf$5) refers to stdout.o(.data) for __stdout - printf5.o(i.__0snprintf$5) refers to printf5.o(i._printf_core) for _printf_core - printf5.o(i.__0snprintf$5) refers to printf5.o(i._snputc) for _snputc - printf5.o(i.__0sprintf$5) refers to printf5.o(i._printf_core) for _printf_core - printf5.o(i.__0sprintf$5) refers to printf5.o(i._sputc) for _sputc - printf5.o(i.__0vfprintf$5) refers to printf5.o(i._printf_core) for _printf_core - printf5.o(i.__0vfprintf$5) refers to fputc.o(i.fputc) for fputc - printf5.o(i.__0vprintf$5) refers to printf5.o(i._printf_core) for _printf_core - printf5.o(i.__0vprintf$5) refers to fputc.o(i.fputc) for fputc - printf5.o(i.__0vprintf$5) refers to stdout.o(.data) for __stdout - printf5.o(i.__0vsnprintf$5) refers to printf5.o(i._printf_core) for _printf_core - printf5.o(i.__0vsnprintf$5) refers to printf5.o(i._snputc) for _snputc - printf5.o(i.__0vsprintf$5) refers to printf5.o(i._printf_core) for _printf_core - printf5.o(i.__0vsprintf$5) refers to printf5.o(i._sputc) for _sputc - printf5.o(i._printf_core) refers to uldiv.o(.text) for __aeabi_uldivmod - printf6.o(i.__0fprintf$6) refers to printf6.o(i._printf_core) for _printf_core - printf6.o(i.__0fprintf$6) refers to fputc.o(i.fputc) for fputc - printf6.o(i.__0printf$6) refers to printf6.o(i._printf_core) for _printf_core - printf6.o(i.__0printf$6) refers to fputc.o(i.fputc) for fputc - printf6.o(i.__0printf$6) refers to stdout.o(.data) for __stdout - printf6.o(i.__0snprintf$6) refers to printf6.o(i._printf_core) for _printf_core - printf6.o(i.__0snprintf$6) refers to printf6.o(i._snputc) for _snputc - printf6.o(i.__0sprintf$6) refers to printf6.o(i._printf_core) for _printf_core - printf6.o(i.__0sprintf$6) refers to printf6.o(i._sputc) for _sputc - printf6.o(i.__0vfprintf$6) refers to printf6.o(i._printf_core) for _printf_core - printf6.o(i.__0vfprintf$6) refers to fputc.o(i.fputc) for fputc - printf6.o(i.__0vprintf$6) refers to printf6.o(i._printf_core) for _printf_core - printf6.o(i.__0vprintf$6) refers to fputc.o(i.fputc) for fputc - printf6.o(i.__0vprintf$6) refers to stdout.o(.data) for __stdout - printf6.o(i.__0vsnprintf$6) refers to printf6.o(i._printf_core) for _printf_core - printf6.o(i.__0vsnprintf$6) refers to printf6.o(i._snputc) for _snputc - printf6.o(i.__0vsprintf$6) refers to printf6.o(i._printf_core) for _printf_core - printf6.o(i.__0vsprintf$6) refers to printf6.o(i._sputc) for _sputc - printf6.o(i._printf_core) refers to printf6.o(i._printf_pre_padding) for _printf_pre_padding - printf6.o(i._printf_core) refers to printf6.o(i._printf_post_padding) for _printf_post_padding - printf6.o(i._printf_core) refers to uidiv.o(.text) for __aeabi_uidivmod - printf7.o(i.__0fprintf$7) refers to printf7.o(i._printf_core) for _printf_core - printf7.o(i.__0fprintf$7) refers to fputc.o(i.fputc) for fputc - printf7.o(i.__0printf$7) refers to printf7.o(i._printf_core) for _printf_core - printf7.o(i.__0printf$7) refers to fputc.o(i.fputc) for fputc - printf7.o(i.__0printf$7) refers to stdout.o(.data) for __stdout - printf7.o(i.__0snprintf$7) refers to printf7.o(i._printf_core) for _printf_core - printf7.o(i.__0snprintf$7) refers to printf7.o(i._snputc) for _snputc - printf7.o(i.__0sprintf$7) refers to printf7.o(i._printf_core) for _printf_core - printf7.o(i.__0sprintf$7) refers to printf7.o(i._sputc) for _sputc - printf7.o(i.__0vfprintf$7) refers to printf7.o(i._printf_core) for _printf_core - printf7.o(i.__0vfprintf$7) refers to fputc.o(i.fputc) for fputc - printf7.o(i.__0vprintf$7) refers to printf7.o(i._printf_core) for _printf_core - printf7.o(i.__0vprintf$7) refers to fputc.o(i.fputc) for fputc - printf7.o(i.__0vprintf$7) refers to stdout.o(.data) for __stdout - printf7.o(i.__0vsnprintf$7) refers to printf7.o(i._printf_core) for _printf_core - printf7.o(i.__0vsnprintf$7) refers to printf7.o(i._snputc) for _snputc - printf7.o(i.__0vsprintf$7) refers to printf7.o(i._printf_core) for _printf_core - printf7.o(i.__0vsprintf$7) refers to printf7.o(i._sputc) for _sputc - printf7.o(i._printf_core) refers to printf7.o(i._printf_pre_padding) for _printf_pre_padding - printf7.o(i._printf_core) refers to printf7.o(i._printf_post_padding) for _printf_post_padding - printf7.o(i._printf_core) refers to uldiv.o(.text) for __aeabi_uldivmod - printf8.o(i.__0fprintf$8) refers to printf8.o(i._printf_core) for _printf_core - printf8.o(i.__0fprintf$8) refers to fputc.o(i.fputc) for fputc - printf8.o(i.__0printf$8) refers to printf8.o(i._printf_core) for _printf_core - printf8.o(i.__0printf$8) refers to fputc.o(i.fputc) for fputc - printf8.o(i.__0printf$8) refers to stdout.o(.data) for __stdout - printf8.o(i.__0snprintf$8) refers to printf8.o(i._printf_core) for _printf_core - printf8.o(i.__0snprintf$8) refers to printf8.o(i._snputc) for _snputc - printf8.o(i.__0sprintf$8) refers to printf8.o(i._printf_core) for _printf_core - printf8.o(i.__0sprintf$8) refers to printf8.o(i._sputc) for _sputc - printf8.o(i.__0vfprintf$8) refers to printf8.o(i._printf_core) for _printf_core - printf8.o(i.__0vfprintf$8) refers to fputc.o(i.fputc) for fputc - printf8.o(i.__0vprintf$8) refers to printf8.o(i._printf_core) for _printf_core - printf8.o(i.__0vprintf$8) refers to fputc.o(i.fputc) for fputc - printf8.o(i.__0vprintf$8) refers to stdout.o(.data) for __stdout - printf8.o(i.__0vsnprintf$8) refers to printf8.o(i._printf_core) for _printf_core - printf8.o(i.__0vsnprintf$8) refers to printf8.o(i._snputc) for _snputc - printf8.o(i.__0vsprintf$8) refers to printf8.o(i._printf_core) for _printf_core - printf8.o(i.__0vsprintf$8) refers to printf8.o(i._sputc) for _sputc - printf8.o(i._printf_core) refers to printf8.o(i._printf_pre_padding) for _printf_pre_padding - printf8.o(i._printf_core) refers to printf8.o(i._printf_post_padding) for _printf_post_padding - printf8.o(i._printf_core) refers to uldiv.o(.text) for __aeabi_uldivmod - printfa.o(i.__0fprintf) refers (Special) to iusefp.o(.text) for __I$use$fp - printfa.o(i.__0fprintf) refers to printfa.o(i._printf_core) for _printf_core - printfa.o(i.__0fprintf) refers to fputc.o(i.fputc) for fputc - printfa.o(i.__0printf) refers (Special) to iusefp.o(.text) for __I$use$fp - printfa.o(i.__0printf) refers to printfa.o(i._printf_core) for _printf_core - printfa.o(i.__0printf) refers to fputc.o(i.fputc) for fputc - printfa.o(i.__0printf) refers to stdout.o(.data) for __stdout - printfa.o(i.__0snprintf) refers (Special) to iusefp.o(.text) for __I$use$fp - printfa.o(i.__0snprintf) refers to printfa.o(i._printf_core) for _printf_core - printfa.o(i.__0snprintf) refers to printfa.o(i._snputc) for _snputc - printfa.o(i.__0sprintf) refers (Special) to iusefp.o(.text) for __I$use$fp - printfa.o(i.__0sprintf) refers to printfa.o(i._printf_core) for _printf_core - printfa.o(i.__0sprintf) refers to printfa.o(i._sputc) for _sputc - printfa.o(i.__0vfprintf) refers (Special) to iusefp.o(.text) for __I$use$fp - printfa.o(i.__0vfprintf) refers to printfa.o(i._printf_core) for _printf_core - printfa.o(i.__0vfprintf) refers to fputc.o(i.fputc) for fputc - printfa.o(i.__0vprintf) refers (Special) to iusefp.o(.text) for __I$use$fp - printfa.o(i.__0vprintf) refers to printfa.o(i._printf_core) for _printf_core - printfa.o(i.__0vprintf) refers to fputc.o(i.fputc) for fputc - printfa.o(i.__0vprintf) refers to stdout.o(.data) for __stdout - printfa.o(i.__0vsnprintf) refers (Special) to iusefp.o(.text) for __I$use$fp - printfa.o(i.__0vsnprintf) refers to printfa.o(i._printf_core) for _printf_core - printfa.o(i.__0vsnprintf) refers to printfa.o(i._snputc) for _snputc - printfa.o(i.__0vsprintf) refers (Special) to iusefp.o(.text) for __I$use$fp - printfa.o(i.__0vsprintf) refers to printfa.o(i._printf_core) for _printf_core - printfa.o(i.__0vsprintf) refers to printfa.o(i._sputc) for _sputc - printfa.o(i._fp_digits) refers (Special) to iusefp.o(.text) for __I$use$fp - printfa.o(i._fp_digits) refers to dmul.o(.text) for __aeabi_dmul - printfa.o(i._fp_digits) refers to ddiv.o(.text) for __aeabi_ddiv - printfa.o(i._fp_digits) refers to cdrcmple.o(.text) for __aeabi_cdrcmple - printfa.o(i._fp_digits) refers to dadd.o(.text) for __aeabi_dadd - printfa.o(i._fp_digits) refers to dfixul.o(.text) for __aeabi_d2ulz - printfa.o(i._fp_digits) refers to uldiv.o(.text) for __aeabi_uldivmod - printfa.o(i._printf_core) refers (Special) to iusefp.o(.text) for __I$use$fp - printfa.o(i._printf_core) refers to printfa.o(i._printf_pre_padding) for _printf_pre_padding - printfa.o(i._printf_core) refers to uldiv.o(.text) for __aeabi_uldivmod - printfa.o(i._printf_core) refers to printfa.o(i._printf_post_padding) for _printf_post_padding - printfa.o(i._printf_core) refers to printfa.o(i._fp_digits) for _fp_digits - printfa.o(i._printf_core) refers to uidiv.o(.text) for __aeabi_uidivmod - printfa.o(i._printf_post_padding) refers (Special) to iusefp.o(.text) for __I$use$fp - printfa.o(i._printf_pre_padding) refers (Special) to iusefp.o(.text) for __I$use$fp - printfa.o(i._snputc) refers (Special) to iusefp.o(.text) for __I$use$fp - printfa.o(i._sputc) refers (Special) to iusefp.o(.text) for __I$use$fp - entry2.o(.ARM.Collect$$$$00000001) refers to entry2.o(.ARM.Collect$$$$00002712) for __lit__00000000 - entry2.o(.ARM.Collect$$$$00002712) refers to startup_stm32f030x8.o(STACK) for __initial_sp - entry2.o(__vectab_stack_and_reset_area) refers to startup_stm32f030x8.o(STACK) for __initial_sp - entry2.o(__vectab_stack_and_reset_area) refers to entry.o(.ARM.Collect$$$$00000000) for __main - entry5.o(.ARM.Collect$$$$00000004) refers to init.o(.text) for __scatterload - entry9a.o(.ARM.Collect$$$$0000000B) refers to main.o(i.main) for main - entry9b.o(.ARM.Collect$$$$0000000C) refers to main.o(i.main) for main - fputc.o(i.fputc) refers (Special) to iusesemip.o(.text) for __I$use$semihosting$fputc - fputc.o(i.fputc) refers (Special) to semi.o(.text) for __semihosting_library_function - uldiv.o(.text) refers to llushr.o(.text) for __aeabi_llsr - uldiv.o(.text) refers to llshl.o(.text) for __aeabi_llsl - dadd.o(.text) refers to llshl.o(.text) for __aeabi_llsl - dadd.o(.text) refers to llsshr.o(.text) for __aeabi_lasr - dadd.o(.text) refers to depilogue.o(.text) for _double_epilogue - dmul.o(.text) refers to depilogue.o(.text) for _double_epilogue - ddiv.o(.text) refers to depilogue.o(.text) for _double_round - dfixul.o(.text) refers to llushr.o(.text) for __aeabi_llsr - dfixul.o(.text) refers to llshl.o(.text) for __aeabi_llsl - init.o(.text) refers to entry5.o(.ARM.Collect$$$$00000004) for __main_after_scatterload - depilogue.o(.text) refers to depilogue.o(i.__ARM_clz) for __ARM_clz - depilogue.o(.text) refers to llshl.o(.text) for __aeabi_llsl - depilogue.o(.text) refers to llushr.o(.text) for __aeabi_llsr - functions.o(i.GetuS) refers to functions.o(.data) for .data - functions.o(i.GetTick) refers to functions.o(.data) for .data - - -============================================================================== - -Removing Unused input sections from the image. - - Removing startup_stm32f030x8.o(HEAP), (512 bytes). - Removing debug.o(.rev16_text), (4 bytes). - Removing debug.o(.revsh_text), (4 bytes). - Removing debug.o(i.ADCProcess), (240 bytes). - Removing debug.o(i.FormatHex), (56 bytes). - Removing debug.o(i.PowerDownProcess), (48 bytes). - Removing debug.o(i.PowerRecoverProcess), (16 bytes). - Removing debug.o(i.ShowRunningInfo), (220 bytes). - Removing debug.o(.conststring), (67 bytes). - Removing debug.o(.data), (4 bytes). - Removing functions.o(.rev16_text), (4 bytes). - Removing functions.o(.revsh_text), (4 bytes). - Removing functions.o(i.DelayUs), (30 bytes). - Removing functions.o(i.Enable595), (20 bytes). - Removing functions.o(i.EnableDisIn), (24 bytes). - Removing functions.o(i.GetInput), (4 bytes). - Removing functions.o(i.Input165), (60 bytes). - Removing functions.o(i.Input165Cfg), (60 bytes). - Removing functions.o(i.Input165_8), (52 bytes). - Removing functions.o(i.Input165_R), (80 bytes). - Removing functions.o(i.Output595_16), (48 bytes). - Removing functions.o(i.Output595_8), (48 bytes). - Removing functions.o(i.PutOutput), (2 bytes). - Removing functions.o(i.PutOutputSPI2), (96 bytes). - Removing functions.o(i.ReadConfig_0), (4 bytes). - Removing functions.o(i.ReadConfig_1), (28 bytes). - Removing functions.o(i.ReadConfig_11), (24 bytes). - Removing functions.o(i.ReadConfig_2), (28 bytes). - Removing functions.o(i.ReadConfig_3), (12 bytes). - Removing functions.o(i.ReadConfig_4), (12 bytes). - Removing functions.o(i.ReadConfig_5), (12 bytes). - Removing functions.o(i.ToggleErr2Led), (20 bytes). - Removing functions.o(i.ToggleErrLed), (20 bytes). - Removing functions.o(i.ToggleOutStat), (20 bytes). - Removing functions.o(i.ToggleRunLed), (20 bytes). - Removing functions.o(i.TriggerPendSV), (16 bytes). - Removing functions.o(i.Uart2SetDE), (10 bytes). - Removing functions.o(i.Uart2TriggerSendDMA), (48 bytes). - Removing functions.o(i.Uart2UnsetDE), (10 bytes). - Removing functions.o(i.displayInput), (52 bytes). - Removing functions.o(i.modbuscrc16test), (112 bytes). - Removing functions.o(.constdata), (2 bytes). - Removing functions.o(.conststring), (229 bytes). - Removing globaldef.o(.bss), (128 bytes). - Removing globaldef.o(.bss), (128 bytes). - Removing globaldef.o(.data), (4 bytes). - Removing globaldef.o(.data), (4 bytes). - Removing globaldef.o(.data), (4 bytes). - Removing globaldef.o(.data), (4 bytes). - Removing globaldef.o(.data), (4 bytes). - Removing globaldef.o(.data), (4 bytes). - Removing globaldef.o(.data), (4 bytes). - Removing kbus.o(.rev16_text), (4 bytes). - Removing kbus.o(.revsh_text), (4 bytes). - Removing kbus.o(i.KBusDataPoll), (4 bytes). - Removing kbus.o(i.KBusLoopProcess), (4 bytes). - Removing kbus.o(i.KBusRepeaterFunc), (48 bytes). - Removing kbus.o(i.KBusStart), (4 bytes). - Removing kbus.o(i.KBusUpdateChildInfo), (52 bytes). - Removing kbus.o(.bss), (64 bytes). - Removing kbus.o(.data), (1 bytes). - Removing kbus.o(.data), (4 bytes). - Removing kbus.o(.data), (4 bytes). - Removing kbus.o(.data), (4 bytes). - Removing kbus.o(.data), (4 bytes). - Removing kbus.o(.data), (4 bytes). - Removing klink.o(.rev16_text), (4 bytes). - Removing klink.o(.revsh_text), (4 bytes). - Removing klink.o(.bss), (16 bytes). - Removing klink.o(.bss), (256 bytes). - Removing klink.o(.data), (1 bytes). - Removing modbusrtu.o(i.ModBusCRC16), (4 bytes). - Removing modbusrtu.o(i.mkReqPkg), (4 bytes). - Removing myqueue.o(i.CopyData), (54 bytes). - Removing myqueue.o(i.EmptyQueue), (18 bytes). - Removing myqueue.o(i.PopOne), (28 bytes). - Removing myqueue.o(i.PopOut), (22 bytes). - Removing myqueue.o(i.PushOne), (34 bytes). - Removing plcfunctions.o(.rev16_text), (4 bytes). - Removing plcfunctions.o(.revsh_text), (4 bytes). - Removing plcfunctions.o(i.GetTimerEV), (28 bytes). - Removing plcfunctions.o(i.GetTimerSV), (28 bytes). - Removing plcfunctions.o(i.IsTimerOn), (36 bytes). - Removing plcfunctions.o(i.ResetTimer), (64 bytes). - Removing plcfunctions.o(i.SetTimerValue), (52 bytes). - Removing plcfunctions.o(.constdata), (604 bytes). - Removing stm32f0xx_hal_msp.o(.rev16_text), (4 bytes). - Removing stm32f0xx_hal_msp.o(.revsh_text), (4 bytes). - Removing kmachine.o(.rev16_text), (4 bytes). - Removing kmachine.o(.revsh_text), (4 bytes). - Removing kmachine.o(i.CheckSavedData), (4 bytes). - Removing kmachine.o(i.LoadDefaultRunStat), (8 bytes). - Removing kmachine.o(i.LoadFlashDatas), (12 bytes). - Removing kmachine.o(i.ReadFactoryData), (20 bytes). - Removing kmachine.o(i.ReadProgram), (52 bytes). - Removing kmachine.o(i.is_pow_of_2), (14 bytes). - Removing kmachine.o(i.next_pow_of_2), (40 bytes). - Removing kmachine.o(.data), (4 bytes). - Removing kmachine.o(.data), (4 bytes). - Removing kmachine.o(.data), (4 bytes). - Removing kmachine.o(.data), (4 bytes). - Removing bsp.o(.rev16_text), (4 bytes). - Removing bsp.o(.revsh_text), (4 bytes). - Removing bsp.o(i.MX_ADC_Init), (164 bytes). - Removing bsp.o(i.MX_SPI2_Init), (180 bytes). - Removing stm32f0xx_it.o(.rev16_text), (4 bytes). - Removing stm32f0xx_it.o(.revsh_text), (4 bytes). - Removing main.o(.rev16_text), (4 bytes). - Removing main.o(.revsh_text), (4 bytes). - Removing main.o(i.HexToInt), (40 bytes). - Removing main.o(.constdata), (34 bytes). - Removing fpx.o(.rev16_text), (4 bytes). - Removing fpx.o(.revsh_text), (4 bytes). - Removing fpx.o(i.FPxChecPkt), (4 bytes). - Removing fpx.o(.data), (1 bytes). - Removing fpx.o(.data), (1 bytes). - Removing system_stm32f0xx.o(.rev16_text), (4 bytes). - Removing system_stm32f0xx.o(.revsh_text), (4 bytes). - Removing system_stm32f0xx.o(i.SystemCoreClockUpdate), (120 bytes). - Removing stm32f0xx_ll_gpio.o(.rev16_text), (4 bytes). - Removing stm32f0xx_ll_gpio.o(.revsh_text), (4 bytes). - Removing stm32f0xx_ll_gpio.o(i.LL_AHB1_GRP1_ForceReset), (16 bytes). - Removing stm32f0xx_ll_gpio.o(i.LL_AHB1_GRP1_ReleaseReset), (16 bytes). - Removing stm32f0xx_ll_gpio.o(i.LL_GPIO_DeInit), (96 bytes). - Removing stm32f0xx_ll_gpio.o(i.LL_GPIO_StructInit), (24 bytes). - Removing stm32f0xx_ll_exti.o(.rev16_text), (4 bytes). - Removing stm32f0xx_ll_exti.o(.revsh_text), (4 bytes). - Removing stm32f0xx_ll_exti.o(i.LL_EXTI_DeInit), (36 bytes). - Removing stm32f0xx_ll_exti.o(i.LL_EXTI_Init), (160 bytes). - Removing stm32f0xx_ll_exti.o(i.LL_EXTI_StructInit), (14 bytes). - Removing stm32f0xx_ll_adc.o(.rev16_text), (4 bytes). - Removing stm32f0xx_ll_adc.o(.revsh_text), (4 bytes). - Removing stm32f0xx_ll_adc.o(i.LL_ADC_CommonDeInit), (28 bytes). - Removing stm32f0xx_ll_adc.o(i.LL_ADC_DeInit), (192 bytes). - Removing stm32f0xx_ll_adc.o(i.LL_ADC_Init), (44 bytes). - Removing stm32f0xx_ll_adc.o(i.LL_ADC_REG_Init), (48 bytes). - Removing stm32f0xx_ll_adc.o(i.LL_ADC_REG_StructInit), (18 bytes). - Removing stm32f0xx_ll_adc.o(i.LL_ADC_StructInit), (16 bytes). - Removing stm32f0xx_ll_dma.o(.rev16_text), (4 bytes). - Removing stm32f0xx_ll_dma.o(.revsh_text), (4 bytes). - Removing stm32f0xx_ll_dma.o(i.LL_DMA_DeInit), (136 bytes). - Removing stm32f0xx_ll_dma.o(i.LL_DMA_Init), (92 bytes). - Removing stm32f0xx_ll_dma.o(i.LL_DMA_StructInit), (24 bytes). - Removing stm32f0xx_ll_dma.o(.constdata), (5 bytes). - Removing stm32f0xx_ll_spi.o(.rev16_text), (4 bytes). - Removing stm32f0xx_ll_spi.o(.revsh_text), (4 bytes). - Removing stm32f0xx_ll_spi.o(i.LL_SPI_DeInit), (64 bytes). - Removing stm32f0xx_ll_spi.o(i.LL_SPI_StructInit), (30 bytes). - Removing stm32f0xx_hal_tim.o(.rev16_text), (4 bytes). - Removing stm32f0xx_hal_tim.o(.revsh_text), (4 bytes). - Removing stm32f0xx_hal_tim_ex.o(.rev16_text), (4 bytes). - Removing stm32f0xx_hal_tim_ex.o(.revsh_text), (4 bytes). - Removing stm32f0xx_ll_usart.o(.rev16_text), (4 bytes). - Removing stm32f0xx_ll_usart.o(.revsh_text), (4 bytes). - Removing stm32f0xx_ll_usart.o(i.LL_USART_ClockInit), (60 bytes). - Removing stm32f0xx_ll_usart.o(i.LL_USART_ClockStructInit), (12 bytes). - Removing stm32f0xx_ll_usart.o(i.LL_USART_DeInit), (68 bytes). - Removing stm32f0xx_ll_usart.o(i.LL_USART_StructInit), (24 bytes). - Removing stm32f0xx_ll_rcc.o(.rev16_text), (4 bytes). - Removing stm32f0xx_ll_rcc.o(.revsh_text), (4 bytes). - Removing stm32f0xx_ll_rcc.o(i.LL_RCC_DeInit), (100 bytes). - Removing stm32f0xx_ll_rcc.o(i.LL_RCC_GetI2CClockFreq), (48 bytes). - Removing stm32f0xx_hal_rcc.o(.rev16_text), (4 bytes). - Removing stm32f0xx_hal_rcc.o(.revsh_text), (4 bytes). - Removing stm32f0xx_hal_rcc.o(i.HAL_RCC_CSSCallback), (2 bytes). - Removing stm32f0xx_hal_rcc.o(i.HAL_RCC_DeInit), (76 bytes). - Removing stm32f0xx_hal_rcc.o(i.HAL_RCC_DisableCSS), (20 bytes). - Removing stm32f0xx_hal_rcc.o(i.HAL_RCC_EnableCSS), (20 bytes). - Removing stm32f0xx_hal_rcc.o(i.HAL_RCC_GetClockConfig), (56 bytes). - Removing stm32f0xx_hal_rcc.o(i.HAL_RCC_GetOscConfig), (156 bytes). - Removing stm32f0xx_hal_rcc.o(i.HAL_RCC_GetPCLK1Freq), (32 bytes). - Removing stm32f0xx_hal_rcc.o(i.HAL_RCC_MCOConfig), (76 bytes). - Removing stm32f0xx_hal_rcc.o(i.HAL_RCC_NMI_IRQHandler), (24 bytes). - Removing stm32f0xx_hal_rcc_ex.o(.rev16_text), (4 bytes). - Removing stm32f0xx_hal_rcc_ex.o(.revsh_text), (4 bytes). - Removing stm32f0xx_hal_rcc_ex.o(i.HAL_RCCEx_GetPeriphCLKConfig), (44 bytes). - Removing stm32f0xx_hal_rcc_ex.o(i.HAL_RCCEx_GetPeriphCLKFreq), (164 bytes). - Removing stm32f0xx_hal.o(.rev16_text), (4 bytes). - Removing stm32f0xx_hal.o(.revsh_text), (4 bytes). - Removing stm32f0xx_hal.o(i.HAL_DBGMCU_DisableDBGStandbyMode), (16 bytes). - Removing stm32f0xx_hal.o(i.HAL_DBGMCU_DisableDBGStopMode), (16 bytes). - Removing stm32f0xx_hal.o(i.HAL_DBGMCU_EnableDBGStandbyMode), (16 bytes). - Removing stm32f0xx_hal.o(i.HAL_DBGMCU_EnableDBGStopMode), (16 bytes). - Removing stm32f0xx_hal.o(i.HAL_DeInit), (36 bytes). - Removing stm32f0xx_hal.o(i.HAL_GetDEVID), (16 bytes). - Removing stm32f0xx_hal.o(i.HAL_GetHalVersion), (8 bytes). - Removing stm32f0xx_hal.o(i.HAL_GetREVID), (12 bytes). - Removing stm32f0xx_hal.o(i.HAL_GetUIDw0), (12 bytes). - Removing stm32f0xx_hal.o(i.HAL_GetUIDw1), (12 bytes). - Removing stm32f0xx_hal.o(i.HAL_GetUIDw2), (12 bytes). - Removing stm32f0xx_hal.o(i.HAL_MspDeInit), (2 bytes). - Removing stm32f0xx_hal.o(i.HAL_MspInit), (2 bytes). - Removing stm32f0xx_hal.o(i.HAL_ResumeTick), (16 bytes). - Removing stm32f0xx_hal.o(i.HAL_SuspendTick), (16 bytes). - Removing stm32f0xx_hal_i2c.o(.rev16_text), (4 bytes). - Removing stm32f0xx_hal_i2c.o(.revsh_text), (4 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_AbortCpltCallback), (2 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_AddrCallback), (2 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_DeInit), (48 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_DisableListen_IT), (48 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_ER_IRQHandler), (88 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_EV_IRQHandler), (16 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_EnableListen_IT), (40 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_ErrorCallback), (2 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_GetError), (4 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_GetMode), (6 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_GetState), (6 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_Init), (180 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_IsDeviceReady), (284 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_ListenCpltCallback), (2 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_MasterRxCpltCallback), (2 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_MasterTxCpltCallback), (2 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Abort_IT), (88 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Receive), (280 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Receive_DMA), (236 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Receive_IT), (124 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Sequential_Receive_IT), (116 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Sequential_Transmit_IT), (116 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Transmit), (280 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Transmit_DMA), (240 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_Master_Transmit_IT), (124 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_MemRxCpltCallback), (2 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_MemTxCpltCallback), (2 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Read), (344 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Read_DMA), (248 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Read_IT), (188 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Write), (340 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Write_DMA), (244 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_Mem_Write_IT), (184 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_MspDeInit), (2 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_MspInit), (2 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_SlaveRxCpltCallback), (2 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_SlaveTxCpltCallback), (2 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Receive), (292 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Receive_DMA), (156 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Receive_IT), (88 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Sequential_Receive_IT), (144 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Sequential_Transmit_IT), (144 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Transmit), (300 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Transmit_DMA), (156 bytes). - Removing stm32f0xx_hal_i2c.o(i.HAL_I2C_Slave_Transmit_IT), (88 bytes). - Removing stm32f0xx_hal_i2c.o(i.I2C_DMAAbort), (52 bytes). - Removing stm32f0xx_hal_i2c.o(i.I2C_DMAError), (24 bytes). - Removing stm32f0xx_hal_i2c.o(i.I2C_DMAMasterReceiveCplt), (68 bytes). - Removing stm32f0xx_hal_i2c.o(i.I2C_DMAMasterTransmitCplt), (68 bytes). - Removing stm32f0xx_hal_i2c.o(i.I2C_DMASlaveReceiveCplt), (2 bytes). - Removing stm32f0xx_hal_i2c.o(i.I2C_DMASlaveTransmitCplt), (2 bytes). - Removing stm32f0xx_hal_i2c.o(i.I2C_Disable_IRQ), (86 bytes). - Removing stm32f0xx_hal_i2c.o(i.I2C_Enable_IRQ), (100 bytes). - Removing stm32f0xx_hal_i2c.o(i.I2C_Flush_TXDR), (34 bytes). - Removing stm32f0xx_hal_i2c.o(i.I2C_ITAddrCplt), (122 bytes). - Removing stm32f0xx_hal_i2c.o(i.I2C_ITError), (204 bytes). - Removing stm32f0xx_hal_i2c.o(i.I2C_ITListenCplt), (92 bytes). - Removing stm32f0xx_hal_i2c.o(i.I2C_ITMasterCplt), (160 bytes). - Removing stm32f0xx_hal_i2c.o(i.I2C_ITMasterSequentialCplt), (70 bytes). - Removing stm32f0xx_hal_i2c.o(i.I2C_ITSlaveCplt), (232 bytes). - Removing stm32f0xx_hal_i2c.o(i.I2C_ITSlaveSequentialCplt), (74 bytes). - Removing stm32f0xx_hal_i2c.o(i.I2C_IsAcknowledgeFailed), (116 bytes). - Removing stm32f0xx_hal_i2c.o(i.I2C_Master_ISR_DMA), (194 bytes). - Removing stm32f0xx_hal_i2c.o(i.I2C_Master_ISR_IT), (296 bytes). - Removing stm32f0xx_hal_i2c.o(i.I2C_RequestMemoryRead), (106 bytes). - Removing stm32f0xx_hal_i2c.o(i.I2C_RequestMemoryWrite), (106 bytes). - Removing stm32f0xx_hal_i2c.o(i.I2C_Slave_ISR_DMA), (104 bytes). - Removing stm32f0xx_hal_i2c.o(i.I2C_Slave_ISR_IT), (280 bytes). - Removing stm32f0xx_hal_i2c.o(i.I2C_TransferConfig), (36 bytes). - Removing stm32f0xx_hal_i2c.o(i.I2C_WaitOnFlagUntilTimeout), (72 bytes). - Removing stm32f0xx_hal_i2c.o(i.I2C_WaitOnRXNEFlagUntilTimeout), (120 bytes). - Removing stm32f0xx_hal_i2c.o(i.I2C_WaitOnSTOPFlagUntilTimeout), (78 bytes). - Removing stm32f0xx_hal_i2c.o(i.I2C_WaitOnTXISFlagUntilTimeout), (82 bytes). - Removing stm32f0xx_hal_i2c_ex.o(.rev16_text), (4 bytes). - Removing stm32f0xx_hal_i2c_ex.o(.revsh_text), (4 bytes). - Removing stm32f0xx_hal_i2c_ex.o(i.HAL_I2CEx_ConfigAnalogFilter), (74 bytes). - Removing stm32f0xx_hal_i2c_ex.o(i.HAL_I2CEx_ConfigDigitalFilter), (72 bytes). - Removing stm32f0xx_hal_i2c_ex.o(i.HAL_I2CEx_DisableFastModePlus), (36 bytes). - Removing stm32f0xx_hal_i2c_ex.o(i.HAL_I2CEx_EnableFastModePlus), (36 bytes). - Removing stm32f0xx_hal_gpio.o(.rev16_text), (4 bytes). - Removing stm32f0xx_hal_gpio.o(.revsh_text), (4 bytes). - Removing stm32f0xx_hal_gpio.o(i.HAL_GPIO_DeInit), (208 bytes). - Removing stm32f0xx_hal_gpio.o(i.HAL_GPIO_EXTI_Callback), (2 bytes). - Removing stm32f0xx_hal_gpio.o(i.HAL_GPIO_EXTI_IRQHandler), (24 bytes). - Removing stm32f0xx_hal_gpio.o(i.HAL_GPIO_Init), (328 bytes). - Removing stm32f0xx_hal_gpio.o(i.HAL_GPIO_LockPin), (36 bytes). - Removing stm32f0xx_hal_gpio.o(i.HAL_GPIO_ReadPin), (10 bytes). - Removing stm32f0xx_hal_gpio.o(i.HAL_GPIO_TogglePin), (8 bytes). - Removing stm32f0xx_hal_gpio.o(i.HAL_GPIO_WritePin), (12 bytes). - Removing stm32f0xx_hal_dma.o(.rev16_text), (4 bytes). - Removing stm32f0xx_hal_dma.o(.revsh_text), (4 bytes). - Removing stm32f0xx_hal_dma.o(i.DMA_CalcBaseAndBitshift), (36 bytes). - Removing stm32f0xx_hal_dma.o(i.DMA_SetConfig), (40 bytes). - Removing stm32f0xx_hal_dma.o(i.HAL_DMA_Abort), (44 bytes). - Removing stm32f0xx_hal_dma.o(i.HAL_DMA_Abort_IT), (72 bytes). - Removing stm32f0xx_hal_dma.o(i.HAL_DMA_DeInit), (66 bytes). - Removing stm32f0xx_hal_dma.o(i.HAL_DMA_GetError), (4 bytes). - Removing stm32f0xx_hal_dma.o(i.HAL_DMA_GetState), (6 bytes). - Removing stm32f0xx_hal_dma.o(i.HAL_DMA_IRQHandler), (156 bytes). - Removing stm32f0xx_hal_dma.o(i.HAL_DMA_Init), (88 bytes). - Removing stm32f0xx_hal_dma.o(i.HAL_DMA_PollForTransfer), (172 bytes). - Removing stm32f0xx_hal_dma.o(i.HAL_DMA_RegisterCallback), (72 bytes). - Removing stm32f0xx_hal_dma.o(i.HAL_DMA_Start), (74 bytes). - Removing stm32f0xx_hal_dma.o(i.HAL_DMA_Start_IT), (106 bytes). - Removing stm32f0xx_hal_dma.o(i.HAL_DMA_UnRegisterCallback), (78 bytes). - Removing stm32f0xx_hal_cortex.o(.rev16_text), (4 bytes). - Removing stm32f0xx_hal_cortex.o(.revsh_text), (4 bytes). - Removing stm32f0xx_hal_cortex.o(i.HAL_NVIC_ClearPendingIRQ), (20 bytes). - Removing stm32f0xx_hal_cortex.o(i.HAL_NVIC_DisableIRQ), (20 bytes). - Removing stm32f0xx_hal_cortex.o(i.HAL_NVIC_EnableIRQ), (20 bytes). - Removing stm32f0xx_hal_cortex.o(i.HAL_NVIC_GetPendingIRQ), (28 bytes). - Removing stm32f0xx_hal_cortex.o(i.HAL_NVIC_GetPriority), (52 bytes). - Removing stm32f0xx_hal_cortex.o(i.HAL_NVIC_SetPendingIRQ), (20 bytes). - Removing stm32f0xx_hal_cortex.o(i.HAL_NVIC_SystemReset), (28 bytes). - Removing stm32f0xx_hal_cortex.o(i.HAL_SYSTICK_Callback), (2 bytes). - Removing stm32f0xx_hal_pwr.o(.rev16_text), (4 bytes). - Removing stm32f0xx_hal_pwr.o(.revsh_text), (4 bytes). - Removing stm32f0xx_hal_pwr.o(i.HAL_PWR_DeInit), (24 bytes). - Removing stm32f0xx_hal_pwr.o(i.HAL_PWR_DisableBkUpAccess), (16 bytes). - Removing stm32f0xx_hal_pwr.o(i.HAL_PWR_DisableSEVOnPend), (16 bytes). - Removing stm32f0xx_hal_pwr.o(i.HAL_PWR_DisableSleepOnExit), (16 bytes). - Removing stm32f0xx_hal_pwr.o(i.HAL_PWR_DisableWakeUpPin), (16 bytes). - Removing stm32f0xx_hal_pwr.o(i.HAL_PWR_EnableBkUpAccess), (16 bytes). - Removing stm32f0xx_hal_pwr.o(i.HAL_PWR_EnableSEVOnPend), (16 bytes). - Removing stm32f0xx_hal_pwr.o(i.HAL_PWR_EnableSleepOnExit), (16 bytes). - Removing stm32f0xx_hal_pwr.o(i.HAL_PWR_EnableWakeUpPin), (16 bytes). - Removing stm32f0xx_hal_pwr.o(i.HAL_PWR_EnterSLEEPMode), (32 bytes). - Removing stm32f0xx_hal_pwr.o(i.HAL_PWR_EnterSTANDBYMode), (32 bytes). - Removing stm32f0xx_hal_pwr.o(i.HAL_PWR_EnterSTOPMode), (52 bytes). - Removing stm32f0xx_hal_pwr_ex.o(.rev16_text), (4 bytes). - Removing stm32f0xx_hal_pwr_ex.o(.revsh_text), (4 bytes). - Removing stm32f0xx_hal_flash.o(.rev16_text), (4 bytes). - Removing stm32f0xx_hal_flash.o(.revsh_text), (4 bytes). - Removing stm32f0xx_hal_flash.o(i.FLASH_Program_HalfWord), (32 bytes). - Removing stm32f0xx_hal_flash.o(i.FLASH_SetErrorCode), (56 bytes). - Removing stm32f0xx_hal_flash.o(i.FLASH_WaitForLastOperation), (80 bytes). - Removing stm32f0xx_hal_flash.o(i.HAL_FLASH_EndOfOperationCallback), (2 bytes). - Removing stm32f0xx_hal_flash.o(i.HAL_FLASH_GetError), (12 bytes). - Removing stm32f0xx_hal_flash.o(i.HAL_FLASH_IRQHandler), (268 bytes). - Removing stm32f0xx_hal_flash.o(i.HAL_FLASH_Lock), (20 bytes). - Removing stm32f0xx_hal_flash.o(i.HAL_FLASH_OB_Launch), (32 bytes). - Removing stm32f0xx_hal_flash.o(i.HAL_FLASH_OB_Lock), (20 bytes). - Removing stm32f0xx_hal_flash.o(i.HAL_FLASH_OB_Unlock), (36 bytes). - Removing stm32f0xx_hal_flash.o(i.HAL_FLASH_OperationErrorCallback), (2 bytes). - Removing stm32f0xx_hal_flash.o(i.HAL_FLASH_Program), (124 bytes). - Removing stm32f0xx_hal_flash.o(i.HAL_FLASH_Program_IT), (96 bytes). - Removing stm32f0xx_hal_flash.o(i.HAL_FLASH_Unlock), (36 bytes). - Removing stm32f0xx_hal_flash.o(.bss), (32 bytes). - Removing stm32f0xx_hal_flash_ex.o(.rev16_text), (4 bytes). - Removing stm32f0xx_hal_flash_ex.o(.revsh_text), (4 bytes). - Removing stm32f0xx_hal_flash_ex.o(i.FLASH_MassErase), (36 bytes). - Removing stm32f0xx_hal_flash_ex.o(i.FLASH_OB_DisableWRP), (108 bytes). - Removing stm32f0xx_hal_flash_ex.o(i.FLASH_OB_EnableWRP), (108 bytes). - Removing stm32f0xx_hal_flash_ex.o(i.FLASH_OB_GetRDP), (32 bytes). - Removing stm32f0xx_hal_flash_ex.o(i.FLASH_OB_RDP_LevelConfig), (96 bytes). - Removing stm32f0xx_hal_flash_ex.o(i.FLASH_PageErase), (36 bytes). - Removing stm32f0xx_hal_flash_ex.o(i.HAL_FLASHEx_Erase), (160 bytes). - Removing stm32f0xx_hal_flash_ex.o(i.HAL_FLASHEx_Erase_IT), (88 bytes). - Removing stm32f0xx_hal_flash_ex.o(i.HAL_FLASHEx_OBErase), (80 bytes). - Removing stm32f0xx_hal_flash_ex.o(i.HAL_FLASHEx_OBGetConfig), (36 bytes). - Removing stm32f0xx_hal_flash_ex.o(i.HAL_FLASHEx_OBGetUserData), (28 bytes). - Removing stm32f0xx_hal_flash_ex.o(i.HAL_FLASHEx_OBProgram), (204 bytes). - Removing stm32f0xx_ll_utils.o(.rev16_text), (4 bytes). - Removing stm32f0xx_ll_utils.o(.revsh_text), (4 bytes). - Removing stm32f0xx_ll_utils.o(i.LL_Init1msTick), (32 bytes). - Removing stm32f0xx_ll_utils.o(i.LL_PLL_ConfigSystemClock_HSE), (104 bytes). - Removing stm32f0xx_ll_utils.o(i.LL_PLL_ConfigSystemClock_HSI), (84 bytes). - Removing stm32f0xx_ll_utils.o(i.LL_RCC_PLL_ConfigDomain_SYS), (44 bytes). - Removing stm32f0xx_ll_utils.o(i.LL_SetSystemCoreClock), (12 bytes). - Removing stm32f0xx_ll_utils.o(i.LL_mDelay), (32 bytes). - Removing stm32f0xx_ll_utils.o(i.UTILS_EnablePLLAndSwitchSystem), (152 bytes). - Removing stm32f0xx_ll_utils.o(i.UTILS_GetPLLOutputFrequency), (24 bytes). - Removing stm32f0xx_ll_utils.o(i.UTILS_PLL_IsBusy), (20 bytes). - Removing stm32f0xx_ll_utils.o(i.UTILS_SetFlashLatency), (52 bytes). - Removing stm32f0xx_ll_tim.o(.rev16_text), (4 bytes). - Removing stm32f0xx_ll_tim.o(.revsh_text), (4 bytes). - Removing stm32f0xx_ll_tim.o(i.LL_APB1_GRP2_ForceReset), (16 bytes). - Removing stm32f0xx_ll_tim.o(i.LL_APB1_GRP2_ReleaseReset), (16 bytes). - Removing stm32f0xx_ll_tim.o(i.LL_TIM_BDTR_Init), (74 bytes). - Removing stm32f0xx_ll_tim.o(i.LL_TIM_BDTR_StructInit), (18 bytes). - Removing stm32f0xx_ll_tim.o(i.LL_TIM_DeInit), (156 bytes). - Removing stm32f0xx_ll_tim.o(i.LL_TIM_ENCODER_Init), (96 bytes). - Removing stm32f0xx_ll_tim.o(i.LL_TIM_ENCODER_StructInit), (28 bytes). - Removing stm32f0xx_ll_tim.o(i.LL_TIM_HALLSENSOR_Init), (88 bytes). - Removing stm32f0xx_ll_tim.o(i.LL_TIM_HALLSENSOR_StructInit), (12 bytes). - Removing stm32f0xx_ll_tim.o(i.LL_TIM_IC_Init), (218 bytes). - Removing stm32f0xx_ll_tim.o(i.LL_TIM_IC_StructInit), (14 bytes). - Removing stm32f0xx_ll_tim.o(i.LL_TIM_OC_Init), (68 bytes). - Removing stm32f0xx_ll_tim.o(i.LL_TIM_OC_StructInit), (20 bytes). - Removing stm32f0xx_ll_tim.o(i.LL_TIM_StructInit), (16 bytes). - Removing stm32f0xx_ll_tim.o(i.OC1Config), (140 bytes). - Removing stm32f0xx_ll_tim.o(i.OC2Config), (144 bytes). - Removing stm32f0xx_ll_tim.o(i.OC3Config), (152 bytes). - Removing stm32f0xx_ll_tim.o(i.OC4Config), (116 bytes). - Removing stm32f0xx_ll_flash.o(.rev16_text), (4 bytes). - Removing stm32f0xx_ll_flash.o(.revsh_text), (4 bytes). - Removing dadd.o(.text), (356 bytes). - Removing dmul.o(.text), (208 bytes). - Removing ddiv.o(.text), (240 bytes). - Removing dfixul.o(.text), (64 bytes). - Removing cdrcmple.o(.text), (40 bytes). - Removing depilogue.o(.text), (190 bytes). - Removing functions.o(i.GetTick), (12 bytes). - Removing depilogue.o(i.__ARM_clz), (46 bytes). - -400 unused section(s) (total 22869 bytes) removed from the image. - -============================================================================== - -Image Symbol Table - - Local Symbols - - Symbol Name Value Ov Type Size Object(Section) - - ../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.c 0x00000000 Number 0 stm32f0xx_hal.o ABSOLUTE - ../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_cortex.c 0x00000000 Number 0 stm32f0xx_hal_cortex.o ABSOLUTE - ../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_dma.c 0x00000000 Number 0 stm32f0xx_hal_dma.o ABSOLUTE - ../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_flash.c 0x00000000 Number 0 stm32f0xx_hal_flash.o ABSOLUTE - ../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_flash_ex.c 0x00000000 Number 0 stm32f0xx_hal_flash_ex.o ABSOLUTE - ../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_gpio.c 0x00000000 Number 0 stm32f0xx_hal_gpio.o ABSOLUTE - ../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_i2c.c 0x00000000 Number 0 stm32f0xx_hal_i2c.o ABSOLUTE - ../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_i2c_ex.c 0x00000000 Number 0 stm32f0xx_hal_i2c_ex.o ABSOLUTE - ../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pwr.c 0x00000000 Number 0 stm32f0xx_hal_pwr.o ABSOLUTE - ../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pwr_ex.c 0x00000000 Number 0 stm32f0xx_hal_pwr_ex.o ABSOLUTE - ../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc.c 0x00000000 Number 0 stm32f0xx_hal_rcc.o ABSOLUTE - ../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc_ex.c 0x00000000 Number 0 stm32f0xx_hal_rcc_ex.o ABSOLUTE - ../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim.c 0x00000000 Number 0 stm32f0xx_hal_tim.o ABSOLUTE - ../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim_ex.c 0x00000000 Number 0 stm32f0xx_hal_tim_ex.o ABSOLUTE - ../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_adc.c 0x00000000 Number 0 stm32f0xx_ll_adc.o ABSOLUTE - ../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_dma.c 0x00000000 Number 0 stm32f0xx_ll_dma.o ABSOLUTE - ../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_exti.c 0x00000000 Number 0 stm32f0xx_ll_exti.o ABSOLUTE - ../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_gpio.c 0x00000000 Number 0 stm32f0xx_ll_gpio.o ABSOLUTE - ../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_rcc.c 0x00000000 Number 0 stm32f0xx_ll_rcc.o ABSOLUTE - ../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_spi.c 0x00000000 Number 0 stm32f0xx_ll_spi.o ABSOLUTE - ../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_usart.c 0x00000000 Number 0 stm32f0xx_ll_usart.o ABSOLUTE - ../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_utils.c 0x00000000 Number 0 stm32f0xx_ll_utils.o ABSOLUTE - ../clib/microlib/division.c 0x00000000 Number 0 uldiv.o ABSOLUTE - ../clib/microlib/division.c 0x00000000 Number 0 idiv.o ABSOLUTE - ../clib/microlib/division.c 0x00000000 Number 0 uidiv.o ABSOLUTE - ../clib/microlib/division.c 0x00000000 Number 0 ldiv.o ABSOLUTE - ../clib/microlib/init/entry.s 0x00000000 Number 0 entry8b.o ABSOLUTE - ../clib/microlib/init/entry.s 0x00000000 Number 0 entry9a.o ABSOLUTE - ../clib/microlib/init/entry.s 0x00000000 Number 0 entry11b.o ABSOLUTE - ../clib/microlib/init/entry.s 0x00000000 Number 0 entry11a.o ABSOLUTE - ../clib/microlib/init/entry.s 0x00000000 Number 0 entry10b.o ABSOLUTE - ../clib/microlib/init/entry.s 0x00000000 Number 0 entry10a.o ABSOLUTE - ../clib/microlib/init/entry.s 0x00000000 Number 0 entry9b.o ABSOLUTE - ../clib/microlib/init/entry.s 0x00000000 Number 0 entry5.o ABSOLUTE - ../clib/microlib/init/entry.s 0x00000000 Number 0 entry7a.o ABSOLUTE - ../clib/microlib/init/entry.s 0x00000000 Number 0 entry7b.o ABSOLUTE - ../clib/microlib/init/entry.s 0x00000000 Number 0 entry.o ABSOLUTE - ../clib/microlib/init/entry.s 0x00000000 Number 0 entry2.o ABSOLUTE - ../clib/microlib/init/entry.s 0x00000000 Number 0 entry8a.o ABSOLUTE - ../clib/microlib/longlong.c 0x00000000 Number 0 llushr.o ABSOLUTE - ../clib/microlib/longlong.c 0x00000000 Number 0 llsshr.o ABSOLUTE - ../clib/microlib/longlong.c 0x00000000 Number 0 llshl.o ABSOLUTE - ../clib/microlib/printf/printf.c 0x00000000 Number 0 printfb.o ABSOLUTE - ../clib/microlib/printf/printf.c 0x00000000 Number 0 printf0.o ABSOLUTE - ../clib/microlib/printf/printf.c 0x00000000 Number 0 printf1.o ABSOLUTE - ../clib/microlib/printf/printf.c 0x00000000 Number 0 printf2.o ABSOLUTE - ../clib/microlib/printf/printf.c 0x00000000 Number 0 printf3.o ABSOLUTE - ../clib/microlib/printf/printf.c 0x00000000 Number 0 printfa.o ABSOLUTE - ../clib/microlib/printf/printf.c 0x00000000 Number 0 printf5.o ABSOLUTE - ../clib/microlib/printf/printf.c 0x00000000 Number 0 printf4.o ABSOLUTE - ../clib/microlib/printf/printf.c 0x00000000 Number 0 printf6.o ABSOLUTE - ../clib/microlib/printf/printf.c 0x00000000 Number 0 printf7.o ABSOLUTE - ../clib/microlib/printf/printf.c 0x00000000 Number 0 printf8.o ABSOLUTE - ../clib/microlib/printf/stubs.s 0x00000000 Number 0 stubs.o ABSOLUTE - ../clib/microlib/stdio/fputc.c 0x00000000 Number 0 fputc.o ABSOLUTE - ../clib/microlib/stdio/semi.s 0x00000000 Number 0 semi.o ABSOLUTE - ../clib/microlib/stdio/streams.c 0x00000000 Number 0 stdout.o ABSOLUTE - ../clib/microlib/string/memcpy.c 0x00000000 Number 0 memcpya.o ABSOLUTE - ../clib/microlib/string/memcpy.c 0x00000000 Number 0 memcpyb.o ABSOLUTE - ../clib/microlib/string/memset.c 0x00000000 Number 0 memseta.o ABSOLUTE - ../clib/microlib/stubs.s 0x00000000 Number 0 iusefp.o ABSOLUTE - ../clib/microlib/stubs.s 0x00000000 Number 0 iusesemip.o ABSOLUTE - ../clib/microlib/unhosted.c 0x00000000 Number 0 uread4.o ABSOLUTE - ../fplib/microlib/fpadd.c 0x00000000 Number 0 dadd.o ABSOLUTE - ../fplib/microlib/fpdiv.c 0x00000000 Number 0 ddiv.o ABSOLUTE - ../fplib/microlib/fpepilogue.c 0x00000000 Number 0 depilogue.o ABSOLUTE - ../fplib/microlib/fpfix.c 0x00000000 Number 0 dfixul.o ABSOLUTE - ../fplib/microlib/fpmul.c 0x00000000 Number 0 dmul.o ABSOLUTE - ..\../ComLib\Src\BSP.c 0x00000000 Number 0 bsp.o ABSOLUTE - ..\../ComLib\Src\GlobalDef.c 0x00000000 Number 0 globaldef.o ABSOLUTE - ..\../ComLib\Src\KBus.c 0x00000000 Number 0 kbus.o ABSOLUTE - ..\../ComLib\Src\KLink.c 0x00000000 Number 0 klink.o ABSOLUTE - ..\../ComLib\Src\KMachine.c 0x00000000 Number 0 kmachine.o ABSOLUTE - ..\../ComLib\Src\ModbusRTU.c 0x00000000 Number 0 modbusrtu.o ABSOLUTE - ..\../ComLib\Src\MyQueue.c 0x00000000 Number 0 myqueue.o ABSOLUTE - ..\../ComLib\Src\PLCfunctions.c 0x00000000 Number 0 plcfunctions.o ABSOLUTE - ..\../ComLib\Src\debug.c 0x00000000 Number 0 debug.o ABSOLUTE - ..\../ComLib\Src\functions.c 0x00000000 Number 0 functions.o ABSOLUTE - ..\../ComLib\Src\shell.c 0x00000000 Number 0 shell.o ABSOLUTE - ..\../ComLib\Src\stm32f0xx_hal_msp.c 0x00000000 Number 0 stm32f0xx_hal_msp.o ABSOLUTE - ..\../ComLib\Src\stm32f0xx_it.c 0x00000000 Number 0 stm32f0xx_it.o ABSOLUTE - ..\../ComLib\Src\system_stm32f0xx.c 0x00000000 Number 0 system_stm32f0xx.o ABSOLUTE - ..\../Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_ll_tim.c 0x00000000 Number 0 stm32f0xx_ll_tim.o ABSOLUTE - ..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal.c 0x00000000 Number 0 stm32f0xx_hal.o ABSOLUTE - ..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_cortex.c 0x00000000 Number 0 stm32f0xx_hal_cortex.o ABSOLUTE - ..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_dma.c 0x00000000 Number 0 stm32f0xx_hal_dma.o ABSOLUTE - ..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_flash.c 0x00000000 Number 0 stm32f0xx_hal_flash.o ABSOLUTE - ..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_flash_ex.c 0x00000000 Number 0 stm32f0xx_hal_flash_ex.o ABSOLUTE - ..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_gpio.c 0x00000000 Number 0 stm32f0xx_hal_gpio.o ABSOLUTE - ..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_i2c.c 0x00000000 Number 0 stm32f0xx_hal_i2c.o ABSOLUTE - ..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_i2c_ex.c 0x00000000 Number 0 stm32f0xx_hal_i2c_ex.o ABSOLUTE - ..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_pwr.c 0x00000000 Number 0 stm32f0xx_hal_pwr.o ABSOLUTE - ..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_pwr_ex.c 0x00000000 Number 0 stm32f0xx_hal_pwr_ex.o ABSOLUTE - ..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_rcc.c 0x00000000 Number 0 stm32f0xx_hal_rcc.o ABSOLUTE - ..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_rcc_ex.c 0x00000000 Number 0 stm32f0xx_hal_rcc_ex.o ABSOLUTE - ..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_tim.c 0x00000000 Number 0 stm32f0xx_hal_tim.o ABSOLUTE - ..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_tim_ex.c 0x00000000 Number 0 stm32f0xx_hal_tim_ex.o ABSOLUTE - ..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_ll_adc.c 0x00000000 Number 0 stm32f0xx_ll_adc.o ABSOLUTE - ..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_ll_dma.c 0x00000000 Number 0 stm32f0xx_ll_dma.o ABSOLUTE - ..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_ll_exti.c 0x00000000 Number 0 stm32f0xx_ll_exti.o ABSOLUTE - ..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_ll_flash.c 0x00000000 Number 0 stm32f0xx_ll_flash.o ABSOLUTE - ..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_ll_gpio.c 0x00000000 Number 0 stm32f0xx_ll_gpio.o ABSOLUTE - ..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_ll_rcc.c 0x00000000 Number 0 stm32f0xx_ll_rcc.o ABSOLUTE - ..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_ll_spi.c 0x00000000 Number 0 stm32f0xx_ll_spi.o ABSOLUTE - ..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_ll_usart.c 0x00000000 Number 0 stm32f0xx_ll_usart.o ABSOLUTE - ..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_ll_utils.c 0x00000000 Number 0 stm32f0xx_ll_utils.o ABSOLUTE - ..\Src\BoardType.c 0x00000000 Number 0 boardtype.o ABSOLUTE - ..\Src\FPx.c 0x00000000 Number 0 fpx.o ABSOLUTE - ..\Src\main.c 0x00000000 Number 0 main.o ABSOLUTE - ..\\..\ComLib\\Src\\BSP.c 0x00000000 Number 0 bsp.o ABSOLUTE - ..\\..\ComLib\\Src\\KBus.c 0x00000000 Number 0 kbus.o ABSOLUTE - ..\\..\ComLib\\Src\\KLink.c 0x00000000 Number 0 klink.o ABSOLUTE - ..\\..\ComLib\\Src\\KMachine.c 0x00000000 Number 0 kmachine.o ABSOLUTE - ..\\..\ComLib\\Src\\PLCfunctions.c 0x00000000 Number 0 plcfunctions.o ABSOLUTE - ..\\..\ComLib\\Src\\debug.c 0x00000000 Number 0 debug.o ABSOLUTE - ..\\..\ComLib\\Src\\functions.c 0x00000000 Number 0 functions.o ABSOLUTE - ..\\..\ComLib\\Src\\stm32f0xx_hal_msp.c 0x00000000 Number 0 stm32f0xx_hal_msp.o ABSOLUTE - ..\\..\ComLib\\Src\\stm32f0xx_it.c 0x00000000 Number 0 stm32f0xx_it.o ABSOLUTE - ..\\..\ComLib\\Src\\system_stm32f0xx.c 0x00000000 Number 0 system_stm32f0xx.o ABSOLUTE - ..\\..\Drivers\\STM32F0xx_HAL_Driver\\Src\\stm32f0xx_ll_tim.c 0x00000000 Number 0 stm32f0xx_ll_tim.o ABSOLUTE - ..\\..\\Drivers\\STM32F0xx_HAL_Driver\\Src\\stm32f0xx_ll_flash.c 0x00000000 Number 0 stm32f0xx_ll_flash.o ABSOLUTE - ..\\Src\\FPx.c 0x00000000 Number 0 fpx.o ABSOLUTE - ..\\Src\\main.c 0x00000000 Number 0 main.o ABSOLUTE - cdrcmple.s 0x00000000 Number 0 cdrcmple.o ABSOLUTE - dc.s 0x00000000 Number 0 dc.o ABSOLUTE - handlers.s 0x00000000 Number 0 handlers.o ABSOLUTE - init.s 0x00000000 Number 0 init.o ABSOLUTE - startup_stm32f030x8.s 0x00000000 Number 0 startup_stm32f030x8.o ABSOLUTE - RESET 0x08001000 Section 180 startup_stm32f030x8.o(RESET) - .ARM.Collect$$$$00000000 0x080010b4 Section 0 entry.o(.ARM.Collect$$$$00000000) - .ARM.Collect$$$$00000001 0x080010b4 Section 4 entry2.o(.ARM.Collect$$$$00000001) - .ARM.Collect$$$$00000004 0x080010b8 Section 4 entry5.o(.ARM.Collect$$$$00000004) - .ARM.Collect$$$$00000008 0x080010bc Section 0 entry7b.o(.ARM.Collect$$$$00000008) - .ARM.Collect$$$$0000000A 0x080010bc Section 0 entry8b.o(.ARM.Collect$$$$0000000A) - .ARM.Collect$$$$0000000B 0x080010bc Section 8 entry9a.o(.ARM.Collect$$$$0000000B) - .ARM.Collect$$$$0000000D 0x080010c4 Section 0 entry10a.o(.ARM.Collect$$$$0000000D) - .ARM.Collect$$$$0000000F 0x080010c4 Section 0 entry11a.o(.ARM.Collect$$$$0000000F) - .ARM.Collect$$$$00002712 0x080010c4 Section 4 entry2.o(.ARM.Collect$$$$00002712) - __lit__00000000 0x080010c4 Data 4 entry2.o(.ARM.Collect$$$$00002712) - .emb_text 0x080010c8 Section 4 debug.o(.emb_text) - .text 0x080010cc Section 28 startup_stm32f030x8.o(.text) - .text 0x080010e8 Section 0 uidiv.o(.text) - .text 0x08001114 Section 0 idiv.o(.text) - .text 0x0800113c Section 0 ldiv.o(.text) - .text 0x08001188 Section 0 llushr.o(.text) - .text 0x080011aa Section 0 memcpya.o(.text) - .text 0x080011ce Section 0 memseta.o(.text) - .text 0x080011f2 Section 0 uread4.o(.text) - .text 0x08001206 Section 0 uldiv.o(.text) - .text 0x08001268 Section 36 init.o(.text) - .text 0x0800128c Section 0 llshl.o(.text) - i.AddEventLog 0x080012ac Section 0 kmachine.o(i.AddEventLog) - i.AddSpace 0x08001338 Section 0 myqueue.o(i.AddSpace) - i.CheckEventLog 0x08001364 Section 0 kmachine.o(i.CheckEventLog) - i.ClearEventLog 0x080013d0 Section 0 kmachine.o(i.ClearEventLog) - i.DMA1_Channel2_3_IRQHandler 0x080013f4 Section 0 stm32f0xx_it.o(i.DMA1_Channel2_3_IRQHandler) - i.DMA1_Channel4_5_IRQHandler 0x08001494 Section 0 stm32f0xx_it.o(i.DMA1_Channel4_5_IRQHandler) - i.DelData 0x080014cc Section 0 myqueue.o(i.DelData) - i.EraseAndWriteToFlashMem 0x080014f8 Section 0 kmachine.o(i.EraseAndWriteToFlashMem) - i.EraseFlashMem 0x08001558 Section 0 kmachine.o(i.EraseFlashMem) - i.FPxCalBCC 0x0800157c Section 0 fpx.o(i.FPxCalBCC) - i.FPxCallBackFunc 0x0800159c Section 0 main.o(i.FPxCallBackFunc) - i.FPxParsePkt 0x080015e0 Section 0 fpx.o(i.FPxParsePkt) - i.FPxSendPkt 0x080017a4 Section 0 fpx.o(i.FPxSendPkt) - i.FPxSetCallBackFunc 0x0800181c Section 0 fpx.o(i.FPxSetCallBackFunc) - i.FPx_Init 0x0800182c Section 0 fpx.o(i.FPx_Init) - i.FPx_Proc 0x08001890 Section 0 fpx.o(i.FPx_Proc) - i.FPx_SetIOCount 0x080019b8 Section 0 fpx.o(i.FPx_SetIOCount) - i.GetBitValue 0x080019c8 Section 0 modbusrtu.o(i.GetBitValue) - GetBitValue 0x080019c9 Thumb Code 20 modbusrtu.o(i.GetBitValue) - i.GetBitValue 0x080019dc Section 0 kmachine.o(i.GetBitValue) - GetBitValue 0x080019dd Thumb Code 20 kmachine.o(i.GetBitValue) - i.GetCoilValue 0x080019f0 Section 0 kmachine.o(i.GetCoilValue) - i.GetContinueData 0x08001a90 Section 0 myqueue.o(i.GetContinueData) - i.GetContinueEmptyRoom 0x08001ab6 Section 0 myqueue.o(i.GetContinueEmptyRoom) - i.GetEventLogAddr 0x08001adc Section 0 kmachine.o(i.GetEventLogAddr) - i.GetVarData 0x08001b00 Section 0 kmachine.o(i.GetVarData) - i.GetuS 0x08001bd8 Section 0 functions.o(i.GetuS) - i.HAL_Delay 0x08001c04 Section 0 stm32f0xx_hal.o(i.HAL_Delay) - i.HAL_GetTick 0x08001c20 Section 0 stm32f0xx_hal.o(i.HAL_GetTick) - i.HAL_IncTick 0x08001c2c Section 0 stm32f0xx_hal.o(i.HAL_IncTick) - i.HAL_Init 0x08001c3c Section 0 stm32f0xx_hal.o(i.HAL_Init) - i.HAL_InitTick 0x08001c5c Section 0 stm32f0xx_hal.o(i.HAL_InitTick) - i.HAL_MspInit 0x08001c80 Section 0 stm32f0xx_hal_msp.o(i.HAL_MspInit) - i.HAL_NVIC_SetPriority 0x08001cc4 Section 0 stm32f0xx_hal_cortex.o(i.HAL_NVIC_SetPriority) - i.HAL_RCCEx_PeriphCLKConfig 0x08001ccc Section 0 stm32f0xx_hal_rcc_ex.o(i.HAL_RCCEx_PeriphCLKConfig) - i.HAL_RCC_ClockConfig 0x08001db8 Section 0 stm32f0xx_hal_rcc.o(i.HAL_RCC_ClockConfig) - i.HAL_RCC_GetHCLKFreq 0x08001ee4 Section 0 stm32f0xx_hal_rcc.o(i.HAL_RCC_GetHCLKFreq) - i.HAL_RCC_GetSysClockFreq 0x08001ef0 Section 0 stm32f0xx_hal_rcc.o(i.HAL_RCC_GetSysClockFreq) - i.HAL_RCC_OscConfig 0x08001f70 Section 0 stm32f0xx_hal_rcc.o(i.HAL_RCC_OscConfig) - i.HAL_SYSTICK_CLKSourceConfig 0x080022c4 Section 0 stm32f0xx_hal_cortex.o(i.HAL_SYSTICK_CLKSourceConfig) - i.HAL_SYSTICK_Callback 0x080022dc Section 0 main.o(i.HAL_SYSTICK_Callback) - i.HAL_SYSTICK_Config 0x08002350 Section 0 stm32f0xx_hal_cortex.o(i.HAL_SYSTICK_Config) - i.HAL_SYSTICK_IRQHandler 0x08002380 Section 0 stm32f0xx_hal_cortex.o(i.HAL_SYSTICK_IRQHandler) - i.HardFault_Handler 0x08002388 Section 0 stm32f0xx_it.o(i.HardFault_Handler) - i.InitPLC 0x0800238c Section 0 plcfunctions.o(i.InitPLC) - i.InitTimer 0x080023d8 Section 0 plcfunctions.o(i.InitTimer) - i.InitUartstat 0x08002418 Section 0 functions.o(i.InitUartstat) - i.InituS 0x08002438 Section 0 functions.o(i.InituS) - i.KBusAddChildAddrByInfo 0x0800248c Section 0 kbus.o(i.KBusAddChildAddrByInfo) - i.KBusBCC 0x080024f8 Section 0 kbus.o(i.KBusBCC) - i.KBusCallBackFunc 0x08002510 Section 0 main.o(i.KBusCallBackFunc) - i.KBusCheckPacket 0x08002564 Section 0 kbus.o(i.KBusCheckPacket) - i.KBusInit 0x08002668 Section 0 kbus.o(i.KBusInit) - i.KBusMakeDefaultClildInfo 0x080026c0 Section 0 kbus.o(i.KBusMakeDefaultClildInfo) - i.KBusMakePacket 0x080026e8 Section 0 kbus.o(i.KBusMakePacket) - i.KBusMasterFunc 0x08002774 Section 0 kbus.o(i.KBusMasterFunc) - i.KBusMasterParsePacket 0x08002938 Section 0 kbus.o(i.KBusMasterParsePacket) - i.KBusParsePacket 0x08002a4c Section 0 kbus.o(i.KBusParsePacket) - i.KBusSearchChild 0x08002acc Section 0 kbus.o(i.KBusSearchChild) - i.KBusSetCallBackFunc 0x08002b58 Section 0 kbus.o(i.KBusSetCallBackFunc) - i.KBusSlaveCheckPacket 0x08002b68 Section 0 kbus.o(i.KBusSlaveCheckPacket) - i.KBusSlaveFunc 0x08002bf8 Section 0 kbus.o(i.KBusSlaveFunc) - i.KBusSlaveParsePacket 0x08002c58 Section 0 kbus.o(i.KBusSlaveParsePacket) - i.KLBCC 0x08002e38 Section 0 klink.o(i.KLBCC) - i.KLCheckPacket 0x08002e4e Section 0 klink.o(i.KLCheckPacket) - i.KLMakeRplyPacket 0x08002e80 Section 0 klink.o(i.KLMakeRplyPacket) - i.KLParsePacket 0x08002ecc Section 0 klink.o(i.KLParsePacket) - i.KLParseReqPacket 0x08002f1c Section 0 klink.o(i.KLParseReqPacket) - i.KMachineInit 0x0800367c Section 0 kmachine.o(i.KMachineInit) - i.LL_AHB1_GRP1_EnableClock 0x080036ec Section 0 bsp.o(i.LL_AHB1_GRP1_EnableClock) - LL_AHB1_GRP1_EnableClock 0x080036ed Thumb Code 18 bsp.o(i.LL_AHB1_GRP1_EnableClock) - i.LL_APB1_GRP1_EnableClock 0x08003704 Section 0 bsp.o(i.LL_APB1_GRP1_EnableClock) - LL_APB1_GRP1_EnableClock 0x08003705 Thumb Code 18 bsp.o(i.LL_APB1_GRP1_EnableClock) - i.LL_APB1_GRP2_EnableClock 0x0800371c Section 0 bsp.o(i.LL_APB1_GRP2_EnableClock) - LL_APB1_GRP2_EnableClock 0x0800371d Thumb Code 18 bsp.o(i.LL_APB1_GRP2_EnableClock) - i.LL_DMA_ConfigAddresses 0x08003734 Section 0 functions.o(i.LL_DMA_ConfigAddresses) - LL_DMA_ConfigAddresses 0x08003735 Thumb Code 38 functions.o(i.LL_DMA_ConfigAddresses) - i.LL_DMA_DisableChannel 0x08003760 Section 0 functions.o(i.LL_DMA_DisableChannel) - LL_DMA_DisableChannel 0x08003761 Thumb Code 18 functions.o(i.LL_DMA_DisableChannel) - i.LL_DMA_EnableChannel 0x08003778 Section 0 functions.o(i.LL_DMA_EnableChannel) - LL_DMA_EnableChannel 0x08003779 Thumb Code 18 functions.o(i.LL_DMA_EnableChannel) - i.LL_DMA_EnableIT_TC 0x08003790 Section 0 functions.o(i.LL_DMA_EnableIT_TC) - LL_DMA_EnableIT_TC 0x08003791 Thumb Code 18 functions.o(i.LL_DMA_EnableIT_TC) - i.LL_DMA_SetChannelPriorityLevel 0x080037a8 Section 0 bsp.o(i.LL_DMA_SetChannelPriorityLevel) - LL_DMA_SetChannelPriorityLevel 0x080037a9 Thumb Code 24 bsp.o(i.LL_DMA_SetChannelPriorityLevel) - i.LL_DMA_SetDataLength 0x080037c4 Section 0 functions.o(i.LL_DMA_SetDataLength) - LL_DMA_SetDataLength 0x080037c5 Thumb Code 22 functions.o(i.LL_DMA_SetDataLength) - i.LL_DMA_SetDataTransferDirection 0x080037e0 Section 0 bsp.o(i.LL_DMA_SetDataTransferDirection) - LL_DMA_SetDataTransferDirection 0x080037e1 Thumb Code 22 bsp.o(i.LL_DMA_SetDataTransferDirection) - i.LL_DMA_SetMemoryIncMode 0x08003800 Section 0 bsp.o(i.LL_DMA_SetMemoryIncMode) - LL_DMA_SetMemoryIncMode 0x08003801 Thumb Code 22 bsp.o(i.LL_DMA_SetMemoryIncMode) - i.LL_DMA_SetMemorySize 0x0800381c Section 0 bsp.o(i.LL_DMA_SetMemorySize) - LL_DMA_SetMemorySize 0x0800381d Thumb Code 24 bsp.o(i.LL_DMA_SetMemorySize) - i.LL_DMA_SetMode 0x08003838 Section 0 bsp.o(i.LL_DMA_SetMode) - LL_DMA_SetMode 0x08003839 Thumb Code 22 bsp.o(i.LL_DMA_SetMode) - i.LL_DMA_SetPeriphIncMode 0x08003854 Section 0 bsp.o(i.LL_DMA_SetPeriphIncMode) - LL_DMA_SetPeriphIncMode 0x08003855 Thumb Code 22 bsp.o(i.LL_DMA_SetPeriphIncMode) - i.LL_DMA_SetPeriphSize 0x08003870 Section 0 bsp.o(i.LL_DMA_SetPeriphSize) - LL_DMA_SetPeriphSize 0x08003871 Thumb Code 24 bsp.o(i.LL_DMA_SetPeriphSize) - i.LL_FLASH_Program 0x0800388c Section 0 stm32f0xx_ll_flash.o(i.LL_FLASH_Program) - i.LL_Flash_PageErase 0x080038f4 Section 0 stm32f0xx_ll_flash.o(i.LL_Flash_PageErase) - i.LL_Flash_Unlock 0x08003944 Section 0 stm32f0xx_ll_flash.o(i.LL_Flash_Unlock) - i.LL_GPIO_Init 0x08003970 Section 0 stm32f0xx_ll_gpio.o(i.LL_GPIO_Init) - i.LL_GPIO_IsInputPinSet 0x08003a14 Section 0 fpx.o(i.LL_GPIO_IsInputPinSet) - LL_GPIO_IsInputPinSet 0x08003a15 Thumb Code 14 fpx.o(i.LL_GPIO_IsInputPinSet) - i.LL_RCC_GetSystemClocksFreq 0x08003a22 Section 0 stm32f0xx_ll_rcc.o(i.LL_RCC_GetSystemClocksFreq) - i.LL_RCC_GetUSARTClockFreq 0x08003a3c Section 0 stm32f0xx_ll_rcc.o(i.LL_RCC_GetUSARTClockFreq) - i.LL_SPI_Init 0x08003a90 Section 0 stm32f0xx_ll_spi.o(i.LL_SPI_Init) - i.LL_TIM_Init 0x08003af4 Section 0 stm32f0xx_ll_tim.o(i.LL_TIM_Init) - i.LL_USART_ConfigAsyncMode 0x08003b78 Section 0 bsp.o(i.LL_USART_ConfigAsyncMode) - LL_USART_ConfigAsyncMode 0x08003b79 Thumb Code 20 bsp.o(i.LL_USART_ConfigAsyncMode) - i.LL_USART_Init 0x08003b8c Section 0 stm32f0xx_ll_usart.o(i.LL_USART_Init) - i.LoadDefaultSysCfg 0x08003c38 Section 0 kmachine.o(i.LoadDefaultSysCfg) - i.LoadRunStat 0x08003c4c Section 0 kmachine.o(i.LoadRunStat) - i.Locate 0x08003cb0 Section 0 debug.o(i.Locate) - i.MX_DMA_Init 0x08003cd4 Section 0 bsp.o(i.MX_DMA_Init) - i.MX_GPIO_Init 0x08003cfc Section 0 bsp.o(i.MX_GPIO_Init) - i.MX_IWDG_Init 0x08003e30 Section 0 bsp.o(i.MX_IWDG_Init) - i.MX_SPI1_Init 0x08003e64 Section 0 bsp.o(i.MX_SPI1_Init) - i.MX_TIM6_Init 0x08003f30 Section 0 bsp.o(i.MX_TIM6_Init) - i.MX_USART1_UART_Init 0x08003f84 Section 0 bsp.o(i.MX_USART1_UART_Init) - i.MX_USART2_UART_Init 0x080040a8 Section 0 bsp.o(i.MX_USART2_UART_Init) - i.ModBusSlaveCheckPkg 0x08004200 Section 0 modbusrtu.o(i.ModBusSlaveCheckPkg) - i.ModBusSlaveParsePkg 0x08004238 Section 0 modbusrtu.o(i.ModBusSlaveParsePkg) - i.NMI_Handler 0x08004558 Section 0 stm32f0xx_it.o(i.NMI_Handler) - i.NVIC_EnableIRQ 0x0800455c Section 0 bsp.o(i.NVIC_EnableIRQ) - NVIC_EnableIRQ 0x0800455d Thumb Code 14 bsp.o(i.NVIC_EnableIRQ) - i.NVIC_SetPriority 0x08004570 Section 0 bsp.o(i.NVIC_SetPriority) - NVIC_SetPriority 0x08004571 Thumb Code 60 bsp.o(i.NVIC_SetPriority) - i.NVIC_SetPriority 0x080045b4 Section 0 stm32f0xx_hal_cortex.o(i.NVIC_SetPriority) - NVIC_SetPriority 0x080045b5 Thumb Code 60 stm32f0xx_hal_cortex.o(i.NVIC_SetPriority) - i.PendSV_Handler 0x080045f8 Section 0 stm32f0xx_it.o(i.PendSV_Handler) - i.PendSvCallBack 0x08004618 Section 0 functions.o(i.PendSvCallBack) - i.PopOutVal 0x08004664 Section 0 plcfunctions.o(i.PopOutVal) - i.ProcessPLCBinProg 0x08004684 Section 0 plcfunctions.o(i.ProcessPLCBinProg) - i.ProcessTimer 0x08004be4 Section 0 plcfunctions.o(i.ProcessTimer) - i.PushIn 0x08004cb0 Section 0 myqueue.o(i.PushIn) - i.PushInVal 0x08004d34 Section 0 plcfunctions.o(i.PushInVal) - i.PutStr 0x08004d58 Section 0 functions.o(i.PutStr) - i.PutStr1 0x08004d74 Section 0 functions.o(i.PutStr1) - i.PutStr2 0x08004d90 Section 0 functions.o(i.PutStr2) - i.RCC_GetHCLKClockFreq 0x08004d9c Section 0 stm32f0xx_ll_rcc.o(i.RCC_GetHCLKClockFreq) - i.RCC_GetPCLK1ClockFreq 0x08004db8 Section 0 stm32f0xx_ll_rcc.o(i.RCC_GetPCLK1ClockFreq) - i.RCC_GetSystemClockFreq 0x08004dd0 Section 0 stm32f0xx_ll_rcc.o(i.RCC_GetSystemClockFreq) - i.RCC_PLL_GetFreqDomain_SYS 0x08004dfc Section 0 stm32f0xx_ll_rcc.o(i.RCC_PLL_GetFreqDomain_SYS) - i.ReadFlashMem 0x08004e3c Section 0 kmachine.o(i.ReadFlashMem) - i.ReadJumperSW 0x08004e70 Section 0 functions.o(i.ReadJumperSW) - i.ReadSysCfgFromFlash 0x08004e80 Section 0 kmachine.o(i.ReadSysCfgFromFlash) - i.ResetBit 0x08004ee0 Section 0 modbusrtu.o(i.ResetBit) - ResetBit 0x08004ee1 Thumb Code 16 modbusrtu.o(i.ResetBit) - i.RunTimer 0x08004ef0 Section 0 plcfunctions.o(i.RunTimer) - i.SPI1_IRQHandler 0x08004f3c Section 0 stm32f0xx_it.o(i.SPI1_IRQHandler) - i.SPI1_IRQ_CallBack 0x08004f44 Section 0 functions.o(i.SPI1_IRQ_CallBack) - i.SVC_Handler 0x08005004 Section 0 stm32f0xx_it.o(i.SVC_Handler) - i.SaveRunStat 0x08005008 Section 0 kmachine.o(i.SaveRunStat) - i.SendPacket 0x08005088 Section 0 functions.o(i.SendPacket) - i.SetAddrBit 0x080050c0 Section 0 modbusrtu.o(i.SetAddrBit) - SetAddrBit 0x080050c1 Thumb Code 16 modbusrtu.o(i.SetAddrBit) - i.SetBitValue 0x080050d0 Section 0 klink.o(i.SetBitValue) - SetBitValue 0x080050d1 Thumb Code 24 klink.o(i.SetBitValue) - i.SetBitValue 0x080050e8 Section 0 modbusrtu.o(i.SetBitValue) - SetBitValue 0x080050e9 Thumb Code 18 modbusrtu.o(i.SetBitValue) - i.SetBitValue 0x080050fa Section 0 kmachine.o(i.SetBitValue) - SetBitValue 0x080050fb Thumb Code 24 kmachine.o(i.SetBitValue) - i.SetCoilValue 0x08005114 Section 0 kmachine.o(i.SetCoilValue) - i.SetErr2Led 0x080051a4 Section 0 functions.o(i.SetErr2Led) - i.SetErrLed 0x080051bc Section 0 functions.o(i.SetErrLed) - i.SetOutStat 0x080051d4 Section 0 functions.o(i.SetOutStat) - i.SetRunLed 0x080051ec Section 0 functions.o(i.SetRunLed) - i.SetVarData 0x08005204 Section 0 kmachine.o(i.SetVarData) - i.ShowInitInfo 0x080052cc Section 0 debug.o(i.ShowInitInfo) - i.StartPLC 0x08005450 Section 0 plcfunctions.o(i.StartPLC) - i.StopPLC 0x080054c0 Section 0 plcfunctions.o(i.StopPLC) - i.StopTimer 0x08005500 Section 0 plcfunctions.o(i.StopTimer) - i.SysTick_Handler 0x08005544 Section 0 stm32f0xx_it.o(i.SysTick_Handler) - i.SystemClock_Config 0x08005550 Section 0 bsp.o(i.SystemClock_Config) - i.SystemInit 0x080055f8 Section 0 system_stm32f0xx.o(i.SystemInit) - i.TIM6_IRQHandler 0x08005654 Section 0 stm32f0xx_it.o(i.TIM6_IRQHandler) - i.USART1_IRQHandler 0x0800566c Section 0 stm32f0xx_it.o(i.USART1_IRQHandler) - i.USART2_IRQHandler 0x080056f4 Section 0 stm32f0xx_it.o(i.USART2_IRQHandler) - i.Uart1RecvDone 0x08005740 Section 0 functions.o(i.Uart1RecvDone) - i.Uart1SendDMA 0x08005760 Section 0 functions.o(i.Uart1SendDMA) - i.Uart1SendDone 0x080057c0 Section 0 functions.o(i.Uart1SendDone) - i.Uart1TriggerSendDMA 0x080057d0 Section 0 functions.o(i.Uart1TriggerSendDMA) - i.Uart2RecvDMA 0x08005800 Section 0 functions.o(i.Uart2RecvDMA) - i.Uart2RecvDone 0x08005860 Section 0 functions.o(i.Uart2RecvDone) - i.Uart2SendDMA 0x080058a0 Section 0 functions.o(i.Uart2SendDMA) - i.Uart2SendDone 0x08005900 Section 0 functions.o(i.Uart2SendDone) - i.WriteFactoryData 0x08005910 Section 0 kmachine.o(i.WriteFactoryData) - i.WriteNewApp 0x0800592c Section 0 kmachine.o(i.WriteNewApp) - i.WriteNewAppInfo 0x0800594c Section 0 kmachine.o(i.WriteNewAppInfo) - i.WriteProgram 0x08005960 Section 0 kmachine.o(i.WriteProgram) - i.WriteSysCfgToFlash 0x080059a0 Section 0 kmachine.o(i.WriteSysCfgToFlash) - i.WriteToFlashMemNoErase 0x08005a0c Section 0 kmachine.o(i.WriteToFlashMemNoErase) - i._Error_Handler 0x08005a5c Section 0 main.o(i._Error_Handler) - i.__0sprintf$8 0x08005a60 Section 0 printf8.o(i.__0sprintf$8) - i.__ARM_common_switch8 0x08005a88 Section 0 modbusrtu.o(i.__ARM_common_switch8) - i.__scatterload_copy 0x08005aa2 Section 14 handlers.o(i.__scatterload_copy) - i.__scatterload_null 0x08005ab0 Section 2 handlers.o(i.__scatterload_null) - i.__scatterload_zeroinit 0x08005ab2 Section 14 handlers.o(i.__scatterload_zeroinit) - i._printf_core 0x08005ac0 Section 0 printf8.o(i._printf_core) - _printf_core 0x08005ac1 Thumb Code 1020 printf8.o(i._printf_core) - i._printf_post_padding 0x08005ee8 Section 0 printf8.o(i._printf_post_padding) - _printf_post_padding 0x08005ee9 Thumb Code 32 printf8.o(i._printf_post_padding) - i._printf_pre_padding 0x08005f08 Section 0 printf8.o(i._printf_pre_padding) - _printf_pre_padding 0x08005f09 Thumb Code 44 printf8.o(i._printf_pre_padding) - i._sputc 0x08005f34 Section 0 printf8.o(i._sputc) - _sputc 0x08005f35 Thumb Code 10 printf8.o(i._sputc) - i.clearscreen 0x08005f40 Section 0 debug.o(i.clearscreen) - i.crc16bitbybit 0x08005f58 Section 0 functions.o(i.crc16bitbybit) - i.crc16table 0x08005f94 Section 0 functions.o(i.crc16table) - i.crc16tablefast 0x08005fc4 Section 0 modbusrtu.o(i.crc16tablefast) - i.crc_check 0x08006004 Section 0 functions.o(i.crc_check) - i.initQueue 0x08006030 Section 0 myqueue.o(i.initQueue) - i.logData 0x08006048 Section 0 functions.o(i.logData) - i.main 0x0800606c Section 0 main.o(i.main) - .constdata 0x08006548 Section 16 debug.o(.constdata) - .constdata 0x08006558 Section 1030 functions.o(.constdata) - CHANNEL_OFFSET_TAB 0x08006558 Data 5 functions.o(.constdata) - .constdata 0x0800695e Section 32 modbusrtu.o(.constdata) - .constdata 0x0800697e Section 24 kmachine.o(.constdata) - .constdata 0x08006998 Section 144 kmachine.o(.constdata) - .constdata 0x08006a28 Section 5 bsp.o(.constdata) - CHANNEL_OFFSET_TAB 0x08006a28 Data 5 bsp.o(.constdata) - .constdata 0x08006a2d Section 5 stm32f0xx_it.o(.constdata) - CHANNEL_OFFSET_TAB 0x08006a2d Data 5 stm32f0xx_it.o(.constdata) - .constdata 0x08006a34 Section 24 main.o(.constdata) - .constdata 0x08006a4c Section 16 system_stm32f0xx.o(.constdata) - .constdata 0x08006a5c Section 8 system_stm32f0xx.o(.constdata) - .data 0x200000c0 Section 24 debug.o(.data) - CurChannel 0x200000d4 Data 4 debug.o(.data) - .data 0x200000d8 Section 4 functions.o(.data) - .data 0x200000dc Section 32 functions.o(.data) - .data 0x200000fc Section 4 globaldef.o(.data) - .data 0x20000100 Section 4 globaldef.o(.data) - .data 0x20000104 Section 4 globaldef.o(.data) - .data 0x20000108 Section 4 globaldef.o(.data) - .data 0x2000010c Section 4 globaldef.o(.data) - .data 0x20000110 Section 4 globaldef.o(.data) - .data 0x20000114 Section 4 globaldef.o(.data) - .data 0x20000118 Section 52 kbus.o(.data) - .data 0x2000014c Section 4 kbus.o(.data) - .data 0x20000150 Section 12 klink.o(.data) - .data 0x2000015c Section 1 modbusrtu.o(.data) - .data 0x20000160 Section 4 plcfunctions.o(.data) - .data 0x20000164 Section 36 kmachine.o(.data) - .data 0x20000188 Section 40 main.o(.data) - Count 0x20000194 Data 4 main.o(.data) - .data 0x200001b0 Section 4 system_stm32f0xx.o(.data) - .data 0x200001b4 Section 4 stm32f0xx_hal.o(.data) - .bss 0x200001b8 Section 288 debug.o(.bss) - .bss 0x200002d8 Section 128 functions.o(.bss) - .bss 0x20000358 Section 148 globaldef.o(.bss) - .bss 0x200003ec Section 148 globaldef.o(.bss) - .bss 0x20000480 Section 128 globaldef.o(.bss) - .bss 0x20000500 Section 128 globaldef.o(.bss) - .bss 0x20000580 Section 1880 kbus.o(.bss) - .bss 0x20000cd8 Section 272 klink.o(.bss) - .bss 0x20000de8 Section 128 modbusrtu.o(.bss) - .bss 0x20000e68 Section 520 plcfunctions.o(.bss) - .bss 0x20001070 Section 128 kmachine.o(.bss) - .bss 0x200010f0 Section 2004 kmachine.o(.bss) - .bss 0x200018c4 Section 516 main.o(.bss) - .bss 0x20001ac8 Section 156 fpx.o(.bss) - STACK 0x20001b68 Section 1024 startup_stm32f030x8.o(STACK) - - Global Symbols - - Symbol Name Value Ov Type Size Object(Section) - - BuildAttributes$$THM_ISAv3M$S$PE$A:L22$X:L11$S22$IEEE1$IW$USESV6$~STKCKD$USESV7$~SHL$OSPACE$ROPI$EBA8$MICROLIB$REQ8$PRES8$EABIv2 0x00000000 Number 0 anon$$obj.o ABSOLUTE - __ARM_use_no_argv 0x00000000 Number 0 main.o ABSOLUTE - _printf_a 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_c 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_charcount 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_d 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_e 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_f 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_flags 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_fp_dec 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_fp_hex 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_g 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_i 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_int_dec 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_l 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_lc 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_ll 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_lld 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_lli 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_llo 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_llu 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_llx 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_longlong_dec 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_longlong_hex 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_longlong_oct 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_ls 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_mbtowc 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_n 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_o 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_p 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_percent 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_pre_padding 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_return_value 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_s 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_sizespec 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_str 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_truncate_signed 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_truncate_unsigned 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_u 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_wc 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_wctomb 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_widthprec 0x00000000 Number 0 stubs.o ABSOLUTE - _printf_x 0x00000000 Number 0 stubs.o ABSOLUTE - __cpp_initialize__aeabi_ - Undefined Weak Reference - __cxa_finalize - Undefined Weak Reference - __decompress - Undefined Weak Reference - _clock_init - Undefined Weak Reference - _microlib_exit - Undefined Weak Reference - __Vectors_Size 0x000000b4 Number 0 startup_stm32f030x8.o ABSOLUTE - __Vectors 0x08001000 Data 4 startup_stm32f030x8.o(RESET) - __Vectors_End 0x080010b4 Data 0 startup_stm32f030x8.o(RESET) - __main 0x080010b5 Thumb Code 0 entry.o(.ARM.Collect$$$$00000000) - _main_stk 0x080010b5 Thumb Code 0 entry2.o(.ARM.Collect$$$$00000001) - _main_scatterload 0x080010b9 Thumb Code 0 entry5.o(.ARM.Collect$$$$00000004) - __main_after_scatterload 0x080010bd Thumb Code 0 entry5.o(.ARM.Collect$$$$00000004) - _main_clock 0x080010bd Thumb Code 0 entry7b.o(.ARM.Collect$$$$00000008) - _main_cpp_init 0x080010bd Thumb Code 0 entry8b.o(.ARM.Collect$$$$0000000A) - _main_init 0x080010bd Thumb Code 0 entry9a.o(.ARM.Collect$$$$0000000B) - __rt_final_cpp 0x080010c5 Thumb Code 0 entry10a.o(.ARM.Collect$$$$0000000D) - __rt_final_exit 0x080010c5 Thumb Code 0 entry11a.o(.ARM.Collect$$$$0000000F) - add1 0x080010c9 Thumb Code 4 debug.o(.emb_text) - Reset_Handler 0x080010cd Thumb Code 8 startup_stm32f030x8.o(.text) - ADC1_IRQHandler 0x080010df Thumb Code 0 startup_stm32f030x8.o(.text) - DMA1_Channel1_IRQHandler 0x080010df Thumb Code 0 startup_stm32f030x8.o(.text) - EXTI0_1_IRQHandler 0x080010df Thumb Code 0 startup_stm32f030x8.o(.text) - EXTI2_3_IRQHandler 0x080010df Thumb Code 0 startup_stm32f030x8.o(.text) - EXTI4_15_IRQHandler 0x080010df Thumb Code 0 startup_stm32f030x8.o(.text) - FLASH_IRQHandler 0x080010df Thumb Code 0 startup_stm32f030x8.o(.text) - I2C1_IRQHandler 0x080010df Thumb Code 0 startup_stm32f030x8.o(.text) - I2C2_IRQHandler 0x080010df Thumb Code 0 startup_stm32f030x8.o(.text) - RCC_IRQHandler 0x080010df Thumb Code 0 startup_stm32f030x8.o(.text) - RTC_IRQHandler 0x080010df Thumb Code 0 startup_stm32f030x8.o(.text) - SPI2_IRQHandler 0x080010df Thumb Code 0 startup_stm32f030x8.o(.text) - TIM14_IRQHandler 0x080010df Thumb Code 0 startup_stm32f030x8.o(.text) - TIM15_IRQHandler 0x080010df Thumb Code 0 startup_stm32f030x8.o(.text) - TIM16_IRQHandler 0x080010df Thumb Code 0 startup_stm32f030x8.o(.text) - TIM17_IRQHandler 0x080010df Thumb Code 0 startup_stm32f030x8.o(.text) - TIM1_BRK_UP_TRG_COM_IRQHandler 0x080010df Thumb Code 0 startup_stm32f030x8.o(.text) - TIM1_CC_IRQHandler 0x080010df Thumb Code 0 startup_stm32f030x8.o(.text) - TIM3_IRQHandler 0x080010df Thumb Code 0 startup_stm32f030x8.o(.text) - WWDG_IRQHandler 0x080010df Thumb Code 0 startup_stm32f030x8.o(.text) - __aeabi_uidiv 0x080010e9 Thumb Code 0 uidiv.o(.text) - __aeabi_uidivmod 0x080010e9 Thumb Code 44 uidiv.o(.text) - __aeabi_idiv 0x08001115 Thumb Code 0 idiv.o(.text) - __aeabi_idivmod 0x08001115 Thumb Code 40 idiv.o(.text) - __aeabi_ldivmod 0x0800113d Thumb Code 76 ldiv.o(.text) - __aeabi_llsr 0x08001189 Thumb Code 34 llushr.o(.text) - _ll_ushift_r 0x08001189 Thumb Code 0 llushr.o(.text) - __aeabi_memcpy 0x080011ab Thumb Code 36 memcpya.o(.text) - __aeabi_memcpy4 0x080011ab Thumb Code 0 memcpya.o(.text) - __aeabi_memcpy8 0x080011ab Thumb Code 0 memcpya.o(.text) - __aeabi_memset 0x080011cf Thumb Code 14 memseta.o(.text) - __aeabi_memset4 0x080011cf Thumb Code 0 memseta.o(.text) - __aeabi_memset8 0x080011cf Thumb Code 0 memseta.o(.text) - __aeabi_memclr 0x080011dd Thumb Code 4 memseta.o(.text) - __aeabi_memclr4 0x080011dd Thumb Code 0 memseta.o(.text) - __aeabi_memclr8 0x080011dd Thumb Code 0 memseta.o(.text) - _memset$wrapper 0x080011e1 Thumb Code 18 memseta.o(.text) - __aeabi_uread4 0x080011f3 Thumb Code 20 uread4.o(.text) - __rt_uread4 0x080011f3 Thumb Code 0 uread4.o(.text) - _uread4 0x080011f3 Thumb Code 0 uread4.o(.text) - __aeabi_uldivmod 0x08001207 Thumb Code 96 uldiv.o(.text) - __scatterload 0x08001269 Thumb Code 28 init.o(.text) - __scatterload_rt2 0x08001269 Thumb Code 0 init.o(.text) - __aeabi_llsl 0x0800128d Thumb Code 32 llshl.o(.text) - _ll_shift_l 0x0800128d Thumb Code 0 llshl.o(.text) - AddEventLog 0x080012ad Thumb Code 122 kmachine.o(i.AddEventLog) - AddSpace 0x08001339 Thumb Code 44 myqueue.o(i.AddSpace) - CheckEventLog 0x08001365 Thumb Code 90 kmachine.o(i.CheckEventLog) - ClearEventLog 0x080013d1 Thumb Code 28 kmachine.o(i.ClearEventLog) - DMA1_Channel2_3_IRQHandler 0x080013f5 Thumb Code 144 stm32f0xx_it.o(i.DMA1_Channel2_3_IRQHandler) - DMA1_Channel4_5_IRQHandler 0x08001495 Thumb Code 46 stm32f0xx_it.o(i.DMA1_Channel4_5_IRQHandler) - DelData 0x080014cd Thumb Code 44 myqueue.o(i.DelData) - EraseAndWriteToFlashMem 0x080014f9 Thumb Code 90 kmachine.o(i.EraseAndWriteToFlashMem) - EraseFlashMem 0x08001559 Thumb Code 32 kmachine.o(i.EraseFlashMem) - FPxCalBCC 0x0800157d Thumb Code 30 fpx.o(i.FPxCalBCC) - FPxCallBackFunc 0x0800159d Thumb Code 58 main.o(i.FPxCallBackFunc) - FPxParsePkt 0x080015e1 Thumb Code 434 fpx.o(i.FPxParsePkt) - FPxSendPkt 0x080017a5 Thumb Code 92 fpx.o(i.FPxSendPkt) - FPxSetCallBackFunc 0x0800181d Thumb Code 12 fpx.o(i.FPxSetCallBackFunc) - FPx_Init 0x0800182d Thumb Code 80 fpx.o(i.FPx_Init) - FPx_Proc 0x08001891 Thumb Code 258 fpx.o(i.FPx_Proc) - FPx_SetIOCount 0x080019b9 Thumb Code 10 fpx.o(i.FPx_SetIOCount) - GetCoilValue 0x080019f1 Thumb Code 156 kmachine.o(i.GetCoilValue) - GetContinueData 0x08001a91 Thumb Code 38 myqueue.o(i.GetContinueData) - GetContinueEmptyRoom 0x08001ab7 Thumb Code 38 myqueue.o(i.GetContinueEmptyRoom) - GetEventLogAddr 0x08001add Thumb Code 28 kmachine.o(i.GetEventLogAddr) - GetVarData 0x08001b01 Thumb Code 208 kmachine.o(i.GetVarData) - GetuS 0x08001bd9 Thumb Code 30 functions.o(i.GetuS) - HAL_Delay 0x08001c05 Thumb Code 28 stm32f0xx_hal.o(i.HAL_Delay) - HAL_GetTick 0x08001c21 Thumb Code 6 stm32f0xx_hal.o(i.HAL_GetTick) - HAL_IncTick 0x08001c2d Thumb Code 10 stm32f0xx_hal.o(i.HAL_IncTick) - HAL_Init 0x08001c3d Thumb Code 26 stm32f0xx_hal.o(i.HAL_Init) - HAL_InitTick 0x08001c5d Thumb Code 34 stm32f0xx_hal.o(i.HAL_InitTick) - HAL_MspInit 0x08001c81 Thumb Code 64 stm32f0xx_hal_msp.o(i.HAL_MspInit) - HAL_NVIC_SetPriority 0x08001cc5 Thumb Code 8 stm32f0xx_hal_cortex.o(i.HAL_NVIC_SetPriority) - HAL_RCCEx_PeriphCLKConfig 0x08001ccd Thumb Code 222 stm32f0xx_hal_rcc_ex.o(i.HAL_RCCEx_PeriphCLKConfig) - HAL_RCC_ClockConfig 0x08001db9 Thumb Code 280 stm32f0xx_hal_rcc.o(i.HAL_RCC_ClockConfig) - HAL_RCC_GetHCLKFreq 0x08001ee5 Thumb Code 6 stm32f0xx_hal_rcc.o(i.HAL_RCC_GetHCLKFreq) - HAL_RCC_GetSysClockFreq 0x08001ef1 Thumb Code 80 stm32f0xx_hal_rcc.o(i.HAL_RCC_GetSysClockFreq) - HAL_RCC_OscConfig 0x08001f71 Thumb Code 838 stm32f0xx_hal_rcc.o(i.HAL_RCC_OscConfig) - HAL_SYSTICK_CLKSourceConfig 0x080022c5 Thumb Code 20 stm32f0xx_hal_cortex.o(i.HAL_SYSTICK_CLKSourceConfig) - HAL_SYSTICK_Callback 0x080022dd Thumb Code 86 main.o(i.HAL_SYSTICK_Callback) - HAL_SYSTICK_Config 0x08002351 Thumb Code 38 stm32f0xx_hal_cortex.o(i.HAL_SYSTICK_Config) - HAL_SYSTICK_IRQHandler 0x08002381 Thumb Code 8 stm32f0xx_hal_cortex.o(i.HAL_SYSTICK_IRQHandler) - HardFault_Handler 0x08002389 Thumb Code 2 stm32f0xx_it.o(i.HardFault_Handler) - InitPLC 0x0800238d Thumb Code 68 plcfunctions.o(i.InitPLC) - InitTimer 0x080023d9 Thumb Code 56 plcfunctions.o(i.InitTimer) - InitUartstat 0x08002419 Thumb Code 30 functions.o(i.InitUartstat) - InituS 0x08002439 Thumb Code 68 functions.o(i.InituS) - KBusAddChildAddrByInfo 0x0800248d Thumb Code 104 kbus.o(i.KBusAddChildAddrByInfo) - KBusBCC 0x080024f9 Thumb Code 22 kbus.o(i.KBusBCC) - KBusCallBackFunc 0x08002511 Thumb Code 70 main.o(i.KBusCallBackFunc) - KBusCheckPacket 0x08002565 Thumb Code 234 kbus.o(i.KBusCheckPacket) - KBusInit 0x08002669 Thumb Code 80 kbus.o(i.KBusInit) - KBusMakeDefaultClildInfo 0x080026c1 Thumb Code 34 kbus.o(i.KBusMakeDefaultClildInfo) - KBusMakePacket 0x080026e9 Thumb Code 138 kbus.o(i.KBusMakePacket) - KBusMasterFunc 0x08002775 Thumb Code 424 kbus.o(i.KBusMasterFunc) - KBusMasterParsePacket 0x08002939 Thumb Code 264 kbus.o(i.KBusMasterParsePacket) - KBusParsePacket 0x08002a4d Thumb Code 114 kbus.o(i.KBusParsePacket) - KBusSearchChild 0x08002acd Thumb Code 130 kbus.o(i.KBusSearchChild) - KBusSetCallBackFunc 0x08002b59 Thumb Code 12 kbus.o(i.KBusSetCallBackFunc) - KBusSlaveCheckPacket 0x08002b69 Thumb Code 134 kbus.o(i.KBusSlaveCheckPacket) - KBusSlaveFunc 0x08002bf9 Thumb Code 84 kbus.o(i.KBusSlaveFunc) - KBusSlaveParsePacket 0x08002c59 Thumb Code 454 kbus.o(i.KBusSlaveParsePacket) - KLBCC 0x08002e39 Thumb Code 22 klink.o(i.KLBCC) - KLCheckPacket 0x08002e4f Thumb Code 50 klink.o(i.KLCheckPacket) - KLMakeRplyPacket 0x08002e81 Thumb Code 76 klink.o(i.KLMakeRplyPacket) - KLParsePacket 0x08002ecd Thumb Code 70 klink.o(i.KLParsePacket) - KLParseReqPacket 0x08002f1d Thumb Code 1844 klink.o(i.KLParseReqPacket) - KMachineInit 0x0800367d Thumb Code 94 kmachine.o(i.KMachineInit) - LL_FLASH_Program 0x0800388d Thumb Code 100 stm32f0xx_ll_flash.o(i.LL_FLASH_Program) - LL_Flash_PageErase 0x080038f5 Thumb Code 76 stm32f0xx_ll_flash.o(i.LL_Flash_PageErase) - LL_Flash_Unlock 0x08003945 Thumb Code 30 stm32f0xx_ll_flash.o(i.LL_Flash_Unlock) - LL_GPIO_Init 0x08003971 Thumb Code 164 stm32f0xx_ll_gpio.o(i.LL_GPIO_Init) - LL_RCC_GetSystemClocksFreq 0x08003a23 Thumb Code 24 stm32f0xx_ll_rcc.o(i.LL_RCC_GetSystemClocksFreq) - LL_RCC_GetUSARTClockFreq 0x08003a3d Thumb Code 76 stm32f0xx_ll_rcc.o(i.LL_RCC_GetUSARTClockFreq) - LL_SPI_Init 0x08003a91 Thumb Code 92 stm32f0xx_ll_spi.o(i.LL_SPI_Init) - LL_TIM_Init 0x08003af5 Thumb Code 108 stm32f0xx_ll_tim.o(i.LL_TIM_Init) - LL_USART_Init 0x08003b8d Thumb Code 156 stm32f0xx_ll_usart.o(i.LL_USART_Init) - LoadDefaultSysCfg 0x08003c39 Thumb Code 14 kmachine.o(i.LoadDefaultSysCfg) - LoadRunStat 0x08003c4d Thumb Code 86 kmachine.o(i.LoadRunStat) - Locate 0x08003cb1 Thumb Code 24 debug.o(i.Locate) - MX_DMA_Init 0x08003cd5 Thumb Code 38 bsp.o(i.MX_DMA_Init) - MX_GPIO_Init 0x08003cfd Thumb Code 286 bsp.o(i.MX_GPIO_Init) - MX_IWDG_Init 0x08003e31 Thumb Code 32 bsp.o(i.MX_IWDG_Init) - MX_SPI1_Init 0x08003e65 Thumb Code 196 bsp.o(i.MX_SPI1_Init) - MX_TIM6_Init 0x08003f31 Thumb Code 74 bsp.o(i.MX_TIM6_Init) - MX_USART1_UART_Init 0x08003f85 Thumb Code 278 bsp.o(i.MX_USART1_UART_Init) - MX_USART2_UART_Init 0x080040a9 Thumb Code 332 bsp.o(i.MX_USART2_UART_Init) - ModBusSlaveCheckPkg 0x08004201 Thumb Code 56 modbusrtu.o(i.ModBusSlaveCheckPkg) - ModBusSlaveParsePkg 0x08004239 Thumb Code 786 modbusrtu.o(i.ModBusSlaveParsePkg) - NMI_Handler 0x08004559 Thumb Code 2 stm32f0xx_it.o(i.NMI_Handler) - PendSV_Handler 0x080045f9 Thumb Code 24 stm32f0xx_it.o(i.PendSV_Handler) - PendSvCallBack 0x08004619 Thumb Code 56 functions.o(i.PendSvCallBack) - PopOutVal 0x08004665 Thumb Code 28 plcfunctions.o(i.PopOutVal) - ProcessPLCBinProg 0x08004685 Thumb Code 1370 plcfunctions.o(i.ProcessPLCBinProg) - ProcessTimer 0x08004be5 Thumb Code 192 plcfunctions.o(i.ProcessTimer) - PushIn 0x08004cb1 Thumb Code 130 myqueue.o(i.PushIn) - PushInVal 0x08004d35 Thumb Code 30 plcfunctions.o(i.PushInVal) - PutStr 0x08004d59 Thumb Code 22 functions.o(i.PutStr) - PutStr1 0x08004d75 Thumb Code 22 functions.o(i.PutStr1) - PutStr2 0x08004d91 Thumb Code 12 functions.o(i.PutStr2) - RCC_GetHCLKClockFreq 0x08004d9d Thumb Code 18 stm32f0xx_ll_rcc.o(i.RCC_GetHCLKClockFreq) - RCC_GetPCLK1ClockFreq 0x08004db9 Thumb Code 16 stm32f0xx_ll_rcc.o(i.RCC_GetPCLK1ClockFreq) - RCC_GetSystemClockFreq 0x08004dd1 Thumb Code 32 stm32f0xx_ll_rcc.o(i.RCC_GetSystemClockFreq) - RCC_PLL_GetFreqDomain_SYS 0x08004dfd Thumb Code 50 stm32f0xx_ll_rcc.o(i.RCC_PLL_GetFreqDomain_SYS) - ReadFlashMem 0x08004e3d Thumb Code 52 kmachine.o(i.ReadFlashMem) - ReadJumperSW 0x08004e71 Thumb Code 14 functions.o(i.ReadJumperSW) - ReadSysCfgFromFlash 0x08004e81 Thumb Code 84 kmachine.o(i.ReadSysCfgFromFlash) - RunTimer 0x08004ef1 Thumb Code 68 plcfunctions.o(i.RunTimer) - SPI1_IRQHandler 0x08004f3d Thumb Code 8 stm32f0xx_it.o(i.SPI1_IRQHandler) - SPI1_IRQ_CallBack 0x08004f45 Thumb Code 164 functions.o(i.SPI1_IRQ_CallBack) - SVC_Handler 0x08005005 Thumb Code 2 stm32f0xx_it.o(i.SVC_Handler) - SaveRunStat 0x08005009 Thumb Code 108 kmachine.o(i.SaveRunStat) - SendPacket 0x08005089 Thumb Code 48 functions.o(i.SendPacket) - SetCoilValue 0x08005115 Thumb Code 134 kmachine.o(i.SetCoilValue) - SetErr2Led 0x080051a5 Thumb Code 18 functions.o(i.SetErr2Led) - SetErrLed 0x080051bd Thumb Code 18 functions.o(i.SetErrLed) - SetOutStat 0x080051d5 Thumb Code 18 functions.o(i.SetOutStat) - SetRunLed 0x080051ed Thumb Code 18 functions.o(i.SetRunLed) - SetVarData 0x08005205 Thumb Code 196 kmachine.o(i.SetVarData) - ShowInitInfo 0x080052cd Thumb Code 250 debug.o(i.ShowInitInfo) - StartPLC 0x08005451 Thumb Code 98 plcfunctions.o(i.StartPLC) - StopPLC 0x080054c1 Thumb Code 54 plcfunctions.o(i.StopPLC) - StopTimer 0x08005501 Thumb Code 60 plcfunctions.o(i.StopTimer) - SysTick_Handler 0x08005545 Thumb Code 12 stm32f0xx_it.o(i.SysTick_Handler) - SystemClock_Config 0x08005551 Thumb Code 142 bsp.o(i.SystemClock_Config) - SystemInit 0x080055f9 Thumb Code 78 system_stm32f0xx.o(i.SystemInit) - TIM6_IRQHandler 0x08005655 Thumb Code 18 stm32f0xx_it.o(i.TIM6_IRQHandler) - USART1_IRQHandler 0x0800566d Thumb Code 110 stm32f0xx_it.o(i.USART1_IRQHandler) - USART2_IRQHandler 0x080056f5 Thumb Code 68 stm32f0xx_it.o(i.USART2_IRQHandler) - Uart1RecvDone 0x08005741 Thumb Code 22 functions.o(i.Uart1RecvDone) - Uart1SendDMA 0x08005761 Thumb Code 82 functions.o(i.Uart1SendDMA) - Uart1SendDone 0x080057c1 Thumb Code 10 functions.o(i.Uart1SendDone) - Uart1TriggerSendDMA 0x080057d1 Thumb Code 42 functions.o(i.Uart1TriggerSendDMA) - Uart2RecvDMA 0x08005801 Thumb Code 82 functions.o(i.Uart2RecvDMA) - Uart2RecvDone 0x08005861 Thumb Code 44 functions.o(i.Uart2RecvDone) - Uart2SendDMA 0x080058a1 Thumb Code 82 functions.o(i.Uart2SendDMA) - Uart2SendDone 0x08005901 Thumb Code 10 functions.o(i.Uart2SendDone) - WriteFactoryData 0x08005911 Thumb Code 22 kmachine.o(i.WriteFactoryData) - WriteNewApp 0x0800592d Thumb Code 28 kmachine.o(i.WriteNewApp) - WriteNewAppInfo 0x0800594d Thumb Code 16 kmachine.o(i.WriteNewAppInfo) - WriteProgram 0x08005961 Thumb Code 50 kmachine.o(i.WriteProgram) - WriteSysCfgToFlash 0x080059a1 Thumb Code 96 kmachine.o(i.WriteSysCfgToFlash) - WriteToFlashMemNoErase 0x08005a0d Thumb Code 76 kmachine.o(i.WriteToFlashMemNoErase) - _Error_Handler 0x08005a5d Thumb Code 2 main.o(i._Error_Handler) - __0sprintf$8 0x08005a61 Thumb Code 36 printf8.o(i.__0sprintf$8) - __1sprintf$8 0x08005a61 Thumb Code 0 printf8.o(i.__0sprintf$8) - __2sprintf 0x08005a61 Thumb Code 0 printf8.o(i.__0sprintf$8) - __ARM_common_switch8 0x08005a89 Thumb Code 26 modbusrtu.o(i.__ARM_common_switch8) - __scatterload_copy 0x08005aa3 Thumb Code 14 handlers.o(i.__scatterload_copy) - __scatterload_null 0x08005ab1 Thumb Code 2 handlers.o(i.__scatterload_null) - __scatterload_zeroinit 0x08005ab3 Thumb Code 14 handlers.o(i.__scatterload_zeroinit) - clearscreen 0x08005f41 Thumb Code 12 debug.o(i.clearscreen) - crc16bitbybit 0x08005f59 Thumb Code 50 functions.o(i.crc16bitbybit) - crc16table 0x08005f95 Thumb Code 42 functions.o(i.crc16table) - crc16tablefast 0x08005fc5 Thumb Code 54 modbusrtu.o(i.crc16tablefast) - crc_check 0x08006005 Thumb Code 34 functions.o(i.crc_check) - initQueue 0x08006031 Thumb Code 22 myqueue.o(i.initQueue) - logData 0x08006049 Thumb Code 30 functions.o(i.logData) - main 0x0800606d Thumb Code 1232 main.o(i.main) - buf1 0x08006548 Data 16 debug.o(.constdata) - crc16_table 0x0800655e Data 512 functions.o(.constdata) - crctablehi 0x0800675e Data 256 functions.o(.constdata) - crctablelo 0x0800685e Data 256 functions.o(.constdata) - crctalbeabs 0x0800695e Data 32 modbusrtu.o(.constdata) - KMInfoBlock 0x0800697e Data 24 kmachine.o(.constdata) - KMDefaultSysCfg 0x08006998 Data 128 kmachine.o(.constdata) - AHBPrescTable 0x08006a4c Data 16 system_stm32f0xx.o(.constdata) - APBPrescTable 0x08006a5c Data 8 system_stm32f0xx.o(.constdata) - Region$$Table$$Base 0x08006a64 Number 0 anon$$obj.o(Region$$Table) - Region$$Table$$Limit 0x08006a84 Number 0 anon$$obj.o(Region$$Table) - sprintftime 0x200000c0 Data 4 debug.o(.data) - putstrtime 0x200000c4 Data 4 debug.o(.data) - LineCount 0x200000c8 Data 4 debug.o(.data) - Uart1baudval 0x200000cc Data 4 debug.o(.data) - nCount5 0x200000d0 Data 4 debug.o(.data) - TickFreq 0x200000d8 Data 4 functions.o(.data) - bSPI1Recving 0x200000dc Data 1 functions.o(.data) - bSPI1RecvDone 0x200000dd Data 1 functions.o(.data) - nSPI1RecvPos 0x200000de Data 1 functions.o(.data) - nSPI1RecvLenInBuf 0x200000df Data 1 functions.o(.data) - nSPI1ToSendLen 0x200000e0 Data 1 functions.o(.data) - nSPI1SentLen 0x200000e1 Data 1 functions.o(.data) - bSPI1Sending 0x200000e2 Data 1 functions.o(.data) - bSPI1SendDone 0x200000e3 Data 1 functions.o(.data) - ClkuS 0x200000e4 Data 2 functions.o(.data) - nCurTick 0x200000e8 Data 4 functions.o(.data) - CurTickuS 0x200000ec Data 4 functions.o(.data) - CoreClkMHz 0x200000f0 Data 4 functions.o(.data) - TickPriodClk 0x200000f4 Data 4 functions.o(.data) - TickPrioduS 0x200000f8 Data 4 functions.o(.data) - PendSvCount 0x200000fc Data 4 globaldef.o(.data) - Uart1Baud 0x20000100 Data 4 globaldef.o(.data) - Uart2Baud 0x20000104 Data 4 globaldef.o(.data) - Uart1RecvBuf1DataLen 0x20000108 Data 4 globaldef.o(.data) - Uart2RecvBuf1DataLen 0x2000010c Data 4 globaldef.o(.data) - Uart1BaudGot 0x20000110 Data 4 globaldef.o(.data) - Uart1BaudFirstGot 0x20000114 Data 4 globaldef.o(.data) - bKBusMaster 0x20000118 Data 1 kbus.o(.data) - bKBusSlave 0x20000119 Data 1 kbus.o(.data) - KBusDiagnosis 0x2000011a Data 1 kbus.o(.data) - KBusSnapPos 0x2000011b Data 1 kbus.o(.data) - nStationID 0x2000011c Data 1 kbus.o(.data) - nCurPollId 0x2000011d Data 1 kbus.o(.data) - nSeq 0x2000011e Data 1 kbus.o(.data) - KBusMasterRecved 0x2000011f Data 1 kbus.o(.data) - KBusMasterRecvOK 0x20000120 Data 1 kbus.o(.data) - KBusSlaveRecved 0x20000121 Data 1 kbus.o(.data) - nClientDataIndex 0x20000122 Data 1 kbus.o(.data) - nChilds 0x20000123 Data 1 kbus.o(.data) - KBusSendTimeuS 0x20000124 Data 4 kbus.o(.data) - KBusRecvTimeuS 0x20000128 Data 4 kbus.o(.data) - KBusDelayuS 0x2000012c Data 4 kbus.o(.data) - KBusMaxDelayuS 0x20000130 Data 4 kbus.o(.data) - nCount2 0x20000134 Data 4 kbus.o(.data) - TimeOutCount 0x20000138 Data 4 kbus.o(.data) - LastCircleStartTime 0x2000013c Data 4 kbus.o(.data) - CircleTime 0x20000140 Data 4 kbus.o(.data) - ThisuS 0x20000144 Data 4 kbus.o(.data) - SendTime 0x20000148 Data 4 kbus.o(.data) - nSlaveTick 0x2000014c Data 4 kbus.o(.data) - nKLStationId 0x20000150 Data 1 klink.o(.data) - nKLStatus 0x20000151 Data 1 klink.o(.data) - KLThisuS 0x20000154 Data 4 klink.o(.data) - KLRecvTimeuS 0x20000158 Data 4 klink.o(.data) - MyAddr 0x2000015c Data 1 modbusrtu.o(.data) - nSizeProg1 0x20000160 Data 4 plcfunctions.o(.data) - nMaxRunStatIndex 0x20000164 Data 4 kmachine.o(.data) - nMaxRunStatSeq 0x20000168 Data 4 kmachine.o(.data) - nNextRunStatSpace 0x2000016c Data 4 kmachine.o(.data) - nEventCount 0x20000170 Data 4 kmachine.o(.data) - nEventMaxSeq 0x20000174 Data 4 kmachine.o(.data) - nMaxCurTime 0x20000178 Data 4 kmachine.o(.data) - nEventMinIndex 0x2000017c Data 4 kmachine.o(.data) - nEventMaxIndex 0x20000180 Data 4 kmachine.o(.data) - nEventNextSpace 0x20000184 Data 4 kmachine.o(.data) - SlowFlicker 0x20000188 Data 1 main.o(.data) - FastFlicker 0x20000189 Data 1 main.o(.data) - Uart1IdelTimer 0x2000018c Data 4 main.o(.data) - pProgs 0x20000190 Data 4 main.o(.data) - us1 0x20000198 Data 4 main.o(.data) - us2 0x2000019c Data 4 main.o(.data) - us3 0x200001a0 Data 4 main.o(.data) - us4 0x200001a4 Data 4 main.o(.data) - us5 0x200001a8 Data 4 main.o(.data) - us6 0x200001ac Data 4 main.o(.data) - SystemCoreClock 0x200001b0 Data 4 system_stm32f0xx.o(.data) - uwTick 0x200001b4 Data 4 stm32f0xx_hal.o(.data) - ADC_TEMP 0x200001b8 Data 32 debug.o(.bss) - str1 0x200001d8 Data 256 debug.o(.bss) - SPI1RecvBuf 0x200002d8 Data 64 functions.o(.bss) - SPI1SendBuf 0x20000318 Data 64 functions.o(.bss) - Uart1Stat 0x20000358 Data 148 globaldef.o(.bss) - Uart2Stat 0x200003ec Data 148 globaldef.o(.bss) - Uart1RecvBuf1 0x20000480 Data 128 globaldef.o(.bss) - Uart2RecvBuf1 0x20000500 Data 128 globaldef.o(.bss) - PacketBuf1 0x20000580 Data 128 kbus.o(.bss) - PacketBuf2 0x20000600 Data 128 kbus.o(.bss) - KBusChnStats 0x20000680 Data 768 kbus.o(.bss) - Datas 0x20000980 Data 128 kbus.o(.bss) - KBus1 0x20000a00 Data 536 kbus.o(.bss) - KBusMem 0x20000c18 Data 192 kbus.o(.bss) - KLBufferOut 0x20000cd8 Data 16 klink.o(.bss) - KLPacketBuf2 0x20000ce8 Data 256 klink.o(.bss) - Pkgbuf 0x20000de8 Data 128 modbusrtu.o(.bss) - PLCMem 0x20000e68 Data 520 plcfunctions.o(.bss) - storedKMSysCfg 0x20001070 Data 128 kmachine.o(.bss) - KMem 0x200010f0 Data 1972 kmachine.o(.bss) - KMRunStat 0x200018a4 Data 32 kmachine.o(.bss) - Uart1RxBuf 0x200018c4 Data 128 main.o(.bss) - Uart1TxBuf 0x20001944 Data 260 main.o(.bss) - Uart2RxBuf 0x20001a48 Data 64 main.o(.bss) - Uart2TxBuf 0x20001a88 Data 64 main.o(.bss) - PktBuf2 0x20001ac8 Data 64 fpx.o(.bss) - FPxStat 0x20001b08 Data 28 fpx.o(.bss) - FPxMem 0x20001b24 Data 64 fpx.o(.bss) - __initial_sp 0x20001f68 Data 0 startup_stm32f030x8.o(STACK) - - - -============================================================================== - -Memory Map of the image - - Image Entry point : 0x080010b5 - - Load Region LR_IROM1 (Base: 0x08001000, Size: 0x00005b7c, Max: 0x0000f000, ABSOLUTE) - - Execution Region ER_IROM1 (Base: 0x08001000, Size: 0x00005a84, Max: 0x0000f000, ABSOLUTE) - - Base Addr Size Type Attr Idx E Section Name Object - - 0x08001000 0x000000b4 Data RO 3 RESET startup_stm32f030x8.o - 0x080010b4 0x00000000 Code RO 4162 * .ARM.Collect$$$$00000000 mc_p.l(entry.o) - 0x080010b4 0x00000004 Code RO 4442 .ARM.Collect$$$$00000001 mc_p.l(entry2.o) - 0x080010b8 0x00000004 Code RO 4445 .ARM.Collect$$$$00000004 mc_p.l(entry5.o) - 0x080010bc 0x00000000 Code RO 4447 .ARM.Collect$$$$00000008 mc_p.l(entry7b.o) - 0x080010bc 0x00000000 Code RO 4449 .ARM.Collect$$$$0000000A mc_p.l(entry8b.o) - 0x080010bc 0x00000008 Code RO 4450 .ARM.Collect$$$$0000000B mc_p.l(entry9a.o) - 0x080010c4 0x00000000 Code RO 4452 .ARM.Collect$$$$0000000D mc_p.l(entry10a.o) - 0x080010c4 0x00000000 Code RO 4454 .ARM.Collect$$$$0000000F mc_p.l(entry11a.o) - 0x080010c4 0x00000004 Code RO 4443 .ARM.Collect$$$$00002712 mc_p.l(entry2.o) - 0x080010c8 0x00000004 Code RO 12 .emb_text debug.o - 0x080010cc 0x0000001c Code RO 4 .text startup_stm32f030x8.o - 0x080010e8 0x0000002c Code RO 4165 .text mc_p.l(uidiv.o) - 0x08001114 0x00000028 Code RO 4167 .text mc_p.l(idiv.o) - 0x0800113c 0x0000004c Code RO 4169 .text mc_p.l(ldiv.o) - 0x08001188 0x00000022 Code RO 4171 .text mc_p.l(llushr.o) - 0x080011aa 0x00000024 Code RO 4173 .text mc_p.l(memcpya.o) - 0x080011ce 0x00000024 Code RO 4175 .text mc_p.l(memseta.o) - 0x080011f2 0x00000014 Code RO 4440 .text mc_p.l(uread4.o) - 0x08001206 0x00000060 Code RO 4459 .text mc_p.l(uldiv.o) - 0x08001266 0x00000002 PAD - 0x08001268 0x00000024 Code RO 4472 .text mc_p.l(init.o) - 0x0800128c 0x00000020 Code RO 4475 .text mc_p.l(llshl.o) - 0x080012ac 0x0000008c Code RO 1522 i.AddEventLog kmachine.o - 0x08001338 0x0000002c Code RO 1193 i.AddSpace myqueue.o - 0x08001364 0x0000006c Code RO 1523 i.CheckEventLog kmachine.o - 0x080013d0 0x00000024 Code RO 1525 i.ClearEventLog kmachine.o - 0x080013f4 0x000000a0 Code RO 2015 i.DMA1_Channel2_3_IRQHandler stm32f0xx_it.o - 0x08001494 0x00000038 Code RO 2016 i.DMA1_Channel4_5_IRQHandler stm32f0xx_it.o - 0x080014cc 0x0000002c Code RO 1195 i.DelData myqueue.o - 0x080014f8 0x00000060 Code RO 1526 i.EraseAndWriteToFlashMem kmachine.o - 0x08001558 0x00000024 Code RO 1527 i.EraseFlashMem kmachine.o - 0x0800157c 0x0000001e Code RO 2204 i.FPxCalBCC fpx.o - 0x0800159a 0x00000002 PAD - 0x0800159c 0x00000044 Code RO 2109 i.FPxCallBackFunc main.o - 0x080015e0 0x000001c4 Code RO 2206 i.FPxParsePkt fpx.o - 0x080017a4 0x00000078 Code RO 2207 i.FPxSendPkt fpx.o - 0x0800181c 0x00000010 Code RO 2208 i.FPxSetCallBackFunc fpx.o - 0x0800182c 0x00000064 Code RO 2209 i.FPx_Init fpx.o - 0x08001890 0x00000128 Code RO 2210 i.FPx_Proc fpx.o - 0x080019b8 0x00000010 Code RO 2211 i.FPx_SetIOCount fpx.o - 0x080019c8 0x00000014 Code RO 1112 i.GetBitValue modbusrtu.o - 0x080019dc 0x00000014 Code RO 1528 i.GetBitValue kmachine.o - 0x080019f0 0x000000a0 Code RO 1529 i.GetCoilValue kmachine.o - 0x08001a90 0x00000026 Code RO 1197 i.GetContinueData myqueue.o - 0x08001ab6 0x00000026 Code RO 1198 i.GetContinueEmptyRoom myqueue.o - 0x08001adc 0x00000024 Code RO 1530 i.GetEventLogAddr kmachine.o - 0x08001b00 0x000000d8 Code RO 1531 i.GetVarData kmachine.o - 0x08001bd8 0x0000002c Code RO 600 i.GetuS functions.o - 0x08001c04 0x0000001c Code RO 2800 i.HAL_Delay stm32f0xx_hal.o - 0x08001c20 0x0000000c Code RO 2804 i.HAL_GetTick stm32f0xx_hal.o - 0x08001c2c 0x00000010 Code RO 2808 i.HAL_IncTick stm32f0xx_hal.o - 0x08001c3c 0x00000020 Code RO 2809 i.HAL_Init stm32f0xx_hal.o - 0x08001c5c 0x00000022 Code RO 2810 i.HAL_InitTick stm32f0xx_hal.o - 0x08001c7e 0x00000002 PAD - 0x08001c80 0x00000044 Code RO 1489 i.HAL_MspInit stm32f0xx_hal_msp.o - 0x08001cc4 0x00000008 Code RO 3558 i.HAL_NVIC_SetPriority stm32f0xx_hal_cortex.o - 0x08001ccc 0x000000ec Code RO 2765 i.HAL_RCCEx_PeriphCLKConfig stm32f0xx_hal_rcc_ex.o - 0x08001db8 0x0000012c Code RO 2672 i.HAL_RCC_ClockConfig stm32f0xx_hal_rcc.o - 0x08001ee4 0x0000000c Code RO 2677 i.HAL_RCC_GetHCLKFreq stm32f0xx_hal_rcc.o - 0x08001ef0 0x00000080 Code RO 2680 i.HAL_RCC_GetSysClockFreq stm32f0xx_hal_rcc.o - 0x08001f70 0x00000354 Code RO 2683 i.HAL_RCC_OscConfig stm32f0xx_hal_rcc.o - 0x080022c4 0x00000018 Code RO 3560 i.HAL_SYSTICK_CLKSourceConfig stm32f0xx_hal_cortex.o - 0x080022dc 0x00000074 Code RO 2110 i.HAL_SYSTICK_Callback main.o - 0x08002350 0x00000030 Code RO 3562 i.HAL_SYSTICK_Config stm32f0xx_hal_cortex.o - 0x08002380 0x00000008 Code RO 3563 i.HAL_SYSTICK_IRQHandler stm32f0xx_hal_cortex.o - 0x08002388 0x00000002 Code RO 2017 i.HardFault_Handler stm32f0xx_it.o - 0x0800238a 0x00000002 PAD - 0x0800238c 0x0000004c Code RO 1272 i.InitPLC plcfunctions.o - 0x080023d8 0x00000040 Code RO 1273 i.InitTimer plcfunctions.o - 0x08002418 0x0000001e Code RO 248 i.InitUartstat functions.o - 0x08002436 0x00000002 PAD - 0x08002438 0x00000054 Code RO 249 i.InituS functions.o - 0x0800248c 0x0000006c Code RO 749 i.KBusAddChildAddrByInfo kbus.o - 0x080024f8 0x00000016 Code RO 750 i.KBusBCC kbus.o - 0x0800250e 0x00000002 PAD - 0x08002510 0x00000054 Code RO 2112 i.KBusCallBackFunc main.o - 0x08002564 0x00000104 Code RO 751 i.KBusCheckPacket kbus.o - 0x08002668 0x00000058 Code RO 753 i.KBusInit kbus.o - 0x080026c0 0x00000028 Code RO 755 i.KBusMakeDefaultClildInfo kbus.o - 0x080026e8 0x0000008a Code RO 756 i.KBusMakePacket kbus.o - 0x08002772 0x00000002 PAD - 0x08002774 0x000001c4 Code RO 757 i.KBusMasterFunc kbus.o - 0x08002938 0x00000114 Code RO 758 i.KBusMasterParsePacket kbus.o - 0x08002a4c 0x00000080 Code RO 759 i.KBusParsePacket kbus.o - 0x08002acc 0x0000008c Code RO 761 i.KBusSearchChild kbus.o - 0x08002b58 0x00000010 Code RO 762 i.KBusSetCallBackFunc kbus.o - 0x08002b68 0x00000090 Code RO 763 i.KBusSlaveCheckPacket kbus.o - 0x08002bf8 0x00000060 Code RO 764 i.KBusSlaveFunc kbus.o - 0x08002c58 0x000001e0 Code RO 765 i.KBusSlaveParsePacket kbus.o - 0x08002e38 0x00000016 Code RO 951 i.KLBCC klink.o - 0x08002e4e 0x00000032 Code RO 952 i.KLCheckPacket klink.o - 0x08002e80 0x0000004c Code RO 953 i.KLMakeRplyPacket klink.o - 0x08002ecc 0x00000050 Code RO 954 i.KLParsePacket klink.o - 0x08002f1c 0x00000760 Code RO 955 i.KLParseReqPacket klink.o - 0x0800367c 0x00000070 Code RO 1532 i.KMachineInit kmachine.o - 0x080036ec 0x00000018 Code RO 1830 i.LL_AHB1_GRP1_EnableClock bsp.o - 0x08003704 0x00000018 Code RO 1831 i.LL_APB1_GRP1_EnableClock bsp.o - 0x0800371c 0x00000018 Code RO 1832 i.LL_APB1_GRP2_EnableClock bsp.o - 0x08003734 0x0000002c Code RO 254 i.LL_DMA_ConfigAddresses functions.o - 0x08003760 0x00000018 Code RO 255 i.LL_DMA_DisableChannel functions.o - 0x08003778 0x00000018 Code RO 256 i.LL_DMA_EnableChannel functions.o - 0x08003790 0x00000018 Code RO 257 i.LL_DMA_EnableIT_TC functions.o - 0x080037a8 0x0000001c Code RO 1833 i.LL_DMA_SetChannelPriorityLevel bsp.o - 0x080037c4 0x0000001c Code RO 258 i.LL_DMA_SetDataLength functions.o - 0x080037e0 0x00000020 Code RO 1834 i.LL_DMA_SetDataTransferDirection bsp.o - 0x08003800 0x0000001c Code RO 1835 i.LL_DMA_SetMemoryIncMode bsp.o - 0x0800381c 0x0000001c Code RO 1836 i.LL_DMA_SetMemorySize bsp.o - 0x08003838 0x0000001c Code RO 1837 i.LL_DMA_SetMode bsp.o - 0x08003854 0x0000001c Code RO 1838 i.LL_DMA_SetPeriphIncMode bsp.o - 0x08003870 0x0000001c Code RO 1839 i.LL_DMA_SetPeriphSize bsp.o - 0x0800388c 0x00000068 Code RO 4129 i.LL_FLASH_Program stm32f0xx_ll_flash.o - 0x080038f4 0x00000050 Code RO 4130 i.LL_Flash_PageErase stm32f0xx_ll_flash.o - 0x08003944 0x0000002c Code RO 4131 i.LL_Flash_Unlock stm32f0xx_ll_flash.o - 0x08003970 0x000000a4 Code RO 2322 i.LL_GPIO_Init stm32f0xx_ll_gpio.o - 0x08003a14 0x0000000e Code RO 2212 i.LL_GPIO_IsInputPinSet fpx.o - 0x08003a22 0x00000018 Code RO 2610 i.LL_RCC_GetSystemClocksFreq stm32f0xx_ll_rcc.o - 0x08003a3a 0x00000002 PAD - 0x08003a3c 0x00000054 Code RO 2611 i.LL_RCC_GetUSARTClockFreq stm32f0xx_ll_rcc.o - 0x08003a90 0x00000064 Code RO 2496 i.LL_SPI_Init stm32f0xx_ll_spi.o - 0x08003af4 0x00000084 Code RO 4015 i.LL_TIM_Init stm32f0xx_ll_tim.o - 0x08003b78 0x00000014 Code RO 1840 i.LL_USART_ConfigAsyncMode bsp.o - 0x08003b8c 0x000000ac Code RO 2564 i.LL_USART_Init stm32f0xx_ll_usart.o - 0x08003c38 0x00000014 Code RO 1534 i.LoadDefaultSysCfg kmachine.o - 0x08003c4c 0x00000064 Code RO 1536 i.LoadRunStat kmachine.o - 0x08003cb0 0x00000024 Code RO 15 i.Locate debug.o - 0x08003cd4 0x00000026 Code RO 1842 i.MX_DMA_Init bsp.o - 0x08003cfa 0x00000002 PAD - 0x08003cfc 0x00000134 Code RO 1843 i.MX_GPIO_Init bsp.o - 0x08003e30 0x00000034 Code RO 1844 i.MX_IWDG_Init bsp.o - 0x08003e64 0x000000cc Code RO 1845 i.MX_SPI1_Init bsp.o - 0x08003f30 0x00000054 Code RO 1847 i.MX_TIM6_Init bsp.o - 0x08003f84 0x00000124 Code RO 1848 i.MX_USART1_UART_Init bsp.o - 0x080040a8 0x00000158 Code RO 1849 i.MX_USART2_UART_Init bsp.o - 0x08004200 0x00000038 Code RO 1114 i.ModBusSlaveCheckPkg modbusrtu.o - 0x08004238 0x00000320 Code RO 1115 i.ModBusSlaveParsePkg modbusrtu.o - 0x08004558 0x00000002 Code RO 2018 i.NMI_Handler stm32f0xx_it.o - 0x0800455a 0x00000002 PAD - 0x0800455c 0x00000014 Code RO 1850 i.NVIC_EnableIRQ bsp.o - 0x08004570 0x00000044 Code RO 1851 i.NVIC_SetPriority bsp.o - 0x080045b4 0x00000044 Code RO 3564 i.NVIC_SetPriority stm32f0xx_hal_cortex.o - 0x080045f8 0x00000020 Code RO 2019 i.PendSV_Handler stm32f0xx_it.o - 0x08004618 0x0000004c Code RO 261 i.PendSvCallBack functions.o - 0x08004664 0x00000020 Code RO 1275 i.PopOutVal plcfunctions.o - 0x08004684 0x00000560 Code RO 1276 i.ProcessPLCBinProg plcfunctions.o - 0x08004be4 0x000000cc Code RO 1277 i.ProcessTimer plcfunctions.o - 0x08004cb0 0x00000082 Code RO 1201 i.PushIn myqueue.o - 0x08004d32 0x00000002 PAD - 0x08004d34 0x00000024 Code RO 1278 i.PushInVal plcfunctions.o - 0x08004d58 0x0000001c Code RO 264 i.PutStr functions.o - 0x08004d74 0x0000001c Code RO 265 i.PutStr1 functions.o - 0x08004d90 0x0000000c Code RO 266 i.PutStr2 functions.o - 0x08004d9c 0x0000001c Code RO 2612 i.RCC_GetHCLKClockFreq stm32f0xx_ll_rcc.o - 0x08004db8 0x00000018 Code RO 2613 i.RCC_GetPCLK1ClockFreq stm32f0xx_ll_rcc.o - 0x08004dd0 0x0000002c Code RO 2614 i.RCC_GetSystemClockFreq stm32f0xx_ll_rcc.o - 0x08004dfc 0x00000040 Code RO 2615 i.RCC_PLL_GetFreqDomain_SYS stm32f0xx_ll_rcc.o - 0x08004e3c 0x00000034 Code RO 1538 i.ReadFlashMem kmachine.o - 0x08004e70 0x0000000e Code RO 274 i.ReadJumperSW functions.o - 0x08004e7e 0x00000002 PAD - 0x08004e80 0x00000060 Code RO 1540 i.ReadSysCfgFromFlash kmachine.o - 0x08004ee0 0x00000010 Code RO 1116 i.ResetBit modbusrtu.o - 0x08004ef0 0x0000004c Code RO 1280 i.RunTimer plcfunctions.o - 0x08004f3c 0x00000008 Code RO 2020 i.SPI1_IRQHandler stm32f0xx_it.o - 0x08004f44 0x000000c0 Code RO 275 i.SPI1_IRQ_CallBack functions.o - 0x08005004 0x00000002 Code RO 2021 i.SVC_Handler stm32f0xx_it.o - 0x08005006 0x00000002 PAD - 0x08005008 0x00000080 Code RO 1541 i.SaveRunStat kmachine.o - 0x08005088 0x00000038 Code RO 276 i.SendPacket functions.o - 0x080050c0 0x00000010 Code RO 1117 i.SetAddrBit modbusrtu.o - 0x080050d0 0x00000018 Code RO 956 i.SetBitValue klink.o - 0x080050e8 0x00000012 Code RO 1118 i.SetBitValue modbusrtu.o - 0x080050fa 0x00000018 Code RO 1542 i.SetBitValue kmachine.o - 0x08005112 0x00000002 PAD - 0x08005114 0x00000090 Code RO 1543 i.SetCoilValue kmachine.o - 0x080051a4 0x00000018 Code RO 277 i.SetErr2Led functions.o - 0x080051bc 0x00000018 Code RO 278 i.SetErrLed functions.o - 0x080051d4 0x00000018 Code RO 279 i.SetOutStat functions.o - 0x080051ec 0x00000018 Code RO 280 i.SetRunLed functions.o - 0x08005204 0x000000c8 Code RO 1544 i.SetVarData kmachine.o - 0x080052cc 0x00000184 Code RO 18 i.ShowInitInfo debug.o - 0x08005450 0x00000070 Code RO 1282 i.StartPLC plcfunctions.o - 0x080054c0 0x00000040 Code RO 1283 i.StopPLC plcfunctions.o - 0x08005500 0x00000044 Code RO 1284 i.StopTimer plcfunctions.o - 0x08005544 0x0000000c Code RO 2022 i.SysTick_Handler stm32f0xx_it.o - 0x08005550 0x000000a8 Code RO 1852 i.SystemClock_Config bsp.o - 0x080055f8 0x0000005c Code RO 2286 i.SystemInit system_stm32f0xx.o - 0x08005654 0x00000018 Code RO 2023 i.TIM6_IRQHandler stm32f0xx_it.o - 0x0800566c 0x00000088 Code RO 2024 i.USART1_IRQHandler stm32f0xx_it.o - 0x080056f4 0x0000004c Code RO 2025 i.USART2_IRQHandler stm32f0xx_it.o - 0x08005740 0x00000020 Code RO 286 i.Uart1RecvDone functions.o - 0x08005760 0x00000060 Code RO 287 i.Uart1SendDMA functions.o - 0x080057c0 0x00000010 Code RO 288 i.Uart1SendDone functions.o - 0x080057d0 0x00000030 Code RO 289 i.Uart1TriggerSendDMA functions.o - 0x08005800 0x00000060 Code RO 290 i.Uart2RecvDMA functions.o - 0x08005860 0x00000040 Code RO 291 i.Uart2RecvDone functions.o - 0x080058a0 0x00000060 Code RO 292 i.Uart2SendDMA functions.o - 0x08005900 0x00000010 Code RO 293 i.Uart2SendDone functions.o - 0x08005910 0x0000001c Code RO 1545 i.WriteFactoryData kmachine.o - 0x0800592c 0x00000020 Code RO 1546 i.WriteNewApp kmachine.o - 0x0800594c 0x00000014 Code RO 1547 i.WriteNewAppInfo kmachine.o - 0x08005960 0x00000040 Code RO 1548 i.WriteProgram kmachine.o - 0x080059a0 0x0000006c Code RO 1549 i.WriteSysCfgToFlash kmachine.o - 0x08005a0c 0x00000050 Code RO 1550 i.WriteToFlashMemNoErase kmachine.o - 0x08005a5c 0x00000002 Code RO 2113 i._Error_Handler main.o - 0x08005a5e 0x00000002 PAD - 0x08005a60 0x00000028 Code RO 4388 i.__0sprintf$8 mc_p.l(printf8.o) - 0x08005a88 0x0000001a Code RO 1170 i.__ARM_common_switch8 modbusrtu.o - 0x08005aa2 0x0000000e Code RO 4486 i.__scatterload_copy mc_p.l(handlers.o) - 0x08005ab0 0x00000002 Code RO 4487 i.__scatterload_null mc_p.l(handlers.o) - 0x08005ab2 0x0000000e Code RO 4488 i.__scatterload_zeroinit mc_p.l(handlers.o) - 0x08005ac0 0x00000428 Code RO 4393 i._printf_core mc_p.l(printf8.o) - 0x08005ee8 0x00000020 Code RO 4394 i._printf_post_padding mc_p.l(printf8.o) - 0x08005f08 0x0000002c Code RO 4395 i._printf_pre_padding mc_p.l(printf8.o) - 0x08005f34 0x0000000a Code RO 4397 i._sputc mc_p.l(printf8.o) - 0x08005f3e 0x00000002 PAD - 0x08005f40 0x00000018 Code RO 20 i.clearscreen debug.o - 0x08005f58 0x0000003c Code RO 297 i.crc16bitbybit functions.o - 0x08005f94 0x00000030 Code RO 298 i.crc16table functions.o - 0x08005fc4 0x00000040 Code RO 1119 i.crc16tablefast modbusrtu.o - 0x08006004 0x0000002c Code RO 299 i.crc_check functions.o - 0x08006030 0x00000016 Code RO 1203 i.initQueue myqueue.o - 0x08006046 0x00000002 PAD - 0x08006048 0x00000024 Code RO 301 i.logData functions.o - 0x0800606c 0x000004dc Code RO 2114 i.main main.o - 0x08006548 0x00000010 Data RO 22 .constdata debug.o - 0x08006558 0x00000406 Data RO 304 .constdata functions.o - 0x0800695e 0x00000020 Data RO 1122 .constdata modbusrtu.o - 0x0800697e 0x00000018 Data RO 1555 .constdata kmachine.o - 0x08006996 0x00000002 PAD - 0x08006998 0x00000090 Data RO 1556 .constdata kmachine.o - 0x08006a28 0x00000005 Data RO 1853 .constdata bsp.o - 0x08006a2d 0x00000005 Data RO 2026 .constdata stm32f0xx_it.o - 0x08006a32 0x00000002 PAD - 0x08006a34 0x00000018 Data RO 2117 .constdata main.o - 0x08006a4c 0x00000010 Data RO 2287 .constdata system_stm32f0xx.o - 0x08006a5c 0x00000008 Data RO 2288 .constdata system_stm32f0xx.o - 0x08006a64 0x00000020 Data RO 4484 Region$$Table anon$$obj.o - - - Execution Region RW_IRAM1 (Base: 0x200000c0, Size: 0x00001ea8, Max: 0x00001f40, ABSOLUTE) - - Base Addr Size Type Attr Idx E Section Name Object - - 0x200000c0 0x00000018 Data RW 24 .data debug.o - 0x200000d8 0x00000004 Data RW 307 .data functions.o - 0x200000dc 0x00000020 Data RW 308 .data functions.o - 0x200000fc 0x00000004 Data RW 722 .data globaldef.o - 0x20000100 0x00000004 Data RW 723 .data globaldef.o - 0x20000104 0x00000004 Data RW 724 .data globaldef.o - 0x20000108 0x00000004 Data RW 725 .data globaldef.o - 0x2000010c 0x00000004 Data RW 727 .data globaldef.o - 0x20000110 0x00000004 Data RW 729 .data globaldef.o - 0x20000114 0x00000004 Data RW 730 .data globaldef.o - 0x20000118 0x00000034 Data RW 770 .data kbus.o - 0x2000014c 0x00000004 Data RW 772 .data kbus.o - 0x20000150 0x0000000c Data RW 960 .data klink.o - 0x2000015c 0x00000001 Data RW 1123 .data modbusrtu.o - 0x2000015d 0x00000003 PAD - 0x20000160 0x00000004 Data RW 1287 .data plcfunctions.o - 0x20000164 0x00000024 Data RW 1557 .data kmachine.o - 0x20000188 0x00000028 Data RW 2118 .data main.o - 0x200001b0 0x00000004 Data RW 2289 .data system_stm32f0xx.o - 0x200001b4 0x00000004 Data RW 2815 .data stm32f0xx_hal.o - 0x200001b8 0x00000120 Zero RW 21 .bss debug.o - 0x200002d8 0x00000080 Zero RW 303 .bss functions.o - 0x20000358 0x00000094 Zero RW 716 .bss globaldef.o - 0x200003ec 0x00000094 Zero RW 717 .bss globaldef.o - 0x20000480 0x00000080 Zero RW 718 .bss globaldef.o - 0x20000500 0x00000080 Zero RW 720 .bss globaldef.o - 0x20000580 0x00000758 Zero RW 768 .bss kbus.o - 0x20000cd8 0x00000110 Zero RW 958 .bss klink.o - 0x20000de8 0x00000080 Zero RW 1121 .bss modbusrtu.o - 0x20000e68 0x00000208 Zero RW 1285 .bss plcfunctions.o - 0x20001070 0x00000080 Zero RW 1553 .bss kmachine.o - 0x200010f0 0x000007d4 Zero RW 1554 .bss kmachine.o - 0x200018c4 0x00000204 Zero RW 2115 .bss main.o - 0x20001ac8 0x0000009c Zero RW 2213 .bss fpx.o - 0x20001b64 0x00000004 PAD - 0x20001b68 0x00000400 Zero RW 1 STACK startup_stm32f030x8.o - - -============================================================================== - -Image component sizes - - - Code (inc. data) RO Data RW Data ZI Data Debug Object Name - - 1870 184 5 0 0 82975 bsp.o - 452 162 16 24 288 266384 debug.o - 1044 124 0 0 156 20932 fpx.o - 1456 274 1030 36 128 240218 functions.o - 0 0 0 28 552 2525 globaldef.o - 2388 160 0 56 1880 16047 kbus.o - 2140 106 0 12 272 201231 klink.o - 2056 248 168 36 2132 202670 kmachine.o - 1514 254 24 40 516 61836 main.o - 1016 44 32 1 128 9113 modbusrtu.o - 316 0 0 0 0 5527 myqueue.o - 2108 204 0 4 520 24057 plcfunctions.o - 28 8 180 0 1024 628 startup_stm32f030x8.o - 122 18 0 4 0 3635 stm32f0xx_hal.o - 156 22 0 0 0 9451 stm32f0xx_hal_cortex.o - 68 4 0 0 0 12850 stm32f0xx_hal_msp.o - 1292 88 0 0 0 4486 stm32f0xx_hal_rcc.o - 236 14 0 0 0 1420 stm32f0xx_hal_rcc_ex.o - 510 74 5 0 0 55105 stm32f0xx_it.o - 228 22 0 0 0 5154 stm32f0xx_ll_flash.o - 164 0 0 0 0 6711 stm32f0xx_ll_gpio.o - 268 52 0 0 0 16728 stm32f0xx_ll_rcc.o - 100 8 0 0 0 11270 stm32f0xx_ll_spi.o - 132 24 0 0 0 30594 stm32f0xx_ll_tim.o - 172 16 0 0 0 16964 stm32f0xx_ll_usart.o - 92 14 24 4 0 1179 system_stm32f0xx.o - - ---------------------------------------------------------------------- - 19958 2124 1520 248 7600 1309690 Object Totals - 0 0 32 0 0 0 (incl. Generated) - 30 0 4 3 4 0 (incl. Padding) - - ---------------------------------------------------------------------- - - Code (inc. data) RO Data RW Data ZI Data Debug Library Member Name - - 0 0 0 0 0 0 entry.o - 0 0 0 0 0 0 entry10a.o - 0 0 0 0 0 0 entry11a.o - 8 4 0 0 0 0 entry2.o - 4 0 0 0 0 0 entry5.o - 0 0 0 0 0 0 entry7b.o - 0 0 0 0 0 0 entry8b.o - 8 4 0 0 0 0 entry9a.o - 30 0 0 0 0 0 handlers.o - 40 0 0 0 0 72 idiv.o - 36 8 0 0 0 68 init.o - 76 0 0 0 0 76 ldiv.o - 32 0 0 0 0 68 llshl.o - 34 0 0 0 0 68 llushr.o - 36 0 0 0 0 60 memcpya.o - 36 0 0 0 0 100 memseta.o - 1190 48 0 0 0 384 printf8.o - 44 0 0 0 0 72 uidiv.o - 96 0 0 0 0 84 uldiv.o - 20 0 0 0 0 60 uread4.o - - ---------------------------------------------------------------------- - 1694 64 0 0 0 1112 Library Totals - 4 0 0 0 0 0 (incl. Padding) - - ---------------------------------------------------------------------- - - Code (inc. data) RO Data RW Data ZI Data Debug Library Name - - 1690 64 0 0 0 1112 mc_p.l - - ---------------------------------------------------------------------- - 1694 64 0 0 0 1112 Library Totals - - ---------------------------------------------------------------------- - -============================================================================== - - - Code (inc. data) RO Data RW Data ZI Data Debug - - 21652 2188 1520 248 7600 1302762 Grand Totals - 21652 2188 1520 248 7600 1302762 ELF Image Totals - 21652 2188 1520 248 0 0 ROM Totals - -============================================================================== - - Total RO Size (Code + RO Data) 23172 ( 22.63kB) - Total RW Size (RW Data + ZI Data) 7848 ( 7.66kB) - Total ROM Size (Code + RO Data + RW Data) 23420 ( 22.87kB) - -============================================================================== - diff --git a/C8T6_TestApp1/MDK-ARM/F030C8T6_TestApp1/F030C8T6_TestApp1.sct b/C8T6_TestApp1/MDK-ARM/F030C8T6_TestApp1/F030C8T6_TestApp1.sct deleted file mode 100644 index 550bc5a..0000000 --- a/C8T6_TestApp1/MDK-ARM/F030C8T6_TestApp1/F030C8T6_TestApp1.sct +++ /dev/null @@ -1,15 +0,0 @@ -; ************************************************************* -; *** Scatter-Loading Description File generated by uVision *** -; ************************************************************* - -LR_IROM1 0x08001000 0x0000F000 { ; load region size_region - ER_IROM1 0x08001000 0x0000F000 { ; load address = execution address - *.o (RESET, +First) - *(InRoot$$Sections) - .ANY (+RO) - } - RW_IRAM1 0x200000C0 0x00001F40 { ; RW data - .ANY (+RW +ZI) - } -} - diff --git a/C8T6_TestApp1/Src/BoardType.c b/C8T6_TestApp1/Src/BoardType.c index d736156..6be3deb 100644 --- a/C8T6_TestApp1/Src/BoardType.c +++ b/C8T6_TestApp1/Src/BoardType.c @@ -2,6 +2,41 @@ #include "KBusDefine.h" +#include "KMachine.h" +//#include "KBus.h" + + +const stKMInfoBlock KMInfoBlock = +{ +// sizeof(stKMInfoBlock), + (BOARD_TYPE<<8) + BOARD_VER, //nDeviceType BOARD_VER, //nDevieVer + 0x0109, //ProgVer + 0x0102, //KLinkVer + KBUS_VER, //KBusVer +// 0x0100, //KNetVer +// 0x0100, //KWLVer + + 4, //nCapacity1 ?K + 1, //nCapacity2 ?k + + DINPUT, //nDInput; + DOUTPUT, //nDOutput + + 0, //nAInput + 0, //nAOutput + 0, //nHInput + 0, //nHOutput + 0, //nExt1; + 0, //nExt2; + 0, //nLogSize; + 0, //nPorts; + 0, //nManSize; + 0, //nAbility; + 6, //nSwitchBits; +}; + + + const stDeviceInfo MyDeviceInfo={ (BOARD_TYPE<<8) + BOARD_VER, //nDeviceTypeVer // unsigned short ClientType; // 子机类型 diff --git a/C8T6_TestApp1/Src/main.c b/C8T6_TestApp1/Src/main.c index a1383e6..3e28d25 100644 --- a/C8T6_TestApp1/Src/main.c +++ b/C8T6_TestApp1/Src/main.c @@ -83,8 +83,9 @@ unsigned char FastFlicker=0; unsigned int Uart1IdelTimer = 0; +#if (ENABLE_PLC) stBinProg1 * pProgs = (stBinProg1 *)STORE_PRG_BASE; - +#endif uint32_t us1,us2,us3,us4,us5,us6; stKBusDef KBus1; @@ -421,14 +422,15 @@ KMRunStat.WorkMode2=0; KMRunStat.WorkMode = storedKMSysCfg.theKMSysCfg.workmode; - +#if (ENABLE_PLC) if (KMRunStat.WorkMode == 1){ InitPLC(); KMRunStat.WorkMode2 = KMem.CurJumperSW&0x20 ; if (KMRunStat.WorkMode2) { StartPLC(); } } - +#endif + #if (BOARD_TYPE == 15 || BOARD_TYPE == 16) KWireLessInit(KMem.EffJumperSW&0x20,KMem.EffJumperSW&0x0f); KWireLessStart(); @@ -447,14 +449,14 @@ int haltick=HAL_GetTick(); int thisJumperSW=ReadJumperSW(); - +#if (ENABLE_PLC) if (KMRunStat.WorkMode&1){ if (thisJumperSW&0x20 && !(KMem.CurJumperSW&0x20)) // Run 寮�鍏� 姝� 璺冲彉銆� {StartPLC();} if (!(thisJumperSW&0x20) && (KMem.CurJumperSW&0x20)) // Run 寮�鍏� 璐� 璺冲彉銆� {StopPLC();} } - +#endif KMem.CurJumperSW=thisJumperSW; KMem.haltick=haltick; // KMem.TotalRunTime=TotalRunTime; @@ -523,7 +525,7 @@ #endif // pProgs = (stBinProg1 *) STORE_PRG_BASE; - +#if (ENABLE_PLC) if ( KMRunStat.WorkMode==1 ) //&& bKBusMaster) { if (KMRunStat.nBinProgBank == 0){ @@ -536,7 +538,7 @@ ProcessPLCBinProg(pProgs, nSizeProg1); } - +#endif KMem.ScanTimeuS=us2-KMem.LastScanTime; KMem.LastScanTime = us2; if (KMem.ScanTimeuS < KMem.MinScanTimeuS) {KMem.MinScanTimeuS = KMem.ScanTimeuS;} @@ -584,11 +586,14 @@ } else { +#if (ENABLE_PLC) if (KMRunStat.WorkMode==1 ) { if (PLCMem.bPLCRunning){SetRunLed(SlowFlicker);} else {SetRunLed(0);} } - else { + else +#endif + { if (!KBus1.RunStat) SetRunLed(SlowFlicker); else SetRunLed(FastFlicker); } diff --git a/CCT6_BootLoader/MDK-ARM/CCT6_BtLdr.uvprojx b/CCT6_BootLoader/MDK-ARM/CCT6_BtLdr.uvprojx index bacaf7c..f95b17d 100644 --- a/CCT6_BootLoader/MDK-ARM/CCT6_BtLdr.uvprojx +++ b/CCT6_BootLoader/MDK-ARM/CCT6_BtLdr.uvprojx @@ -594,6 +594,11 @@ <FileType>1</FileType> <FilePath>..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_ll_rtc.c</FilePath> </File> + <File> + <FileName>stm32f0xx_ll_flash.c</FileName> + <FileType>1</FileType> + <FilePath>..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_ll_flash.c</FilePath> + </File> </Files> </Group> </Groups> diff --git a/CCT6_BootLoader/Src/main.c b/CCT6_BootLoader/Src/main.c index e79484e..60f77e3 100644 --- a/CCT6_BootLoader/Src/main.c +++ b/CCT6_BootLoader/Src/main.c @@ -46,6 +46,7 @@ #include "Functions.h" #include "string.h" #include "BSP.h" +#include "stm32f0xx_ll_flash.h" /* USER CODE END Includes */ @@ -141,8 +142,8 @@ } #define ApplicationAddress 0x08001000 //搴旂敤绋嬪簭棣栧湴鍧�瀹氫箟 -#define NewAppInfoBlockAddress 0x08020000 // 瀛樺偍鐨勬柊搴旂敤绋嬪簭淇℃伅鍧楃殑鍦板潃 -#define NewAppAddress 0x08021000 // 瀛樺偍鐨勬柊搴旂敤绋嬪簭鐨勫湴鍧� +#define NEW_APP_INFOBLOCK_ADDR 0x08020000 // 瀛樺偍鐨勬柊搴旂敤绋嬪簭淇℃伅鍧楃殑鍦板潃 +#define NEW_APP_ADDR 0x08021000 // 瀛樺偍鐨勬柊搴旂敤绋嬪簭鐨勫湴鍧� //#define FLASH_PAGESIZE (0x00000400) //Page Size = 1K @@ -187,38 +188,35 @@ int EraseFlashMem(void * pAddrFlash, unsigned int Pages) { - HAL_StatusTypeDef res; - res = HAL_FLASH_Unlock(); - uint32_t ErrNo; - FLASH_EraseInitTypeDef erase1; - erase1.NbPages=Pages; - erase1.PageAddress=(unsigned int)pAddrFlash; - erase1.TypeErase=FLASH_TYPEERASE_PAGES; - res = HAL_FLASHEx_Erase(&erase1,&ErrNo); - res = HAL_FLASH_Lock(); + ErrorStatus res; + res = LL_Flash_Unlock(); +// uint32_t ErrNo; + res = LL_Flash_PageErase(pAddrFlash,Pages); + LL_FLASH_Lock(FLASH); return res; } int EraseAndWriteToFlashMem(void * pBuf, void * pAddrFlash, unsigned int nByteSize) { - HAL_StatusTypeDef res; - res = HAL_FLASH_Unlock(); - uint32_t ErrNo; - FLASH_EraseInitTypeDef erase1; - erase1.NbPages= (nByteSize-1) / FLASH_PAGE_SIZE + 1; - erase1.PageAddress=(unsigned int)pAddrFlash; - erase1.TypeErase=FLASH_TYPEERASE_PAGES; - res = HAL_FLASHEx_Erase(&erase1,&ErrNo); - - + ErrorStatus res; + res = LL_Flash_Unlock(); +// __disable_irq(); + int NbPages = (nByteSize-1) / FLASH_PAGE_SIZE + 1; +// FLASH_EraseInitTypeDef erase1; +// erase1.NbPages=(nByteSize-1) / FLASH_PAGE_SIZE + 1;; +// erase1.PageAddress=(unsigned int)pAddrFlash; +// erase1.TypeErase=FLASH_TYPEERASE_PAGES; + res = LL_Flash_PageErase(pAddrFlash,NbPages); for (int i=0;i<(nByteSize+1)/2;i++) { - res = HAL_FLASH_Program(FLASH_TYPEPROGRAM_HALFWORD, (uint32_t)pAddrFlash + i*2, ((uint16_t *)pBuf)[i]); - if ((i&0x7ff) == 0) {ToggleRunLed(); ToggleErrLed();} + unsigned short value = ((uint8_t *)pBuf)[i*2] + (((uint8_t *)pBuf)[i*2 +1] << 8); + res = LL_FLASH_Program(ProgaraType_DATA16, (uint32_t)pAddrFlash + i*2, value); + if (res == ERROR) break; } - res = HAL_FLASH_Lock(); +// __enable_irq(); + LL_FLASH_Lock(FLASH); return res; } @@ -269,12 +267,24 @@ SetErrLed(0); //Turn Off Err Led // check for app update ///* + int FlashSize = *(unsigned short *)FLASHSIZE_BASE; + int NewAppAddress ; + int NewAppInfoBlockAddress ; + if (FlashSize == 64) { + NewAppInfoBlockAddress = 0x08008000; + NewAppAddress = 0x08009000U; + }else if (FlashSize == 256) { + NewAppInfoBlockAddress = 0x08020000; + NewAppAddress = 0x08021000U; + } + pNewAppInfoBlock ptheNewAppInfoBlock = (pNewAppInfoBlock) NewAppInfoBlockAddress; if (ptheNewAppInfoBlock->Sign == 0x55AA) { //check length and CRC; int length = ptheNewAppInfoBlock->Length; - int nCRC = crc16table((uint8_t *)NewAppAddress,length); + int nCRC; // = crc16table((uint8_t *)NewAppAddress,length); + nCRC = crc16bitbybit((uint8_t *)NewAppAddress,length); if (nCRC == ptheNewAppInfoBlock->nCRC) { // copy program diff --git a/CCT6_TestApp1/Inc/BoardType.h b/CCT6_TestApp1/Inc/BoardType.h index cde1542..da894d7 100644 --- a/CCT6_TestApp1/Inc/BoardType.h +++ b/CCT6_TestApp1/Inc/BoardType.h @@ -77,4 +77,43 @@ #endif +typedef struct tagInfoBlockHdr { + unsigned short nBlkSign; // 开始标志 + unsigned short nBlkTypeVer; // 类型和版本 + unsigned short nBlkSize; // Block 大小, 包括开始和结束标志 + unsigned short Pad1; +}stInfoBlockHdr; + +typedef struct tagInfoBlockTail { + + unsigned short CRC16; + unsigned short EndSign; +}stInfoBlockTail; + +typedef struct tagBtLdrInfoBlock { + stInfoBlockHdr Hdr; + unsigned short nBtldrVer; + unsigned short nBtldrDevice; + unsigned short nBtldrSize; // 设计大小 + unsigned short nBtldrDataSize; //代码大小 + unsigned int nBtldr_AppAddr; + unsigned int nBtldr_NewAppInfoAddr; + unsigned int nBtldr_NewAppAddr; + stInfoBlockTail tail; +}stBtLdrInfoBlock, *pBtLdrInfoBlock; + +typedef struct tagAppInfoBlock { + stInfoBlockHdr Hdr; + unsigned short nAppVer; + unsigned short nAppDevice; + unsigned short nAppSize; // 代码设计大小 + unsigned short nAppDataSize; //实际代码大小 + unsigned int nAppStartAddr; + unsigned int nAppStartOffset; + unsigned int nApp; + stInfoBlockTail tail; +}stAppInfoBlock, * pAppInfoBlock; + + + #endif /* __BOARDTYPE_H__ */ diff --git a/CCT6_TestApp1/Inc/SLP.h b/CCT6_TestApp1/Inc/SLP.h index 86301d1..c8718f8 100644 --- a/CCT6_TestApp1/Inc/SLP.h +++ b/CCT6_TestApp1/Inc/SLP.h @@ -1,5 +1,3 @@ - - #ifndef __SLP_H_V10__ #define __SLP_H_V10__ typedef unsigned char uchar; @@ -19,14 +17,49 @@ // uchar ED; }stSLPPacket; -extern uchar bSLPMaster; -extern uchar nStation; -extern uchar SLPinputB; -extern uchar SLPoutputB; -extern uchar SLPErrSign; +//extern uchar bSLPMaster; +//extern uchar nStation; +//extern uchar SLPinputB; +//extern uchar SLPoutputB; +//extern uchar SLPErrSign; -void SLPparsePacket(void * pBuf, uchar len1); -void SLPMasterSendPacket(void); -void SLPProcess(void); +typedef void (*SLPSendPktDef)(unsigned char * pBuf, int Len1); + + +typedef struct tagSLPDef +{ + uchar bSLPMaster; + uchar nStation; + uchar SLPinputB; + uchar SLPoutputB; + uchar nCurStation; + uchar inputBuf[5]; + uchar outputBuf[5]; + + uchar SendBuf[8]; + + uchar SLPMasterRecved; //主机收到子机回复 + + SLPSendPktDef SLPSendPktFunc; + + unsigned int SLPSlaveCountOut; + + unsigned int SLPLostPkt; // 丢包数量 + + uchar SLPOKSign; + uchar SLPErrSign; + + int nCount; + +}stSLPDef; + +void SLPInit(stSLPDef * pSLP, SLPSendPktDef pFunc1); +void SLPSetCallBack(stSLPDef * pSLP, SLPSendPktDef pFunc1); + +void SLPparsePacket(stSLPDef * pSLP, unsigned char * pBuf, uchar len1); +void SLPMasterSendPacket(stSLPDef * pSLP); +void SLPProcess(stSLPDef * pSLP); + #endif /* __SLP_H_V10__ */ + diff --git a/CCT6_TestApp1/Inc/functions.h b/CCT6_TestApp1/Inc/functions.h index 0ca4578..46e94e4 100644 --- a/CCT6_TestApp1/Inc/functions.h +++ b/CCT6_TestApp1/Inc/functions.h @@ -125,6 +125,7 @@ void SLPSendPacket(void * str, uchar len); int PutStr(char * str1, int len1); +int PutStr2(char * str1, int len1); int SendPacket(int nChn, void * pBuf,int len1); //int SendPacket1(void * pBuf,int len1); //int SendPacket2(pKBPacket p1,int len1); diff --git a/CCT6_TestApp1/Inc/main.h b/CCT6_TestApp1/Inc/main.h index 85b1831..468e8b3 100644 --- a/CCT6_TestApp1/Inc/main.h +++ b/CCT6_TestApp1/Inc/main.h @@ -75,7 +75,9 @@ /* #define USE_FULL_ASSERT 1U */ /* USER CODE BEGIN Private defines */ +#include "KBus.h" +extern stKBusDef KBus1; /* USER CODE END Private defines */ #ifdef __cplusplus diff --git a/CCT6_TestApp1/MDK-ARM/CCT6_TestApp1/F030CCT6_TestApp1.hex b/CCT6_TestApp1/MDK-ARM/CCT6_TestApp1/F030CCT6_TestApp1.hex deleted file mode 100644 index e252514..0000000 --- a/CCT6_TestApp1/MDK-ARM/CCT6_TestApp1/F030CCT6_TestApp1.hex +++ /dev/null @@ -1,1720 +0,0 @@ -:020000040800F2 -:10100000B8490020D110000809440008A5200008B4 -:1010100000000000000000000000000000000000D0 -:101020000000000000000000000000000D56000855 -:101030000000000000000000B5480008495B0008FF -:10104000E310000800000000E3100008E3100008AF -:10105000E3100008E3100008E3100008E3100008A4 -:1010600000000000E310000825150008C515000861 -:10107000E3100008E3100008E3100008000000007F -:10108000E3100008515C0008E3100008E3100008BA -:10109000E3100008E3100008E3100008E310000864 -:1010A000E3100008F1550008E3100008695C00082F -:1010B000E55C0008395D00080348854600F0D6F875 -:1010C00000480047F9680008B84900200844F04784 -:1010D0000448804704480047FEE7FEE7FEE7FEE7D6 -:1010E000FEE7FEE7F55B0008B910000830B50B46D7 -:1010F000014600202022012409E00D46D5409D42F2 -:1011000005D31D469540491B254695404019154677 -:10111000521E002DF1DC30BD70B50024254600289C -:1011200001DA01244042002901DA01254942FFF792 -:10113000DDFFAC4200D04042002C00D0494270BDDF -:10114000F8B500242546002904DA0E4601240021C2 -:101150004042B141002B04DA1E46002352420125D1 -:10116000B34100F052F88C4617461E46AC4203D0FD -:10117000002540428D41AC46002C02D0002657424B -:101180009E4161463A46334601B0F0BD10B5202A73 -:1011900004DB0846203AD040002110BD0B46D34066 -:1011A000D0402024A21A91400843194610BD03469E -:1011B0000B439B0703D009E008C9121F08C0042A8B -:1011C000FAD203E00B780370401C491C521EF9D27E -:1011D0007047D2B201E00270401C491EFBD270473A -:1011E0000022F6E710B513460A4604461946FFF7F3 -:1011F000F0FF204610BD0321001D401E037812029F -:101200001A43491EF9D510467047F0B51FB406467B -:10121000002082B005464024019100901BE0019916 -:1012200022460F463046FFF7B1FF049A059B801A0D -:10123000994110D310461946224600F029F8361A73 -:101240008F410197224601200021009F00F020F8E5 -:1012500038184D4100902046641E0028DFDC019BB9 -:1012600000982946324607B0F0BD0000064C012523 -:10127000064E05E0E36807CC2B430C3C984710343E -:10128000B442F7D3FFF71CFFF87A0008187B000878 -:1012900010B5202A04DB0146203A9140002010BD01 -:1012A000914020239C1A0346E3401943904010BD0F -:1012B00030B58C180278401C13071B0F01D103783E -:1012C000401C120906D10278401C03E005780D701D -:1012D000401C491C5B1EF9D101E00B70491C521ED9 -:1012E000FBD1A142E6D3002030BD0000F0B52C4870 -:1012F00081684907C90F50D1006C2A4D82B26B69D1 -:101300000120DC07284E2949002C0AD08A82284B6C -:10131000284930469A4201D2012200E000220A60A8 -:1013200031E0254F9E433C880CD0244E9E430DD087 -:10133000234C9C431DD0234C9C431DD0224C9C43EA -:101340001DD020E0A01838801C481CE07888801848 -:1013500082B27A802869401C2861082807DBE008EF -:101360004883D0088883002038807880286114481A -:1013700009E0CA83154806E00A84154803E04A8458 -:10138000144A528B8A8442030549520B8A628A6846 -:10139000114B1A40121D8A6068610020F0BD0000E8 -:1013A00000240140C00000208000001C0017002025 -:1013B000DC05000060010020480200200001002040 -:1013C000000200240000014000000244000001C0AF -:1013D000000002C4A0F7FF1FE8FFFF7FF0B51E4F1B -:1013E00085B03D691D4C6D1C3D612668A468029462 -:1013F00000966C4665800190218162810393386A72 -:1014000001011748091800220B4610461C5CFF2CEE -:1014100004D1401C1028F9D3002A17D010226846A6 -:1014200000F00CF9386AF861401C386200010121B3 -:1014300049031030884201D900203862F868094910 -:10144000401CF8604867002005B0F0BD10226846D7 -:1014500004F02CFFE6E700003C01002020710008AA -:1014600000D0000880160020002911D08268521890 -:1014700082604368934200DCD21A00238361C36810 -:10148000934201D1012343618260026952180261D3 -:1014900008467047F0B50020174D0127144B154C36 -:1014A0007F03E86017E0625A144EB24212D1EA6834 -:1014B0000919521CEA604A882E69B24205D92A618C -:1014C000E8614A686A61421C2A624988994201D2ED -:1014D0000B46A861401C0101B942E4D3286A00010F -:1014E0001030B84201D900202862E868F0BD000041 -:1014F000FFC99A3B00D000083C010020AA5500001B -:1015000010B50421054800F0C9F8054800218161A3 -:10151000C1610161C1600162084610BD00D00008D0 -:101520003C01002070B5234DE86A401CE862224C63 -:1015300020688006C00F11D02868296B40182860E9 -:10154000296B28465830064600F058F82020606085 -:10155000B06900280AD000202863687220688005DE -:10156000C00F02D001204002606070BD304600F024 -:101570000BF912494A78A3585B085B00A350F36843 -:1015800032684E78D2180C4B0C33F2500A4B4A7822 -:101590001B1DD658360C36040643D650497862587F -:1015A00001231A4362502863054881688022114351 -:1015B0008160D3E768030020000002403B7500080B -:1015C000003801400B49C86A401CC8620A480268DA -:1015D0009204D20F05D001225203426000220A6316 -:1015E0004A7201688903C90F02D001214904416090 -:1015F00070470000FC0300200000024010B50029E5 -:1016000010D0C26843685218934200DCD21A0023FB -:101610004361C2608468944204D101228261836084 -:10162000C360C361084610BDFF2109220131D20603 -:10163000002801D09162704791617047F8B5164655 -:101640000F46054602F062F8701EC00A401C81B2C7 -:10165000384602F033F80024761C76080EE060006D -:1016600042195278295C120289188AB2C1190023E2 -:10167000022001F0EFFF002802D0641CA642EED841 -:10168000054A1169802319431161002801D0002007 -:10169000F8BD0120F8BD00000020024070B50C46E6 -:1016A000054602F033F8A1B2284602F007F80348D5 -:1016B0000169802211430161002070BD00200240B9 -:1016C0000A07120F01219140014201D00120704709 -:1016D000002070470A07120F01219140014201D0FA -:1016E0000120704700207047F8B50B051B0E254CF4 -:1016F0005B001C1909239B01E31800930523DB0100 -:10170000E618012307469B020A07E5180020120F7E -:101710003B0004F009FE09060A0E12191D21282FAC -:101720002E00FF2928D800981BE0FF2924D8009814 -:1017300008E0FF2920D8B08A18E080291CD20F20A9 -:1017400080012018808E11E0802915D2A88A0DE032 -:10175000402911D2B08E09E040290DD20B20800122 -:101760000EE0808A02E0802906D2A88E1146FFF79B -:10177000B1FFF8BD802901D30020F8BD0920C001C8 -:101780002018EEE700110020C1688268914201DA5A -:10179000501A7047914202DC4269002A02D0406828 -:1017A000401A704780690028FBD000207047C2684B -:1017B0008168914201DA501A7047914202DC8269D5 -:1017C000002A02D04068401A704740690028FBD0C8 -:1017D0000020704707490122896952030818010156 -:1017E000914202D3FF38FF38023803490001401804 -:1017F000704700003C01002000D0000800B5082020 -:1018000000F0D2FC00BD0000F0B5334C4B001C19B9 -:101810000923DB01E5180B230246DB010020E31856 -:10182000892A25D00EDC2C4F2C4B4E00F619F618C9 -:10183000803A130004F078FD091F1F152125292E79 -:10184000333A15008D2A3FD00CDC8A2A33D08B2AFC -:1018500035D08C2A05D140293ADA0B208001201896 -:10186000808EF0BD992A03D0A12A01D0FE2AF8D19A -:1018700080292DDA2EE00846F0BD102928DAB08A3A -:10188000F0BD102924DAB08EF0BD102920DA052031 -:10189000C00108E008291BDA0F208001DFE70829D2 -:1018A00016DA012080022018808AF0BD80290FDA24 -:1018B0003420285EF0BD80290ADAA88AF0BD4029CC -:1018C00006DA0D208001CAE7402901DAA88EF0BDB2 -:1018D0000020F0BD988EF0BD0011002040020000F5 -:1018E00010B5074A106A074B9969146AA04201D0E3 -:1018F000106A9969044A51430914401A10BD000046 -:101900006C01002000E000E05505000031B500F05A -:101910000BF8009C0546601C00D0641C00F004F825 -:10192000401BA042FAD338BD014800687047000050 -:101930004402002002480168491C01607047000011 -:101940004402002010B506480168102211430160CE -:10195000002000F007F800F017F8002010BD00008C -:101960000020024010B5044600F040F97D21C90076 -:10197000FFF7BCFB00F07AFB00222146501E00F06E -:1019800025F8002010BD000008B50F48816901222C -:1019900011438161816911400091C26901040A43C8 -:1019A000C261C0690022084000901146501F00F03B -:1019B0000DF800221146901E00F008F80022114692 -:1019C000501E00F003F808BD0010024010B502F0F0 -:1019D00049FD10BDF8B504460068364DC00354D526 -:1019E000E8690026C00007D4E86929040843E861D3 -:1019F000E8690840012600902F480168C90511D404 -:101A0000014608688A1510430860FFF78DFF0746F6 -:101A100004E0FFF789FFC01B642823D8264800682C -:101A2000C005F6D5286A0321090208401FD0626864 -:101A30000A4082421BD0286A2A6A8843012109048D -:101A40000A432A622A6A8A432A622862C0070ED0A1 -:101A5000FFF76AFF074607E0FFF766FFC11B17485D -:101A6000814201D90320F8BD286A8007F4D5286A8D -:101A7000032109028843616808432862002E04D0CC -:101A8000E869012109078843E8612078C00705D08B -:101A9000286BA168800880000843286320788006AE -:101AA00005D5286B10218843E1680843286300208E -:101AB000F8BD0000001002400070004088130000D4 -:101AC000F8B5044644480E460068C007C00FB0424F -:101AD0000AD2414801684908490031430160006861 -:101AE000C007C00FB0425CD120783C4F800705D5BD -:101AF0007868F0218843A168084378602078C0079F -:101B00003FD06068012813D03968022813D08907B4 -:101B1000002946DA79688908890001437960FFF76E -:101B200003FF0546606801280DD0022817D024E085 -:101B300039688903ECE78901EAE7FFF7F5FE411B05 -:101B40002748814217D878680007800F0128F4D110 -:101B500017E0FFF7E9FE411B214881420BD8786866 -:101B60000007800F0228F4D10BE0FFF7DDFE411BD8 -:101B70001B48814201D90320F8BD78680007800F17 -:101B8000F3D115480168C907C90FB1420BD90168E3 -:101B900049084900314301600068C007C00FB042E6 -:101BA00001D00120F8BD2078400706D578680721CC -:101BB00009028843E1680843786000F01DF87968FD -:101BC000084A0906090F515CC8400749086000200F -:101BD000FFF7C8FE0020F8BD0020024000100240C0 -:101BE00088130000E07A00084002002001480068E5 -:101BF000704700004002002030B514A00FC889B023 -:101C00006C460FC415A00FC80FC4184D6A680C208D -:101C100011460140164B042910D0164808290ED150 -:101C20009102090F6C46645CE96A04AD0907090F6B -:101C3000D203695C920F022A03D003E0184609B070 -:101C400030BD1846FFF752FA6043F8E70203040577 -:101C5000060708090A0B0C0D0E0F101001020304F1 -:101C600005060708090A0B0C0D0E0F1000100240A4 -:101C7000001BB70000127A00FEB504460078D54D6F -:101C8000C00748D068680007800F012819D068682D -:101C90000007800F022804D16868C003800F022863 -:101CA0000FD0012160680904012811D08A000028A2 -:101CB00001D0052816D028688843286028689043FA -:101CC00008E02868800326D56068002873D022E0E9 -:101CD0002868084328606068002810D0FFF724FEB9 -:101CE000064608E0286810432860F1E7FFF71CFE6D -:101CF000801B642870D828688003F7D50BE0FFF7B5 -:101D000013FE064604E0FFF70FFE801B6428F1D89F -:101D100028688003F7D420780126800700283DDA60 -:101D200068680007800F13D068680007800F0228DA -:101D300004D16868C003800F012809D0E06800283A -:101D400028681CD030432860FFF7EEFD07460BE003 -:101D5000286880070BD5E06801282CD107E0FFF741 -:101D6000E3FDC01B0228C5D828688007F7D528687E -:101D7000F82188432169C900084328600EE0400823 -:101D800040002860FFF7D0FD074604E0FFF7CCFDD8 -:101D9000C01B0228AED828688007F7D42078000737 -:101DA00023D5E0690028686A0FD030436862FFF7E6 -:101DB000BBFD074605E00AE1FFF7B6FDC01B0228A0 -:101DC00098D8686A8007F7D50FE04008400068623D -:101DD000FFF7AAFD074605E0A4E0FFF7A5FDC01B3D -:101DE000022887D8686A8007F7D42078042740073C -:101DF000002860DA00200190E869C00008D4E86992 -:101E0000B9060843E861E8690840009001200190A4 -:101E100071480168C90511D4016882151143016038 -:101E2000FFF782FD009005E0FFF77EFD0099401A64 -:101E3000642877D868480068C005F5D5A0680128EF -:101E40000AD0002801D0052810D0286A4008400098 -:101E50002862286AB84301E0286A30432862A068F3 -:101E6000002812D0FFF760FD00900AE0286A38438E -:101E70002862F1E7FFF758FD0099411A574881425F -:101E800050D8286A8007F5D50DE0FFF74DFD00908A -:101E900006E0FFF749FD0099411A5048814241D8B8 -:101EA000286A8007F5D40198002804D0E869012148 -:101EB00009078843E8612078C0063CD5606901289D -:101EC0000CD0401D686B23D038436863686B4008B2 -:101ED00040006863FFF728FD064629E0686B384339 -:101EE0006863686B30436863FFF71EFD064604E0D5 -:101EF000FFF71AFD801B022862D8686B8007F7D5B0 -:101F0000686BF8218843A169C9000843686312E03F -:101F1000B8436863696BF8208143A069C00001433E -:101F2000696308E04CE0FFF7FFFC801B022847D8FC -:101F3000686B8007F7D4206A002846D069680907D3 -:101F4000890F022943D001273F060228286805D0BF -:101F5000B8432860FFF7E8FC044633E0B843286044 -:101F6000FFF7E2FC064604E0FFF7DEFC801B0228D8 -:101F700026D828688001F7D4E86AE16A00090001E0 -:101F80000843E862616AA06A084369687B22D20359 -:101F9000914308436860286838432860FFF7C4FC11 -:101FA000044604E0FFF7C0FC001B022808D828689C -:101FB0008001F7D509E0FFF7B7FC001B022801D923 -:101FC0000320FEBD28688001F5D40020FEBD01205D -:101FD000FEBD0000001002400070004088130000A9 -:101FE000042204490428086902D09043086170471C -:101FF0001043FBE700E000E0154801686431016030 -:1020000014480168491C016013490868401C0860B5 -:102010001249134AC868401CC860904216DB002071 -:10202000C8601048816D491C8165016D491C0165BE -:10203000416D491C41650C49088B002806D0401EA3 -:1020400080B20883782801D978200883704700007F -:102050008C0100208801002024010020AC01002018 -:102060001027000080160020B4180020094910B580 -:10207000401E884201D9012010BD074C6061032138 -:10208000081F02F0EFF90020A06107202061002066 -:1020900010BD0000FFFFFF0000E000E010B5FFF7FB -:1020A000ABFF10BDFEE7000010B500210F4A084647 -:1020B000516043009B18401C1981FF28F9DD002066 -:1020C00005230B4ADB014400A418E418401CA1823C -:1020D0001028F8DB00200923DB014400A418E418D1 -:1020E000401CA186FF28F8DD002010BD780E0020DE -:1020F0000011002010B5402802DB0020C04310BDB5 -:1021000010221143C200094B4000D218C0185824B5 -:102110000D23A1529B010021C3189986E300C0182A -:102120008186034800685065084610BD00110020F4 -:102130004402002070B504461E463830049D04F069 -:10214000CFFB20462A463146583004F0C9FB002018 -:1021500070BD000070B5104D064601462846FEF7DA -:10216000DBFF0E4CE062FFF741FD2946FEF7BEFFA4 -:1021700060620B48314600680546FEF7B7FFA06273 -:102180002A46002307480F21FEF7DAFF2080E06A85 -:1021900064302062002070BD40420F006C010020BE -:1021A0004002002000004042F8B572B6012212033E -:1021B0000921C9068A6200BF00BF00BF00BF8A6153 -:1021C000C117490F0818C01084460020104E03465E -:1021D000009017E008200E4C002280218502103C60 -:1021E00037687F0400D50A43A562490800BF00BFD5 -:1021F00000BF00BF00BFA561401EF1D1D0436946BA -:10220000C8545B1C6345E5DB62B60098F8BD00006E -:10221000100400480B01194930B55B18FF33097FE2 -:1022200011331970022159701449002020310C7F9C -:102230009C704C7FDC708C7F1C71CC7F5C710C4679 -:10224000203425789D716578DD710B7F15795B19D8 -:102250000B774B7F55795B194B778B7F95795B19A2 -:102260008B77CB7F157A5B19CB772178937AC91856 -:1022700021706178D27A8918617030BD100A00200F -:10228000034610B50020024602E09C5C6040521CF0 -:102290008A42FADB10BD000000B50B0004F044F8E0 -:1022A00008111111111111110511074907480A8C64 -:1022B0008286828A0A80C28A4A80028B8A80408B08 -:1022C000C880002000BD0000280C00204013002022 -:1022D000F8B508460D460978552901D0252903D0BF -:1022E000012A01DD451C521E344F602479792B7878 -:1022F0006143334C0919334C252B30D0A3685B1C48 -:10230000A360CB695B1CCB61B97800290FD0F97849 -:1023100000290FD001292C4913D007231B02C9180B -:102320000A7501462948FEF742FF0020F870002098 -:10233000C043F8BD2549264B55390A750146224848 -:1023400007E037235B01C9180A750146204B1E4878 -:102350002033C018FEF72BFFF878401CE6E76E79B3 -:10236000802E06DDE068401CE060086A401C0862C0 -:10237000DDE7334608339A4208D2086A401C0862F7 -:10238000E068401CE0600220C043F8BDB11DFFF7CB -:1023900077FFA919897981420DD02069401C2061FD -:1023A00079796020414306480818416A491C416216 -:1023B0000320C043F8BD0020F8BD0000EC00002061 -:1023C000900600207C040020001100201518002039 -:1023D000D506000010B50020124C03462071D2B281 -:1023E000002905D021706370A370A272E37005E02C -:1023F000237001216170A370A272E2700A4C002266 -:102400006021514309194B608B600B614B618B61FB -:10241000CB610B628B624B62CB62521C0B63092A4D -:10242000EEDB10BD100A0020900600200C20414376 -:1024300007480818002150300180418008220271AD -:102440004271817101728172C17208467047000049 -:10245000100A0020F8B50E4604462520069F079D69 -:10246000089920706270A670E37027712F460020D3 -:1024700008376619372B30D01FDC332B1CD006DC15 -:10248000002B19D0312B28D0322B15D125E0342B3D -:1024900012D0352B10D0362B0ED16571002D03D004 -:1024A0002A46A01DFEF783FEA91D2046FFF7E8FE81 -:1024B000B0710D20F0713846F8BD612B0DD006DCEF -:1024C000382B0AD0412B08D0422BF5D105E0622BE6 -:1024D00003D0632B01D0642BEED16571E0E70000DF -:1024E000F1B584B0FFF720FA0546FFF7F9F9664E1B -:1024F00004463079002802D0012802D004E00120EF -:102500003071049800F098F93079022801D1032045 -:1025100030715E48C179002906D0017A002903D0C4 -:10252000C168611A322905D8C1687D22611AD200BA -:10253000914266D95548007A5549002864D05348DD -:102540006023407901225843524B1A50642048645A -:102550004E4E7079401CC0B27071F17A884208D931 -:10256000706A7462201AB062B079401CB0710120A8 -:1025700070714948727981184348CB7F8038037065 -:1025800020310B7843704B7883708978C170057166 -:10259000290A4171290C8171290EC1716B46F460C1 -:1025A0001978B37989089B0789009B0F19436B46FB -:1025B00019706023374C5343E358002B61D0EF234D -:1025C00019406B4619700823019300910290412332 -:1025D00000213248FFF73EFF02463049049803F0DD -:1025E00057F870796021484300194168491C4160DF -:1025F000C268F1688A1A4263C16000203563F071D5 -:102600003072002005B0F0BD204B186A401C1862E3 -:1026100023484268521C42605E7960203746464338 -:102620001C4830180269521C02614269521C426106 -:10263000DB79002B02D1836A5B1C836283699A4237 -:1026400000D98261134B032A82D900209851C822F5 -:102650008A6411490E46C855183E307D002800D1C5 -:1026600076E7002337691A4605210498B847307D7C -:102670000028F5D0002336691A4607210498B04790 -:1026800066E7102319439CE7100A0020EC000020A5 -:102690008016002090060020280C002090050020C5 -:1026A0007C040020F8B5844608780C46552801D0F3 -:1026B000252802D0012A00DD4C1C60793B4D00909A -:1026C0006979602041433A482B4609188868401CC4 -:1026D0008860DF6ADE68E078A278BE1B9B693528D7 -:1026E00021D002DC32281ED10AE038281BD002DCBF -:1026F000362818D115E0412815D0422813D114E00E -:102700006E619E4200DDAE612A48A37983540020A9 -:10271000CE624861086BB04200D20E63012028727D -:1027200001E00120E8710020F8BD6E619E4200DDED -:10273000AE61204BA17998180646203EF177E179E9 -:102740009954217A4170617A8170A17AC170E17ADD -:102750000171217B4171617B817118461838017DBF -:10276000002905D0002306691A4607216046B047B4 -:102770006A79602042430E48002116187161686929 -:10278000F062316B814200D2306300980E28C5DBC5 -:102790002046E77B1030FEF72EFDE17C0002000AA8 -:1027A00009060843B90071188863B7E7EC000020F8 -:1027B00090060020280C0020F7B515460C46FFF7C0 -:1027C0008FF81A4EF06221780020552903D1012D8F -:1027D00001DD641C6D1E317800290FD00127F771CF -:1027E0002A4621460098FFF773FD002805D137726D -:1027F0002A4621460098FFF755FFFEBD7178002953 -:10280000FBD00B4E2A46B06B2146401CB0630098AB -:1028100000F060F80028F0D106482A46406C306588 -:102820002146009800F0CEF8FEBD0000EC0000202C -:10283000900600208016002070B506460025FFF7A0 -:1028400073F8FFF74DF81D4C0122A179002901D141 -:10285000A271A062E17900292DD1A16A7D23411ADC -:10286000DB00994227D90021A171216A032902DAEC -:10287000A271A0621FE003291DDD3046E169FFF768 -:10288000D5FDE1690C204843021930465032FFF76C -:10289000C1FCE069401CE061A17A88420BDD0220A6 -:1028A00020710748017D002905D0002304691A46DC -:1028B00005213046A047284670BD0000100A0020C0 -:1028C000100C0020024801610121017500207047B1 -:1028D000100C0020F0B508460D460978552901D0A6 -:1028E000252903D0012A01DD451C521E2978002329 -:1028F0001A4FDB431A4C252906D0A068401CA06063 -:10290000386C401C386409E014496E79896C491CA4 -:10291000802E05DDE068401CE060B9641846F0BD1B -:10292000334608339A4206D2B964E068401CE0603E -:102930000220C043F0BDB11DFFF7A2FCA91989799F -:10294000814208D02069401C2061F86C401CF8646A -:102950000320C043F0BD0020F0BD00009006002021 -:102960007C040020F8B5FEF7BBFF134B1A691979F8 -:1029700000291FD05C7A1149002C05D07D208001F0 -:1029800048640020587215E00C4E0D4C851A8036B4 -:10299000A54204D97D2292018A64012206E012191F -:1029A000904207D97D2292018A6402228A67C86711 -:1029B000186930600020F8BDEC000020801600206F -:1029C000E02E0000F7B5087884B00C46552802D1F7 -:1029D000012A00DD4C1C6D480168491C01606379C7 -:1029E00060786B4903916B49694F0D798037A84234 -:1029F00008D0FF2806D0786C401C78640020C043C3 -:102A000007B0F0BDA84201D0FF287DD16148C26A5D -:102A1000026101214172E0785F49372874D00CDCF3 -:102A20003328FBD004DC0028F8D03128EDD119E0A0 -:102A30003428F3D0352867D125E0584BDD1DFF350C -:102A4000FA352A7D2E6961285ED004DC38285BD0F7 -:102A5000412859D120E0622856D0632854D06428F8 -:102A600052D17EE0A07908704B4820380078A071E0 -:102A7000484802612179A01D019300913223029000 -:102A80000022294661E0002021793623009101903F -:102A900002460290012158E0A0790870E079487060 -:102AA000207A8870607AC870E17AA07A09024018AA -:102AB0009863002A0DD000231A4606210498B047D7 -:102AC000287D002805D000232D691A460721049887 -:102AD000A84731482F4920388A7A0378A371437870 -:102AE000E37183782372C37863720379A3724379A5 -:102AF000E37283792373C07960739000E273C01925 -:102B0000038F2374038F00E03DE01B0A6374836B23 -:102B1000521C1B0CA374806B000EE074D0B2887240 -:102B20000A2801D30020887220796A461070C006F6 -:102B300003D57D201A4A800190642079A31D0E22BE -:102B40006D460DC54223097900220398FFF782FCE8 -:102B50000246F86B401CF8630399049802F098FD54 -:102B600011E0E179A07909024018217A647A090418 -:102B70002406091940189863002A04D000231A4635 -:102B800006210498B04700203AE700007C040020AA -:102B900010060020EC000020480C0020100A002045 -:102BA00080160020034610B50020024602E09C5C1F -:102BB0006040521C8A42FADB10BD30B50D46084613 -:102BC00009781446252901D0012030BD062C01D2F8 -:102BD000032030BD611EFFF7E5FF29192039C97FA9 -:102BE000814201D0042030BD002030BD70B51E46AA -:102BF00004460B465520049D059920706370A27011 -:102C0000E6702571EE2E10D02A46601DFEF7CFFA31 -:102C1000691D2046FFF7C6FF61194871A81D052EE2 -:102C200002DA002E00D1002070BD05212046FFF7FA -:102C3000B9FF60710620F2E7FEB516460F4605465D -:102C4000FFF7BBFF040014D0E0B2694608720090A1 -:102C500002A90B4801910278401E0178EE23094831 -:102C6000FFF7C4FF02460749284602F011FD20463F -:102C7000FEBD32463946284600F006F8FEBD00008B -:102C800029010020F80C0020F7B588B04A78F848F0 -:102C9000039242688260421C15788E782D093607AF -:102CA0002D01360F0B7935431570F24A02920078E8 -:102CB000039A84460C46624501D0FF2A2FD1214653 -:102CC000E7780931EC4A002605914F2F74D02EDCAD -:102CD000EA480121192F70D016DC072F26D008DC16 -:102CE000002F1CD0012F55D0032F58D0052F47D1CE -:102CF00083E0112F71D0162F70D0E149172F08688B -:102D00006DD0182F3CD15CE2312F76D008DC212F1A -:102D100067D0222F70D0232FE3D0242F30D14AE365 -:102D2000322F03D0332F68D0342F29D1DAE004209A -:102D3000642F7DD012DC562F7BD008DC502F79D049 -:102D4000532F78D0542F77D0552F19D1B6E2572F63 -:102D500073D0582F72D0632F12D1C9E2692F2DD0B2 -:102D600008DC652F6BD0662F2DD0672F31D0682FF0 -:102D700006D1D6E26B2F24D0732F70D0742F6FD072 -:102D800002206946087404A90191EE232A460090A6 -:102D9000614608E0641D00930194012349E2B949AA -:102DA0001820A6E203990298FFF720FF0246029935 -:102DB000089802F06DFCFEE237E220E2B2490C20F6 -:102DC00097E2B24995E2B1491039502091E23B4671 -:102DD0002FE2E1790020A74A08E0C5E1D3E1E9E16B -:102DE0000BE0EFE023185B7A1354401C8842F9DBB8 -:102DF000A04803F0DDF9C2E254E1A2796179120240 -:102E00008918E27989B2882B2BD0892B2DD08A2B77 -:102E10002FD0832B32D0842B35D0852B38D0862BE6 -:102E20003BD0872B3ED08B2B41D08C2B44D007E05E -:102E300062E24CE2F7E101E217E2FCE150E268E213 -:102E4000FE2B12D0A92B3CD0B32B3ED0992B3FD0D8 -:102E5000A12B42D08748103840180092A5E179E2B2 -:102E600090E2490009188A483AE04900091889485F -:102E700036E0490009188648203831E04900091831 -:102E8000952080002CE0490009189D20800027E053 -:102E900049000918A520800022E049000918FD20FA -:102EA00080001DE0490009187948A03818E0490061 -:102EB0000918DD20800013E049000918BD208000BA -:102EC0000EE04900091874480AE04900734807E019 -:102ED000734849000818001DBFE749000120C006DB -:102EE0000818BAE7A279617912028918E27989B2E1 -:102EF000882B23D0892B25D08A2B27D0832B2AD02F -:102F0000842B2DD0852B30D0862B33D0872B36D0F9 -:102F10008B2B39D08C2B3CD0FE2B40D0A92B42D010 -:102F2000B32B44D0992B45D0A12B46D05148103813 -:102F3000401800220599FEF73AF920E249000918E5 -:102F400053483DE049000918524839E04900091842 -:102F50004F48203834E049000918952080002FE0C0 -:102F6000490009189D2080002AE049000918A52081 -:102F7000800025E049000918FD20800020E049007C -:102F800009184348A0381BE049000918DD208000DB -:102F900003E049000918BD2080000818C9E749006E -:102FA00009183C48F9E7490009183B48F5E749008A -:102FB0003A48F2E749003A4802E049000120C006D9 -:102FC0000818B7E76279A479240212190924A40128 -:102FD00092B2002B14D0012B19D0022B23D0032B3B -:102FE00027D0042B2DD0052B31D0062B2FD0082B2A -:102FF00036D06846067404A821230091019018E198 -:1030000013095B001818001930E0012025E01309AE -:103010005B001818001912E013071B0F0A469A40AC -:103020001040F2D119E013095B0018180523DB01E9 -:103030001BE013095B0018180F239B01C018808E3A -:10304000EAE713095B00181801239B020DE0D20088 -:1030500010184030007E4006C00F6A461074CAE760 -:1030600013095B0018180923DB01C018808AD3E715 -:1030700028010020F80C0020B418002000110020C6 -:10308000780E002088700008ACF7FF1F107C000845 -:10309000B4040000B4050000B4060000900600204F -:1030A00080100020A2796179120289188DB2002B5C -:1030B00017D0012B1ED0022B25D0032B2CD0042B94 -:1030C00033D04021052B38D0062B36D0072B3FD0EC -:1030D0006846067404A80190B84800960278222336 -:1030E00060E62B095B0029071B18090F9520E27980 -:1030F000800035E02B095B0029071B18090F9D2074 -:10310000E27980002CE02B095B0029071B18090FCE -:10311000A520E279800023E02B095B0029071B181A -:10312000090FFD20E27980001AE029072B09090F19 -:103130005B001B18E279A24812E0EA001018403048 -:10314000028B8A43E179C907490E0A430283C1E72A -:103150002B095B001B1829079948E279090F803079 -:10316000181802F0B9FAB5E7002B02D0012B03D0F2 -:1031700005E102F0A7FC02E102F06CFCFFE08F48E1 -:10318000E37802780EE6A179607909024018E179C6 -:103190008C4C80B2002B0AD08B4E012B02D0928A2D -:1031A000002A04D040008019009101900FE64000F1 -:1031B0000019F9E7002800D00E6000961723019649 -:1031C00037E0002800D00E60A1796079090240182C -:1031D00085B2E27900207D4903E027187F7A0F54F9 -:1031E000401C9042F9DB7949284603F009F809347C -:1031F000724800960196049402781823D2E5A379C8 -:1032000060791B02C018D082908A002809D096826B -:103210006F4802F0FDF9694800960196027819237B -:10322000C0E59182F4E7138300E0168300960196CF -:10323000E3782A46B6E5664920205AE0A17960790C -:1032400009024018634980B20A18E179121D7828F2 -:1032500001D3002105E00B18782B02D97821081A38 -:1032600081B2C8B201920090B1E5A17960790902FA -:103270004018584980B20B18E2791B1D782801D3F9 -:10328000002205E01118782902D97821081A82B2A3 -:1032900018460599FDF78BFF009601964748E3789D -:1032A000027803990298FFF7A1FC02460299089858 -:1032B00002F0EEF9474802F0C3FF7CE0454802F017 -:1032C000BFFF3E4800960196027855236AE54048C4 -:1032D00002F09EF93948009601960278562361E57E -:1032E000032109023C48FDF77BFF009601966EE53D -:1032F0003A49019100906AE5A17960790902401884 -:10330000E17980B20D01FEF765FAE9B20091019012 -:1033100035E7FEF7F5F8294800960196027865230F -:1033200040E5009665232A46019603990298FFF727 -:103330005DFC02460299089802F0AAF9012080F388 -:103340001088BFF34F8F27492548C860BFF34F8FC0 -:1033500000BFFDE7A17960790902401880B2E279E7 -:10336000059902F033FF002809D0C0B2009004A9EB -:10337000124801910278EE23401E017813E5009671 -:103380000196FCE6A17960790902401880B20690A6 -:10339000E47900963B462A46019603990298FFF786 -:1033A00025FC02460299089802F072F92246059916 -:1033B000069802F01BFF00200BB0F0BD2901002091 -:1033C000140400000080000800A00008F80C002091 -:1033D000B41800208010002090060020F416002071 -:1033E0000400FA0500ED00E070B5FEF753F816484A -:1033F00000F0EAFA154D164C6869A065124881681C -:1034000061658188491C81808088E0640E4802F0F3 -:10341000FFF82868206768686067A868A0670122CD -:103420000C4B1146A06DFDF7D9FF20468030E968AE -:103430000160A9694160E96981602969C160296AFF -:103440000161002070BD0000B41800203C01002084 -:10345000801600203930000030B583680122134007 -:1034600002D00022104630BD8C684B68C9682343E7 -:10347000C468034D2C4021430B43C360F2E70000B6 -:10348000C73FFFFF30B583680122134002D00022FE -:10349000104630BD18C94D6823430C6889682C4319 -:1034A00023430B43C168024C21400B43C360EFE749 -:1034B0003CC2FEFF08B504494A6902434A614969B2 -:1034C0000140009108BD00000010024008B5044909 -:1034D000CA690243CA61C9690140009108BD000080 -:1034E0000010024008B504498A6902438A6189696B -:1034F0000140009108BD00000010024070B5094E67 -:1035000004467618203E049D0C34F17F0830102DBF -:1035100003D00A50F07F035170BD0A51F17F0B5068 -:1035200070BD000030710008044A51182039C97F6D -:103530004258520852004250704700003071000853 -:10354000044A51182039C97F425801231A43425076 -:103550007047000030710008044A51182039C97FB3 -:10356000425802231A43425070470000307100084D -:10357000054B10B559182039C97F4358032424033B -:10358000A3431343435010BD36750008054B59182B -:103590002039C97F001D0B581B0C1B0413430B5013 -:1035A0007047000030710008054B10B559182039DC -:1035B000C97F4358034C23401343435010BD0000C0 -:1035C00036750008EFBFFFFF054B10B559182039BD -:1035D000C97F43588024A3431343435010BD0000C8 -:1035E00036750008054B10B559182039C97F435866 -:1035F0000324A402A3431343435010BD36750008AF -:10360000054B10B559182039C97F43582024A343CE -:103610001343435010BD000036750008054B10B52C -:1036200059182039C97F43584024A34313434350BA -:1036300010BD000036750008054B10B5591820392B -:10364000C97F435803242402A3431343435010BDAE -:1036500036750008F0B51FB40024022804D00128F4 -:1036600004D00425144F12E00125FBE70225F9E7F9 -:10367000019861000E18220103990298FDF786FD5A -:1036800039690122114339613080641CE4B2AC42D3 -:10369000EED3F868C007C00FFBD1F8688006C00FF2 -:1036A00008D0F86820210843F860386940084000D5 -:1036B0003861012005B0F0BD00200240C90210B5FC -:1036C0000B1811491AE00C69022214430C6148617D -:1036D0000A69402422430A61CA68D207D20FFBD18B -:1036E000CA689206D20F0DD0CA6820242243CA604D -:1036F0000C69022294430C61920280189842E2D332 -:10370000012010BD002010BD002002400748C16804 -:10371000C907C90FFBD101698022114203D00449B6 -:1037200041600449416001207047000000200240D0 -:1037300023016745AB89EFCDF0B500233CE00124C0 -:103740009C40224037D04F680668144654436500B9 -:103750006519AE4367433E4306604E68012E01D0B3 -:10376000022E05D18F6886686743AE433E4386606C -:103770000F69C668AE4325467D432E43C6604D683B -:10378000022D18D14D69FF2A09D8066A54435443C3 -:103790002201121B96436C43264306620BE0140A77 -:1037A00022466243624362431401A61A446A6A4392 -:1037B000B443144344625B1C0A681446DC40BED127 -:1037C0004A68012A01D0022A06D10A68C9684368FA -:1037D00093434A43134343600120F0BD10B50446B0 -:1037E00001F04AFD206001F02DFD606001F038FD20 -:1037F000A06010BD014610B5002000290FD1104A6D -:10380000116B8907890F01290AD0022911D00329D8 -:1038100009D001F031FD01F015FD01F021FD10BDD1 -:1038200001F02AFD10BD11688907C90FFAD00548BB -:1038300010BD116A8907C90FFAD00120C00310BD5D -:103840000010024000127A00F0B50268194B1A4CC1 -:10385000984201D0A04203D17025AA434D682A4363 -:10386000164D174E174F98420AD0A04208D0164C5A -:10387000A04205D0A84203D0B04201D0B84204D142 -:1038800003242402A243CC68224302608A68C262F5 -:103890000A888262984205D0A84203D0B04201D083 -:1038A000B84201D1097C01634169012211434161A0 -:1038B0001046F0BD002C01400004004000400140D3 -:1038C00000440140004801400020004041680122BE -:1038D000D202914341608168082291438160704720 -:1038E000FEB5044600680D460026C007C00F4FD144 -:1038F000E9686868AA69084329691143084321688F -:10390000244A114008432060A8686168032212031A -:103910009143014361606869A168121191430143B9 -:10392000A1601D48844203D10020FFF763FF12E02D -:103930001A4884420BD01A48844208D0194884425D -:1039400005D01948844202D01848844220D16846E4 -:10395000FFF744FF029800281AD02968002917D0E1 -:103960000126AA69F3039A420CD140004A08801844 -:10397000FDF7BCFB0E4980B201400007420F0A432D -:10398000E26005E04A081018FDF7B0FB80B2E06085 -:103990003046FEBDF369FFEF0038014000440040AF -:1039A00000480040004C004000500040001401401E -:1039B000F0FF000010B580220249FDF7F8FB00205F -:1039C00010BD0000A0700008F0B5154A00211514C4 -:1039D000144C154F0CE0D65ABE4208D19B185B8898 -:1039E0006668B34203D90AC44B1C2360083C491CD7 -:1039F0004B01AB42EFD321680123002905DB4901CC -:103A00008918202201F0D2FC00E08380A0684001E8 -:103A10002030A84201D90020A0600020F0BD0000A5 -:103A200000C800083C010020AA5500001FB50B4645 -:103A3000024604A1684602F063FC0146684601F0B4 -:103A4000DFFB1FBD201B5B25643B25644800000095 -:103A500070B501208AB04002FFF744FD224CA06AF5 -:103A600003263043A0622149B0050A68824302431D -:103A70000A60A26A83111A43A2620A68824302435F -:103A80000A60002505950695079505A92046089525 -:103A9000FFF7E2FC0120039000950195029569462D -:103AA00004952046FFF7EEFCE16804208143E160C5 -:103AB0006169C908C900314361616168014361609E -:103AC0006068082188436060A06817218843C9079F -:103AD0000843A060A068C00FFCD1A068044908405A -:103AE000401CA0600AB070BD0024014008270140BE -:103AF000E8FFFF7F10B50120FFF7DCFC00210A2062 -:103B000000F08EFC0A2000F081FC00210B2000F068 -:103B100087FC0B2000F07AFC10BD0000F0B50120FE -:103B200087B04004FFF7C6FC01208004FFF7C2FC09 -:103B30000120C004FFF7BEFC01208005FFF7BAFC9E -:103B40001C480125002403266A46049551C2092712 -:103B5000FF0669463846FFF7EFFD1920000203947F -:103B60006A46049461C269463846FFF7E5FD2802BB -:103B7000B86111486A46049551C2104F69463846EB -:103B8000FFF7DAFD0B20000303946A46049461C238 -:103B900069463846FFF7D0FD0720400300900294A5 -:103BA00003946946019504940548FFF7C5FD07B0E5 -:103BB000F0BD0000C0800000E743000000040048A2 -:103BC00000080048084807490160084901600421CD -:103BD0004160074A8260C1684907FCD1026105491A -:103BE00001607047CCCC000000300040555500000B -:103BF000FF0F0000AAAA000010B586B01421684685 -:103C0000FDF7EEFA1020FFF761FC0021112000F013 -:103C100007FC112000F0FAFB2F20694608800020E5 -:103C200001900848084C02902046FFF70DFE2068DE -:103C3000802188432060E06801210843E06006B0ED -:103C400010BD0000E70300000010004070B5012027 -:103C50008EB08003FFF746FC03204002079002204D -:103C60000890032000240990012509200A9407A93F -:103C70000C950B94C006FFF75FFD3A4E102202210F -:103C80003046FFF791FC002202213046FFF770FC1E -:103C9000002202213046FFF7B3FC00220221304609 -:103CA000FFF7BCFC802202213046FFF78DFC00228A -:103CB00002213046FFF7C0FC002202213046FFF708 -:103CC00091FC002203213046FFF76EFC0022032105 -:103CD0003046FFF74DFC002203213046FFF790FCF1 -:103CE000002203213046FFF799FC80220321304651 -:103CF000FFF76AFC002203213046FFF79DFC0022FB -:103D000003213046FFF76EFC00211B2000F088FBEA -:103D10001B2000F07BFB144869460068009001946A -:103D200002940394059406940C20104C04902046B1 -:103D3000FFF7D6FD606829050843606060684900A8 -:103D400003225205904308436060A068491208436B -:103D5000A0602046FFF7BAFD2068284320600EB01F -:103D600070BD000000000240DC000020003801406F -:103D7000F0B58DB01C2106A8FDF732FA182168466F -:103D8000FDF72EFA012464042046FFF79FFB20462E -:103D9000FFF790FB012500240E2002260327039540 -:103DA0006A4605950494C1C209206946C006FFF71A -:103DB000C3FC00960920039504956946C006029746 -:103DC00001960595FFF7B8FC464E102204213046B7 -:103DD000FFF7EAFB002204213046FFF7C9FB00226F -:103DE00004213046FFF70CFC002204213046FFF787 -:103DF00015FC802204213046FFF7E6FB0022042157 -:103E00003046FFF719FC002204213046FFF7EAFB99 -:103E1000002205213046FFF7C7FB0022052130466E -:103E2000FFF7A6FB002205213046FFF7E9FB002241 -:103E300005213046FFF7F2FB802205213046FFF7CF -:103E4000C3FB002205213046FFF7F6FB00220521C7 -:103E50003046FFF7C7FB00211C2000F0E1FA1C20D0 -:103E600000F0D4FAA61EFF21304600F0D9FA304601 -:103E700000F0CCFA1C48EE03006806900794089402 -:103E800009940C200AAA51C2184C06A92046FFF733 -:103E900027FDA06821140843A060A068B043304308 -:103EA000A06020681F2149058843084320602068DE -:103EB0004911884308432060606829050843606011 -:103EC000606849007A05904308436060A068491221 -:103ED0000843A0602046FFF7F9FC206828432060D3 -:103EE0000DB0F0BD00000240E000002000440040A2 -:103EF00030B58DB01C216846FDF772F9182107A86E -:103F0000FDF76EF90124A4042046FFF7DFFA2046EE -:103F1000FFF7D0FA032080020790022008900320C8 -:103F20000024012509A931C104200C9007A91348D8 -:103F3000FFF702FC00211D2000F072FA1D2000F0A6 -:103F400065FAE120800200900C2001940294039411 -:103F500005940490E8030A4C069069462046FFF752 -:103F6000BFFCA068A1140843A0602046FFF7AEFC88 -:103F70002068284320600DB030BD000000040048D8 -:103F80000048004010B58EB01C216846FDF728F9A6 -:103F9000182107A8FDF724F901200005FFF796FA7C -:103FA00001208004FFF786FA18200790022008906D -:103FB00003200990002404200C900A940B9407A974 -:103FC0001348FFF7B9FB00211D2000F029FA1D203E -:103FD00000F01CFAE120800200900C200490019473 -:103FE0000294039405940120C0030A4C069069468C -:103FF0002046FFF775FCA068A1140843A060204686 -:10400000FFF764FC20680121084320600EB010BD5A -:10401000000400480050004030B58DB01C216846B7 -:10402000FDF7DEF8182107A8FDF7DAF82020FFF7E2 -:1040300059FA01204004FFF73DFA30200790022092 -:10404000089003200990052000240C9009200A9470 -:104050000B9407A9C006FFF76FFB00211D2000F09D -:10406000DFF91D2000F0D2F9E120000200900125C7 -:104070000194029403940C20ED0304AA31C20B4C6A -:1040800069462046FFF72CFC6068A843284360601F -:10409000A068A1140843A0602046FFF717FC206821 -:1040A0000121084320600DB030BD00000014014024 -:1040B00000B50846042A02D80020C04300BD01789C -:1040C0007F2902D90120C04300BD41784906490E2D -:1040D0001F2902D90220C04300BD114602F0CAFBCD -:1040E0000028F9D0042000BDF7B588B00F460A9A21 -:1040F0000898FFF7DDFF0690002803D00020C0439A -:104100000BB0F0BDBD483A7800783946824273D191 -:104110008C784A78CB78B98824024DBAB8491C43C8 -:1041200008704A7001200790200521070226000E22 -:10413000090F130002F0F8F811A60A508DA7BFDD91 -:10414000A6A6A6A6A6A6A6A6E9F0A600E81DC008F3 -:10415000AB4903908870002038E0002701200597C4 -:1041600001900098C000049026E021070122200958 -:10417000090FD202944207D24200A2481218092025 -:1041800080011018808E05E042009E481018FF3014 -:104190008130808AFDF794FA002801D00198074306 -:1041A0000198641C4006000E01900598A4B2401CC2 -:1041B0000590082804DA049805994018A842D4DB31 -:1041C0008F4800994018C7700098401C03990090D0 -:1041D0008842C2DB761854E0E81DC0088849039085 -:1041E0008870002030E000200090012001900298AB -:1041F0000027C00004901DE0FDE02005000E4200F5 -:10420000804821071218092080011018090F808AA0 -:10421000FDF756FA002803D0019900980843009052 -:104220000198641C4006000E7F1CA4B20190082F68 -:1042300003DA0498C019A842DFDB7149029A00989A -:104240008918C8700298401C039902908842CADB02 -:10425000C0E768006A498446887000200EE0211893 -:104260004A006849470052180921C9015118898E2E -:10427000634A0B0ABA18D3701171401CA842EEDBD6 -:1042800017E0761C8DE068005D4A8446907000203F -:104290000DE021184B005B4947005B18092189019B -:1042A0005918898ABF180B0AFB703971401CA84243 -:1042B000EFDB6644E5E7002D12D0FF2212029542A3 -:1042C00007D142004F4812189D208000101801F0BD -:1042D000FBF939464A480A9AFCF769FF0A9E85E0CD -:1042E0004200484812189D208000101801F0ACF8D8 -:1042F000EFE73879797900020843424962005218A1 -:104300000921C90151188886E3E7E81DC0083C4926 -:1043100003908870002036E047E03818C07900909C -:1043200001200190002005900298C000049024E034 -:10433000210701222009090FD2029442009B019A11 -:1043400007D21A4043002F481B189D2080001818E0 -:1043500005E01A4043002B481818FF30953001F053 -:10436000C7F90198641C4006000E01900598A4B29C -:10437000401C0590082804DA049805994018A842C2 -:10438000D6DB0298401C039902908842C5DB1C488A -:10439000B9788170F978C170397901717979417191 -:1043A000361D0698002814D025E000200EE04100BC -:1043B000C919CA79097A12020A4321184B00114916 -:1043C0005B180921C90159188A86401CA842EEDBF6 -:1043D000DDE70798002809D0B1B2094802F04AFA8F -:1043E00007498855000A89194870B61C32460449A5 -:1043F000089801F04DF9002082E600003401002009 -:10440000F80D00200011002070470000C106C90E01 -:1044100001208840014908607047000000E100E089 -:104420008307FF22DB0E9A408907090E9940002876 -:104430000BDA0007000F0838830808489B0018189B -:10444000C36993430B43C3617047830804489B00CF -:104450001818036893430B430360704700ED00E0B6 -:1044600000E400E08307FF22DB0E9A408907090E73 -:10447000994000280BDA0007000F08388308084825 -:104480009B001818C36993430B43C36170478308AB -:1044900004489B001818036893430B43036070475C -:1044A00000ED00E000E400E0F7B58CB000200B90D8 -:1044B0000D98007854280ED10D984078C006C00E93 -:1044C0004100411805900020C0430B31914203D1B7 -:1044D0000598022802DA00200FB0F0BD0D9841794E -:1044E00002790802104380016421FCF7FFFD069069 -:1044F0000D982230417A027A08021043800164212B -:10450000FCF7F4FD0699814204DBCD48816B491C20 -:104510008163E0E7401A0599491EFCF7FDFD0A900A -:104520000C98002863D1C6488168491C002481602A -:1045300058E0600021180D98069A08180A996143FE -:104540008D18BF490A69521C0A613721C9018D4281 -:1045500002DABB4B01221A706A1A232109028A422D -:104560002CD2017A1E293CD3C17980790E020643F0 -:10457000284602F025FD7D27FF0070433946FCF7F1 -:10458000CBFD0090284602F037F971424843394686 -:10459000FCF7C2FD0146AA483746006A0C220346D2 -:1045A000A84E53439A199760009FF7505160FF211E -:1045B0009031884202DAA249401C08627D20C00185 -:1045C00085420EDD9E4D2878012807D12A6A002AEF -:1045D00004DD9C490020AA6100F076FC00202870D0 -:1045E0002862641C0598844201DA282CA1DB0C980F -:1045F00001287DD19248C168491C0024C1600BE1AB -:104600000A9A069B62436000D51821188C4B0D98BE -:104610005A690818521C3726017AF6015A61B542C8 -:1046200002DA874A012353702322AB1B1202934202 -:104630002DD21E297ED3C17980790E0206432D200A -:104640000002281A009002F0BBFC7D217043C900D3 -:10465000FCF762FD0746009802F0CEF87D2170431A -:10466000C900FCF759FD024675480C23416A08460B -:104670005843754B8446C018866066469F51426019 -:10468000FF209030814202DA6D48491C41627D2052 -:10469000C00185424EDD6A48407801287ED1684DD0 -:1046A000686A0990002879DDE86168480390002075 -:1046B00008907D20C000424200238446049201926B -:1046C000009063491A46184607931BE00C255E4E7E -:1046D0004543AF19BE680296322E12D37F685A4EF8 -:1046E000282F0EDB75595B4EC835B54209D200E064 -:1046F00098E08F4200DA3946039E029DB54200D20F -:104700000395401C099DA842E0DB00254EE00C20EB -:104710002E464D4F4643B859F71903907E680296CE -:10472000BE68322E41DB029E282E3EDB0646C8368E -:10473000484F00E06FE0BE4237D20E46029F32364D -:10474000B7420BDD002B01DD002A03D0002A2CDD4F -:10475000002B2AD10798401C079026E0089E3D4F69 -:10476000761C08960646C736BF1EBE4207D2009F7B -:10477000B84200DA0090019FB84200DD0190FF27A7 -:104780002C37BE4205D2049F039EBE4200DD04903A -:104790005B1C0646C93EFF272C3700E037E0BE42CF -:1047A00003D2604500DA8446521C6D1C099885428C -:1047B00003DAFF20F5308142A9DB0020002B07DD62 -:1047C000002A05DD079A002A02DD6046049A04E00B -:1047D000089A0A2A05DD019A00988018C20F10185D -:1047E0004010174B9A6A550052191018C217920FB1 -:1047F0001018801098621648814208DA586B4200FF -:1048000080184018C117890F0818801058630C4988 -:10481000002048704862641C0598844202DA282C03 -:1048200000DAEDE606494A6B086B8018CA6A520046 -:104830008018C217920F10188010C8620B984BE6B0 -:10484000FC01002034200020F432002003D90000B5 -:104850000F270000BD02000010B5040001D0601C4D -:1048600003D10221064801F045FC012C01D0641C53 -:1048700003D10221024801F061FC002010BD0000BC -:10488000FE01002070B572B60125094A2D0395611D -:1048900080210C028B019362084201D0946100E0F8 -:1048A000946249089361F6D19562956162B670BDD4 -:1048B0000004004810B501200449C00648600448BF -:1048C0000168491C016000F005F810BD00ED00E032 -:1048D000D800002070B5094DE86F00280CD0084CB6 -:1048E000084902202268FDF767FF00202060E86782 -:1048F0008021044801F068FB70BD0000FC0300202B -:10490000E80000201005002010B50648054B00788F -:104910000021403B5A1840325478491C14700F292A -:10492000F8DB10BD4011002010B5084C084B0122E7 -:104930000221A06DFCF752FD064800F069FEE06D13 -:10494000401CE065A06D2066002010BD8016002090 -:1049500039300000B41800200248C16D491CC165FF -:104960000020704780160020F3B5FA4D85B0286806 -:1049700000286FD0686800281CD000220D21082074 -:1049800000F0CCFE00221146082000F0C7FE0122F4 -:104990001146082000F0C2FE00200146EE4A13181E -:1049A0004033401C19701028F8DB00260121144602 -:1049B00040347BE20122E1E7B2000598059B805C70 -:1049C000D7187A78019201257B8800931B2873D031 -:1049D00012DC0246030001F0A7FC1B5C72727272CB -:1049E00072723E3E3E3E3E3E5C5C5CA7A7A73E3EEA -:1049F000BEBEBEBEBEBE5C00342870D011DC014617 -:104A00001C390B0001F090FC18A7A7A7A7A7A7A720 -:104A1000A7A7A7A7454545454545454545454545BE -:104A2000F7453A2873D008DC014635390B0001F010 -:104A30007BFC05E26E56E26E3000DC2804D004DC1C -:104A40003B28EFD0C82824D120E1DD28FCD0FA286B -:104A5000F9D11BE133E2D01F030001F065FC0E0821 -:104A60000A10181B1D1A1A1A1A1A1A20261A207C44 -:104A70004AE0FFF749FF00281FD0207C3AE0FFF70B -:104A800043FF002816D1207C002813D125E000F038 -:104A9000A1FBF5E12078F7E7FFF736FF1DE0207C6A -:104AA00000280AD0002905D007E0207C002804D186 -:104AB000002902D0012010E04DE000200DE013009D -:104AC00001F032FC070C050E111B262E0C0000F025 -:104AD00081FB00990198FCF707FE2074D0E11AE1F0 -:104AE00000F078FB0CE0207C0028E6D000990198CB -:104AF000FCF7FAFD0028E0D0DCE7207C0028DCD0C1 -:104B000000990198FCF7F0FD0028D6D1D2E758E1D2 -:104B1000207C0028CED100990198FCF7E5FDB3E791 -:104B2000207C0028ECD0C5E7102804D0112804D040 -:104B3000122AAED10AE0227C03E0207C0028A8D013 -:104B400001220099019800F0E9FD99E1207C0028FC -:104B50009FD00022F5E715383D79030001F0E4FB12 -:104B6000120A1215181B0F1E3C4C5B6A2D798185A9 -:104B7000898D7D9400F02EFB13E0207484E000F01A -:104B800029FB1DE000F026FB29E000F023FB36E0C6 -:104B900000F020FB42E000F01DFB4EE0207C0028EE -:104BA00070D028460099FCF72FFE0546F9887879E1 -:104BB000FCF72AFE854263D064E0207C002861D0A7 -:104BC00028460099FCF720FE0546F9887879FCF71D -:104BD0001BFE854254D155E0207C002852D0284647 -:104BE0000099FCF711FE0546F9887879FCF70CFE70 -:104BF000854245DB46E0B1E0207C002842D02846D3 -:104C00000099FCF701FE0546F9887879FCF7FCFD70 -:104C1000854235DC36E0207C002833D028460099D8 -:104C2000FCF7F2FD0546F9887879FCF7EDFD854241 -:104C300026DD27E0207C002824D028460099FCF7B8 -:104C4000E3FD0546F9887879FCF7DEFD854217DA41 -:104C500018E0207C002813D1A3E7207C00280FD186 -:104C6000AEE7207C00280BD1B9E7207C002807D1D3 -:104C7000C5E7207C002803D1D0E7207C0028DCD0C9 -:104C800001207AE7002078E70225F9E03F79154610 -:104C9000C8280DD0DC2823D0DD282AD0FA28F3D16B -:104CA0002D48E90008184030007EC0062AD508E0EB -:104CB0002948E90008184030007EC00601D40021D0 -:104CC00021E0207C002822D038460099FCF79CFD8A -:104CD0000146284600F0C0FB284600F0D3F94CE717 -:104CE0001D48E90008184030007EC006E9D40121C3 -:104CF00009E01948E90008184030007EC006E0D4F9 -:104D0000022100E003212846FDF7F4F9D9E72846FF -:104D100000F0F8FEE0E73F790225342802D037287A -:104D200016D108E0207C002812D038460099FCF704 -:104D30006BFD401C07E0207C002809D03846009914 -:104D4000FCF762FD401E02463846009900F05CFD0B -:104D500096E00000780E0020001100203D7979795E -:104D60000291F9880191332814D035281BD03828B6 -:104D70008AD1207C002887D00298FCF745FD0746A1 -:104D800028460099FCF740FD3A1A0199029800F074 -:104D90003BFD79E7207C0028FBD028460099FCF7F2 -:104DA00033FD0246F1E7207C0028F2D02846009926 -:104DB000FCF72AFD054601990298FCF725FD2A1803 -:104DC000E3E73A7979790291F9880191797A039147 -:104DD0007D89362806D0392812D03A281FD03B28A2 -:104DE0004DD131E0207C002849D010460099FCF7D5 -:104DF0000BFD074601990298FCF706FD3A180CE0F6 -:104E0000207C00283BD010460099FCF7FDFC0746AB -:104E100001990298FCF7F8FC3A1A29462CE0207C0C -:104E200000282CD010460099FCF7EEFC07B201993F -:104E30000298FCF7E9FC00B247433A46294603983A -:104E400000F0E2FC3A1416E0207C002817D010464F -:104E50000099FCF7D9FC07B201990298FCF7D4FC41 -:104E600001B23846FCF758F902B20F4629460398BA -:104E700000F0CAFC3A46691C039800F0C5FC032503 -:104E8000301141000F48012308183107090F02892A -:104E90008B401946114000D00121277C0830002F9B -:104EA00001D01A4300E09A430280761906988642A0 -:104EB00000DA81E503494868401C4860002007B0DB -:104EC000F0BD0000780E0020F7B586B005927D2277 -:104ED00065480024D2008646504200900490039218 -:104EE00001926348029404606049234622462046AA -:104EF00019E00C254543079E2F46AD19AE68B44610 -:104F0000322E0FD36D68282D0CDB3E46079FBE590D -:104F1000584FC836BE4205D28D4200DA2946F445C4 -:104F200000D2E646401C059DA842E2DB681E57E021 -:104F300070460C25079E45437059AD196E68AD68E3 -:104F4000B446322D4ADB6646282E47DB0646494FDB -:104F5000C836BE4242D20E463236B4450BDB002B79 -:104F600001DD002A03D0002A38DD002B36D102985B -:104F7000401C029032E0282C07DA3F4EA700BF19F0 -:104F800007263602BE19B580F0803A4E0546C73571 -:104F9000B61E641CB54207D2039EB04200DA0390ED -:104FA000049EB04200DD0490FF272C37BD4208D29A -:104FB0000D462835AC4504DA009DA84200DD00907E -:104FC0005B1C0546C93DBD4208D20E462836B44595 -:104FD00004DA019DA84200DA0190521C7046401E7E -:104FE0008646002803DBFF20F5308142A0DB204805 -:104FF00004604360029D8560C260039D0561009D61 -:105000004561019D8561049DC5610020002B08DD7F -:10501000002A06DD029A002A03DD019A0098101882 -:1050200004E00A2C05DD049A03988018C20F1018BA -:105030004010124B1A68540012191018C217920F20 -:105040001018801018600948401E814209DA0C4A85 -:1050500010684300C0184018C117890F0818801045 -:105060001060002009B0F0BD03D900001027000037 -:10507000B41F0020BD0200000011002038020020F3 -:105080002C020020FEB50746402802DB0020C0436A -:10509000FEBD2C48F9000E1800964036348BE10610 -:1050A00001D40020FEBDA1063CD561063FD42649AF -:1050B000096800980A25406D0190081AA1070FD0D1 -:1050C000A107890F012905D0022905D0E1438907ED -:1050D00005D005E0642503E07D25ED0000E01B4DD3 -:1050E000A84224DB2946FCF717F8014615487A0048 -:1050F00012180B20800110188446808E019B4018E6 -:1051000069435B18009980B24B650D2189015118E4 -:10511000898E814203D8084640210C43348361467E -:10512000888604E0600602D5402084433483307EC4 -:10513000B9B24006C20F052000F0F0FA307E4006FA -:10514000C00FFEBD00110020440200201027000007 -:10515000F7B50446FCF72BFB054602992068A942E7 -:10516000A16806DC4018029A0199FCF720F8029920 -:1051700019E040182A460199FCF719F829462046FB -:10518000FCF772F92046FCF712FB06460298471B13 -:10519000B7420DDCA16820683A46401801994919C8 -:1051A000FCF705F839462046FCF75EF90298FEBD8B -:1051B000002E0CDDA168206832464018019949197B -:1051C000FBF7F5FF31462046FCF74EF9AD192846AE -:1051D000FEBD0000074A0F2011183F235B5C4031E1 -:1051E000401E0B700028F7DC02494031087C087033 -:1051F000704700000011002000B5FFF743FB00BD21 -:1052000010B50C460A4601460348FFF7A1FF00F01F -:10521000C3FE204610BD0000C003002010B50C46A0 -:105220000A4601460348FFF793FF00F0B5FE20460B -:1052300010BD0000C003002010B50C4600F014FFA4 -:10524000204610BD04494968F0221140034A09096B -:10525000515CC8407047000000100240E07A00082E -:1052600003494968034A4905490F515CC8407047E2 -:1052700000100240F07A000810B5074841680C2081 -:105280000140064805D0042904D0082901D100F0C6 -:1052900009F810BD024810BD0010024000127A004B -:1052A000001BB70010B50D4C60680321C903012233 -:1052B0000840D203811A0A4802D0914200D109481D -:1052C000E16A0907090F491CFBF710FF61680F220B -:1052D00092041140890C891C484310BD0010024003 -:1052E00000127A00001BB7000920C00600694106C1 -:1052F000C90FC943C907CA0D012149028A430106E2 -:10530000C90FC943C907890D0A430121C00B89028E -:10531000C043C0078A43400D02432248016901206F -:10532000C00282438807C00FC043C007000D02437C -:105330000120000382434807C00FC043C007C00CD0 -:10534000024350088A06D30F012240009A431043BB -:10535000022290434A06D20FD243D207920F104343 -:10536000042290430A06D20FD243D207520F1043B1 -:1053700008229043CA05D20FD243D207120F8905E3 -:10538000C90F1043C9431022C9079043C90E0843EF -:10539000054909695202C90BC943C9079043890CE1 -:1053A00008437047000400480008004870B5D4174F -:1053B000A40F0023A418A51003E09C000E59065169 -:1053C0005B1C9D42F9DCD40F6B00A418651003E050 -:1053D0005C000E5B06535B1C9D42F9DC104670BD01 -:1053E00000B5FFF781FF00BDF8B500238446802596 -:1053F000DB431248002421462A464A4312181788E4 -:105400000F4EB74209D17E26B75A0E4EB74204D18D -:105410005288A24201DD0B461446491C0829EBDBE9 -:10542000082B06D26B43191880226046FFF7BEFF97 -:1054300002E06046FEF7BEFA0020F8BD00C000089A -:10544000AA550000A55A00000B0702881B0F012176 -:1054500099408A430280704730B5402802DB002023 -:10546000C04330BD0D4CC20013191A464032157EA0 -:10547000AD0611D4400000190D24A4010419A18621 -:105480000B240021A4010019818605480068586595 -:10549000108B202108431083002030BD0011002014 -:1054A00044020020034610B50020024604E09C5C44 -:1054B0002018521CC0B2D2B28A42F8D310BD0000EC -:1054C00010B50B4C20461E388278611F4A70492265 -:1054D000227000796070085CA07003212046FFF7FD -:1054E000E1FFE0700421204600F040F810BD00000C -:1054F000F201002010B51C4C2078002824D0207B1D -:1055000080062DD1607901220023002806D0A271E7 -:10551000E07900280AD0401EE07107E0A068401C36 -:10552000A0600A2802D91420E071A37160780028D5 -:1055300016D02179491CC9B22171814200D922714A -:105540006371FFF7BDFF0BE02069401C2061C82894 -:1055500001D9642003E0E079002801D0401EE07109 -:10556000E068401CE06010BDD401002010B500F0E0 -:1055700009FE10BD70B5044604291AD10321FFF7B6 -:1055800091FFE178884214D1184900220878002858 -:1055900020780FD00B461433692808D16578087934 -:1055A000854204D101254D718A60A2781A54587839 -:1055B000C87070BD4928FCD10C4D60784B781E3501 -:1055C0009842F6D1A078C87069200A61287048789E -:1055D00068708878A87003212846FFF763FFE87099 -:1055E00004212846FFF7C2FF70BD0000D40100204F -:1055F00010B500F001F810BD03488168C907C90F54 -:1056000000D0C068704700000030014070470000C3 -:1056100070B51A4C6168491C616019490180A18804 -:1056200041801849CA6C8280496D81601121818353 -:105630001549C183A1684A011449511800250B4638 -:105640002A469E5CFF2E04D1521C202AF9D3002D3D -:1056500010D02022FBF7F2FFA0682060401CA06061 -:1056600040010121C9022030884201D90020A060F8 -:10567000002070BD202200F019FEEDE73C01002063 -:10568000AA55000080160020A55A000000C8000896 -:1056900010B514460A46012802D0022806D00DE0B3 -:1056A00021461046FFF7BAFD054804E021461046A2 -:1056B000FFF7C2FD0348816F491C8167204610BD7A -:1056C00068030020FC0300200B0702881B0F012148 -:1056D00099400A43028070470907090F01238B4054 -:1056E0000188002A01D0194300E0994301807047E6 -:1056F00010B5002A02D0FFF7E7FF10BDFFF7A4FEA8 -:1057000010BD0907090F01238B400188002A01D031 -:10571000194300E0994301807047000070B50B0504 -:105720001B0E204C5B000D071C192D0F030000F011 -:10573000FBFD09060B14191E22272C313600FF2908 -:105740002DD89520800003E0FF2928D89D208000D7 -:1057500020182946FFF7D5FF21E0FF291FD8A520F3 -:105760008000F5E780291AD2FD208000F0E780292B -:1057700015D20D48ECE7402911D2AD208000E7E7B3 -:1057800040290CD2B5208000E2E7802907D20648E4 -:105790002030DDE7802902D203488030D8E700209E -:1057A00070BD000000110020140400000121C90395 -:1057B000034A002801D09162704791617047000050 -:1057C0000008004801218903034A002801D09162A2 -:1057D00070479161704700000008004801210922CC -:1057E000C902D206002801D09161704791627047CA -:1057F00001214903034A002801D091627047916159 -:105800007047000000080048F0B5304C4B001C19F0 -:105810000923DB01E6180B23DB01E51892B28A2885 -:105820003DD00EDC294F4B00DF1909239B01FF18E7 -:105830008338030000F078FD0714181C21262D463C -:10584000480099283ED006DC8B282CD08C2831D0FB -:105850008D2839D133E0A12834D0FE2834D131E06D -:10586000102931DABA822FE010292DDABA862BE01E -:10587000102929DA0520C00108E0082924DA0F20C0 -:10588000800114E008291FDA01208002201882829A -:105890001AE0802918DAB28616E0AA8614E0802978 -:1058A00012DAB28210E040290EDA0D2080012018B1 -:1058B000828609E0402907DA0B208001F7E74029BA -:1058C00002DAE8E78029E8DB0020F0BD00110020C3 -:1058D000F0B58DB0002500F083FFFCF701F80590CE -:1058E00010213A4800F0E6FF0790FBF7F9FF04901B -:1058F0001021364800F088FF0690FBF7F1FF039077 -:105900001021324800F09EFF0190FBF7E9FF0646A8 -:1059100010212E4800F0AEFF0090FBF7E1FF2C4A6B -:1059200004469068012108439060881E1061294850 -:105930001061264B0021585C1070491C1029FADBBD -:105940001768FBF7CDFF0B90019900980297019023 -:10595000214F0091781921A1069B079A00F0D0FCF5 -:1059600045190B98A11B001B01910290039A049901 -:105970000398B21A431A009208460599421A7819F8 -:1059800020A100F0BDFC441908A8FDF727FF264818 -:1059900042680320C00302403819134623A100F0D7 -:1059A000AFFC0419381926A1089A00F0A9FC0119C6 -:1059B0003846FFF725FC01210D20FEF737F8244972 -:1059C0000320886000200DB0F0BD00005870000872 -:1059D0000030024001A00000680200200D0A43527E -:1059E00043202025303458202025303458202025CD -:1059F0003034582020253034582020253034580D9C -:105A00000A00000074696D6520253034642020256B -:105A10003034642020253034642020253034642044 -:105A200020253034640D0A00001002404D61696E7B -:105A3000536F75726365202578202564200D0A0058 -:105A4000737973636C6B202564200D0A00000000DD -:105A5000C000002030B50021174D084669604200A3 -:105A60005219401C1181FF28F9DD00200522134C3A -:105A7000D20143001B199B18401C99821028F8DBA7 -:105A800000200922D20143001B199B18401C998653 -:105A9000FF28F8DD00201022C100091940310B8BCE -:105AA000401C93430B834028F6DB01200449286007 -:105AB0004882002030BD0000780E00200011002038 -:105AC000B418002010B500210C48092201600C4BCD -:105AD000084692014400E418A418401CA18610282E -:105AE000F8DB0020012292024400E418A418401CB4 -:105AF000A1820828F8DB002010BD0000780E0020ED -:105B00000011002010B5402802DB0020C04310BD6A -:105B10000B4BC100CA18114640310C7EA4060DD5AE -:105B20004000C0180B2300249B01C0188486054840 -:105B300000685065088B202290430883002010BD28 -:105B4000001100204402002010B5FBF7F3FEFCF723 -:105B5000A5FA10BD70B594B030216846FBF740FB44 -:105B60000024022501260E94E803099000960520E2 -:105B70000F94C0040D9401960A900C9408950B950F -:105B80006846FCF779F8002803D0862115A000F0BC -:105B9000B5FB07200C900E9401210D950F940CA8D5 -:105BA000FBF78EFF002803D092210EA000F0A6FB89 -:105BB000109610A81296FBF70DFF002803D0A12124 -:105BC00008A000F09BFB4B208001FCF74FFA04205B -:105BD000FCF706FA00221146501EFBF7F7FE14B040 -:105BE00070BD00002E2E5C5372635C4253502E63D6 -:105BF0000000000013480168012211430160416860 -:105C0000114A114041600168104A11400160016869 -:105C1000012292049143016041683F2212049143A2 -:105C20004160C16A09090901C162016BFF22143296 -:105C300091430163416B4908490041630021816040 -:105C400070470000001002400CB8FF08FFFFF6FE8E -:105C500004480169C907C90F02D00121C943016184 -:105C6000704700000010004070B51A4CE0691A4BF4 -:105C70008006C00F0BD0A18C5868401C5860184A91 -:105C8000164D106829549F2801DA401C1060E06905 -:105C90000007C00F09D008202062A0680121090375 -:105CA0000843A060D869401CD8612068C006C00FB6 -:105CB00007D0E069C006C00F03D01020206200F0BA -:105CC00023F9E0694006C00F03D04020206200F0B5 -:105CD0005BF970BD0038014068030020900400208B -:105CE000E400002010B5124CE069E0690007C00F25 -:105CF00009D008202062A068A1140843A0600D48C4 -:105D0000C169491CC1612068C006C00F07D0E069A5 -:105D1000C006C00F03D01020206200F085F9E069B2 -:105D20004006C00F03D04020206200F0CDF910BD26 -:105D300000440040FC030020F8B5614CE069800697 -:105D4000C00F09D0A08C5F4AC1B21068FF2803D2EF -:105D50005D4B1954401C1060E06900250006C00F1F -:105D60008026002810D05949594A0868136898427B -:105D700005D30D6015602068B043206004E0554AEB -:105D8000125C401C08602285E0690007C00F06D045 -:105D900008202062A068012109030843A060206850 -:105DA000C006C00F07D0E069C006C00F03D01020A6 -:105DB000206200F091F9E06940274006C00F0028FA -:105DC00002D0276200F094F9434CE0698006C00FCE -:105DD00009D0A08C414AC1B21068FF2803D2404BC1 -:105DE0001954401C1060E0690006C00F10D03D49F6 -:105DF0003D4B08681A68904205D30D601D6020680D -:105E0000B043206004E0394A125C401C08602285DF -:105E1000E0690007C00F01D0082020622068C0069A -:105E2000C00F07D0E069C006C00F03D01020206269 -:105E300000F076F9E0694006C00F02D0276200F05A -:105E40007BF92B4CE0698006C00F09D0A08C294A51 -:105E5000C1B210683F2803D2274B1954401C106070 -:105E6000E0690006C00F10D02449254B08681A6865 -:105E7000904205D30D601D602068B043206004E0AF -:105E8000204A125C401C08602285E0690007C00FB0 -:105E900001D0082020622068C006C00F07D0E0694A -:105EA000C006C00F03D01020206200F05DF9E06949 -:105EB0004006C00F02D0276200F062F9F8BD000072 -:105EC0000048004070010020501B00209C01002071 -:105ED00074010020901A002000500040780100203A -:105EE000501C0020A00100207C010020D01A0020BE -:105EF0000014014080010020501D0020A40100205A -:105F000084010020101B00200548416A491C4162A1 -:105F100004490968002901DD0121C16770470000BB -:105F200068030020E4000020F8B5144D0C46064636 -:105F300002212846FDF7F8FA10200090104B324657 -:105F400002212846FDF7DAFA224602212846FDF70B -:105F50001DFB02212846FDF7F3FA0A4804630121DC -:105F6000417202212846FDF7F7FA05482838816872 -:105F70008022114381602046F8BD000000000240ED -:105F800028380140680300200248016A491C016268 -:105F9000704700006803002010B50A48407A0028C6 -:105FA0000DD1084C206F5834002808D12046FBF74B -:105FB000EBFB0146E26820688018FFF7B5FF002080 -:105FC00010BD000068030020F8B5144D0C460646CD -:105FD00005212846FDF7A8FA002000903346104A14 -:105FE00005212846FDF78AFA224605212846FDF7B5 -:105FF000CDFA05212846FDF7A3FA0A48446301219A -:10600000817205212846FDF7A7FA054824388168E2 -:106010004022114381600020F8BD000000000240D2 -:1060200024440040FC0300200A480B4900794058F2 -:10603000802180B2081A0949012208600849CA670C -:106040004A6A521C4A62002803DD01200549000704 -:10605000486070473071000804000240E8000020EA -:10606000FC03002000ED00E0F8B5144D0C46064698 -:1060700004212846FDF758FA10200090104B3246B4 -:1060800004212846FDF73AFA224604212846FDF766 -:106090007DFA04212846FDF753FA0A4804630121DA -:1060A000417204212846FDF757FA054828388168CF -:1060B0008022114381602046F8BD000000000240AC -:1060C00028440040FC0300200248016A491C016288 -:1060D00070470000FC03002003484068002802D0FD -:1060E00002490120C86770476C010020D4180020C5 -:1060F0007047000010B50C460A4601460548FBF7FC -:1061000056F8054884600548016880221143016003 -:1061100010BD0000901A00206C01002000480040D3 -:106120000348C068002802D002490120C8677047B0 -:106130006C010020681900207047000010B50C4663 -:106140000A4601460548FBF732F805480461054850 -:10615000016880221143016010BD0000D01A0020A8 -:106160006C0100200050004003484069002802D024 -:1061700002490120C86770476C010020FC1900200B -:106180007047000010B50C460A4601460548FBF76B -:106190000EF80548846105480168802211430160BA -:1061A00010BD0000101B00206C01002000140140F5 -:1061B00010B5054C0A46638821465B1C4380FBF7FB -:1061C0003DFA002010BD0000007C00080B4610B511 -:1061D000054944054118002C184602D000F066F825 -:1061E00010BDFBF72BFA10BD001002080B46034947 -:1061F00010B541181846FBF721FA10BD000002083F -:1062000070B50C460B494118002B08D00A4D4519B2 -:10621000012B03D0094B9B8A002B00D12946400556 -:10622000204603D000F042F8002070BDFBF706FACC -:10623000FAE700000080000800A00008B418002061 -:10624000F8B54188174A491C4180154901807E21D3 -:1062500000250A52ED43802300221146124C0026ED -:1062600059430C19314603E0675CFF2F04D1491CE8 -:106270009942F9DB002E03D0521C082AEDDB00E026 -:106280001546082D06D208495D436918802200F0A2 -:106290000DF803E080220449FBF7D0F90020F8BD97 -:1062A000AA550000A55A000000C00008F8B516461F -:1062B0000F460546FDF72AFA0024761C76080EE004 -:1062C000600042195278295C120289188AB2C119F9 -:1062D00000230220FDF7BEF9002802D0641CA6426C -:1062E000EED8054A1169802319431161002801D0B5 -:1062F0000020F8BD0120F8BD00200240FEE70000AC -:106300000FB410B504A9074B02AA039800F028F8AF -:10631000044602A9002000F05DFA204610BC08BC2B -:1063200004B01847D567000830B47446641E257859 -:10633000641CAB4200D21D46635D5B00E31830BCB9 -:10634000184702E008C8121F08C1002AFAD1704796 -:106350007047002001E001C1121F002AFBD17047E5 -:10636000FFB591B00F460546002606E025280AD065 -:10637000149A139990476D1C761C28780028F5D143 -:10638000304615B0F0BD002400940121F34A029478 -:1063900000E004436D1C2B780846203B98401042D7 -:1063A000F7D128782A280ED0022128780246303AE0 -:1063B000092A15D8009A0A235A43303A80180C4308 -:1063C0006D1C0090F1E701CF0090002805DA012054 -:1063D00040030443009840420090022004436D1C97 -:1063E00028782E2815D10420044368786D1C2A28AB -:1063F0000AD101CF6D1C02900BE002990A22514391 -:10640000303940186D1C029028780146303909292E -:10641000F3D928786C2810D006DC4C281AD06828CC -:106420000ED06A2817D104E0742813D07A2812D12C -:1064300010E00120400504430CE00121090501E0C2 -:10644000032109050C436978814203D1012000052D -:1064500024186D1C6D1C287803906E281ED00CDC4F -:10646000632831D004DC00288AD0582811D1B2E04A -:1064700064287BD069280CD178E073282DD004DC07 -:106480006F2870D0702804D1A7E075286CD07828C8 -:106490006BD0149A13999047761C62E06002400F0B -:1064A000022807D003280AD0042838680AD00660DA -:1064B0003F1D56E03868F11706604160F8E738681C -:1064C0000680F5E70670F3E738786946087400201F -:1064D000487404A80390012003E03868039000206A -:1064E000C0433F1D61070FD5002101E00199491C00 -:1064F000029A0191914213DA8142F7DB019A0399E2 -:10650000895C0029F2D10BE0002101E00199491CCE -:1065100001918142FADB019A0399895C0029F5D146 -:1065200001990098139A401A00902146149B00F09C -:106530003BF901998019461807E003980399007800 -:10654000491C0391149A139990470198401E019099 -:10655000401CF2D12146149B139A009800F014F9C4 -:1065600086196D1C09E741E033E034E00A20002180 -:10657000049005916002410F022905D001CFC21796 -:106580009446032905D007E0FF1DFF08FF0003CF55 -:1065900006E000B2C2179446042902D140B2C117E6 -:1065A0008C4600226146944506DA0A4600214042A4 -:1065B00091418C462D2102E0210504D52B216A460C -:1065C0001176012103E0E10701D02021F7E70191D5 -:1065D00054E00A200BE0102009E010200490002174 -:1065E0000420044308200591029003E008200021C4 -:1065F000059104906002410F022905D001CF0022CD -:106600009446032906D006E0FF1DFF08FF0003CFD4 -:106610008C4603E080B2042900D1C0B20021019170 -:1066200021072BD50399702906D0049A1021059BC8 -:106630004A401A4305D00EE040216A4611760121F6 -:1066400008E06146014306D030216A46117603997D -:10665000517602210191049A0821059B4A401A4370 -:106660000CD16146014301D1610707D530216A464B -:106670001176012101910299491E0291039958292D -:1066800004D037A103910FA90F910DE039A1F9E7CB -:106690006146059B049AFAF7B8FD039B8C469B5C08 -:1066A0000F9A521E0F92137061460143F0D10F985A -:1066B00007A9081A20300390600704D501200004C0 -:1066C0008443029801E0012002900399884201DD91 -:1066D000401A00E000204118029001980918009823 -:1066E000401A0090E00306D42146149B139A0098A8 -:1066F00000F05AF886190020049008E006A9085C0A -:10670000149A139990470498401C761C04900199A0 -:106710008842F3DBE0030CD52146149B139A0098C2 -:1067200000F042F8861904E0149A3020139990473B -:10673000761C0299481E02900029F5DC08E00F98AB -:106740000F990078491C0F91149A13999047761C61 -:106750000399481E03900029F1DCFBE6092801009B -:1067600030313233343536373839616263646566C7 -:106770000000000030313233343536373839414289 -:106780004344454600000000F8B5044600251E4677 -:106790001746880404D405E039462020B0476D1C14 -:1067A000641EF9D52846F8BDFFB50446002581B022 -:1067B0001E46C80301D5302700E02027880404D5F1 -:1067C00005E038460399B0476D1C641EF9D528468C -:1067D00005B0F0BD0A68531C0B60107070470000D4 -:1067E00010B50A2101A0FEF70BFD10BD1B5B324A5C -:1067F0001B5B303B304800002D2110B5C90140180B -:1068000000F0DEFB10BD000030B503460B48002948 -:1068100000D101210A4C491E0ED31A7850400022A3 -:10682000C50702D04008604000E04008521CD2B2C8 -:10683000082AF5D35B1CEEE730BD0000FFFF000027 -:1068400001A0000070B50A4DFF23EE1D1A46F9366F -:1068500005E0047854402A5D5A40335D401C0C46E4 -:10686000491E89B2002CF4D11802104370BD0000FB -:106870003673000870B504460C4800220C4E11E037 -:106880002378521C1D4645402D07ED0E755B00090F -:106890004540180968400007C00E305A2B0958407F -:1068A00092B2641C8A42EBD370BD0000FFFF00006F -:1068B0006870000810B5084A084B07E00478544097 -:1068C0002406E40D1C5B120A6240401C491EF5D2EE -:1068D000D04380B210BD0000FFFF000036710008F9 -:1068E00006C00021016041608160C1600122026137 -:1068F000416108467047000088B0002080F310888E -:10690000FE4F0125FF203D830530FD4BA022009066 -:10691000991AFC48FBF70EFC4020FB4B0246191A63 -:106920000090FA48FBF706FCFBF70CF8F84C002641 -:10693000F8482667C06A6066F7480068A066F748AE -:10694000406AE066FFF706F9F649F5480860FBF78C -:1069500001FCFDF7E3F803200390049601A90596D6 -:106960000295F148FCF7E8FEFDF7C4F8FCF73CFDA2 -:10697000EE48FEF739FD3D83FEF732FDA063EC499A -:1069800060630D70EB4902070D70EB49120F0A703E -:10699000EA49EB4F1F2804D0C00605D50D703E70A4 -:1069A00004E0E8480570F9E70E703D70E6480278AB -:1069B000E24801780220FBF70DFDE4490220FBF7D5 -:1069C00081FFDD48E04900780870E1490120087046 -:1069D000E120E04940020860FDF738F9FDF7C8F909 -:1069E000FDF786FADC48006820210843DA49086090 -:1069F0000868102528430860FDF7C4FAD7480068E6 -:106A000020210843D5490860086828430860FDF73D -:106A100003FBD34801682022114301600168294328 -:106A20000160FDF715F8FDF7CDF8FDF7E5F8CD4865 -:106A30000168012211430160CB4801682022114303 -:106A4000016001682943016001684022114301602F -:106A50008021C648FFF7B8FAC5480168294301609C -:106A600001684022114301600A20FAF74FFF01201C -:106A7000FEF7BEFE0020FEF7A5FE0020FEF7BCFBE1 -:106A80000120FAF7D1FD0020FEF7A8FEFEF720FF57 -:106A9000FAF726FF6066994D002028826882A34895 -:106AA000C0882882288A01280AD1FBF7FDFA208FA6 -:106AB000202108406882688A002801D0FEF7CAFFBA -:106AC000AC4E5A2070840020C043FDF7C5FE1B2148 -:106AD000A948890145180F21C90140180090A74F06 -:106AE0000020387001207870FAF7FAFE3861FAF762 -:106AF0001BFF0790FEF774FC07468048008AC0071A -:106B00000BD0B806208F04D5800606D4FEF7A2FF6E -:106B100003E0800601D5FEF7D5FFA7630798E06381 -:106B20000920C0060069009988847F480069C884EC -:106B3000934800690885934800694885FAF75EFE26 -:106B40003075FAF7CDFE8D4F78618F4800680028C8 -:106B500001D00020B082206CC006C00E02281CD1DB -:106B6000FAF7C4FB8848016800290ED00021B182E1 -:106B700086490A68002A10D10068086084480068C5 -:106B800084490860FDF7D0FE07E080490A68002AC2 -:106B900003D000680860FDF7DFFE5848008A01282E -:106BA0000BD15648818A002927D07B49B960C18A18 -:106BB0007A480160B868FDF7D7FE606E7969616652 -:106BC000081AA066E16E884200D2E066216F884212 -:106BD00000D92067FAF784FEB86158480078002889 -:106BE00006D059480078002802D00220FBF778FC34 -:106BF0000798800403D5012002E06949D6E7002008 -:106C000038700798000501D5012000E00020787059 -:106C10004B48007800281AD00220FBF7A3FE606CD6 -:106C2000002801D15F4908845E485F49008C888252 -:106C30005E490868800401D5012000E0002038701A -:106C40000868000501D5012000E000207870554853 -:106C5000B18A0180018CB186F18A4180318B8180BB -:106C6000718BC180606C002801D0401E6064A06CF4 -:106C7000002801D0401EA0642048018B00293BD091 -:106C80007878FEF7B5FD7878FEF79CFD7878FEF70A -:106C90008DFD7878002801D1012000E00020FEF76A -:106CA0009DFDFAF71DFEF861FAF71AFE3862FAF751 -:106CB00017FE0A2178620846FAF708FA0020401CFD -:106CC0004028FCDB206C401C20640E48C06F00286C -:106CD00013D037480268002A0FDD3648007825288F -:106CE0006AD092B233490120FDF7FEF90549002030 -:106CF000C8672F49086098E05FE083E0B41800207F -:106D0000301E002068030020741F0020FC030020B8 -:106D10008016002080F7FF1FD800002000100240DE -:106D200010270000A8010020000400488010002067 -:106D3000D4010020D5010020F0000020EC0000204C -:106D4000ED00002020010020F7000020992200081B -:106D5000F1000020DC00002000480040005000400E -:106D600000140140001000400038014010050020D0 -:106D7000004400404013002000110020AC0100201E -:106D800000080048000C0048600100206401002059 -:106D9000880100206801002000A0000838010020C0 -:106DA00000800008280C002000150020240100208D -:106DB000E4000020900400201FE0008A01280FD08A -:106DC000606C002810D07878FEF712FDA06C0028C7 -:106DD0000CD07878FEF7F6FC7878FEF7E7FC5DE7F4 -:106DE000554800680028EFD03878EDE70020FEF71E -:106DF000E9FC0020FEF7DAFC4EE750490120FBF7E2 -:106E00001BFF73E74E49786888420DD94D484168A9 -:106E100001221205114341604168520003235B05C2 -:106E200099431143416001E0401C78604648007876 -:106E3000002802D00020FAF769FD444FF86F0028BF -:106E400008D0434801784348FEF794FB40490020AE -:106E50000860F86740484149407D0870FEF74AFBEA -:106E60003F48007870753F48C06F00280CD0A88854 -:106E70003D4F401CA8803D4900203A68FDF714FBB7 -:106E8000002038493860C86739480088E8803948A8 -:106E90000088288138480088688138480088A8819F -:106EA00037480088E8813748C06F00280CD0A88A8E -:106EB000354F401CA882354901203A68FDF7F4FAA5 -:106EC000002030493860C86731483A4B0088E88272 -:106ED0003048008828833048008868832F4800881D -:106EE000A88486462E480088E88484462D48018878 -:106EF0002D482985008868852C480088A8852C485D -:106F00000288AA868288EA8602892A8782896A8715 -:106F1000028AAA87828AEA87028B1A80808B58802D -:106F20007046F082604630837183B08EFEF764F95C -:106F3000224921480860D2E5780E00209004002004 -:106F4000C027090000380140ED000020FC19002096 -:106F500080010020501D002060130020D601002079 -:106F6000D7010020D418002070010020501B002001 -:106F7000040200200C020020140200203402002031 -:106F80003C0200206819002078010020501C0020DD -:106F90000802002010020020180200203802002001 -:106FA00024020020280200202C02002030020020B1 -:106FB000B41F002000180020AAAA000000300040E2 -:106FC0002D2110B54902002800DA4018FAF7A4F87C -:106FD000C817800E4018821180098001081A1C4BC6 -:106FE00040245A2A04DA91005A58C918496808E01E -:106FF000B42A0FDAB421891A89005A58C91880397D -:10700000C96F231A534348431818C117890E08182B -:10701000801110BDFF210F318A4206DA0D4992001E -:1070200051185A58C918496807E0FF216931891A6F -:1070300089005A58C9188039C96F231A53434843E5 -:107040001818C117890E08188011404210BD0000A1 -:107050004075000830FDFFFF1122334455667788E4 -:1070600099AABBCCDDEEFF00000001CC01D80014D2 -:1070700001F0003C002801E401A0006C007801B49C -:107080000050019C01880044011109010201040122 -:1070900004010000000000000000000000000600E5 -:1070A000AA550000000100000000000001000100DE -:1070B00000090000000000000000020000000009BC -:1070C00000000000000000000000000000000000C0 -:1070D0000000000000000000101010101010101030 -:1070E0001010101010101010100020003000400080 -:1070F00050006000030000000400000005000000D4 -:107100000600000007000000080000000900000061 -:107110000A0000000B0000000C0000001100A55A3E -:10712000AA55000000000000000000000000000060 -:10713000081C304458000000891112239B32244659 -:10714000AD573665BF74488CC19D5AAFD3BE6CCA6B -:10715000E5DB7EE9F7F88110080193331A22A55682 -:107160002C47B7753E64C99C408DDBBF52AEEDDA4B -:1071700064CBFFF976E802218B3010029913266761 -:10718000AF763444BD554AADC3BC588ED19F6EEB2B -:10719000E7FA7CC8F5D983310A2091121803A77742 -:1071A0002E66B5543C45CBBD42ACD99E508FEFFB0B -:1071B00066EAFDD874C904428D5316619F7020049D -:1071C000A9153227BB364CCEC5DF5EEDD7FC6888EB -:1071D000E1997AABF3BA85520C4397711E60A11402 -:1071E0002805B3373A26CDDE44CFDFFD56ECE998CB -:1071F0006089FBBB72AA06638F7214409D512225E1 -:10720000AB343006B9174EEFC7FE5CCCD5DD6AA9AA -:10721000E3B8788AF19B87730E6295501C41A335C1 -:107220002A24B1163807CFFF46EEDDDC54CDEBB98A -:1072300062A8F99A708B088481951AA793B62CC21C -:10724000A5D33EE1B7F04008C919522BDB3A644E92 -:10725000ED5F766DFF7C899400859BB712A6ADD259 -:1072600024C3BFF136E0C1184809D33B5A2AE55E72 -:107270006C4FF77D7E6C0AA583B4188691972EE338 -:10728000A7F23CC0B5D14229CB38500AD91B666F52 -:10729000EF7E744CFD5D8BB502A499961087AFF319 -:1072A00026E2BDD034C1C3394A28D11A580BE77F32 -:1072B0006E6EF55C7C4D0CC685D71EE597F4288074 -:1072C000A1913AA3B3B2444ACD5B5669DF78600C12 -:1072D000E91D722FFB3E8DD604C79FF516E4A990D9 -:1072E0002081BBB332A2C55A4C4BD7795E68E11CF2 -:1072F000680DF33F7A2E0EE787F61CC495D52AA1B8 -:10730000A3B03882B193466BCF7A5448DD59622DD1 -:10731000EB3C700EF91F8FF706E69DD414C5ABB198 -:1073200022A0B9923083C77B4E6AD5585C49E33DB1 -:107330006A2CF11E780F00C1814001C0804101C05C -:10734000804100C1814001C0804100C1814000C135 -:10735000814001C0804101C0804100C1814000C125 -:10736000814001C0804100C1814001C0804101C015 -:10737000804100C1814001C0804100C1814000C105 -:10738000814001C0804100C1814001C0804101C0F5 -:10739000804100C1814000C1814001C0804101C0E5 -:1073A000804100C1814001C0804100C1814000C1D5 -:1073B000814001C0804101C0804100C1814000C1C5 -:1073C000814001C0804100C1814001C0804101C0B5 -:1073D000804100C1814000C1814001C0804101C0A5 -:1073E000804100C1814001C0804100C1814000C195 -:1073F000814001C0804100C1814001C0804101C085 -:10740000804100C1814001C0804100C1814000C174 -:10741000814001C0804101C0804100C1814000C164 -:10742000814001C0804100C1814001C0804101C054 -:10743000804100C1814000C0C101C30302C2C60631 -:1074400007C705C5C404CC0C0DCD0FCFCE0E0ACA9C -:10745000CB0BC90908C8D81819D91BDBDA1A1EDEEC -:10746000DF1FDD1D1CDC14D4D515D71716D6D2129C -:1074700013D311D1D010F03031F133F3F23236F6AC -:10748000F737F53534F43CFCFD3DFF3F3EFEFA3A5C -:107490003BFB39F9F83828E8E929EB2B2AEAEE2EEC -:1074A0002FEF2DEDEC2CE42425E527E7E62622E25C -:1074B000E323E12120E0A06061A163A3A26266A6AC -:1074C000A767A56564A46CACAD6DAF6F6EAEAA6A1C -:1074D0006BAB69A9A86878B8B979BB7B7ABABE7E6C -:1074E0007FBF7DBDBC7CB47475B577B7B67672B21C -:1074F000B373B17170B050909151935352929656AC -:107500005797559594549C5C5D9D5F9F9E5E5A9ADB -:107510009B5B99595898884849894B8B8A4A4E8E6B -:107520008F4F8D4D4C8C44848545874746868242DB -:10753000438341818040081C304458081C30445823 -:1075400000000000110000002300000034000000D3 -:107550004600000057000000690000007A000000AB -:107560008B0000009C000000AE000000BF00000087 -:10757000D0000000E1000000F20000000301000064 -:107580001401000024010000350100004601000044 -:10759000560100006601000077010000870100002D -:1075A00097010000A7010000B6010000C60100001D -:1075B000D5010000E5010000F40100000302000015 -:1075C00012020000210200002F0200003E02000013 -:1075D0004C0200005A020000680200007502000020 -:1075E00083020000900200009D020000AA02000039 -:1075F000B7020000C3020000CF020000DB0200005F -:10760000E7020000F3020000FE0200000903000090 -:10761000140300001F0300002903000033030000CF -:107620003D03000047030000500300005903000021 -:10763000620300006B030000730300007B03000083 -:10764000830300008A0300009203000099030000F6 -:107650009F030000A6030000AC030000B20300007B -:10766000B7030000BC030000C1030000C603000014 -:10767000CA030000CE030000D2030000D6030000BE -:10768000D9030000DC030000DE030000E10300007A -:10769000E3030000E4030000E6030000E70300004A -:1076A000E7030000E8030000E8030000E80300002F -:1076B000E7030000E7030000E6030000E403000026 -:1076C000E3030000E1030000DE030000DC03000030 -:1076D000D9030000D6030000D2030000CE0300004F -:1076E000CA030000C6030000C1030000BC03000081 -:1076F000B7030000B2030000AC030000A6030000C3 -:107700009F03000099030000920300008A03000019 -:10771000830300007B030000730300006B03000081 -:1077200062030000590300005003000047030000FB -:107730003D03000033030000290300001F03000085 -:107740001403000009030000FE020000F302000021 -:10775000E7020000DB020000CF020000C3020000CD -:10776000B7020000AA0200009D0200009002000083 -:107770008302000075020000680200005A02000047 -:107780004C0200003E0200002F0200002102000017 -:107790001202000003020000F4010000E5010000F5 -:1077A000D5010000C6010000B6010000A7010000DD -:1077B00097010000870100007701000066010000CA -:1077C00056010000460100003501000024010000C0 -:1077D0001401000003010000F2000000E1000000BD -:1077E000D0000000BF000000AE0000009C000000C0 -:1077F0008B0000007A0000006900000057000000C4 -:1078000046000000340000002300000011000000CA -:1078100000000000EFFFFFFFDDFFFFFFCCFFFFFFD9 -:10782000BAFFFFFFA9FFFFFF97FFFFFF86FFFFFFE4 -:1078300075FFFFFF64FFFFFF52FFFFFF41FFFFFFE8 -:1078400030FFFFFF1FFFFFFF0EFFFFFFFDFEFFFFEB -:10785000ECFEFFFFDCFEFFFFCBFEFFFFBAFEFFFFEB -:10786000AAFEFFFF9AFEFFFF89FEFFFF79FEFFFFE2 -:1078700069FEFFFF59FEFFFF4AFEFFFF3AFEFFFFD2 -:107880002BFEFFFF1BFEFFFF0CFEFFFFFDFDFFFFBA -:10789000EEFDFFFFDFFDFFFFD1FDFFFFC2FDFFFF9C -:1078A000B4FDFFFFA6FDFFFF98FDFFFF8BFDFFFF6F -:1078B0007DFDFFFF70FDFFFF63FDFFFF56FDFFFF36 -:1078C00049FDFFFF3DFDFFFF31FDFFFF25FDFFFFF0 -:1078D00019FDFFFF0DFDFFFF02FDFFFFF7FCFFFF9E -:1078E000ECFCFFFFE1FCFFFFD7FCFFFFCDFCFFFF3F -:1078F000C3FCFFFFB9FCFFFFB0FCFFFFA7FCFFFFCD -:107900009EFCFFFF95FCFFFF8DFCFFFF85FCFFFF4A -:107910007DFCFFFF76FCFFFF6EFCFFFF67FCFFFFB7 -:1079200061FCFFFF5AFCFFFF54FCFFFF4EFCFFFF12 -:1079300049FCFFFF44FCFFFF3FFCFFFF3AFCFFFF59 -:1079400036FCFFFF32FCFFFF2EFCFFFF2AFCFFFF8F -:1079500027FCFFFF24FCFFFF22FCFFFF1FFCFFFFB3 -:107960001DFCFFFF1CFCFFFF1AFCFFFF19FCFFFFC3 -:1079700019FCFFFF18FCFFFF18FCFFFF18FCFFFFBE -:1079800019FCFFFF19FCFFFF1AFCFFFF1CFCFFFFA7 -:107990001DFCFFFF1FFCFFFF22FCFFFF24FCFFFF7D -:1079A00027FCFFFF2AFCFFFF2EFCFFFF32FCFFFF3E -:1079B00036FCFFFF3AFCFFFF3FFCFFFF44FCFFFFEC -:1079C00049FCFFFF4EFCFFFF54FCFFFF5AFCFFFF8A -:1079D00061FCFFFF67FCFFFF6EFCFFFF76FCFFFF13 -:1079E0007DFCFFFF85FCFFFF8DFCFFFF95FCFFFF8B -:1079F0009EFCFFFFA7FCFFFFB0FCFFFFB9FCFFFFF1 -:107A0000C3FCFFFFCDFCFFFFD7FCFFFFE1FCFFFF46 -:107A1000ECFCFFFFF7FCFFFF02FDFFFF0DFDFFFF8A -:107A200019FDFFFF25FDFFFF31FDFFFF3DFDFFFFBE -:107A300049FDFFFF56FDFFFF63FDFFFF70FDFFFFE8 -:107A40007DFDFFFF8BFDFFFF98FDFFFFA6FDFFFF04 -:107A5000B4FDFFFFC2FDFFFFD1FDFFFFDFFDFFFF14 -:107A6000EEFDFFFFFDFDFFFF0CFEFFFF1BFEFFFF16 -:107A70002BFEFFFF3AFEFFFF4AFEFFFF59FEFFFF0E -:107A800069FEFFFF79FEFFFF89FEFFFF9AFEFFFF01 -:107A9000AAFEFFFFBAFEFFFFCBFEFFFFDCFEFFFFEB -:107AA000ECFEFFFFFDFEFFFF0EFFFFFF1FFFFFFFCE -:107AB00030FFFFFF41FFFFFF52FFFFFF64FFFFFFAB -:107AC00075FFFFFF86FFFFFF97FFFFFFA9FFFFFF87 -:107AD000BAFFFFFFCCFFFFFFDDFFFFFFEFFFFFFF60 -:107AE000000000000000000001020304060708096E -:107AF0000000000001020304187B0008C000002001 -:107B000088010000B0120008487B000848020020ED -:107B1000704700005263000801159201C7C20100BE -:107B200040420F52010433010101C2014201429758 -:107B30000569FFFFFFFFC3102704478000080540C9 -:087B4000A560A565631BB700F9 -:04000005080010B926 -:00000001FF diff --git a/CCT6_TestApp1/MDK-ARM/CCT6_TestApp1/F030CCT6_TestApp1.sct b/CCT6_TestApp1/MDK-ARM/CCT6_TestApp1/F030CCT6_TestApp1.sct deleted file mode 100644 index 17f6414..0000000 --- a/CCT6_TestApp1/MDK-ARM/CCT6_TestApp1/F030CCT6_TestApp1.sct +++ /dev/null @@ -1,15 +0,0 @@ -; ************************************************************* -; *** Scatter-Loading Description File generated by uVision *** -; ************************************************************* - -LR_IROM1 0x08001000 0x0003F000 { ; load region size_region - ER_IROM1 0x08001000 0x0003F000 { ; load address = execution address - *.o (RESET, +First) - *(InRoot$$Sections) - .ANY (+RO) - } - RW_IRAM1 0x200000C0 0x00007F40 { ; RW data - .ANY (+RW +ZI) - } -} - diff --git a/CCT6_TestApp1/MDK-ARM/F030CCT6_TestApp1.uvprojx b/CCT6_TestApp1/MDK-ARM/F030CCT6_TestApp1.uvprojx index d7ad4f0..dcf5715 100644 --- a/CCT6_TestApp1/MDK-ARM/F030CCT6_TestApp1.uvprojx +++ b/CCT6_TestApp1/MDK-ARM/F030CCT6_TestApp1.uvprojx @@ -505,11 +505,6 @@ <FilePath>..\Inc\BoardType.h</FilePath> </File> <File> - <FileName>FP0.h</FileName> - <FileType>5</FileType> - <FilePath>..\Inc\FP0.h</FilePath> - </File> - <File> <FileName>main.h</FileName> <FileType>5</FileType> <FilePath>..\Inc\main.h</FilePath> @@ -559,11 +554,6 @@ <Group> <GroupName>Application/User</GroupName> <Files> - <File> - <FileName>FP0.c</FileName> - <FileType>1</FileType> - <FilePath>..\Src\FP0.c</FilePath> - </File> <File> <FileName>functions.c</FileName> <FileType>1</FileType> diff --git a/CCT6_TestApp1/Src/BoardType.c b/CCT6_TestApp1/Src/BoardType.c index e69de29..aa777e9 100644 --- a/CCT6_TestApp1/Src/BoardType.c +++ b/CCT6_TestApp1/Src/BoardType.c @@ -0,0 +1,92 @@ +#include "BoardType.h" +#include "KMachine.h" +#include "KBus.h" + +#define APP_ADDR 0x08001000 //应用程序首地址定义 +#define APPINFOBLOCK_ADDR (APP_ADDR + 0x100) //程序信息块 地址 +#define INFOBLOCK_ADDR (APP_ADDR + 0x1000) //信息块 地址 + + +#define APP_START_ADDR IROM1_START_ADDRESS +extern int Region$$Table$$Limit; + +const stAppInfoBlock AppInfoBlock __attribute__((at(APPINFOBLOCK_ADDR))) = +{ + 0xAA55, // StartSign + 0x0301, // BlockType + sizeof(stAppInfoBlock), //BlockSize + 0, // Pad, + 0x0109, //AppVer + (BOARD_TYPE<<8) + BOARD_VER, //AppDevice; + 0x1000, //AppSize; + 0x0C00, //AppDataSize; + APP_ADDR, //nAppStartAddr + (int)&Region$$Table$$Limit, //nBtldr_NewAppInfoAddr + 0x08009000, //nBtldr_NewAppAddr + 0xCCCC, //crc16; + 0xAA55 //EndSign; + +}; + + + +const stKMInfoBlock KMInfoBlock __attribute__((at(INFOBLOCK_ADDR))) = +{ +// sizeof(stKMInfoBlock), + (BOARD_TYPE<<8) + BOARD_VER, //nDeviceType BOARD_VER, //nDevieVer + 0x0109, //ProgVer + 0x0102, //KLinkVer + KBUS_VER, //KBusVer +// 0x0100, //KNetVer +// 0x0100, //KWLVer + + 4, //nCapacity1 ?K + 1, //nCapacity2 ?k + + DINPUT, //nDInput; + DOUTPUT, //nDOutput + + 0, //nAInput + 0, //nAOutput + 0, //nHInput + 0, //nHOutput + 0, //nExt1; + 0, //nExt2; + 0, //nLogSize; + 0, //nPorts; + 0, //nManSize; + 0, //nAbility; + 6, //nSwitchBits; +}; + +const stDeviceInfo MyDeviceInfo={ + + (BOARD_TYPE<<8) + BOARD_VER, //nDeviceTypeVer // unsigned short ClientType; // 子机类型 + 0x0109, //ProgVer // unsigned short ClientVer; // 子机版本 + + DINPUT, // unsigned char InBitCount; // 输入开关量数量 + DOUTPUT, // unsigned char OutBitCount; // 输出开关量数量 + 0, // unsigned char InDWCount; // 输入数据字数 + 0, // unsigned char OutDWCount; // 输出数据字数 + 0, // unsigned char AIWCount; // 输入模拟量通道(字)数 // 16位为一个字(通道) + 0, // unsigned char AQWCount; // 输出模拟量通道(字)数 // 16位为一个字(通道) +// 0, // unsigned char AIBits; // 每通道位数 // 16位以下 +// 0, // unsigned char AQbits; // 每通道位数 // 16位以下 +}; + +const stExDeviceInfo MyExDeviceInfo ={ + (BOARD_TYPE<<8) + BOARD_VER, //nDeviceTypeVer // unsigned short ClientType; // 子机类型 + 0x0109, //ProgVer // unsigned short ClientVer; // 子机版本 + + DINPUT, // unsigned char InBitCount; // 输入开关量数量 + DOUTPUT, // unsigned char OutBitCount; // 输出开关量数量 + 0, // unsigned char InDWCount; // 输入数据字数 + 0, // unsigned char OutDWCount; // 输出数据字数 + 0, // unsigned char AIWCount; // 输入模拟量通道(字)数 // 16位为一个字(通道) + 0, // unsigned char AQWCount; // 输出模拟量通道(字)数 // 16位为一个字(通道) +// 0, // unsigned char AIBits; // 每通道位数 // 16位以下 +// 0, // unsigned char AQbits; // 每通道位数 // 16位以下 + +}; + + diff --git a/CCT6_TestApp1/Src/SLP.c b/CCT6_TestApp1/Src/SLP.c index c7740ec..85796d1 100644 --- a/CCT6_TestApp1/Src/SLP.c +++ b/CCT6_TestApp1/Src/SLP.c @@ -1,26 +1,8 @@ - #include "SLP.h" -void SLPSendPacket(void * buf, uchar len1); -uchar bSLPMaster; -uchar nStation; -uchar SLPinputB; -uchar SLPoutputB; -uchar nCurStation; -uchar inputBuf[5]; -uchar outputBuf[5]; +//void SLPSendPacket(char * buf, uchar len1); -uchar SendBuf[8]; - -uchar SLPMasterRecved; //主机收到子机回复 -unsigned int SLPSlaveCountOut; - -unsigned int SLPLostPkt=0; // 丢包数量 - -uchar SLPOKSign; -uchar SLPErrSign; - -uchar SLPBCC(uchar * pBuf, uchar len1) +uchar SLPBCC(unsigned char * pBuf, uchar len1) { uchar i; uchar BCC=0; @@ -31,99 +13,112 @@ return BCC; } -void SLPparsePacket(void * pRecvBuf, uchar len1) +void SLPInit(stSLPDef * pSLP, SLPSendPktDef pFunc1) +{ + pSLP->SLPLostPkt = 0; + pSLP->nCount = 0; + pSLP->SLPSendPktFunc = pFunc1; + +} + +void SLPSetCallBack(stSLPDef * pSLP, SLPSendPktDef pFunc1) +{ + pSLP->SLPSendPktFunc = pFunc1; +} + +void SLPparsePacket(stSLPDef * pSLP, unsigned char * pRecvBuf, uchar len1) { stSLPPacket * pPacket = (stSLPPacket *)pRecvBuf; if (len1 != sizeof(stSLPPacket)) return; // if (pPacket->ED != EDsign) return; if (pPacket->BCC != SLPBCC(pRecvBuf,len1-1)) return; - if (bSLPMaster) //master + if (pSLP->bSLPMaster) //master { if (pPacket->ST ==ST_S) { //check - if (pPacket->Dst == nCurStation) { - SLPMasterRecved=1; - SLPLostPkt=0; - inputBuf[nCurStation] = pPacket->Data; + if (pPacket->Dst == pSLP->nCurStation) { + pSLP->SLPMasterRecved=1; + pSLP->SLPLostPkt=0; + pSLP->inputBuf[pSLP->nCurStation] = pPacket->Data; } } // SLPoutputB = (inputBuf[1] &0x0f) | ((inputBuf[2] &0x0f) << 4); - SLPoutputB = inputBuf[1]; + pSLP->SLPoutputB = pSLP->inputBuf[1]; }else { //slave if (pPacket->ST==ST_M) { //check - stSLPPacket * pRplyPkt = (stSLPPacket *)SendBuf; - if (pPacket->Dst == nStation) { - SLPoutputB = pPacket->Data; - SLPSlaveCountOut=0; + stSLPPacket * pRplyPkt = (stSLPPacket *)pSLP->SendBuf; + if (pPacket->Dst == pSLP->nStation) { + pSLP->SLPoutputB = pPacket->Data; + pSLP->SLPSlaveCountOut=0; pRplyPkt->ST = ST_S; - pRplyPkt->Dst = nStation; - pRplyPkt->Data = SLPinputB; - pRplyPkt->BCC = SLPBCC(SendBuf, sizeof(stSLPPacket)-1); + pRplyPkt->Dst = pSLP->nStation; + pRplyPkt->Data = pSLP->SLPinputB; + pRplyPkt->BCC = SLPBCC(pSLP->SendBuf, sizeof(stSLPPacket)-1); // pRplyPkt->ED = EDsign; - SLPSendPacket(SendBuf,sizeof(stSLPPacket)); + pSLP->SLPSendPktFunc(pSLP->SendBuf,sizeof(stSLPPacket)); } } } } -void SLPMasterSendPacket(void) +void SLPMasterSendPacket(stSLPDef * pSLP) { - stSLPPacket * pReqPkt = (stSLPPacket *)SendBuf; - outputBuf[1]=SLPinputB ;//&0xf; + stSLPPacket * pReqPkt = (stSLPPacket *)pSLP->SendBuf; + pSLP->outputBuf[1]=pSLP->SLPinputB ;//&0xf; // outputBuf[2] = (SLPinputB & 0xf0) >> 4; pReqPkt->ST = ST_M; - pReqPkt->Dst = nCurStation; - pReqPkt->Data = outputBuf[nCurStation]; ; - pReqPkt->BCC = SLPBCC(SendBuf, sizeof(stSLPPacket)-1); + pReqPkt->Dst = pSLP->nCurStation; + pReqPkt->Data = pSLP->outputBuf[pSLP->nCurStation]; ; + pReqPkt->BCC = SLPBCC(pSLP->SendBuf, sizeof(stSLPPacket)-1); // pReqPkt->ED = EDsign; - SLPSendPacket(SendBuf,sizeof(stSLPPacket)); + pSLP->SLPSendPktFunc(pSLP->SendBuf,sizeof(stSLPPacket)); } -void SLPProcess(void) + +void SLPProcess(stSLPDef * pSLP) { - static int nCount =0; - if (bSLPMaster) //master + if (pSLP->bSLPMaster) //master { - if ( (nCount & 0x3f) == 0 ) + if ( (pSLP->nCount & 0xf) == 0 ) { //time up - if (SLPMasterRecved) { + if (pSLP->SLPMasterRecved) { // SLPMasterRecved=0; - SLPOKSign = 1; - if (SLPErrSign) SLPErrSign--; + pSLP->SLPOKSign = 1; + if (pSLP->SLPErrSign) pSLP->SLPErrSign--; }else { - SLPLostPkt++; - if (SLPLostPkt > 10) { - SLPErrSign=20; - SLPOKSign = 0; + pSLP->SLPLostPkt++; + if (pSLP->SLPLostPkt > 10) { + pSLP->SLPErrSign=20; + pSLP->SLPOKSign = 0; } } - if (nStation >0) { - nCurStation++; - if (nCurStation > nStation) { - nCurStation =1; + if (pSLP->nStation >0) { + pSLP->nCurStation++; + if (pSLP->nCurStation > pSLP->nStation) { + pSLP->nCurStation =1; } - SLPMasterRecved=0; - SLPMasterSendPacket(); + pSLP->SLPMasterRecved=0; + SLPMasterSendPacket(pSLP); } } }else { - SLPSlaveCountOut ++; - if (SLPSlaveCountOut >200) // 20mS + pSLP->SLPSlaveCountOut ++; + if (pSLP->SLPSlaveCountOut >200) // 20mS { - SLPErrSign=100; + pSLP->SLPErrSign=100; }else { - if (SLPErrSign) SLPErrSign--; + if (pSLP->SLPErrSign) pSLP->SLPErrSign--; } } - nCount++; + pSLP->nCount++; } diff --git a/CCT6_TestApp1/Src/functions.c b/CCT6_TestApp1/Src/functions.c index ac5a438..7a8098a 100644 --- a/CCT6_TestApp1/Src/functions.c +++ b/CCT6_TestApp1/Src/functions.c @@ -319,25 +319,6 @@ SCB->ICSR=SCB_ICSR_PENDSVSET_Msk; //1<<SCB_ICSR_PENDSVSET_Pos; } -void PendSvCallBack() -{ -#if (BOARD_TYPE == 14) -///* - if (bSPI1RecvDone) - { - bSPI1RecvDone=0; - ParseFP0Pkg(SPI1RecvBuf,nSPI1RecvLenInBuf); - } -//*/ -#endif - if (Uart2Stat.bPacketRecved) - { - KBusParsePacket(2, (pKBPacket)Uart2RecvBuf1, Uart2RecvBuf1DataLen); - Uart2RecvBuf1DataLen=0; - Uart2Stat.bPacketRecved=0; - Uart2RecvDMA(Uart2RecvBuf1,sizeof(Uart2RecvBuf1)); - } -} void SPI1_IRQ_CallBack() { diff --git a/CCT6_TestApp1/Src/main.c b/CCT6_TestApp1/Src/main.c index 71593c5..d056abb 100644 --- a/CCT6_TestApp1/Src/main.c +++ b/CCT6_TestApp1/Src/main.c @@ -87,10 +87,20 @@ unsigned char FastFlicker=0; unsigned int Uart1IdelTimer = 0; +#if (ENABLE_PLC) stBinProg1 * pProgs = (stBinProg1 *)STORE_PRG_BASE; +#endif uint32_t us1,us2,us3,us4,us5,us6; +stKBusDef KBus1; // + +extern stDeviceInfo MyDeviceInfo; + +unsigned char bSLPMaster =1; +unsigned char nSLPStation = 1; + +stSLPDef SLP1; /* USER CODE END PV */ /* Private function prototypes -----------------------------------------------*/ @@ -122,7 +132,7 @@ static int Count=0; CurTickuS += 100; nCurTick++; - nSlaveTick++; + KBus1.nSlaveTick++; Count++; if (Count>=10000) { @@ -136,7 +146,27 @@ return; } -void * KBusCallBackFunc(int nChn, int nEvent, void *pBuf, int nLen1) +void PendSvCallBack() +{ +#if (BOARD_TYPE == 14) +///* + if (bSPI1RecvDone) + { + bSPI1RecvDone=0; + FPxParsePkt(SPI1RecvBuf,nSPI1RecvLenInBuf); + } +//*/ +#endif + if (Uart2Stat.bPacketRecved) + { + KBusParsePacket(&KBus1, (pKBPacket)Uart2RecvBuf1, Uart2RecvBuf1DataLen); + Uart2RecvBuf1DataLen=0; + Uart2Stat.bPacketRecved=0; + Uart2RecvDMA(Uart2RecvBuf1,sizeof(Uart2RecvBuf1)); + } +} + +void * KBusEvCallBackFunc(void * pParam, int nEvent, void *pBuf, int nLen1) { switch (nEvent){ @@ -237,25 +267,23 @@ /* Initialize all configured peripherals */ MX_GPIO_Init(); - LL_GPIO_InitTypeDef GPIO_InitStruct; - GPIO_InitStruct.Mode = LL_GPIO_MODE_OUTPUT; - GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_HIGH; - GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_PUSHPULL; - GPIO_InitStruct.Pull = LL_GPIO_PULL_NO; - LL_GPIO_Init(GPIOB, &GPIO_InitStruct); - MX_DMA_Init(); KMachineInit(); ReadSysCfgFromFlash(&storedKMSysCfg); KMRunStat.bLEDFlick = 1; - + int bKBusMaster,bKBusSlave,bKBusRepeater;; + int nKBusStationId; + int nKBusChilds; KMem.CurJumperSW=ReadJumperSW(); KMem.EffJumperSW=KMem.CurJumperSW; + nKBusStationId=KMem.EffJumperSW&0x0f; + + nKBusChilds = nKBusStationId; bSLPMaster = 1; // KMem.EffJumperSW&0x20 ; //master? - nStation = 1; + nSLPStation = 1; // Uart2Baud = AlterUart2Baud; @@ -263,11 +291,16 @@ #if (BOARD_TYPE == 14) KMem.EffJumperSW|=0x10; - nStationID=KMem.EffJumperSW&0x0f; + int nKBusChilds=KMem.EffJumperSW&0x0f; if ((KMem.EffJumperSW&0x10)!=0) {bKBusMaster=1;bKBusSlave=0;} else{bKBusMaster=0;bKBusSlave=1;} - nChilds=nStationID; - FPx_Init(); + + FPxSetCallBackFunc(&FPxCallBackFunc); + FPx_Init(nKBusChilds); + + int IOByteCount = nKBusChilds; + FPx_SetIOCount(IOByteCount,IOByteCount); + #elif (BOARD_TYPE == 15 || BOARD_TYPE == 16) nStationID=1 ;//KMem.EffJumperSW&0x0f; @@ -276,17 +309,21 @@ // else {bKBusMaster=0;bKBusSlave=1;} #else - nStationID=KMem.EffJumperSW&0x0f; - if (KMem.EffJumperSW == 0x1f) {bKBusRepeater=1;bKBusMaster=1;bKBusSlave=0;} - else if ((KMem.EffJumperSW&0x10)!=0) {bKBusMaster=1;bKBusSlave=0;} + nKBusStationId=KMem.EffJumperSW&0x0f; + if (KMem.EffJumperSW == 0x3f) {bKBusRepeater=1;bKBusMaster=1;bKBusSlave=0;} + else if ((KMem.EffJumperSW&0x20)!=0) {bKBusMaster=1;bKBusSlave=0;} else{bKBusMaster=0;bKBusSlave=1;} #endif - KBusInit(2, bKBusMaster, nChilds); - KBusSetCallBackFunc(2, &KBusCallBackFunc), + if (bKBusMaster) { + KBusInitMaster(&KBus1, (KBusSendPktFuncDef)PutStr2, nKBusChilds); - nChilds=nStationID; - nCurPollId=1; + } else if (bKBusSlave) { + KBusInitSlave(&KBus1, (KBusSendPktFuncDef)PutStr2, nKBusStationId,&MyDeviceInfo); + } + + KBusSetEvCallBackFunc(&KBus1, &KBusEvCallBackFunc); + //if (KMem.EffJumperSW == 0x00) Uart1Baud = DefaultUart1Baud; MX_USART1_UART_Init(); @@ -381,14 +418,15 @@ KMRunStat.WorkMode2=0; KMRunStat.WorkMode = storedKMSysCfg.theKMSysCfg.workmode; - +#if (ENABLE_PLC) if (KMRunStat.WorkMode == 1){ InitPLC(); KMRunStat.WorkMode2 = KMem.CurJumperSW&0x20 ; if (KMRunStat.WorkMode2) { StartPLC(); } } - KMem.WX[7]=0x5a; +#endif + #if (BOARD_TYPE == 15 || BOARD_TYPE == 16) KWireLessInit(KMem.EffJumperSW&0x20,KMem.EffJumperSW&0x0f); KWireLessStart(); @@ -409,14 +447,14 @@ int haltick=HAL_GetTick(); int thisJumperSW=ReadJumperSW(); - +#if (ENABLE_PLC) if (KMRunStat.WorkMode&1){ if (thisJumperSW&0x20 && !(KMem.CurJumperSW&0x20)) // Run 寮�鍏� 姝� 璺冲彉銆� {StartPLC();} if (!(thisJumperSW&0x20) && (KMem.CurJumperSW&0x20)) // Run 寮�鍏� 璐� 璺冲彉銆� {StopPLC();} } - +#endif KMem.CurJumperSW=thisJumperSW; KMem.haltick=haltick; // KMem.TotalRunTime=TotalRunTime; @@ -467,7 +505,7 @@ // */ // pProgs = (stBinProg1 *) STORE_PRG_BASE; - +#if (ENABLE_PLC) if ( KMRunStat.WorkMode==1 ) //&& bKBusMaster) { if (KMRunStat.nBinProgBank == 0){ @@ -480,7 +518,8 @@ ProcessPLCBinProg(pProgs, nSizeProg1); } - +#endif + KMem.ScanTimeuS=us2-KMem.LastScanTime; KMem.LastScanTime = us2; if (KMem.ScanTimeuS < KMem.MinScanTimeuS) {KMem.MinScanTimeuS = KMem.ScanTimeuS;} @@ -492,9 +531,7 @@ if (bKBusMaster) { - - if (nChilds>0) { KBusMasterFunc(2); } - + KBusLoopProcess(&KBus1); } if (haltick&0x00002000) SlowFlicker=1; else SlowFlicker=0; @@ -504,13 +541,13 @@ if (bKBusSlave) { - KBusSlaveFunc(2); - if (! KMem.RunStat) {KBusMem.WLY[0]=0;} + KBusLoopProcess(&KBus1); + // if (! KBus1.RunStat) {KBusMem.WLY[0]=0;} KMem.WLY[0]=KBusMem.WLY[0]; - if (nSlaveTick&0x00002000) SlowFlicker=1; + if (KBus1.nSlaveTick&0x00002000) SlowFlicker=1; else SlowFlicker=0; - if (nSlaveTick&0x00000800) FastFlicker=1; + if (KBus1.nSlaveTick&0x00000800) FastFlicker=1; else FastFlicker=0; } @@ -520,9 +557,6 @@ KBusMem.WLX[2]=KMem.WX[2]; KBusMem.WLX[3]=KMem.WX[3]; -// KMem.WY[0]=nCount2>>5; - if (KMem.RunStat) {KMem.RunStat--;} - if (KMem.ErrStat) {KMem.ErrStat--;} if (KMRunStat.bLEDFlick) { @@ -534,14 +568,18 @@ } else { +#if (ENABLE_PLC) if (KMRunStat.WorkMode==1 ) { if (PLCMem.bPLCRunning){SetRunLed(SlowFlicker);} else {SetRunLed(0);} } - else { + else +#endif + { if (!KMem.RunStat) SetRunLed(SlowFlicker); else SetRunLed(FastFlicker); } + KMem.ErrStat = KBus1.ErrStat + SLP1.SLPErrSign; if (!KMem.ErrStat) { SetErrLed(0); @@ -606,14 +644,13 @@ if (bKBusSlave) HAL_Delay(0); if (Uart6Stat.bPacketRecved){ - SLPparsePacket(Uart6RxBuf,Uart6RecvBuf1DataLen); + SLPparsePacket(&SLP1,Uart6RxBuf,Uart6RecvBuf1DataLen); Uart6RecvBuf1DataLen =0; Uart6Stat.bPacketRecved = 0; } - - SLPinputB = KMem.WYB[1]; - SLPProcess(); - KMem.WXB[1] = SLPoutputB; + SLP1.SLPinputB = KMem.WYB[1]; + SLPProcess(&SLP1); + KMem.WXB[1] = SLP1.SLPoutputB; // YDLiDar process; @@ -666,7 +703,7 @@ // KMem.WX[1]++ ; // KMem.WX[2]++; - +// KMem.WYB[0]=1; PutOutput (KMem.WY[0]); LL_IWDG_ReloadCounter(IWDG); diff --git a/ComLib/Inc/GlobalDef.h b/ComLib/Inc/GlobalDef.h index d35b43f..d77f82a 100644 --- a/ComLib/Inc/GlobalDef.h +++ b/ComLib/Inc/GlobalDef.h @@ -17,14 +17,24 @@ extern volatile int PendSvCount; +#pragma anon_unions typedef struct tagUartStat { volatile int SendBytes; volatile int RecvBytes; - volatile char bInited; - volatile char bSending; - volatile char bRecving; - volatile char bUseAltRecvBuf; + volatile int SentPacket; + union{ + volatile unsigned char state; + struct { + volatile unsigned char bInited:1; + volatile unsigned char bSending:1; + volatile unsigned char bRecving:1; + volatile unsigned char bUseAltRecvBuf:1; + + }; + }; + volatile unsigned char bPacketRecved; + volatile unsigned char bSendDone; volatile int IRQCount; volatile int RXNECount; volatile int TXECount; @@ -32,37 +42,37 @@ volatile int OverRunCount; volatile int TcCount; //Transmit Complete volatile int IdelCount; //RecvIdel - volatile int LostBytes; +// volatile int LostBytes; volatile int DMACount; volatile int DMASendLen; volatile int DMARecvLen; stMyQueue QRx; stMyQueue QTx; - volatile int SentPacket; - volatile int bPacketRecved; - volatile int OKPacket; - volatile int TimeOutErr; - volatile int NotPacketErr; - volatile int LengthErr; - volatile int BCCerr; + + +// volatile int OKPacket; +// volatile int TimeOutErr; +// volatile int NotPacketErr; +// volatile int LengthErr; +// volatile int BCCerr; }stUartStat; extern stUartStat Uart1Stat; extern stUartStat Uart2Stat; +#define Uart1RecvBufSize 256 + extern unsigned int Uart1Baud; extern unsigned int Uart2Baud; -extern unsigned char Uart1RecvBuf1[128]; +extern unsigned char Uart1RecvBuf1[Uart1RecvBufSize]; extern int Uart1RecvBuf1DataLen; -//extern unsigned char Uart1RecvBuf2[128]; -//extern int Uart1RecvBuf2DataLen; + extern unsigned char Uart2RecvBuf1[128]; extern int Uart2RecvBuf1DataLen; -//extern unsigned char Uart2RecvBuf2[128]; -//extern int Uart2RecvBuf2DataLen; + extern volatile int Uart1BaudGot; extern volatile int Uart1BaudFirstGot; diff --git a/ComLib/Inc/KBus.h b/ComLib/Inc/KBus.h index b4aabbc..7c6bf07 100644 --- a/ComLib/Inc/KBus.h +++ b/ComLib/Inc/KBus.h @@ -16,39 +16,489 @@ #define MAX_CLIENT 16 //最大支持子机数量 +#define KBUS_WAIT_TIME_OUT1 5 // 0.1mS ticks. +#define KBUS_WAIT_TIME_OUT2 8 // 0.1mS ticks. + +#define KBUS_SLAVE_TIME_OUT 500 // 0.1ms ticks + //#define SYN_PREFIX 1 typedef unsigned char uchar; typedef volatile unsigned char vuchar; typedef unsigned short ushort; +enum enKBusStationType // KBus工作类型 +{ + KBNone = 0, // 0,未定义 + KBusMaster = 1, // 1,主机 + KBusSlave = 2, // 2,子机 + KBusRepeater = 3, // 3,转发器,中继器 +}; + +// diagnosis +enum enKBusStats +{ + KBusStatUnInited, // 未初始化状态 + KBusStatInited, // 已初始化状态 + KBusStatConfig, // 已配置状态 + KBusStatReady, // 就绪状态 + KBusStatRunning, // 运行状态 + KBusStatIdel, // 暂停状态 + KBusStatSafe, // 安全状态 + KBusStatError, // 错误状态 +}; +/* +enum enKBusStage +{ + KBusStageInit, + KBusStageFindChild, + KBusStageConfigChild, + KBusStagePoll, + +}; +*/ +typedef enum +{ + KBusRunStepBroadCastCfg, + KBusRunStepTimeSync, + KBusRunStepTimeSyncWait, + KBusRunStepMultiDataPoll, + KBusRunStepMultiDataPollWait, + KBusRunStepUniDataPoll, + KBusRunStepUniDataPollWait, + KBusRunStepUniDataTranster, + KBusRunStepUniDataTransterWait, + +}enKBusRunStep; + +enum { + KB_SYN = 0x55, + KBStartSign='%', + KBEndSign=0x0D, + KBMaxPacketLength=148, +}; + +enum enCMDs +{ + + cmdNone = 0x00, //Nothing + + cmdQuery = 0x01, //Query basic Info + cmdQueryRply = 0x81, //Query Info Reply + + cmdSetCfg = 0x02, // Set Configuration + cmdSetCfgRply = 0x82, // Set Configuration Response + + cmdToRunMode = 0x03, + cmdToRunModeRply = 0x83, + + cmdBroadCastCfg = 0x04, // + + cmdMuExchgData = 0x05, // + cmdMuExchgDataRply = 0x85, // + + cmdToSafeMode = 0x06, + + cmdHeartBeat = 0x07, // + cmdReHeartBeat = 0x87, // + + + cmdRemoteReq = 0x1B, + cmdRemoteReqReply = cmdRemoteReq|0x80, // + + cmdPing = '1', //Ping + cmdPingReply = '2', //PingReply + cmdRead = '3', //Read + cmdReadReply = '4', //ReadReply + cmdWrite = '5', //Write + cmdWriteReply = '6', //WriteReply + cmdGetVersion = '7', //GetVersion + cmdVerInfo = '8', //VersionReply + + cmdUniExChgData='A', //ExChangeData, = Wirte + Read + cmdExChgDataReply, //ExchangeData Reply + + cmdSyncRead='a', //SyncRead + cmdSyncWrite, //SyncWrite + cmdSequenRead, //Sequence Read + cmdSyncTime, //SyncTime +}; + + +typedef struct tagVerInfo // KBus 版本信息 +{ + unsigned char nMainVer; + unsigned char nSubVer; +}stVerInfo; + +typedef struct tagMasterStat // KBus 主机状态? +{ + unsigned int CycleTime; +} stMasterStat; + +typedef struct tagDeviceInfo // KBus 子机基本信息 +{ + unsigned short DeviceType; // 子机类型 + unsigned short DeviceVer; // 子机版本 + unsigned char InBitCount; // 输入开关量数量 + unsigned char OutBitCount; // 输出开关量数量 + unsigned char ExInBitCount; // 扩展的输入开关量数量 + unsigned char ExOutBitCount; // 扩展的输出开关量数量 + unsigned char DWStartAddr; // 输出数据字数 + unsigned char OutDWCount; // 输出数据字数 + unsigned char AIWCount; // 输入模拟量通道(字)数 // 16位为一个字(通道) + unsigned char AQWCount; // 输出模拟量通道(字)数 // 16位为一个字(通道) +// unsigned char AIBits; // 每通道位数 // 16位以下 +// unsigned char AQbits; // 每通道位数 // 16位以下 + + +}stDeviceInfo; + +typedef struct tagExDeviceInfo // 子机扩展信息 +{ + unsigned short DeviceType; // 子机类型 + unsigned short DeviceVer; // 子机版本 + + unsigned char UID[12]; // 12字节 UUID + unsigned char Name[16]; // 16字节 名称 +// stVerInfo ClientVer; + unsigned char InBitCount; + unsigned char OutBitCount; + unsigned char ExInBitCount; // 扩展的输入开关量数量 + unsigned char ExOutBitCount; // 扩展的输出开关量数量 + unsigned char DWStartAddr; + unsigned char OutDWCount; + unsigned char AIWCount; + unsigned char AQWCount; +// unsigned char AIBits; +// unsigned char AQbits; + + +}stExDeviceInfo; + +enum enKBusConfigStat +{ + KBusUnConfiged = 0, + KBusDefaultConfiged =1, + KBusConfiged = 2, +}; + +typedef struct tagClientCfg // 子机配置 +{ + unsigned char Addr; // 子机地址 + unsigned char Configed; // 是否已配置 + unsigned char bOnline; //当前在线状态 + unsigned char InStartAddrBit; //输入起始位地址 + unsigned char OutStartAddrBit; //输出起始位地址 + unsigned char AIWStartAddrByte; //模拟入起始字地址 + unsigned char AQWStartAddrByte; //模拟出起始字地址 + unsigned char DIWStartAddrByte; //数据入起始字地址 + unsigned char DOWStartAddrByte; //数据出起始字地址 + unsigned char KeepOut; //Keep Output when comm err; +}stClientCfg; + +/* +typedef struct ServerStatus +{ + unsigned char Addr; + unsigned char Status; + unsigned short Input[16]; + unsigned short DT[128]; + unsigned short output[16]; + +}stServerStatus,*pServerStatus; +*/ +typedef struct tagMachineState // 本机状态 +{ + unsigned char Addr; // 地址 + unsigned char state; //状态 + unsigned char InStartAddrBit; //输入起始位地址 + unsigned char OutStartAddrBit; //输出起始位地址 + unsigned char InDWStartAddrByte; //字输入起始字地址 + unsigned char OutDWStartAddrByte; //字输出起始字地址 +}ClientState; + + + +#pragma anon_unions +typedef struct tagChnStat +{ + union{ + unsigned char MStat; + struct{ + unsigned char bOnline:1; + unsigned char bErr1:1; + unsigned char bErr2:1; + unsigned char bReq:1; + }; + }; + unsigned char SStat; + unsigned short SendPackets; + unsigned short RecvPackets; + unsigned short LastSentTimeTick; + unsigned short LostPackets; + unsigned short CtnLstPkts; + unsigned short MaxCtnLstPkts; + unsigned short NotPkgErr; + unsigned short PkgLenErr; + unsigned short BCCErr; + unsigned short TimeOutErr; + unsigned short Delay; + unsigned short MaxDelay; + unsigned short SendTimeInterval; + union + { + unsigned short ClientDatas[10]; + struct { + unsigned short ClientRecvPkts; // + unsigned short ClientSendPkts; // + unsigned short ClientNotPktErr; // + unsigned short ClientMisIdPkts; // +// unsigned int ClientNoEndErr; // + unsigned short ClientPkgLenErr; // + unsigned short ClientBccErr; // + unsigned short ClientTimeOutErr; // + }; + }; +} stChnStat; + + +typedef struct tagSlaveStat +{ + unsigned int nSlaveTick; +} stSlaveStat; + +typedef struct ServerClientListElement +{ + unsigned char Addr; + unsigned char Status; + unsigned char Father; + unsigned char Childs; + +} stServerClientListElement; + +typedef struct ServerClientList +{ + unsigned char Addr; +}stServerClientList,*pServerClientList; + +typedef struct tagMachineConfig +{ + int bKBusMaster; + int nAddr; +}stMachineConfig; + +/* +typedef struct ClientStatus +{ + unsigned char Addr; + unsigned char Status; + unsigned char Father; + unsigned char Childs; + unsigned short Input[16]; + unsigned short DT[128]; + unsigned short output[16]; + +}stChnStatus,*pClientStatus; +*/ + +typedef struct tagStatusDef +{ + unsigned char nSeq:2; //序列号 + unsigned char :2; + unsigned char nErr1:1; + unsigned char nErr2:1; + unsigned char bReq:1; + +}stStatus; + +typedef union tagUnStatusDef +{ + unsigned char nStatus; + stStatus; +}unStatus; + +typedef struct tagKBPacket +{ + unsigned char Sign; //起始标记 + unsigned char DstHost; //目标地址 + unsigned char SrcAddr; //源地址 + unsigned char nCMD; //命令 + union{ + unsigned char nStatus; //状态+序列号 + struct{ + unsigned char nSeq:2; //序列号 + unsigned char :2; + unsigned char nErr1:1; + unsigned char nErr2:1; + unsigned char bReq:1; + }; + }; + unsigned char DataLen; //数据载荷长度 不包括头部5个字节,不包括尾部BCC。 + unsigned char data[1]; //数据载荷,最末尾是BCC,数据长度为0时,实际也有一个数据。 +}stKBPacket,* pKBPacket; + +typedef struct tagKBInfoBlockV1 +{ + unsigned short nDeviceType; + unsigned short nProgVer; + + unsigned char InBitCount; + unsigned char OutBitCount; + + unsigned char AICount; + unsigned char AIBits; + unsigned char AQCount; + unsigned char AQbits; + + unsigned char InDWCount; + unsigned char OutDWCount; + +}stKBInfoBlockV1, *pKBInfoBlockV1; + +enum eResult +{ + S_OK =0, + S_ERR=1, + S_TIMEOUT=2 + +} ; + +/* +typedef struct tagKBPacketV10 +{ + unsigned char Sign; //起始标记 + unsigned char DstHost; //目标地址 + unsigned char SrcAddr; //源地址 + unsigned char nCMD; //命令 + union{ + unsigned char nStatus; //状态+序列号 + struct{ + unsigned char nSeq:2; //序列号 + unsigned char :2; + unsigned char nErr1:1; + unsigned char nErr2:1; + + }; + }; + unsigned char DataLen; //数据载荷长度 不包括头部5个字节,不包括尾部BCC。 + unsigned char data[1]; //数据载荷,最末尾是BCC,数据长度为0时,实际也有一个数据。 +}stKBPacketV10,* pKBPacketV10; + +typedef struct tagKBPacketV20 +{ + unsigned char Sign; //起始标记 + unsigned char DstHost; //目标地址 + unsigned char SrcAddr; //源地址 + unsigned char nCMD; //命令 + union{ + unsigned char nStatus; //状态+序列号 + struct{ + unsigned char nSeq:2; //序列号 + unsigned char :2; + unsigned char nErr1:1; + unsigned char nErr2:1; + + }; + }; + unsigned char DataLen; //数据载荷长度 不包括头部5个字节,不包括尾部BCC。 + unsigned char data[1]; //数据载荷,最末尾是BCC,数据长度为0时,实际也有一个数据。 +}stKBPacketV20,* pKBPacketV20; +*/ + +enum enumCallBackEvent +{ + KBusEvNone = 0, + KBusEvCreate = 1, + KBusEvConnected = 2, + KBusEvDisConnected = 3, + KBusEvClosed = 4, + KBusEvStateChange =5, + KBusEvTimeSync=6, + KBusEvDataUpdate =7, + KBusEvCmdResponse = 8, + +}; + +typedef int (*KBusSendPktFuncDef) (uchar * pBuf, int nLen); // SendPacket CallBack func for KBus + +typedef void *(*KBusEvCBFuncDef) (void * , int nEvent, void *, int); //callback func ,prama s is void *,void *,int; return void *; + +typedef int (*KBusSvCBFuncDef) (void *, int nSvType, int ,void *, int); //Service Req callback func ,param is int ,int, int, void *,int; return int; + +/* +typedef struct tagKBusRunStat +{ + unsigned char bMaster; // 是否主机 + unsigned char nStationID; // 子机地址 + unsigned char nChildren; // 子机数量 + unsigned char nCurPollId; // 当前轮询到的子机 地址。 + unsigned char nSeq; // 包序列号 + + unsigned char bMasterRecved; // 状态, 主机已接收到返回的数据包 + unsigned char bMasterRecvOK; // 状态, 主机接收到的返回的数据包正确 + unsigned char bSlaveRecved; // 状态, 子机接受到数据包。 + unsigned int nSendTimeuS; // 数据包发出时刻。 + +}stKBusRunStat , * pstKBusRunStat; +*/ + #pragma anon_unions typedef struct tagKBusDef // KBus 工作内存 { +///* + union { + uchar nConfig; + struct { + uchar bMaster:1; //KBus, 是否主机 + uchar bSlave:1; //KBus, 是否子机 + uchar bRepeater:1; //KBus, 是否转发器,中继器 + }; + }; +// */ +/* uchar bMaster; //KBus, 是否主机 uchar bSlave; //KBus, 是否子机 uchar bRepeater; //KBus, 是否转发器,中继器 +*/ + uchar nStationId; //KBus 站号 - vuchar MyStat; //KBus, 状态机状态 + vuchar nRunStep; //KBus, 运行步 vuchar nSeq; //KBus, 包序列号 vuchar bMasterSent; // 状态 主机已发送 vuchar bMasterRecved; // 状态 主机已接收 回包 vuchar bMasterRecvOK; // 状态 主机接收回包正确 vuchar bSlaveRecved; // 状态 子机已接收包 + vuchar nChildCount; // 子机数量 uchar nCurPollId; // 当前轮询子机 号 ushort ErrStat; ushort RunStat; + + uchar bReq; //运行系统请求中 + uchar nReqSvrId; //请求号 + uchar nReqChildId; //请求的子机号 + uchar nReqParam; //请求的参数 + ushort nReqReCount; // + + uchar nReqDataHdr[4]; + uchar pReqDatas[140]; + uchar nReqDataOff; + uchar nReqDataLen; - int SendTimeuS; // 发包时刻 - int RecvTimeuS; // 收包时刻 - int DelayuS; // 包循环延迟 - int nMaxDelayuS; // 最大包循环延迟 + + + int SendTimeTick; // 发包时刻 + int RecvTimeTick; // 收包时刻 + int DelayTick; // 包循环延迟 + int nMaxDelayTick; // 最大包循环延迟 + int LastCircleStartTime; //=0; + int CircleTime; //=0; int nSlaveTick; // 子机时间 tick - int ThisuS; +// int ThisuS; //volatile unsigned int nSlaveTick; //=0; int Clk3; //=0; @@ -56,10 +506,9 @@ //volatile int nCount2; //=0; int TimeOutCount; //=0; - int LastCircleStartTime; //=0; - int CircleTime; //=0; + stPortDef KBusPort; KBusSendPktFuncDef KBusSendPacket; // 发送数据包函数指针 KBusEvCBFuncDef KBusEvCBFunc; // 事件回调函数指针 KMSvCBDef KBusSvCBFunc; // 服务请求回调指针 @@ -91,7 +540,7 @@ // uchar bKBusEvCBFuncSet; // 事件回调函数是否已经设置 // uchar bKBusSvCBFuncSet; // 事件回调函数是否已经设置 - uchar PacketBuf1[KBMaxPacketLength]; +// uchar PacketBuf1[KBMaxPacketLength]; uchar PacketBuf2[KBMaxPacketLength]; @@ -127,9 +576,9 @@ ushort DOW[16]; }stKBusMem, *pstKBusMem; -//extern stKBus KBus1; extern stKBusMem KBusMem; +/* typedef struct tagKBusDiag { @@ -163,54 +612,39 @@ }; }stKBusDiag, *pstKBusDiag; - -//extern unsigned char bKBusMaster,bKBusSlave,bKBusRepeater;; -//extern unsigned char PacketBuf1[KBMaxPacketLength]; -//extern unsigned char PacketBuf2[KBMaxPacketLength]; - -//extern unsigned char nStationID; -//extern unsigned char nChilds; -//extern unsigned char nCurPollId; -//extern unsigned char nSeq; - -//extern volatile unsigned char KBusMasterRecved; -//extern volatile unsigned char KBusMasterRecvOK; -//extern volatile unsigned char KBusSlaveRecved; -//extern unsigned int KBusSendTimeuS; -//extern volatile int KBusRecvTimeuS; -//extern int KBusDelayuS; -//extern int KBusMaxDelayuS; +*/ -int KBusInit(stKBusDef * pKbusDef, KBusSendPktFuncDef KBusSendPacket, int bMaster, int nChildCount); +int KBusInit(stKBusDef * pKBus, KBusSendPktFuncDef KBusSendPacket, int bMaster, int nChildCount); -int KBusInitMaster(stKBusDef * pKbusDef, KBusSendPktFuncDef KBusSendPacket, int nChildCount); -int KBusInitSlave(stKBusDef * pKbusDef, KBusSendPktFuncDef KBusSendPacket, int nStationId, stDeviceInfo *pClientInfo); +int KBusInitMaster(stKBusDef * pKBus, KBusSendPktFuncDef KBusSendPacket, int nChildCount); +int KBusInitSlave(stKBusDef * pKBus, KBusSendPktFuncDef KBusSendPacket, int nStationId, stDeviceInfo *pClientInfo); -int KBusLoadSavedConfig(stKBusDef * pKbusDef); -int KBusSetEvCallBackFunc(stKBusDef * pKbusDef, KBusEvCBFuncDef CBFunc); // Set Event CallBack function -int KBusSetSvCallBackFunc(stKBusDef * pKbusDef, KMSvCBDef CBFunc); // Set ServiceReq CallBack Function +int KBusLoadSavedConfig(stKBusDef * pKBus); +int KBusSetEvCallBackFunc(stKBusDef * pKBus, KBusEvCBFuncDef CBFunc); // Set Event CallBack function +int KBusSetSvCallBackFunc(stKBusDef * pKBus, KMSvCBDef CBFunc); // Set ServiceReq CallBack Function +int KBusMakeDefaultClildInfo(stKBusDef * pKBus, int nChild); +int KBusReqService (stKBusDef * pKBus, int ReqId, int nParam1, int nParam2, void **pData, unsigned short * len1); +int KBusStart(stKBusDef * pKBus) ; +int KBusStop(stKBusDef * pKBus) ; +int KBusDataPoll(stKBusDef * pKBus); -int KBusStart(stKBusDef * pKbusDef) ; -int KBusStop(stKBusDef * pKbusDef) ; -int KBusDataPoll(stKBusDef * pKbusDef); - -int KBusLoopProcess(stKBusDef * pKbusDef); -int KBusMasterFunc(stKBusDef * pKbusDef); -int KBusSlaveFunc(stKBusDef * pKbusDef); -int KBusRepeaterFunc(stKBusDef * pKbusDef); +int KBusLoopProcess(stKBusDef * pKBus); +int KBusMasterFunc(stKBusDef * pKBus); +int KBusSlaveFunc(stKBusDef * pKBus); +int KBusRepeaterFunc(stKBusDef * pKBus); /* Make a Packet and return Packet Length */ int KBusMakePacket(pKBPacket p1,uchar Src, uchar Dst, uchar nType, uchar nStatus, uchar DataLen, void *pData ); /* */ -int KBusCheckPacket(stKBusDef * pKbusDef, pKBPacket p1, int len1); +int KBusCheckPacket(stKBusDef * pKBus, pKBPacket p1, int len1); /* */ -int KBusParsePacket(stKBusDef * pKbusDef, pKBPacket p1, int Len1); +int KBusParsePacket(stKBusDef * pKBus, pKBPacket p1, int Len1); - +int KBusPacketSendDone(stKBusDef * pKBus); /* static inline char KBGetClientNum(int nChn) { }; static inline char KBGetClientInfo(int nChn, int nClientId) { }; @@ -223,11 +657,9 @@ static inline char KBChangeState(int nPortNum, int nNewState){ }; */ - - unsigned char KBusBCC(void * pData, int nSize); // - +int KBusSlaveRunRemoteReq(stKBusDef * pKBus, int nReqSvrId, unsigned char * pData , int Len1); /* int InitMachine(stMachineConfig * pConfig); diff --git a/ComLib/Inc/KBusDefine.h b/ComLib/Inc/KBusDefine.h index 6c191dc..d838eab 100644 --- a/ComLib/Inc/KBusDefine.h +++ b/ComLib/Inc/KBusDefine.h @@ -9,393 +9,6 @@ #ifndef __KBUSDEFINE_H__ #define __KBUSDEFINE_H__ -#define KBUS_VER (0x104) - -//#define SYN_PREFIX 1 - -typedef unsigned char uchar; - -enum enKBusStationType // KBus工作类型 -{ - KBNone = 0, // 0,未定义 - KBusMaster = 1, // 1,主机 - KBusSlave = 2, // 2,子机 - KBusRepeater = 3, // 3,转发器,中继器 -}; - -// diagnosis -enum enKBusStats -{ - KBusStatUnInited, // 未初始化状态 - KBusStatInited, // 已初始化状态 - KBusStatConfig, // 已配置状态 - KBusStatReady, // 就绪状态 - KBusStatRunning, // 运行状态 - KBusStatIdel, // 暂停状态 - KBusStatSafe, // 安全状态 - KBusStatError, // 错误状态 -}; -/* -enum enKBusStage -{ - KBusStageInit, - KBusStageFindChild, - KBusStageConfigChild, - KBusStagePoll, - -}; -*/ -enum { - KB_SYN = 0x55, - KBStartSign='%', - KBEndSign=0x0D, - KBMaxPacketLength=128, -}; - -enum enCMDs -{ - - cmdNone = 0x00, //Nothing - - cmdQuery = 0x01, //Query basic Info - cmdQueryRply = 0x81, //Query Info Reply - - cmdSetCfg = 0x02, // Set Configuration - cmdSetCfgRply = 0x82, // Set Configuration Response - - cmdToRunMode = 0x03, - cmdToRunModeRply = 0x83, - - cmdBroadCastCfg = 0x04, // - - cmdMuExchgData = 0x05, // - cmdMuExchgDataRply = 0x85, // - - cmdToSafeMode = 0x06, - - cmdHeartBeat = 0x07, // - cmdReHeartBeat = 0x87, // - - cmdPing = '1', //Ping - cmdPingReply = '2', //PingReply - cmdRead = '3', //Read - cmdReadReply = '4', //ReadReply - cmdWrite = '5', //Write - cmdWriteReply = '6', //WriteReply - cmdGetVersion = '7', //GetVersion - cmdVerInfo = '8', //VersionReply - - cmdUniExChgData='A', //ExChangeData, = Wirte + Read - cmdExChgDataReply, //ExchangeData Reply - - cmdSyncRead='a', //SyncRead - cmdSyncWrite, //SyncWrite - cmdSequenRead, //Sequence Read - cmdSyncTime, //SyncTime -}; - - - -typedef struct tagKBusRunStat -{ - unsigned char bMaster; // 是否主机 - unsigned char nStationID; // 子机地址 - unsigned char nChildren; // 子机数量 - unsigned char nCurPollId; // 当前轮询到的子机 地址。 - unsigned char nSeq; // 包序列号 - - unsigned char bMasterRecved; // 状态, 主机已接收到返回的数据包 - unsigned char bMasterRecvOK; // 状态, 主机接收到的返回的数据包正确 - unsigned char bSlaveRecved; // 状态, 子机接受到数据包。 - unsigned int nSendTimeuS; // 数据包发出时刻。 - -}stKBusRunStat , * pstKBusRunStat; - -typedef struct tagVerInfo // KBus 版本信息 -{ - unsigned char nMainVer; - unsigned char nSubVer; -}stVerInfo; - -typedef struct tagMasterStat // KBus 主机状态? -{ - unsigned int CycleTime; -} stMasterStat; - -typedef struct tagDeviceInfo // KBus 子机基本信息 -{ - unsigned short DeviceType; // 子机类型 - unsigned short DeviceVer; // 子机版本 - unsigned char InBitCount; // 输入开关量数量 - unsigned char OutBitCount; // 输出开关量数量 - unsigned char DWStartAddr; // 输出数据字数 - unsigned char OutDWCount; // 输出数据字数 - unsigned char AIWCount; // 输入模拟量通道(字)数 // 16位为一个字(通道) - unsigned char AQWCount; // 输出模拟量通道(字)数 // 16位为一个字(通道) -// unsigned char AIBits; // 每通道位数 // 16位以下 -// unsigned char AQbits; // 每通道位数 // 16位以下 - - -}stDeviceInfo; - -typedef struct tagExDeviceInfo // 子机扩展信息 -{ - unsigned short DeviceType; // 子机类型 - unsigned short DeviceVer; // 子机版本 - - unsigned char UID[12]; // 12字节 UUID - unsigned char Name[16]; // 16字节 名称 -// stVerInfo ClientVer; - unsigned char InBitCount; - unsigned char OutBitCount; - unsigned char DWStartAddr; - unsigned char OutDWCount; - unsigned char AIWCount; - unsigned char AQWCount; -// unsigned char AIBits; -// unsigned char AQbits; - - -}stExDeviceInfo; - -enum enKBusConfigStat -{ - KBusUnConfiged = 0, - KBusDefaultConfiged =1, - KBusConfiged = 2, -}; - -typedef struct tagClientCfg // 子机配置 -{ - unsigned char Addr; // 子机地址 - unsigned char Configed; // 是否已配置 - unsigned char bOnline; //当前在线状态 - unsigned char InStartAddrBit; //输入起始位地址 - unsigned char OutStartAddrBit; //输出起始位地址 - unsigned char AIWStartAddrByte; //模拟入起始字地址 - unsigned char AQWStartAddrByte; //模拟出起始字地址 - unsigned char DIWStartAddrByte; //数据入起始字地址 - unsigned char DOWStartAddrByte; //数据出起始字地址 - unsigned char KeepOut; //Keep Output when comm err; -}stClientCfg; - -/* -typedef struct ServerStatus -{ - unsigned char Addr; - unsigned char Status; - unsigned short Input[16]; - unsigned short DT[128]; - unsigned short output[16]; - -}stServerStatus,*pServerStatus; -*/ -typedef struct tagMachineState // 本机状态 -{ - unsigned char Addr; // 地址 - unsigned char state; //状态 - unsigned char InStartAddrBit; //输入起始位地址 - unsigned char OutStartAddrBit; //输出起始位地址 - unsigned char InDWStartAddrByte; //字输入起始字地址 - unsigned char OutDWStartAddrByte; //字输出起始字地址 -}ClientState; - - - -#pragma anon_unions -typedef struct tagChnStat -{ - unsigned short Stat; - unsigned short SendPackets; - unsigned short RecvPackets; - unsigned short LastSentTimeuS; - unsigned short LostPackets; - unsigned short CtnLstPkts; - unsigned short MaxCtnLstPkts; - unsigned short NotPkgErr; - unsigned short PkgLenErr; - unsigned short BCCErr; - unsigned short TimeOutErr; - unsigned short Delay; - unsigned short MaxDelay; - unsigned short SendTimeInterval; - union - { - unsigned short ClientDatas[10]; - struct { - unsigned short ClientRecvPkts; // - unsigned short ClientSendPkts; // - unsigned short ClientNotPktErr; // - unsigned short ClientMisIdPkts; // -// unsigned int ClientNoEndErr; // - unsigned short ClientPkgLenErr; // - unsigned short ClientBccErr; // - unsigned short ClientTimeOutErr; // - }; - }; -} stChnStat; - - -typedef struct tagSlaveStat -{ - unsigned int nSlaveTick; -} stSlaveStat; - -typedef struct ServerClientListElement -{ - unsigned char Addr; - unsigned char Status; - unsigned char Father; - unsigned char Childs; - -} stServerClientListElement; - -typedef struct ServerClientList -{ - unsigned char Addr; -}stServerClientList,*pServerClientList; - -typedef struct tagMachineConfig -{ - int bKBusMaster; - int nAddr; -}stMachineConfig; - -/* -typedef struct ClientStatus -{ - unsigned char Addr; - unsigned char Status; - unsigned char Father; - unsigned char Childs; - unsigned short Input[16]; - unsigned short DT[128]; - unsigned short output[16]; - -}stChnStatus,*pClientStatus; -*/ - -typedef struct tagStatusDef -{ - unsigned char nSeq:2; //序列号 - unsigned char :2; - unsigned char nErr1:1; - unsigned char nErr2:1; -}stStatus; - -typedef union tagUnStatusDef -{ - unsigned char nStatus; - stStatus; -}unStatus; - -typedef struct tagKBPacket -{ - unsigned char Sign; //起始标记 - unsigned char DstHost; //目标地址 - unsigned char SrcAddr; //源地址 - unsigned char nCMD; //命令 - union{ - unsigned char nStatus; //状态+序列号 - struct{ - unsigned char nSeq:2; //序列号 - unsigned char :2; - unsigned char nErr1:1; - unsigned char nErr2:1; - - }; - }; - unsigned char DataLen; //数据载荷长度 不包括头部5个字节,不包括尾部BCC。 - unsigned char data[1]; //数据载荷,最末尾是BCC,数据长度为0时,实际也有一个数据。 -}stKBPacket,* pKBPacket; - -typedef struct tagKBInfoBlockV1 -{ - unsigned short nDeviceType; - unsigned short nProgVer; - - unsigned char InBitCount; - unsigned char OutBitCount; - - unsigned char AICount; - unsigned char AIBits; - unsigned char AQCount; - unsigned char AQbits; - - unsigned char InDWCount; - unsigned char OutDWCount; - -}stKBInfoBlockV1, *pKBInfoBlockV1; - -enum eResult -{ - S_OK =0, - S_ERR=1, - S_TIMEOUT=2 - -} ; - -/* -typedef struct tagKBPacketV10 -{ - unsigned char Sign; //起始标记 - unsigned char DstHost; //目标地址 - unsigned char SrcAddr; //源地址 - unsigned char nCMD; //命令 - union{ - unsigned char nStatus; //状态+序列号 - struct{ - unsigned char nSeq:2; //序列号 - unsigned char :2; - unsigned char nErr1:1; - unsigned char nErr2:1; - - }; - }; - unsigned char DataLen; //数据载荷长度 不包括头部5个字节,不包括尾部BCC。 - unsigned char data[1]; //数据载荷,最末尾是BCC,数据长度为0时,实际也有一个数据。 -}stKBPacketV10,* pKBPacketV10; - -typedef struct tagKBPacketV20 -{ - unsigned char Sign; //起始标记 - unsigned char DstHost; //目标地址 - unsigned char SrcAddr; //源地址 - unsigned char nCMD; //命令 - union{ - unsigned char nStatus; //状态+序列号 - struct{ - unsigned char nSeq:2; //序列号 - unsigned char :2; - unsigned char nErr1:1; - unsigned char nErr2:1; - - }; - }; - unsigned char DataLen; //数据载荷长度 不包括头部5个字节,不包括尾部BCC。 - unsigned char data[1]; //数据载荷,最末尾是BCC,数据长度为0时,实际也有一个数据。 -}stKBPacketV20,* pKBPacketV20; -*/ - -enum enumCallBackEvent -{ - KBusEvNone = 0, - KBusEvCreate = 1, - KBusEvConnected = 2, - KBusEvDisConnected = 3, - KBusEvClosed = 4, - KBusEvStateChange =5, - KBusEvTimeSync=6, - KBusEvDataUpdate =7, - KBusEvCmdResponse = 8, - -}; - -typedef int (*KBusSendPktFuncDef) (uchar * pBuf, int nLen); // SendPacket CallBack func for KBus - -typedef void *(*KBusEvCBFuncDef) (void * , int nEvent, void *, int); //callback func ,prama s is void *,void *,int; return void *; - -typedef int (*KBusSvCBFuncDef) (void *, int nSvType, int ,void *, int); //Service Req callback func ,param is int ,int, int, void *,int; return int; #endif /* __KBUSDEFINE_H__ */ diff --git a/ComLib/Inc/KLink.h b/ComLib/Inc/KLink.h index 3810d88..36f63c6 100644 --- a/ComLib/Inc/KLink.h +++ b/ComLib/Inc/KLink.h @@ -31,7 +31,7 @@ enum {KLSignStart='%', //0x25 KLSignReply='U', //0x55 KLSignEnd=0x0D, - KLMaxPacketLength=128, + KLMaxPacketLength=256, }; enum enKLCMDs { @@ -64,7 +64,11 @@ KLCmdStartPLCProgram, KLCmdWritePLCProgram, KLCmdFinishPLCProgram, - + KLCmdReadPLCAnno, + KLCmdStartPLCAnno, + KLCmdWritePLCAnno, + KLCmdFinishPLCAnno, + KLCmdRead1Bit = 0x21, //ReadSingleBit KLCmdWrite1Bit = 0x22, //WriteSingleBit KLCmdReadBits = 0x23, //ReadBits n = 1 - 8 @@ -118,6 +122,11 @@ KLCmdWriteFirmware, KLCmdWriteFirmInfo, + KLCmdGetPortInfo, + KLCmdGetPortChnInfo, + KLCmdGetPortChildInfo, + KLCmdPortRemoteReq, + KLCmdErrRply=0xEE, //ERRORReply }; @@ -129,7 +138,7 @@ KLInfoTypeEventLogCount = 3, }; -extern unsigned char KLPacketBuf1[256]; +//extern unsigned char KLPacketBuf1[256]; extern unsigned char KLPacketBuf2[256]; extern unsigned char KLBufferIn[16]; @@ -141,6 +150,11 @@ extern int KLThisuS; extern int KLRecvTimeuS; +//PendReq 鐘舵�� + //0, 娌℃湁 + //1, 鎵ц涓� + //2, 鎴愬姛瀹屾垚 + //3, 澶辫触 #pragma anon_unions typedef union tagKLStatDef { @@ -149,6 +163,7 @@ UCHAR nSEQ : 4; UCHAR HasExt : 1; UCHAR HasErr : 1; + UCHAR PendReqStat : 2; }; }unKLStat, *pKLStat; /* @@ -224,6 +239,8 @@ }stKLPacket,* pKLPacket; */ +int KLinkInit(int ); + unsigned char KLBCC(const void * pData, int nSize); // diff --git a/ComLib/Inc/KMachine.h b/ComLib/Inc/KMachine.h index f9ec465..4ced75d 100644 --- a/ComLib/Inc/KMachine.h +++ b/ComLib/Inc/KMachine.h @@ -28,10 +28,14 @@ //#define STORE_RUNSTAT_PAGESIZE (0x00000400) //Page Size = 1K #define STORE_RUNSTAT_PAGES 1 //use 1 pages +#define STORE_PLC_ANNO_BASE (FLASH_BASE + 0x0000D000) //56k +#define STORE_PLC_ANNO_PAGES 4 // use 4 pages , 1K /page -#define STORE_LOG_BASE (FLASH_BASE + 0x0000D000) //52k and FLASH_BANK1_END + +#define STORE_LOG_BASE (FLASH_BASE + 0x0000E000) //52k and FLASH_BANK1_END //#define STORE_LOG_PAGESIZE (0x00000400) //Page Size = 1K #define STORE_LOG_PAGES 4 //use 4 pages + typedef unsigned char uchar; typedef unsigned char UCHAR; @@ -54,13 +58,19 @@ // 鐢ㄦ埛/绯荤粺鍙傛暟閰嶇疆鍧� // // - +#pragma anon_unions typedef struct tagInfoBlock // 23 bytes { // USHORT nBlockLenth; USHORT nDeviceTypeVer; //device type x.y // UCHAR nDevierVer; - USHORT ProgVer; //prog version x.y + union { + USHORT nProgVer; //prog version x.y + struct { + UCHAR nProgVerMinor; + UCHAR nProgVerMajor; + }; + }; USHORT KLinkVer; //x.y USHORT KBusVer; //x.y // USHORT KNetVer; //x.y @@ -229,30 +239,46 @@ BYTE Hold2:4; }stOutputHoldParam; -#pragma anon_unions +typedef struct tagOutMapping +{ + USHORT bitPos:4; + USHORT byteAddr:8; + USHORT type:4; +}stOutMapping; + +typedef struct tagCfgBlockInfo +{ + UCHAR nBlockType; + UCHAR nBlockSize; +}stCfgBlockInfo; + typedef struct tagKMSysCfg //120 Bytes total { USHORT Version; // SC0 // 2 Bytes USHORT workmode; // SC1 // 2 Bytes 0=From jumper USHORT SwitchFunc; // SC2 // 2 Bytes - USHORT pad1; // 2 Bytes + USHORT nCfgBlockCount; // 2 Bytes stComPortParam PortParams[2]; // 8 Bytes stInputFilterParam InputParams[16]; //16 Bytes stOutputHoldParam OutputParams[16]; //16 Bytes - USHORT OutMappings[6]; //12 Bytes //杈撳嚭鏄犲皠 + union{ + USHORT value; //12 Bytes //杈撳嚭鏄犲皠 + stOutMapping; + }OutMappings[8]; + + USHORT nProgBank; + USHORT nProgSize; + USHORT nAnnoSize; + USHORT nCount; - UINT cfgvar3; // 4 Bytes - UINT cfgvar4; // 4 Bytes - UINT cfgvar5; // 4 Bytes - UINT cfgvar6; // 4 Bytes - UINT cfgvar7; // 4 Bytes + stCfgBlockInfo CfgBlockInfos[8]; UINT cfgvar8; // 4 Bytes UINT cfgvar9; // 4 Bytes UINT cfgvar10; // 4 Bytes - UINT cfgvar11; // 4 Bytes - UINT cfgvar12; // 4 Bytes +// UINT cfgvar11; // 4 Bytes +// UINT cfgvar12; // 4 Bytes // UINT cfgvar13; // 4 Bytes // UINT cfgvar14; // 4 Bytes // UINT cfgvar15; // 4 Bytes @@ -372,10 +398,6 @@ KLDataTypeTest = 254 | TYPEDATA, }; -#define TOTAL_WDFS (32) //Total DF Count -#define TOTAL_CurVAL (16) // -#define TOTALTIMERS (64) - enum enKLDataCounts { @@ -406,44 +428,126 @@ }; -typedef struct tagTimerStat + +// 閫氫俊绔彛锛� 娉ㄥ唽鍒� KMachine 閲岋紝 缁熶竴绠$悊 + +enum enPortHardType { - unsigned short nScale:2;//Time Scale, 0:1ms 1:10ms 2:100ms 3:1S - unsigned short nType:1; //0 : timer 1:counter ; - unsigned short nDir:1; //0 : count down. 1 count up; - unsigned short nInited:1; - unsigned short bSet:1; - unsigned short bTon:1; + PortHardType_None = 0, // 绌烘帴鍙�,鏃犵被鍨� + PortHardType_SOFT = 1, // 杞欢铏氭嫙鎺ュ彛,鍙兘鏄毀閬撶瓑. + PortHardType_UART = 2, // 涓茶鎺ュ彛 + PortHardType_RS232 = 3, // 232鎺ュ彛 + PortHardType_RS485 = 4, // 485鎺ュ彛 + PortHardType_SLP = 5, // 鍗曟�荤嚎鎺ュ彛 + PortHardType_RF = 6, // 鏃犵嚎鎺ュ彛 + PortHardType_LORA = 7, // LoRa鏃犵嚎鎺ュ彛 + PortHardType_OPTI = 8, // 鍏夌氦鎺ュ彛 + PortHardType_ETH = 9, // 浠ュお缃戞帴鍙� + PortHardType_WIFI = 10, // WiFi鎺ュ彛 + PortHardType_BT = 11, // 浠ュお缃戞帴鍙� + +}; +enum enPortUseType +{ + PortUse_Default = 0, //榛樿 + PortUse_Console = 1, //鎺у埗鍙版帴鍙� + PortUse_KLink = 2, //KLink閫氳 + PortUse_KBus = 3, //KBus閫氳 + PortUse_KNet = 4, // KNet閫氳 + PortUse_SLP = 5, // SLP鍗曟�荤嚎 + PortUse_KRF = 6, // 鏃犵嚎閫氳 + PortUse_ModbusRTU = 7, //Modbus RTU 閫氳 + PortUse_ModbusTCP = 8, //Modbus TCP 閫氳 + PortUse_Com = 9, // 璁$畻鏈洪�氳 + PortUse_Gen = 10, //閫氱敤閫氳锛岃嚜鐢卞彛 +}; + +typedef struct tagPortAbility +{ + ushort ChildList:1; + ushort AccessChild:1; + ushort TranProg:1; + ushort TranCfg:1; + ushort Diag:1; + ushort TranOutBandData:1; + ushort Tunnel:1; + ushort TranFirmware:1; + ushort TranBlink:1; + +}stPortAbility; + +enum enServiceReqs +{ + ReqNone, + ReqInit, + ReqReset, + ReqStop, + ReqRun, + ReqBlinkLED, + ReqStartDiag, + ReqStopDiag, + ReqPortChildInfo, + ReqPortChnInfo, + ReqUpdateFirm, + ReqUpdateFirmInfo, -}stTimerStat; + ReqTransFirmware, + ReqTransCfg, + ReqTransProg, + ReqTransData, + ReqTransBlink, + ReqTransChild, + ReqTransInfo, + ReqTransOutBandData, + ReqRead1Bit, + ReqWrite1Bit, + ReqReadBits, + ReqWriteBits, + ReqReadData, + ReqWriteData, + ReqRemoteTran, + +}; -typedef struct tagTimer +// 鍚勭鍙� 浜掕仈 閫氫俊 +typedef int (*CommFuncDef)(void * pInstance, int ReqId , int nParam1, int nParam2, void ** pData, unsigned short * len1); +typedef struct tagPortDef { - unsigned int LastActTime; union { - unsigned short StatByte; - struct - { - unsigned short nScale:2; //Time Scale, 0:1ms 1:10ms 2:100ms 3:1S - unsigned short nType:1; //0 : timer 1 : counter ; - unsigned short nDir:1; //0 : count down. 1 count up; - unsigned short nInited:1; - unsigned short bSet:1; - unsigned short bTon:1; - - }; -// stTimerStat Stat; + USHORT nPortType; + struct { + UCHAR nPortHardType; + UCHAR nPortUseType; + }; }; -}stTimer; + ushort ability; //鑳藉姏, 鑾峰彇瀛愭満淇℃伅绛夈�� + uchar bEnable; + uchar bRunning; + uchar StationId; + uchar bMaster; + uchar nMaxStations; + uchar nCurStations; + uchar nHealth; + void * pPortConfig; + short PortConfigType; + short PortConfigSize; + void * pPortRunStatus; + short PortRunStatType; + short PortRunStatSize; + void * pInstance; //閫氫俊缁撴瀯瀹炰綋 + CommFuncDef ReqCommFunc; //閫氫俊璇锋眰鍑芥暟鎸囬拡 + // func2 CommReq; + +}stPortDef,* pstPortDef; +typedef struct tagInterComm +{ + int nId; + +}stInterComm; typedef struct tagKMem { - unsigned short WDFs[TOTAL_WDFS]; - unsigned char CurVALs[TOTAL_CurVAL]; - unsigned char CurVAL; - stTimer Timers[TOTALTIMERS]; - union { unsigned short WX[KLDataWXCount]; //鏈満鐨刋鍜孻 unsigned char WXB[KLDataWXCount*2]; @@ -454,18 +558,20 @@ }; unsigned short WR[KLDataWRCount]; - unsigned short WT[16]; - - unsigned short WC[16]; - unsigned short EV[KLDataEVCount]; - unsigned short SV[KLDataSVCount]; - - unsigned short WLX[16]; //铏氭嫙鐨刋鍜孻锛岃繙绋嬮�氳鏃舵槧灏勭敤銆� - unsigned short WLY[16]; - unsigned short WLR[16]; + //铏氭嫙鐨刋鍜孻锛岃繙绋嬮�氳鏃舵槧灏勭敤銆� + union{ + ushort WLX[16]; + uchar WLXB[32]; + }; + union{ + ushort WLY[16]; + uchar WLYB[32]; + }; unsigned short WFX[16]; unsigned short WFY[16]; + + unsigned short WLR[16]; unsigned short WSR[16]; union { @@ -513,72 +619,11 @@ unsigned char WDB[KLDataWDTCount*2]; }; + int nTotalPorts; + stPortDef * pPorts[8]; + }stKMem; - -// 閫氫俊绔彛锛� 娉ㄥ唽鍒� KMachine 閲岋紝 缁熶竴绠$悊 - -typedef struct tagPortAbility -{ - ushort ChildList:1; - ushort AccessChild:1; - ushort TranProg:1; - ushort TranCfg:1; - ushort Diag:1; - ushort TranOutBandData:1; - ushort Tunnel:1; - ushort TranFirmware:1; - ushort TranBlink:1; - - -}stPortAbility; - -enum enServiceReqs -{ - ReqNone, - ReqInit, - ReqReset, - ReqStop, - ReqRun, - ReqBlink, - ReqStartDiag, - ReqStopDiag, - ReqTransFirmware, - ReqTransCfg, - ReqTransProg, - ReqTransData, - ReqTransBlink, - ReqTransChild, - ReqTransInfo, - ReqTransOutBandData, - ReqRead1Bit, - ReqWrite1Bit, - ReqReadBits, - ReqWriteBits, - ReqReadData, - ReqWriteData, - ReqRemoteTran, - -}; - -// 鍚勭鍙� 浜掕仈 閫氫俊 -typedef int (*CommFunc)(int n , void *, int len1); -typedef struct tagPortReg -{ - ushort nType; - ushort nVer; - // func1 GetInfo; - // func2 CommReq; - ushort ability; //鑳藉姏, 鑾峰彇瀛愭満淇℃伅绛夈�� - -}stPortReg; - -typedef struct tagInterComm -{ - int nId; - - -}stInterComm; extern stKMem KMem; @@ -590,20 +635,42 @@ extern volatile int OldPowerDownEventTime; int KMachineInit(void); +int KMachineLoopProc(void); + +/* + 鍚慘Machine 娉ㄥ唽 閫氳绔彛,浠ヤ究閫氳绔彛涔嬮棿鐨勫姛鑳戒簰閫� +*/ +int KMRegisterPort(ushort nType,stPortDef * thePortParam); + +int KMPortReqFunc(int nPortIndex,int nReqId, int nParam1, int nParam2, void ** pData, unsigned short * nlen1); + + int ReadFlashMem(void * pBuf, void * pAddrFlash, int nByteSize); int EraseAndWriteToFlashMem(void * pBuf, void * pAddrFlash, unsigned int nByteSize); int WriteToFlashMemNoErase(void * pBuf, void * pAddrFlash, unsigned int nByteSize); +int WriteToFlashAutoErase(void * pBuf, void * pAddrFlash, unsigned int nByteSize); int ReadFactoryData(void * pDatabuf, int nByteCount); int WriteFactoryData(void * pDataBuf, int nByteCount); // active Program bank -int ReadProgram(int nProgByteAddr, void *pBuf, int nByteSize, int nBank); -int WriteProgram(int nProgByteAddr, void * pBuf, int nByteSize, int nBank); + +int ReadPLCProgram(int nBank, int nProgByteAddr, void *pBuf, int nByteSize); +int StartPLCProgram(int nBank, int nByteSize, int nCRC); +int WritePLCProgram(int nBank, int nProgByteAddr, void * pBuf, int nByteSize); +int FinishiPLCProgram(int nBank, int nByteSize, int nCRC ); + +int ReadPLCAnno(int nType, int nProgByteAddr, void *pBuf, int nByteSize); +int StartPLCAnno(int nType, int nByteSize, int nCRC); +int WritePLCAnno(int nType, int nProgByteAddr, void * pBuf, int nByteSize); +int FinishiPLCAnno(int nType, int nByteSize, int nCRC ); int WriteSysCfgToFlash(pStoredKMSysCfg theStoredKMSysCfg); int ReadSysCfgFromFlash(pStoredKMSysCfg theStoredKMSysCfg); +int KMRunService(int nSvrId, int nParam1, int nParam2, void **pData, unsigned short *nled1); + +int CheckEventLog(void); int AddEventLog(uint32_t nTime, USHORT nEvent, USHORT nParam1, UINT nParam2); pEventLog GetEventLogAddr(int nIndex); int ClearEventLog(void); diff --git a/ComLib/Inc/MyQueue.h b/ComLib/Inc/MyQueue.h index f070997..2b829b8 100644 --- a/ComLib/Inc/MyQueue.h +++ b/ComLib/Inc/MyQueue.h @@ -8,17 +8,22 @@ #ifndef __MYQUEUE_H__ #define __MYQUEUE_H__ +#pragma anon_unions typedef struct { unsigned char * buf1; - int Caps; - volatile int wp; //Write Pointor - volatile int rp; //Read Pointor + short Caps; + volatile short wp; //Write Pointor + volatile short rp; //Read Pointor // volatile int DataSize; - volatile int RecvBytes; - volatile int bFull; - volatile int bEmpty; - volatile int state; +// volatile short RecvBytes; + union{ + volatile unsigned char state; + struct{ + volatile unsigned char bFull:1; + volatile unsigned char bEmpty:1; + }; + }; }stMyQueue,* pMyQueue; @@ -30,7 +35,7 @@ } static __inline int GetDataLen(pMyQueue theQueue) { - int size=theQueue->wp -theQueue->rp; + int size=theQueue->wp - theQueue->rp; if (theQueue->bFull) { return theQueue->Caps; diff --git a/ComLib/Inc/PLCfunctions.h b/ComLib/Inc/PLCfunctions.h index c34a03a..a84c1b4 100644 --- a/ComLib/Inc/PLCfunctions.h +++ b/ComLib/Inc/PLCfunctions.h @@ -10,10 +10,48 @@ #include "GlobalDef.h" #include "KMachine.h" +#if (ENABLE_PLC) + #define TICK_OF_MS (10) //1ms #define TICK_OF_RS (100) //10mS #define TICK_OF_XS (1000) //100mS #define TICK_OF_YS (10000) //1S + +#define TOTAL_WDFS (32) //Total DF Count +#define TOTAL_CurVAL (16) // +#define TOTALTIMERS (64) + +#define PLC_PROGRAM_USE_BANK 1 + +typedef struct tagTimerStat +{ + unsigned short nScale:2;//Time Scale, 0:1ms 1:10ms 2:100ms 3:1S + unsigned short nType:1; //0 : timer 1:counter ; + unsigned short nDir:1; //0 : count down. 1 count up; + unsigned short nInited:1; + unsigned short bSet:1; + unsigned short bTon:1; + +}stTimerStat; + +typedef struct tagTimer +{ + unsigned int LastActTime; + union { + unsigned short StatByte; + struct + { + unsigned short nScale:2; //Time Scale, 0:1ms 1:10ms 2:100ms 3:1S + unsigned short nType:1; //0 : timer 1 : counter ; + unsigned short nDir:1; //0 : count down. 1 count up; + unsigned short nInited:1; + unsigned short bSet:1; + unsigned short bTon:1; + + }; +// stTimerStat Stat; + }; +}stTimer; #pragma anon_unions @@ -21,14 +59,19 @@ { int bPLCRunning; int nScanCount; + unsigned short WDFs[TOTAL_WDFS]; + unsigned char CurVALs[TOTAL_CurVAL]; + unsigned char CurVAL; + stTimer Timers[TOTALTIMERS]; + unsigned short WT[16]; + + unsigned short WC[16]; + unsigned short EV[KLDataEVCount]; + unsigned short SV[KLDataSVCount]; + unsigned short ProgTrace[256]; }stPLCMem; -extern stPLCMem PLCMem; - -int InitPLC(void); -int StartPLC(void); -int StopPLC(void); enum enPLCOPs { @@ -91,11 +134,14 @@ OP_PAUSE, OP_JP, OP_CALL, + OP_RET, OP_TML = 0xC8, // OP_TMR = 0xDC, // OP_TMX = 0xDD, // OP_TMY = 0xFA, // + + OP_END = 0xFF, }; /* @@ -106,13 +152,13 @@ unsigned short Addr; }stPLCPROG; */ - typedef struct stBinProg1 + typedef struct stBinInstrcn1 { unsigned char nOp; unsigned char nParamType; unsigned short nParamAddr; - }stBinProg1; - typedef struct stBinProg15 + }stBinInstrcn1; + typedef struct stBinInstrcn15 { //??? // unsigned char nOp; @@ -121,8 +167,8 @@ unsigned char nParamType1; unsigned char resvr1; unsigned short resvr2; - }stBinProg15; - typedef struct stBinProg2 + }stBinInstrcn15; + typedef struct stBinInstrcn2 { //???? // unsigned char nOp; @@ -131,8 +177,8 @@ unsigned char nParamType1; unsigned char nParamType2; unsigned short nParamAddr2; - }stBinProg2; - typedef struct stBinProg3 + }stBinInstrcn2; + typedef struct stBinInstrcn3 { //??????? unsigned char nOp; unsigned char nOpNum; @@ -143,28 +189,49 @@ unsigned char resvr1; unsigned char nParamType3; unsigned short nParamAddr3; - }stBinProg3; - - -extern stBinProg1 const prog1[]; -extern int nSizeProg1; - -//extern unsigned char CurVAL; -//extern unsigned char CurVALs[TOTAL_CurVAL]; -//extern unsigned short DFs[TOTAL_WDFS]; - -//extern unsigned short WX[13]; -//extern unsigned short WY[13]; -//extern unsigned short WR[64]; -//extern unsigned short DT[256]; -//extern unsigned short SDT[256]; -//extern const unsigned short bitMasks[16]; -//extern stTimer Timers[TOTALTIMERS]; - -///* + }stBinInstrcn3; -//*/ +typedef struct tagStoredHdr +{ + unsigned short nBlockSign; + unsigned char nBlockType; + unsigned char nSeq; + unsigned short nSize; + unsigned short nCRC2; +}stStoredHdr; + + +/* +typedef struct tagBinProgs +{ + unsigned short nSteps; + unsigned short nOptions; + stBinInstrcn1 BinInstrcns[1]; +}stBinProgs, *pstBinProgs; +*/ +typedef struct tagStoredBinProgs +{ + stStoredHdr StoredHdr; + stBinInstrcn1 BinInstrcns[1]; + +}stStoredBinProgs, *pstStoredBinProgs; + +typedef struct tagStoredAnno +{ + stStoredHdr StoredHdr; + unsigned char Annos[1]; + +}stStoredAnno, *pstStoredAnno; + +//extern stBinInstrcn1 const prog1[]; +//extern int nSizeProg1; +extern stPLCMem PLCMem; + + +int InitPLC(void); +int StartPLC(void); +int StopPLC(void); int InitTimer(int nIndex, int nType); int RunTimer(int nIndex , int SV); @@ -179,9 +246,9 @@ int PushInVal(void); int PopOutVal(void); -int ProcessPLCBinProg(const stBinProg1 * pBinprog, int nSize); -//int ProcessPLCPROG(const stBinProg1 * prog,int nSize); +int ProcessPLCBinProg(const stBinInstrcn1 * pBinProg, int nSize); +//int ProcessPLCPROG(const stBinInstrcn1 * prog,int nSize); - +#endif // (ENABLE_PLC) #endif /* __PLCFUNCTIONS_H__ */ diff --git a/ComLib/Src/BSP.c b/ComLib/Src/BSP.c index 7421f15..665273d 100644 --- a/ComLib/Src/BSP.c +++ b/ComLib/Src/BSP.c @@ -109,8 +109,65 @@ * @retval None */ -void SystemClock_Config(void) +void SystemClock_Config_New(void) { + LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); + + if(LL_FLASH_GetLatency() != LL_FLASH_LATENCY_1) + { + Error_Handler(); + } + LL_RCC_HSE_Enable(); + + /* Wait till HSE is ready */ + while(LL_RCC_HSE_IsReady() != 1) + { + + } + LL_RCC_LSI_Enable(); + + /* Wait till LSI is ready */ + while(LL_RCC_LSI_IsReady() != 1) + { + + } +#if (XLAT_FREQ == 12) + LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_HSE_DIV_3, LL_RCC_PLL_MUL_12); +#else + LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_HSE_DIV_2, LL_RCC_PLL_MUL_12); +#endif + LL_RCC_PLL_Enable(); + + /* Wait till PLL is ready */ + while(LL_RCC_PLL_IsReady() != 1) + { + + } + LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); + LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); + LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); + + /* Wait till System clock is ready */ + while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) + { + + } + + LL_InitTick(48000000,10000); + HAL_SYSTICK_CLKSourceConfig(SYSTICK_CLKSOURCE_HCLK); + HAL_NVIC_SetPriority(SysTick_IRQn, 0, 0); + + SysTick->CTRL = SysTick_CTRL_ENABLE_Msk + | SysTick_CTRL_TICKINT_Msk; + + LL_SetSystemCoreClock(48000000); + LL_RCC_SetUSARTClockSource(LL_RCC_USART1_CLKSOURCE_PCLK1); + +} + + +void SystemClock_Config(void) +{ RCC_OscInitTypeDef RCC_OscInitStruct = {0}; RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; @@ -678,8 +735,8 @@ LL_USART_EnableDEMode(USART2); LL_USART_SetDESignalPolarity(USART2, LL_USART_DE_POLARITY_LOW); // LL_USART_SetDESignalPolarity(USART2, LL_USART_DE_POLARITY_HIGH); - LL_USART_SetDEAssertionTime(USART2, 31); - LL_USART_SetDEDeassertionTime(USART2, 31); + LL_USART_SetDEAssertionTime(USART2, 15); + LL_USART_SetDEDeassertionTime(USART2, 15); #else #endif diff --git a/ComLib/Src/GlobalDef.c b/ComLib/Src/GlobalDef.c index 80d0783..33a43f7 100644 --- a/ComLib/Src/GlobalDef.c +++ b/ComLib/Src/GlobalDef.c @@ -17,15 +17,15 @@ unsigned int Uart1Baud = DefaultUart1Baud; unsigned int Uart2Baud = DefaultUart2Baud; -unsigned char Uart1RecvBuf1[128]; +unsigned char Uart1RecvBuf1[Uart1RecvBufSize]; int Uart1RecvBuf1DataLen=0; -unsigned char Uart1RecvBuf2[128]; -int Uart1RecvBuf2DataLen=0; +//unsigned char Uart1RecvBuf2[128]; +//int Uart1RecvBuf2DataLen=0; unsigned char Uart2RecvBuf1[128]; int Uart2RecvBuf1DataLen=0; -unsigned char Uart2RecvBuf2[128]; -int Uart2RecvBuf2DataLen=0; +//unsigned char Uart2RecvBuf2[128]; +//int Uart2RecvBuf2DataLen=0; volatile int Uart1BaudGot=0; volatile int Uart1BaudFirstGot=0; diff --git a/ComLib/Src/KBus.c b/ComLib/Src/KBus.c index 82dee18..972e77e 100644 --- a/ComLib/Src/KBus.c +++ b/ComLib/Src/KBus.c @@ -45,6 +45,30 @@ pKBus->KBusSendPacket = KBusSendPacket; pKBus->nCurPollId = 1; + for (int i=0;i<MAX_CLIENT;i++) + { + memset(&pKBus->KBusChnStats[i],0,sizeof(stChnStat)); + } + for (int i=0;i<MAX_CLIENT;i++) + { + KBusMakeDefaultClildInfo(pKBus, i); + } +/* + stDeviceInfo * pDeviceInfo = &pKBus->DeviceInfos[1]; + + pDeviceInfo->DeviceType = 0; + pDeviceInfo->DeviceVer = 0; + pDeviceInfo->InBitCount = 16; + pDeviceInfo->OutBitCount = 16; + pDeviceInfo->AIWCount = 0; + pDeviceInfo->AQWCount = 0; + pDeviceInfo->DWStartAddr = 0; + pDeviceInfo->OutDWCount = 0; +*/ + pKBus->KBusPort = (stPortDef){.nPortHardType = 4, .nPortUseType = 3, .bEnable = 1, .bRunning =1, .StationId = 0, .bMaster = 1, .nMaxStations = nChildCount, + .pInstance=pKBus , .ReqCommFunc = (CommFuncDef)KBusReqService}; + + KMRegisterPort(1,&pKBus->KBusPort); return iRet; }; @@ -61,11 +85,16 @@ pKBus->KBusEvCBFunc = NULL; pKBus->KBusSvCBFunc=NULL; pKBus->KBusSendPacket = KBusSendPacket; - +/* for (int i=0;i<MAX_CLIENT;i++) { memset(&pKBus->KBusChnStats[i],0,sizeof(stChnStat)); - } + } +*/ + + pKBus->KBusPort = (stPortDef){.nPortHardType = 4, .nPortUseType = 3, .bEnable = 1, .bRunning =1, .StationId = nStationId, .bMaster = 0, .pInstance = pKBus}; + KMRegisterPort(1,&pKBus->KBusPort); + return iRet; } @@ -92,6 +121,92 @@ return 0; } +//unsigned char tempdata [8] = {11,12,13,14,25,26,27,28}; +int KBusReqService (stKBusDef * pKBus, int ReqId, int nParam1, int nParam2, void **pData, unsigned short * len1) +{ + + switch (ReqId) { + case ReqStartDiag: + break; + case ReqStopDiag: + break; + case ReqPortChnInfo: + *pData = &pKBus->KBusChnStats[nParam1]; + *len1 = sizeof(stChnStat); + break; + case ReqPortChildInfo: + *pData = &pKBus->DeviceInfos[nParam1]; + *len1 = sizeof(stDeviceInfo); + +// *pData = tempdata; +// *len1 = sizeof(tempdata); + break; + case ReqBlinkLED: + if (pKBus->bReq == 1) return -1; + if (nParam1 != 0xff && nParam1> pKBus->nChildCount) return -2; + if (pKBus->bReq != 1 ) { + pKBus->bReq=1; + pKBus->nReqSvrId = ReqId; + pKBus->nReqChildId = nParam1; + pKBus->nReqParam = nParam2; + pKBus->nReqReCount = 0; + } + break; + + case ReqTransBlink: + if (pKBus->bReq == 1) return -1; + if (nParam1 != 0xff && nParam1> pKBus->nChildCount) return -2; + if (pKBus->bReq != 1 ) { + pKBus->bReq=1; + pKBus->nReqSvrId = ReqId; + pKBus->nReqChildId = nParam1; + pKBus->nReqParam = nParam2; + pKBus->nReqReCount = 0; + } + break; + + case ReqTransCfg: + break; + case ReqUpdateFirm: + if (pKBus->bReq == 1) return -1; + if (nParam1> pKBus->nChildCount) return -2; + if (pKBus->bReq != 1 ) { + pKBus->bReq=1; + pKBus->nReqSvrId = ReqId; + pKBus->nReqChildId = nParam1; + pKBus->nReqParam = nParam2; + pKBus->nReqReCount = 0; + if (*len1>0) { + memcpy(pKBus->pReqDatas,*pData,*len1); + pKBus->nReqDataLen = *len1; + pKBus->nReqDataOff = 0; + } + } + + break; + + case ReqTransFirmware: + break; + default: + if (pKBus->bReq == 1) return -1; + if (nParam1 != 0xff && nParam1> pKBus->nChildCount) return -2; + if (pKBus->bReq != 1 ) { + pKBus->bReq=1; + pKBus->nReqSvrId = ReqId; + pKBus->nReqChildId = nParam1; + pKBus->nReqParam = nParam2; + pKBus->nReqReCount = 0; + if (*len1>0) { + memcpy(pKBus->pReqDatas,*pData,*len1); + pKBus->nReqDataLen = *len1; + pKBus->nReqDataOff = 0; + } + } + break; + } + return 0; +} + int KBusStart(stKBusDef * pKBus) { int iRet = 0; @@ -104,14 +219,17 @@ int iRet = 0; if (pKBus->bMaster) { + if (pKBus->nChildCount>0) KBusMasterFunc(&KBus1); } if (pKBus->bSlave) { + KBusSlaveFunc(&KBus1); } if (pKBus->bRepeater) { } - + if (pKBus->RunStat) {pKBus->RunStat--;} + if (pKBus->ErrStat) {pKBus->ErrStat--;} return iRet; } @@ -124,36 +242,29 @@ return 0; } -int KBusUpdateChildInfo(stKBusDef * pKBus, int nCild, stDeviceInfo * pInfoBlock) +int KBusUpdateChildInfo(stKBusDef * pKBus, int nChild, stDeviceInfo * pInfoBlock) { - stDeviceInfo * pDeviceInfo = &pKBus->DeviceInfos[nCild]; - - pDeviceInfo->DeviceType = pInfoBlock->DeviceType; - pDeviceInfo->DeviceVer = pInfoBlock->DeviceVer; - pDeviceInfo->InBitCount = pInfoBlock->InBitCount; - pDeviceInfo->OutBitCount = pInfoBlock->OutBitCount ; - pDeviceInfo->AIWCount = pInfoBlock->AIWCount; - pDeviceInfo->AQWCount = pInfoBlock->AQWCount; - pDeviceInfo->DWStartAddr = pInfoBlock->DWStartAddr; - pDeviceInfo->OutDWCount = pInfoBlock->OutDWCount; - + pKBus->DeviceInfos[nChild] = *pInfoBlock; return 0; } -int KBusMakeDefaultClildInfo(stKBusDef * pKBus, int nCild) +int KBusMakeDefaultClildInfo(stKBusDef * pKBus, int nChild) { - unsigned DefaultInBitCount = 8; - unsigned DefaultOutBitCount = 8; - stDeviceInfo * pDeviceInfo = &pKBus->DeviceInfos[nCild]; +// unsigned DefaultInBitCount = 8; +// unsigned DefaultOutBitCount = 8; + +// stDeviceInfo * pDeviceInfo = &pKBus->DeviceInfos[nChild]; + pKBus->DeviceInfos[nChild] = (stDeviceInfo){ + .DeviceType=0, + .DeviceVer=0, + .InBitCount=8, + .OutBitCount=8, + .AIWCount=0, + .AQWCount=0, + .DWStartAddr=0, + .OutDWCount=0 + }; - pDeviceInfo->DeviceType = 0; - pDeviceInfo->DeviceVer = 0; - pDeviceInfo->InBitCount = DefaultInBitCount; - pDeviceInfo->OutBitCount = DefaultOutBitCount; - pDeviceInfo->AIWCount = 0; - pDeviceInfo->AQWCount = 0; - pDeviceInfo->DWStartAddr = 0; - pDeviceInfo->OutDWCount = 0; return 0; } @@ -184,74 +295,234 @@ int KBusSearchChildProc(stKBusDef * pKBus) { int iRet = 0; - uint32_t tick1=HAL_GetTick(); - uint32_t thisuS=GetuS(); - - pKBus->MyStat = KBusStatReady; - return iRet; - if (!pKBus->bMasterSent) { - // Sent Query Packet for CurPollId; - //pKBus->nCurPollId; - pKBus->bMasterSent=1; - pKBus->SendTimeuS = thisuS; - } + uint32_t tick1=GetTick(); +// uint32_t thisuS=GetuS(); + int nThisPollId = pKBus->nCurPollId; if (pKBus->bMasterSent) { if (pKBus->bMasterRecved) { - - } - - if (!pKBus->bMasterRecved && thisuS- pKBus->SendTimeuS > 1000) - { - // timeOut, - pKBus->bMasterSent=0; // no wait any more; - if (pKBus->RetryCount <3) { - // resent query packet for curPollId; - pKBus->bMasterSent=1; - pKBus->SendTimeuS = thisuS; - } - if (pKBus->RetryCount >3 ) { - // Set Cur Child As Default - KBusMakeDefaultClildInfo(pKBus,pKBus->nCurPollId); - KBusAddChildAddrByInfo(pKBus,pKBus->nCurPollId,&pKBus->DeviceInfos[pKBus->nCurPollId]); - - // Next Child; - pKBus->nCurPollId++; - if (pKBus->nCurPollId > pKBus->nChildCount) + pKBus->bMasterSent=0; + pKBus->RetryCount=0; + nThisPollId++; + pKBus->nCurPollId = nThisPollId; + if (nThisPollId > pKBus->nChildCount) { // all query done, next stage + pKBus->nCurPollId = 1; pKBus->MyStat = KBusStatReady; // CallBack if (pKBus->KBusEvCBFunc) pKBus->KBusEvCBFunc(pKBus, KBusEvStateChange,0,0); - } - + } + + if (!pKBus->bMasterRecved && tick1- pKBus->SendTimeTick > KBUS_WAIT_TIME_OUT1) + { +/* + // timeOut, + if (pKBus->RetryCount <3) { + pKBus->RetryCount++; + // resent query packet for curPollId; + pKBus->bMasterSent=0; // no wait any more; +// pKBus->bMasterSent=1; +// pKBus->SendTimeTick = tick1; + } + if (pKBus->RetryCount >3 ) +// */ + { + // Set Cur Child As Default + KBusMakeDefaultClildInfo(pKBus,nThisPollId); + KBusAddChildAddrByInfo(pKBus,nThisPollId,&pKBus->DeviceInfos[nThisPollId]); + + // Next Child; + pKBus->RetryCount=0; + nThisPollId++; + pKBus->nCurPollId = nThisPollId; + if (nThisPollId > pKBus->nChildCount) + { + // all query done, next stage + pKBus->nCurPollId = 1; + pKBus->MyStat = KBusStatReady; + // CallBack + if (pKBus->KBusEvCBFunc) pKBus->KBusEvCBFunc(pKBus, KBusEvStateChange,0,0); + } + pKBus->bMasterSent=0; } } + }else { // ! pKBus->bMasterSent 还没有发送 + // Sent Query Packet for CurPollId; + //pKBus->nCurPollId; + + unStatus ThisStatus; + ThisStatus.nSeq = pKBus->nSeq; + ThisStatus.nErr1 = (pKBus->KBusChnStats[nThisPollId].MStat==0); + + int len1=KBusMakePacket((pKBPacket)pKBus->PacketBuf2,0,nThisPollId,cmdQuery,ThisStatus.nStatus,0,NULL); +// LL_USART_SetBaudRate(USART2,48000000,LL_USART_OVERSAMPLING_8,DefaultUart2Baud); + pKBus->KBusSendPacket(pKBus->PacketBuf2, len1); + pKBus->KBusChnStats[nThisPollId].SendPackets++; + pKBus->KBusChnStats[nThisPollId].SendTimeInterval=pKBus->SendTimeTick-pKBus->KBusChnStats[nThisPollId].LastSentTimeTick; + pKBus->KBusChnStats[nThisPollId].LastSentTimeTick=pKBus->SendTimeTick; +// PacketLength = len1; + pKBus->SendTime=tick1; + + pKBus->bMasterRecved=0; + pKBus->bMasterRecvOK=0; + + pKBus->bMasterSent=1; + pKBus->SendTimeTick = tick1; } + + +// pKBus->MyStat = KBusStatReady; return iRet; } +int KBusPacketSendDone(stKBusDef * pKBus) +{ + switch (pKBus->MyStat){ + case KBusStatUnInited: + break; + case KBusStatInited: + break; + case KBusStatConfig: + break; + case KBusStatReady: + break; + case KBusStatRunning: + switch(pKBus->nRunStep) { + case KBusRunStepBroadCastCfg: + pKBus->nRunStep = KBusRunStepTimeSync; + break; + case KBusRunStepTimeSync: + pKBus->nRunStep = KBusRunStepMultiDataPoll; + break; + case KBusRunStepMultiDataPoll: + pKBus->nRunStep = KBusRunStepUniDataPoll; + break; + case KBusRunStepUniDataPoll: + + break; + case KBusRunStepUniDataTranster: + + break; + default: + break; + } +// KBusDataPoll(pKBus); + break; + default: + break; + } + return 0; +} + + + +int GoStep(stKBusDef * pKBus, enKBusRunStep NextStep) +{ + pKBus->nRunStep = NextStep; + pKBus->TimeOutCount=0; + return 0; +} int KBusMasterFunc(stKBusDef * pKBus) { + int len1; + uint32_t tick1=GetTick(); + ushort DataLen = 0; switch (pKBus->MyStat){ case KBusStatUnInited: KBusLoadSavedConfig(pKBus); pKBus->MyStat = KBusStatInited; + pKBus->TimeOutCount=0; break; case KBusStatInited: + pKBus->TimeOutCount++; + if (pKBus->TimeOutCount>30){ pKBus->MyStat = KBusStatConfig; + pKBus->TimeOutCount = 0; + } break; case KBusStatConfig: KBusSearchChildProc(pKBus); break; case KBusStatReady: pKBus->MyStat = KBusStatRunning; + pKBus->nRunStep = KBusRunStepBroadCastCfg; + pKBus->TimeOutCount=0; break; case KBusStatRunning: - KBusDataPoll(pKBus); + switch(pKBus->nRunStep) { + case KBusRunStepBroadCastCfg: + pKBus->TimeOutCount++; + if (pKBus->TimeOutCount>4){ + pKBus->nRunStep = KBusRunStepTimeSync; + pKBus->TimeOutCount = 0; + } + break; + case KBusRunStepTimeSync: + pKBus->Datas[0]=tick1&0xff; + pKBus->Datas[1]=(tick1>>8)&0xff; + pKBus->Datas[2]=(tick1>>16)&0xff; + pKBus->Datas[3]=(tick1>>24)&0xff; + len1=KBusMakePacket((pKBPacket)pKBus->PacketBuf2,0,0xff,cmdSyncTime,pKBus->nSeq,4,pKBus->Datas); + pKBus->KBusSendPacket(pKBus->PacketBuf2, len1); + + pKBus->nRunStep = KBusRunStepTimeSyncWait; + pKBus->TimeOutCount=0; + break; + case KBusRunStepTimeSyncWait: + pKBus->TimeOutCount++; + if (pKBus->TimeOutCount>2){ + pKBus->nRunStep = KBusRunStepMultiDataPoll; + pKBus->TimeOutCount=0; + } + break; + case KBusRunStepMultiDataPoll: + pKBus->TimeOutCount++; + if (pKBus->TimeOutCount>1){ + pKBus->nCurPollId = 1; + pKBus->nRunStep = KBusRunStepUniDataPoll; + pKBus->TimeOutCount=0; + } + break; + case KBusRunStepUniDataPoll: + KBusDataPoll(pKBus); + break; + case KBusRunStepUniDataTranster: + // 看是否有远程请求 + if (pKBus->bReq &&pKBus->nReqReCount<1) + { + pKBus->nReqDataHdr[0]=0; + pKBus->nReqDataHdr[1]=0; + pKBus->nReqDataHdr[2]=pKBus->nReqSvrId; + pKBus->nReqDataHdr[3]=pKBus->nReqParam; + // [4] Addr + // [5] Addr + // [6] nCount + DataLen = pKBus->nReqDataLen+2; + len1=KBusMakePacket((pKBPacket)pKBus->PacketBuf2,0,pKBus->nReqChildId,cmdRemoteReq,pKBus->nSeq,DataLen,&pKBus->nReqDataHdr[2]); + pKBus->KBusSendPacket(pKBus->PacketBuf2, len1); + pKBus->nReqReCount++; + }else { + + } + pKBus->nRunStep = KBusRunStepUniDataTransterWait; + pKBus->TimeOutCount=0; + break; + case KBusRunStepUniDataTransterWait: + pKBus->TimeOutCount++; + if (pKBus->TimeOutCount>4){ + if (pKBus->bReq ==1) {pKBus->bReq = 3;} + pKBus->nRunStep = KBusRunStepBroadCastCfg; + pKBus->TimeOutCount=0; + + } + break; + default: + break; + } break; default: break; @@ -262,18 +533,56 @@ int KBusDataPoll(stKBusDef * pKBus) { int iRet = 0; - uint32_t tick1=HAL_GetTick(); - uint32_t thisuS=GetuS(); + uint32_t tick1=GetTick(); +// uint32_t thisuS=GetuS(); int len1=0; int nThisPollId = pKBus->nCurPollId; stChnStat * pChnStat = &pKBus->KBusChnStats[nThisPollId]; - if ((pKBus->bMasterRecved && pKBus->bMasterRecvOK && thisuS-pKBus->SendTimeuS>50) || thisuS-pKBus->SendTimeuS>1000u) + if (!pKBus->bMasterSent){ + pKBus->Datas[0]=KBusMem.WLYB[nThisPollId -1 ]; + for (int i=1; i*8 < pKBus->DeviceInfos[nThisPollId].OutBitCount;i++){ + pKBus->Datas[0+i]=KBusMem.WLYB[nThisPollId -1 + i]; + } + +// pKBus->Datas[1]=KBusMem.WLYB[nThisPollId ];; +// pKBus->Datas[2]=KBusMem.WLYB[nThisPollId + 1 ]; //KBusChnStats[nCurPollId].Stat; +// pKBus->Datas[3]=KBusMem.WLYB[nThisPollId + 2 ]; + pKBus->Datas[4]=tick1&0xff; + pKBus->Datas[5]=(tick1>>8)&0xff; + pKBus->Datas[6]=(tick1>>16)&0xff; + pKBus->Datas[7]=(tick1>>24)&0xff; + + pKBus->SendTimeTick=tick1; + unStatus ThisStatus; + ThisStatus.nStatus= pChnStat->MStat; + ThisStatus.nSeq = pKBus->nSeq; + //ThisStatus.nErr1 = (pChnStat->MStat==0); +// ThisStatus.nErr1 = 0; + len1=KBusMakePacket((pKBPacket)pKBus->PacketBuf2,0,nThisPollId,cmdUniExChgData,ThisStatus.nStatus,8,pKBus->Datas); +// LL_USART_SetBaudRate(USART2,48000000,LL_USART_OVERSAMPLING_8,DefaultUart2Baud); + + pKBus->KBusSendPacket(pKBus->PacketBuf2, len1); + pChnStat->SendPackets++; + pChnStat->SendTimeInterval=pKBus->SendTimeTick - pChnStat->LastSentTimeTick; + pChnStat->LastSentTimeTick=pKBus->SendTimeTick; +// PacketLength = len1; + pKBus->SendTime=tick1; + pKBus->bMasterSent = 1; + pKBus->bMasterRecved=0; + pKBus->bMasterRecvOK=0; + // LL_GPIO_TogglePin(GPIOA,LL_GPIO_PIN_5); + //ToggleErrLed(); +// ToggleOut8(); + }else + { + + if ((pKBus->bMasterRecved && pKBus->bMasterRecvOK && tick1-pKBus->SendTimeTick>1) || tick1-pKBus->SendTimeTick>KBUS_WAIT_TIME_OUT2) { if (!pKBus->bMasterRecvOK) { pKBus->TimeOutCount++; - Uart2Stat.TimeOutErr++; +// Uart2Stat.TimeOutErr++; pChnStat->LostPackets++; pChnStat->CtnLstPkts++; if (!pKBus->bMasterRecved) {pChnStat->TimeOutErr++;} @@ -281,7 +590,7 @@ {pChnStat->MaxCtnLstPkts = pChnStat->CtnLstPkts;} if (pChnStat->CtnLstPkts>3) { - pChnStat->Stat = 0; + pChnStat->MStat = 0; pKBus->ErrStat=200; KBusMem.WLXB[nThisPollId]=0; if (pKBus->KBusEvCBFunc) pKBus->KBusEvCBFunc(pKBus, KBusEvStateChange,0,0); @@ -291,13 +600,15 @@ // LL_GPIO_SetOutputPin(GPIOA,LL_GPIO_PIN_7); }else { - pChnStat->Stat=1; + // pChnStat->CtnLstPkts = 0; + // pKBus->KBusChnStats[nThisPollId].CtnLstPkts=0; + pChnStat->MStat=1; pKBus->RunStat=100; } if (pKBus->DeviceInfos[nThisPollId].InBitCount >8 || pKBus->DeviceInfos[nThisPollId].OutBitCount > 8) { - //nThisPollId += 2; - nThisPollId ++; + nThisPollId += 2; + //nThisPollId ++; }else { nThisPollId ++; } @@ -306,71 +617,40 @@ // 数据轮询完, 周期间隙,插入其他处理数据. 每次处理的时间间隙, 一问 一答 时间. // 分成几种类型, 轮流进行 // 时间同步, 查询新子机, 处理带外数据, ,处理额外的事情, 或者跳过. - pKBus->CircleTime=thisuS-pKBus->LastCircleStartTime; - pKBus->LastCircleStartTime=thisuS; + pKBus->CircleTime=tick1-pKBus->LastCircleStartTime; + pKBus->LastCircleStartTime=tick1; pKBus->nSeq++; - nThisPollId=1; + GoStep(pKBus,KBusRunStepUniDataTranster); + //nThisPollId=1; + }else { + pKBus->nCurPollId = nThisPollId; } - pKBus->nCurPollId = nThisPollId; - - pKBus->Datas[0]=KBusMem.WLYB[nThisPollId -1 ]; - pKBus->Datas[1]=KBusMem.WLYB[nThisPollId ];; - - pKBus->Datas[2]=KBusMem.WLYB[nThisPollId + 1 ]; //KBusChnStats[nCurPollId].Stat; - pKBus->Datas[3]=KBusMem.WLYB[nThisPollId + 2 ]; - pKBus->Datas[4]=tick1&0xff; - pKBus->Datas[5]=(tick1>>8)&0xff; - pKBus->Datas[6]=(tick1>>16)&0xff; - pKBus->Datas[7]=(tick1>>24)&0xff; - - pKBus->SendTimeuS=thisuS; - unStatus nStatus; - nStatus.nSeq = pKBus->nSeq; - nStatus.nErr1 = (pKBus->KBusChnStats[nThisPollId].Stat==0); - - - len1=KBusMakePacket((pKBPacket)pKBus->PacketBuf1,0,nThisPollId,cmdUniExChgData,nStatus.nStatus,8,pKBus->Datas); -// LL_USART_SetBaudRate(USART2,48000000,LL_USART_OVERSAMPLING_8,DefaultUart2Baud); - - pKBus->KBusSendPacket(pKBus->PacketBuf1, len1); - pKBus->KBusChnStats[pKBus->nCurPollId].SendPackets++; - pKBus->KBusChnStats[pKBus->nCurPollId].SendTimeInterval=pKBus->SendTimeuS-pKBus->KBusChnStats[pKBus->nCurPollId].LastSentTimeuS; - pKBus->KBusChnStats[pKBus->nCurPollId].LastSentTimeuS=pKBus->SendTimeuS; -// PacketLength = len1; - pKBus->SendTime=tick1; - - pKBus->bMasterRecved=0; - pKBus->bMasterRecvOK=0; - // LL_GPIO_TogglePin(GPIOA,LL_GPIO_PIN_5); - //ToggleErrLed(); -// ToggleOut8(); - + pKBus->bMasterSent = 0; } - + } return iRet; } int KBusSlaveFunc(stKBusDef * pKBus) { - int ThisuS=GetuS(); - int thisRecvTime=pKBus->RecvTimeuS; +// int ThisuS=GetuS(); + int ThisTick = GetTick(); + int thisRecvTime=pKBus->RecvTimeTick; if (pKBus->nStationId >0) { if (pKBus->bSlaveRecved) { pKBus->RunStat=8000; pKBus->bSlaveRecved=0; - }else if ((ThisuS - thisRecvTime) >12000u) + }else if ((ThisTick - thisRecvTime) > KBUS_SLAVE_TIME_OUT) // 30u { - pKBus->ErrStat=8000; - }else if ( ThisuS > (thisRecvTime + 12000u)) + pKBus->ErrStat=7000; + }else if ( ThisTick > (thisRecvTime + KBUS_SLAVE_TIME_OUT)) // 30u { - pKBus->ErrStat=8000; + pKBus->ErrStat=7100; } } return 0; } - - int KBusCheckPacket(stKBusDef * pKBus, pKBPacket p1, int nLen1) { @@ -384,7 +664,11 @@ if (p3->Sign != KBStartSign) { - Uart2Stat.NotPacketErr++; +// pKBus->NotPacketErr++; + KMem.WDB[0x40]=pKBus->nCurPollId; + KMem.WDB[0x41]=nLen1; + memcpy(&KMem.WDB[0x42],p1,nLen1); + pKBus->KBusChnStats[pKBus->nCurPollId].NotPkgErr++; if (pKBus->KBusDiagnosis) { if (pKBus->KBusSnapPos == 0) { @@ -407,7 +691,7 @@ int DataLen=p3->DataLen; if (DataLen>KBMaxPacketLength) { - Uart2Stat.LengthErr++; +// Uart2Stat.LengthErr++; pKBus->KBusChnStats[pKBus->nCurPollId].PkgLenErr++; return -1; } @@ -416,7 +700,7 @@ //len4=sprintf(str3,"%d < %d + %d \r\n",len2,DataLen,sizeof(stKBPacket)); //PutStr(str3,len4); pKBus->KBusChnStats[pKBus->nCurPollId].PkgLenErr++; - Uart2Stat.LengthErr++; +// Uart2Stat.LengthErr++; return -3; //not long enough } // if (p3->data[DataLen+1] != EndSign) @@ -428,7 +712,7 @@ unsigned char thisBCC=KBusBCC(p1,sizeof(stKBPacket)+DataLen-1); if (thisBCC != p3->data[DataLen]) {//BCC Error; - Uart2Stat.BCCerr++; +// Uart2Stat.BCCerr++; pKBus->KBusChnStats[pKBus->nCurPollId].BCCErr++; return -4; } @@ -447,14 +731,14 @@ if (p3->Sign != KBStartSign) { - Uart2Stat.NotPacketErr++; +// Uart2Stat.NotPacketErr++; pKBus->KBusChnStats[0].ClientNotPktErr++; return -1; } int DataLen=p3->DataLen; if (DataLen>KBMaxPacketLength) { - Uart2Stat.LengthErr++; +// Uart2Stat.LengthErr++; pKBus->KBusChnStats[0].ClientPkgLenErr++; return -1; } @@ -463,7 +747,7 @@ //len4=sprintf(str3,"%d < %d + %d \r\n",len2,DataLen,sizeof(stKBPacket)); //PutStr(str3,len4); pKBus->KBusChnStats[0].ClientPkgLenErr++; - Uart2Stat.LengthErr++; +// Uart2Stat.LengthErr++; return -3; //not long enough } // if (p3->data[DataLen+1] != EndSign) @@ -475,7 +759,7 @@ unsigned char thisBCC=KBusBCC(p1,sizeof(stKBPacket)+DataLen-1); if (thisBCC != p3->data[DataLen]) {//BCC Error; - Uart2Stat.BCCerr++; +// Uart2Stat.BCCerr++; pKBus->KBusChnStats[0].ClientBccErr++; return -4; } @@ -499,7 +783,8 @@ //LL_GPIO_TogglePin(GPIOA,LL_GPIO_PIN_6); int nCurPollId = pKBus->nCurPollId; int ChildId=p1->SrcAddr; - int ThisuS = GetuS(); +// int ThisuS = GetuS(); + int ThisTick = GetTick(); unsigned char nIndex; switch (p1->nCMD) { @@ -508,8 +793,8 @@ break; case cmdQueryRply: DataLen=sizeof(stDeviceInfo); - KBusUpdateChildInfo(pKBus,pKBus->nCurPollId,(stDeviceInfo *)&p1->data[0]); - pKBus->KBusChnStats[0].ClientSendPkts++; + KBusUpdateChildInfo(pKBus,nCurPollId,(stDeviceInfo *)&p1->data[0]); + pKBus->KBusChnStats[nCurPollId].ClientSendPkts++; break; case cmdSetCfgRply: break; @@ -527,16 +812,16 @@ case cmdPing: break; case cmdPingReply: - pKBus->DelayuS=ThisuS-pKBus->SendTimeuS; - if (pKBus->DelayuS > pKBus->nMaxDelayuS) pKBus->nMaxDelayuS = pKBus->DelayuS; + pKBus->DelayTick = ThisTick - pKBus->SendTimeTick; + if (pKBus->DelayTick > pKBus->nMaxDelayTick) pKBus->nMaxDelayTick = pKBus->DelayTick; KBusMem.WLXB[ChildId]=p1->data[0]; //RunStat=100; - pKBus->KBusChnStats[pKBus->nCurPollId].CtnLstPkts=0; - pKBus->KBusChnStats[pKBus->nCurPollId].Delay=pKBus->DelayuS; - if (pKBus->DelayuS > pKBus->KBusChnStats[pKBus->nCurPollId].MaxDelay) - pKBus->KBusChnStats[pKBus->nCurPollId].MaxDelay=pKBus->DelayuS; + pKBus->KBusChnStats[nCurPollId].CtnLstPkts=0; + pKBus->KBusChnStats[nCurPollId].Delay=pKBus->DelayTick; + if (pKBus->DelayTick > pKBus->KBusChnStats[nCurPollId].MaxDelay) + pKBus->KBusChnStats[nCurPollId].MaxDelay=pKBus->DelayTick; //PutOutput(outputvalue); pKBus->bMasterRecvOK=1; break; @@ -557,25 +842,26 @@ break; case cmdExChgDataReply: - pKBus->DelayuS=ThisuS-pKBus->SendTimeuS; - if (pKBus->DelayuS > pKBus->nMaxDelayuS) pKBus->nMaxDelayuS = pKBus->DelayuS; - - KBusMem.WLXB[ChildId-1]=p1->data[0];; - KBusMem.WLXB[ChildId ]=p1->data[1]; - KBusMem.WLXB[ChildId+1]=p1->data[2]; - KBusMem.WLXB[ChildId+2]=p1->data[3];; - KBusMem.WLXB[ChildId+3]=p1->data[4]; - KBusMem.WLXB[ChildId+4]=p1->data[5]; - KBusMem.WLXB[ChildId+5]=p1->data[6]; - KBusMem.WLXB[ChildId+6]=p1->data[7]; - + pKBus->DelayTick = ThisTick - pKBus->SendTimeTick; + if (pKBus->DelayTick > pKBus->nMaxDelayTick) pKBus->nMaxDelayTick = pKBus->DelayTick; + KBusMem.WLXB[ChildId - 1 ]=p1->data[0]; + for (int i=1; i*8 < pKBus->DeviceInfos[ChildId].InBitCount;i++){ + KBusMem.WLXB[ChildId - 1 + i]=p1->data[0 + i];; + } +// KBusMem.WLXB[ChildId+0]=p1->data[1]; +// KBusMem.WLXB[ChildId+1]=p1->data[2]; +// KBusMem.WLXB[ChildId+2]=p1->data[3];; +// KBusMem.WLXB[ChildId+3]=p1->data[4]; +// KBusMem.WLXB[ChildId+4]=p1->data[5]; +// KBusMem.WLXB[ChildId+5]=p1->data[6]; +// KBusMem.WLXB[ChildId+6]=p1->data[7]; //Call Back if (pKBus->KBusEvCBFunc) pKBus->KBusEvCBFunc(pKBus, KBusEvDataUpdate,0,0); //RunStat=100; pKBus->KBusChnStats[nCurPollId].CtnLstPkts=0; - pKBus->KBusChnStats[nCurPollId].Delay=pKBus->DelayuS; - if (pKBus->DelayuS > pKBus->KBusChnStats[nCurPollId].MaxDelay) - pKBus->KBusChnStats[nCurPollId].MaxDelay=pKBus->DelayuS; + pKBus->KBusChnStats[nCurPollId].Delay=pKBus->DelayTick; + if (pKBus->DelayTick > pKBus->KBusChnStats[nCurPollId].MaxDelay) + pKBus->KBusChnStats[nCurPollId].MaxDelay=pKBus->DelayTick; //PutOutput(outputvalue); if (DataLen>=14) { @@ -585,7 +871,10 @@ pKBus->bMasterRecvOK=1; break; - + case cmdRemoteReqReply: + pKBus->bReq = 2; + + break; default: break; } @@ -606,8 +895,9 @@ Len1--; } - Uart2Stat.OKPacket++; - int DataLen=p1->DataLen; +// Uart2Stat.OKPacket++; + unsigned short Addr; + unsigned short DataLen=p1->DataLen; //int nSrcAddr=p1->SrcAddr; int nDstHost=p1->DstHost; @@ -615,7 +905,7 @@ // KBusSlaveRecved=1; pKBPacket p2=(pKBPacket)pKBus->PacketBuf2; - + void * pData = 0; int PacketLen=0; unsigned char nIndex;// = p1->nStatus & 0x07; if (nDstHost!=pKBus->nStationId && nDstHost != 0xff) @@ -623,10 +913,90 @@ pKBus->KBusChnStats[0].ClientMisIdPkts++; return -1; } - int ThisuS = GetuS(); - if (nDstHost==pKBus->nStationId || nDstHost==0xff) +// int ThisuS = GetuS(); + int ThisTick = GetTick(); + if (nDstHost==0xff){ + pKBus->RecvTimeTick=ThisTick; + pKBus->bSlaveRecved=1; + switch (p1->nCMD) + { + case cmdNone: + break; + case cmdBroadCastCfg: + + break; + case cmdMuExchgData: + + break; + case cmdToSafeMode: + + break; + case cmdHeartBeat: + break; + case cmdSyncRead: + break; + case cmdSyncWrite: + break; + case cmdSequenRead: + break; + case cmdSyncTime: + pKBus->nSlaveTick=p1->data[0]+(p1->data[1]<<8)+(p1->data[2]<<16)+(p1->data[3]<<24); + if (pKBus->KBusEvCBFunc) pKBus->KBusEvCBFunc(pKBus, KBusEvTimeSync,0,0); + break; + case cmdRemoteReq: //收到Remote请求 +// KBusSlaveRunRemoteReq(pKBus,p1->data[0],p1->data, DataLen); + // data[0] -> reqSvr; + // data[1] -> param; + switch (p1->data[0]) { + case ReqBlinkLED: + case ReqTransBlink: + KMRunStat.bLEDFlick=p1->data[1]; + DataLen = 0; + PacketLen=KBusMakePacket(p2,pKBus->nStationId,0,cmdRemoteReqReply,p1->nStatus,DataLen,p1->data); + pKBus->KBusSendPacket((uchar *)p2, PacketLen); + break; + case ReqUpdateFirm: //37个字节 + DataLen = 0; + PacketLen=KBusMakePacket(p2,pKBus->nStationId,0,cmdRemoteReqReply,p1->nStatus,DataLen,p1->data); + pKBus->KBusSendPacket((uchar *)p2, PacketLen); + pData = &p1->data[5]; + Addr = p1->data[2] + (p1->data[3] <<8); + DataLen = p1->data[4] ; + KMRunService(p1->data[0],Addr,0,&pData,&DataLen); + DataLen=0; + break; + case ReqUpdateFirmInfo: + DataLen = 0; + PacketLen=KBusMakePacket(p2,pKBus->nStationId,0,cmdRemoteReqReply,p1->nStatus,DataLen,p1->data); + pKBus->KBusSendPacket((uchar *)p2, PacketLen); + pData = &p1->data[5]; + Addr = p1->data[2] + (p1->data[3] <<8); + DataLen = p1->data[4] ; + KMRunService(p1->data[0],Addr,0,&pData,&DataLen); + DataLen=0; + break; + default: + pData = &p1->data[5]; + Addr = p1->data[2] + (p1->data[3] <<8); + DataLen = p1->data[4] ; + KMRunService(p1->data[0],p1->data[1],0,&pData,&DataLen); + DataLen = 0; + PacketLen=KBusMakePacket(p2,pKBus->nStationId,0,cmdRemoteReqReply,p1->nStatus,DataLen,p1->data); + pKBus->KBusSendPacket((uchar *)p2, PacketLen); + DataLen=0; + + break; + } + break; + default: + break; + } + + } + + if (nDstHost==pKBus->nStationId) { - pKBus->RecvTimeuS=ThisuS; + pKBus->RecvTimeTick=ThisTick; pKBus->bSlaveRecved=1; switch (p1->nCMD) { @@ -656,7 +1026,7 @@ //PutOutput(outputvalue); //memcpy(DispBuf,p1->data+2,8); p1->data[0]=KBusMem.WLXB[0]; - pKBus->RecvTimeuS=ThisuS; + //pKBus->RecvTimeuS=ThisuS; PacketLen=KBusMakePacket(p2,pKBus->nStationId,0,cmdPingReply,p1->nStatus,DataLen,p1->data); pKBus->KBusChnStats[0].ClientSendPkts++; pKBus->KBusSendPacket((uchar *)p2, PacketLen); @@ -685,7 +1055,7 @@ KBusMem.WLYB[2]=p1->data[2]; KBusMem.WLYB[3]=p1->data[3]; - pKBus->nSlaveTick=p1->data[4]+(p1->data[5]<<8);//+(p1->data[6]<<16)+(p1->data[7]<<24); + // pKBus->nSlaveTick=p1->data[4]+(p1->data[5]<<8);//+(p1->data[6]<<16)+(p1->data[7]<<24); if (pKBus->KBusEvCBFunc) pKBus->KBusEvCBFunc(pKBus, KBusEvTimeSync,0,0); @@ -711,7 +1081,7 @@ if (pKBus->nClientDataIndex >= 10) { pKBus->nClientDataIndex=0;} unStatus nStatus; nStatus.nStatus = p1->nStatus; - if (nStatus.nErr1) { pKBus->ErrStat=8000;} + if (nStatus.nErr1) { pKBus->ErrStat=8100;} PacketLen=KBusMakePacket(p2,pKBus->nStationId,0,cmdExChgDataReply,p1->nStatus,DataLen,p1->data); pKBus->KBusChnStats[0].ClientSendPkts++; pKBus->KBusSendPacket((uchar *)p2, PacketLen); @@ -727,13 +1097,72 @@ case cmdSequenRead: break; case cmdSyncTime: - pKBus->nSlaveTick=p1->data[0]+(p1->data[1]<<8)+(p1->data[2]<<16)+(p1->data[3]<<24); - if (pKBus->KBusEvCBFunc) pKBus->KBusEvCBFunc(pKBus, KBusEvTimeSync,0,0); break; + + case cmdRemoteReq: //收到Remote请求 +// KBusSlaveRunRemoteReq(pKBus,p1->data[0],p1->data, DataLen); + // data[0] -> reqSvr; + // data[1] -> param; + switch (p1->data[0]) { + case ReqBlinkLED: + case ReqTransBlink: + KMRunStat.bLEDFlick=p1->data[1]; + DataLen = 0; + PacketLen=KBusMakePacket(p2,pKBus->nStationId,0,cmdRemoteReqReply,p1->nStatus,DataLen,p1->data); + pKBus->KBusSendPacket((uchar *)p2, PacketLen); + break; + case ReqUpdateFirm: //37个字节 + DataLen = 0; + PacketLen=KBusMakePacket(p2,pKBus->nStationId,0,cmdRemoteReqReply,p1->nStatus,DataLen,p1->data); + pKBus->KBusSendPacket((uchar *)p2, PacketLen); + pData = &p1->data[5]; + Addr = p1->data[2] + (p1->data[3] <<8); + DataLen = p1->data[4] ; + KMRunService(p1->data[0],Addr,0,&pData,&DataLen); + DataLen=0; + break; + case ReqUpdateFirmInfo: + DataLen = 0; + PacketLen=KBusMakePacket(p2,pKBus->nStationId,0,cmdRemoteReqReply,p1->nStatus,DataLen,p1->data); + pKBus->KBusSendPacket((uchar *)p2, PacketLen); + pData = &p1->data[5]; + Addr = p1->data[2] + (p1->data[3] <<8); + DataLen = p1->data[4] ; + KMRunService(p1->data[0],Addr,0,&pData,&DataLen); + DataLen=0; + break; + default: + pData = &p1->data[5]; + Addr = p1->data[2] + (p1->data[3] <<8); + DataLen = p1->data[4] ; + KMRunService(p1->data[0],p1->data[1],0,&pData,&DataLen); + DataLen = 0; + PacketLen=KBusMakePacket(p2,pKBus->nStationId,0,cmdRemoteReqReply,p1->nStatus,DataLen,p1->data); + pKBus->KBusSendPacket((uchar *)p2, PacketLen); + DataLen=0; + + break; + } + break; + default: break; } } + return 0; +} + +int KBusSlaveRunRemoteReq(stKBusDef * pKBus, int nReqSvrId, unsigned char * pData , int Len1) +{ + int PacketLen; + switch (nReqSvrId) { + case ReqTransBlink: + KMRunStat.bLEDFlick=5; + // PacketLen=KBusMakePacket(pKBus->PacketBuf2,pKBus->nStationId,0,cmdRemoteReq,p1->nStatus,DataLen,p1->data); + break; + default: + break; + } return 0; } @@ -754,6 +1183,7 @@ Result=KBusCheckPacket(pKBus, p1, Len1); if (Result != S_OK) { + return Result; } pKBus->bMasterRecvOK=1; diff --git a/ComLib/Src/KLink.c b/ComLib/Src/KLink.c index 39e0465..5b9381a 100644 --- a/ComLib/Src/KLink.c +++ b/ComLib/Src/KLink.c @@ -16,7 +16,7 @@ #endif //extern stWLRunStat KwRunStat; -unsigned char KLPacketBuf1[256]; +//unsigned char KLPacketBuf1[256]; unsigned char KLPacketBuf2[256]; unsigned char KLBufferIn[16]={0}; @@ -30,6 +30,14 @@ int KLThisuS=0; int KLRecvTimeuS=0; +stPortDef KLinkPortReg1 = {.nPortHardType = 3,.nPortUseType = 2, .bEnable = 1, .bRunning =1, .StationId = 1, .bMaster = 0}; + +int KLinkInit(int n) +{ + + KMRegisterPort(0,&KLinkPortReg1); + return 0; +} unsigned char KLBCC(void const * pData, int nSize) { unsigned char k; @@ -149,6 +157,7 @@ unsigned short nByteAddr=0; unsigned short nBitAddr=0; unsigned short DataLen=0; //p1->LoadLen; + unsigned short nValue=0; //int nSrcAddr=p1->SrcAddr; nKLStatus.nSEQ = ((pKLStat)(&(p1->Stat)))->nSEQ;; @@ -221,8 +230,10 @@ else if (nDataType == KLDataTypeWR) { pData=KMem.WR+nWordAddr; } else if (nDataType == KLDataTypeWLX) { pData=KMem.WLX+nWordAddr; } else if (nDataType == KLDataTypeWLY) { pData=KMem.WLY+nWordAddr; } - else if (nDataType == KLDataTypeSV) { pData=KMem.SV+nWordAddr; } - else if (nDataType == KLDataTypeEV) { pData=KMem.EV+nWordAddr; } +#if (ENABLE_PLC) + else if (nDataType == KLDataTypeSV) { pData=PLCMem.SV+nWordAddr; } + else if (nDataType == KLDataTypeEV) { pData=PLCMem.EV+nWordAddr; } +#endif else if (nDataType == KLDataTypeTest) { pData=KMem.SDT+nWordAddr; } else if (nDataType == KLDataTypeWDT) { pData=KMem.WDT+nWordAddr; } else if (nDataType == KLDataTypeKBD) { pData=(unsigned short *)&KBus1.KBusChnStats +nWordAddr; } @@ -254,8 +265,10 @@ else if (nDataType == KLDataTypeWR) { pData=KMem.WR+nWordAddr; } else if (nDataType == KLDataTypeWLX) { pData=KMem.WLX+nWordAddr; } else if (nDataType == KLDataTypeWLY) { pData=KMem.WLY+nWordAddr; } - else if (nDataType == KLDataTypeSV) { pData=KMem.SV+nWordAddr; DataLen=0;} - else if (nDataType == KLDataTypeEV) { pData=KMem.EV+nWordAddr; DataLen=0;} +#if (ENABLE_PLC) + else if (nDataType == KLDataTypeSV) { pData=PLCMem.SV+nWordAddr; DataLen=0;} + else if (nDataType == KLDataTypeEV) { pData=PLCMem.EV+nWordAddr; DataLen=0;} +#endif else if (nDataType == KLDataTypeTest) { pData=KMem.SDT+nWordAddr; DataLen=0;} else if (nDataType == KLDataTypeWDT) { pData=KMem.WDT+nWordAddr; DataLen=0;} else if (nDataType == KLDataTypeKBD) { pData=(unsigned short *)KBus1.KBusChnStats +nWordAddr; DataLen=0;} @@ -281,8 +294,10 @@ else if (nDataType == KLCoilTypeR) { rData[0] = ((KMem.WR[nBitAddr>>4]&(1<<(nBitAddr&0x0f)))>0);} else if (nDataType == KLCoilTypeLX) { rData[0] = ((KMem.WLX[nBitAddr>>4]&(1<<(nBitAddr&0x0f)))>0);} else if (nDataType == KLCoilTypeLY) { rData[0] = ((KMem.WLY[nBitAddr>>4]&(1<<(nBitAddr&0x0f)))>0);} - else if (nDataType == KLCoilTypeT) { rData[0] = KMem.Timers[nBitAddr].bTon;} - else if (nDataType == KLCoilTypeC) { rData[0] = KMem.Timers[nBitAddr].bTon;} +#if (ENABLE_PLC) + else if (nDataType == KLCoilTypeT) { rData[0] = PLCMem.Timers[nBitAddr].bTon;} + else if (nDataType == KLCoilTypeC) { rData[0] = PLCMem.Timers[nBitAddr].bTon;} +#endif else if (nDataType == KLCoilTypeSR) {rData[0] = ((KMem.WSR[nBitAddr>>4]&(1<<(nBitAddr&0x0f)))>0);} else if (nDataType == KLCoilTypeLR) { rData[0] = 0;} @@ -297,9 +312,10 @@ else if (nDataType == KLCoilTypeR) { SetBitValue( &KMem.WR[nBitAddr>>4],nBitAddr&0x0f,p1->Params[2]);} else if (nDataType == KLCoilTypeLX) {SetBitValue( &KMem.WLX[nBitAddr>>4],nBitAddr&0x0f,p1->Params[2]);} else if (nDataType == KLCoilTypeLY) {SetBitValue( &KMem.WLY[nBitAddr>>4],nBitAddr&0x0f,p1->Params[2]);} - else if (nDataType == KLCoilTypeT) { KMem.Timers[nBitAddr].bTon = p1->Params[2];} - else if (nDataType == KLCoilTypeC) { KMem.Timers[nBitAddr].bTon = p1->Params[2];} - else if (nDataType == KLCoilTypeC) { KMem.Timers[nBitAddr].bTon = p1->Params[2];} +#if (ENABLE_PLC) + else if (nDataType == KLCoilTypeT) { PLCMem.Timers[nBitAddr].bTon = p1->Params[2];} + else if (nDataType == KLCoilTypeC) { PLCMem.Timers[nBitAddr].bTon = p1->Params[2];} +#endif else if (nDataType == KLCoilTypeLR) { SetBitValue( &KMem.WSR[nBitAddr>>4],nBitAddr&0x0f,p1->Params[2]);;} else {rData[0]=0;} DataLen=0; @@ -309,6 +325,12 @@ case KLCmdReadBits: break; case KLCmdWriteBits: + break; +#if (ENABLE_PLC) + case KLCmdGetMode: + rData[0]= PLCMem.bPLCRunning; + PacketLen=KLMakeRplyPacket(p2,nDstHost,nKLStatus.StatByte,p1->nCMD,1,rData); + SendPacket(nChn, p2, PacketLen); break; case KLCmdChgMode: if (nDataType ==0) {StopPLC();} @@ -320,56 +342,75 @@ nWordAddr=p1->Params[0]+ (p1->Params[1]<<8); DataLen= p1->Params[2]; if (nDataType==0){ - pData = (unsigned short *)STORE_PRG_BASE + nWordAddr; + pData = (unsigned short *)(&((stStoredBinProgs *)STORE_PRG_BASE)->BinInstrcns) + nWordAddr; } else if (nDataType==1){ - pData = (unsigned short *)ALT_PRG_BASE + nWordAddr; + pData = (unsigned short *)(&((stStoredBinProgs *)ALT_PRG_BASE)->BinInstrcns) + nWordAddr; } else if (KMRunStat.nBinProgBank == 0) { - pData = (unsigned short *)STORE_PRG_BASE + nWordAddr; + pData = (unsigned short *)(&((stStoredBinProgs *)STORE_PRG_BASE)->BinInstrcns) + nWordAddr; }else { - pData = (unsigned short *)ALT_PRG_BASE + nWordAddr; + pData = (unsigned short *)(&((stStoredBinProgs *)ALT_PRG_BASE)->BinInstrcns) + nWordAddr; } PacketLen=KLMakeRplyPacket(p2,nDstHost,nKLStatus.StatByte,p1->nCMD,DataLen,pData); SendPacket(nChn, p2, PacketLen); break; case KLCmdStartPLCProgram: - DataLen=nDataType; -// KLBufferIn[0]=p1->Params[0]; -// p1->Params[0]=KLBufferOut[0]; - if (PLCMem.bPLCRunning) PLCMem.bPLCRunning=0; - + DataLen=p1->Params[0] + (p1->Params[1] <<8); //Program Size + nValue = p1->Params[2] + (p1->Params[3] <<8); // CRC + //if (PLCMem.bPLCRunning) StopPLC(); + StartPLCProgram(nDataType, DataLen, nValue); PacketLen=KLMakeRplyPacket(p2,nDstHost,nKLStatus.StatByte,KLCmdStartPLCProgram,0,0); SendPacket(nChn, p2, PacketLen); - + break; case KLCmdWritePLCProgram: if (PLCMem.bPLCRunning) PLCMem.bPLCRunning=0; nWordAddr=p1->Params[0]+ (p1->Params[1]<<8); DataLen= p1->Params[2]; - - //DataLen=16; - for (int i=0;i<DataLen;i++) - {KLPacketBuf2[i]=p1->Params[4+i];} - WriteProgram(nWordAddr, KLPacketBuf2, DataLen,nDataType); + WritePLCProgram(nDataType, nWordAddr, &p1->Params[4], DataLen); DataLen=4; - *((int *)(&rData[0]))=(long)(p1->Params+4); +// *((int *)(&rData[0]))=(long)(p1->Params+4); PacketLen=KLMakeRplyPacket(p2,nDstHost,nKLStatus.StatByte,KLCmdWritePLCProgram,0,0); SendPacket(nChn, p2, PacketLen); break; case KLCmdFinishPLCProgram: - nWordAddr=p1->Params[0]+ (p1->Params[1]<<8); //Program Size; - DataLen=nDataType; - KMRunStat.nBinProgSize=nWordAddr; - if (KMRunStat.nBinProgBank ==0) {KMRunStat.nBinProgBank=1;} - else {KMRunStat.nBinProgBank=0;} - SaveRunStat(&KMRunStat); - //PLCMem.bPLCRunning=1; -// KLBufferIn[0]=p1->Params[0]; -// p1->Params[0]=KLBufferOut[0]; + DataLen=p1->Params[0]+ (p1->Params[1]<<8); //Program Size; + nValue = p1->Params[2] + (p1->Params[3] <<8); //CRC + FinishiPLCProgram(nDataType, DataLen, nValue); PacketLen=KLMakeRplyPacket(p2,nDstHost,nKLStatus.StatByte,KLCmdFinishPLCProgram,0,0); SendPacket(nChn, p2, PacketLen); break; - + case KLCmdReadPLCAnno: + nByteAddr=p1->Params[0]+ (p1->Params[1]<<8); + DataLen= p1->Params[2]; + pData = ((stStoredAnno *)STORE_PLC_ANNO_BASE)->Annos + nByteAddr; + PacketLen=KLMakeRplyPacket(p2,nDstHost,nKLStatus.StatByte,p1->nCMD,DataLen,pData); + SendPacket(nChn, p2, PacketLen); + break; + case KLCmdStartPLCAnno: + nWordAddr=p1->Params[0]+ (p1->Params[1]<<8); + DataLen= p1->Params[2]; + StartPLCAnno(nDataType, DataLen, nValue); + DataLen=4; +// *((int *)(&rData[0]))=(long)(p1->Params+4); + PacketLen=KLMakeRplyPacket(p2,nDstHost,nKLStatus.StatByte,KLCmdStartPLCAnno,0,0); + SendPacket(nChn, p2, PacketLen); + break; + case KLCmdWritePLCAnno: + nByteAddr=p1->Params[0]+ (p1->Params[1]<<8); ; + DataLen = p1->Params[2]; //CRC + WritePLCAnno(nDataType, nByteAddr, &p1->Params[4], DataLen); + PacketLen=KLMakeRplyPacket(p2,nDstHost,nKLStatus.StatByte,KLCmdWritePLCAnno,0,0); + SendPacket(nChn, p2, PacketLen); + break; + case KLCmdFinishPLCAnno: + DataLen=p1->Params[0]+ (p1->Params[1]<<8); //Program Size; + nValue = p1->Params[2] + (p1->Params[3] <<8); //CRC + FinishiPLCAnno(nDataType, DataLen, nValue); + PacketLen=KLMakeRplyPacket(p2,nDstHost,nKLStatus.StatByte,KLCmdFinishPLCAnno,0,0); + SendPacket(nChn, p2, PacketLen); + break; +#endif // ENABLE_PLC case KLCmdBlinkLED: DataLen=nDataType; KMRunStat.bLEDFlick=DataLen; @@ -453,14 +494,17 @@ PacketLen=KLMakeRplyPacket(p2,nDstHost,nKLStatus.StatByte,KLCmdClearEventLog,0,0); SendPacket(nChn, p2, PacketLen); - __set_PRIMASK(1); //关闭全局中断 - NVIC_SystemReset(); + KMRunService(ReqReset,0,0,0,0); break; case KLCmdWriteFirmware: nByteAddr=p1->Params[0]+ (p1->Params[1]<<8); //pData=(UCHAR *)(&storedKMSysCfg.theKMSysCfg)+nByteAddr; DataLen = p1->Params[2]; - res = WriteNewApp(nByteAddr,p1->Params+4,DataLen); + pData = p1->Params + 4 ; + res = KMRunService(ReqUpdateFirm,nByteAddr,0,&pData,&DataLen); + +// res = WriteNewApp(nByteAddr,p1->Params+4,DataLen); +// res = 0; if (res) { PacketLen=KLMakeRplyPacket(p2,nKLStationId,nKLStatus.StatByte,KLCmdErrRply,res,rData); }else { @@ -468,14 +512,66 @@ } SendPacket(nChn, p2, PacketLen); + break; case KLCmdWriteFirmInfo: nByteAddr=p1->Params[0]+ (p1->Params[1]<<8); //pData=(UCHAR *)(&storedKMSysCfg.theKMSysCfg)+nByteAddr; DataLen = p1->Params[2]; + pData = p1->Params + 4 ; + res = KMRunService(ReqUpdateFirmInfo,nByteAddr,0,&pData,&DataLen); PacketLen=KLMakeRplyPacket(p2,nDstHost,nKLStatus.StatByte,p1->nCMD,0,0); SendPacket(nChn, p2, PacketLen); - WriteNewAppInfo(nByteAddr,p1->Params+4,DataLen); +// WriteNewAppInfo(nByteAddr,p1->Params+4,DataLen); + break; + case KLCmdGetPortInfo: + + nByteAddr=p1->Params[0] + (p1->Params[1]<<8); + //pData=(UCHAR *)(&storedKMSysCfg.theKMSysCfg)+nByteAddr; + pData = KMem.pPorts[nDataType]; + DataLen = sizeof(stPortDef); + PacketLen=KLMakeRplyPacket(p2,nDstHost,nKLStatus.StatByte,p1->nCMD,DataLen,pData); + SendPacket(nChn, p2, PacketLen); + break; + case KLCmdGetPortChnInfo: + + nByteAddr=p1->Params[0] + (p1->Params[1]<<8); + // nDataType --> port + // nByteAddr --> ChildId + //pData=(UCHAR *)(&storedKMSysCfg.theKMSysCfg)+nByteAddr; + KMPortReqFunc(nDataType,ReqPortChnInfo,nByteAddr,0,&pData,&DataLen); + + PacketLen=KLMakeRplyPacket(p2,nDstHost,nKLStatus.StatByte,p1->nCMD,DataLen,pData); + SendPacket(nChn, p2, PacketLen); + break; + + case KLCmdGetPortChildInfo: + nByteAddr=p1->Params[0] + (p1->Params[1]<<8); + // nDataType --> port + // nByteAddr --> ChildId + //pData=(UCHAR *)(&storedKMSysCfg.theKMSysCfg)+nByteAddr; + KMPortReqFunc(nDataType,ReqPortChildInfo,nByteAddr,0,&pData,&DataLen); + + //DataLen = sizeof(stPortDef); + PacketLen=KLMakeRplyPacket(p2,nDstHost,nKLStatus.StatByte,p1->nCMD,DataLen,pData); + SendPacket(nChn, p2, PacketLen); + break; + + case KLCmdPortRemoteReq: // 远程服务请求 + //p1->nType1 -> ReqId; + //p1->Params[0] -> Port; + //p1->Params[1] -> Child; + //p1->params[2] -> Param; + //p1->params[3] -> nAddr % 256; + //p1->params[4] -> nAddr / 256; + //p1->params[5] -> nCount; + pData = &p1->Params[3]; + DataLen = p1->Params[5]+3; + + KMPortReqFunc(p1->Params[0],nDataType,p1->Params[1],p1->Params[2],&pData,&DataLen); + DataLen=0; + PacketLen=KLMakeRplyPacket(p2,nDstHost,nKLStatus.StatByte,p1->nCMD,DataLen,pData); + SendPacket(nChn, p2, PacketLen); break; default: //DataLen=1; diff --git a/ComLib/Src/KMachine.c b/ComLib/Src/KMachine.c index 6373b23..54c8235 100644 --- a/ComLib/Src/KMachine.c +++ b/ComLib/Src/KMachine.c @@ -11,6 +11,7 @@ #include "Globaldef.h" #include "stm32f0xx.h" #include "stm32f0xx_ll_flash.h" +#include "PLCFunctions.h" //#include "stm32f0xx_hal.h" @@ -23,19 +24,22 @@ //#define FLASH_BANK1_END ((uint32_t)0x0800FFFFU) /*!< FLASH END address of bank1 */ #define ApplicationAddress 0x08001000 //应用程序首地址定义 #if defined(STM32F030x8) -#define NewAppInfoBlockAddress 0x08008000 // 存储的新应用程序信息块的地址 -#define NewAppAddress ((uint32_t)0x08009000U) // 存储的新应用程序的地址 +#define NEW_APP_INFOBLOCK_ADDR 0x08008000 // 存储的新应用程序信息块的地址 +#define NEW_APP_ADDR ((uint32_t)0x08009000U) // 存储的新应用程序的地址 #endif /* STM32F030x6 || STM32F030x8 || STM32F031x6 || STM32F051x8 || STM32F042x6 || STM32F048xx || STM32F058xx || STM32F070x6 */ #if defined(STM32F030xC) -#define NewAppInfoBlockAddress 0x08020000 // 存储的新应用程序信息块的地址 -#define NewAppAddress ((uint32_t)0x08021000U) // 存储的新应用程序的地址 +#define NEW_APP_INFOBLOCK_ADDR 0x08020000 // 存储的新应用程序信息块的地址 +#define NEW_APP_ADDR ((uint32_t)0x08021000U) // 存储的新应用程序的地址 #endif /* STM32F071xB || STM32F072xB || STM32F078xx || STM32F091xC || STM32F098xx || STM32F030xC */ stStoredKMSysCfg storedKMSysCfg ; stKMem KMem; stRunStat KMRunStat; + + +extern void SetErrLed(uchar bOn); //uint8_t * pFlash1 = (uint8_t *)(STORECFGBASE); @@ -44,34 +48,7 @@ //uint16_t FlashDatas[16]; //uint32_t * pUID = (uint32_t *)(UID_BASE); -const stKMInfoBlock KMInfoBlock = -{ -// sizeof(stKMInfoBlock), - (BOARD_TYPE<<8) + BOARD_VER, //nDeviceType BOARD_VER, //nDevieVer - 0x0109, //ProgVer - 0x0102, //KLinkVer - KBUS_VER, //KBusVer -// 0x0100, //KNetVer -// 0x0100, //KWLVer - - 4, //nCapacity1 ?K - 1, //nCapacity2 ?k - - DINPUT, //nDInput; - DOUTPUT, //nDOutput - - 0, //nAInput - 0, //nAOutput - 0, //nHInput - 0, //nHOutput - 0, //nExt1; - 0, //nExt2; - 0, //nLogSize; - 0, //nPorts; - 0, //nManSize; - 0, //nAbility; - 6, //nSwitchBits; -}; + /* const char VersionStr[] __attribute__((at(FLASH_BASE + 0X2000))) //__attribute__((at(0X8001000))) = "3.00"; @@ -84,19 +61,19 @@ CFG_VER, 0x0000, //workmode 0x0000, //switchfunc - 0x0000, //pad1; + 4, //nCfgBlockCount; { //comportparam[2] { PortType_KLink, //PorttType 1, //Station - 2304, //Buadrate = * 100; - 0, //ByteSize + 1152, //Buadrate = * 100; + 1, //ByteSize 0, //Parity 0, //StopBits - 0, //endType + 1, //endType 0, //EofChar 0, //SofChar - 0, //endtime + 9, //endtime 0, //recvbuf 0, //bufsize }, @@ -104,13 +81,13 @@ PortType_KBus, //PorttType 0, //Station 2304, //Buadrate = * 100; - 0, //ByteSize + 1, //ByteSize 0, //Parity 0, //StopBits - 0, //endType + 1, //endType 0, //EofChar 0, //SofChar - 0, //endtime + 1, //endtime 0, //recvbuf 0, //bufsize } @@ -123,22 +100,146 @@ 0x0030, 0x0040, 0x0050, - 0x0060 + 0x0060, + 0x0070, + 0x0080, }, - 0x0003, //padding s - 0x0004, - 0x0005, - 0x0006, - 0x0007, - 0x0008, + 0,0,0,0, + { + {0,sizeof(stKMSysCfg)}, + {1,100}, + {2,100}, + {3,32}, + {4,32}, + }, + 0x0008, //padding s 0x0009, 0x000a, - 0x000b, - 0x000c, }, 0x0011, //CRC16 END_SIGN, }; + +int nEventCount=0; +int nEventMinIndex; +int nEventMaxIndex; +unsigned int nEventMaxSeq=0; +int nEventNextSpace; +int nMaxCurTime=0; +volatile int PowerState = 0; + +volatile int PowerDownEvent=0; +volatile int OldPowerDownEvent=0; +volatile int OldPowerDownEventTime=0; +int nMaxRunStatIndex=-1; +unsigned int nMaxRunStatSeq=0; +int nNextRunStatSpace=0; + +int KMRegisterPort(ushort nType,stPortDef * theParam) +{ + int curPortId = KMem.nTotalPorts; + + KMem.pPorts[curPortId] = theParam; + + KMem.nTotalPorts++; + return curPortId; +} + +int KMPortReqFunc(int nPortIndex,int nReqId, int nParam1, int nParam2, void ** pData, unsigned short * nlen1) +{ + if (KMem.pPorts[nPortIndex]->ReqCommFunc) + return KMem.pPorts[nPortIndex]->ReqCommFunc(KMem.pPorts[nPortIndex]->pInstance, nReqId, nParam1, nParam2, pData, nlen1); + else return -1; +} + +int KMRunService(int nSvrId, int nParam1, int nParam2, void **pData, unsigned short *nlen1) +{ + int res; + switch(nSvrId) + { + case ReqNone: + break; + + case ReqInit: + break; + case ReqReset: + __set_PRIMASK(1); //关闭全局中断 + NVIC_SystemReset(); + break; + case ReqStop: + break; + case ReqRun: + break; + case ReqBlinkLED: + break; + case ReqStartDiag: + break; + case ReqStopDiag: + break; + case ReqUpdateFirm: + + res = WriteNewApp(nParam1,*pData,*nlen1); + + break; + case ReqUpdateFirmInfo: + res = WriteNewAppInfo(nParam1,*pData,*nlen1); + break; + + default: + res = -1; + break; + + } + return res; +} + +int KMachineInit(void) +{ +// ClearEventLog(); + KMem.LastScanTime=0; + KMem.ScanTimeuS=0; + KMem.MinScanTimeuS=99999; + KMem.MaxScanTimeuS=0; + +// KMem.SDD[14]=(unsigned int)&KMStoreSysCfg; +// KMem.SDD[15]=(unsigned int)&KMStoreSysCfg1; + KMem.SDD[12]=((uint32_t *)UID_BASE)[0]; +// KMem.SDD[13]=((uint32_t *)UID_BASE)[1]; +// KMem.SDD[14]=((uint32_t *)UID_BASE)[2]; + KMem.SDD[13]=PendSvCount; + KMem.SDD[14]=RCC->CSR; +// KMem.SDD[15]=*(uint32_t *)FLASHSIZE_BASE; +// KMem.SDD[16]=(unsigned int)&KMSysCfg; + + KMem.nTotalPorts = 0; + CheckEventLog(); + LoadRunStat(&KMRunStat); + KMem.CurTimeSec=nMaxCurTime; + KMem.TotalRunTime=KMRunStat.UpTime; + KMRunStat.PowerCount++; + KMem.PwrOnCount=KMRunStat.PowerCount; + SaveRunStat(&KMRunStat); + KMem.SDD[15]=nMaxRunStatIndex; + KMem.SDD[16]=nMaxRunStatSeq; + KMem.SDD[17]=nNextRunStatSpace; + + + AddEventLog(KMem.CurTimeSec,EventTypePowerUp,1,12345); + KMem.SDD[19]=nEventCount; + KMem.SDD[20]=nEventMinIndex; + KMem.SDD[21]=nEventMaxIndex; + KMem.SDD[22]=nEventMaxSeq; + KMem.SDD[23]=nEventNextSpace; + + return 0; +} + +int KMachineLoopProc(void) +{ + + return 0; +} + //const stKMSysCfg KMDefaultSysCfg2[7] /*__attribute__((at(STORECFGBASE+sizeof(stKMSysCfg))))*/; @@ -155,6 +256,7 @@ } return nByteSize; } + int EraseFlashMem(void * pAddrFlash, unsigned int Pages) { ErrorStatus res; @@ -162,11 +264,13 @@ // uint32_t ErrNo; res = LL_Flash_PageErase(pAddrFlash,Pages); LL_FLASH_Lock(FLASH); - return 0; + return res; } + int WriteToFlashMemNoErase(void * pBuf, void * pAddrFlash, unsigned int nByteSize) { ErrorStatus res; + SetErrLed(1); res = LL_Flash_Unlock(); // __disable_irq(); ///* @@ -182,9 +286,11 @@ if (res == ERROR) return 1; return 0; } + int EraseAndWriteToFlashMem(void * pBuf, void * pAddrFlash, unsigned int nByteSize) { + SetErrLed(1); ErrorStatus res; res = LL_Flash_Unlock(); // __disable_irq(); @@ -207,6 +313,61 @@ return 0; } +/* 烧录Flash,并自动擦除,页起始和跨页时自动擦除 页面中部分不擦除 */ +int WriteToFlashAutoErase(void * pBuf, void * pAddrFlash, unsigned int nByteSize) +{ + SetErrLed(1); + ErrorStatus res; + res = LL_Flash_Unlock(); +// __disable_irq(); + + int StartPage = (int)pAddrFlash / FLASH_PAGE_SIZE; + int EndPage = ((int)pAddrFlash + nByteSize) / FLASH_PAGE_SIZE; + int StartOffset = (int)pAddrFlash & (FLASH_PAGE_SIZE-1); + + int NbPages = EndPage -StartPage + 1; + + if (StartOffset == 0) { // 从最开始 , 全部擦除,然后再存储. + res = LL_Flash_PageErase(pAddrFlash,NbPages); + for (int i=0;i<(nByteSize+1)/2;i++) + { + unsigned short value = ((uint8_t *)pBuf)[i*2] + (((uint8_t *)pBuf)[i*2 +1] << 8); + res = LL_FLASH_Program(ProgaraType_DATA16, (uint32_t)pAddrFlash + i*2, value); + if (res == ERROR) break; + } + }else if (NbPages > 1){ // 跨页存储 + // 先前面的部分 + int i; + for (i=0;i<(nByteSize+1)/2 && (((int)pAddrFlash + i*2) &(FLASH_PAGE_SIZE -1))!=0 ;i++) + { + unsigned short value = ((uint8_t *)pBuf)[i*2] + (((uint8_t *)pBuf)[i*2 +1] << 8); + res = LL_FLASH_Program(ProgaraType_DATA16, (uint32_t)pAddrFlash + i*2, value); + if (res == ERROR) break; + } + // 擦除后面的部分. + res = LL_Flash_PageErase((void *)((int)pAddrFlash + i*2),NbPages - 1); + // 继续存储 + for ( ;i<(nByteSize+1)/2;i++) + { + unsigned short value = ((uint8_t *)pBuf)[i*2] + (((uint8_t *)pBuf)[i*2 +1] << 8); + res = LL_FLASH_Program(ProgaraType_DATA16, (uint32_t)pAddrFlash + i*2, value); + if (res == ERROR) break; + } + }else { + // 正常写入,不需要擦除 + for (int i=0;i<(nByteSize+1)/2;i++) + { + unsigned short value = ((uint8_t *)pBuf)[i*2] + (((uint8_t *)pBuf)[i*2 +1] << 8); + res = LL_FLASH_Program(ProgaraType_DATA16, (uint32_t)pAddrFlash + i*2, value); + if (res == ERROR) break; + } + } +// __enable_irq(); + LL_FLASH_Lock(FLASH); + if (res == ERROR) return 1; + return 0; +} + int ReadFactoryData(void * pDatabuf, int nByteCount) { memcpy(pDatabuf,(stFactoryData *)FACTORY_DATA_BASE,nByteCount); @@ -221,42 +382,160 @@ EraseAndWriteToFlashMem(pDataBuf, (stFactoryData *)FACTORY_DATA_BASE,nByteCount); return 0; } - -int ReadProgram(int nProgByteAddr, void *pBuf, int nByteSize, int nBank) +#if (ENABLE_PLC) +int ReadPLCProgram(int nBank, int nProgByteAddr, void *pBuf, int nByteSize) { + stStoredBinProgs * pStoredProg; if (nBank==0) { - ReadFlashMem(pBuf, (void *)(STORE_PRG_BASE+nProgByteAddr), nByteSize); + pStoredProg = (void *)(STORE_PRG_BASE); }else if (nBank ==1) { - ReadFlashMem(pBuf, (void *)(ALT_PRG_BASE+nProgByteAddr), nByteSize); - }else if (KMRunStat.nBinProgBank==0) { - ReadFlashMem(pBuf, (void *)(STORE_PRG_BASE+nProgByteAddr), nByteSize); + pStoredProg = (void *)(ALT_PRG_BASE); + }else if (storedKMSysCfg.theKMSysCfg.nProgBank==0) { + pStoredProg = (void *)(STORE_PRG_BASE); } else { - ReadFlashMem(pBuf, (void *)(ALT_PRG_BASE+nProgByteAddr), nByteSize); + pStoredProg = (void *)(ALT_PRG_BASE); } + void * progByteAddr; + progByteAddr =(unsigned char *)&pStoredProg->BinInstrcns + nProgByteAddr; + + ReadFlashMem(pBuf, (void *)(progByteAddr), nByteSize); return 0; } -int WriteProgram(int nProgAddress, void * pBuf, int nByteSize, int nBank) + +int StartPLCProgram(int nBank, int nByteSize, int nCRC) +{ + void * progHdrAddr; + int nRes = 0; + if (nBank == 0) { + progHdrAddr=(void *)(STORE_PRG_BASE); + }else if (nBank==1) { + progHdrAddr=(void *)(ALT_PRG_BASE); + } else if (storedKMSysCfg.theKMSysCfg.nProgBank==0) { + progHdrAddr=(void *)(ALT_PRG_BASE); + }else{ + progHdrAddr=(void *)(STORE_PRG_BASE); + } + + stStoredHdr theHdr; + theHdr.nBlockSign = 0xAA55; + theHdr.nBlockType = 0; + theHdr.nSeq = 1; + theHdr.nSize = nByteSize; + theHdr.nCRC2 = nCRC; + + WriteToFlashAutoErase(&theHdr,(void *)progHdrAddr,sizeof(stStoredHdr)); + + return nRes; +} +int WritePLCProgram(int nBank, int nProgAddress, void * pBuf, int nByteSize) { // Program Save Address;// // Program 2 Save Address; // - void * progByteAddr; + stStoredBinProgs * pStoredProg; + if (nBank == 0) { - progByteAddr=(void *)(STORE_PRG_BASE+nProgAddress); + pStoredProg=(stStoredBinProgs *)(STORE_PRG_BASE); }else if (nBank==1) { - progByteAddr=(void *)(ALT_PRG_BASE+nProgAddress); - } else if (KMRunStat.nBinProgBank==0) { - progByteAddr=(void *)(ALT_PRG_BASE+nProgAddress); + pStoredProg=(stStoredBinProgs *)(ALT_PRG_BASE); + } else if (storedKMSysCfg.theKMSysCfg.nProgBank==0) { + pStoredProg=(stStoredBinProgs *)(ALT_PRG_BASE); }else{ - progByteAddr=(void *)(STORE_PRG_BASE+nProgAddress); + pStoredProg=(stStoredBinProgs *)(STORE_PRG_BASE); } - if ( (nProgAddress & (FLASH_PAGE_SIZE - 1)) ==0) { - EraseAndWriteToFlashMem(pBuf, progByteAddr, nByteSize); - }else{ - WriteToFlashMemNoErase(pBuf, progByteAddr, nByteSize); - } + void * progByteAddr; + progByteAddr =(unsigned char *)&pStoredProg->BinInstrcns + nProgAddress; + WriteToFlashAutoErase(pBuf,progByteAddr,nByteSize); + return 0; } +int FinishiPLCProgram(int nBank, int nProgSteps,int nCRC ) +{ + int nRes = 0; + + if (storedKMSysCfg.theKMSysCfg.nProgBank == 0 ) { + storedKMSysCfg.theKMSysCfg.nProgBank = 1; + }else { + storedKMSysCfg.theKMSysCfg.nProgBank = 0; + } + storedKMSysCfg.theKMSysCfg.nProgSize = nProgSteps; + + WriteSysCfgToFlash(&storedKMSysCfg); + + KMRunStat.nBinProgSize=nProgSteps; + KMRunStat.nBinProgBank=storedKMSysCfg.theKMSysCfg.nProgBank; + + SaveRunStat(&KMRunStat); + + return nRes; +} +int ReadPLCAnno(int nBank, int nProgByteAddr, void *pBuf, int nByteSize) +{ + stStoredBinProgs * pStoredProg; + if (nBank==0) { + pStoredProg = (void *)(STORE_PRG_BASE); + }else if (nBank ==1) { + pStoredProg = (void *)(ALT_PRG_BASE); + }else if (storedKMSysCfg.theKMSysCfg.nProgBank==0) { + pStoredProg = (void *)(STORE_PRG_BASE); + } else { + pStoredProg = (void *)(ALT_PRG_BASE); + } + void * progByteAddr; + progByteAddr =(unsigned char *)&pStoredProg->BinInstrcns + nProgByteAddr; + + ReadFlashMem(pBuf, (void *)(progByteAddr), nByteSize); + return 0; +} + +int StartPLCAnno(int nBank, int nByteSize, int nCRC) +{ + void * StoredAnnoHdrAddr; + int nRes = 0; + + StoredAnnoHdrAddr=(void *)(STORE_PLC_ANNO_BASE); + + + stStoredHdr theHdr; + theHdr.nBlockSign = 0xAA55; + theHdr.nBlockType = 3; + theHdr.nSeq = 1; + theHdr.nSize = nByteSize; + theHdr.nCRC2 = nCRC; + + WriteToFlashAutoErase(&theHdr,(void *)StoredAnnoHdrAddr,sizeof(stStoredHdr)); + + return nRes; +} +int WritePLCAnno(int nBank, int nByteAddress, void * pBuf, int nByteSize) +{ + // Program Save Address;// + // Program 2 Save Address; // + stStoredAnno * pStoredAnno; + pStoredAnno=(stStoredAnno *)(STORE_PLC_ANNO_BASE); + + void * nByteAddr; + nByteAddr =pStoredAnno->Annos + nByteAddress; + WriteToFlashAutoErase(pBuf,nByteAddr,nByteSize); + + return 0; +} +int FinishiPLCAnno(int nBank, int nByteSize,int nCRC ) +{ + int nRes = 0; + + storedKMSysCfg.theKMSysCfg.nAnnoSize = nByteSize; + WriteSysCfgToFlash(&storedKMSysCfg); +/* + KMRunStat.nBinProgSize=nProgSteps; + KMRunStat.nBinProgBank=storedKMSysCfg.theKMSysCfg.nProgBank; + + SaveRunStat(&KMRunStat); +*/ + return nRes; +} + +#endif //ENABLE_PLC int LoadDefaultSysCfg(pStoredKMSysCfg theStoredKMSysCfg) { memcpy(theStoredKMSysCfg,&KMDefaultSysCfg,sizeof(stStoredKMSysCfg)); @@ -435,10 +714,6 @@ return 0; }; - -int nMaxRunStatIndex=-1; -unsigned int nMaxRunStatSeq=0; -int nNextRunStatSpace=0; int LoadDefaultRunStat(pRunStat theRunStat) { theRunStat->PowerCount=1; @@ -447,7 +722,7 @@ // theRunStat->WorkMode=0; // theRunStat->WorkMode2=0; // theRunStat->nBinProgBank=0; -// theRunStat->nBinProgSize=0; +// theRunStat->nBinInstrcnSize=0; return 0; } int LoadRunStat(pRunStat theRunStat) @@ -516,36 +791,41 @@ return 0; } -int WriteNewApp(int nProgByteAddr, void *pBuf, int nByteSize) +int WriteNewApp(int nProgByteOffset, void *pBuf, int nByteSize) { + int res = -1; - if ((nProgByteAddr&(FLASH_PAGE_SIZE-1)) ==0){ + int FlashSize = *(ushort *)FLASHSIZE_BASE; + int NewAppAddress ; + if (FlashSize == 64) { + NewAppAddress = 0x08009000U; + }else if (FlashSize == 256) { + NewAppAddress = 0x08021000U; + } + if ((nProgByteOffset&(FLASH_PAGE_SIZE-1)) ==0){ // EraseFlashMem((void *)(NewAppAddress + nProgByteAddr),1); - res = EraseAndWriteToFlashMem(pBuf,(void *)(NewAppAddress + nProgByteAddr),nByteSize); + + res = EraseAndWriteToFlashMem(pBuf,(void *)(NewAppAddress + nProgByteOffset),nByteSize); }else { // if (nByteSize>64) return 0; - res = WriteToFlashMemNoErase(pBuf,(void *)(NewAppAddress + nProgByteAddr),nByteSize); + res = WriteToFlashMemNoErase(pBuf,(void *)(NewAppAddress + nProgByteOffset),nByteSize); } return res; } int WriteNewAppInfo(int nProgByteAddr, void *pBuf, int nByteSize) { + int FlashSize = *(ushort *)FLASHSIZE_BASE; + int NewAppInfoBlockAddress ; + if (FlashSize == 64) { + NewAppInfoBlockAddress = 0x08008000; + }else if (FlashSize == 256) { + NewAppInfoBlockAddress = 0x08020000; + } + int res = EraseAndWriteToFlashMem(pBuf,(void *)(NewAppInfoBlockAddress + nProgByteAddr),nByteSize); return res; } - -int nEventCount=0; -int nEventMinIndex; -int nEventMaxIndex; -unsigned int nEventMaxSeq=0; -int nEventNextSpace; -int nMaxCurTime=0; -volatile int PowerState = 0; - -volatile int PowerDownEvent=0; -volatile int OldPowerDownEvent=0; -volatile int OldPowerDownEventTime=0; int CheckEventLog() { @@ -637,50 +917,26 @@ nEventNextSpace=0; return 0; } -int KMachineInit(void) -{ -// ClearEventLog(); - CheckEventLog(); - LoadRunStat(&KMRunStat); - KMem.CurTimeSec=nMaxCurTime; - KMem.TotalRunTime=KMRunStat.UpTime; - KMRunStat.PowerCount++; - KMem.PwrOnCount=KMRunStat.PowerCount; - SaveRunStat(&KMRunStat); - KMem.SDD[15]=nMaxRunStatIndex; - KMem.SDD[16]=nMaxRunStatSeq; - KMem.SDD[17]=nNextRunStatSpace; - - AddEventLog(KMem.CurTimeSec,EventTypePowerUp,1,12345); - KMem.SDD[19]=nEventCount; - KMem.SDD[20]=nEventMinIndex; - KMem.SDD[21]=nEventMaxIndex; - KMem.SDD[22]=nEventMaxSeq; - KMem.SDD[23]=nEventNextSpace; - - return 0; +inline void SetAddrBit(unsigned short * pW, unsigned char bitPos) +{ + (*pW)|=1<<(bitPos&0xf); } -inline void SetAddrBit(unsigned short * pW, unsigned char bitAddr) +inline void ResetBit(unsigned short * pW, unsigned char bitPos) { - (*pW)|=1<<(bitAddr&0xf); + (*pW)&=~(1<<(bitPos&0xf)); } -inline void ResetBit(unsigned short * pW, unsigned char bitAddr) +static inline void SetBitValue(unsigned short * pW, unsigned char bitPos, unsigned char Value) { - (*pW)&=~(1<<(bitAddr&0xf)); + if (Value) { SetAddrBit(pW, bitPos);} + else {ResetBit(pW, bitPos);} } -static inline void SetBitValue(unsigned short * pW, unsigned char bitAddr, unsigned char Value) +static inline unsigned char GetBitValue(unsigned short W, unsigned char bitPos) { - if (Value) { SetAddrBit(pW, bitAddr);} - else {ResetBit(pW, bitAddr);} -} - -static inline unsigned char GetBitValue(unsigned short W, unsigned char bitAddr) -{ - if (W&(1<<(bitAddr&0xf))) return 1; + if (W&(1<<(bitPos&0xf))) return 1; else return 0; } @@ -689,44 +945,53 @@ { unsigned char thisValue=0; unsigned short nWordAddr=(nCoilAddr&0xff0)>>4; - unsigned char nBitAddr=nCoilAddr&0xf; + unsigned char nBitPos=nCoilAddr&0xf; switch(nCoilType) { case KLCoilTypeX: if (nCoilAddr >= KLCoilXCount) return 0; - thisValue = GetBitValue(KMem.WX[nWordAddr], nBitAddr); + thisValue = GetBitValue(KMem.WX[nWordAddr], nBitPos); break; case KLCoilTypeY: if (nCoilAddr >= KLCoilYCount) return 0; - thisValue = GetBitValue(KMem.WY[nWordAddr], nBitAddr); + thisValue = GetBitValue(KMem.WY[nWordAddr], nBitPos); break; case KLCoilTypeR: - if (nCoilAddr >= KLCoilRCount) return 0; - thisValue = GetBitValue(KMem.WR[nWordAddr], nBitAddr); + + if (nCoilAddr < KLCoilRCount) { + thisValue = GetBitValue(KMem.WR[nWordAddr], nBitPos); + }else if (nCoilAddr > 9000) { + if (nCoilAddr == 9010) thisValue = 1; + if (nCoilAddr == 9011) thisValue = 0; + if (nCoilAddr == 9013) thisValue = GetBitValue(KMem.WSR[nWordAddr], 13); + } +// return thisValue; break; case KLCoilTypeLX: if (nCoilAddr >= KLCoilLXCount) return 0; - thisValue = GetBitValue(KMem.WLX[nWordAddr], nBitAddr); + thisValue = GetBitValue(KMem.WLX[nWordAddr], nBitPos); break; case KLCoilTypeLY: if (nCoilAddr >= KLCoilLYCount) return 0; - thisValue = GetBitValue(KMem.WLY[nWordAddr], nBitAddr); + thisValue = GetBitValue(KMem.WLY[nWordAddr], nBitPos); break; +#if (ENABLE_PLC) case KLCoilTypeT: if (nCoilAddr >= KLCoilTCount) return 0; - thisValue = GetBitValue(KMem.WT[nWordAddr], nBitAddr); + thisValue = GetBitValue(PLCMem.WT[nWordAddr], nBitPos); break; case KLCoilTypeC: if (nCoilAddr >= KLCoilCCount) return 0; - thisValue = GetBitValue(KMem.WC[nWordAddr], nBitAddr); + thisValue = GetBitValue(PLCMem.WC[nWordAddr], nBitPos); break; +#endif case KLCoilTypeLR: if (nCoilAddr >= KLCoilLRCount) return 0; - thisValue = GetBitValue(KMem.WLR[nWordAddr], nBitAddr); + thisValue = GetBitValue(KMem.WLR[nWordAddr], nBitPos); break; case KLCoilTypeSR: if (nCoilAddr >= KLCoilSRCount) return 0; - thisValue = GetBitValue(KMem.WSR[nWordAddr], nBitAddr); + thisValue = GetBitValue(KMem.WSR[nWordAddr], nBitPos); break; default: break; @@ -759,14 +1024,16 @@ if (nCoilAddr >= KLCoilLYCount) return 0; SetBitValue(&KMem.WLY[nWordAddr], nBitAddr, nCoilValue); break; +#if (ENABLE_PLC) case KLCoilTypeT: if (nCoilAddr >= KLCoilTCount) return 0; - SetBitValue(&KMem.WT[nWordAddr], nBitAddr, nCoilValue); + SetBitValue(&PLCMem.WT[nWordAddr], nBitAddr, nCoilValue); break; case KLCoilTypeC: if (nCoilAddr >= KLCoilCCount) return 0; - SetBitValue(&KMem.WC[nWordAddr], nBitAddr, nCoilValue); + SetBitValue(&PLCMem.WC[nWordAddr], nBitAddr, nCoilValue); break; +#endif case KLCoilTypeLR: if (nCoilAddr >= KLCoilLRCount) return 0; SetBitValue(&KMem.WLR[nWordAddr], nBitAddr, nCoilValue); @@ -824,14 +1091,16 @@ if (nDataAddr >= KLCoilLRCount) return 0; thisValue = KMem.WSR[nDataAddr]; break; +#if (ENABLE_PLC) case KLDataTypeSV: if (nDataAddr >= KLDataSVCount) return 0; - thisValue = KMem.SV[nDataAddr]; + thisValue = PLCMem.SV[nDataAddr]; break; case KLDataTypeEV: if (nDataAddr >= KLDataEVCount) return 0; - thisValue = KMem.EV[nDataAddr]; + thisValue = PLCMem.EV[nDataAddr]; break; +#endif case KLDataTypeLD: if (nDataAddr >= KLDataLDCount) return 0; thisValue = KMem.DT[nDataAddr]; @@ -893,14 +1162,16 @@ if (nDataAddr >= KLCoilLRCount) return 0; KMem.WSR[nDataAddr] = nDataValue; break; +#if (ENABLE_PLC) case KLDataTypeSV: if (nDataAddr >= KLDataSVCount) return 0; - KMem.SV[nDataAddr] = nDataValue; + PLCMem.SV[nDataAddr] = nDataValue; break; case KLDataTypeEV: if (nDataAddr >= KLDataEVCount) return 0; - KMem.EV[nDataAddr] = nDataValue; + PLCMem.EV[nDataAddr] = nDataValue; break; +#endif case KLDataTypeLD: if (nDataAddr >= KLDataLDCount) return 0; KMem.DT[nDataAddr] = nDataValue; @@ -937,7 +1208,8 @@ break; case ReqRun: break; - case ReqBlink: + case ReqBlinkLED: + KMRunStat.bLEDFlick=nParam; break; case ReqStartDiag: break; diff --git a/ComLib/Src/ModbusRTU.c b/ComLib/Src/ModbusRTU.c index f143e6c..88bfb4b 100644 --- a/ComLib/Src/ModbusRTU.c +++ b/ComLib/Src/ModbusRTU.c @@ -236,15 +236,17 @@ case WriteCoil: //5 bit //Store Datas; //SetBitValue(&KMem.WR[Addr1],bitAddr,pPkg->nCount); + Addr1=(Addr&0xfff0)>>4; + bitAddr=Addr&0xf; if (nCount == 0) // set to 0 { - ResetBit(&KMem.WY[Addr1],bitAddr); + if (Addr < 2048) { ResetBit(&KMem.WY[Addr1],bitAddr);} + else {ResetBit(&KMem.WR[Addr1-128],bitAddr);} }else if (nCount == 0xFF00) // set to 1 { - SetAddrBit(&KMem.WY[Addr1],bitAddr); - }else - { - //error + if (Addr < 2048) { SetAddrBit(&KMem.WY[Addr1],bitAddr);} + else {SetAddrBit(&KMem.WR[Addr1-128],bitAddr);} + } memcpy(Pkgbuf,ptr,len); needcrc=0; diff --git a/ComLib/Src/MyQueue.c b/ComLib/Src/MyQueue.c index 4481ea5..f90e2bc 100644 --- a/ComLib/Src/MyQueue.c +++ b/ComLib/Src/MyQueue.c @@ -13,19 +13,19 @@ theQueue->Caps=nSize; theQueue->wp=0; theQueue->rp=0; - theQueue->RecvBytes=0; +// theQueue->RecvBytes=0; + //theQueue->state=0; theQueue->bFull=0; theQueue->bEmpty=1; - theQueue->state=0; return 0; } int EmptyQueue(stMyQueue * theQueue) { theQueue->wp=0; theQueue->rp=0; + //theQueue->state=0; theQueue->bFull=0; theQueue->bEmpty=1; - theQueue->state=0; return 0; } int GetContinueEmptyRoom(stMyQueue * theQueue) @@ -75,7 +75,7 @@ theQueue->bEmpty=0; if (wp == theQueue->rp) theQueue->bFull=1; theQueue->wp = wp; - theQueue->RecvBytes+=nSize; +// theQueue->RecvBytes+=nSize; return nSize; } @@ -88,10 +88,10 @@ theQueue->rp = rp; if (rp == theQueue->wp) { - theQueue->bEmpty=1; theQueue->wp=0; theQueue->rp=0; - theQueue->state=0; +// theQueue->state=0; + theQueue->bEmpty=1; } return nSize; } diff --git a/ComLib/Src/PLCfunctions.c b/ComLib/Src/PLCfunctions.c index e711eb2..bf11c44 100644 --- a/ComLib/Src/PLCfunctions.c +++ b/ComLib/Src/PLCfunctions.c @@ -10,6 +10,7 @@ #include "stm32f0xx_hal.h" #include <core_cmInstr.h> +#if (ENABLE_PLC) extern __IO uint32_t uwTick; //unsigned short WDFs[TOTAL_WDFS]; @@ -36,23 +37,23 @@ int InitTimer(int nIndex, int nType) { if (nIndex >= TOTALTIMERS) return -1; - KMem.Timers[nIndex].StatByte = 0x0010 | nType; + PLCMem.Timers[nIndex].StatByte = 0x0010 | nType; // Timers[nIndex].nType = 0; - KMem.SV[nIndex] = 0; - KMem.EV[nIndex] = 0; - KMem.Timers[nIndex].LastActTime = GetTick(); + PLCMem.SV[nIndex] = 0; + PLCMem.EV[nIndex] = 0; + PLCMem.Timers[nIndex].LastActTime = GetTick(); return 0; } int RunTimer(int nIndex , int SV) { if (nIndex >= TOTALTIMERS) return -1; - if (!KMem.Timers[nIndex].bSet) + if (!PLCMem.Timers[nIndex].bSet) { - KMem.SV[nIndex] = SV; - KMem.EV[nIndex]= 0; - KMem.Timers[nIndex].LastActTime = GetTick(); - KMem.Timers[nIndex].bSet = 1; + PLCMem.SV[nIndex] = SV; + PLCMem.EV[nIndex]= 0; + PLCMem.Timers[nIndex].LastActTime = GetTick(); + PLCMem.Timers[nIndex].bSet = 1; } return 0; } @@ -60,20 +61,20 @@ int StopTimer(int nIndex) { if (nIndex >= TOTALTIMERS) return -1; - if (KMem.Timers[nIndex].bSet) + if (PLCMem.Timers[nIndex].bSet) { - KMem.EV[nIndex] = 0; - KMem.Timers[nIndex].LastActTime = GetTick(); - KMem.Timers[nIndex].bSet = 0; + PLCMem.EV[nIndex] = 0; + PLCMem.Timers[nIndex].LastActTime = GetTick(); + PLCMem.Timers[nIndex].bSet = 0; } return 0; } int ResetTimer(int nIndex) { if (nIndex >= TOTALTIMERS) return -1; - KMem.EV[nIndex] = 0; - KMem.Timers[nIndex].bTon = 0; - KMem.Timers[nIndex].LastActTime=GetTick(); + PLCMem.EV[nIndex] = 0; + PLCMem.Timers[nIndex].bTon = 0; + PLCMem.Timers[nIndex].LastActTime=GetTick(); return 0; } @@ -82,60 +83,60 @@ if (nIndex >= TOTALTIMERS) return -1; if (bSet) {RunTimer(nIndex, SV);} else {StopTimer(nIndex);} - return KMem.Timers[nIndex].bTon; + return PLCMem.Timers[nIndex].bTon; } int ProcessTimer(int nIndex) { if (nIndex >= TOTALTIMERS) return -1; - if (!KMem.Timers[nIndex].nInited) return 0; - if (KMem.Timers[nIndex].bSet) // bSet =1; + if (!PLCMem.Timers[nIndex].nInited) return 0; + if (PLCMem.Timers[nIndex].bSet) // bSet =1; { - if (!KMem.Timers[nIndex].bTon) + if (!PLCMem.Timers[nIndex].bTon) { - int TimeDiff = GetTick() - KMem.Timers[nIndex].LastActTime; int nScale = TICK_OF_MS; - if (KMem.Timers[nIndex].nScale == 0) + if (PLCMem.Timers[nIndex].nScale == 0) {nScale = TICK_OF_MS; - }else if (KMem.Timers[nIndex].nScale == 1) + }else if (PLCMem.Timers[nIndex].nScale == 1) {nScale = TICK_OF_RS; - }else if (KMem.Timers[nIndex].nScale == 2) + }else if (PLCMem.Timers[nIndex].nScale == 2) {nScale = TICK_OF_XS; - }else if (KMem.Timers[nIndex].nScale == 3) + }else if (PLCMem.Timers[nIndex].nScale == 3) {nScale = TICK_OF_YS; }else {} - + int TimeDiff = GetTick() - PLCMem.Timers[nIndex].LastActTime; + if (TimeDiff < 0) { TimeDiff = nScale;} if (TimeDiff >= nScale) { int TimeDiffmS = TimeDiff / nScale; - unsigned short NextEV = KMem.EV[nIndex] + TimeDiffmS; - KMem.Timers[nIndex].LastActTime += TimeDiffmS*nScale; + unsigned short NextEV = PLCMem.EV[nIndex] + TimeDiffmS; + PLCMem.Timers[nIndex].LastActTime += TimeDiffmS*nScale; - if (NextEV >= KMem.SV[nIndex]) + if (NextEV >= PLCMem.SV[nIndex]) { - NextEV = KMem.SV[nIndex]; - KMem.Timers[nIndex].bTon =1; + NextEV = PLCMem.SV[nIndex]; + PLCMem.Timers[nIndex].bTon =1; } - KMem.EV[nIndex] = NextEV; + PLCMem.EV[nIndex] = NextEV; } } }else //bSet=0; { - if(KMem.Timers[nIndex].bTon) + if(PLCMem.Timers[nIndex].bTon) { - KMem.Timers[nIndex].bTon = 0; + PLCMem.Timers[nIndex].bTon = 0; } } - SetCoilValue(KLCoilTypeT, nIndex, KMem.Timers[nIndex].bTon); - return KMem.Timers[nIndex].bTon; + SetCoilValue(KLCoilTypeT, nIndex, PLCMem.Timers[nIndex].bTon); + return PLCMem.Timers[nIndex].bTon; } int IsTimerOn(int nIndex) { if (nIndex >= TOTALTIMERS) return 0; ProcessTimer(nIndex); - return KMem.Timers[nIndex].bTon; + return PLCMem.Timers[nIndex].bTon; } @@ -143,14 +144,14 @@ { if (nIndex >= TOTALTIMERS) return 0; // ProcessTimer(nIndex); - return KMem.SV[nIndex]; + return PLCMem.SV[nIndex]; // return 0; } int GetTimerEV(int nIndex) { if (nIndex >= TOTALTIMERS) return 0; // ProcessTimer(nIndex); - return KMem.EV[nIndex]; + return PLCMem.EV[nIndex]; // return 0; } @@ -158,186 +159,22 @@ { for (int i=TOTAL_CurVAL -1 ;i>0;i--) { - KMem.CurVALs[i]=KMem.CurVALs[i-1]; + PLCMem.CurVALs[i]=PLCMem.CurVALs[i-1]; } - KMem.CurVALs[0]=KMem.CurVAL; - return KMem.CurVAL; + PLCMem.CurVALs[0]=PLCMem.CurVAL; + return PLCMem.CurVAL; } int PopOutVal(void) { - unsigned char theVAL=KMem.CurVALs[0]; + unsigned char theVAL=PLCMem.CurVALs[0]; for (int i=0;i<TOTAL_CurVAL-1;i++) { - KMem.CurVALs[i]=KMem.CurVALs[i+1]; + PLCMem.CurVALs[i]=PLCMem.CurVALs[i+1]; } return theVAL; } -stBinProg1 const prog1[]= //__attribute__((at(0X8008000))) -{ - {OP_ST,KLCoilTypeSR,13}, - {OP_MV,0,50}, {KLDataTypeDEC,KLDataTypeDT,1}, - {OP_MV,0,20}, {KLDataTypeDEC,KLDataTypeDT,2}, - {OP_MV,0,30}, {KLDataTypeDEC,KLDataTypeDT,3}, - {OP_MV,0,40}, {KLDataTypeDEC,KLDataTypeDT,4}, - {OP_SET,KLCoilTypeR,0}, -// {OP_SET,KLCoilTypeY,0}, - - {OP_ST,KLCoilTypeR,0}, - {OP_TMX,1,1}, {KLDataTypeDT,0,0}, - {OP_DF}, - {OP_SET,KLCoilTypeR,10}, - - {OP_ST,KLCoilTypeX,0}, - {OP_DF}, - {OP_SET,KLCoilTypeR,10}, - - {OP_ST,KLCoilTypeX,1}, - {OP_DF}, - {OP_RESET,KLCoilTypeR,10}, -/* - {OP_ST,KLCoilTypeR,10}, - {OP_AN,KLCoilTypeR,51}, - {OP_AN,KLCoilTypeR,52}, - {OP_AN,KLCoilTypeR,53}, - {OP_ADD3,0,21}, {KLDataTypeDT,KLDataTypeDT,31}, {0,KLDataTypeDT,32}, - - {OP_ST,KLCoilTypeR,10}, - {OP_AN,KLCoilTypeR,54}, - {OP_AN,KLCoilTypeR,55}, - {OP_AN,KLCoilTypeR,56}, - {OP_ADD3,0,23}, {KLDataTypeDT,KLDataTypeDT,33}, {0,KLDataTypeDT,34}, -*/ - {OP_ST,KLCoilTypeSR,1}, - {OP_PSHS}, - {OP_AN,KLCoilTypeR,51}, - {OP_OUT,KLCoilTypeY,1}, - {OP_RDS}, - {OP_AN,KLCoilTypeR,52}, - {OP_OUT,KLCoilTypeY,2}, - {OP_RDS}, - {OP_AN,KLCoilTypeR,53}, - {OP_OUT,KLCoilTypeY,3}, - {OP_RDS}, - {OP_AN,KLCoilTypeR,54}, - {OP_OUT,KLCoilTypeY,4}, - {OP_RDS}, - {OP_AN,KLCoilTypeR,55}, - {OP_OUT,KLCoilTypeY,5}, - {OP_POPS}, - {OP_AN,KLCoilTypeR,56}, - {OP_OUT,KLCoilTypeY,6}, - - {OP_ST,KLCoilTypeR,10}, - {OP_DF}, - {OP_PSHS}, - {OP_MV,0,150}, {KLDataTypeDEC,KLDataTypeDT,11}, - {OP_MV,0,30}, {KLDataTypeDEC,KLDataTypeDT,12}, - {OP_RDS}, - {OP_MV,0,150}, {KLDataTypeDEC,KLDataTypeDT,13}, - {OP_MV,0,30}, {KLDataTypeDEC,KLDataTypeDT,14}, - {OP_POPS}, - {OP_AN_,KLCoilTypeR,11}, - {OP_AN_,KLCoilTypeR,12}, - {OP_AN_,KLCoilTypeR,13}, - {OP_AN_,KLCoilTypeR,14}, - {OP_SET,KLCoilTypeR,14}, - - {OP_ST,KLCoilTypeR,10}, - {OP_PSHS}, - {OP_AN,KLCoilTypeR,11}, - {OP_DF}, - {OP_SET,KLCoilTypeR,51}, - {OP_RESET,KLCoilTypeR,52}, - {OP_RESET,KLCoilTypeR,53}, - {OP_RESET,KLCoilTypeR,54}, - {OP_RESET,KLCoilTypeR,55}, - {OP_SET,KLCoilTypeR,56}, - - {OP_RDS}, - {OP_AN,KLCoilTypeR,11}, - - {OP_PSHS}, - {OP_TMX,11,11}, {KLDataTypeDT,0,0}, - {OP_RESET,KLCoilTypeR,11}, - {OP_SET,KLCoilTypeR,12}, - {OP_POPS}, - {OP_SUB3,0,11}, {KLDataTypeSV,KLDataTypeEV,11}, {0,KLDataTypeDT,21}, - {OP_AN_LE,0,21},{KLDataTypeDT,KLDataTypeDEC,30}, - {OP_PSHS}, - {OP_DIV,0,21}, {KLDataTypeDT,KLDataTypeDEC,10}, {0,KLDataTypeDT,31}, - {OP_RDS}, - {OP_AN_GE,0,32},{KLDataTypeDT,KLDataTypeDEC,5}, - {OP_SET,KLCoilTypeR,51}, - {OP_POPS}, - {OP_AN_LT,0,32},{KLDataTypeDT,KLDataTypeDEC,5}, - {OP_RESET,KLCoilTypeR,51}, - {OP_RDS}, - {OP_AN,KLCoilTypeR,12}, - {OP_DF}, - {OP_RESET,KLCoilTypeR,51}, - {OP_SET,KLCoilTypeR,52}, - {OP_RDS}, - {OP_AN,KLCoilTypeR,12}, - {OP_TMX,12,12}, {KLDataTypeDT,0,0}, - {OP_RESET,KLCoilTypeR,12}, - {OP_SET,KLCoilTypeR,13}, - {OP_POPS}, - {OP_AN,KLCoilTypeR,12}, - {OP_OUT,KLCoilTypeR,52}, - - {OP_ST,KLCoilTypeR,10}, - {OP_PSHS}, - {OP_AN,KLCoilTypeR,13}, - {OP_DF}, - {OP_RESET,KLCoilTypeR,52}, - {OP_SET,KLCoilTypeR,53}, - {OP_SET,KLCoilTypeR,54}, - {OP_RESET,KLCoilTypeR,56}, - {OP_RDS}, - {OP_AN,KLCoilTypeR,13}, - {OP_TMX,13,13}, {KLDataTypeDT,0,0}, - {OP_RESET,KLCoilTypeR,13}, - {OP_SET,KLCoilTypeR,14}, - {OP_RDS}, - {OP_AN,KLCoilTypeR,13}, - {OP_SUB3,0,13}, {KLDataTypeSV,KLDataTypeEV,13}, {0,KLDataTypeDT,23}, - {OP_AN_LE,0,23},{KLDataTypeDT,KLDataTypeDEC,30}, - {OP_PSHS}, - {OP_DIV,0,23}, {KLDataTypeDT,KLDataTypeDEC,10}, {0,KLDataTypeDT,33}, - {OP_RDS}, - {OP_AN_GE,0,34},{KLDataTypeDT,KLDataTypeDEC,5}, - {OP_SET,KLCoilTypeR,54}, - {OP_POPS}, - {OP_AN_LT,0,34},{KLDataTypeDT,KLDataTypeDEC,5}, - {OP_RESET,KLCoilTypeR,54}, - {OP_RDS}, - {OP_AN,KLCoilTypeR,14}, - {OP_DF}, - {OP_RESET,KLCoilTypeR,54}, - {OP_SET,KLCoilTypeR,55}, - {OP_POPS}, - {OP_AN,KLCoilTypeR,14}, - {OP_TMX,14,14}, {KLDataTypeDT,0,0}, - {OP_RESET,KLCoilTypeR,14}, - {OP_SET,KLCoilTypeR,11}, -}; - -/* - - {OP_ST,Addr_R,1}, - {OP_PSHS,0,0}, - {OP_AN_,Addr_Y,1}, - {OP_TMR,5,200}, - {OP_SET,Addr_Y,1}, - {OP_POPS,0,0}, - {OP_AN,Addr_Y,1}, - {OP_TMR,6,200}, - {OP_RESET,Addr_Y,1}, - -*/ -int nSizeProg1=sizeof(prog1)/sizeof(stBinProg1); int InitPLC() { @@ -363,7 +200,7 @@ KMem.DT[i]=0; } for (int i=0;i<TOTALTIMERS;i++){ - KMem.Timers[i].nInited=0; + PLCMem.Timers[i].nInited=0; } PLCMem.bPLCRunning=1; @@ -376,6 +213,7 @@ PLCMem.bPLCRunning=0; for (int i=0;i<KLDataWXCount;i++) KMem.WY[i]=0; for (int i=0;i<KLDataWLCount;i++) KMem.WLY[i]=0; + KMRunStat.WorkMode2=PLCMem.bPLCRunning; return 0; } @@ -401,39 +239,45 @@ } -int ProcessPLCBinProg(const stBinProg1 * pBinprog, int nStepSize) +int ProcessPLCBinProg(const stBinInstrcn1 * pBinProg, int nProgSteps) { if (!PLCMem.bPLCRunning) return 0; if (PLCMem.nScanCount == 0) { - SetCoilValue(KLCoilTypeSR, 13, 1); SetCoilValue(KLCoilTypeSR, 0, 0); SetCoilValue(KLCoilTypeSR, 1, 1); + SetCoilValue(KLCoilTypeSR, 10, 1); + SetCoilValue(KLCoilTypeSR, 11, 0); + SetCoilValue(KLCoilTypeSR, 13, 1); } else { - SetCoilValue(KLCoilTypeSR, 13, 0); SetCoilValue(KLCoilTypeSR, 0, 0); SetCoilValue(KLCoilTypeSR, 1, 1); + SetCoilValue(KLCoilTypeSR, 10, 1); + SetCoilValue(KLCoilTypeSR, 11, 0); + SetCoilValue(KLCoilTypeSR, 13, 0); } for (int i = 0; i < TOTAL_CurVAL; i++) { - KMem.CurVALs[i] = 0; + PLCMem.CurVALs[i] = 0; } int CurPos = 0; -// stBinProg1 * pBinProg1; - stBinProg15 * pBinProg15; - stBinProg2 * pBinProg2; - stBinProg3 * pBinProg3; +// stBinInstrcn1 * pBinInstrcn1; + stBinInstrcn15 * pBinInstrcn15; + stBinInstrcn2 * pBinInstrcn2; + stBinInstrcn3 * pBinInstrcn3; int lastScanInputVal = 1;//??????,????????,? ?? ??? - while (CurPos < nStepSize) + const stBinInstrcn1 * pBinInstrcn = pBinProg; + + while (CurPos < nProgSteps) { unsigned int nNextPos = 1; - unsigned int thisOP = pBinprog[CurPos].nOp; + unsigned int thisOP = pBinInstrcn[CurPos].nOp; // unsigned int nParamCount = 0 - unsigned char thisAddrType = pBinprog[CurPos].nParamType; - unsigned short thisAddr = pBinprog[CurPos].nParamAddr; + unsigned char thisAddrType = pBinInstrcn[CurPos].nParamType; + unsigned short thisAddr = pBinInstrcn[CurPos].nParamAddr; switch (thisOP) @@ -443,6 +287,9 @@ case OP_NOP: break; //??? ?? + case OP_END: + nNextPos = nProgSteps; + break; case OP_NOT: case OP_ANS: case OP_ORS: @@ -454,28 +301,28 @@ switch (thisOP) { case OP_NOT: - KMem.CurVAL = !KMem.CurVAL; + PLCMem.CurVAL = !PLCMem.CurVAL; break; case OP_ANS: - KMem.CurVAL = PopOutVal() && KMem.CurVAL; + PLCMem.CurVAL = PopOutVal() && PLCMem.CurVAL; break; case OP_ORS: - KMem.CurVAL = PopOutVal() || KMem.CurVAL; + PLCMem.CurVAL = PopOutVal() || PLCMem.CurVAL; break; case OP_PSHS: PushInVal(); break; case OP_RDS: - KMem.CurVAL = KMem.CurVALs[0] != 0; + PLCMem.CurVAL = PLCMem.CurVALs[0] != 0; break; case OP_POPS: - KMem.CurVAL = PopOutVal(); + PLCMem.CurVAL = PopOutVal(); break; case OP_DF: - KMem.CurVAL = KMem.CurVAL && !lastScanInputVal; + PLCMem.CurVAL = PLCMem.CurVAL && !lastScanInputVal; break; case OP_DF_: - KMem.CurVAL = !KMem.CurVAL && lastScanInputVal; + PLCMem.CurVAL = !PLCMem.CurVAL && lastScanInputVal; break; default: @@ -493,23 +340,23 @@ { case OP_ST: PushInVal(); - KMem.CurVAL = GetCoilValue(thisAddrType, thisAddr); + PLCMem.CurVAL = GetCoilValue(thisAddrType, thisAddr); break; case OP_ST_: PushInVal(); - KMem.CurVAL = !GetCoilValue(thisAddrType, thisAddr); + PLCMem.CurVAL = !GetCoilValue(thisAddrType, thisAddr); break; case OP_AN: - KMem.CurVAL = KMem.CurVAL&&GetCoilValue(thisAddrType, thisAddr); + PLCMem.CurVAL = PLCMem.CurVAL&&GetCoilValue(thisAddrType, thisAddr); break; case OP_AN_: - KMem.CurVAL = KMem.CurVAL && (!GetCoilValue(thisAddrType, thisAddr)); + PLCMem.CurVAL = PLCMem.CurVAL && (!GetCoilValue(thisAddrType, thisAddr)); break; case OP_OR: - KMem.CurVAL = KMem.CurVAL || GetCoilValue(thisAddrType, thisAddr); + PLCMem.CurVAL = PLCMem.CurVAL || GetCoilValue(thisAddrType, thisAddr); break; case OP_OR_: - KMem.CurVAL = KMem.CurVAL || (!GetCoilValue(thisAddrType, thisAddr)); + PLCMem.CurVAL = PLCMem.CurVAL || (!GetCoilValue(thisAddrType, thisAddr)); break; default: break; @@ -522,13 +369,13 @@ switch (thisOP) { case OP_OUT: - SetCoilValue(thisAddrType, thisAddr, KMem.CurVAL); + SetCoilValue(thisAddrType, thisAddr, PLCMem.CurVAL); break; case OP_SET: - if (KMem.CurVAL) SetCoilValue(thisAddrType, thisAddr, 1); + if (PLCMem.CurVAL) SetCoilValue(thisAddrType, thisAddr, 1); break; case OP_RESET: - if (KMem.CurVAL) SetCoilValue(thisAddrType, thisAddr, 0); + if (PLCMem.CurVAL) SetCoilValue(thisAddrType, thisAddr, 0); break; default: break; @@ -553,71 +400,71 @@ case OP_OR_GT: case OP_OR_LE: case OP_OR_GE: - pBinProg2 = (stBinProg2 *)&pBinprog[CurPos]; - thisAddrType = pBinProg2->nParamType1; + pBinInstrcn2 = (stBinInstrcn2 *)&pBinInstrcn[CurPos]; + thisAddrType = pBinInstrcn2->nParamType1; switch (thisOP) { case OP_ST_EQ: PushInVal(); - KMem.CurVAL = (GetVarData(thisAddrType, thisAddr) == GetVarData(pBinProg2->nParamType2, pBinProg2->nParamAddr2)); + PLCMem.CurVAL = (GetVarData(thisAddrType, thisAddr) == GetVarData(pBinInstrcn2->nParamType2, pBinInstrcn2->nParamAddr2)); break; case OP_ST_NE: PushInVal(); - KMem.CurVAL = (GetVarData(thisAddrType, thisAddr) != GetVarData(pBinProg2->nParamType2, pBinProg2->nParamAddr2)); + PLCMem.CurVAL = (GetVarData(thisAddrType, thisAddr) != GetVarData(pBinInstrcn2->nParamType2, pBinInstrcn2->nParamAddr2)); break; case OP_ST_LT: PushInVal(); - KMem.CurVAL = (GetVarData(thisAddrType, thisAddr) < GetVarData(pBinProg2->nParamType2, pBinProg2->nParamAddr2)); + PLCMem.CurVAL = (GetVarData(thisAddrType, thisAddr) < GetVarData(pBinInstrcn2->nParamType2, pBinInstrcn2->nParamAddr2)); break; case OP_ST_GT: PushInVal(); - KMem.CurVAL = (GetVarData(thisAddrType, thisAddr) > GetVarData(pBinProg2->nParamType2, pBinProg2->nParamAddr2)); + PLCMem.CurVAL = (GetVarData(thisAddrType, thisAddr) > GetVarData(pBinInstrcn2->nParamType2, pBinInstrcn2->nParamAddr2)); break; case OP_ST_LE: PushInVal(); - KMem.CurVAL = (GetVarData(thisAddrType, thisAddr) <= GetVarData(pBinProg2->nParamType2, pBinProg2->nParamAddr2)); + PLCMem.CurVAL = (GetVarData(thisAddrType, thisAddr) <= GetVarData(pBinInstrcn2->nParamType2, pBinInstrcn2->nParamAddr2)); break; case OP_ST_GE: PushInVal(); - KMem.CurVAL = (GetVarData(thisAddrType, thisAddr) >= GetVarData(pBinProg2->nParamType2, pBinProg2->nParamAddr2)); + PLCMem.CurVAL = (GetVarData(thisAddrType, thisAddr) >= GetVarData(pBinInstrcn2->nParamType2, pBinInstrcn2->nParamAddr2)); break; case OP_AN_EQ: - KMem.CurVAL = KMem.CurVAL && (GetVarData(thisAddrType, thisAddr) == GetVarData(pBinProg2->nParamType2, pBinProg2->nParamAddr2)); + PLCMem.CurVAL = PLCMem.CurVAL && (GetVarData(thisAddrType, thisAddr) == GetVarData(pBinInstrcn2->nParamType2, pBinInstrcn2->nParamAddr2)); break; case OP_AN_NE: - KMem.CurVAL = KMem.CurVAL && (GetVarData(thisAddrType, thisAddr) != GetVarData(pBinProg2->nParamType2, pBinProg2->nParamAddr2)); + PLCMem.CurVAL = PLCMem.CurVAL && (GetVarData(thisAddrType, thisAddr) != GetVarData(pBinInstrcn2->nParamType2, pBinInstrcn2->nParamAddr2)); break; case OP_AN_LT: - KMem.CurVAL = KMem.CurVAL && (GetVarData(thisAddrType, thisAddr) < GetVarData(pBinProg2->nParamType2, pBinProg2->nParamAddr2)); + PLCMem.CurVAL = PLCMem.CurVAL && (GetVarData(thisAddrType, thisAddr) < GetVarData(pBinInstrcn2->nParamType2, pBinInstrcn2->nParamAddr2)); break; case OP_AN_GT: - KMem.CurVAL = KMem.CurVAL && (GetVarData(thisAddrType, thisAddr) > GetVarData(pBinProg2->nParamType2, pBinProg2->nParamAddr2)); + PLCMem.CurVAL = PLCMem.CurVAL && (GetVarData(thisAddrType, thisAddr) > GetVarData(pBinInstrcn2->nParamType2, pBinInstrcn2->nParamAddr2)); break; case OP_AN_LE: - KMem.CurVAL = KMem.CurVAL && (GetVarData(thisAddrType, thisAddr) <= GetVarData(pBinProg2->nParamType2, pBinProg2->nParamAddr2)); + PLCMem.CurVAL = PLCMem.CurVAL && (GetVarData(thisAddrType, thisAddr) <= GetVarData(pBinInstrcn2->nParamType2, pBinInstrcn2->nParamAddr2)); break; case OP_AN_GE: - KMem.CurVAL = KMem.CurVAL && (GetVarData(thisAddrType, thisAddr) >= GetVarData(pBinProg2->nParamType2, pBinProg2->nParamAddr2)); + PLCMem.CurVAL = PLCMem.CurVAL && (GetVarData(thisAddrType, thisAddr) >= GetVarData(pBinInstrcn2->nParamType2, pBinInstrcn2->nParamAddr2)); break; case OP_OR_EQ: - KMem.CurVAL = KMem.CurVAL || (GetVarData(thisAddrType, thisAddr) == GetVarData(pBinProg2->nParamType2, pBinProg2->nParamAddr2)); + PLCMem.CurVAL = PLCMem.CurVAL || (GetVarData(thisAddrType, thisAddr) == GetVarData(pBinInstrcn2->nParamType2, pBinInstrcn2->nParamAddr2)); break; case OP_OR_NE: - KMem.CurVAL = KMem.CurVAL || (GetVarData(thisAddrType, thisAddr) != GetVarData(pBinProg2->nParamType2, pBinProg2->nParamAddr2)); + PLCMem.CurVAL = PLCMem.CurVAL || (GetVarData(thisAddrType, thisAddr) != GetVarData(pBinInstrcn2->nParamType2, pBinInstrcn2->nParamAddr2)); break; case OP_OR_LT: - KMem.CurVAL = KMem.CurVAL || (GetVarData(thisAddrType, thisAddr) < GetVarData(pBinProg2->nParamType2, pBinProg2->nParamAddr2)); + PLCMem.CurVAL = PLCMem.CurVAL || (GetVarData(thisAddrType, thisAddr) < GetVarData(pBinInstrcn2->nParamType2, pBinInstrcn2->nParamAddr2)); break; case OP_OR_GT: - KMem.CurVAL = KMem.CurVAL || (GetVarData(thisAddrType, thisAddr) > GetVarData(pBinProg2->nParamType2, pBinProg2->nParamAddr2)); + PLCMem.CurVAL = PLCMem.CurVAL || (GetVarData(thisAddrType, thisAddr) > GetVarData(pBinInstrcn2->nParamType2, pBinInstrcn2->nParamAddr2)); break; case OP_OR_LE: - KMem.CurVAL = KMem.CurVAL || (GetVarData(thisAddrType, thisAddr) <= GetVarData(pBinProg2->nParamType2, pBinProg2->nParamAddr2)); + PLCMem.CurVAL = PLCMem.CurVAL || (GetVarData(thisAddrType, thisAddr) <= GetVarData(pBinInstrcn2->nParamType2, pBinInstrcn2->nParamAddr2)); break; case OP_OR_GE: - KMem.CurVAL = KMem.CurVAL || (GetVarData(thisAddrType, thisAddr) >= GetVarData(pBinProg2->nParamType2, pBinProg2->nParamAddr2)); + PLCMem.CurVAL = PLCMem.CurVAL || (GetVarData(thisAddrType, thisAddr) >= GetVarData(pBinInstrcn2->nParamType2, pBinInstrcn2->nParamAddr2)); break; default: @@ -630,38 +477,38 @@ case OP_TMR: case OP_TMX: case OP_TMY: - pBinProg15 = (stBinProg15 *)(&pBinprog[CurPos]); + pBinInstrcn15 = (stBinInstrcn15 *)(&pBinInstrcn[CurPos]); { - unsigned char thisNum= pBinProg15->nOpNum; - thisAddrType = pBinProg15->nParamType1; - thisAddr = pBinProg15->nParamAddr1; + unsigned char thisNum= pBinInstrcn15->nOpNum; + thisAddrType = pBinInstrcn15->nParamType1; + thisAddr = pBinInstrcn15->nParamAddr1; switch (thisOP) { case OP_TML: - if (!KMem.Timers[thisNum].nInited) InitTimer(thisNum, 0); - if (KMem.CurVAL) RunTimer(thisNum, GetVarData(thisAddrType, thisAddr)); + if (!PLCMem.Timers[thisNum].nInited) InitTimer(thisNum, 0); + if (PLCMem.CurVAL) RunTimer(thisNum, GetVarData(thisAddrType, thisAddr)); else StopTimer(thisNum); - KMem.CurVAL = ProcessTimer(thisNum); + PLCMem.CurVAL = ProcessTimer(thisNum); break; case OP_TMR: - if (!KMem.Timers[thisNum].nInited) InitTimer(thisNum, 1); - if (KMem.CurVAL) RunTimer(thisNum, GetVarData(thisAddrType, thisAddr)); + if (!PLCMem.Timers[thisNum].nInited) InitTimer(thisNum, 1); + if (PLCMem.CurVAL) RunTimer(thisNum, GetVarData(thisAddrType, thisAddr)); else StopTimer(thisNum); - KMem.CurVAL = ProcessTimer(thisNum); + PLCMem.CurVAL = ProcessTimer(thisNum); break; case OP_TMX: - if (!KMem.Timers[thisNum].nInited) InitTimer(thisNum, 2); - if (KMem.CurVAL) RunTimer(thisNum, GetVarData(thisAddrType, thisAddr)); + if (!PLCMem.Timers[thisNum].nInited) InitTimer(thisNum, 2); + if (PLCMem.CurVAL) RunTimer(thisNum, GetVarData(thisAddrType, thisAddr)); else StopTimer(thisNum); - KMem.CurVAL = ProcessTimer(thisNum); + PLCMem.CurVAL = ProcessTimer(thisNum); break; case OP_TMY: - if (!KMem.Timers[thisNum].nInited) InitTimer(thisNum, 3); - if (KMem.CurVAL) RunTimer(thisNum, GetVarData(thisAddrType, thisAddr)); + if (!PLCMem.Timers[thisNum].nInited) InitTimer(thisNum, 3); + if (PLCMem.CurVAL) RunTimer(thisNum, GetVarData(thisAddrType, thisAddr)); else StopTimer(thisNum); - KMem.CurVAL = ProcessTimer(thisNum); + PLCMem.CurVAL = ProcessTimer(thisNum); break; default: break; @@ -673,17 +520,17 @@ // 1 ?????? case OP_INC: case OP_DEC: - pBinProg15 = (stBinProg15 *)(&pBinprog[CurPos]); - thisAddrType = pBinProg15->nParamType1; - thisAddr = pBinProg15->nParamAddr1; + pBinInstrcn15 = (stBinInstrcn15 *)(&pBinInstrcn[CurPos]); + thisAddrType = pBinInstrcn15->nParamType1; + thisAddr = pBinInstrcn15->nParamAddr1; nNextPos = 2; switch (thisOP) { case OP_INC: - if (KMem.CurVAL) SetVarData(thisAddrType, thisAddr, GetVarData(thisAddrType, thisAddr) + 1); + if (PLCMem.CurVAL) SetVarData(thisAddrType, thisAddr, GetVarData(thisAddrType, thisAddr) + 1); break; case OP_DEC: - if (KMem.CurVAL) SetVarData(thisAddrType, thisAddr, GetVarData(thisAddrType, thisAddr) - 1); + if (PLCMem.CurVAL) SetVarData(thisAddrType, thisAddr, GetVarData(thisAddrType, thisAddr) - 1); break; default: @@ -694,24 +541,24 @@ case OP_MV: case OP_ADD2: case OP_SUB2: - pBinProg2 = (stBinProg2 *)(&pBinprog[CurPos]); + pBinInstrcn2 = (stBinInstrcn2 *)(&pBinInstrcn[CurPos]); { int nParamType2, nParamAddr2; - thisAddrType = pBinProg2->nParamType1; - thisAddr = pBinProg2->nParamAddr1; - nParamType2 = pBinProg2->nParamType2; - nParamAddr2 = pBinProg2->nParamAddr2; + thisAddrType = pBinInstrcn2->nParamType1; + thisAddr = pBinInstrcn2->nParamAddr1; + nParamType2 = pBinInstrcn2->nParamType2; + nParamAddr2 = pBinInstrcn2->nParamAddr2; switch (thisOP) { case OP_MV: - if (KMem.CurVAL) SetVarData(nParamType2, nParamAddr2, GetVarData(thisAddrType, thisAddr)); + if (PLCMem.CurVAL) SetVarData(nParamType2, nParamAddr2, GetVarData(thisAddrType, thisAddr)); break; case OP_ADD2: - if (KMem.CurVAL) SetVarData(nParamType2, nParamAddr2, GetVarData(thisAddrType, thisAddr) + GetVarData(nParamType2, nParamAddr2)); + if (PLCMem.CurVAL) SetVarData(nParamType2, nParamAddr2, GetVarData(thisAddrType, thisAddr) + GetVarData(nParamType2, nParamAddr2)); break; case OP_SUB2: - if (KMem.CurVAL) SetVarData(nParamType2, nParamAddr2, GetVarData(nParamType2, nParamAddr2) - GetVarData(thisAddrType, thisAddr)); + if (PLCMem.CurVAL) SetVarData(nParamType2, nParamAddr2, GetVarData(nParamType2, nParamAddr2) - GetVarData(thisAddrType, thisAddr)); break; default: @@ -726,25 +573,25 @@ case OP_SUB3: case OP_MUL: case OP_DIV: - pBinProg3 = (stBinProg3 *)(&pBinprog[CurPos]); + pBinInstrcn3 = (stBinInstrcn3 *)(&pBinInstrcn[CurPos]); int nParamType2, nParamAddr2; int nParamType3, nParamAddr3; - thisAddrType = pBinProg3->nParamType1; - thisAddr = pBinProg3->nParamAddr1; - nParamType2 = pBinProg3->nParamType2; - nParamAddr2 = pBinProg3->nParamAddr2; - nParamType3 = pBinProg3->nParamType3; - nParamAddr3 = pBinProg3->nParamAddr3; + thisAddrType = pBinInstrcn3->nParamType1; + thisAddr = pBinInstrcn3->nParamAddr1; + nParamType2 = pBinInstrcn3->nParamType2; + nParamAddr2 = pBinInstrcn3->nParamAddr2; + nParamType3 = pBinInstrcn3->nParamType3; + nParamAddr3 = pBinInstrcn3->nParamAddr3; switch (thisOP) { case OP_ADD3: - if (KMem.CurVAL) SetVarData(nParamType3, nParamAddr3, GetVarData(thisAddrType, thisAddr) + GetVarData(nParamType2, nParamAddr2)); + if (PLCMem.CurVAL) SetVarData(nParamType3, nParamAddr3, GetVarData(thisAddrType, thisAddr) + GetVarData(nParamType2, nParamAddr2)); break; case OP_SUB3: - if (KMem.CurVAL) SetVarData(nParamType3, nParamAddr3, GetVarData(thisAddrType, thisAddr) - GetVarData(nParamType2, nParamAddr2)); + if (PLCMem.CurVAL) SetVarData(nParamType3, nParamAddr3, GetVarData(thisAddrType, thisAddr) - GetVarData(nParamType2, nParamAddr2)); break; case OP_MUL: - if (KMem.CurVAL) { + if (PLCMem.CurVAL) { short multiplicand = GetVarData(thisAddrType, thisAddr); short multiplier = GetVarData(nParamType2, nParamAddr2); int product = multiplicand * multiplier; @@ -753,7 +600,7 @@ } break; case OP_DIV: - if (KMem.CurVAL) { + if (PLCMem.CurVAL) { short dividend = GetVarData(thisAddrType, thisAddr); short divisor = GetVarData(nParamType2, nParamAddr2); short quotient = dividend / divisor; @@ -772,13 +619,14 @@ default: break; } - lastScanInputVal = GetBitValue( PLCMem.ProgTrace[CurPos>>4],CurPos&0xf); //GetBitValue(KMem.WDFs); - SetBitValue( &PLCMem.ProgTrace[CurPos>>4],CurPos&0xf, KMem.CurVAL); + lastScanInputVal = GetBitValue( PLCMem.ProgTrace[CurPos>>4],CurPos&0xf); //GetBitValue(PLCMem.WDFs); + SetBitValue( &PLCMem.ProgTrace[CurPos>>4],CurPos&0xf, PLCMem.CurVAL); -// lastScanInputVal = PLCMem.ProgTrace[CurPos]; //GetBitValue(KMem.WDFs); -// PLCMem.ProgTrace[CurPos] = KMem.CurVAL; +// lastScanInputVal = PLCMem.ProgTrace[CurPos]; //GetBitValue(PLCMem.WDFs); +// PLCMem.ProgTrace[CurPos] = PLCMem.CurVAL; CurPos += nNextPos; } PLCMem.nScanCount++; - return 0; + return CurPos; } +#endif // ENABLE_PLC diff --git a/ComLib/Src/debug.c b/ComLib/Src/debug.c index 9a11b29..dfe37f0 100644 --- a/ComLib/Src/debug.c +++ b/ComLib/Src/debug.c @@ -17,7 +17,7 @@ int sprintftime = 0; int putstrtime = 0; const unsigned char buf1[16]={0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88,0x99,0xaa,0xbb,0xcc,0xdd,0xee,0xff,0x00}; -char str1[256]; +char str1[128]; int LineCount=0; int Uart1baudval=0; int Uart2baudval=0; @@ -54,69 +54,12 @@ int ShowInitInfo() { +/* int len1=0; clearscreen(); uint32_t us1,us2,us3,us4,us5,us6; -// Locate(1,1); -/* - LoadFlashDatas(); - - LoadAndUpdateStoreCfg(); - - HAL_StatusTypeDef res; - stStoreCfg * pFCfg = (stStoreCfg *) GetCurStoreCfgAddr(); - stStoreCfg * pFCfg2 = GetNextStoreCfgAddr(pFCfg); - -int t11=GetuS(); - - for (int i=0;i<20;i++) - { - tims[i]=GetuS(); - } - clearscreen(); - len1+=sprintf(str1+len1," Ver 001 \r\n"); - len1+=sprintf(str1+len1," Uart1Baud %d Uart2Baud %d UID %08x %08x %08x \r\n",Uart1Baud,Uart2Baud,pUID[0],pUID[1],pUID[2]); - len1+=sprintf(str1+len1," Flash = %d %d %d %d res = %d ",FlashDatas[0],FlashDatas[1],FlashDatas[2],FlashDatas[3],res); - len1+=sprintf(str1+len1,"flash operation = %u %u %u\r\n",t11-t10,t10,t11); - PutStr(str1,len1); - len1=0; - len1+=sprintf(str1+len1,"%08X %X %X , PowerOn %X UpTime %X %X %X %X \r\n", - (uint32_t)pFCfg,pFCfg[0].Sign1,pFCfg[0].SN1,pFCfg[0].PowerCount,pFCfg[0].UpTime,pFCfg[0].UserData1,pFCfg[0].CRC1,pFCfg[0].EndSign1); - len1+=sprintf(str1+len1,"%08X %X %X , PowerOn %X UpTime %X %X %X %X \r\n", - (uint32_t)pFCfg2,Cfg2.Sign1,Cfg2.SN1,Cfg2.PowerCount,Cfg2.UpTime,Cfg2.UserData1,Cfg2.CRC1,Cfg2.EndSign1); - PutStr(str1,len1); -*/ - len1=0; -/* - for (int i=0;i<8;i++) - { - len1=0; - len1+=sprintf(str1+len1,"%02X:",i*32); - for (int j=0;j<8;j++) - { - len1+=sprintf(str1+len1," %02X",pFlash1[i*32+j]); - } - len1+=sprintf(str1+len1," %02X",pFlash1[i*32+8]); - for (int j=9;j<16;j++) - { - len1+=sprintf(str1+len1," %02X",pFlash1[i*32+j]); - } - len1+=sprintf(str1+len1," | %02X",pFlash1[i*32+16]); - for (int j=17;j<24;j++) - { - len1+=sprintf(str1+len1," %02X",pFlash1[i*32+j]); - } - len1+=sprintf(str1+len1," %02X",pFlash1[i*32+24]); - for (int j=25;j<32;j++) - { - len1+=sprintf(str1+len1," %02X",pFlash1[i*32+j]); - } - len1+=sprintf(str1+len1,"\r\n"); - PutStr(str1,len1); - } -*/ us1=GetuS(); int crc1 = crc_check(buf1,16); //7us us2=GetuS(); @@ -162,6 +105,7 @@ // RunTimer(0,1000); // StartTimer(2,1000); Locate(13,1);LineCount=3; + */ return 0; } diff --git a/ComLib/Src/functions.c b/ComLib/Src/functions.c index f1f0a3d..e1fb73a 100644 --- a/ComLib/Src/functions.c +++ b/ComLib/Src/functions.c @@ -73,10 +73,11 @@ void logData(unsigned char d) { - KMem.WDB[128+KMem.WDT[123]] = d; - KMem.WDT[123]++; if (KMem.WDT[123]>=100) {KMem.WDT[123]=81;} + KMem.WDB[128+KMem.WDT[7]] = d; + KMem.WDT[7]++; if (KMem.WDT[7]>=100) {KMem.WDT[7]=81;} } +/* const unsigned short crc16_table[256] = { 0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf, 0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7, @@ -148,7 +149,7 @@ } return(crc); } - + */ /* Table of CRC values for high-order byte */ const uint8_t crctablehi[] = { 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, @@ -205,7 +206,7 @@ } return (crchi << 8 | crclo); } - + /* void modbuscrc16test() { printf("\n"); @@ -216,12 +217,12 @@ // printf(" modbus crc16tablefast test, expected value : 0xd825, calculate value : 0x%x\n", crc16tablefast(crc16_data, sizeof(crc16_data))); printf(" modbus crc16bitbybit test, expected value : 0xd825, calculate value : 0x%x\n", crc16bitbybit(crc16_data, sizeof(crc16_data))); } - +*/ int InitUartstat(stUartStat * pUartstat,void * pBufRx, int nSizeRx, void * pBufTx, int nSizeTx) { memset(pUartstat,sizeof(stUartStat),0); - initQueue(&pUartstat->QRx,pBufRx,nSizeRx); - initQueue(&pUartstat->QTx,pBufTx,nSizeTx); + if (pBufRx) initQueue(&pUartstat->QRx,pBufRx,nSizeRx); + if (pBufTx) initQueue(&pUartstat->QTx,pBufTx,nSizeTx); return 0; } @@ -364,7 +365,9 @@ logData(value); } } -#endif +#else + UNUSED(value); +#endif } } @@ -396,6 +399,8 @@ #else Uart2UnsetDE(); #endif + Uart2Stat.bSendDone = 1; + TriggerPendSV(); } void Uart2RecvDone() { diff --git a/Ext_FPx/Inc/BoardType.h b/Ext_FPx/Inc/BoardType.h index 75c28e5..590e1b4 100644 --- a/Ext_FPx/Inc/BoardType.h +++ b/Ext_FPx/Inc/BoardType.h @@ -57,7 +57,10 @@ #define HSE_VALUE ((uint32_t)8000000) /*!< Value of the External oscillator in Hz */ #endif - +#define ENABLE_FPX 1 +//#define ENABLE_PLC 0 +//#define ENABLE_RF 0 +//#define ENABLE_NET 0 #define GetBoardType() (BOARD_TYPE) @@ -78,5 +81,42 @@ #define DOUTPUT 0 #endif +typedef struct tagInfoBlockHdr { + unsigned short nBlkSign; // 开始标志 + unsigned short nBlkTypeVer; // 类型和版本 + unsigned short nBlkSize; // Block 大小, 包括开始和结束标志 + unsigned short Pad1; +}stInfoBlockHdr; + +typedef struct tagInfoBlockTail { + + unsigned short CRC16; + unsigned short EndSign; +}stInfoBlockTail; + +typedef struct tagBtLdrInfoBlock { + stInfoBlockHdr Hdr; + unsigned short nBtldrVer; + unsigned short nBtldrDevice; + unsigned short nBtldrSize; // 设计大小 + unsigned short nBtldrDataSize; //代码大小 + unsigned int nBtldr_AppAddr; + unsigned int nBtldr_NewAppInfoAddr; + unsigned int nBtldr_NewAppAddr; + stInfoBlockTail tail; +}stBtLdrInfoBlock, *pBtLdrInfoBlock; + +typedef struct tagAppInfoBlock { + stInfoBlockHdr Hdr; + unsigned short nAppVer; + unsigned short nAppDevice; + unsigned short nAppSize; // 代码设计大小 + unsigned short nAppDataSize; //实际代码大小 + unsigned int nAppStartAddr; + unsigned int nAppStartOffset; + unsigned int nApp; + stInfoBlockTail tail; +}stAppInfoBlock, * pAppInfoBlock; + #endif /* __BOARDTYPE_H__ */ diff --git a/Ext_FPx/Inc/FPx.h b/Ext_FPx/Inc/FPx.h index 4ab09f9..e3b05ef 100644 --- a/Ext_FPx/Inc/FPx.h +++ b/Ext_FPx/Inc/FPx.h @@ -71,7 +71,7 @@ #define SetFPxDEPin_0() LL_GPIO_ResetOutputPin(FPxDE_PORT,FPxDE_PIN) #define SetFPxDEPin_1() LL_GPIO_SetOutputPin(FPxDE_PORT,FPxDE_PIN) -typedef void *(*FPxCBFuncDef) (int nEvent, void * pBuf, int); //callback func ,prama s is void *,void *,int; return void *; +typedef void *(*FPxEvCBFuncDef) (int nEvent, void * pBuf, int); //callback func ,prama s is void *,void *,int; return void *; // extern uint8_t PktBuf1[64]; @@ -94,8 +94,8 @@ volatile uint8_t oldSYN; int RSTCount0; int bFirstReq; - FPxCBFuncDef FPxCBFunc; - uint8_t bFPxCallBackFuncSet; + FPxEvCBFuncDef FPxEvCBFunc; +// uint8_t bFPxCallBackFuncSet; @@ -142,13 +142,13 @@ uint8_t FPx_SetIOCount(int nInputBytes, int nOutputBytes); uint8_t FPx_Proc(void); -uint8_t FPxCalBCC(uint8_t* pBuf, uint8_t len1); +uint8_t FPxBCC(uint8_t* pBuf, uint8_t len1); uint8_t FPxCheckPkt(uint8_t * pBuf, uint8_t len1); uint8_t FPxParsePkt(uint8_t * pBuf, uint8_t len1); uint8_t FPxSendPkt(uint8_t * pBuf, uint8_t len1); -int FPxSetCallBackFunc(FPxCBFuncDef Func1); +int FPxSetCallBackFunc(FPxEvCBFuncDef Func1); enum enumFPxCallBackEvent { diff --git a/MDK-ARM/F030C8T6_Ext_FPx.uvprojx "b/Ext_FPx/MDK-ARM/Ext_FPx_C8T6_\346\235\276\344\270\213\346\211\251\345\261\225.uvprojx" similarity index 81% rename from MDK-ARM/F030C8T6_Ext_FPx.uvprojx rename to "Ext_FPx/MDK-ARM/Ext_FPx_C8T6_\346\235\276\344\270\213\346\211\251\345\261\225.uvprojx" index d44866c..9140f49 100644 --- a/MDK-ARM/F030C8T6_Ext_FPx.uvprojx +++ "b/Ext_FPx/MDK-ARM/Ext_FPx_C8T6_\346\235\276\344\270\213\346\211\251\345\261\225.uvprojx" @@ -7,7 +7,7 @@ <Targets> <Target> - <TargetName>F030C8T6_Ext_FPx</TargetName> + <TargetName>Ext_FPx_F030C8T6</TargetName> <ToolsetNumber>0x4</ToolsetNumber> <ToolsetName>ARM-ADS</ToolsetName> <pCCUsed>5060422::V5.06 update 4 (build 422)::ARMCC</pCCUsed> @@ -48,13 +48,13 @@ <InvalidFlash>1</InvalidFlash> </TargetStatus> <OutputDirectory>.\EXT_FPX\</OutputDirectory> - <OutputName>F030C8T6_Ext_FPx</OutputName> + <OutputName>Ext_FPx</OutputName> <CreateExecutable>1</CreateExecutable> <CreateLib>0</CreateLib> <CreateHexFile>1</CreateHexFile> <DebugInformation>1</DebugInformation> <BrowseInformation>1</BrowseInformation> - <ListingPath>.\F030C8T6_Test2\</ListingPath> + <ListingPath>.\</ListingPath> <HexFormatSelection>1</HexFormatSelection> <Merge32K>0</Merge32K> <CreateBatchFile>0</CreateBatchFile> @@ -335,7 +335,7 @@ <MiscControls></MiscControls> <Define>USE_FULL_LL_DRIVER,USE_HAL_DRIVER</Define> <Undefine></Undefine> - <IncludePath>../Ext_FPx/Inc;../Ext_FPx/Src;../Drivers/STM32F0xx_HAL_Driver/Inc;../Drivers/CMSIS/Device/ST/STM32F0xx/Include;../Drivers/CMSIS/Include;../Drivers/STM32F0xx_HAL_Driver/Inc/Legacy;../Comlib/Inc</IncludePath> + <IncludePath>../Inc;../Src;../../Drivers/STM32F0xx_HAL_Driver/Inc;../../Drivers/CMSIS/Device/ST/STM32F0xx/Include;../../Drivers/CMSIS/Include;../../Drivers/STM32F0xx_HAL_Driver/Inc/Legacy;../../Comlib/Inc</IncludePath> </VariousControls> </Cads> <Aads> @@ -392,67 +392,67 @@ <File> <FileName>BSP.h</FileName> <FileType>5</FileType> - <FilePath>..\ComLib\Inc\BSP.h</FilePath> + <FilePath>..\..\ComLib\Inc\BSP.h</FilePath> </File> <File> <FileName>debug.h</FileName> <FileType>5</FileType> - <FilePath>..\ComLib\Inc\debug.h</FilePath> + <FilePath>..\..\ComLib\Inc\debug.h</FilePath> </File> <File> <FileName>functions.h</FileName> <FileType>5</FileType> - <FilePath>..\ComLib\Inc\functions.h</FilePath> + <FilePath>..\..\ComLib\Inc\functions.h</FilePath> </File> <File> <FileName>GlobalDef.h</FileName> <FileType>5</FileType> - <FilePath>..\ComLib\Inc\GlobalDef.h</FilePath> + <FilePath>..\..\ComLib\Inc\GlobalDef.h</FilePath> </File> <File> <FileName>KBus.h</FileName> <FileType>5</FileType> - <FilePath>..\ComLib\Inc\KBus.h</FilePath> + <FilePath>..\..\ComLib\Inc\KBus.h</FilePath> </File> <File> <FileName>KLink.h</FileName> <FileType>5</FileType> - <FilePath>..\ComLib\Inc\KLink.h</FilePath> + <FilePath>..\..\ComLib\Inc\KLink.h</FilePath> </File> <File> <FileName>KMachine.h</FileName> <FileType>5</FileType> - <FilePath>..\ComLib\Inc\KMachine.h</FilePath> + <FilePath>..\..\ComLib\Inc\KMachine.h</FilePath> </File> <File> <FileName>ModbusRTU.h</FileName> <FileType>5</FileType> - <FilePath>..\ComLib\Inc\ModbusRTU.h</FilePath> + <FilePath>..\..\ComLib\Inc\ModbusRTU.h</FilePath> </File> <File> <FileName>MyQueue.h</FileName> <FileType>5</FileType> - <FilePath>..\ComLib\Inc\MyQueue.h</FilePath> + <FilePath>..\..\ComLib\Inc\MyQueue.h</FilePath> </File> <File> <FileName>PLCfunctions.h</FileName> <FileType>5</FileType> - <FilePath>..\ComLib\Inc\PLCfunctions.h</FilePath> + <FilePath>..\..\ComLib\Inc\PLCfunctions.h</FilePath> </File> <File> <FileName>shell.h</FileName> <FileType>5</FileType> - <FilePath>..\ComLib\Inc\shell.h</FilePath> + <FilePath>..\..\ComLib\Inc\shell.h</FilePath> </File> <File> <FileName>stm32_assert.h</FileName> <FileType>5</FileType> - <FilePath>..\ComLib\Inc\stm32_assert.h</FilePath> + <FilePath>..\..\ComLib\Inc\stm32_assert.h</FilePath> </File> <File> <FileName>stm32f0xx_it.h</FileName> <FileType>5</FileType> - <FilePath>..\ComLib\Inc\stm32f0xx_it.h</FilePath> + <FilePath>..\..\ComLib\Inc\stm32f0xx_it.h</FilePath> </File> </Files> </Group> @@ -462,67 +462,67 @@ <File> <FileName>debug.c</FileName> <FileType>1</FileType> - <FilePath>..\ComLib\Src\debug.c</FilePath> + <FilePath>..\..\ComLib\Src\debug.c</FilePath> </File> <File> <FileName>functions.c</FileName> <FileType>1</FileType> - <FilePath>..\ComLib\Src\functions.c</FilePath> + <FilePath>..\..\ComLib\Src\functions.c</FilePath> </File> <File> <FileName>GlobalDef.c</FileName> <FileType>1</FileType> - <FilePath>..\ComLib\Src\GlobalDef.c</FilePath> + <FilePath>..\..\ComLib\Src\GlobalDef.c</FilePath> </File> <File> <FileName>KBus.c</FileName> <FileType>1</FileType> - <FilePath>..\ComLib\Src\KBus.c</FilePath> + <FilePath>..\..\ComLib\Src\KBus.c</FilePath> </File> <File> <FileName>KLink.c</FileName> <FileType>1</FileType> - <FilePath>..\ComLib\Src\KLink.c</FilePath> + <FilePath>..\..\ComLib\Src\KLink.c</FilePath> </File> <File> <FileName>ModbusRTU.c</FileName> <FileType>1</FileType> - <FilePath>..\ComLib\Src\ModbusRTU.c</FilePath> + <FilePath>..\..\ComLib\Src\ModbusRTU.c</FilePath> </File> <File> <FileName>MyQueue.c</FileName> <FileType>1</FileType> - <FilePath>..\ComLib\Src\MyQueue.c</FilePath> + <FilePath>..\..\ComLib\Src\MyQueue.c</FilePath> </File> <File> <FileName>PLCfunctions.c</FileName> <FileType>1</FileType> - <FilePath>..\ComLib\Src\PLCfunctions.c</FilePath> + <FilePath>..\..\ComLib\Src\PLCfunctions.c</FilePath> </File> <File> <FileName>shell.c</FileName> <FileType>1</FileType> - <FilePath>..\ComLib\Src\shell.c</FilePath> + <FilePath>..\..\ComLib\Src\shell.c</FilePath> </File> <File> <FileName>stm32f0xx_hal_msp.c</FileName> <FileType>1</FileType> - <FilePath>..\ComLib\Src\stm32f0xx_hal_msp.c</FilePath> + <FilePath>..\..\ComLib\Src\stm32f0xx_hal_msp.c</FilePath> </File> <File> <FileName>KMachine.c</FileName> <FileType>1</FileType> - <FilePath>..\ComLib\Src\KMachine.c</FilePath> + <FilePath>..\..\ComLib\Src\KMachine.c</FilePath> </File> <File> <FileName>BSP.c</FileName> <FileType>1</FileType> - <FilePath>..\ComLib\Src\BSP.c</FilePath> + <FilePath>..\..\ComLib\Src\BSP.c</FilePath> </File> <File> <FileName>stm32f0xx_it.c</FileName> <FileType>1</FileType> - <FilePath>..\ComLib\Src\stm32f0xx_it.c</FilePath> + <FilePath>..\..\ComLib\Src\stm32f0xx_it.c</FilePath> </File> </Files> </Group> @@ -532,27 +532,27 @@ <File> <FileName>BoardType.h</FileName> <FileType>5</FileType> - <FilePath>..\Ext_FPx\Inc\BoardType.h</FilePath> + <FilePath>..\Inc\BoardType.h</FilePath> </File> <File> <FileName>main.h</FileName> <FileType>5</FileType> - <FilePath>..\Ext_FPx\Inc\main.h</FilePath> + <FilePath>..\Inc\main.h</FilePath> </File> <File> <FileName>stm32f0xx_ll_rcc.h</FileName> <FileType>5</FileType> - <FilePath>..\Ext_FPx\Inc\stm32f0xx_ll_rcc.h</FilePath> + <FilePath>..\Inc\stm32f0xx_ll_rcc.h</FilePath> </File> <File> <FileName>stm32f0xx_hal_conf.h</FileName> <FileType>5</FileType> - <FilePath>..\Ext_FPx\Inc\stm32f0xx_hal_conf.h</FilePath> + <FilePath>..\Inc\stm32f0xx_hal_conf.h</FilePath> </File> <File> <FileName>FPx.h</FileName> <FileType>5</FileType> - <FilePath>..\Ext_FPx\Inc\FPx.h</FilePath> + <FilePath>..\Inc\FPx.h</FilePath> </File> </Files> </Group> @@ -562,17 +562,17 @@ <File> <FileName>main.c</FileName> <FileType>1</FileType> - <FilePath>..\Ext_FPx\Src\main.c</FilePath> + <FilePath>..\Src\main.c</FilePath> </File> <File> <FileName>BoardType.c</FileName> <FileType>1</FileType> - <FilePath>..\Ext_FPx\Src\BoardType.c</FilePath> + <FilePath>..\Src\BoardType.c</FilePath> </File> <File> <FileName>FPx.c</FileName> <FileType>1</FileType> - <FilePath>..\Ext_FPx\Src\FPx.c</FilePath> + <FilePath>..\Src\FPx.c</FilePath> </File> </Files> </Group> @@ -582,7 +582,7 @@ <File> <FileName>system_stm32f0xx.c</FileName> <FileType>1</FileType> - <FilePath>..\ComLib\Src\system_stm32f0xx.c</FilePath> + <FilePath>..\..\ComLib\Src\system_stm32f0xx.c</FilePath> </File> </Files> </Group> @@ -592,122 +592,122 @@ <File> <FileName>stm32f0xx_ll_gpio.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_gpio.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_gpio.c</FilePath> </File> <File> <FileName>stm32f0xx_ll_exti.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_exti.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_exti.c</FilePath> </File> <File> <FileName>stm32f0xx_ll_adc.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_adc.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_adc.c</FilePath> </File> <File> <FileName>stm32f0xx_ll_dma.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_dma.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_dma.c</FilePath> </File> <File> <FileName>stm32f0xx_ll_spi.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_spi.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_spi.c</FilePath> </File> <File> <FileName>stm32f0xx_hal_tim.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim.c</FilePath> </File> <File> <FileName>stm32f0xx_hal_tim_ex.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim_ex.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim_ex.c</FilePath> </File> <File> <FileName>stm32f0xx_ll_usart.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_usart.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_usart.c</FilePath> </File> <File> <FileName>stm32f0xx_ll_rcc.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_rcc.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_rcc.c</FilePath> </File> <File> <FileName>stm32f0xx_hal_rcc.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc.c</FilePath> </File> <File> <FileName>stm32f0xx_hal_rcc_ex.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc_ex.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc_ex.c</FilePath> </File> <File> <FileName>stm32f0xx_hal.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.c</FilePath> </File> <File> <FileName>stm32f0xx_hal_i2c.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_i2c.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_i2c.c</FilePath> </File> <File> <FileName>stm32f0xx_hal_i2c_ex.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_i2c_ex.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_i2c_ex.c</FilePath> </File> <File> <FileName>stm32f0xx_hal_gpio.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_gpio.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_gpio.c</FilePath> </File> <File> <FileName>stm32f0xx_hal_dma.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_dma.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_dma.c</FilePath> </File> <File> <FileName>stm32f0xx_hal_cortex.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_cortex.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_cortex.c</FilePath> </File> <File> <FileName>stm32f0xx_hal_pwr.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pwr.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pwr.c</FilePath> </File> <File> <FileName>stm32f0xx_hal_pwr_ex.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pwr_ex.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pwr_ex.c</FilePath> </File> <File> <FileName>stm32f0xx_hal_flash.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_flash.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_flash.c</FilePath> </File> <File> <FileName>stm32f0xx_hal_flash_ex.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_flash_ex.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_flash_ex.c</FilePath> </File> <File> <FileName>stm32f0xx_ll_utils.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_utils.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_utils.c</FilePath> </File> <File> <FileName>stm32f0xx_ll_tim.c</FileName> <FileType>1</FileType> - <FilePath>..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_ll_tim.c</FilePath> + <FilePath>..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_ll_tim.c</FilePath> </File> <File> <FileName>stm32f0xx_ll_flash.c</FileName> <FileType>1</FileType> - <FilePath>..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_ll_flash.c</FilePath> + <FilePath>..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_ll_flash.c</FilePath> </File> </Files> </Group> @@ -724,7 +724,7 @@ <component Cclass="CMSIS" Cgroup="CORE" Cvendor="ARM" Cversion="5.4.0" condition="ARMv6_7_8-M Device"> <package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="5.7.0"/> <targetInfos> - <targetInfo name="F030C8T6_Ext_FPx"/> + <targetInfo name="Ext_FPx_F030C8T6"/> </targetInfos> </component> </components> diff --git a/Ext_FPx/MDK-ARM/startup_stm32f030x8.s b/Ext_FPx/MDK-ARM/startup_stm32f030x8.s new file mode 100644 index 0000000..4622872 --- /dev/null +++ b/Ext_FPx/MDK-ARM/startup_stm32f030x8.s @@ -0,0 +1,252 @@ +;******************** (C) COPYRIGHT 2016 STMicroelectronics ******************** +;* File Name : startup_stm32f030x8.s +;* Author : MCD Application Team +;* Description : STM32F030x8 devices vector table for MDK-ARM toolchain. +;* This module performs: +;* - Set the initial SP +;* - Set the initial PC == Reset_Handler +;* - Set the vector table entries with the exceptions ISR address +;* - Branches to __main in the C library (which eventually +;* calls main()). +;* After Reset the CortexM0 processor is in Thread mode, +;* priority is Privileged, and the Stack is set to Main. +;* <<< Use Configuration Wizard in Context Menu >>> +;******************************************************************************* +;* +;* Redistribution and use in source and binary forms, with or without modification, +;* are permitted provided that the following conditions are met: +;* 1. Redistributions of source code must retain the above copyright notice, +;* this list of conditions and the following disclaimer. +;* 2. Redistributions in binary form must reproduce the above copyright notice, +;* this list of conditions and the following disclaimer in the documentation +;* and/or other materials provided with the distribution. +;* 3. Neither the name of STMicroelectronics nor the names of its contributors +;* may be used to endorse or promote products derived from this software +;* without specific prior written permission. +;* +;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +;* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +;* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +;* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +;* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +;* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +;* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +;* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +;* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +; +;******************************************************************************* + +; Amount of memory (in bytes) allocated for Stack +; Tailor this value to your application needs +; <h> Stack Configuration +; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> +; </h> + +Stack_Size EQU 0x400 + + AREA STACK, NOINIT, READWRITE, ALIGN=3 +Stack_Mem SPACE Stack_Size +__initial_sp + + +; <h> Heap Configuration +; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> +; </h> + +Heap_Size EQU 0x200 + + AREA HEAP, NOINIT, READWRITE, ALIGN=3 +__heap_base +Heap_Mem SPACE Heap_Size +__heap_limit + + PRESERVE8 + THUMB + + +; Vector Table Mapped to Address 0 at Reset + AREA RESET, DATA, READONLY + EXPORT __Vectors + EXPORT __Vectors_End + EXPORT __Vectors_Size + +__Vectors DCD __initial_sp ; Top of Stack + DCD Reset_Handler ; Reset Handler + DCD NMI_Handler ; NMI Handler + DCD HardFault_Handler ; Hard Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External Interrupts + DCD WWDG_IRQHandler ; Window Watchdog + DCD 0 ; Reserved + DCD RTC_IRQHandler ; RTC through EXTI Line + DCD FLASH_IRQHandler ; FLASH + DCD RCC_IRQHandler ; RCC + DCD EXTI0_1_IRQHandler ; EXTI Line 0 and 1 + DCD EXTI2_3_IRQHandler ; EXTI Line 2 and 3 + DCD EXTI4_15_IRQHandler ; EXTI Line 4 to 15 + DCD 0 ; Reserved + DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1 + DCD DMA1_Channel2_3_IRQHandler ; DMA1 Channel 2 and Channel 3 + DCD DMA1_Channel4_5_IRQHandler ; DMA1 Channel 4 and Channel 5 + DCD ADC1_IRQHandler ; ADC1 + DCD TIM1_BRK_UP_TRG_COM_IRQHandler ; TIM1 Break, Update, Trigger and Commutation + DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare + DCD 0 ; Reserved + DCD TIM3_IRQHandler ; TIM3 + DCD TIM6_IRQHandler ; TIM6 + DCD 0 ; Reserved + DCD TIM14_IRQHandler ; TIM14 + DCD TIM15_IRQHandler ; TIM15 + DCD TIM16_IRQHandler ; TIM16 + DCD TIM17_IRQHandler ; TIM17 + DCD I2C1_IRQHandler ; I2C1 + DCD I2C2_IRQHandler ; I2C2 + DCD SPI1_IRQHandler ; SPI1 + DCD SPI2_IRQHandler ; SPI2 + DCD USART1_IRQHandler ; USART1 + DCD USART2_IRQHandler ; USART2 + +__Vectors_End + +__Vectors_Size EQU __Vectors_End - __Vectors + + AREA |.text|, CODE, READONLY + +; Reset handler routine +Reset_Handler PROC + EXPORT Reset_Handler [WEAK] + IMPORT __main + IMPORT SystemInit + LDR R0, =SystemInit + BLX R0 + LDR R0, =__main + BX R0 + ENDP + +; Dummy Exception Handlers (infinite loops which can be modified) + +NMI_Handler PROC + EXPORT NMI_Handler [WEAK] + B . + ENDP +HardFault_Handler\ + PROC + EXPORT HardFault_Handler [WEAK] + B . + ENDP +SVC_Handler PROC + EXPORT SVC_Handler [WEAK] + B . + ENDP +PendSV_Handler PROC + EXPORT PendSV_Handler [WEAK] + B . + ENDP +SysTick_Handler PROC + EXPORT SysTick_Handler [WEAK] + B . + ENDP + +Default_Handler PROC + + EXPORT WWDG_IRQHandler [WEAK] + EXPORT RTC_IRQHandler [WEAK] + EXPORT FLASH_IRQHandler [WEAK] + EXPORT RCC_IRQHandler [WEAK] + EXPORT EXTI0_1_IRQHandler [WEAK] + EXPORT EXTI2_3_IRQHandler [WEAK] + EXPORT EXTI4_15_IRQHandler [WEAK] + EXPORT DMA1_Channel1_IRQHandler [WEAK] + EXPORT DMA1_Channel2_3_IRQHandler [WEAK] + EXPORT DMA1_Channel4_5_IRQHandler [WEAK] + EXPORT ADC1_IRQHandler [WEAK] + EXPORT TIM1_BRK_UP_TRG_COM_IRQHandler [WEAK] + EXPORT TIM1_CC_IRQHandler [WEAK] + EXPORT TIM3_IRQHandler [WEAK] + EXPORT TIM6_IRQHandler [WEAK] + EXPORT TIM14_IRQHandler [WEAK] + EXPORT TIM15_IRQHandler [WEAK] + EXPORT TIM16_IRQHandler [WEAK] + EXPORT TIM17_IRQHandler [WEAK] + EXPORT I2C1_IRQHandler [WEAK] + EXPORT I2C2_IRQHandler [WEAK] + EXPORT SPI1_IRQHandler [WEAK] + EXPORT SPI2_IRQHandler [WEAK] + EXPORT USART1_IRQHandler [WEAK] + EXPORT USART2_IRQHandler [WEAK] + + +WWDG_IRQHandler +RTC_IRQHandler +FLASH_IRQHandler +RCC_IRQHandler +EXTI0_1_IRQHandler +EXTI2_3_IRQHandler +EXTI4_15_IRQHandler +DMA1_Channel1_IRQHandler +DMA1_Channel2_3_IRQHandler +DMA1_Channel4_5_IRQHandler +ADC1_IRQHandler +TIM1_BRK_UP_TRG_COM_IRQHandler +TIM1_CC_IRQHandler +TIM3_IRQHandler +TIM6_IRQHandler +TIM14_IRQHandler +TIM15_IRQHandler +TIM16_IRQHandler +TIM17_IRQHandler +I2C1_IRQHandler +I2C2_IRQHandler +SPI1_IRQHandler +SPI2_IRQHandler +USART1_IRQHandler +USART2_IRQHandler + + B . + + ENDP + + ALIGN + +;******************************************************************************* +; User Stack and Heap initialization +;******************************************************************************* + IF :DEF:__MICROLIB + + EXPORT __initial_sp + EXPORT __heap_base + EXPORT __heap_limit + + ELSE + + IMPORT __use_two_region_memory + EXPORT __user_initial_stackheap + +__user_initial_stackheap + + LDR R0, = Heap_Mem + LDR R1, =(Stack_Mem + Stack_Size) + LDR R2, = (Heap_Mem + Heap_Size) + LDR R3, = Stack_Mem + BX LR + + ALIGN + + ENDIF + + END + +;************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE***** diff --git a/Ext_FPx/Src/BoardType.c b/Ext_FPx/Src/BoardType.c index e69de29..d92901f 100644 --- a/Ext_FPx/Src/BoardType.c +++ b/Ext_FPx/Src/BoardType.c @@ -0,0 +1,93 @@ +#include "BoardType.h" +#include "KMachine.h" +#include "KBus.h" + +#define APP_ADDR 0x08001000 //应用程序首地址定义 +#define APPINFOBLOCK_ADDR (APP_ADDR + 0x100) //程序信息块 地址 +#define INFOBLOCK_ADDR (APP_ADDR + 0x1000) //信息块 地址 + +#define APP_START_ADDR IROM1_START_ADDRESS +extern int Region$$Table$$Limit; + +#define MAKE_VER(x,y) ((x<<8)|y) +#define APP_VER MAKE_VER(1,16) + +const stAppInfoBlock AppInfoBlock __attribute__((at(APPINFOBLOCK_ADDR))) = +{ + 0xAA55, // StartSign + 0x0301, // BlockType + sizeof(stAppInfoBlock), //BlockSize + 0, // Pad, + APP_VER, //AppVer + (BOARD_TYPE<<8) + BOARD_VER, //AppDevice; + 0x1000, //AppSize; + 0x0C00, //AppDataSize; + APP_ADDR, //nAppStartAddr + (int)&Region$$Table$$Limit, //nBtldr_NewAppInfoAddr + 0x08009000, //nBtldr_NewAppAddr + 0xCCCC, //crc16; + 0xAA55 //EndSign; + +}; + + +const stKMInfoBlock KMInfoBlock __attribute__((at(INFOBLOCK_ADDR))) = +{ +// sizeof(stKMInfoBlock), + (BOARD_TYPE<<8) + BOARD_VER, //nDeviceType BOARD_VER, //nDevieVer + APP_VER, //ProgVer + 0x0102, //KLinkVer + KBUS_VER, //KBusVer +// 0x0100, //KNetVer +// 0x0100, //KWLVer + + 4, //nCapacity1 ?K + 1, //nCapacity2 ?k + + DINPUT, //nDInput; + DOUTPUT, //nDOutput + + 0, //nAInput + 0, //nAOutput + 0, //nHInput + 0, //nHOutput + 0, //nExt1; + 0, //nExt2; + 0, //nLogSize; + 3, //nPorts; + 0, //nManSize; + 0, //nAbility; + 6, //nSwitchBits; +}; + +const stDeviceInfo MyDeviceInfo={ + + (BOARD_TYPE<<8) + BOARD_VER, //nDeviceTypeVer // unsigned short ClientType; // 子机类型 + APP_VER, //ProgVer // unsigned short ClientVer; // 子机版本 + + DINPUT, // unsigned char InBitCount; // 输入开关量数量 + DOUTPUT, // unsigned char OutBitCount; // 输出开关量数量 + 0, // unsigned char InDWCount; // 输入数据字数 + 0, // unsigned char OutDWCount; // 输出数据字数 + 0, // unsigned char AIWCount; // 输入模拟量通道(字)数 // 16位为一个字(通道) + 0, // unsigned char AQWCount; // 输出模拟量通道(字)数 // 16位为一个字(通道) +// 0, // unsigned char AIBits; // 每通道位数 // 16位以下 +// 0, // unsigned char AQbits; // 每通道位数 // 16位以下 +}; + +const stExDeviceInfo MyExDeviceInfo ={ + (BOARD_TYPE<<8) + BOARD_VER, //nDeviceTypeVer // unsigned short ClientType; // 子机类型 + APP_VER, //ProgVer // unsigned short ClientVer; // 子机版本 + + DINPUT, // unsigned char InBitCount; // 输入开关量数量 + DOUTPUT, // unsigned char OutBitCount; // 输出开关量数量 + 0, // unsigned char InDWCount; // 输入数据字数 + 0, // unsigned char OutDWCount; // 输出数据字数 + 0, // unsigned char AIWCount; // 输入模拟量通道(字)数 // 16位为一个字(通道) + 0, // unsigned char AQWCount; // 输出模拟量通道(字)数 // 16位为一个字(通道) +// 0, // unsigned char AIBits; // 每通道位数 // 16位以下 +// 0, // unsigned char AQbits; // 每通道位数 // 16位以下 + +}; + + diff --git a/Ext_FPx/Src/FPx.c b/Ext_FPx/Src/FPx.c index a4e15fe..33353b2 100644 --- a/Ext_FPx/Src/FPx.c +++ b/Ext_FPx/Src/FPx.c @@ -39,8 +39,6 @@ stFPxStat FPxStat; stFPxMem FPxMem; - - uint8_t FPx_Init(int nChilds) { bSPI1Sending=0; @@ -53,7 +51,7 @@ FPxStat.nOutputBytes=2; } else { - FPxStat.nInputBytes=nChilds+1; //鏍规嵁瀛愭満鏁伴噺锛屾姤鍛婃墿灞曞閲� + FPxStat.nInputBytes=nChilds; //鏍规嵁瀛愭満鏁伴噺锛屾姤鍛婃墿灞曞閲� FPxStat.nOutputBytes=nChilds; } SetACKPin_0(); @@ -72,10 +70,10 @@ return 0; } -int FPxSetCallBackFunc(FPxCBFuncDef func1) +int FPxSetCallBackFunc(FPxEvCBFuncDef func1) { - FPxStat.FPxCBFunc = func1; - FPxStat.bFPxCallBackFuncSet = 1; + FPxStat.FPxEvCBFunc = func1; +// FPxStat.bFPxCallBackFuncSet = 1; return 0; } @@ -90,43 +88,60 @@ // KMem.WY[5]=CurSEL; // KMem.WY[6]=CurSYN; // KMem.WY[7]=CurACK; - if (CurOE) { + if (CurOE) { // disable output for (int j=0;j<FPxStat.nOutputBytes;j++) { FPxMem.WLYB[j]=0; } - if (FPxStat.bFPxCallBackFuncSet) FPxStat.FPxCBFunc(evFPxStateChange,0,0); - if (FPxStat.bFPxCallBackFuncSet) FPxStat.FPxCBFunc(evFPxDataUpdate,0,0); + if (FPxStat.FPxEvCBFunc) FPxStat.FPxEvCBFunc(evFPxStateChange,0,0); + if (FPxStat.FPxEvCBFunc) FPxStat.FPxEvCBFunc(evFPxDataUpdate,0,0); } - if (!CurRST) {FPxStat.RSTCount0=GetuS();} + if (!CurRST) { // in reset + FPxStat.RSTCount0=GetuS(); + SetACKPin_0(); + FPxStat.bFirstReq=0; + LL_SPI_Disable(SPI2); + FPxStat.bConfiged = 0; + nSPI1RecvPos=0; + + } if (!FPxStat.bFirstReq && CurRST) - { + { // after Reset; int RSTCount = GetuS() - FPxStat.RSTCount0 ; - if (RSTCount>=10000) + if (RSTCount>=1000) { + logData(0x11); + SetACKPin_1(); FPxStat.bFirstReq=1; // RSTCount=0; // bSPI1Recving=1; // KMem.WX[7]=RSTCount/1000; + LL_SPI_Disable(SPI2); + LL_SPI_Enable(SPI2); + nSPI1RecvPos=0; } } if (CurSYN ==0 && FPxStat.oldSYN != 0) { KMem.WDT[121] = KMem.WDT[122]; KMem.WDT[122]=0; + nSPI1RecvPos=0; + logData(0x12); } if (CurSEL && CurSYN !=0 && FPxStat.oldSYN == 0){ bSPI1Recving=1; - nSPI1RecvPos=0; + // nSPI1RecvPos=0; LL_SPI_Disable(SPI2); - nSPI1RecvPos=0; + // nSPI1RecvPos=0; LL_SPI_Enable(SPI2); + logData(0x13); } if (CurSEL && CurSYN && !bSPI1Sending && !bSPI1Recving) { bSPI1Recving=1; nSPI1RecvPos=0; + logData(0x14); } if (CurSYN == 0){ @@ -146,7 +161,7 @@ return 0; } -uint8_t FPxCalBCC(uint8_t* pBuf, uint8_t len1) +uint8_t FPxBCC(uint8_t* pBuf, uint8_t len1) { uint8_t BCC=0; for (int i=0;i<len1;i++) @@ -180,20 +195,28 @@ if (!FPxStat.bConfiged || (FPxStat.bConfiged && nStationID == FPxStat.nConfigStationId)) { KMem.WDT[8]++; + + KMem.WDT[0]= nST; + KMem.WDT[1]= len1; + KMem.WDT[2] = FPxStat.nConfigStationId; + + KMem.WDT[4]= FPxStat.nInputBytes; + KMem.WDT[5]= FPxStat.nOutputBytes; + pFPxQuRplyPkt p1 = (pFPxQuRplyPkt)PktBuf2; p1->Hdr1=nST; p1->nInputBytes=0x30|FPxStat.nInputBytes; p1->nOutputBytes=0x30|FPxStat.nOutputBytes; p1->nParam1=0x30|0x05; - p1->nBCC= 0x30|FPxCalBCC(PktBuf2,4); + p1->nBCC= 0x30|FPxBCC(PktBuf2,4); p1->End1=0x0d; - logData(0x11); + logData(0x22); FPxSendPkt(PktBuf2,sizeof(stFPxQuRplyPkt)); FPxStat.nConfigStationId=nStationID; FPxStat.bConfiged=1; - if (FPxStat.bFPxCallBackFuncSet) FPxStat.FPxCBFunc(evFPxStateChange,0,0); + if (FPxStat.FPxEvCBFunc) FPxStat.FPxEvCBFunc(evFPxStateChange,0,0); } bSPI1Recving=1; break; @@ -223,7 +246,7 @@ KMem.WYB[j]=(0xff); } // */ - if (FPxStat.bFPxCallBackFuncSet) FPxStat.FPxCBFunc(evFPxDataUpdate,0,0); + if (FPxStat.FPxEvCBFunc) FPxStat.FPxEvCBFunc(evFPxDataUpdate,0,0); // KMem.WDT[2]=((pBuf[1]&0xf)<<4) + ((pBuf[2]&0xf)<<0) + ((pBuf[3]&0xf)<<12) + ((pBuf[4]&0xf)<<8); pFPxEXGRplyPkt p1 = (pFPxEXGRplyPkt)PktBuf2; @@ -239,7 +262,7 @@ //p1->nInputBytes[3]=0x30|LoHofB(HiBofW(KMem.DT[0])); //((KMem.DT[0]>>8)&0x0f); //p1->nInputBytes[4]=0x30|((KMem.DT[1]>>4)&0x0f); //p1->nInputBytes[5]=0x30|((KMem.DT[1]>>0)&0x0f); - PktBuf2[FPxStat.nInputBytes*2 + 1 ]=0x30|FPxCalBCC(PktBuf2,FPxStat.nInputBytes*2+1); // p1->nBCC= 0x30|CalBCC(PktBuf2,7); + PktBuf2[FPxStat.nInputBytes*2 + 1 ]=0x30|FPxBCC(PktBuf2,FPxStat.nInputBytes*2+1); // p1->nBCC= 0x30|CalBCC(PktBuf2,7); PktBuf2[FPxStat.nInputBytes*2 + 2 ]=0x0d; // p1->End1=0x0d; FPxSendPkt(PktBuf2,FPxStat.nInputBytes*2 + 3); } diff --git a/Ext_FPx/Src/main.c b/Ext_FPx/Src/main.c index a1383e6..5b61bb9 100644 --- a/Ext_FPx/Src/main.c +++ b/Ext_FPx/Src/main.c @@ -45,23 +45,30 @@ #include "debug.h" #include "Functions.h" #include "KMachine.h" +#if (ENABLE_PLC) #include "PLCfunctions.h" +#endif //#include "KBus.h" #include "KLink.h" #include "string.h" #include "BSP.h" #include "ModbusRTU.h" -#if (BOARD_TYPE == 13) +#if (ENABLE_NET) #include "w5500_port.h" #include "../src/Ethernet/socket.h" #include "../src/Ethernet/loopback.h" -#elif (BOARD_TYPE == 14) +#endif + +#if (ENABLE_FPX) #include "FPx.h" -#elif (BOARD_TYPE == 15 || BOARD_TYPE == 16) +#endif + +#if (ENABLE_RF) #include "KWireless.h" +#endif //#include "user.h" //#include "../src/radio/inc/sx126x-board.h" -#endif + /* USER CODE END Includes */ @@ -83,11 +90,12 @@ unsigned char FastFlicker=0; unsigned int Uart1IdelTimer = 0; +#if (ENABLE_PLC) stBinProg1 * pProgs = (stBinProg1 *)STORE_PRG_BASE; - +#endif uint32_t us1,us2,us3,us4,us5,us6; -stKBusDef KBus1; +stKBusDef KBus1; // #define RAM_START_ADDR 0x20000000 #define VECTOR_SIZE 45 @@ -164,6 +172,10 @@ Uart2Stat.bPacketRecved=0; Uart2RecvDMA(Uart2RecvBuf1,sizeof(Uart2RecvBuf1)); } + if (Uart2Stat.bPacketRecved) + { + KBusPacketSendDone(&KBus1); + } } /* @@ -189,6 +201,8 @@ case evFPxDataUpdate: for (int i=0;i<16;i++){ KBusMem.WLY[i]=FPxMem.WLY[i]; + KMem.WLY[i]=FPxMem.WLY[i]; + KMem.WY[i]=FPxMem.WLY[i]; } for (int i=0;i<16;i++) { FPxMem.WLX[i]=KBusMem.WLX[i]; @@ -228,17 +242,22 @@ case KBusEvDataUpdate: for (int i=0;i<16;i++){ KBusMem.WLY[i]=FPxMem.WLY[i]; + KMem.WLY[i]=FPxMem.WLY[i]; } + for (int i=0;i<16;i++) { KMem.WLX[i]=KBusMem.WLX[i]; FPxMem.WLX[i]=KBusMem.WLX[i]; + KMem.WX[i]=KBusMem.WLX[i]; } + // KBusMem.WLY[0]=0x0301; break; default: break; } + KMem.DT[2]++; return 0; } @@ -256,8 +275,6 @@ // RemapIrqVector(); ///* __set_PRIMASK(0); //鎵撳紑鍏ㄥ眬涓柇 - - KMRunStat.bLEDFlick = 1; InitUartstat(&Uart1Stat,Uart1RxBuf,sizeof(Uart1RxBuf),Uart1TxBuf,sizeof(Uart1TxBuf)); InitUartstat(&Uart2Stat,Uart2RxBuf,sizeof(Uart2RxBuf),Uart2TxBuf,sizeof(Uart2TxBuf)); @@ -307,26 +324,39 @@ ReadSysCfgFromFlash(&storedKMSysCfg); KMRunStat.bLEDFlick = 1; - + + KLinkInit(1); //娉ㄥ唽KLink绔彛 + +// stPortDef PortReg1 = {.nPortHardType = 3,.nPortUseType = 2}; +// KMRegisterPort(0,&PortReg1); + + int bKBusMaster,bKBusSlave,bKBusRepeater;; - int nChilds; + int nKBusStationId; + int nKBusChilds; KMem.CurJumperSW=ReadJumperSW(); KMem.EffJumperSW=KMem.CurJumperSW; - nChilds=KMem.EffJumperSW&0x0f; + + nKBusStationId=KMem.EffJumperSW&0x0f; + + nKBusChilds = nKBusStationId; // Uart2Baud = AlterUart2Baud; - KBusSetEvCallBackFunc(&KBus1, &KBusEvCallBackFunc), - KBusInitMaster(&KBus1, (KBusSendPktFuncDef)PutStr2, nChilds); + + KBusInitMaster(&KBus1, (KBusSendPktFuncDef)PutStr2, nKBusChilds); + KBusSetEvCallBackFunc(&KBus1, &KBusEvCallBackFunc); #if (BOARD_TYPE == 14) - KMem.EffJumperSW|=0x10; - nChilds=KMem.EffJumperSW&0x0f; - if ((KMem.EffJumperSW&0x10)!=0) {bKBusMaster=1;bKBusSlave=0;} + KMem.EffJumperSW|=0x40; + + if ((KMem.EffJumperSW&0x40)!=0) {bKBusMaster=1;bKBusSlave=0;} else{bKBusMaster=0;bKBusSlave=1;} FPxSetCallBackFunc(&FPxCallBackFunc); - FPx_Init(nChilds); - FPx_SetIOCount(8,5); + FPx_Init(nKBusChilds); + + int IOByteCount = nKBusChilds; + FPx_SetIOCount(IOByteCount,IOByteCount); #elif (BOARD_TYPE == 15 || BOARD_TYPE == 16) nStationID=1 ;//KMem.EffJumperSW&0x0f; @@ -336,11 +366,11 @@ {bKBusMaster=0;bKBusSlave=1;} #else nStationID=KMem.EffJumperSW&0x0f; - if (KMem.EffJumperSW == 0x1f) {bKBusRepeater=1;bKBusMaster=1;bKBusSlave=0;} - else if ((KMem.EffJumperSW&0x10)!=0) {bKBusMaster=1;bKBusSlave=0;} + if (KMem.EffJumperSW == 0x3f) {bKBusRepeater=1;bKBusMaster=1;bKBusSlave=0;} + else if ((KMem.EffJumperSW&0x20)!=0) {bKBusMaster=1;bKBusSlave=0;} else{bKBusMaster=0;bKBusSlave=1;} #endif - + UNUSED(bKBusRepeater); //if (KMem.EffJumperSW == 0x00) Uart1Baud = DefaultUart1Baud; MX_USART1_UART_Init(); @@ -421,14 +451,15 @@ KMRunStat.WorkMode2=0; KMRunStat.WorkMode = storedKMSysCfg.theKMSysCfg.workmode; - +#if (ENABLE_PLC) if (KMRunStat.WorkMode == 1){ InitPLC(); KMRunStat.WorkMode2 = KMem.CurJumperSW&0x20 ; if (KMRunStat.WorkMode2) { StartPLC(); } } - +#endif + #if (BOARD_TYPE == 15 || BOARD_TYPE == 16) KWireLessInit(KMem.EffJumperSW&0x20,KMem.EffJumperSW&0x0f); KWireLessStart(); @@ -447,14 +478,14 @@ int haltick=HAL_GetTick(); int thisJumperSW=ReadJumperSW(); - +#if (ENABLE_PLC) if (KMRunStat.WorkMode&1){ if (thisJumperSW&0x20 && !(KMem.CurJumperSW&0x20)) // Run 寮�鍏� 姝� 璺冲彉銆� {StartPLC();} if (!(thisJumperSW&0x20) && (KMem.CurJumperSW&0x20)) // Run 寮�鍏� 璐� 璺冲彉銆� {StopPLC();} } - +#endif KMem.CurJumperSW=thisJumperSW; KMem.haltick=haltick; // KMem.TotalRunTime=TotalRunTime; @@ -523,7 +554,7 @@ #endif // pProgs = (stBinProg1 *) STORE_PRG_BASE; - +#if (ENABLE_PLC) if ( KMRunStat.WorkMode==1 ) //&& bKBusMaster) { if (KMRunStat.nBinProgBank == 0){ @@ -536,7 +567,8 @@ ProcessPLCBinProg(pProgs, nSizeProg1); } - +#endif + KMem.ScanTimeuS=us2-KMem.LastScanTime; KMem.LastScanTime = us2; if (KMem.ScanTimeuS < KMem.MinScanTimeuS) {KMem.MinScanTimeuS = KMem.ScanTimeuS;} @@ -552,7 +584,7 @@ for (int i=0;i<FPxStat.nOutputBytes;i++) {KBusMem.WLYB[i]=FPxMem.WLYB[i];} #endif - if (nChilds>0) { KBusMasterFunc(&KBus1); } + KBusLoopProcess(&KBus1); } if (haltick&0x00002000) SlowFlicker=1; @@ -563,17 +595,13 @@ if (bKBusSlave) { - KBusSlaveFunc(&KBus1); + KBusLoopProcess(&KBus1); if (KBus1.nSlaveTick&0x00002000) SlowFlicker=1; else SlowFlicker=0; if (KBus1.nSlaveTick&0x00000800) FastFlicker=1; else FastFlicker=0; } -// KMem.WY[0]=nCount2>>5; - if (KMem.RunStat) {KMem.RunStat--;} - if (KMem.ErrStat) {KMem.ErrStat--;} - if (KMRunStat.bLEDFlick) { SetRunLed(FastFlicker); @@ -584,14 +612,23 @@ } else { +#if (ENABLE_PLC) if (KMRunStat.WorkMode==1 ) { if (PLCMem.bPLCRunning){SetRunLed(SlowFlicker);} else {SetRunLed(0);} } - else { + else +#endif + { if (!KBus1.RunStat) SetRunLed(SlowFlicker); else SetRunLed(FastFlicker); } + if (FPxStat.bConfiged) { + SetErrLed(0); + } + else { + SetErrLed(FastFlicker); + } if (!KBus1.ErrStat) { SetErrLed(0); @@ -624,7 +661,11 @@ } // KMem.WY[0]=KMem.WLY[0]; #elif (BOARD_TYPE == 14) - + for (int i=0;i<16;i++) { + KMem.WLX[i]=KBusMem.WLX[i]; + FPxMem.WLX[i]=KBusMem.WLX[i]; + KMem.WX[i]=KBusMem.WLX[i]; + } #else KMem.WLX[0]=KMem.WX[0]; @@ -693,14 +734,18 @@ // mapping bits. for (int i=0;i<6;i++) { - USHORT bitaddr = storedKMSysCfg.theKMSysCfg.OutMappings[i]; + USHORT bitaddr = storedKMSysCfg.theKMSysCfg.OutMappings[i].value; UCHAR type = (bitaddr&0xf000) >>12; USHORT byteaddr = (bitaddr&0x0ff0) >>4; UCHAR bitpos = bitaddr &0x0f; UCHAR bitvalue = 0 ; if (byteaddr>0) { - if (type == 0) bitvalue = KMem.WXB[byteaddr-1] & ( 1 << bitpos ); - else if (type == 1 ) bitvalue = KMem.WYB[byteaddr-1] & ( 1 << bitpos ); + if (type == 0) {bitvalue = KMem.WXB[byteaddr-1] & ( 1 << bitpos );} + else if (type == 1 ) {bitvalue = KMem.WYB[byteaddr-1] & ( 1 << bitpos );} + //else if (type == 2 ) {bitvalue = KMem.WRB[byteaddr-1] & ( 1 << bitpos );} + else if (type == 3 ) {bitvalue = KMem.WLXB[byteaddr-1] & ( 1 << bitpos );} + else if (type == 4 ) {bitvalue = KMem.WLYB[byteaddr-1] & ( 1 << bitpos );} + // else if (type == 5 ) {bitvalue = KMem.WYB[byteaddr-1] & ( 1 << bitpos );} } if (bitvalue){ LL_GPIO_SetOutputPin(GPIOB,pins[i]);} else {LL_GPIO_ResetOutputPin(GPIOB,pins[i]);} diff --git a/KBus/Inc/BoardType.h b/KBus/Inc/BoardType.h index 5164651..676ed73 100644 --- a/KBus/Inc/BoardType.h +++ b/KBus/Inc/BoardType.h @@ -43,8 +43,9 @@ }; -#define BOARD_TYPE 10 +#define BOARD_TYPE 8 #define BOARD_VER 2 + #if (BOARD_TYPE == 11) #define XLAT_FREQ 12 @@ -73,5 +74,42 @@ #define DOUTPUT 0 #endif +typedef struct tagInfoBlockHdr { + unsigned short nBlkSign; // 开始标志 + unsigned short nBlkTypeVer; // 类型和版本 + unsigned short nBlkSize; // Block 大小, 包括开始和结束标志 + unsigned short Pad1; +}stInfoBlockHdr; + +typedef struct tagInfoBlockTail { + + unsigned short CRC16; + unsigned short EndSign; +}stInfoBlockTail; + +typedef struct tagBtLdrInfoBlock { + stInfoBlockHdr Hdr; + unsigned short nBtldrVer; + unsigned short nBtldrDevice; + unsigned short nBtldrSize; // 设计大小 + unsigned short nBtldrDataSize; //代码大小 + unsigned int nBtldr_AppAddr; + unsigned int nBtldr_NewAppInfoAddr; + unsigned int nBtldr_NewAppAddr; + stInfoBlockTail tail; +}stBtLdrInfoBlock, *pBtLdrInfoBlock; + +typedef struct tagAppInfoBlock { + stInfoBlockHdr Hdr; + unsigned short nAppVer; + unsigned short nAppDevice; + unsigned short nAppSize; // 代码设计大小 + unsigned short nAppDataSize; //实际代码大小 + unsigned int nAppStartAddr; + unsigned int nAppStartOffset; + unsigned int nApp; + stInfoBlockTail tail; +}stAppInfoBlock, * pAppInfoBlock; + #endif /* __BOARDTYPE_H__ */ diff --git a/KBus/Inc/main.h b/KBus/Inc/main.h index 67a1955..81823cb 100644 --- a/KBus/Inc/main.h +++ b/KBus/Inc/main.h @@ -74,7 +74,9 @@ /* #define USE_FULL_ASSERT 1U */ /* USER CODE BEGIN Private defines */ +#include "KBus.h" +extern stKBusDef KBus1; /* USER CODE END Private defines */ #ifdef __cplusplus diff --git a/MDK-ARM/F030C8T6_KBus.uvprojx "b/KBus/MDK-ARM/KBus_C8T6_\345\210\206\345\270\203IO\346\250\241\345\235\227_8\350\267\25716\350\267\257.uvprojx" similarity index 81% rename from MDK-ARM/F030C8T6_KBus.uvprojx rename to "KBus/MDK-ARM/KBus_C8T6_\345\210\206\345\270\203IO\346\250\241\345\235\227_8\350\267\25716\350\267\257.uvprojx" index cda4b64..b5186ac 100644 --- a/MDK-ARM/F030C8T6_KBus.uvprojx +++ "b/KBus/MDK-ARM/KBus_C8T6_\345\210\206\345\270\203IO\346\250\241\345\235\227_8\350\267\25716\350\267\257.uvprojx" @@ -47,7 +47,7 @@ <NotGenerated>0</NotGenerated> <InvalidFlash>1</InvalidFlash> </TargetStatus> - <OutputDirectory>.\F030C8T6_KBus\</OutputDirectory> + <OutputDirectory>.\KBus_C8T6\</OutputDirectory> <OutputName>F030C8T6_KBus</OutputName> <CreateExecutable>1</CreateExecutable> <CreateLib>0</CreateLib> @@ -272,8 +272,8 @@ </OCR_RVCT3> <OCR_RVCT4> <Type>1</Type> - <StartAddress>0x8000000</StartAddress> - <Size>0x10000</Size> + <StartAddress>0x8001000</StartAddress> + <Size>0xf000</Size> </OCR_RVCT4> <OCR_RVCT5> <Type>1</Type> @@ -297,8 +297,8 @@ </OCR_RVCT8> <OCR_RVCT9> <Type>0</Type> - <StartAddress>0x20000000</StartAddress> - <Size>0x2000</Size> + <StartAddress>0x200000c0</StartAddress> + <Size>0x1f40</Size> </OCR_RVCT9> <OCR_RVCT10> <Type>0</Type> @@ -335,7 +335,7 @@ <MiscControls></MiscControls> <Define>USE_FULL_LL_DRIVER,USE_HAL_DRIVER</Define> <Undefine></Undefine> - <IncludePath>../KBus/Inc;../KBus/Src;../Drivers/STM32F0xx_HAL_Driver/Inc;../Drivers/CMSIS/Device/ST/STM32F0xx/Include;../Drivers/CMSIS/Include;../Drivers/STM32F0xx_HAL_Driver/Inc/Legacy;..\ComLib\Inc</IncludePath> + <IncludePath>../Inc;../Src;../../Drivers/STM32F0xx_HAL_Driver/Inc;../../Drivers/CMSIS/Device/ST/STM32F0xx/Include;../../Drivers/CMSIS/Include;../../Drivers/STM32F0xx_HAL_Driver/Inc/Legacy;..\..\ComLib\Inc</IncludePath> </VariousControls> </Cads> <Aads> @@ -392,67 +392,67 @@ <File> <FileName>BSP.h</FileName> <FileType>5</FileType> - <FilePath>..\ComLib\Inc\BSP.h</FilePath> + <FilePath>..\..\ComLib\Inc\BSP.h</FilePath> </File> <File> <FileName>debug.h</FileName> <FileType>5</FileType> - <FilePath>..\ComLib\Inc\debug.h</FilePath> + <FilePath>..\..\ComLib\Inc\debug.h</FilePath> </File> <File> <FileName>functions.h</FileName> <FileType>5</FileType> - <FilePath>..\ComLib\Inc\functions.h</FilePath> + <FilePath>..\..\ComLib\Inc\functions.h</FilePath> </File> <File> <FileName>GlobalDef.h</FileName> <FileType>5</FileType> - <FilePath>..\ComLib\Inc\GlobalDef.h</FilePath> + <FilePath>..\..\ComLib\Inc\GlobalDef.h</FilePath> </File> <File> <FileName>KBus.h</FileName> <FileType>5</FileType> - <FilePath>..\ComLib\Inc\KBus.h</FilePath> + <FilePath>..\..\ComLib\Inc\KBus.h</FilePath> </File> <File> <FileName>KLink.h</FileName> <FileType>5</FileType> - <FilePath>..\ComLib\Inc\KLink.h</FilePath> + <FilePath>..\..\ComLib\Inc\KLink.h</FilePath> </File> <File> <FileName>KMachine.h</FileName> <FileType>5</FileType> - <FilePath>..\ComLib\Inc\KMachine.h</FilePath> + <FilePath>..\..\ComLib\Inc\KMachine.h</FilePath> </File> <File> <FileName>ModbusRTU.h</FileName> <FileType>5</FileType> - <FilePath>..\ComLib\Inc\ModbusRTU.h</FilePath> + <FilePath>..\..\ComLib\Inc\ModbusRTU.h</FilePath> </File> <File> <FileName>MyQueue.h</FileName> <FileType>5</FileType> - <FilePath>..\ComLib\Inc\MyQueue.h</FilePath> + <FilePath>..\..\ComLib\Inc\MyQueue.h</FilePath> </File> <File> <FileName>PLCfunctions.h</FileName> <FileType>5</FileType> - <FilePath>..\ComLib\Inc\PLCfunctions.h</FilePath> + <FilePath>..\..\ComLib\Inc\PLCfunctions.h</FilePath> </File> <File> <FileName>shell.h</FileName> <FileType>5</FileType> - <FilePath>..\ComLib\Inc\shell.h</FilePath> + <FilePath>..\..\ComLib\Inc\shell.h</FilePath> </File> <File> <FileName>stm32_assert.h</FileName> <FileType>5</FileType> - <FilePath>..\ComLib\Inc\stm32_assert.h</FilePath> + <FilePath>..\..\ComLib\Inc\stm32_assert.h</FilePath> </File> <File> <FileName>stm32f0xx_it.h</FileName> <FileType>5</FileType> - <FilePath>..\ComLib\Inc\stm32f0xx_it.h</FilePath> + <FilePath>..\..\ComLib\Inc\stm32f0xx_it.h</FilePath> </File> </Files> </Group> @@ -462,67 +462,67 @@ <File> <FileName>debug.c</FileName> <FileType>1</FileType> - <FilePath>..\ComLib\Src\debug.c</FilePath> + <FilePath>..\..\ComLib\Src\debug.c</FilePath> </File> <File> <FileName>functions.c</FileName> <FileType>1</FileType> - <FilePath>..\ComLib\Src\functions.c</FilePath> + <FilePath>..\..\ComLib\Src\functions.c</FilePath> </File> <File> <FileName>GlobalDef.c</FileName> <FileType>1</FileType> - <FilePath>..\ComLib\Src\GlobalDef.c</FilePath> + <FilePath>..\..\ComLib\Src\GlobalDef.c</FilePath> </File> <File> <FileName>KBus.c</FileName> <FileType>1</FileType> - <FilePath>..\ComLib\Src\KBus.c</FilePath> + <FilePath>..\..\ComLib\Src\KBus.c</FilePath> </File> <File> <FileName>KLink.c</FileName> <FileType>1</FileType> - <FilePath>..\ComLib\Src\KLink.c</FilePath> + <FilePath>..\..\ComLib\Src\KLink.c</FilePath> </File> <File> <FileName>ModbusRTU.c</FileName> <FileType>1</FileType> - <FilePath>..\ComLib\Src\ModbusRTU.c</FilePath> + <FilePath>..\..\ComLib\Src\ModbusRTU.c</FilePath> </File> <File> <FileName>MyQueue.c</FileName> <FileType>1</FileType> - <FilePath>..\ComLib\Src\MyQueue.c</FilePath> + <FilePath>..\..\ComLib\Src\MyQueue.c</FilePath> </File> <File> <FileName>PLCfunctions.c</FileName> <FileType>1</FileType> - <FilePath>..\ComLib\Src\PLCfunctions.c</FilePath> + <FilePath>..\..\ComLib\Src\PLCfunctions.c</FilePath> </File> <File> <FileName>shell.c</FileName> <FileType>1</FileType> - <FilePath>..\ComLib\Src\shell.c</FilePath> + <FilePath>..\..\ComLib\Src\shell.c</FilePath> </File> <File> <FileName>stm32f0xx_hal_msp.c</FileName> <FileType>1</FileType> - <FilePath>..\ComLib\Src\stm32f0xx_hal_msp.c</FilePath> + <FilePath>..\..\ComLib\Src\stm32f0xx_hal_msp.c</FilePath> </File> <File> <FileName>KMachine.c</FileName> <FileType>1</FileType> - <FilePath>..\ComLib\Src\KMachine.c</FilePath> + <FilePath>..\..\ComLib\Src\KMachine.c</FilePath> </File> <File> <FileName>BSP.c</FileName> <FileType>1</FileType> - <FilePath>..\ComLib\Src\BSP.c</FilePath> + <FilePath>..\..\ComLib\Src\BSP.c</FilePath> </File> <File> <FileName>stm32f0xx_it.c</FileName> <FileType>1</FileType> - <FilePath>..\ComLib\Src\stm32f0xx_it.c</FilePath> + <FilePath>..\..\ComLib\Src\stm32f0xx_it.c</FilePath> </File> </Files> </Group> @@ -532,17 +532,17 @@ <File> <FileName>main.h</FileName> <FileType>5</FileType> - <FilePath>..\KBus\Inc\main.h</FilePath> + <FilePath>..\Inc\main.h</FilePath> </File> <File> <FileName>stm32f0xx_hal_conf.h</FileName> <FileType>5</FileType> - <FilePath>..\KBus\Inc\stm32f0xx_hal_conf.h</FilePath> + <FilePath>..\Inc\stm32f0xx_hal_conf.h</FilePath> </File> <File> <FileName>BoardType.h</FileName> <FileType>5</FileType> - <FilePath>..\KBus\Inc\BoardType.h</FilePath> + <FilePath>..\Inc\BoardType.h</FilePath> </File> </Files> </Group> @@ -552,12 +552,12 @@ <File> <FileName>main.c</FileName> <FileType>1</FileType> - <FilePath>..\KBus\Src\main.c</FilePath> + <FilePath>..\Src\main.c</FilePath> </File> <File> <FileName>BoardType.c</FileName> <FileType>1</FileType> - <FilePath>..\KBus\Src\BoardType.c</FilePath> + <FilePath>..\Src\BoardType.c</FilePath> </File> </Files> </Group> @@ -567,7 +567,7 @@ <File> <FileName>system_stm32f0xx.c</FileName> <FileType>1</FileType> - <FilePath>..\ComLib\Src\system_stm32f0xx.c</FilePath> + <FilePath>..\..\ComLib\Src\system_stm32f0xx.c</FilePath> </File> </Files> </Group> @@ -577,122 +577,124 @@ <File> <FileName>stm32f0xx_ll_gpio.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_gpio.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_gpio.c</FilePath> </File> <File> <FileName>stm32f0xx_ll_exti.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_exti.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_exti.c</FilePath> </File> <File> <FileName>stm32f0xx_ll_adc.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_adc.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_adc.c</FilePath> </File> <File> <FileName>stm32f0xx_ll_dma.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_dma.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_dma.c</FilePath> </File> <File> <FileName>stm32f0xx_ll_spi.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_spi.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_spi.c</FilePath> </File> <File> <FileName>stm32f0xx_hal_tim.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim.c</FilePath> </File> <File> <FileName>stm32f0xx_hal_tim_ex.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim_ex.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim_ex.c</FilePath> </File> <File> <FileName>stm32f0xx_ll_usart.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_usart.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_usart.c</FilePath> </File> <File> <FileName>stm32f0xx_ll_rcc.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_rcc.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_rcc.c</FilePath> </File> <File> <FileName>stm32f0xx_hal_rcc.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc.c</FilePath> </File> <File> <FileName>stm32f0xx_hal_rcc_ex.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc_ex.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc_ex.c</FilePath> </File> <File> <FileName>stm32f0xx_hal.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.c</FilePath> </File> <File> <FileName>stm32f0xx_hal_i2c.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_i2c.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_i2c.c</FilePath> </File> <File> <FileName>stm32f0xx_hal_i2c_ex.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_i2c_ex.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_i2c_ex.c</FilePath> </File> <File> <FileName>stm32f0xx_hal_gpio.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_gpio.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_gpio.c</FilePath> </File> <File> <FileName>stm32f0xx_hal_dma.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_dma.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_dma.c</FilePath> </File> <File> <FileName>stm32f0xx_hal_cortex.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_cortex.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_cortex.c</FilePath> </File> <File> <FileName>stm32f0xx_hal_pwr.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pwr.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pwr.c</FilePath> </File> <File> <FileName>stm32f0xx_hal_pwr_ex.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pwr_ex.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pwr_ex.c</FilePath> </File> <File> <FileName>stm32f0xx_hal_flash.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_flash.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_flash.c</FilePath> </File> <File> <FileName>stm32f0xx_hal_flash_ex.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_flash_ex.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_flash_ex.c</FilePath> </File> <File> <FileName>stm32f0xx_ll_utils.c</FileName> <FileType>1</FileType> - <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_utils.c</FilePath> + <FilePath>../../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_utils.c</FilePath> </File> <File> <FileName>stm32f0xx_ll_tim.c</FileName> <FileType>1</FileType> - <FilePath>..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_ll_tim.c</FilePath> + <FilePath>..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_ll_tim.c</FilePath> + </File> + <File> + <FileName>stm32f0xx_ll_flash.c</FileName> + <FileType>1</FileType> + <FilePath>..\..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_ll_flash.c</FilePath> </File> </Files> - </Group> - <Group> - <GroupName>::CMSIS</GroupName> </Group> </Groups> </Target> @@ -704,7 +706,7 @@ <component Cclass="CMSIS" Cgroup="CORE" Cvendor="ARM" Cversion="5.6.0" condition="ARMv6_7_8-M Device"> <package name="CMSIS" schemaVersion="1.7.7" url="http://www.keil.com/pack/" vendor="ARM" version="5.9.0"/> <targetInfos> - <targetInfo name="F030C8T6_KBus"/> + <targetInfo name="KBus_C8T6"/> </targetInfos> </component> </components> diff --git a/KBus/MDK-ARM/startup_stm32f030x8.s b/KBus/MDK-ARM/startup_stm32f030x8.s new file mode 100644 index 0000000..4622872 --- /dev/null +++ b/KBus/MDK-ARM/startup_stm32f030x8.s @@ -0,0 +1,252 @@ +;******************** (C) COPYRIGHT 2016 STMicroelectronics ******************** +;* File Name : startup_stm32f030x8.s +;* Author : MCD Application Team +;* Description : STM32F030x8 devices vector table for MDK-ARM toolchain. +;* This module performs: +;* - Set the initial SP +;* - Set the initial PC == Reset_Handler +;* - Set the vector table entries with the exceptions ISR address +;* - Branches to __main in the C library (which eventually +;* calls main()). +;* After Reset the CortexM0 processor is in Thread mode, +;* priority is Privileged, and the Stack is set to Main. +;* <<< Use Configuration Wizard in Context Menu >>> +;******************************************************************************* +;* +;* Redistribution and use in source and binary forms, with or without modification, +;* are permitted provided that the following conditions are met: +;* 1. Redistributions of source code must retain the above copyright notice, +;* this list of conditions and the following disclaimer. +;* 2. Redistributions in binary form must reproduce the above copyright notice, +;* this list of conditions and the following disclaimer in the documentation +;* and/or other materials provided with the distribution. +;* 3. Neither the name of STMicroelectronics nor the names of its contributors +;* may be used to endorse or promote products derived from this software +;* without specific prior written permission. +;* +;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +;* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +;* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +;* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +;* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +;* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +;* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +;* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +;* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +; +;******************************************************************************* + +; Amount of memory (in bytes) allocated for Stack +; Tailor this value to your application needs +; <h> Stack Configuration +; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> +; </h> + +Stack_Size EQU 0x400 + + AREA STACK, NOINIT, READWRITE, ALIGN=3 +Stack_Mem SPACE Stack_Size +__initial_sp + + +; <h> Heap Configuration +; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> +; </h> + +Heap_Size EQU 0x200 + + AREA HEAP, NOINIT, READWRITE, ALIGN=3 +__heap_base +Heap_Mem SPACE Heap_Size +__heap_limit + + PRESERVE8 + THUMB + + +; Vector Table Mapped to Address 0 at Reset + AREA RESET, DATA, READONLY + EXPORT __Vectors + EXPORT __Vectors_End + EXPORT __Vectors_Size + +__Vectors DCD __initial_sp ; Top of Stack + DCD Reset_Handler ; Reset Handler + DCD NMI_Handler ; NMI Handler + DCD HardFault_Handler ; Hard Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External Interrupts + DCD WWDG_IRQHandler ; Window Watchdog + DCD 0 ; Reserved + DCD RTC_IRQHandler ; RTC through EXTI Line + DCD FLASH_IRQHandler ; FLASH + DCD RCC_IRQHandler ; RCC + DCD EXTI0_1_IRQHandler ; EXTI Line 0 and 1 + DCD EXTI2_3_IRQHandler ; EXTI Line 2 and 3 + DCD EXTI4_15_IRQHandler ; EXTI Line 4 to 15 + DCD 0 ; Reserved + DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1 + DCD DMA1_Channel2_3_IRQHandler ; DMA1 Channel 2 and Channel 3 + DCD DMA1_Channel4_5_IRQHandler ; DMA1 Channel 4 and Channel 5 + DCD ADC1_IRQHandler ; ADC1 + DCD TIM1_BRK_UP_TRG_COM_IRQHandler ; TIM1 Break, Update, Trigger and Commutation + DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare + DCD 0 ; Reserved + DCD TIM3_IRQHandler ; TIM3 + DCD TIM6_IRQHandler ; TIM6 + DCD 0 ; Reserved + DCD TIM14_IRQHandler ; TIM14 + DCD TIM15_IRQHandler ; TIM15 + DCD TIM16_IRQHandler ; TIM16 + DCD TIM17_IRQHandler ; TIM17 + DCD I2C1_IRQHandler ; I2C1 + DCD I2C2_IRQHandler ; I2C2 + DCD SPI1_IRQHandler ; SPI1 + DCD SPI2_IRQHandler ; SPI2 + DCD USART1_IRQHandler ; USART1 + DCD USART2_IRQHandler ; USART2 + +__Vectors_End + +__Vectors_Size EQU __Vectors_End - __Vectors + + AREA |.text|, CODE, READONLY + +; Reset handler routine +Reset_Handler PROC + EXPORT Reset_Handler [WEAK] + IMPORT __main + IMPORT SystemInit + LDR R0, =SystemInit + BLX R0 + LDR R0, =__main + BX R0 + ENDP + +; Dummy Exception Handlers (infinite loops which can be modified) + +NMI_Handler PROC + EXPORT NMI_Handler [WEAK] + B . + ENDP +HardFault_Handler\ + PROC + EXPORT HardFault_Handler [WEAK] + B . + ENDP +SVC_Handler PROC + EXPORT SVC_Handler [WEAK] + B . + ENDP +PendSV_Handler PROC + EXPORT PendSV_Handler [WEAK] + B . + ENDP +SysTick_Handler PROC + EXPORT SysTick_Handler [WEAK] + B . + ENDP + +Default_Handler PROC + + EXPORT WWDG_IRQHandler [WEAK] + EXPORT RTC_IRQHandler [WEAK] + EXPORT FLASH_IRQHandler [WEAK] + EXPORT RCC_IRQHandler [WEAK] + EXPORT EXTI0_1_IRQHandler [WEAK] + EXPORT EXTI2_3_IRQHandler [WEAK] + EXPORT EXTI4_15_IRQHandler [WEAK] + EXPORT DMA1_Channel1_IRQHandler [WEAK] + EXPORT DMA1_Channel2_3_IRQHandler [WEAK] + EXPORT DMA1_Channel4_5_IRQHandler [WEAK] + EXPORT ADC1_IRQHandler [WEAK] + EXPORT TIM1_BRK_UP_TRG_COM_IRQHandler [WEAK] + EXPORT TIM1_CC_IRQHandler [WEAK] + EXPORT TIM3_IRQHandler [WEAK] + EXPORT TIM6_IRQHandler [WEAK] + EXPORT TIM14_IRQHandler [WEAK] + EXPORT TIM15_IRQHandler [WEAK] + EXPORT TIM16_IRQHandler [WEAK] + EXPORT TIM17_IRQHandler [WEAK] + EXPORT I2C1_IRQHandler [WEAK] + EXPORT I2C2_IRQHandler [WEAK] + EXPORT SPI1_IRQHandler [WEAK] + EXPORT SPI2_IRQHandler [WEAK] + EXPORT USART1_IRQHandler [WEAK] + EXPORT USART2_IRQHandler [WEAK] + + +WWDG_IRQHandler +RTC_IRQHandler +FLASH_IRQHandler +RCC_IRQHandler +EXTI0_1_IRQHandler +EXTI2_3_IRQHandler +EXTI4_15_IRQHandler +DMA1_Channel1_IRQHandler +DMA1_Channel2_3_IRQHandler +DMA1_Channel4_5_IRQHandler +ADC1_IRQHandler +TIM1_BRK_UP_TRG_COM_IRQHandler +TIM1_CC_IRQHandler +TIM3_IRQHandler +TIM6_IRQHandler +TIM14_IRQHandler +TIM15_IRQHandler +TIM16_IRQHandler +TIM17_IRQHandler +I2C1_IRQHandler +I2C2_IRQHandler +SPI1_IRQHandler +SPI2_IRQHandler +USART1_IRQHandler +USART2_IRQHandler + + B . + + ENDP + + ALIGN + +;******************************************************************************* +; User Stack and Heap initialization +;******************************************************************************* + IF :DEF:__MICROLIB + + EXPORT __initial_sp + EXPORT __heap_base + EXPORT __heap_limit + + ELSE + + IMPORT __use_two_region_memory + EXPORT __user_initial_stackheap + +__user_initial_stackheap + + LDR R0, = Heap_Mem + LDR R1, =(Stack_Mem + Stack_Size) + LDR R2, = (Heap_Mem + Heap_Size) + LDR R3, = Stack_Mem + BX LR + + ALIGN + + ENDIF + + END + +;************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE***** diff --git a/KBus/Src/BoardType.c b/KBus/Src/BoardType.c index e69de29..1eeb723 100644 --- a/KBus/Src/BoardType.c +++ b/KBus/Src/BoardType.c @@ -0,0 +1,102 @@ +#include "BoardType.h" +#include "KMachine.h" +#include "KBus.h" + + +#define APP_ADDR 0x08001000 //应用程序首地址定义 +#define APPINFOBLOCK_ADDR (APP_ADDR + 0x100) //程序信息块 地址 +#define INFOBLOCK_ADDR (APP_ADDR + 0x1000) //信息块 地址 + +#define APP_START_ADDR IROM1_START_ADDRESS +extern int Region$$Table$$Limit; + +#define MAKE_VER(x,y) ((x<<8)|y) + +#define APP_VER MAKE_VER(1,13) + + +const stAppInfoBlock AppInfoBlock __attribute__((at(APPINFOBLOCK_ADDR))) = +{ + 0xAA55, // StartSign + 0x0301, // BlockType + sizeof(stAppInfoBlock), //BlockSize + 0, // Pad, + APP_VER, //AppVer + (BOARD_TYPE<<8) + BOARD_VER, //AppDevice; + 0x1000, //AppSize; + 0x0C00, //AppDataSize; + APP_ADDR, //nAppStartAddr + (int)&Region$$Table$$Limit, //nBtldr_NewAppInfoAddr + 0x08009000, //nBtldr_NewAppAddr + 0xCCCC, //crc16; + 0xAA55 //EndSign; + +}; + + + + +const stKMInfoBlock KMInfoBlock __attribute__((at(INFOBLOCK_ADDR))) = +{ +// sizeof(stKMInfoBlock), + (BOARD_TYPE<<8) + BOARD_VER, //nDeviceType BOARD_VER, //nDevieVer + APP_VER, //ProgVer + 0x0102, //KLinkVer + KBUS_VER, //KBusVer +// 0x0100, //KNetVer +// 0x0100, //KWLVer + + 4, //nCapacity1 ?K + 1, //nCapacity2 ?k + + DINPUT, //nDInput; + DOUTPUT, //nDOutput + + 0, //nAInput + 0, //nAOutput + 0, //nHInput + 0, //nHOutput + 0, //nExt1; + 0, //nExt2; + 0, //nLogSize; + 2, //nPorts; + 0, //nManSize; + 0, //nAbility; + 6, //nSwitchBits; +}; + + +const stDeviceInfo MyDeviceInfo={ + + (BOARD_TYPE<<8) + BOARD_VER, //nDeviceTypeVer // unsigned short ClientType; // 子机类型 + APP_VER, //ProgVer // unsigned short ClientVer; // 子机版本 + + DINPUT, // unsigned char InBitCount; // 输入开关量数量 + DOUTPUT, // unsigned char OutBitCount; // 输出开关量数量 + 0, // unsigned char ExInBitCount; // 扩展的输入开关量数量 + 0, // unsigned char ExOutBitCount; // 扩展的输出开关量数量 + 0, // unsigned char InDWCount; // 输入数据字数 + 0, // unsigned char OutDWCount; // 输出数据字数 + 0, // unsigned char AIWCount; // 输入模拟量通道(字)数 // 16位为一个字(通道) + 0, // unsigned char AQWCount; // 输出模拟量通道(字)数 // 16位为一个字(通道) +// 0, // unsigned char AIBits; // 每通道位数 // 16位以下 +// 0, // unsigned char AQbits; // 每通道位数 // 16位以下 +}; + +const stExDeviceInfo MyExDeviceInfo ={ + (BOARD_TYPE<<8) + BOARD_VER, //nDeviceTypeVer // unsigned short ClientType; // 子机类型 + APP_VER, //ProgVer // unsigned short ClientVer; // 子机版本 + + DINPUT, // unsigned char InBitCount; // 输入开关量数量 + DOUTPUT, // unsigned char OutBitCount; // 输出开关量数量 + 0, // unsigned char ExInBitCount; // 扩展的输入开关量数量 + 0, // unsigned char ExOutBitCount; // 扩展的输出开关量数量 + 0, // unsigned char InDWCount; // 输入数据字数 + 0, // unsigned char OutDWCount; // 输出数据字数 + 0, // unsigned char AIWCount; // 输入模拟量通道(字)数 // 16位为一个字(通道) + 0, // unsigned char AQWCount; // 输出模拟量通道(字)数 // 16位为一个字(通道) +// 0, // unsigned char AIBits; // 每通道位数 // 16位以下 +// 0, // unsigned char AQbits; // 每通道位数 // 16位以下 + +}; + diff --git a/KBus/Src/main.c b/KBus/Src/main.c index f925e53..52dce20 100644 --- a/KBus/Src/main.c +++ b/KBus/Src/main.c @@ -45,23 +45,30 @@ #include "debug.h" #include "Functions.h" #include "KMachine.h" +#if (ENABLE_PLC) #include "PLCfunctions.h" +#endif //#include "KBus.h" #include "KLink.h" #include "string.h" #include "BSP.h" #include "ModbusRTU.h" -#if (BOARD_TYPE == 13) +#if (ENABLE_NET) #include "w5500_port.h" #include "../src/Ethernet/socket.h" #include "../src/Ethernet/loopback.h" -#elif (BOARD_TYPE == 14) -#include "FP0.h" -#elif (BOARD_TYPE == 15 || BOARD_TYPE == 16) +#endif + +#if (ENABLE_FPX) +#include "FPx.h" +#endif + +#if (ENABLE_RF) #include "KWireless.h" +#endif //#include "user.h" //#include "../src/radio/inc/sx126x-board.h" -#endif + /* USER CODE END Includes */ @@ -83,9 +90,13 @@ unsigned char FastFlicker=0; unsigned int Uart1IdelTimer = 0; +#if (ENABLE_PLC) stBinProg1 * pProgs = (stBinProg1 *)STORE_PRG_BASE; - +#endif uint32_t us1,us2,us3,us4,us5,us6; + + +stKBusDef KBus1; // /* USER CODE END PV */ @@ -118,9 +129,9 @@ static int Count=0; CurTickuS += 100; nCurTick++; - nSlaveTick++; + KBus1.nSlaveTick++; Count++; - if (Count>=10000) + if (Count>=10000) // 0.1mS, 10000娆�, 绉掕剦鍐� { Count=0; KMem.CurTimeSec++; @@ -132,7 +143,32 @@ return; } -void * KBusCallBackFunc(int nChn, int nEvent, void *pBuf, int nLen1) +void PendSvCallBack() +{ +#if (ENABLE_FPX) +///* + if (bSPI1RecvDone) + { + bSPI1RecvDone=0; + FPxParsePkt(SPI1RecvBuf,nSPI1RecvLenInBuf); + } +//*/ +#endif + if (Uart2Stat.bPacketRecved) + { + KBusParsePacket(&KBus1, (pKBPacket)Uart2RecvBuf1, Uart2RecvBuf1DataLen); + Uart2RecvBuf1DataLen=0; + Uart2Stat.bPacketRecved=0; + Uart2RecvDMA(Uart2RecvBuf1,sizeof(Uart2RecvBuf1)); + KMem.WDT[2]++; + } +} + +/* +KBus閫氳鍥炶皟鍑芥暟锛屽綋閫氳鐘舵�佹敼鍙樻垨鏁版嵁鏇存柊鏃惰璋冪敤銆� +鎴栬�呯郴缁熻姹傛椂銆� +*/ +void * KBusEvCallBackFunc(void* pParam, int nEvent, void *pBuf, int nLen1) { switch (nEvent){ @@ -151,6 +187,7 @@ case KBusEvTimeSync: break; case KBusEvDataUpdate: + KMem.WDT[10]++; if (KBus1.bMaster) { KMem.WY[0]=KBusMem.WLX[0]; //KBus Master KBusMem.WLY[0]=KMem.WX[0]; @@ -167,6 +204,8 @@ } return 0; } + +extern stDeviceInfo MyDeviceInfo; /* USER CODE END 0 */ @@ -191,22 +230,6 @@ /* USER CODE BEGIN Init */ - for (int i=0;i<9;i++) - { -// memset(KBusChnStats[i],0,0); - KBusChnStats[i].SendPackets=0; - KBusChnStats[i].RecvPackets=0; - KBusChnStats[i].LostPackets=0; - KBusChnStats[i].CtnLstPkts=0; - KBusChnStats[i].MaxCtnLstPkts=0; - KBusChnStats[i].NotPkgErr=0; - KBusChnStats[i].PkgLenErr=0; - KBusChnStats[i].TimeOutErr=0; - KBusChnStats[i].BCCErr=0; - KBusChnStats[i].Delay=0; - KBusChnStats[i].MaxDelay=0; - } - KMem.LastScanTime=0; KMem.ScanTimeuS=0; KMem.MinScanTimeuS=99999; @@ -242,20 +265,31 @@ ReadSysCfgFromFlash(&storedKMSysCfg); KMRunStat.bLEDFlick = 1; - + + int bKBusMaster,bKBusSlave,bKBusRepeater;; + int nChilds; + int nKBusStationID; KMem.CurJumperSW=ReadJumperSW(); KMem.EffJumperSW=KMem.CurJumperSW; +// Uart2Baud = AlterUart2Baud; nChilds=KMem.EffJumperSW&0x0f; // Uart2Baud = AlterUart2Baud; + nKBusStationID = KMem.EffJumperSW&0x0f; + nChilds=nKBusStationID; + + #if (BOARD_TYPE == 14) KMem.EffJumperSW|=0x10; nStationID=KMem.EffJumperSW&0x0f; if ((KMem.EffJumperSW&0x10)!=0) {bKBusMaster=1;bKBusSlave=0;} else{bKBusMaster=0;bKBusSlave=1;} - nChilds=nStationID; - FP0_Init(); + FPxSetCallBackFunc(&FPxCallBackFunc); + FPx_Init(nChilds); + int IOByteCount = nChilds; + FPx_SetIOCount(IOByteCount,IOByteCount); + #elif (BOARD_TYPE == 15 || BOARD_TYPE == 16) nStationID=1 ;//KMem.EffJumperSW&0x0f; // if (KMem.EffJumperSW == 0x1f) {bKBusRepeater=1;bKBusMaster=1;bKBusSlave=0;} @@ -263,16 +297,29 @@ // else {bKBusMaster=0;bKBusSlave=1;} #else - nStationID=KMem.EffJumperSW&0x0f; + nKBusStationID=nChilds; if (KMem.EffJumperSW == 0x1f) {bKBusRepeater=1;bKBusMaster=1;bKBusSlave=0;} - else if ((KMem.EffJumperSW&0x10)!=0) {bKBusMaster=1;bKBusSlave=0;} - else{bKBusMaster=0;bKBusSlave=1;} -#endif - nChilds=nStationID; - nCurPollId=1; + else if ((KMem.EffJumperSW&0x10)!=0) { + bKBusMaster=1;bKBusSlave=0; + } + else{ + bKBusMaster=0;bKBusSlave=1; + } - KBusInit(2, bKBusMaster, nChilds); - KBusSetCallBackFunc(2, &KBusCallBackFunc), +#endif + UNUSED(bKBusRepeater); + + if (bKBusMaster) { + KBusInitMaster(&KBus1, (KBusSendPktFuncDef)PutStr2, nChilds); + + } else if (bKBusSlave) { + KBusInitSlave(&KBus1, (KBusSendPktFuncDef)PutStr2, nKBusStationID,&MyDeviceInfo); + } + + KBusSetEvCallBackFunc(&KBus1, &KBusEvCallBackFunc); + + KMem.WDT[0]= nKBusStationID; + KMem.WDT[1] = KBus1.nStationId; //if (KMem.EffJumperSW == 0x00) Uart1Baud = DefaultUart1Baud; @@ -354,19 +401,20 @@ KMRunStat.WorkMode2=0; KMRunStat.WorkMode = storedKMSysCfg.theKMSysCfg.workmode; - +#if (ENABLE_PLC) if (KMRunStat.WorkMode == 1){ InitPLC(); KMRunStat.WorkMode2 = KMem.CurJumperSW&0x20 ; if (KMRunStat.WorkMode2) { StartPLC(); } } +#endif KMem.WX[7]=0x5a; #if (BOARD_TYPE == 15 || BOARD_TYPE == 16) KWireLessInit(KMem.EffJumperSW&0x20,KMem.EffJumperSW&0x0f); KWireLessStart(); #endif - + KMem.WY[0]=0; while (1) { //int MyKeyStat1,MyKeyStat2; @@ -380,14 +428,14 @@ int haltick=HAL_GetTick(); int thisJumperSW=ReadJumperSW(); - +#if (ENABLE_PLC) if (KMRunStat.WorkMode&1){ if (thisJumperSW&0x20 && !(KMem.CurJumperSW&0x20)) // Run 寮�鍏� 姝� 璺冲彉銆� {StartPLC();} if (!(thisJumperSW&0x20) && (KMem.CurJumperSW&0x20)) // Run 寮�鍏� 璐� 璺冲彉銆� {StopPLC();} } - +#endif KMem.CurJumperSW=thisJumperSW; KMem.haltick=haltick; // KMem.TotalRunTime=TotalRunTime; @@ -413,7 +461,6 @@ #else KMem.WX[0]= GetInput(); #endif - if (GetBoardType() == 7 || GetBoardType() ==8 || GetBoardType() == 9 || GetBoardType() ==10 || GetBoardType() ==15 || GetBoardType() ==16) { @@ -453,7 +500,7 @@ #endif // pProgs = (stBinProg1 *) STORE_PRG_BASE; - +#if (ENABLE_PLC) if ( KMRunStat.WorkMode==1 ) //&& bKBusMaster) { if (KMRunStat.nBinProgBank == 0){ @@ -466,7 +513,8 @@ ProcessPLCBinProg(pProgs, nSizeProg1); } - +#endif + KMem.ScanTimeuS=us2-KMem.LastScanTime; KMem.LastScanTime = us2; if (KMem.ScanTimeuS < KMem.MinScanTimeuS) {KMem.MinScanTimeuS = KMem.ScanTimeuS;} @@ -481,19 +529,10 @@ #if (BOARD_TYPE == 14) for (int i=0;i<nOutputBytes;i++) {BufferOut[i+1]=KMem.WYB[i];} -#else -// BufferOut[1]=KMem.WX[0]&0xff; -// BufferOut[2]=(KMem.WX[0]>>8)&0xff; #endif KBusMem.WLY[0]=KMem.WX[0]; - if (nChilds>0) { KBusMasterFunc(2); } + KBusLoopProcess(&KBus1); KMem.WY[0]=KBusMem.WLX[0]; //KBus Slave - -#if (BOARD_TYPE == 14) -// KMem.WX[0]=BufferIn[1]+(BufferIn[2]<<8); -#else -// KMem.WY[0]=BufferIn[1]+(BufferIn[2]<<8); -#endif } if (haltick&0x00002000) SlowFlicker=1; @@ -509,21 +548,28 @@ // if (! KMem.RunStat) {BufferIn[0]=0;} // KMem.WY[0]=BufferIn[0]; #else - KBusSlaveFunc(2); + // KBusSlaveFunc(&KBus1); + KBusLoopProcess(&KBus1); // if (! KMem.RunStat) {BufferIn[0]=0;} // KMem.WLY[0]=BufferIn[0]; + KMem.WDT[2] = KBus1.KBusChnStats[0].ClientRecvPkts; + + KMem.WDT[3] = KBus1.KBusChnStats[0].ClientSendPkts; + + + KMem.WDT[8] = KBus1.RunStat; + KMem.WDT[9] = KBus1.ErrStat; + + KMem.WDD[20] = KBus1.RecvTimeTick; + #endif - if (nSlaveTick&0x00002000) SlowFlicker=1; + if (KBus1.nSlaveTick&0x00002000) SlowFlicker=1; else SlowFlicker=0; - if (nSlaveTick&0x00000800) FastFlicker=1; + if (KBus1.nSlaveTick&0x00000800) FastFlicker=1; else FastFlicker=0; - KBusMem.WLX[0]=KMem.WX[0]; - KMem.WY[0]=KBusMem.WLY[0]; + // KBusMem.WLX[0]=KMem.WX[0]; + // KMem.WY[0]=KBusMem.WLY[0]; } - -// KMem.WY[0]=nCount2>>5; - if (KMem.RunStat) {KMem.RunStat--;} - if (KMem.ErrStat) {KMem.ErrStat--;} if (KMRunStat.bLEDFlick) { @@ -535,11 +581,15 @@ } else { + KMem.ErrStat = KBus1.ErrStat; // + KwRunStat.ErrStat; +#if (ENABLE_PLC) if (KMRunStat.WorkMode==1 ) { if (PLCMem.bPLCRunning){SetRunLed(SlowFlicker);} else {SetRunLed(0);} } - else { + else +#endif + { if (!KMem.RunStat) SetRunLed(SlowFlicker); else SetRunLed(FastFlicker); } @@ -554,7 +604,6 @@ SetErrLed(FastFlicker); SetErr2Led(FastFlicker); SetOutStat(0); - } } @@ -581,6 +630,7 @@ #endif us5=GetuS(); + us5=GetTick(); #if (BOARD_TYPE == 14) // PutOutput (KMem.WY[0]); diff --git a/KMini_CCT6/Inc/BSP.h b/KMini_CCT6/Inc/BSP.h index d118e2b..228484a 100644 --- a/KMini_CCT6/Inc/BSP.h +++ b/KMini_CCT6/Inc/BSP.h @@ -23,6 +23,7 @@ void MX_DMA_Init(void); void MX_USART1_UART_Init(void); void MX_USART2_UART_Init(void); +void MX_USART3_UART_Init(void); void MX_USART5_UART_Init(void); void MX_USART6_UART_Init(void); diff --git a/KMini_CCT6/Inc/BoardType.h b/KMini_CCT6/Inc/BoardType.h index cde1542..8e59835 100644 --- a/KMini_CCT6/Inc/BoardType.h +++ b/KMini_CCT6/Inc/BoardType.h @@ -76,5 +76,42 @@ #define DOUTPUT 0 #endif +typedef struct tagInfoBlockHdr { + unsigned short nBlkSign; // 开始标志 + unsigned short nBlkTypeVer; // 类型和版本 + unsigned short nBlkSize; // Block 大小, 包括开始和结束标志 + unsigned short Pad1; +}stInfoBlockHdr; + +typedef struct tagInfoBlockTail { + + unsigned short CRC16; + unsigned short EndSign; +}stInfoBlockTail; + +typedef struct tagBtLdrInfoBlock { + stInfoBlockHdr Hdr; + unsigned short nBtldrVer; + unsigned short nBtldrDevice; + unsigned short nBtldrSize; // 设计大小 + unsigned short nBtldrDataSize; //代码大小 + unsigned int nBtldr_AppAddr; + unsigned int nBtldr_NewAppInfoAddr; + unsigned int nBtldr_NewAppAddr; + stInfoBlockTail tail; +}stBtLdrInfoBlock, *pBtLdrInfoBlock; + +typedef struct tagAppInfoBlock { + stInfoBlockHdr Hdr; + unsigned short nAppVer; + unsigned short nAppDevice; + unsigned short nAppSize; // 代码设计大小 + unsigned short nAppDataSize; //实际代码大小 + unsigned int nAppStartAddr; + unsigned int nAppStartOffset; + unsigned int nApp; + stInfoBlockTail tail; +}stAppInfoBlock, * pAppInfoBlock; + #endif /* __BOARDTYPE_H__ */ diff --git a/KMini_CCT6/Inc/FP0.h b/KMini_CCT6/Inc/FP0.h new file mode 100644 index 0000000..99369a8 --- /dev/null +++ b/KMini_CCT6/Inc/FP0.h @@ -0,0 +1,130 @@ +/** + ****************************************************************************** + * @file : FP0.h + * @brief : Header for FP0.c file. + * This file contains the function defines of the FP0 . + ****************************************************************************** + */ +#ifndef __FP0_H__ +#define __FP0_H__ +#include "main.h" + +enum enCMD_TYPE +{ + CMD_0_QUERY =0, + CMD_1=0x1, // + CMD_2=0x2, // + CMD_3_EXCHG=0x3, // + CMD_4=0x4, // + CMD_5=0x5, // + CMD_6=0x6, // + CMD_7_END=0x7, // +}; + +typedef struct tagFP0PinStat +{ + unsigned short OE:1; + unsigned short RST:1; + unsigned short SYN:1; + unsigned short ACK:1; + unsigned short SEL:1; + +}stFP0PinStat; + + +#define RST_PORT GPIOB +#define RST_PIN LL_GPIO_PIN_9 + +#define SYN_PORT GPIOF +#define SYN_PIN LL_GPIO_PIN_6 + +#define ACK_PORT GPIOA +#define ACK_PIN LL_GPIO_PIN_11 + + +#define FP0DE_PORT GPIOF +#define FP0DE_PIN LL_GPIO_PIN_7 + +#define OE_PORT GPIOB +#define OE_PIN LL_GPIO_PIN_6 + +#define SEL_PORT GPIOB +#define SEL_PIN LL_GPIO_PIN_8 + + +#define GetRSTPin() LL_GPIO_IsInputPinSet(RST_PORT,RST_PIN) + +#define GetSYNPin() LL_GPIO_IsInputPinSet(SYN_PORT,SYN_PIN) + +#define GetOEPin() LL_GPIO_IsInputPinSet(OE_PORT,OE_PIN) + +#define GetSELPin() (1) //LL_GPIO_IsInputPinSet(SEL_PORT,SEL_PIN) + +#define GetACKPin() LL_GPIO_IsInputPinSet(ACK_PORT,ACK_PIN) + + +#define SetACKPin_0() LL_GPIO_ResetOutputPin(ACK_PORT,ACK_PIN) +#define SetACKPin_1() LL_GPIO_SetOutputPin(ACK_PORT,ACK_PIN) + +#define SetFP0DEPin_0() LL_GPIO_ResetOutputPin(FP0DE_PORT,FP0DE_PIN) +#define SetFP0DEPin_1() LL_GPIO_SetOutputPin(FP0DE_PORT,FP0DE_PIN) + + +extern uint8_t PkgBuf1[32]; +extern uint8_t PkgBuf2[32]; +extern uint8_t PkgLen1; +extern uint8_t PkgLen2; +extern uint8_t bReceiving; +extern uint8_t nReceivedLen; +extern uint8_t bSending; +extern uint8_t bSentLen; + +extern uint8_t bConfiged; + +extern uint8_t nInputBytes; +extern uint8_t nOutputBytes; + +extern unsigned char SPI1RecvBuf[32]; +extern unsigned char SPI1SendBuf[32]; + +extern volatile unsigned char bSPI1Recving; +extern volatile unsigned char bSPI1RecvDone; + +extern volatile unsigned char nSPI1RecvPos; +extern volatile unsigned char nSPI1RecvLenInBuf; + +extern volatile unsigned char nSPI1ToSendLen; +extern volatile unsigned char nSPI1SentLen; + +extern volatile unsigned char bSPI1Sending; +extern volatile unsigned char bSPI1SendDone; + +extern volatile int oldSYN; + +typedef struct tagFP0QuRplyPkg +{ + uint8_t Hdr1; + uint8_t nInputBytes; + uint8_t nOutputBytes; + uint8_t nParam1; + uint8_t nBCC; + uint8_t End1; +}stFP0QuRplyPkg, *pFP0QuRplyPkg; + +typedef struct tagFP0EXGRplyPkg +{ + uint8_t Hdr1; + uint8_t nInputBytes[6]; + uint8_t nBCC; + uint8_t End1; +}stFP0EXGRplyPkg, * pFP0EXGRplyPkg; + +uint8_t FP0_Init(void); +uint8_t FP0_Proc(void); + +uint8_t CalFP0BCC(uint8_t* pBuf, uint8_t len1); +uint8_t CheckFP0Pkg(uint8_t * pBuf, uint8_t len1); +uint8_t ParseFP0Pkg(uint8_t * pBuf, uint8_t len1); +uint8_t SendFP0Pkg(uint8_t * pBuf, uint8_t len1); + +#endif /* __FP0_H__ */ diff --git a/KMini_CCT6/Inc/LindarPos.h b/KMini_CCT6/Inc/LindarPos.h new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/KMini_CCT6/Inc/LindarPos.h diff --git a/KMini_CCT6/Inc/OrdLidar.h b/KMini_CCT6/Inc/OrdLidar.h new file mode 100644 index 0000000..f6cc679 --- /dev/null +++ b/KMini_CCT6/Inc/OrdLidar.h @@ -0,0 +1,174 @@ +/** + ****************************************************************************** + * @file : OrdLidar.h + * @brief : Header for OrdLidar.c file. + * This file contains the Lidar defines of the application. + ****************************************************************************** + */ + +#ifndef __ORDLIDAR_H__ +#define __ORDLIDAR_H__ + +#define ORDLIDAR_VER (0x100) +#pragma anon_unions + +#include <stdint.h> +#include <stdlib.h> + +#define TMPBUFF_SIZE (1024) +#define MAX_BLOCK_POINT_NUM (100) +#define MAX_BLOCK_SIZE (MAX_BLOCK_POINT_NUM * 4) +#define POINT_CIRCLE_MAX_SIZE (4096) +#define POINT_PKG_MAX_SIZE (200) +#define POINT_PER_PACK (12) + +#define SET_TIME_OUT (10) //unit:s +#define HEAD_FLAG (0xF5A5) +#define TAIL_FLAG (0x31F2) +#define HEAD_LEN (5) + +typedef enum +{ + ORADAR_MS200 = 1, + ORADAR_MS300 = 2, +}oradar_lidar_type_id; + +typedef enum { + ORADAR_TYPE_SERIAL = 0x0,/**< serial type.*/ + ORADAR_TYPC_UDP = 0x1,/**< socket udp type.*/ + ORADAR_TYPE_TCP = 0x1,/**< socket tcp type.*/ +} device_type_id; + +typedef enum +{ + SET_ROTATION_SPEED = 0xA1, + SET_RUN_MODE = 0xA2, +}CMD; + +typedef enum +{ + WRITE_PARAM = 0xC1, + WRITE_PARAM_RESPONSE = 0xC2, + READ_PARAM = 0xC3, + READ_PARAM_RESPONSE = 0xC4, +}CMD_TYPE; + +typedef struct uart_comm_st +{ + uint16_t head_flag; + uint8_t cmd; + uint8_t cmd_type; + uint8_t payload_len; + uint8_t data[10]; +}uart_comm_t; + +typedef struct point_data_st +{ + unsigned short distance; + unsigned short intensity; + float angle; +} point_data_t; + +typedef enum frame_head_flag_et +{ + HEAD_FLAG_NONE, + HEAD_FLAG_OK, +} frame_head_flag_t; + +typedef enum protocol_version_et +{ + VERSION_NONE = 0, + VERSION_MS200, +} protocol_version_t; + +typedef struct __attribute__((packed)) +{ + uint16_t distance; + uint8_t confidence; +} OradarLidarPoint; + +typedef struct __attribute__((packed)) +{ + uint8_t header; + uint8_t ver_len; + uint16_t speed; + uint16_t start_angle; + OradarLidarPoint point[POINT_PER_PACK]; + uint16_t end_angle; + uint16_t timestamp; + uint8_t crc8; +} OradarLidarFrame; + + + +typedef struct LidarDotData +{ + unsigned char intensity; + unsigned char s1; +/* + struct { + unsigned char flag:2; + unsigned char s1:6; + }; +*/ + unsigned char s2; +}stLidarDotData; + +typedef struct tagLidarDotsPkt +{ + unsigned short StSign; + unsigned char CT; + unsigned char LSN; + unsigned short FSA; + unsigned short LSA; + unsigned short CS; + stLidarDotData LidarDotDatas[40]; + +}stLidarDotsPkt, *pLidarDotsPkt; + + +typedef struct tagLidarVector +{ + int intensit; + int angle; + int value; +}stLidarVector; + +typedef struct tagLidarDot +{ + int x; + int y; + unsigned int distance; +}stLidarDot; + + +extern int nPosX; +extern int nPosY; +extern int nPosZ; +extern int nPosZ1, nPosZ2; + +extern int pCount1; +extern int pCount2; + +extern int eCount1; +extern int eCount2; + +extern int dCount1; +extern int dCount2; + +extern int vCount1; +extern int vCount2; + +extern int results[32]; + + +int OrdLidarStart(int nIdx); /* Start LiDar Running , nIde = 0 , 1 , -1 == ALL */ +int OrdLidarStop(int nIdx); /* stop Lidar Running , nIde = 0 , 1 , -1 == ALL */ + + +int OrdLidarParsePkt(int nLidarIdx, OradarLidarFrame * pLindarPkt, int len1); + +int ProcessPos(int nLidarIdx, stLidarDot * pLindarDots, int nCount); + +#endif /* __ORDLIDAR_H__ */ + diff --git a/KMini_CCT6/Inc/SLP.h b/KMini_CCT6/Inc/SLP.h index 45e58a8..c8718f8 100644 --- a/KMini_CCT6/Inc/SLP.h +++ b/KMini_CCT6/Inc/SLP.h @@ -1,5 +1,3 @@ - - #ifndef __SLP_H_V10__ #define __SLP_H_V10__ typedef unsigned char uchar; @@ -19,14 +17,49 @@ // uchar ED; }stSLPPacket; -extern uchar bSLPMaster; -extern uchar nStation; -extern uchar SLPinputB; -extern uchar SLPoutputB; -extern uchar SLPErrSign; +//extern uchar bSLPMaster; +//extern uchar nStation; +//extern uchar SLPinputB; +//extern uchar SLPoutputB; +//extern uchar SLPErrSign; -void SLPparsePacket(char * pBuf, uchar len1); -void SLPMasterSendPacket(void); -void SLPProcess(void); +typedef void (*SLPSendPktDef)(unsigned char * pBuf, int Len1); + + +typedef struct tagSLPDef +{ + uchar bSLPMaster; + uchar nStation; + uchar SLPinputB; + uchar SLPoutputB; + uchar nCurStation; + uchar inputBuf[5]; + uchar outputBuf[5]; + + uchar SendBuf[8]; + + uchar SLPMasterRecved; //主机收到子机回复 + + SLPSendPktDef SLPSendPktFunc; + + unsigned int SLPSlaveCountOut; + + unsigned int SLPLostPkt; // 丢包数量 + + uchar SLPOKSign; + uchar SLPErrSign; + + int nCount; + +}stSLPDef; + +void SLPInit(stSLPDef * pSLP, SLPSendPktDef pFunc1); +void SLPSetCallBack(stSLPDef * pSLP, SLPSendPktDef pFunc1); + +void SLPparsePacket(stSLPDef * pSLP, unsigned char * pBuf, uchar len1); +void SLPMasterSendPacket(stSLPDef * pSLP); +void SLPProcess(stSLPDef * pSLP); + #endif /* __SLP_H_V10__ */ + diff --git a/KMini_CCT6/Inc/YDLidar.h b/KMini_CCT6/Inc/YDLidar.h new file mode 100644 index 0000000..8ed890f --- /dev/null +++ b/KMini_CCT6/Inc/YDLidar.h @@ -0,0 +1,79 @@ +/** + ****************************************************************************** + * @file : YDLidar.h + * @brief : Header for YDLidar.c file. + * This file contains the Lidar defines of the application. + ****************************************************************************** + */ + +#ifndef __YDLIDAR_H__ +#define __YDLIDAR_H__ + +#define YDLIDAR_VER (0x100) +#pragma anon_unions + +typedef struct LidarDotData +{ + unsigned char intensity; + unsigned char s1; +/* + struct { + unsigned char flag:2; + unsigned char s1:6; + }; +*/ + unsigned char s2; +}stLidarDotData; + +typedef struct tagLidarDotsPkt +{ + unsigned short StSign; + unsigned char CT; + unsigned char LSN; + unsigned short FSA; + unsigned short LSA; + unsigned short CS; + stLidarDotData LidarDotDatas[40]; + +}stLidarDotsPkt, *pLidarDotsPkt; + + +typedef struct tagLidarVector +{ + int intensit; + int angle; + int value; +}stLidarVector; + +typedef struct tagLidarDot +{ + int x; + int y; + int distance; +}stLidarDot; + + +extern int nPosX; +extern int nPosY; +extern int nPosZ; +extern int nPosZ1, nPosZ2; + +extern int pCount1; +extern int pCount2; + +extern int dCount1; +extern int dCount2; + +extern int vCount1; +extern int vCount2; + + +int YdLidarStart(int nIdx); /* Start LiDar Running , nIde = 0 , 1 , -1 == ALL */ +int YdLidarStop(int nIdx); /* stop Lidar Running , nIde = 0 , 1 , -1 == ALL */ + + +int YdLidarParsePkt(int nLidarIdx, stLidarDotsPkt * pLindarPkt, int len1); + + +#endif /* __YDLIDAR_H__ */ + diff --git a/KMini_CCT6/Inc/functions.h b/KMini_CCT6/Inc/functions.h index f55a927..6760cf4 100644 --- a/KMini_CCT6/Inc/functions.h +++ b/KMini_CCT6/Inc/functions.h @@ -45,23 +45,36 @@ }; }shortbits; -#define RX5BUFSIZE 64 -#define TX5BUFSIZE 64 +#define RX1BUFSIZE 160 +#define TX1BUFSIZE 260 + +#define UART3RXBUFSIZE 256 +#define UART3TXBUFSIZE 64 + +extern stUartStat Uart3Stat; +extern unsigned char Uart3RxBuf[UART3RXBUFSIZE]; +extern unsigned char Uart3TxBuf[UART3TXBUFSIZE]; +extern unsigned int Uart3RecvBuf1DataLen; +extern unsigned int Uart3ToSendLen; +extern unsigned int Uart3SentLen; + +#define UART5RXBUFSIZE 256 +#define UART5TXBUFSIZE 64 extern stUartStat Uart5Stat; -extern unsigned char Uart5RxBuf[RX5BUFSIZE]; -extern unsigned char Uart5TxBuf[TX5BUFSIZE]; +extern unsigned char Uart5RxBuf[UART5RXBUFSIZE]; +extern unsigned char Uart5TxBuf[UART5TXBUFSIZE]; extern unsigned int Uart5RecvBuf1DataLen; extern unsigned int Uart5ToSendLen; extern unsigned int Uart5SentLen; -#define RX6BUFSIZE 64 -#define TX6BUFSIZE 64 +#define UART6RXBUFSIZE 64 +#define UART6TXBUFSIZE 64 extern stUartStat Uart6Stat; -extern unsigned char Uart6RxBuf[RX6BUFSIZE]; -extern unsigned char Uart6TxBuf[TX6BUFSIZE]; +extern unsigned char Uart6RxBuf[UART6RXBUFSIZE]; +extern unsigned char Uart6TxBuf[UART6TXBUFSIZE]; extern unsigned int Uart6RecvBuf1DataLen; extern unsigned int Uart6ToSendLen; extern unsigned int Uart6SentLen; @@ -96,17 +109,23 @@ void Uart1RecvDone(void); void Uart2SendDone(void); void Uart2RecvDone(void); + +void Uart3SendDone(void); +void Uart3RecvDone(void); +void Uart3SendPacket(char * str, int len); + void Uart5SendDone(void); void Uart5RecvDone(void); void Uart5SendPacket(char * str, int len); void Uart6SendDone(void); void Uart6RecvDone(void); -void Uart6SendPacket(char * str, int len); +void Uart6SendPacket(unsigned char * str, int len); -void SLPSendPacket(char * str, uchar len); +void SLPSendPacket(void * str, uchar len); int PutStr(char * str1, int len1); +int PutStr2(char * str1, int len1); int SendPacket(int nChn, void * pBuf,int len1); //int SendPacket1(void * pBuf,int len1); //int SendPacket2(pKBPacket p1,int len1); diff --git a/KMini_CCT6/Inc/main.h b/KMini_CCT6/Inc/main.h index 67a1955..468e8b3 100644 --- a/KMini_CCT6/Inc/main.h +++ b/KMini_CCT6/Inc/main.h @@ -59,6 +59,7 @@ #include "stm32f0xx_ll_tim.h" #include "stm32f0xx_ll_utils.h" #include "stm32f0xx_ll_pwr.h" +#include "stm32f0xx_ll_flash.h" /* USER CODE BEGIN Includes */ @@ -74,7 +75,9 @@ /* #define USE_FULL_ASSERT 1U */ /* USER CODE BEGIN Private defines */ +#include "KBus.h" +extern stKBusDef KBus1; /* USER CODE END Private defines */ #ifdef __cplusplus diff --git a/KMini_CCT6/Inc/stm32f0xx_hal_conf.h b/KMini_CCT6/Inc/stm32f0xx_hal_conf.h index 9a6bde7..07378f2 100644 --- a/KMini_CCT6/Inc/stm32f0xx_hal_conf.h +++ b/KMini_CCT6/Inc/stm32f0xx_hal_conf.h @@ -76,7 +76,7 @@ /*#define HAL_EXTI_MODULE_ENABLED */ #define HAL_CORTEX_MODULE_ENABLED #define HAL_DMA_MODULE_ENABLED -#define HAL_FLASH_MODULE_ENABLED +#define HAL_FLASH_MODULE_ENABLED #define HAL_GPIO_MODULE_ENABLED #define HAL_PWR_MODULE_ENABLED #define HAL_RCC_MODULE_ENABLED diff --git a/KMini_CCT6/Inc/stm32f0xx_ll_rcc.h b/KMini_CCT6/Inc/stm32f0xx_ll_rcc.h new file mode 100644 index 0000000..c09effb --- /dev/null +++ b/KMini_CCT6/Inc/stm32f0xx_ll_rcc.h @@ -0,0 +1,2257 @@ +/** + ****************************************************************************** + * @file stm32f0xx_ll_rcc.h + * @author MCD Application Team + * @brief Header file of RCC LL module. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32F0xx_LL_RCC_H +#define __STM32F0xx_LL_RCC_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32f0xx.h" + +/** @addtogroup STM32F0xx_LL_Driver + * @{ + */ + +#if defined(RCC) + +/** @defgroup RCC_LL RCC + * @{ + */ + +/* Private types -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private constants ---------------------------------------------------------*/ +/** @defgroup RCC_LL_Private_Constants RCC Private Constants + * @{ + */ +/* Defines used for the bit position in the register and perform offsets*/ +#define RCC_POSITION_HPRE (uint32_t)4U /*!< field position in register RCC_CFGR */ +#define RCC_POSITION_PPRE1 (uint32_t)8U /*!< field position in register RCC_CFGR */ +#define RCC_POSITION_PLLMUL (uint32_t)18U /*!< field position in register RCC_CFGR */ +#define RCC_POSITION_HSICAL (uint32_t)8U /*!< field position in register RCC_CR */ +#define RCC_POSITION_HSITRIM (uint32_t)3U /*!< field position in register RCC_CR */ +#define RCC_POSITION_HSI14TRIM (uint32_t)3U /*!< field position in register RCC_CR2 */ +#define RCC_POSITION_HSI14CAL (uint32_t)8U /*!< field position in register RCC_CR2 */ +#if defined(RCC_HSI48_SUPPORT) +#define RCC_POSITION_HSI48CAL (uint32_t)24U /*!< field position in register RCC_CR2 */ +#endif /* RCC_HSI48_SUPPORT */ +#define RCC_POSITION_USART1SW (uint32_t)0U /*!< field position in register RCC_CFGR3 */ +#define RCC_POSITION_USART2SW (uint32_t)16U /*!< field position in register RCC_CFGR3 */ +#define RCC_POSITION_USART3SW (uint32_t)18U /*!< field position in register RCC_CFGR3 */ + +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ +#if defined(USE_FULL_LL_DRIVER) +/** @defgroup RCC_LL_Private_Macros RCC Private Macros + * @{ + */ +/** + * @} + */ +#endif /*USE_FULL_LL_DRIVER*/ +/* Exported types ------------------------------------------------------------*/ +#if defined(USE_FULL_LL_DRIVER) +/** @defgroup RCC_LL_Exported_Types RCC Exported Types + * @{ + */ + +/** @defgroup LL_ES_CLOCK_FREQ Clocks Frequency Structure + * @{ + */ + +/** + * @brief RCC Clocks Frequency Structure + */ +typedef struct +{ + uint32_t SYSCLK_Frequency; /*!< SYSCLK clock frequency */ + uint32_t HCLK_Frequency; /*!< HCLK clock frequency */ + uint32_t PCLK1_Frequency; /*!< PCLK1 clock frequency */ +} LL_RCC_ClocksTypeDef; + +/** + * @} + */ + +/** + * @} + */ +#endif /* USE_FULL_LL_DRIVER */ + +/* Exported constants --------------------------------------------------------*/ +/** @defgroup RCC_LL_Exported_Constants RCC Exported Constants + * @{ + */ + +/** @defgroup RCC_LL_EC_OSC_VALUES Oscillator Values adaptation + * @brief Defines used to adapt values of different oscillators + * @note These values could be modified in the user environment according to + * HW set-up. + * @{ + */ +#if !defined (HSE_VALUE) +#define HSE_VALUE 12000000U /*!< Value of the HSE oscillator in Hz */ +#endif /* HSE_VALUE */ + +#if !defined (HSI_VALUE) +#define HSI_VALUE 8000000U /*!< Value of the HSI oscillator in Hz */ +#endif /* HSI_VALUE */ + +#if !defined (LSE_VALUE) +#define LSE_VALUE 32768U /*!< Value of the LSE oscillator in Hz */ +#endif /* LSE_VALUE */ + +#if !defined (LSI_VALUE) +#define LSI_VALUE 32000U /*!< Value of the LSI oscillator in Hz */ +#endif /* LSI_VALUE */ +#if defined(RCC_HSI48_SUPPORT) + +#if !defined (HSI48_VALUE) +#define HSI48_VALUE 48000000U /*!< Value of the HSI48 oscillator in Hz */ +#endif /* HSI48_VALUE */ +#endif /* RCC_HSI48_SUPPORT */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_CLEAR_FLAG Clear Flags Defines + * @brief Flags defines which can be used with LL_RCC_WriteReg function + * @{ + */ +#define LL_RCC_CIR_LSIRDYC RCC_CIR_LSIRDYC /*!< LSI Ready Interrupt Clear */ +#define LL_RCC_CIR_LSERDYC RCC_CIR_LSERDYC /*!< LSE Ready Interrupt Clear */ +#define LL_RCC_CIR_HSIRDYC RCC_CIR_HSIRDYC /*!< HSI Ready Interrupt Clear */ +#define LL_RCC_CIR_HSERDYC RCC_CIR_HSERDYC /*!< HSE Ready Interrupt Clear */ +#define LL_RCC_CIR_PLLRDYC RCC_CIR_PLLRDYC /*!< PLL Ready Interrupt Clear */ +#define LL_RCC_CIR_HSI14RDYC RCC_CIR_HSI14RDYC /*!< HSI14 Ready Interrupt Clear */ +#if defined(RCC_HSI48_SUPPORT) +#define LL_RCC_CIR_HSI48RDYC RCC_CIR_HSI48RDYC /*!< HSI48 Ready Interrupt Clear */ +#endif /* RCC_HSI48_SUPPORT */ +#define LL_RCC_CIR_CSSC RCC_CIR_CSSC /*!< Clock Security System Interrupt Clear */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_GET_FLAG Get Flags Defines + * @brief Flags defines which can be used with LL_RCC_ReadReg function + * @{ + */ +#define LL_RCC_CIR_LSIRDYF RCC_CIR_LSIRDYF /*!< LSI Ready Interrupt flag */ +#define LL_RCC_CIR_LSERDYF RCC_CIR_LSERDYF /*!< LSE Ready Interrupt flag */ +#define LL_RCC_CIR_HSIRDYF RCC_CIR_HSIRDYF /*!< HSI Ready Interrupt flag */ +#define LL_RCC_CIR_HSERDYF RCC_CIR_HSERDYF /*!< HSE Ready Interrupt flag */ +#define LL_RCC_CIR_PLLRDYF RCC_CIR_PLLRDYF /*!< PLL Ready Interrupt flag */ +#define LL_RCC_CIR_HSI14RDYF RCC_CIR_HSI14RDYF /*!< HSI14 Ready Interrupt flag */ +#if defined(RCC_HSI48_SUPPORT) +#define LL_RCC_CIR_HSI48RDYF RCC_CIR_HSI48RDYF /*!< HSI48 Ready Interrupt flag */ +#endif /* RCC_HSI48_SUPPORT */ +#define LL_RCC_CIR_CSSF RCC_CIR_CSSF /*!< Clock Security System Interrupt flag */ +#define LL_RCC_CSR_OBLRSTF RCC_CSR_OBLRSTF /*!< OBL reset flag */ +#define LL_RCC_CSR_PINRSTF RCC_CSR_PINRSTF /*!< PIN reset flag */ +#define LL_RCC_CSR_PORRSTF RCC_CSR_PORRSTF /*!< POR/PDR reset flag */ +#define LL_RCC_CSR_SFTRSTF RCC_CSR_SFTRSTF /*!< Software Reset flag */ +#define LL_RCC_CSR_IWDGRSTF RCC_CSR_IWDGRSTF /*!< Independent Watchdog reset flag */ +#define LL_RCC_CSR_WWDGRSTF RCC_CSR_WWDGRSTF /*!< Window watchdog reset flag */ +#define LL_RCC_CSR_LPWRRSTF RCC_CSR_LPWRRSTF /*!< Low-Power reset flag */ +#if defined(RCC_CSR_V18PWRRSTF) +#define LL_RCC_CSR_V18PWRRSTF RCC_CSR_V18PWRRSTF /*!< Reset flag of the 1.8 V domain. */ +#endif /* RCC_CSR_V18PWRRSTF */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_IT IT Defines + * @brief IT defines which can be used with LL_RCC_ReadReg and LL_RCC_WriteReg functions + * @{ + */ +#define LL_RCC_CIR_LSIRDYIE RCC_CIR_LSIRDYIE /*!< LSI Ready Interrupt Enable */ +#define LL_RCC_CIR_LSERDYIE RCC_CIR_LSERDYIE /*!< LSE Ready Interrupt Enable */ +#define LL_RCC_CIR_HSIRDYIE RCC_CIR_HSIRDYIE /*!< HSI Ready Interrupt Enable */ +#define LL_RCC_CIR_HSERDYIE RCC_CIR_HSERDYIE /*!< HSE Ready Interrupt Enable */ +#define LL_RCC_CIR_PLLRDYIE RCC_CIR_PLLRDYIE /*!< PLL Ready Interrupt Enable */ +#define LL_RCC_CIR_HSI14RDYIE RCC_CIR_HSI14RDYIE /*!< HSI14 Ready Interrupt Enable */ +#if defined(RCC_HSI48_SUPPORT) +#define LL_RCC_CIR_HSI48RDYIE RCC_CIR_HSI48RDYIE /*!< HSI48 Ready Interrupt Enable */ +#endif /* RCC_HSI48_SUPPORT */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_LSEDRIVE LSE oscillator drive capability + * @{ + */ +#define LL_RCC_LSEDRIVE_LOW ((uint32_t)0x00000000U) /*!< Xtal mode lower driving capability */ +#define LL_RCC_LSEDRIVE_MEDIUMLOW RCC_BDCR_LSEDRV_1 /*!< Xtal mode medium low driving capability */ +#define LL_RCC_LSEDRIVE_MEDIUMHIGH RCC_BDCR_LSEDRV_0 /*!< Xtal mode medium high driving capability */ +#define LL_RCC_LSEDRIVE_HIGH RCC_BDCR_LSEDRV /*!< Xtal mode higher driving capability */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_SYS_CLKSOURCE System clock switch + * @{ + */ +#define LL_RCC_SYS_CLKSOURCE_HSI RCC_CFGR_SW_HSI /*!< HSI selection as system clock */ +#define LL_RCC_SYS_CLKSOURCE_HSE RCC_CFGR_SW_HSE /*!< HSE selection as system clock */ +#define LL_RCC_SYS_CLKSOURCE_PLL RCC_CFGR_SW_PLL /*!< PLL selection as system clock */ +#if defined(RCC_CFGR_SW_HSI48) +#define LL_RCC_SYS_CLKSOURCE_HSI48 RCC_CFGR_SW_HSI48 /*!< HSI48 selection as system clock */ +#endif /* RCC_CFGR_SW_HSI48 */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_SYS_CLKSOURCE_STATUS System clock switch status + * @{ + */ +#define LL_RCC_SYS_CLKSOURCE_STATUS_HSI RCC_CFGR_SWS_HSI /*!< HSI used as system clock */ +#define LL_RCC_SYS_CLKSOURCE_STATUS_HSE RCC_CFGR_SWS_HSE /*!< HSE used as system clock */ +#define LL_RCC_SYS_CLKSOURCE_STATUS_PLL RCC_CFGR_SWS_PLL /*!< PLL used as system clock */ +#if defined(RCC_CFGR_SWS_HSI48) +#define LL_RCC_SYS_CLKSOURCE_STATUS_HSI48 RCC_CFGR_SWS_HSI48 /*!< HSI48 used as system clock */ +#endif /* RCC_CFGR_SWS_HSI48 */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_SYSCLK_DIV AHB prescaler + * @{ + */ +#define LL_RCC_SYSCLK_DIV_1 RCC_CFGR_HPRE_DIV1 /*!< SYSCLK not divided */ +#define LL_RCC_SYSCLK_DIV_2 RCC_CFGR_HPRE_DIV2 /*!< SYSCLK divided by 2 */ +#define LL_RCC_SYSCLK_DIV_4 RCC_CFGR_HPRE_DIV4 /*!< SYSCLK divided by 4 */ +#define LL_RCC_SYSCLK_DIV_8 RCC_CFGR_HPRE_DIV8 /*!< SYSCLK divided by 8 */ +#define LL_RCC_SYSCLK_DIV_16 RCC_CFGR_HPRE_DIV16 /*!< SYSCLK divided by 16 */ +#define LL_RCC_SYSCLK_DIV_64 RCC_CFGR_HPRE_DIV64 /*!< SYSCLK divided by 64 */ +#define LL_RCC_SYSCLK_DIV_128 RCC_CFGR_HPRE_DIV128 /*!< SYSCLK divided by 128 */ +#define LL_RCC_SYSCLK_DIV_256 RCC_CFGR_HPRE_DIV256 /*!< SYSCLK divided by 256 */ +#define LL_RCC_SYSCLK_DIV_512 RCC_CFGR_HPRE_DIV512 /*!< SYSCLK divided by 512 */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_APB1_DIV APB low-speed prescaler (APB1) + * @{ + */ +#define LL_RCC_APB1_DIV_1 RCC_CFGR_PPRE_DIV1 /*!< HCLK not divided */ +#define LL_RCC_APB1_DIV_2 RCC_CFGR_PPRE_DIV2 /*!< HCLK divided by 2 */ +#define LL_RCC_APB1_DIV_4 RCC_CFGR_PPRE_DIV4 /*!< HCLK divided by 4 */ +#define LL_RCC_APB1_DIV_8 RCC_CFGR_PPRE_DIV8 /*!< HCLK divided by 8 */ +#define LL_RCC_APB1_DIV_16 RCC_CFGR_PPRE_DIV16 /*!< HCLK divided by 16 */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_MCO1SOURCE MCO1 SOURCE selection + * @{ + */ +#define LL_RCC_MCO1SOURCE_NOCLOCK RCC_CFGR_MCOSEL_NOCLOCK /*!< MCO output disabled, no clock on MCO */ +#define LL_RCC_MCO1SOURCE_HSI14 RCC_CFGR_MCOSEL_HSI14 /*!< HSI14 oscillator clock selected */ +#define LL_RCC_MCO1SOURCE_SYSCLK RCC_CFGR_MCOSEL_SYSCLK /*!< SYSCLK selection as MCO source */ +#define LL_RCC_MCO1SOURCE_HSI RCC_CFGR_MCOSEL_HSI /*!< HSI selection as MCO source */ +#define LL_RCC_MCO1SOURCE_HSE RCC_CFGR_MCOSEL_HSE /*!< HSE selection as MCO source */ +#define LL_RCC_MCO1SOURCE_LSI RCC_CFGR_MCOSEL_LSI /*!< LSI selection as MCO source */ +#define LL_RCC_MCO1SOURCE_LSE RCC_CFGR_MCOSEL_LSE /*!< LSE selection as MCO source */ +#if defined(RCC_CFGR_MCOSEL_HSI48) +#define LL_RCC_MCO1SOURCE_HSI48 RCC_CFGR_MCOSEL_HSI48 /*!< HSI48 selection as MCO source */ +#endif /* RCC_CFGR_MCOSEL_HSI48 */ +#define LL_RCC_MCO1SOURCE_PLLCLK_DIV_2 RCC_CFGR_MCOSEL_PLL_DIV2 /*!< PLL clock divided by 2*/ +#if defined(RCC_CFGR_PLLNODIV) +#define LL_RCC_MCO1SOURCE_PLLCLK (RCC_CFGR_MCOSEL_PLL_DIV2 | RCC_CFGR_PLLNODIV) /*!< PLL clock selected*/ +#endif /* RCC_CFGR_PLLNODIV */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_MCO1_DIV MCO1 prescaler + * @{ + */ +#define LL_RCC_MCO1_DIV_1 ((uint32_t)0x00000000U)/*!< MCO Clock divided by 1 */ +#if defined(RCC_CFGR_MCOPRE) +#define LL_RCC_MCO1_DIV_2 RCC_CFGR_MCOPRE_DIV2 /*!< MCO Clock divided by 2 */ +#define LL_RCC_MCO1_DIV_4 RCC_CFGR_MCOPRE_DIV4 /*!< MCO Clock divided by 4 */ +#define LL_RCC_MCO1_DIV_8 RCC_CFGR_MCOPRE_DIV8 /*!< MCO Clock divided by 8 */ +#define LL_RCC_MCO1_DIV_16 RCC_CFGR_MCOPRE_DIV16 /*!< MCO Clock divided by 16 */ +#define LL_RCC_MCO1_DIV_32 RCC_CFGR_MCOPRE_DIV32 /*!< MCO Clock divided by 32 */ +#define LL_RCC_MCO1_DIV_64 RCC_CFGR_MCOPRE_DIV64 /*!< MCO Clock divided by 64 */ +#define LL_RCC_MCO1_DIV_128 RCC_CFGR_MCOPRE_DIV128 /*!< MCO Clock divided by 128 */ +#endif /* RCC_CFGR_MCOPRE */ +/** + * @} + */ + +#if defined(USE_FULL_LL_DRIVER) +/** @defgroup RCC_LL_EC_PERIPH_FREQUENCY Peripheral clock frequency + * @{ + */ +#define LL_RCC_PERIPH_FREQUENCY_NO 0x00000000U /*!< No clock enabled for the peripheral */ +#define LL_RCC_PERIPH_FREQUENCY_NA 0xFFFFFFFFU /*!< Frequency cannot be provided as external clock */ +/** + * @} + */ +#endif /* USE_FULL_LL_DRIVER */ + +/** @defgroup RCC_LL_EC_USART1_CLKSOURCE Peripheral USART clock source selection + * @{ + */ +#define LL_RCC_USART1_CLKSOURCE_PCLK1 (uint32_t)((RCC_POSITION_USART1SW << 24) | RCC_CFGR3_USART1SW_PCLK) /*!< PCLK1 clock used as USART1 clock source */ +#define LL_RCC_USART1_CLKSOURCE_SYSCLK (uint32_t)((RCC_POSITION_USART1SW << 24) | RCC_CFGR3_USART1SW_SYSCLK) /*!< System clock selected as USART1 clock source */ +#define LL_RCC_USART1_CLKSOURCE_LSE (uint32_t)((RCC_POSITION_USART1SW << 24) | RCC_CFGR3_USART1SW_LSE) /*!< LSE oscillator clock used as USART1 clock source */ +#define LL_RCC_USART1_CLKSOURCE_HSI (uint32_t)((RCC_POSITION_USART1SW << 24) | RCC_CFGR3_USART1SW_HSI) /*!< HSI oscillator clock used as USART1 clock source */ +#if defined(RCC_CFGR3_USART2SW) +#define LL_RCC_USART2_CLKSOURCE_PCLK1 (uint32_t)((RCC_POSITION_USART2SW << 24) | RCC_CFGR3_USART2SW_PCLK) /*!< PCLK1 clock used as USART2 clock source */ +#define LL_RCC_USART2_CLKSOURCE_SYSCLK (uint32_t)((RCC_POSITION_USART2SW << 24) | RCC_CFGR3_USART2SW_SYSCLK) /*!< System clock selected as USART2 clock source */ +#define LL_RCC_USART2_CLKSOURCE_LSE (uint32_t)((RCC_POSITION_USART2SW << 24) | RCC_CFGR3_USART2SW_LSE) /*!< LSE oscillator clock used as USART2 clock source */ +#define LL_RCC_USART2_CLKSOURCE_HSI (uint32_t)((RCC_POSITION_USART2SW << 24) | RCC_CFGR3_USART2SW_HSI) /*!< HSI oscillator clock used as USART2 clock source */ +#endif /* RCC_CFGR3_USART2SW */ +#if defined(RCC_CFGR3_USART3SW) +#define LL_RCC_USART3_CLKSOURCE_PCLK1 (uint32_t)((RCC_POSITION_USART3SW << 24) | RCC_CFGR3_USART3SW_PCLK) /*!< PCLK1 clock used as USART3 clock source */ +#define LL_RCC_USART3_CLKSOURCE_SYSCLK (uint32_t)((RCC_POSITION_USART3SW << 24) | RCC_CFGR3_USART3SW_SYSCLK) /*!< System clock selected as USART3 clock source */ +#define LL_RCC_USART3_CLKSOURCE_LSE (uint32_t)((RCC_POSITION_USART3SW << 24) | RCC_CFGR3_USART3SW_LSE) /*!< LSE oscillator clock used as USART3 clock source */ +#define LL_RCC_USART3_CLKSOURCE_HSI (uint32_t)((RCC_POSITION_USART3SW << 24) | RCC_CFGR3_USART3SW_HSI) /*!< HSI oscillator clock used as USART3 clock source */ +#endif /* RCC_CFGR3_USART3SW */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_I2C1_CLKSOURCE Peripheral I2C clock source selection + * @{ + */ +#define LL_RCC_I2C1_CLKSOURCE_HSI RCC_CFGR3_I2C1SW_HSI /*!< HSI oscillator clock used as I2C1 clock source */ +#define LL_RCC_I2C1_CLKSOURCE_SYSCLK RCC_CFGR3_I2C1SW_SYSCLK /*!< System clock selected as I2C1 clock source */ +/** + * @} + */ + +#if defined(CEC) +/** @defgroup RCC_LL_EC_CEC_CLKSOURCE Peripheral CEC clock source selection + * @{ + */ +#define LL_RCC_CEC_CLKSOURCE_HSI_DIV244 RCC_CFGR3_CECSW_HSI_DIV244 /*!< HSI clock divided by 244 selected as HDMI CEC entry clock source */ +#define LL_RCC_CEC_CLKSOURCE_LSE RCC_CFGR3_CECSW_LSE /*!< LSE clock selected as HDMI CEC entry clock source */ +/** + * @} + */ + +#endif /* CEC */ + +#if defined(USB) +/** @defgroup RCC_LL_EC_USB_CLKSOURCE Peripheral USB clock source selection + * @{ + */ +#if defined(RCC_CFGR3_USBSW_HSI48) +#define LL_RCC_USB_CLKSOURCE_HSI48 RCC_CFGR3_USBSW_HSI48 /*!< HSI48 oscillator clock used as USB clock source */ +#else +#define LL_RCC_USB_CLKSOURCE_NONE ((uint32_t)0x00000000) /*!< USB Clock disabled */ +#endif /*RCC_CFGR3_USBSW_HSI48*/ +#define LL_RCC_USB_CLKSOURCE_PLL RCC_CFGR3_USBSW_PLLCLK /*!< PLL selected as USB clock source */ +/** + * @} + */ + +#endif /* USB */ + +/** @defgroup RCC_LL_EC_USART1 Peripheral USART get clock source + * @{ + */ +#define LL_RCC_USART1_CLKSOURCE RCC_POSITION_USART1SW /*!< USART1 Clock source selection */ +#if defined(RCC_CFGR3_USART2SW) +#define LL_RCC_USART2_CLKSOURCE RCC_POSITION_USART2SW /*!< USART2 Clock source selection */ +#endif /* RCC_CFGR3_USART2SW */ +#if defined(RCC_CFGR3_USART3SW) +#define LL_RCC_USART3_CLKSOURCE RCC_POSITION_USART3SW /*!< USART3 Clock source selection */ +#endif /* RCC_CFGR3_USART3SW */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_I2C1 Peripheral I2C get clock source + * @{ + */ +#define LL_RCC_I2C1_CLKSOURCE RCC_CFGR3_I2C1SW /*!< I2C1 Clock source selection */ +/** + * @} + */ + +#if defined(CEC) +/** @defgroup RCC_LL_EC_CEC Peripheral CEC get clock source + * @{ + */ +#define LL_RCC_CEC_CLKSOURCE RCC_CFGR3_CECSW /*!< CEC Clock source selection */ +/** + * @} + */ +#endif /* CEC */ + +#if defined(USB) +/** @defgroup RCC_LL_EC_USB Peripheral USB get clock source + * @{ + */ +#define LL_RCC_USB_CLKSOURCE RCC_CFGR3_USBSW /*!< USB Clock source selection */ +/** + * @} + */ +#endif /* USB */ + +/** @defgroup RCC_LL_EC_RTC_CLKSOURCE RTC clock source selection + * @{ + */ +#define LL_RCC_RTC_CLKSOURCE_NONE 0x00000000U /*!< No clock used as RTC clock */ +#define LL_RCC_RTC_CLKSOURCE_LSE RCC_BDCR_RTCSEL_0 /*!< LSE oscillator clock used as RTC clock */ +#define LL_RCC_RTC_CLKSOURCE_LSI RCC_BDCR_RTCSEL_1 /*!< LSI oscillator clock used as RTC clock */ +#define LL_RCC_RTC_CLKSOURCE_HSE_DIV32 RCC_BDCR_RTCSEL /*!< HSE oscillator clock divided by 32 used as RTC clock */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_PLL_MUL PLL Multiplicator factor + * @{ + */ +#define LL_RCC_PLL_MUL_2 RCC_CFGR_PLLMUL2 /*!< PLL input clock*2 */ +#define LL_RCC_PLL_MUL_3 RCC_CFGR_PLLMUL3 /*!< PLL input clock*3 */ +#define LL_RCC_PLL_MUL_4 RCC_CFGR_PLLMUL4 /*!< PLL input clock*4 */ +#define LL_RCC_PLL_MUL_5 RCC_CFGR_PLLMUL5 /*!< PLL input clock*5 */ +#define LL_RCC_PLL_MUL_6 RCC_CFGR_PLLMUL6 /*!< PLL input clock*6 */ +#define LL_RCC_PLL_MUL_7 RCC_CFGR_PLLMUL7 /*!< PLL input clock*7 */ +#define LL_RCC_PLL_MUL_8 RCC_CFGR_PLLMUL8 /*!< PLL input clock*8 */ +#define LL_RCC_PLL_MUL_9 RCC_CFGR_PLLMUL9 /*!< PLL input clock*9 */ +#define LL_RCC_PLL_MUL_10 RCC_CFGR_PLLMUL10 /*!< PLL input clock*10 */ +#define LL_RCC_PLL_MUL_11 RCC_CFGR_PLLMUL11 /*!< PLL input clock*11 */ +#define LL_RCC_PLL_MUL_12 RCC_CFGR_PLLMUL12 /*!< PLL input clock*12 */ +#define LL_RCC_PLL_MUL_13 RCC_CFGR_PLLMUL13 /*!< PLL input clock*13 */ +#define LL_RCC_PLL_MUL_14 RCC_CFGR_PLLMUL14 /*!< PLL input clock*14 */ +#define LL_RCC_PLL_MUL_15 RCC_CFGR_PLLMUL15 /*!< PLL input clock*15 */ +#define LL_RCC_PLL_MUL_16 RCC_CFGR_PLLMUL16 /*!< PLL input clock*16 */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_PLLSOURCE PLL SOURCE + * @{ + */ +#define LL_RCC_PLLSOURCE_HSE RCC_CFGR_PLLSRC_HSE_PREDIV /*!< HSE/PREDIV clock selected as PLL entry clock source */ +#if defined(RCC_PLLSRC_PREDIV1_SUPPORT) +#define LL_RCC_PLLSOURCE_HSI RCC_CFGR_PLLSRC_HSI_PREDIV /*!< HSI/PREDIV clock selected as PLL entry clock source */ +#if defined(RCC_CFGR_SW_HSI48) +#define LL_RCC_PLLSOURCE_HSI48 RCC_CFGR_PLLSRC_HSI48_PREDIV /*!< HSI48/PREDIV clock selected as PLL entry clock source */ +#endif /* RCC_CFGR_SW_HSI48 */ +#else +#define LL_RCC_PLLSOURCE_HSI_DIV_2 RCC_CFGR_PLLSRC_HSI_DIV2 /*!< HSI clock divided by 2 selected as PLL entry clock source */ +#define LL_RCC_PLLSOURCE_HSE_DIV_1 (RCC_CFGR_PLLSRC_HSE_PREDIV | RCC_CFGR2_PREDIV_DIV1) /*!< HSE clock selected as PLL entry clock source */ +#define LL_RCC_PLLSOURCE_HSE_DIV_2 (RCC_CFGR_PLLSRC_HSE_PREDIV | RCC_CFGR2_PREDIV_DIV2) /*!< HSE/2 clock selected as PLL entry clock source */ +#define LL_RCC_PLLSOURCE_HSE_DIV_3 (RCC_CFGR_PLLSRC_HSE_PREDIV | RCC_CFGR2_PREDIV_DIV3) /*!< HSE/3 clock selected as PLL entry clock source */ +#define LL_RCC_PLLSOURCE_HSE_DIV_4 (RCC_CFGR_PLLSRC_HSE_PREDIV | RCC_CFGR2_PREDIV_DIV4) /*!< HSE/4 clock selected as PLL entry clock source */ +#define LL_RCC_PLLSOURCE_HSE_DIV_5 (RCC_CFGR_PLLSRC_HSE_PREDIV | RCC_CFGR2_PREDIV_DIV5) /*!< HSE/5 clock selected as PLL entry clock source */ +#define LL_RCC_PLLSOURCE_HSE_DIV_6 (RCC_CFGR_PLLSRC_HSE_PREDIV | RCC_CFGR2_PREDIV_DIV6) /*!< HSE/6 clock selected as PLL entry clock source */ +#define LL_RCC_PLLSOURCE_HSE_DIV_7 (RCC_CFGR_PLLSRC_HSE_PREDIV | RCC_CFGR2_PREDIV_DIV7) /*!< HSE/7 clock selected as PLL entry clock source */ +#define LL_RCC_PLLSOURCE_HSE_DIV_8 (RCC_CFGR_PLLSRC_HSE_PREDIV | RCC_CFGR2_PREDIV_DIV8) /*!< HSE/8 clock selected as PLL entry clock source */ +#define LL_RCC_PLLSOURCE_HSE_DIV_9 (RCC_CFGR_PLLSRC_HSE_PREDIV | RCC_CFGR2_PREDIV_DIV9) /*!< HSE/9 clock selected as PLL entry clock source */ +#define LL_RCC_PLLSOURCE_HSE_DIV_10 (RCC_CFGR_PLLSRC_HSE_PREDIV | RCC_CFGR2_PREDIV_DIV10) /*!< HSE/10 clock selected as PLL entry clock source */ +#define LL_RCC_PLLSOURCE_HSE_DIV_11 (RCC_CFGR_PLLSRC_HSE_PREDIV | RCC_CFGR2_PREDIV_DIV11) /*!< HSE/11 clock selected as PLL entry clock source */ +#define LL_RCC_PLLSOURCE_HSE_DIV_12 (RCC_CFGR_PLLSRC_HSE_PREDIV | RCC_CFGR2_PREDIV_DIV12) /*!< HSE/12 clock selected as PLL entry clock source */ +#define LL_RCC_PLLSOURCE_HSE_DIV_13 (RCC_CFGR_PLLSRC_HSE_PREDIV | RCC_CFGR2_PREDIV_DIV13) /*!< HSE/13 clock selected as PLL entry clock source */ +#define LL_RCC_PLLSOURCE_HSE_DIV_14 (RCC_CFGR_PLLSRC_HSE_PREDIV | RCC_CFGR2_PREDIV_DIV14) /*!< HSE/14 clock selected as PLL entry clock source */ +#define LL_RCC_PLLSOURCE_HSE_DIV_15 (RCC_CFGR_PLLSRC_HSE_PREDIV | RCC_CFGR2_PREDIV_DIV15) /*!< HSE/15 clock selected as PLL entry clock source */ +#define LL_RCC_PLLSOURCE_HSE_DIV_16 (RCC_CFGR_PLLSRC_HSE_PREDIV | RCC_CFGR2_PREDIV_DIV16) /*!< HSE/16 clock selected as PLL entry clock source */ +#endif /* RCC_PLLSRC_PREDIV1_SUPPORT */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_PREDIV_DIV PREDIV Division factor + * @{ + */ +#define LL_RCC_PREDIV_DIV_1 RCC_CFGR2_PREDIV_DIV1 /*!< PREDIV input clock not divided */ +#define LL_RCC_PREDIV_DIV_2 RCC_CFGR2_PREDIV_DIV2 /*!< PREDIV input clock divided by 2 */ +#define LL_RCC_PREDIV_DIV_3 RCC_CFGR2_PREDIV_DIV3 /*!< PREDIV input clock divided by 3 */ +#define LL_RCC_PREDIV_DIV_4 RCC_CFGR2_PREDIV_DIV4 /*!< PREDIV input clock divided by 4 */ +#define LL_RCC_PREDIV_DIV_5 RCC_CFGR2_PREDIV_DIV5 /*!< PREDIV input clock divided by 5 */ +#define LL_RCC_PREDIV_DIV_6 RCC_CFGR2_PREDIV_DIV6 /*!< PREDIV input clock divided by 6 */ +#define LL_RCC_PREDIV_DIV_7 RCC_CFGR2_PREDIV_DIV7 /*!< PREDIV input clock divided by 7 */ +#define LL_RCC_PREDIV_DIV_8 RCC_CFGR2_PREDIV_DIV8 /*!< PREDIV input clock divided by 8 */ +#define LL_RCC_PREDIV_DIV_9 RCC_CFGR2_PREDIV_DIV9 /*!< PREDIV input clock divided by 9 */ +#define LL_RCC_PREDIV_DIV_10 RCC_CFGR2_PREDIV_DIV10 /*!< PREDIV input clock divided by 10 */ +#define LL_RCC_PREDIV_DIV_11 RCC_CFGR2_PREDIV_DIV11 /*!< PREDIV input clock divided by 11 */ +#define LL_RCC_PREDIV_DIV_12 RCC_CFGR2_PREDIV_DIV12 /*!< PREDIV input clock divided by 12 */ +#define LL_RCC_PREDIV_DIV_13 RCC_CFGR2_PREDIV_DIV13 /*!< PREDIV input clock divided by 13 */ +#define LL_RCC_PREDIV_DIV_14 RCC_CFGR2_PREDIV_DIV14 /*!< PREDIV input clock divided by 14 */ +#define LL_RCC_PREDIV_DIV_15 RCC_CFGR2_PREDIV_DIV15 /*!< PREDIV input clock divided by 15 */ +#define LL_RCC_PREDIV_DIV_16 RCC_CFGR2_PREDIV_DIV16 /*!< PREDIV input clock divided by 16 */ +/** + * @} + */ + +/** + * @} + */ + +/* Exported macro ------------------------------------------------------------*/ +/** @defgroup RCC_LL_Exported_Macros RCC Exported Macros + * @{ + */ + +/** @defgroup RCC_LL_EM_WRITE_READ Common Write and read registers Macros + * @{ + */ + +/** + * @brief Write a value in RCC register + * @param __REG__ Register to be written + * @param __VALUE__ Value to be written in the register + * @retval None + */ +#define LL_RCC_WriteReg(__REG__, __VALUE__) WRITE_REG(RCC->__REG__, (__VALUE__)) + +/** + * @brief Read a value in RCC register + * @param __REG__ Register to be read + * @retval Register value + */ +#define LL_RCC_ReadReg(__REG__) READ_REG(RCC->__REG__) +/** + * @} + */ + +/** @defgroup RCC_LL_EM_CALC_FREQ Calculate frequencies + * @{ + */ + +#if defined(RCC_PLLSRC_PREDIV1_SUPPORT) +/** + * @brief Helper macro to calculate the PLLCLK frequency + * @note ex: @ref __LL_RCC_CALC_PLLCLK_FREQ (HSE_VALUE, @ref LL_RCC_PLL_GetMultiplicator() + * , @ref LL_RCC_PLL_GetPrediv()); + * @param __INPUTFREQ__ PLL Input frequency (based on HSE/HSI/HSI48) + * @param __PLLMUL__ This parameter can be one of the following values: + * @arg @ref LL_RCC_PLL_MUL_2 + * @arg @ref LL_RCC_PLL_MUL_3 + * @arg @ref LL_RCC_PLL_MUL_4 + * @arg @ref LL_RCC_PLL_MUL_5 + * @arg @ref LL_RCC_PLL_MUL_6 + * @arg @ref LL_RCC_PLL_MUL_7 + * @arg @ref LL_RCC_PLL_MUL_8 + * @arg @ref LL_RCC_PLL_MUL_9 + * @arg @ref LL_RCC_PLL_MUL_10 + * @arg @ref LL_RCC_PLL_MUL_11 + * @arg @ref LL_RCC_PLL_MUL_12 + * @arg @ref LL_RCC_PLL_MUL_13 + * @arg @ref LL_RCC_PLL_MUL_14 + * @arg @ref LL_RCC_PLL_MUL_15 + * @arg @ref LL_RCC_PLL_MUL_16 + * @param __PLLPREDIV__ This parameter can be one of the following values: + * @arg @ref LL_RCC_PREDIV_DIV_1 + * @arg @ref LL_RCC_PREDIV_DIV_2 + * @arg @ref LL_RCC_PREDIV_DIV_3 + * @arg @ref LL_RCC_PREDIV_DIV_4 + * @arg @ref LL_RCC_PREDIV_DIV_5 + * @arg @ref LL_RCC_PREDIV_DIV_6 + * @arg @ref LL_RCC_PREDIV_DIV_7 + * @arg @ref LL_RCC_PREDIV_DIV_8 + * @arg @ref LL_RCC_PREDIV_DIV_9 + * @arg @ref LL_RCC_PREDIV_DIV_10 + * @arg @ref LL_RCC_PREDIV_DIV_11 + * @arg @ref LL_RCC_PREDIV_DIV_12 + * @arg @ref LL_RCC_PREDIV_DIV_13 + * @arg @ref LL_RCC_PREDIV_DIV_14 + * @arg @ref LL_RCC_PREDIV_DIV_15 + * @arg @ref LL_RCC_PREDIV_DIV_16 + * @retval PLL clock frequency (in Hz) + */ +#define __LL_RCC_CALC_PLLCLK_FREQ(__INPUTFREQ__, __PLLMUL__, __PLLPREDIV__) \ + (((__INPUTFREQ__) / ((((__PLLPREDIV__) & RCC_CFGR2_PREDIV) + 1U))) * ((((__PLLMUL__) & RCC_CFGR_PLLMUL) >> RCC_POSITION_PLLMUL) + 2U)) + +#else +/** + * @brief Helper macro to calculate the PLLCLK frequency + * @note ex: @ref __LL_RCC_CALC_PLLCLK_FREQ (HSE_VALUE / (@ref LL_RCC_PLL_GetPrediv () + 1), @ref LL_RCC_PLL_GetMultiplicator()); + * @param __INPUTFREQ__ PLL Input frequency (based on HSE div Prediv / HSI div 2) + * @param __PLLMUL__ This parameter can be one of the following values: + * @arg @ref LL_RCC_PLL_MUL_2 + * @arg @ref LL_RCC_PLL_MUL_3 + * @arg @ref LL_RCC_PLL_MUL_4 + * @arg @ref LL_RCC_PLL_MUL_5 + * @arg @ref LL_RCC_PLL_MUL_6 + * @arg @ref LL_RCC_PLL_MUL_7 + * @arg @ref LL_RCC_PLL_MUL_8 + * @arg @ref LL_RCC_PLL_MUL_9 + * @arg @ref LL_RCC_PLL_MUL_10 + * @arg @ref LL_RCC_PLL_MUL_11 + * @arg @ref LL_RCC_PLL_MUL_12 + * @arg @ref LL_RCC_PLL_MUL_13 + * @arg @ref LL_RCC_PLL_MUL_14 + * @arg @ref LL_RCC_PLL_MUL_15 + * @arg @ref LL_RCC_PLL_MUL_16 + * @retval PLL clock frequency (in Hz) + */ +#define __LL_RCC_CALC_PLLCLK_FREQ(__INPUTFREQ__, __PLLMUL__) \ + ((__INPUTFREQ__) * ((((__PLLMUL__) & RCC_CFGR_PLLMUL) >> RCC_POSITION_PLLMUL) + 2U)) +#endif /* RCC_PLLSRC_PREDIV1_SUPPORT */ +/** + * @brief Helper macro to calculate the HCLK frequency + * @note: __AHBPRESCALER__ be retrieved by @ref LL_RCC_GetAHBPrescaler + * ex: __LL_RCC_CALC_HCLK_FREQ(LL_RCC_GetAHBPrescaler()) + * @param __SYSCLKFREQ__ SYSCLK frequency (based on HSE/HSI/PLLCLK) + * @param __AHBPRESCALER__ This parameter can be one of the following values: + * @arg @ref LL_RCC_SYSCLK_DIV_1 + * @arg @ref LL_RCC_SYSCLK_DIV_2 + * @arg @ref LL_RCC_SYSCLK_DIV_4 + * @arg @ref LL_RCC_SYSCLK_DIV_8 + * @arg @ref LL_RCC_SYSCLK_DIV_16 + * @arg @ref LL_RCC_SYSCLK_DIV_64 + * @arg @ref LL_RCC_SYSCLK_DIV_128 + * @arg @ref LL_RCC_SYSCLK_DIV_256 + * @arg @ref LL_RCC_SYSCLK_DIV_512 + * @retval HCLK clock frequency (in Hz) + */ +#define __LL_RCC_CALC_HCLK_FREQ(__SYSCLKFREQ__, __AHBPRESCALER__) ((__SYSCLKFREQ__) >> AHBPrescTable[((__AHBPRESCALER__) & RCC_CFGR_HPRE) >> RCC_CFGR_HPRE_Pos]) + +/** + * @brief Helper macro to calculate the PCLK1 frequency (ABP1) + * @note: __APB1PRESCALER__ be retrieved by @ref LL_RCC_GetAPB1Prescaler + * ex: __LL_RCC_CALC_PCLK1_FREQ(LL_RCC_GetAPB1Prescaler()) + * @param __HCLKFREQ__ HCLK frequency + * @param __APB1PRESCALER__ This parameter can be one of the following values: + * @arg @ref LL_RCC_APB1_DIV_1 + * @arg @ref LL_RCC_APB1_DIV_2 + * @arg @ref LL_RCC_APB1_DIV_4 + * @arg @ref LL_RCC_APB1_DIV_8 + * @arg @ref LL_RCC_APB1_DIV_16 + * @retval PCLK1 clock frequency (in Hz) + */ +#define __LL_RCC_CALC_PCLK1_FREQ(__HCLKFREQ__, __APB1PRESCALER__) ((__HCLKFREQ__) >> APBPrescTable[(__APB1PRESCALER__) >> RCC_CFGR_PPRE_Pos]) + +/** + * @} + */ + +/** + * @} + */ + +/* Exported functions --------------------------------------------------------*/ +/** @defgroup RCC_LL_Exported_Functions RCC Exported Functions + * @{ + */ + +/** @defgroup RCC_LL_EF_HSE HSE + * @{ + */ + +/** + * @brief Enable the Clock Security System. + * @rmtoll CR CSSON LL_RCC_HSE_EnableCSS + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSE_EnableCSS(void) +{ + SET_BIT(RCC->CR, RCC_CR_CSSON); +} + +/** + * @brief Disable the Clock Security System. + * @note Cannot be disabled in HSE is ready (only by hardware) + * @rmtoll CR CSSON LL_RCC_HSE_DisableCSS + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSE_DisableCSS(void) +{ + CLEAR_BIT(RCC->CR, RCC_CR_CSSON); +} + +/** + * @brief Enable HSE external oscillator (HSE Bypass) + * @rmtoll CR HSEBYP LL_RCC_HSE_EnableBypass + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSE_EnableBypass(void) +{ + SET_BIT(RCC->CR, RCC_CR_HSEBYP); +} + +/** + * @brief Disable HSE external oscillator (HSE Bypass) + * @rmtoll CR HSEBYP LL_RCC_HSE_DisableBypass + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSE_DisableBypass(void) +{ + CLEAR_BIT(RCC->CR, RCC_CR_HSEBYP); +} + +/** + * @brief Enable HSE crystal oscillator (HSE ON) + * @rmtoll CR HSEON LL_RCC_HSE_Enable + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSE_Enable(void) +{ + SET_BIT(RCC->CR, RCC_CR_HSEON); +} + +/** + * @brief Disable HSE crystal oscillator (HSE ON) + * @rmtoll CR HSEON LL_RCC_HSE_Disable + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSE_Disable(void) +{ + CLEAR_BIT(RCC->CR, RCC_CR_HSEON); +} + +/** + * @brief Check if HSE oscillator Ready + * @rmtoll CR HSERDY LL_RCC_HSE_IsReady + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_HSE_IsReady(void) +{ + return (READ_BIT(RCC->CR, RCC_CR_HSERDY) == (RCC_CR_HSERDY)); +} + +/** + * @} + */ + +/** @defgroup RCC_LL_EF_HSI HSI + * @{ + */ + +/** + * @brief Enable HSI oscillator + * @rmtoll CR HSION LL_RCC_HSI_Enable + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSI_Enable(void) +{ + SET_BIT(RCC->CR, RCC_CR_HSION); +} + +/** + * @brief Disable HSI oscillator + * @rmtoll CR HSION LL_RCC_HSI_Disable + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSI_Disable(void) +{ + CLEAR_BIT(RCC->CR, RCC_CR_HSION); +} + +/** + * @brief Check if HSI clock is ready + * @rmtoll CR HSIRDY LL_RCC_HSI_IsReady + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_HSI_IsReady(void) +{ + return (READ_BIT(RCC->CR, RCC_CR_HSIRDY) == (RCC_CR_HSIRDY)); +} + +/** + * @brief Get HSI Calibration value + * @note When HSITRIM is written, HSICAL is updated with the sum of + * HSITRIM and the factory trim value + * @rmtoll CR HSICAL LL_RCC_HSI_GetCalibration + * @retval Between Min_Data = 0x00 and Max_Data = 0xFF + */ +__STATIC_INLINE uint32_t LL_RCC_HSI_GetCalibration(void) +{ + return (uint32_t)(READ_BIT(RCC->CR, RCC_CR_HSICAL) >> RCC_CR_HSICAL_Pos); +} + +/** + * @brief Set HSI Calibration trimming + * @note user-programmable trimming value that is added to the HSICAL + * @note Default value is 16, which, when added to the HSICAL value, + * should trim the HSI to 16 MHz +/- 1 % + * @rmtoll CR HSITRIM LL_RCC_HSI_SetCalibTrimming + * @param Value between Min_Data = 0x00 and Max_Data = 0x1F + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSI_SetCalibTrimming(uint32_t Value) +{ + MODIFY_REG(RCC->CR, RCC_CR_HSITRIM, Value << RCC_CR_HSITRIM_Pos); +} + +/** + * @brief Get HSI Calibration trimming + * @rmtoll CR HSITRIM LL_RCC_HSI_GetCalibTrimming + * @retval Between Min_Data = 0x00 and Max_Data = 0x1F + */ +__STATIC_INLINE uint32_t LL_RCC_HSI_GetCalibTrimming(void) +{ + return (uint32_t)(READ_BIT(RCC->CR, RCC_CR_HSITRIM) >> RCC_CR_HSITRIM_Pos); +} + +/** + * @} + */ + +#if defined(RCC_HSI48_SUPPORT) +/** @defgroup RCC_LL_EF_HSI48 HSI48 + * @{ + */ + +/** + * @brief Enable HSI48 + * @rmtoll CR2 HSI48ON LL_RCC_HSI48_Enable + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSI48_Enable(void) +{ + SET_BIT(RCC->CR2, RCC_CR2_HSI48ON); +} + +/** + * @brief Disable HSI48 + * @rmtoll CR2 HSI48ON LL_RCC_HSI48_Disable + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSI48_Disable(void) +{ + CLEAR_BIT(RCC->CR2, RCC_CR2_HSI48ON); +} + +/** + * @brief Check if HSI48 oscillator Ready + * @rmtoll CR2 HSI48RDY LL_RCC_HSI48_IsReady + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_HSI48_IsReady(void) +{ + return (READ_BIT(RCC->CR2, RCC_CR2_HSI48RDY) == (RCC_CR2_HSI48RDY)); +} + +/** + * @brief Get HSI48 Calibration value + * @rmtoll CR2 HSI48CAL LL_RCC_HSI48_GetCalibration + * @retval Between Min_Data = 0x00 and Max_Data = 0xFF + */ +__STATIC_INLINE uint32_t LL_RCC_HSI48_GetCalibration(void) +{ + return (uint32_t)(READ_BIT(RCC->CR2, RCC_CR2_HSI48CAL) >> RCC_POSITION_HSI48CAL); +} + +/** + * @} + */ + +#endif /* RCC_HSI48_SUPPORT */ + +/** @defgroup RCC_LL_EF_HSI14 HSI14 + * @{ + */ + +/** + * @brief Enable HSI14 + * @rmtoll CR2 HSI14ON LL_RCC_HSI14_Enable + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSI14_Enable(void) +{ + SET_BIT(RCC->CR2, RCC_CR2_HSI14ON); +} + +/** + * @brief Disable HSI14 + * @rmtoll CR2 HSI14ON LL_RCC_HSI14_Disable + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSI14_Disable(void) +{ + CLEAR_BIT(RCC->CR2, RCC_CR2_HSI14ON); +} + +/** + * @brief Check if HSI14 oscillator Ready + * @rmtoll CR2 HSI14RDY LL_RCC_HSI14_IsReady + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_HSI14_IsReady(void) +{ + return (READ_BIT(RCC->CR2, RCC_CR2_HSI14RDY) == (RCC_CR2_HSI14RDY)); +} + +/** + * @brief ADC interface can turn on the HSI14 oscillator + * @rmtoll CR2 HSI14DIS LL_RCC_HSI14_EnableADCControl + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSI14_EnableADCControl(void) +{ + CLEAR_BIT(RCC->CR2, RCC_CR2_HSI14DIS); +} + +/** + * @brief ADC interface can not turn on the HSI14 oscillator + * @rmtoll CR2 HSI14DIS LL_RCC_HSI14_DisableADCControl + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSI14_DisableADCControl(void) +{ + SET_BIT(RCC->CR2, RCC_CR2_HSI14DIS); +} + +/** + * @brief Set HSI14 Calibration trimming + * @note user-programmable trimming value that is added to the HSI14CAL + * @note Default value is 16, which, when added to the HSI14CAL value, + * should trim the HSI14 to 14 MHz +/- 1 % + * @rmtoll CR2 HSI14TRIM LL_RCC_HSI14_SetCalibTrimming + * @param Value between Min_Data = 0x00 and Max_Data = 0xFF + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSI14_SetCalibTrimming(uint32_t Value) +{ + MODIFY_REG(RCC->CR2, RCC_CR2_HSI14TRIM, Value << RCC_POSITION_HSI14TRIM); +} + +/** + * @brief Get HSI14 Calibration value + * @note When HSI14TRIM is written, HSI14CAL is updated with the sum of + * HSI14TRIM and the factory trim value + * @rmtoll CR2 HSI14TRIM LL_RCC_HSI14_GetCalibTrimming + * @retval Between Min_Data = 0x00 and Max_Data = 0x1F + */ +__STATIC_INLINE uint32_t LL_RCC_HSI14_GetCalibTrimming(void) +{ + return (uint32_t)(READ_BIT(RCC->CR2, RCC_CR2_HSI14TRIM) >> RCC_POSITION_HSI14TRIM); +} + +/** + * @brief Get HSI14 Calibration trimming + * @rmtoll CR2 HSI14CAL LL_RCC_HSI14_GetCalibration + * @retval Between Min_Data = 0x00 and Max_Data = 0x1F + */ +__STATIC_INLINE uint32_t LL_RCC_HSI14_GetCalibration(void) +{ + return (uint32_t)(READ_BIT(RCC->CR2, RCC_CR2_HSI14CAL) >> RCC_POSITION_HSI14CAL); +} + +/** + * @} + */ + +/** @defgroup RCC_LL_EF_LSE LSE + * @{ + */ + +/** + * @brief Enable Low Speed External (LSE) crystal. + * @rmtoll BDCR LSEON LL_RCC_LSE_Enable + * @retval None + */ +__STATIC_INLINE void LL_RCC_LSE_Enable(void) +{ + SET_BIT(RCC->BDCR, RCC_BDCR_LSEON); +} + +/** + * @brief Disable Low Speed External (LSE) crystal. + * @rmtoll BDCR LSEON LL_RCC_LSE_Disable + * @retval None + */ +__STATIC_INLINE void LL_RCC_LSE_Disable(void) +{ + CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSEON); +} + +/** + * @brief Enable external clock source (LSE bypass). + * @rmtoll BDCR LSEBYP LL_RCC_LSE_EnableBypass + * @retval None + */ +__STATIC_INLINE void LL_RCC_LSE_EnableBypass(void) +{ + SET_BIT(RCC->BDCR, RCC_BDCR_LSEBYP); +} + +/** + * @brief Disable external clock source (LSE bypass). + * @rmtoll BDCR LSEBYP LL_RCC_LSE_DisableBypass + * @retval None + */ +__STATIC_INLINE void LL_RCC_LSE_DisableBypass(void) +{ + CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSEBYP); +} + +/** + * @brief Set LSE oscillator drive capability + * @note The oscillator is in Xtal mode when it is not in bypass mode. + * @rmtoll BDCR LSEDRV LL_RCC_LSE_SetDriveCapability + * @param LSEDrive This parameter can be one of the following values: + * @arg @ref LL_RCC_LSEDRIVE_LOW + * @arg @ref LL_RCC_LSEDRIVE_MEDIUMLOW + * @arg @ref LL_RCC_LSEDRIVE_MEDIUMHIGH + * @arg @ref LL_RCC_LSEDRIVE_HIGH + * @retval None + */ +__STATIC_INLINE void LL_RCC_LSE_SetDriveCapability(uint32_t LSEDrive) +{ + MODIFY_REG(RCC->BDCR, RCC_BDCR_LSEDRV, LSEDrive); +} + +/** + * @brief Get LSE oscillator drive capability + * @rmtoll BDCR LSEDRV LL_RCC_LSE_GetDriveCapability + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_LSEDRIVE_LOW + * @arg @ref LL_RCC_LSEDRIVE_MEDIUMLOW + * @arg @ref LL_RCC_LSEDRIVE_MEDIUMHIGH + * @arg @ref LL_RCC_LSEDRIVE_HIGH + */ +__STATIC_INLINE uint32_t LL_RCC_LSE_GetDriveCapability(void) +{ + return (uint32_t)(READ_BIT(RCC->BDCR, RCC_BDCR_LSEDRV)); +} + +/** + * @brief Check if LSE oscillator Ready + * @rmtoll BDCR LSERDY LL_RCC_LSE_IsReady + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_LSE_IsReady(void) +{ + return (READ_BIT(RCC->BDCR, RCC_BDCR_LSERDY) == (RCC_BDCR_LSERDY)); +} + +/** + * @} + */ + +/** @defgroup RCC_LL_EF_LSI LSI + * @{ + */ + +/** + * @brief Enable LSI Oscillator + * @rmtoll CSR LSION LL_RCC_LSI_Enable + * @retval None + */ +__STATIC_INLINE void LL_RCC_LSI_Enable(void) +{ + SET_BIT(RCC->CSR, RCC_CSR_LSION); +} + +/** + * @brief Disable LSI Oscillator + * @rmtoll CSR LSION LL_RCC_LSI_Disable + * @retval None + */ +__STATIC_INLINE void LL_RCC_LSI_Disable(void) +{ + CLEAR_BIT(RCC->CSR, RCC_CSR_LSION); +} + +/** + * @brief Check if LSI is Ready + * @rmtoll CSR LSIRDY LL_RCC_LSI_IsReady + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_LSI_IsReady(void) +{ + return (READ_BIT(RCC->CSR, RCC_CSR_LSIRDY) == (RCC_CSR_LSIRDY)); +} + +/** + * @} + */ + +/** @defgroup RCC_LL_EF_System System + * @{ + */ + +/** + * @brief Configure the system clock source + * @rmtoll CFGR SW LL_RCC_SetSysClkSource + * @param Source This parameter can be one of the following values: + * @arg @ref LL_RCC_SYS_CLKSOURCE_HSI + * @arg @ref LL_RCC_SYS_CLKSOURCE_HSE + * @arg @ref LL_RCC_SYS_CLKSOURCE_PLL + * @arg @ref LL_RCC_SYS_CLKSOURCE_HSI48 (*) + * + * (*) value not defined in all devices + * @retval None + */ +__STATIC_INLINE void LL_RCC_SetSysClkSource(uint32_t Source) +{ + MODIFY_REG(RCC->CFGR, RCC_CFGR_SW, Source); +} + +/** + * @brief Get the system clock source + * @rmtoll CFGR SWS LL_RCC_GetSysClkSource + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_SYS_CLKSOURCE_STATUS_HSI + * @arg @ref LL_RCC_SYS_CLKSOURCE_STATUS_HSE + * @arg @ref LL_RCC_SYS_CLKSOURCE_STATUS_PLL + * @arg @ref LL_RCC_SYS_CLKSOURCE_STATUS_HSI48 (*) + * + * (*) value not defined in all devices + */ +__STATIC_INLINE uint32_t LL_RCC_GetSysClkSource(void) +{ + return (uint32_t)(READ_BIT(RCC->CFGR, RCC_CFGR_SWS)); +} + +/** + * @brief Set AHB prescaler + * @rmtoll CFGR HPRE LL_RCC_SetAHBPrescaler + * @param Prescaler This parameter can be one of the following values: + * @arg @ref LL_RCC_SYSCLK_DIV_1 + * @arg @ref LL_RCC_SYSCLK_DIV_2 + * @arg @ref LL_RCC_SYSCLK_DIV_4 + * @arg @ref LL_RCC_SYSCLK_DIV_8 + * @arg @ref LL_RCC_SYSCLK_DIV_16 + * @arg @ref LL_RCC_SYSCLK_DIV_64 + * @arg @ref LL_RCC_SYSCLK_DIV_128 + * @arg @ref LL_RCC_SYSCLK_DIV_256 + * @arg @ref LL_RCC_SYSCLK_DIV_512 + * @retval None + */ +__STATIC_INLINE void LL_RCC_SetAHBPrescaler(uint32_t Prescaler) +{ + MODIFY_REG(RCC->CFGR, RCC_CFGR_HPRE, Prescaler); +} + +/** + * @brief Set APB1 prescaler + * @rmtoll CFGR PPRE LL_RCC_SetAPB1Prescaler + * @param Prescaler This parameter can be one of the following values: + * @arg @ref LL_RCC_APB1_DIV_1 + * @arg @ref LL_RCC_APB1_DIV_2 + * @arg @ref LL_RCC_APB1_DIV_4 + * @arg @ref LL_RCC_APB1_DIV_8 + * @arg @ref LL_RCC_APB1_DIV_16 + * @retval None + */ +__STATIC_INLINE void LL_RCC_SetAPB1Prescaler(uint32_t Prescaler) +{ + MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE, Prescaler); +} + +/** + * @brief Get AHB prescaler + * @rmtoll CFGR HPRE LL_RCC_GetAHBPrescaler + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_SYSCLK_DIV_1 + * @arg @ref LL_RCC_SYSCLK_DIV_2 + * @arg @ref LL_RCC_SYSCLK_DIV_4 + * @arg @ref LL_RCC_SYSCLK_DIV_8 + * @arg @ref LL_RCC_SYSCLK_DIV_16 + * @arg @ref LL_RCC_SYSCLK_DIV_64 + * @arg @ref LL_RCC_SYSCLK_DIV_128 + * @arg @ref LL_RCC_SYSCLK_DIV_256 + * @arg @ref LL_RCC_SYSCLK_DIV_512 + */ +__STATIC_INLINE uint32_t LL_RCC_GetAHBPrescaler(void) +{ + return (uint32_t)(READ_BIT(RCC->CFGR, RCC_CFGR_HPRE)); +} + +/** + * @brief Get APB1 prescaler + * @rmtoll CFGR PPRE LL_RCC_GetAPB1Prescaler + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_APB1_DIV_1 + * @arg @ref LL_RCC_APB1_DIV_2 + * @arg @ref LL_RCC_APB1_DIV_4 + * @arg @ref LL_RCC_APB1_DIV_8 + * @arg @ref LL_RCC_APB1_DIV_16 + */ +__STATIC_INLINE uint32_t LL_RCC_GetAPB1Prescaler(void) +{ + return (uint32_t)(READ_BIT(RCC->CFGR, RCC_CFGR_PPRE)); +} + +/** + * @} + */ + +/** @defgroup RCC_LL_EF_MCO MCO + * @{ + */ + +/** + * @brief Configure MCOx + * @rmtoll CFGR MCO LL_RCC_ConfigMCO\n + * CFGR MCOPRE LL_RCC_ConfigMCO\n + * CFGR PLLNODIV LL_RCC_ConfigMCO + * @param MCOxSource This parameter can be one of the following values: + * @arg @ref LL_RCC_MCO1SOURCE_NOCLOCK + * @arg @ref LL_RCC_MCO1SOURCE_HSI14 + * @arg @ref LL_RCC_MCO1SOURCE_SYSCLK + * @arg @ref LL_RCC_MCO1SOURCE_HSI + * @arg @ref LL_RCC_MCO1SOURCE_HSE + * @arg @ref LL_RCC_MCO1SOURCE_LSI + * @arg @ref LL_RCC_MCO1SOURCE_LSE + * @arg @ref LL_RCC_MCO1SOURCE_HSI48 (*) + * @arg @ref LL_RCC_MCO1SOURCE_PLLCLK (*) + * @arg @ref LL_RCC_MCO1SOURCE_PLLCLK_DIV_2 + * + * (*) value not defined in all devices + * @param MCOxPrescaler This parameter can be one of the following values: + * @arg @ref LL_RCC_MCO1_DIV_1 + * @arg @ref LL_RCC_MCO1_DIV_2 (*) + * @arg @ref LL_RCC_MCO1_DIV_4 (*) + * @arg @ref LL_RCC_MCO1_DIV_8 (*) + * @arg @ref LL_RCC_MCO1_DIV_16 (*) + * @arg @ref LL_RCC_MCO1_DIV_32 (*) + * @arg @ref LL_RCC_MCO1_DIV_64 (*) + * @arg @ref LL_RCC_MCO1_DIV_128 (*) + * + * (*) value not defined in all devices + * @retval None + */ +__STATIC_INLINE void LL_RCC_ConfigMCO(uint32_t MCOxSource, uint32_t MCOxPrescaler) +{ +#if defined(RCC_CFGR_MCOPRE) +#if defined(RCC_CFGR_PLLNODIV) + MODIFY_REG(RCC->CFGR, RCC_CFGR_MCOSEL | RCC_CFGR_MCOPRE | RCC_CFGR_PLLNODIV, MCOxSource | MCOxPrescaler); +#else + MODIFY_REG(RCC->CFGR, RCC_CFGR_MCOSEL | RCC_CFGR_MCOPRE, MCOxSource | MCOxPrescaler); +#endif /* RCC_CFGR_PLLNODIV */ +#else + MODIFY_REG(RCC->CFGR, RCC_CFGR_MCOSEL, MCOxSource); +#endif /* RCC_CFGR_MCOPRE */ +} + +/** + * @} + */ + +/** @defgroup RCC_LL_EF_Peripheral_Clock_Source Peripheral Clock Source + * @{ + */ + +/** + * @brief Configure USARTx clock source + * @rmtoll CFGR3 USART1SW LL_RCC_SetUSARTClockSource\n + * CFGR3 USART2SW LL_RCC_SetUSARTClockSource\n + * CFGR3 USART3SW LL_RCC_SetUSARTClockSource + * @param USARTxSource This parameter can be one of the following values: + * @arg @ref LL_RCC_USART1_CLKSOURCE_PCLK1 + * @arg @ref LL_RCC_USART1_CLKSOURCE_SYSCLK + * @arg @ref LL_RCC_USART1_CLKSOURCE_LSE + * @arg @ref LL_RCC_USART1_CLKSOURCE_HSI + * @arg @ref LL_RCC_USART2_CLKSOURCE_PCLK1 (*) + * @arg @ref LL_RCC_USART2_CLKSOURCE_SYSCLK (*) + * @arg @ref LL_RCC_USART2_CLKSOURCE_LSE (*) + * @arg @ref LL_RCC_USART2_CLKSOURCE_HSI (*) + * @arg @ref LL_RCC_USART3_CLKSOURCE_PCLK1 (*) + * @arg @ref LL_RCC_USART3_CLKSOURCE_SYSCLK (*) + * @arg @ref LL_RCC_USART3_CLKSOURCE_LSE (*) + * @arg @ref LL_RCC_USART3_CLKSOURCE_HSI (*) + * + * (*) value not defined in all devices. + * @retval None + */ +__STATIC_INLINE void LL_RCC_SetUSARTClockSource(uint32_t USARTxSource) +{ + MODIFY_REG(RCC->CFGR3, (RCC_CFGR3_USART1SW << ((USARTxSource & 0xFF000000U) >> 24U)), (USARTxSource & 0x00FFFFFFU)); +} + +/** + * @brief Configure I2Cx clock source + * @rmtoll CFGR3 I2C1SW LL_RCC_SetI2CClockSource + * @param I2CxSource This parameter can be one of the following values: + * @arg @ref LL_RCC_I2C1_CLKSOURCE_HSI + * @arg @ref LL_RCC_I2C1_CLKSOURCE_SYSCLK + * @retval None + */ +__STATIC_INLINE void LL_RCC_SetI2CClockSource(uint32_t I2CxSource) +{ + MODIFY_REG(RCC->CFGR3, RCC_CFGR3_I2C1SW, I2CxSource); +} + +#if defined(CEC) +/** + * @brief Configure CEC clock source + * @rmtoll CFGR3 CECSW LL_RCC_SetCECClockSource + * @param CECxSource This parameter can be one of the following values: + * @arg @ref LL_RCC_CEC_CLKSOURCE_HSI_DIV244 + * @arg @ref LL_RCC_CEC_CLKSOURCE_LSE + * @retval None + */ +__STATIC_INLINE void LL_RCC_SetCECClockSource(uint32_t CECxSource) +{ + MODIFY_REG(RCC->CFGR3, RCC_CFGR3_CECSW, CECxSource); +} +#endif /* CEC */ + +#if defined(USB) +/** + * @brief Configure USB clock source + * @rmtoll CFGR3 USBSW LL_RCC_SetUSBClockSource + * @param USBxSource This parameter can be one of the following values: + * @arg @ref LL_RCC_USB_CLKSOURCE_HSI48 (*) + * @arg @ref LL_RCC_USB_CLKSOURCE_NONE (*) + * @arg @ref LL_RCC_USB_CLKSOURCE_PLL + * + * (*) value not defined in all devices. + * @retval None + */ +__STATIC_INLINE void LL_RCC_SetUSBClockSource(uint32_t USBxSource) +{ + MODIFY_REG(RCC->CFGR3, RCC_CFGR3_USBSW, USBxSource); +} +#endif /* USB */ + +/** + * @brief Get USARTx clock source + * @rmtoll CFGR3 USART1SW LL_RCC_GetUSARTClockSource\n + * CFGR3 USART2SW LL_RCC_GetUSARTClockSource\n + * CFGR3 USART3SW LL_RCC_GetUSARTClockSource + * @param USARTx This parameter can be one of the following values: + * @arg @ref LL_RCC_USART1_CLKSOURCE + * @arg @ref LL_RCC_USART2_CLKSOURCE (*) + * @arg @ref LL_RCC_USART3_CLKSOURCE (*) + * + * (*) value not defined in all devices. + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_USART1_CLKSOURCE_PCLK1 + * @arg @ref LL_RCC_USART1_CLKSOURCE_SYSCLK + * @arg @ref LL_RCC_USART1_CLKSOURCE_LSE + * @arg @ref LL_RCC_USART1_CLKSOURCE_HSI + * @arg @ref LL_RCC_USART2_CLKSOURCE_PCLK1 (*) + * @arg @ref LL_RCC_USART2_CLKSOURCE_SYSCLK (*) + * @arg @ref LL_RCC_USART2_CLKSOURCE_LSE (*) + * @arg @ref LL_RCC_USART2_CLKSOURCE_HSI (*) + * @arg @ref LL_RCC_USART3_CLKSOURCE_PCLK1 (*) + * @arg @ref LL_RCC_USART3_CLKSOURCE_SYSCLK (*) + * @arg @ref LL_RCC_USART3_CLKSOURCE_LSE (*) + * @arg @ref LL_RCC_USART3_CLKSOURCE_HSI (*) + * + * (*) value not defined in all devices. + */ +__STATIC_INLINE uint32_t LL_RCC_GetUSARTClockSource(uint32_t USARTx) +{ + return (uint32_t)(READ_BIT(RCC->CFGR3, (RCC_CFGR3_USART1SW << USARTx)) | (USARTx << 24U)); +} + +/** + * @brief Get I2Cx clock source + * @rmtoll CFGR3 I2C1SW LL_RCC_GetI2CClockSource + * @param I2Cx This parameter can be one of the following values: + * @arg @ref LL_RCC_I2C1_CLKSOURCE + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_I2C1_CLKSOURCE_HSI + * @arg @ref LL_RCC_I2C1_CLKSOURCE_SYSCLK + */ +__STATIC_INLINE uint32_t LL_RCC_GetI2CClockSource(uint32_t I2Cx) +{ + return (uint32_t)(READ_BIT(RCC->CFGR3, I2Cx)); +} + +#if defined(CEC) +/** + * @brief Get CEC clock source + * @rmtoll CFGR3 CECSW LL_RCC_GetCECClockSource + * @param CECx This parameter can be one of the following values: + * @arg @ref LL_RCC_CEC_CLKSOURCE + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_CEC_CLKSOURCE_HSI_DIV244 + * @arg @ref LL_RCC_CEC_CLKSOURCE_LSE + */ +__STATIC_INLINE uint32_t LL_RCC_GetCECClockSource(uint32_t CECx) +{ + return (uint32_t)(READ_BIT(RCC->CFGR3, CECx)); +} +#endif /* CEC */ + +#if defined(USB) +/** + * @brief Get USBx clock source + * @rmtoll CFGR3 USBSW LL_RCC_GetUSBClockSource + * @param USBx This parameter can be one of the following values: + * @arg @ref LL_RCC_USB_CLKSOURCE + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_USB_CLKSOURCE_HSI48 (*) + * @arg @ref LL_RCC_USB_CLKSOURCE_NONE (*) + * @arg @ref LL_RCC_USB_CLKSOURCE_PLL + * + * (*) value not defined in all devices. + */ +__STATIC_INLINE uint32_t LL_RCC_GetUSBClockSource(uint32_t USBx) +{ + return (uint32_t)(READ_BIT(RCC->CFGR3, USBx)); +} +#endif /* USB */ + +/** + * @} + */ + +/** @defgroup RCC_LL_EF_RTC RTC + * @{ + */ + +/** + * @brief Set RTC Clock Source + * @note Once the RTC clock source has been selected, it cannot be changed any more unless + * the Backup domain is reset. The BDRST bit can be used to reset them. + * @rmtoll BDCR RTCSEL LL_RCC_SetRTCClockSource + * @param Source This parameter can be one of the following values: + * @arg @ref LL_RCC_RTC_CLKSOURCE_NONE + * @arg @ref LL_RCC_RTC_CLKSOURCE_LSE + * @arg @ref LL_RCC_RTC_CLKSOURCE_LSI + * @arg @ref LL_RCC_RTC_CLKSOURCE_HSE_DIV32 + * @retval None + */ +__STATIC_INLINE void LL_RCC_SetRTCClockSource(uint32_t Source) +{ + MODIFY_REG(RCC->BDCR, RCC_BDCR_RTCSEL, Source); +} + +/** + * @brief Get RTC Clock Source + * @rmtoll BDCR RTCSEL LL_RCC_GetRTCClockSource + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_RTC_CLKSOURCE_NONE + * @arg @ref LL_RCC_RTC_CLKSOURCE_LSE + * @arg @ref LL_RCC_RTC_CLKSOURCE_LSI + * @arg @ref LL_RCC_RTC_CLKSOURCE_HSE_DIV32 + */ +__STATIC_INLINE uint32_t LL_RCC_GetRTCClockSource(void) +{ + return (uint32_t)(READ_BIT(RCC->BDCR, RCC_BDCR_RTCSEL)); +} + +/** + * @brief Enable RTC + * @rmtoll BDCR RTCEN LL_RCC_EnableRTC + * @retval None + */ +__STATIC_INLINE void LL_RCC_EnableRTC(void) +{ + SET_BIT(RCC->BDCR, RCC_BDCR_RTCEN); +} + +/** + * @brief Disable RTC + * @rmtoll BDCR RTCEN LL_RCC_DisableRTC + * @retval None + */ +__STATIC_INLINE void LL_RCC_DisableRTC(void) +{ + CLEAR_BIT(RCC->BDCR, RCC_BDCR_RTCEN); +} + +/** + * @brief Check if RTC has been enabled or not + * @rmtoll BDCR RTCEN LL_RCC_IsEnabledRTC + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsEnabledRTC(void) +{ + return (READ_BIT(RCC->BDCR, RCC_BDCR_RTCEN) == (RCC_BDCR_RTCEN)); +} + +/** + * @brief Force the Backup domain reset + * @rmtoll BDCR BDRST LL_RCC_ForceBackupDomainReset + * @retval None + */ +__STATIC_INLINE void LL_RCC_ForceBackupDomainReset(void) +{ + SET_BIT(RCC->BDCR, RCC_BDCR_BDRST); +} + +/** + * @brief Release the Backup domain reset + * @rmtoll BDCR BDRST LL_RCC_ReleaseBackupDomainReset + * @retval None + */ +__STATIC_INLINE void LL_RCC_ReleaseBackupDomainReset(void) +{ + CLEAR_BIT(RCC->BDCR, RCC_BDCR_BDRST); +} + +/** + * @} + */ + +/** @defgroup RCC_LL_EF_PLL PLL + * @{ + */ + +/** + * @brief Enable PLL + * @rmtoll CR PLLON LL_RCC_PLL_Enable + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLL_Enable(void) +{ + SET_BIT(RCC->CR, RCC_CR_PLLON); +} + +/** + * @brief Disable PLL + * @note Cannot be disabled if the PLL clock is used as the system clock + * @rmtoll CR PLLON LL_RCC_PLL_Disable + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLL_Disable(void) +{ + CLEAR_BIT(RCC->CR, RCC_CR_PLLON); +} + +/** + * @brief Check if PLL Ready + * @rmtoll CR PLLRDY LL_RCC_PLL_IsReady + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_PLL_IsReady(void) +{ + return (READ_BIT(RCC->CR, RCC_CR_PLLRDY) == (RCC_CR_PLLRDY)); +} + +#if defined(RCC_PLLSRC_PREDIV1_SUPPORT) +/** + * @brief Configure PLL used for SYSCLK Domain + * @rmtoll CFGR PLLSRC LL_RCC_PLL_ConfigDomain_SYS\n + * CFGR PLLMUL LL_RCC_PLL_ConfigDomain_SYS\n + * CFGR2 PREDIV LL_RCC_PLL_ConfigDomain_SYS + * @param Source This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLSOURCE_HSI + * @arg @ref LL_RCC_PLLSOURCE_HSE + * @arg @ref LL_RCC_PLLSOURCE_HSI48 (*) + * + * (*) value not defined in all devices + * @param PLLMul This parameter can be one of the following values: + * @arg @ref LL_RCC_PLL_MUL_2 + * @arg @ref LL_RCC_PLL_MUL_3 + * @arg @ref LL_RCC_PLL_MUL_4 + * @arg @ref LL_RCC_PLL_MUL_5 + * @arg @ref LL_RCC_PLL_MUL_6 + * @arg @ref LL_RCC_PLL_MUL_7 + * @arg @ref LL_RCC_PLL_MUL_8 + * @arg @ref LL_RCC_PLL_MUL_9 + * @arg @ref LL_RCC_PLL_MUL_10 + * @arg @ref LL_RCC_PLL_MUL_11 + * @arg @ref LL_RCC_PLL_MUL_12 + * @arg @ref LL_RCC_PLL_MUL_13 + * @arg @ref LL_RCC_PLL_MUL_14 + * @arg @ref LL_RCC_PLL_MUL_15 + * @arg @ref LL_RCC_PLL_MUL_16 + * @param PLLDiv This parameter can be one of the following values: + * @arg @ref LL_RCC_PREDIV_DIV_1 + * @arg @ref LL_RCC_PREDIV_DIV_2 + * @arg @ref LL_RCC_PREDIV_DIV_3 + * @arg @ref LL_RCC_PREDIV_DIV_4 + * @arg @ref LL_RCC_PREDIV_DIV_5 + * @arg @ref LL_RCC_PREDIV_DIV_6 + * @arg @ref LL_RCC_PREDIV_DIV_7 + * @arg @ref LL_RCC_PREDIV_DIV_8 + * @arg @ref LL_RCC_PREDIV_DIV_9 + * @arg @ref LL_RCC_PREDIV_DIV_10 + * @arg @ref LL_RCC_PREDIV_DIV_11 + * @arg @ref LL_RCC_PREDIV_DIV_12 + * @arg @ref LL_RCC_PREDIV_DIV_13 + * @arg @ref LL_RCC_PREDIV_DIV_14 + * @arg @ref LL_RCC_PREDIV_DIV_15 + * @arg @ref LL_RCC_PREDIV_DIV_16 + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLL_ConfigDomain_SYS(uint32_t Source, uint32_t PLLMul, uint32_t PLLDiv) +{ + MODIFY_REG(RCC->CFGR, RCC_CFGR_PLLSRC | RCC_CFGR_PLLMUL, Source | PLLMul); + MODIFY_REG(RCC->CFGR2, RCC_CFGR2_PREDIV, PLLDiv); +} + +#else + +/** + * @brief Configure PLL used for SYSCLK Domain + * @rmtoll CFGR PLLSRC LL_RCC_PLL_ConfigDomain_SYS\n + * CFGR PLLMUL LL_RCC_PLL_ConfigDomain_SYS\n + * CFGR2 PREDIV LL_RCC_PLL_ConfigDomain_SYS + * @param Source This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLSOURCE_HSI_DIV_2 + * @arg @ref LL_RCC_PLLSOURCE_HSE_DIV_1 + * @arg @ref LL_RCC_PLLSOURCE_HSE_DIV_2 + * @arg @ref LL_RCC_PLLSOURCE_HSE_DIV_3 + * @arg @ref LL_RCC_PLLSOURCE_HSE_DIV_4 + * @arg @ref LL_RCC_PLLSOURCE_HSE_DIV_5 + * @arg @ref LL_RCC_PLLSOURCE_HSE_DIV_6 + * @arg @ref LL_RCC_PLLSOURCE_HSE_DIV_7 + * @arg @ref LL_RCC_PLLSOURCE_HSE_DIV_8 + * @arg @ref LL_RCC_PLLSOURCE_HSE_DIV_9 + * @arg @ref LL_RCC_PLLSOURCE_HSE_DIV_10 + * @arg @ref LL_RCC_PLLSOURCE_HSE_DIV_11 + * @arg @ref LL_RCC_PLLSOURCE_HSE_DIV_12 + * @arg @ref LL_RCC_PLLSOURCE_HSE_DIV_13 + * @arg @ref LL_RCC_PLLSOURCE_HSE_DIV_14 + * @arg @ref LL_RCC_PLLSOURCE_HSE_DIV_15 + * @arg @ref LL_RCC_PLLSOURCE_HSE_DIV_16 + * @param PLLMul This parameter can be one of the following values: + * @arg @ref LL_RCC_PLL_MUL_2 + * @arg @ref LL_RCC_PLL_MUL_3 + * @arg @ref LL_RCC_PLL_MUL_4 + * @arg @ref LL_RCC_PLL_MUL_5 + * @arg @ref LL_RCC_PLL_MUL_6 + * @arg @ref LL_RCC_PLL_MUL_7 + * @arg @ref LL_RCC_PLL_MUL_8 + * @arg @ref LL_RCC_PLL_MUL_9 + * @arg @ref LL_RCC_PLL_MUL_10 + * @arg @ref LL_RCC_PLL_MUL_11 + * @arg @ref LL_RCC_PLL_MUL_12 + * @arg @ref LL_RCC_PLL_MUL_13 + * @arg @ref LL_RCC_PLL_MUL_14 + * @arg @ref LL_RCC_PLL_MUL_15 + * @arg @ref LL_RCC_PLL_MUL_16 + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLL_ConfigDomain_SYS(uint32_t Source, uint32_t PLLMul) +{ + MODIFY_REG(RCC->CFGR, RCC_CFGR_PLLSRC | RCC_CFGR_PLLMUL, (Source & RCC_CFGR_PLLSRC) | PLLMul); + MODIFY_REG(RCC->CFGR2, RCC_CFGR2_PREDIV, (Source & RCC_CFGR2_PREDIV)); +} +#endif /* RCC_PLLSRC_PREDIV1_SUPPORT */ + +/** + * @brief Get the oscillator used as PLL clock source. + * @rmtoll CFGR PLLSRC LL_RCC_PLL_GetMainSource + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_PLLSOURCE_HSI (*) + * @arg @ref LL_RCC_PLLSOURCE_HSI_DIV_2 (*) + * @arg @ref LL_RCC_PLLSOURCE_HSE + * @arg @ref LL_RCC_PLLSOURCE_HSI48 (*) + * + * (*) value not defined in all devices + */ +__STATIC_INLINE uint32_t LL_RCC_PLL_GetMainSource(void) +{ + return (uint32_t)(READ_BIT(RCC->CFGR, RCC_CFGR_PLLSRC)); +} + +/** + * @brief Get PLL multiplication Factor + * @rmtoll CFGR PLLMUL LL_RCC_PLL_GetMultiplicator + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_PLL_MUL_2 + * @arg @ref LL_RCC_PLL_MUL_3 + * @arg @ref LL_RCC_PLL_MUL_4 + * @arg @ref LL_RCC_PLL_MUL_5 + * @arg @ref LL_RCC_PLL_MUL_6 + * @arg @ref LL_RCC_PLL_MUL_7 + * @arg @ref LL_RCC_PLL_MUL_8 + * @arg @ref LL_RCC_PLL_MUL_9 + * @arg @ref LL_RCC_PLL_MUL_10 + * @arg @ref LL_RCC_PLL_MUL_11 + * @arg @ref LL_RCC_PLL_MUL_12 + * @arg @ref LL_RCC_PLL_MUL_13 + * @arg @ref LL_RCC_PLL_MUL_14 + * @arg @ref LL_RCC_PLL_MUL_15 + * @arg @ref LL_RCC_PLL_MUL_16 + */ +__STATIC_INLINE uint32_t LL_RCC_PLL_GetMultiplicator(void) +{ + return (uint32_t)(READ_BIT(RCC->CFGR, RCC_CFGR_PLLMUL)); +} + +/** + * @brief Get PREDIV division factor for the main PLL + * @note They can be written only when the PLL is disabled + * @rmtoll CFGR2 PREDIV LL_RCC_PLL_GetPrediv + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_PREDIV_DIV_1 + * @arg @ref LL_RCC_PREDIV_DIV_2 + * @arg @ref LL_RCC_PREDIV_DIV_3 + * @arg @ref LL_RCC_PREDIV_DIV_4 + * @arg @ref LL_RCC_PREDIV_DIV_5 + * @arg @ref LL_RCC_PREDIV_DIV_6 + * @arg @ref LL_RCC_PREDIV_DIV_7 + * @arg @ref LL_RCC_PREDIV_DIV_8 + * @arg @ref LL_RCC_PREDIV_DIV_9 + * @arg @ref LL_RCC_PREDIV_DIV_10 + * @arg @ref LL_RCC_PREDIV_DIV_11 + * @arg @ref LL_RCC_PREDIV_DIV_12 + * @arg @ref LL_RCC_PREDIV_DIV_13 + * @arg @ref LL_RCC_PREDIV_DIV_14 + * @arg @ref LL_RCC_PREDIV_DIV_15 + * @arg @ref LL_RCC_PREDIV_DIV_16 + */ +__STATIC_INLINE uint32_t LL_RCC_PLL_GetPrediv(void) +{ + return (uint32_t)(READ_BIT(RCC->CFGR2, RCC_CFGR2_PREDIV)); +} + +/** + * @} + */ + +/** @defgroup RCC_LL_EF_FLAG_Management FLAG Management + * @{ + */ + +/** + * @brief Clear LSI ready interrupt flag + * @rmtoll CIR LSIRDYC LL_RCC_ClearFlag_LSIRDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_ClearFlag_LSIRDY(void) +{ + SET_BIT(RCC->CIR, RCC_CIR_LSIRDYC); +} + +/** + * @brief Clear LSE ready interrupt flag + * @rmtoll CIR LSERDYC LL_RCC_ClearFlag_LSERDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_ClearFlag_LSERDY(void) +{ + SET_BIT(RCC->CIR, RCC_CIR_LSERDYC); +} + +/** + * @brief Clear HSI ready interrupt flag + * @rmtoll CIR HSIRDYC LL_RCC_ClearFlag_HSIRDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_ClearFlag_HSIRDY(void) +{ + SET_BIT(RCC->CIR, RCC_CIR_HSIRDYC); +} + +/** + * @brief Clear HSE ready interrupt flag + * @rmtoll CIR HSERDYC LL_RCC_ClearFlag_HSERDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_ClearFlag_HSERDY(void) +{ + SET_BIT(RCC->CIR, RCC_CIR_HSERDYC); +} + +/** + * @brief Clear PLL ready interrupt flag + * @rmtoll CIR PLLRDYC LL_RCC_ClearFlag_PLLRDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_ClearFlag_PLLRDY(void) +{ + SET_BIT(RCC->CIR, RCC_CIR_PLLRDYC); +} + +/** + * @brief Clear HSI14 ready interrupt flag + * @rmtoll CIR HSI14RDYC LL_RCC_ClearFlag_HSI14RDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_ClearFlag_HSI14RDY(void) +{ + SET_BIT(RCC->CIR, RCC_CIR_HSI14RDYC); +} + +#if defined(RCC_HSI48_SUPPORT) +/** + * @brief Clear HSI48 ready interrupt flag + * @rmtoll CIR HSI48RDYC LL_RCC_ClearFlag_HSI48RDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_ClearFlag_HSI48RDY(void) +{ + SET_BIT(RCC->CIR, RCC_CIR_HSI48RDYC); +} +#endif /* RCC_HSI48_SUPPORT */ + +/** + * @brief Clear Clock security system interrupt flag + * @rmtoll CIR CSSC LL_RCC_ClearFlag_HSECSS + * @retval None + */ +__STATIC_INLINE void LL_RCC_ClearFlag_HSECSS(void) +{ + SET_BIT(RCC->CIR, RCC_CIR_CSSC); +} + +/** + * @brief Check if LSI ready interrupt occurred or not + * @rmtoll CIR LSIRDYF LL_RCC_IsActiveFlag_LSIRDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_LSIRDY(void) +{ + return (READ_BIT(RCC->CIR, RCC_CIR_LSIRDYF) == (RCC_CIR_LSIRDYF)); +} + +/** + * @brief Check if LSE ready interrupt occurred or not + * @rmtoll CIR LSERDYF LL_RCC_IsActiveFlag_LSERDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_LSERDY(void) +{ + return (READ_BIT(RCC->CIR, RCC_CIR_LSERDYF) == (RCC_CIR_LSERDYF)); +} + +/** + * @brief Check if HSI ready interrupt occurred or not + * @rmtoll CIR HSIRDYF LL_RCC_IsActiveFlag_HSIRDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_HSIRDY(void) +{ + return (READ_BIT(RCC->CIR, RCC_CIR_HSIRDYF) == (RCC_CIR_HSIRDYF)); +} + +/** + * @brief Check if HSE ready interrupt occurred or not + * @rmtoll CIR HSERDYF LL_RCC_IsActiveFlag_HSERDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_HSERDY(void) +{ + return (READ_BIT(RCC->CIR, RCC_CIR_HSERDYF) == (RCC_CIR_HSERDYF)); +} + +/** + * @brief Check if PLL ready interrupt occurred or not + * @rmtoll CIR PLLRDYF LL_RCC_IsActiveFlag_PLLRDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_PLLRDY(void) +{ + return (READ_BIT(RCC->CIR, RCC_CIR_PLLRDYF) == (RCC_CIR_PLLRDYF)); +} + +/** + * @brief Check if HSI14 ready interrupt occurred or not + * @rmtoll CIR HSI14RDYF LL_RCC_IsActiveFlag_HSI14RDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_HSI14RDY(void) +{ + return (READ_BIT(RCC->CIR, RCC_CIR_HSI14RDYF) == (RCC_CIR_HSI14RDYF)); +} + +#if defined(RCC_HSI48_SUPPORT) +/** + * @brief Check if HSI48 ready interrupt occurred or not + * @rmtoll CIR HSI48RDYF LL_RCC_IsActiveFlag_HSI48RDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_HSI48RDY(void) +{ + return (READ_BIT(RCC->CIR, RCC_CIR_HSI48RDYF) == (RCC_CIR_HSI48RDYF)); +} +#endif /* RCC_HSI48_SUPPORT */ + +/** + * @brief Check if Clock security system interrupt occurred or not + * @rmtoll CIR CSSF LL_RCC_IsActiveFlag_HSECSS + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_HSECSS(void) +{ + return (READ_BIT(RCC->CIR, RCC_CIR_CSSF) == (RCC_CIR_CSSF)); +} + +/** + * @brief Check if RCC flag Independent Watchdog reset is set or not. + * @rmtoll CSR IWDGRSTF LL_RCC_IsActiveFlag_IWDGRST + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_IWDGRST(void) +{ + return (READ_BIT(RCC->CSR, RCC_CSR_IWDGRSTF) == (RCC_CSR_IWDGRSTF)); +} + +/** + * @brief Check if RCC flag Low Power reset is set or not. + * @rmtoll CSR LPWRRSTF LL_RCC_IsActiveFlag_LPWRRST + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_LPWRRST(void) +{ + return (READ_BIT(RCC->CSR, RCC_CSR_LPWRRSTF) == (RCC_CSR_LPWRRSTF)); +} + +/** + * @brief Check if RCC flag is set or not. + * @rmtoll CSR OBLRSTF LL_RCC_IsActiveFlag_OBLRST + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_OBLRST(void) +{ + return (READ_BIT(RCC->CSR, RCC_CSR_OBLRSTF) == (RCC_CSR_OBLRSTF)); +} + +/** + * @brief Check if RCC flag Pin reset is set or not. + * @rmtoll CSR PINRSTF LL_RCC_IsActiveFlag_PINRST + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_PINRST(void) +{ + return (READ_BIT(RCC->CSR, RCC_CSR_PINRSTF) == (RCC_CSR_PINRSTF)); +} + +/** + * @brief Check if RCC flag POR/PDR reset is set or not. + * @rmtoll CSR PORRSTF LL_RCC_IsActiveFlag_PORRST + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_PORRST(void) +{ + return (READ_BIT(RCC->CSR, RCC_CSR_PORRSTF) == (RCC_CSR_PORRSTF)); +} + +/** + * @brief Check if RCC flag Software reset is set or not. + * @rmtoll CSR SFTRSTF LL_RCC_IsActiveFlag_SFTRST + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_SFTRST(void) +{ + return (READ_BIT(RCC->CSR, RCC_CSR_SFTRSTF) == (RCC_CSR_SFTRSTF)); +} + +/** + * @brief Check if RCC flag Window Watchdog reset is set or not. + * @rmtoll CSR WWDGRSTF LL_RCC_IsActiveFlag_WWDGRST + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_WWDGRST(void) +{ + return (READ_BIT(RCC->CSR, RCC_CSR_WWDGRSTF) == (RCC_CSR_WWDGRSTF)); +} + +#if defined(RCC_CSR_V18PWRRSTF) +/** + * @brief Check if RCC Reset flag of the 1.8 V domain is set or not. + * @rmtoll CSR V18PWRRSTF LL_RCC_IsActiveFlag_V18PWRRST + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_V18PWRRST(void) +{ + return (READ_BIT(RCC->CSR, RCC_CSR_V18PWRRSTF) == (RCC_CSR_V18PWRRSTF)); +} +#endif /* RCC_CSR_V18PWRRSTF */ + +/** + * @brief Set RMVF bit to clear the reset flags. + * @rmtoll CSR RMVF LL_RCC_ClearResetFlags + * @retval None + */ +__STATIC_INLINE void LL_RCC_ClearResetFlags(void) +{ + SET_BIT(RCC->CSR, RCC_CSR_RMVF); +} + +/** + * @} + */ + +/** @defgroup RCC_LL_EF_IT_Management IT Management + * @{ + */ + +/** + * @brief Enable LSI ready interrupt + * @rmtoll CIR LSIRDYIE LL_RCC_EnableIT_LSIRDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_EnableIT_LSIRDY(void) +{ + SET_BIT(RCC->CIR, RCC_CIR_LSIRDYIE); +} + +/** + * @brief Enable LSE ready interrupt + * @rmtoll CIR LSERDYIE LL_RCC_EnableIT_LSERDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_EnableIT_LSERDY(void) +{ + SET_BIT(RCC->CIR, RCC_CIR_LSERDYIE); +} + +/** + * @brief Enable HSI ready interrupt + * @rmtoll CIR HSIRDYIE LL_RCC_EnableIT_HSIRDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_EnableIT_HSIRDY(void) +{ + SET_BIT(RCC->CIR, RCC_CIR_HSIRDYIE); +} + +/** + * @brief Enable HSE ready interrupt + * @rmtoll CIR HSERDYIE LL_RCC_EnableIT_HSERDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_EnableIT_HSERDY(void) +{ + SET_BIT(RCC->CIR, RCC_CIR_HSERDYIE); +} + +/** + * @brief Enable PLL ready interrupt + * @rmtoll CIR PLLRDYIE LL_RCC_EnableIT_PLLRDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_EnableIT_PLLRDY(void) +{ + SET_BIT(RCC->CIR, RCC_CIR_PLLRDYIE); +} + +/** + * @brief Enable HSI14 ready interrupt + * @rmtoll CIR HSI14RDYIE LL_RCC_EnableIT_HSI14RDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_EnableIT_HSI14RDY(void) +{ + SET_BIT(RCC->CIR, RCC_CIR_HSI14RDYIE); +} + +#if defined(RCC_HSI48_SUPPORT) +/** + * @brief Enable HSI48 ready interrupt + * @rmtoll CIR HSI48RDYIE LL_RCC_EnableIT_HSI48RDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_EnableIT_HSI48RDY(void) +{ + SET_BIT(RCC->CIR, RCC_CIR_HSI48RDYIE); +} +#endif /* RCC_HSI48_SUPPORT */ + +/** + * @brief Disable LSI ready interrupt + * @rmtoll CIR LSIRDYIE LL_RCC_DisableIT_LSIRDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_DisableIT_LSIRDY(void) +{ + CLEAR_BIT(RCC->CIR, RCC_CIR_LSIRDYIE); +} + +/** + * @brief Disable LSE ready interrupt + * @rmtoll CIR LSERDYIE LL_RCC_DisableIT_LSERDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_DisableIT_LSERDY(void) +{ + CLEAR_BIT(RCC->CIR, RCC_CIR_LSERDYIE); +} + +/** + * @brief Disable HSI ready interrupt + * @rmtoll CIR HSIRDYIE LL_RCC_DisableIT_HSIRDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_DisableIT_HSIRDY(void) +{ + CLEAR_BIT(RCC->CIR, RCC_CIR_HSIRDYIE); +} + +/** + * @brief Disable HSE ready interrupt + * @rmtoll CIR HSERDYIE LL_RCC_DisableIT_HSERDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_DisableIT_HSERDY(void) +{ + CLEAR_BIT(RCC->CIR, RCC_CIR_HSERDYIE); +} + +/** + * @brief Disable PLL ready interrupt + * @rmtoll CIR PLLRDYIE LL_RCC_DisableIT_PLLRDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_DisableIT_PLLRDY(void) +{ + CLEAR_BIT(RCC->CIR, RCC_CIR_PLLRDYIE); +} + +/** + * @brief Disable HSI14 ready interrupt + * @rmtoll CIR HSI14RDYIE LL_RCC_DisableIT_HSI14RDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_DisableIT_HSI14RDY(void) +{ + CLEAR_BIT(RCC->CIR, RCC_CIR_HSI14RDYIE); +} + +#if defined(RCC_HSI48_SUPPORT) +/** + * @brief Disable HSI48 ready interrupt + * @rmtoll CIR HSI48RDYIE LL_RCC_DisableIT_HSI48RDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_DisableIT_HSI48RDY(void) +{ + CLEAR_BIT(RCC->CIR, RCC_CIR_HSI48RDYIE); +} +#endif /* RCC_HSI48_SUPPORT */ + +/** + * @brief Checks if LSI ready interrupt source is enabled or disabled. + * @rmtoll CIR LSIRDYIE LL_RCC_IsEnabledIT_LSIRDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_LSIRDY(void) +{ + return (READ_BIT(RCC->CIR, RCC_CIR_LSIRDYIE) == (RCC_CIR_LSIRDYIE)); +} + +/** + * @brief Checks if LSE ready interrupt source is enabled or disabled. + * @rmtoll CIR LSERDYIE LL_RCC_IsEnabledIT_LSERDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_LSERDY(void) +{ + return (READ_BIT(RCC->CIR, RCC_CIR_LSERDYIE) == (RCC_CIR_LSERDYIE)); +} + +/** + * @brief Checks if HSI ready interrupt source is enabled or disabled. + * @rmtoll CIR HSIRDYIE LL_RCC_IsEnabledIT_HSIRDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_HSIRDY(void) +{ + return (READ_BIT(RCC->CIR, RCC_CIR_HSIRDYIE) == (RCC_CIR_HSIRDYIE)); +} + +/** + * @brief Checks if HSE ready interrupt source is enabled or disabled. + * @rmtoll CIR HSERDYIE LL_RCC_IsEnabledIT_HSERDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_HSERDY(void) +{ + return (READ_BIT(RCC->CIR, RCC_CIR_HSERDYIE) == (RCC_CIR_HSERDYIE)); +} + +/** + * @brief Checks if PLL ready interrupt source is enabled or disabled. + * @rmtoll CIR PLLRDYIE LL_RCC_IsEnabledIT_PLLRDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_PLLRDY(void) +{ + return (READ_BIT(RCC->CIR, RCC_CIR_PLLRDYIE) == (RCC_CIR_PLLRDYIE)); +} + +/** + * @brief Checks if HSI14 ready interrupt source is enabled or disabled. + * @rmtoll CIR HSI14RDYIE LL_RCC_IsEnabledIT_HSI14RDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_HSI14RDY(void) +{ + return (READ_BIT(RCC->CIR, RCC_CIR_HSI14RDYIE) == (RCC_CIR_HSI14RDYIE)); +} + +#if defined(RCC_HSI48_SUPPORT) +/** + * @brief Checks if HSI48 ready interrupt source is enabled or disabled. + * @rmtoll CIR HSI48RDYIE LL_RCC_IsEnabledIT_HSI48RDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_HSI48RDY(void) +{ + return (READ_BIT(RCC->CIR, RCC_CIR_HSI48RDYIE) == (RCC_CIR_HSI48RDYIE)); +} +#endif /* RCC_HSI48_SUPPORT */ + +/** + * @} + */ + +#if defined(USE_FULL_LL_DRIVER) +/** @defgroup RCC_LL_EF_Init De-initialization function + * @{ + */ +ErrorStatus LL_RCC_DeInit(void); +/** + * @} + */ + +/** @defgroup RCC_LL_EF_Get_Freq Get system and peripherals clocks frequency functions + * @{ + */ +void LL_RCC_GetSystemClocksFreq(LL_RCC_ClocksTypeDef *RCC_Clocks); +uint32_t LL_RCC_GetUSARTClockFreq(uint32_t USARTxSource); +uint32_t LL_RCC_GetI2CClockFreq(uint32_t I2CxSource); +#if defined(USB_OTG_FS) || defined(USB) +uint32_t LL_RCC_GetUSBClockFreq(uint32_t USBxSource); +#endif /* USB_OTG_FS || USB */ +#if defined(CEC) +uint32_t LL_RCC_GetCECClockFreq(uint32_t CECxSource); +#endif /* CEC */ +/** + * @} + */ +#endif /* USE_FULL_LL_DRIVER */ + +/** + * @} + */ + +/** + * @} + */ + +#endif /* RCC */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32F0xx_LL_RCC_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/KMini_CCT6/Src/BSP.c b/KMini_CCT6/Src/BSP.c index 2740f3c..8edd679 100644 --- a/KMini_CCT6/Src/BSP.c +++ b/KMini_CCT6/Src/BSP.c @@ -141,7 +141,7 @@ RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1; - if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) + if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_ACR_LATENCY) != HAL_OK) { Error_Handler(); } @@ -701,6 +701,60 @@ LL_USART_Enable(USART2); } +/* USART3 init function */ +void MX_USART3_UART_Init(void) +{ + + + LL_USART_InitTypeDef USART_InitStruct = {0}; + LL_GPIO_InitTypeDef GPIO_InitStruct = {0}; + + /* Peripheral clock enable */ + LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_USART3); + LL_AHB1_GRP1_EnableClock(LL_AHB1_GRP1_PERIPH_GPIOB); + + /**USART3 GPIO Configuration + PB5 ------> USART3_DE + PB3 ------> USART3_TX + PB4 ------> USART3_RX + */ + GPIO_InitStruct.Pin = LL_GPIO_PIN_10|LL_GPIO_PIN_11; + GPIO_InitStruct.Mode = LL_GPIO_MODE_ALTERNATE; + GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_HIGH; + GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_PUSHPULL; + GPIO_InitStruct.Pull = LL_GPIO_PULL_UP; + GPIO_InitStruct.Alternate = LL_GPIO_AF_4; + LL_GPIO_Init(GPIOB, &GPIO_InitStruct); + + + /* USART3 interrupt Init */ + NVIC_SetPriority(USART3_6_IRQn, 0); + NVIC_EnableIRQ(USART3_6_IRQn); + + USART_InitStruct.BaudRate = 230400; + USART_InitStruct.DataWidth = LL_USART_DATAWIDTH_8B; + USART_InitStruct.StopBits = LL_USART_STOPBITS_1; + USART_InitStruct.Parity = LL_USART_PARITY_NONE; + USART_InitStruct.TransferDirection = LL_USART_DIRECTION_TX_RX; + USART_InitStruct.HardwareFlowControl = LL_USART_HWCONTROL_NONE; + USART_InitStruct.OverSampling = LL_USART_OVERSAMPLING_8; + LL_USART_Init(USART3, &USART_InitStruct); + +/* + LL_USART_EnableDEMode(USART3); + LL_USART_SetDESignalPolarity(USART3, LL_USART_DE_POLARITY_LOW); +// LL_USART_SetDESignalPolarity(USART3, LL_USART_DE_POLARITY_HIGH); + LL_USART_SetDEAssertionTime(USART3, 3); + LL_USART_SetDEDeassertionTime(USART3, 3); + LL_USART_EnableOneBitSamp(USART3); +// LL_USART_EnableAutoBaudRate(USART3); +// LL_USART_SetAutoBaudRateMode(USART3, LL_USART_AUTOBAUD_DETECT_ON_FALLINGEDGE); +*/ + LL_USART_DisableOverrunDetect(USART3); + LL_USART_ConfigAsyncMode(USART3); + LL_USART_Enable(USART3); +} + /* USART5 init function */ void MX_USART5_UART_Init(void) @@ -732,7 +786,7 @@ NVIC_SetPriority(USART3_6_IRQn, 0); NVIC_EnableIRQ(USART3_6_IRQn); - USART_InitStruct.BaudRate = 57600; + USART_InitStruct.BaudRate = 230400; USART_InitStruct.DataWidth = LL_USART_DATAWIDTH_8B; USART_InitStruct.StopBits = LL_USART_STOPBITS_1; USART_InitStruct.Parity = LL_USART_PARITY_NONE; diff --git a/KMini_CCT6/Src/BoardType.c b/KMini_CCT6/Src/BoardType.c index e69de29..aa777e9 100644 --- a/KMini_CCT6/Src/BoardType.c +++ b/KMini_CCT6/Src/BoardType.c @@ -0,0 +1,92 @@ +#include "BoardType.h" +#include "KMachine.h" +#include "KBus.h" + +#define APP_ADDR 0x08001000 //应用程序首地址定义 +#define APPINFOBLOCK_ADDR (APP_ADDR + 0x100) //程序信息块 地址 +#define INFOBLOCK_ADDR (APP_ADDR + 0x1000) //信息块 地址 + + +#define APP_START_ADDR IROM1_START_ADDRESS +extern int Region$$Table$$Limit; + +const stAppInfoBlock AppInfoBlock __attribute__((at(APPINFOBLOCK_ADDR))) = +{ + 0xAA55, // StartSign + 0x0301, // BlockType + sizeof(stAppInfoBlock), //BlockSize + 0, // Pad, + 0x0109, //AppVer + (BOARD_TYPE<<8) + BOARD_VER, //AppDevice; + 0x1000, //AppSize; + 0x0C00, //AppDataSize; + APP_ADDR, //nAppStartAddr + (int)&Region$$Table$$Limit, //nBtldr_NewAppInfoAddr + 0x08009000, //nBtldr_NewAppAddr + 0xCCCC, //crc16; + 0xAA55 //EndSign; + +}; + + + +const stKMInfoBlock KMInfoBlock __attribute__((at(INFOBLOCK_ADDR))) = +{ +// sizeof(stKMInfoBlock), + (BOARD_TYPE<<8) + BOARD_VER, //nDeviceType BOARD_VER, //nDevieVer + 0x0109, //ProgVer + 0x0102, //KLinkVer + KBUS_VER, //KBusVer +// 0x0100, //KNetVer +// 0x0100, //KWLVer + + 4, //nCapacity1 ?K + 1, //nCapacity2 ?k + + DINPUT, //nDInput; + DOUTPUT, //nDOutput + + 0, //nAInput + 0, //nAOutput + 0, //nHInput + 0, //nHOutput + 0, //nExt1; + 0, //nExt2; + 0, //nLogSize; + 0, //nPorts; + 0, //nManSize; + 0, //nAbility; + 6, //nSwitchBits; +}; + +const stDeviceInfo MyDeviceInfo={ + + (BOARD_TYPE<<8) + BOARD_VER, //nDeviceTypeVer // unsigned short ClientType; // 子机类型 + 0x0109, //ProgVer // unsigned short ClientVer; // 子机版本 + + DINPUT, // unsigned char InBitCount; // 输入开关量数量 + DOUTPUT, // unsigned char OutBitCount; // 输出开关量数量 + 0, // unsigned char InDWCount; // 输入数据字数 + 0, // unsigned char OutDWCount; // 输出数据字数 + 0, // unsigned char AIWCount; // 输入模拟量通道(字)数 // 16位为一个字(通道) + 0, // unsigned char AQWCount; // 输出模拟量通道(字)数 // 16位为一个字(通道) +// 0, // unsigned char AIBits; // 每通道位数 // 16位以下 +// 0, // unsigned char AQbits; // 每通道位数 // 16位以下 +}; + +const stExDeviceInfo MyExDeviceInfo ={ + (BOARD_TYPE<<8) + BOARD_VER, //nDeviceTypeVer // unsigned short ClientType; // 子机类型 + 0x0109, //ProgVer // unsigned short ClientVer; // 子机版本 + + DINPUT, // unsigned char InBitCount; // 输入开关量数量 + DOUTPUT, // unsigned char OutBitCount; // 输出开关量数量 + 0, // unsigned char InDWCount; // 输入数据字数 + 0, // unsigned char OutDWCount; // 输出数据字数 + 0, // unsigned char AIWCount; // 输入模拟量通道(字)数 // 16位为一个字(通道) + 0, // unsigned char AQWCount; // 输出模拟量通道(字)数 // 16位为一个字(通道) +// 0, // unsigned char AIBits; // 每通道位数 // 16位以下 +// 0, // unsigned char AQbits; // 每通道位数 // 16位以下 + +}; + + diff --git a/KMini_CCT6/Src/LidarPos.c b/KMini_CCT6/Src/LidarPos.c new file mode 100644 index 0000000..9460878 --- /dev/null +++ b/KMini_CCT6/Src/LidarPos.c @@ -0,0 +1,94 @@ +#include "LindarPos.h" +#include "OrdLidar.h" +#include "KMachine.h" + +int ProcessPos(int nLidarIdx, stLidarDot * pLindarDots, int nCount) +{ + int nValidCount0 = nCount; + int minDisIndex = 0; int minDistance = 55555; + int minZ = 10000; int minZIndex= -1; + int planeCount =0; // 最底层平面的点数量。 + int firstmin = 1000,firstmax = -1000; + int secondmin = 1000, secondmax = -1000; + + int firstCount=0; int secondCount =0; int midCount =0; + results[0]=0; + // 求 minZ 和 minDistance; + for (int j = 0;j < nValidCount0;j++){ + if (pLindarDots[j].distance < 50) continue; // skip too small points; + if (pLindarDots[j].y < 40) continue; // skip too small points; + if (pLindarDots[j].x < -200 || pLindarDots[j].x > 500) continue; + if (pLindarDots[j].y < minZ) { minZIndex = j; minZ = pLindarDots[j].y; } + if (pLindarDots[j].distance < minDistance) { + minDisIndex = j; minDistance = pLindarDots[j].distance; + } + } + + for (int j = nValidCount0 -1 ;j>=0 && minZ < 500;j--) + { + int x = pLindarDots[j].x; + int y = pLindarDots[j].y; + int d = pLindarDots[j].distance; + + if (d < 50) continue; // skip too small points; + if (y < 40) continue; // skip too small points; + if (x < -200 || x > 500) continue; + // 只查找 底部 50mm 数据 + + //results[0]++; + if (y >= minZ + 50) { + if ((firstCount >0 && secondCount == 0) + || (secondCount >0 && firstCount == 0)) { + midCount++; + } + continue; + } + + if (planeCount < 40) { + KMem.WDT[40+2 * planeCount]=d; + KMem.WDT[40+2 * planeCount +1 ]=x; + } + + planeCount++; + if (x > -200 && x < 500) + { + if (x < firstmin) firstmin = x; + if (x > secondmax) secondmax = x; + } + // 后沿 + if (x > -200 && x < 100 && y < minZ + 40 ) + { + if (x > firstmax) firstmax = x; + firstCount++; + } + // 前沿 + if (x > 200 && x < 500 && y < minZ + 40 ) + { + if (x < secondmin) secondmin = x; + secondCount ++; + } + + } + results[0]=planeCount; + results[1]=firstCount; + results[2]=midCount; + results[3]=secondCount; + + results[4]=firstmin; + results[5]=firstmax; + results[6]=secondmin; + results[7]=secondmax; + int avg=0; + if (firstCount > 0 && secondCount > 0 && midCount > 0 ){ + avg = (secondmin + firstmax) / 2; + }else if (planeCount>10) { + avg = (firstmin + secondmax) /2; + } + + nPosX = (nPosX *3 + avg) /4; + if (minZ < 9999) nPosZ1 = (minZ + nPosZ1 * 3)/4; + return 0; + + + +} \ No newline at end of file diff --git a/KMini_CCT6/Src/OrdLidar.c b/KMini_CCT6/Src/OrdLidar.c new file mode 100644 index 0000000..e647413 --- /dev/null +++ b/KMini_CCT6/Src/OrdLidar.c @@ -0,0 +1,348 @@ +#include "OrdLidar.h" + +#include "KMachine.h" + +int nPosX; +int nPosY; +int nPosZ; + +int nPosZ1,nPosZ2; + +int pCount1=0; +int pCount2=0; + +int eCount1; +int eCount2; + +int dCount1=0; +int dCount2=0; + +int vCount1=0; +int vCount2=0; + +int results[32]; + + +void Uart3SendPacket(char * str, int len); +void Uart5SendPacket(char * str, int len); + +//正弦表,0 - 360 代表 0 - 2PI,结果0 - 1000 表示0 - 1,表中只有0 - PI/2即1/4周期的数据,其他的数据用对称和镜像得到。 +const int SinTable[] = +{ +0,17,35, 52, 70, 87, 105, 122, 139, 156, 174, 191, 208, 225, 242, 259, 276, 292, +309, 326, 342, 358, 375, 391, 407, 423, 438, 454, 469, 485, 500, 515, 530, 545, +559, 574, 588, 602, 616, 629, 643, 656, 669, 682, 695, 707, 719, 731, 743, 755, +766, 777, 788, 799, 809, 819, 829, 839, 848, 857, 866, 875, 883, 891, 899, 906, +914, 921, 927, 934, 940, 946, 951, 956, 961, 966, 970, 974, 978, 982, 985, 988, +990, 993, 995, 996, 998, 999, 999, 1000, 1000, +1000, 999, 999, 998, 996, 995, +993, 990, 988, 985, 982, 978, 974, 970, 966, 961, 956, 951, 946, 940, 934, 927, +921, 914, 906, 899, 891, 883, 875, 866, 857, 848, 839, 829, 819, 809, 799, 788, +777, 766, 755, 743, 731, 719, 707, 695, 682, 669, 656, 643, 629, 616, 602, 588, +574, 559, 545, 530, 515, 500, 485, 469, 454, 438, 423, 407, 391, 375, 358, 342, +326, 309, 292, 276, 259, 242, 225, 208, 191, 174, 156, 139, 122, 105, 87, 70, +52, 35, 17, 0, -17, -35, -52, -70, -87, -105, -122, -139, -156, -174, -191, +-208, -225, -242, -259, -276, -292, -309, -326, -342, -358, -375, -391, -407, +-423, -438, -454, -469, -485, -500, -515, -530, -545, -559, -574, -588, -602, +-616, -629, -643, -656, -669, -682, -695, -707, -719, -731, -743, -755, -766, +-777, -788, -799, -809, -819, -829, -839, -848, -857, -866, -875, -883, -891, +-899, -906, -914, -921, -927, -934, -940, -946, -951, -956, -961, -966, -970, +-974, -978, -982, -985, -988, -990, -993, -995, -996, -998, -999, -999, -1000, +-1000, -1000, -999, -999, -998, -996, -995, -993, -990, -988, -985, -982, -978, +-974, -970, -966, -961, -956, -951, -946, -940, -934, -927, -921, -914, -906, +-899, -891, -883, -875, -866, -857, -848, -839, -829, -819, -809, -799, -788, +-777, -766, -755, -743, -731, -719, -707, -695, -682, -669, -656, -643, -629, +-616, -602, -588, -574, -559, -545, -530, -515, -500, -485, -469, -454, -438, +-423, -407, -391, -375, -358, -342, -326, -309, -292, -276, -259, -242, -225, +-208, -191, -174, -156, -139, -122, -105, -87, -70, -52, -35, -17 +}; + + + +char StartCMD[2] = { 0xA5,0x60 }; +char StopCMD[2] = { 0xA5,0x65 }; + + +int StartAngle; +int EndAngle; + +int OrdLidarStart(int nIdx) +{ + if (nIdx == 0 || nIdx == -1 ) { + Uart3SendPacket(StartCMD,sizeof(StartCMD)); + } + if (nIdx == 1 || nIdx == -1) { + Uart5SendPacket(StartCMD,sizeof(StartCMD)); + } + return 0; +}; + + +int OrdLidarStop(int nIdx){ + if (nIdx == 0 || nIdx == -1 ) { + Uart3SendPacket(StopCMD,sizeof(StopCMD)); + } + if (nIdx == 1 || nIdx == -1) { + Uart5SendPacket(StopCMD,sizeof(StopCMD)); + } + return 0; +}; + +char startFlag0 = 0; +char startFlag1 = 0; + +#define VALID_DATA_MAX 400 +stLidarDot validData0[400]; +stLidarDot validData1[400]; + +int nValidCount0 = 0; +int nValidCount1 = 0; + +#define ORG_SUB_DEGREE 100 +#define SUB_DEGREE 64 //64 + +#define START_DEGREE 110 +#define END_DEGREE 250 + +#define MAX_DISTANCE 500 //mm + +//整数求SIN值,带线性插值功能, 输入0 - 360*64 为 0 - 2PI,一个周期;输出-1000 至 +1000,代表-1到+1; +int sini(int a) +{ + if (a <0) {a += 360 * SUB_DEGREE;} + a = a % (360 * SUB_DEGREE); + int b; + b=a / SUB_DEGREE; + int xx = a % SUB_DEGREE; + if (b< 90 ) + { + int d1= SinTable[b ]; + int d2 =SinTable[b+1 ]; + int d; + d = ((SUB_DEGREE-xx) * d1 + xx * d2 ) / SUB_DEGREE; + + return (d); + } + else if (b<180 ) + { + int c; + c=180-b; + + int d1= SinTable[c ]; + int d2 =SinTable[c-1 ]; + int d; + d = ((SUB_DEGREE-xx) * d1 + xx * d2 ) / SUB_DEGREE; + + return (d); + } + + else if (b<270) + { + int c; + c=b-180; + int d1= SinTable[c ]; + int d2 =SinTable[c+1 ]; + int d; + d = ((SUB_DEGREE-xx) * d1 + xx * d2 ) / SUB_DEGREE; + + return (-d); + } + else + { + int c; + c=360 -b; + int d1= SinTable[c ]; + int d2 =SinTable[c-1 ]; + int d; + d = ((SUB_DEGREE-xx) * d1 + xx * d2 ) / SUB_DEGREE; + + return (-d); + } + +// return a; +} + +int cosi(int a) +{ + return sini(a+90*SUB_DEGREE); +} + +int OrdLidarParsePkt(int nLidarIdx, OradarLidarFrame * pLindarPkt, int len1) +{ + int iRet = 0; + if (pLindarPkt->header != 0x54) return 0; // check for start sign + int nDotNum = pLindarPkt->ver_len &0x1f; + if (len1 != nDotNum*3 +11) return -1; + if (nDotNum<2) return 0; + + int startAngle = (pLindarPkt->start_angle) * SUB_DEGREE / ORG_SUB_DEGREE; // degree * 100; + int endAngle = (pLindarPkt->end_angle ) * SUB_DEGREE / ORG_SUB_DEGREE; // degree * 100; + if (startAngle >= endAngle) {eCount1++; return 0;} + int diffAngle = (endAngle - startAngle); + int eachAngle = diffAngle / (nDotNum - 1); + + if (nLidarIdx == 0) + { + pCount1++; + for (int i = 0;i < nDotNum && i < 40 ;i++) + { + unsigned char confidence = pLindarPkt->point[i].confidence; + int angle = eachAngle * i + startAngle; // degree * 64 + dCount1++; + + if (angle < START_DEGREE * SUB_DEGREE ) startFlag0 = 1; + if (angle >= START_DEGREE * SUB_DEGREE && angle < END_DEGREE * SUB_DEGREE) // &&x>100000&&x<250000) + { + if (pLindarPkt->point[i].confidence < 30) continue; + int value = pLindarPkt->point[i].distance; // distance + + int x = value * sini(angle )/1000; // mm + int z = -value * cosi(angle )/1000; // mm + + //vectorX.push_back(x); + //vectorY.push_back(y); + validData0[nValidCount0].distance = value; + validData0[nValidCount0].x = x; + validData0[nValidCount0].y = z; + if (nValidCount0 < VALID_DATA_MAX - 1 ) nValidCount0 ++; + //vCount1++; + } + + if (angle > END_DEGREE * SUB_DEGREE) + { + if (startFlag0 == 1 && nValidCount0 > 0) + { + vCount1 = nValidCount0; + ProcessPos(0,validData0,nValidCount0); + + + } + startFlag0 = 0; + nValidCount0 = 0; + } + } + } + + if (nLidarIdx == 1) + { + pCount2++; + for (int i = 0;i < nDotNum && i < 40 ;i++) + { + unsigned char confidence = pLindarPkt->point[i].confidence; + int angle = eachAngle * i + startAngle; + + dCount2++; + + if (angle < START_DEGREE * SUB_DEGREE) startFlag1 = 1; + if (angle >= START_DEGREE * SUB_DEGREE && angle < END_DEGREE * SUB_DEGREE ) // &&x>100000&&x<250000) + { + if (confidence < 30) continue; + int value = pLindarPkt->point[i].distance; // distance + + int x = value * sini(angle - 180 * SUB_DEGREE )/1000; // mm + int y = value * cosi(angle - 180 * SUB_DEGREE )/1000; // mm //vectorX.push_back(x); + //vectorY.push_back(y); + validData1[nValidCount1].distance = value; + validData1[nValidCount1].x = x; + validData1[nValidCount1].y = y; + if (nValidCount1 < VALID_DATA_MAX - 1 ) nValidCount1 ++; + //vCount2 ++; + } + + if (angle > END_DEGREE * SUB_DEGREE) + { + if (startFlag1 == 1 && nValidCount1 > 0 ) + { + vCount2 = nValidCount1; + + int minDisIndex = 0; int minDistance = 55555; + int minZ = 9999; int minZIndex= -1; + int planeCount =0; + int firstmin =1000, firstmax = -1000; + int secondmin = 1000, secondmax = -1000; + + int firstCount=0; int secondCount =0; int midCount =0; + + // 求 minZ 和 minDistance; + for (int j = 0;j < nValidCount1;j++){ + if (validData1[j].distance < 50) continue; // skip too small points; + if (validData1[j].y < 40) continue; // skip too small points; + if (validData1[j].x < -200 || validData1[j].x > 500) continue; + if (validData1[j].y < minZ) { minZIndex = j; minZ = validData1[j].y; } + if (validData1[j].distance < minDistance) { + minDisIndex = j; minDistance = validData1[j].distance; + } + } + + for (int j = 0;j < nValidCount1 && minZ<500;j++) + { + int x = validData1[j].x; + int y = validData1[j].y; + int d = validData1[j].distance; + + if (d < 50) continue; // skip too small points; + if (y < 40) continue; // skip too small points; + if (x < -200 || x > 500) continue; + + // 只查找 底部 50mm 数据 + + if (y > minZ + 50) { + if ((firstCount >0 && secondCount ==0) + || (secondCount >0 && firstCount ==0)) { + midCount++; + } + continue; + } + planeCount++; + if (x > -200 && x < 500) + { + if (x < firstmin) firstmin = x; + if (x > secondmax) secondmax = x; + } + + // 后沿 + if (x > -200 && x < 100) + { + if (validData1[j].x > firstmax) firstmax =x; + firstCount++; + } + // 前沿 + if (x > 200 && x < 500 ) + { + if (x < secondmin) secondmin = x; + secondCount++; + } + + } + int avg=0; + if (firstCount > 0 && secondCount > 0 && midCount > 0 ){ + avg = (secondmin + firstmax) / 2; + }else if (planeCount>10) { + avg = (firstmin + secondmax) /2; + } + + nPosY = (nPosY *3 + avg) /4; + if (minZ < 9999) { + nPosZ2 = (minZ + nPosZ2 *3)/4; + } else { + // results[4]= nValidCount1; + // results[5]= minDistance; + + } +// nPosY = validData1[minDisIndex].x /1000; +// nPosZ2 = validData1[minDisIndex].x /1000; +// nPosZ2 = midcount; + } + startFlag1 = 0; + nValidCount1 = 0; + } + } + } + nPosZ = ((nPosZ1 + nPosZ2) + nPosZ *2)/4; + +// nPosX = pCount1; +// nPosY = pCount2; + return iRet; +} + + diff --git a/KMini_CCT6/Src/SLP.c b/KMini_CCT6/Src/SLP.c index a1a2fb4..7a3b514 100644 --- a/KMini_CCT6/Src/SLP.c +++ b/KMini_CCT6/Src/SLP.c @@ -1,26 +1,8 @@ - #include "SLP.h" -void SLPSendPacket(char * buf, uchar len1); -uchar bSLPMaster; -uchar nStation; -uchar SLPinputB; -uchar SLPoutputB; -uchar nCurStation; -uchar inputBuf[5]; -uchar outputBuf[5]; +//void SLPSendPacket(char * buf, uchar len1); -uchar SendBuf[8]; - -uchar SLPMasterRecved; //主机收到子机回复 -unsigned int SLPSlaveCountOut; - -unsigned int SLPLostPkt=0; // 丢包数量 - -uchar SLPOKSign; -uchar SLPErrSign; - -uchar SLPBCC(char * pBuf, uchar len1) +uchar SLPBCC(unsigned char * pBuf, uchar len1) { uchar i; uchar BCC=0; @@ -31,99 +13,112 @@ return BCC; } -void SLPparsePacket(char * pRecvBuf, uchar len1) +void SLPInit(stSLPDef * pSLP, SLPSendPktDef pFunc1) +{ + pSLP->SLPLostPkt = 0; + pSLP->nCount = 0; + pSLP->SLPSendPktFunc = pFunc1; + +} + +void SLPSetCallBack(stSLPDef * pSLP, SLPSendPktDef pFunc1) +{ + pSLP->SLPSendPktFunc = pFunc1; +} + +void SLPparsePacket(stSLPDef * pSLP, unsigned char * pRecvBuf, uchar len1) { stSLPPacket * pPacket = (stSLPPacket *)pRecvBuf; if (len1 != sizeof(stSLPPacket)) return; // if (pPacket->ED != EDsign) return; if (pPacket->BCC != SLPBCC(pRecvBuf,len1-1)) return; - if (bSLPMaster) //master + if (pSLP->bSLPMaster) //master { if (pPacket->ST ==ST_S) { //check - if (pPacket->Dst == nCurStation) { - SLPMasterRecved=1; - SLPLostPkt=0; - inputBuf[nCurStation] = pPacket->Data; + if (pPacket->Dst == pSLP->nCurStation) { + pSLP->SLPMasterRecved=1; + pSLP->SLPLostPkt=0; + pSLP->inputBuf[pSLP->nCurStation] = pPacket->Data; } } // SLPoutputB = (inputBuf[1] &0x0f) | ((inputBuf[2] &0x0f) << 4); - SLPoutputB = inputBuf[1]; + pSLP->SLPoutputB = pSLP->inputBuf[1]; }else { //slave if (pPacket->ST==ST_M) { //check - stSLPPacket * pRplyPkt = (stSLPPacket *)SendBuf; - if (pPacket->Dst == nStation) { - SLPoutputB = pPacket->Data; - SLPSlaveCountOut=0; + stSLPPacket * pRplyPkt = (stSLPPacket *)pSLP->SendBuf; + if (pPacket->Dst == pSLP->nStation) { + pSLP->SLPoutputB = pPacket->Data; + pSLP->SLPSlaveCountOut=0; pRplyPkt->ST = ST_S; - pRplyPkt->Dst = nStation; - pRplyPkt->Data = SLPinputB; - pRplyPkt->BCC = SLPBCC(SendBuf, sizeof(stSLPPacket)-1); + pRplyPkt->Dst = pSLP->nStation; + pRplyPkt->Data = pSLP->SLPinputB; + pRplyPkt->BCC = SLPBCC(pSLP->SendBuf, sizeof(stSLPPacket)-1); // pRplyPkt->ED = EDsign; - SLPSendPacket(SendBuf,sizeof(stSLPPacket)); + pSLP->SLPSendPktFunc(pSLP->SendBuf,sizeof(stSLPPacket)); } } } } -void SLPMasterSendPacket(void) +void SLPMasterSendPacket(stSLPDef * pSLP) { - stSLPPacket * pReqPkt = (stSLPPacket *)SendBuf; - outputBuf[1]=SLPinputB ;//&0xf; + stSLPPacket * pReqPkt = (stSLPPacket *)pSLP->SendBuf; + pSLP->outputBuf[1]=pSLP->SLPinputB ;//&0xf; // outputBuf[2] = (SLPinputB & 0xf0) >> 4; pReqPkt->ST = ST_M; - pReqPkt->Dst = nCurStation; - pReqPkt->Data = outputBuf[nCurStation]; ; - pReqPkt->BCC = SLPBCC(SendBuf, sizeof(stSLPPacket)-1); + pReqPkt->Dst = pSLP->nCurStation; + pReqPkt->Data = pSLP->outputBuf[pSLP->nCurStation]; ; + pReqPkt->BCC = SLPBCC(pSLP->SendBuf, sizeof(stSLPPacket)-1); // pReqPkt->ED = EDsign; - SLPSendPacket(SendBuf,sizeof(stSLPPacket)); + pSLP->SLPSendPktFunc(pSLP->SendBuf,sizeof(stSLPPacket)); } -void SLPProcess(void) + +void SLPProcess(stSLPDef * pSLP) { - static int nCount =0; - if (bSLPMaster) //master + if (pSLP->bSLPMaster) //master { - if ( (nCount & 0x3f) == 0 ) + if ( (pSLP->nCount & 0x7f) == 0 ) { //time up - if (SLPMasterRecved) { + if (pSLP->SLPMasterRecved) { // SLPMasterRecved=0; - SLPOKSign = 1; - if (SLPErrSign) SLPErrSign--; + pSLP->SLPOKSign = 1; + if (pSLP->SLPErrSign) pSLP->SLPErrSign--; }else { - SLPLostPkt++; - if (SLPLostPkt > 10) { - SLPErrSign=20; - SLPOKSign = 0; + pSLP->SLPLostPkt++; + if (pSLP->SLPLostPkt > 10) { + pSLP->SLPErrSign=20; + pSLP->SLPOKSign = 0; } } - if (nStation >0) { - nCurStation++; - if (nCurStation > nStation) { - nCurStation =1; + if (pSLP->nStation >0) { + pSLP->nCurStation++; + if (pSLP->nCurStation > pSLP->nStation) { + pSLP->nCurStation =1; } - SLPMasterRecved=0; - SLPMasterSendPacket(); + pSLP->SLPMasterRecved=0; + SLPMasterSendPacket(pSLP); } } }else { - SLPSlaveCountOut ++; - if (SLPSlaveCountOut >200) // 20mS + pSLP->SLPSlaveCountOut ++; + if (pSLP->SLPSlaveCountOut >200) // 20mS { - SLPErrSign=100; + pSLP->SLPErrSign=100; }else { - if (SLPErrSign) SLPErrSign--; + if (pSLP->SLPErrSign) pSLP->SLPErrSign--; } } - nCount++; + pSLP->nCount++; } diff --git a/KMini_CCT6/Src/YDLidar.c b/KMini_CCT6/Src/YDLidar.c new file mode 100644 index 0000000..2a60e04 --- /dev/null +++ b/KMini_CCT6/Src/YDLidar.c @@ -0,0 +1,389 @@ +#include "YDLidar.h" + +int nPosX; +int nPosY; +int nPosZ; + +int nPosZ1,nPosZ2; + +int pCount1=0; +int pCount2=0; + +int dCount1=0; +int dCount2=0; + +int vCount1=0; +int vCount2=0; + + +void Uart3SendPacket(char * str, int len); +void Uart5SendPacket(char * str, int len); + +//正弦表,0 - 360 代表 0 - 2PI,结果0 - 1000 表示0 - 1,表中只有0 - PI/2即1/4周期的数据,其他的数据用对称和镜像得到。 +const int SinTable[] = +{ +0,17,35, 52, 70, 87, 105, 122, 139, 156, 174, 191, 208, 225, 242, 259, 276, 292, +309, 326, 342, 358, 375, 391, 407, 423, 438, 454, 469, 485, 500, 515, 530, 545, +559, 574, 588, 602, 616, 629, 643, 656, 669, 682, 695, 707, 719, 731, 743, 755, +766, 777, 788, 799, 809, 819, 829, 839, 848, 857, 866, 875, 883, 891, 899, 906, +914, 921, 927, 934, 940, 946, 951, 956, 961, 966, 970, 974, 978, 982, 985, 988, +990, 993, 995, 996, 998, 999, 999, 1000, 1000, +1000, 999, 999, 998, 996, 995, +993, 990, 988, 985, 982, 978, 974, 970, 966, 961, 956, 951, 946, 940, 934, 927, +921, 914, 906, 899, 891, 883, 875, 866, 857, 848, 839, 829, 819, 809, 799, 788, +777, 766, 755, 743, 731, 719, 707, 695, 682, 669, 656, 643, 629, 616, 602, 588, +574, 559, 545, 530, 515, 500, 485, 469, 454, 438, 423, 407, 391, 375, 358, 342, +326, 309, 292, 276, 259, 242, 225, 208, 191, 174, 156, 139, 122, 105, 87, 70, +52, 35, 17, 0, -17, -35, -52, -70, -87, -105, -122, -139, -156, -174, -191, +-208, -225, -242, -259, -276, -292, -309, -326, -342, -358, -375, -391, -407, +-423, -438, -454, -469, -485, -500, -515, -530, -545, -559, -574, -588, -602, +-616, -629, -643, -656, -669, -682, -695, -707, -719, -731, -743, -755, -766, +-777, -788, -799, -809, -819, -829, -839, -848, -857, -866, -875, -883, -891, +-899, -906, -914, -921, -927, -934, -940, -946, -951, -956, -961, -966, -970, +-974, -978, -982, -985, -988, -990, -993, -995, -996, -998, -999, -999, -1000, +-1000, -1000, -999, -999, -998, -996, -995, -993, -990, -988, -985, -982, -978, +-974, -970, -966, -961, -956, -951, -946, -940, -934, -927, -921, -914, -906, +-899, -891, -883, -875, -866, -857, -848, -839, -829, -819, -809, -799, -788, +-777, -766, -755, -743, -731, -719, -707, -695, -682, -669, -656, -643, -629, +-616, -602, -588, -574, -559, -545, -530, -515, -500, -485, -469, -454, -438, +-423, -407, -391, -375, -358, -342, -326, -309, -292, -276, -259, -242, -225, +-208, -191, -174, -156, -139, -122, -105, -87, -70, -52, -35, -17 +}; +const int CosTable[] = +{ + 1000 ,999 ,999 ,998 ,996 ,995 ,993 ,990 ,988 ,985 ,982 ,978 ,974 ,970 ,966 ,961 +,956 ,951 ,946 ,940 ,934 ,927 ,921 ,914 ,906 ,899 ,891 ,883 ,875 ,866 ,857 ,848 +,839 ,829 ,819 ,809 ,799 ,788 ,777 ,766 ,755 ,743 ,731 ,719 ,707 ,695 ,682 ,669 +,656 ,643 ,629 ,616 ,602 ,588 ,574 ,559 ,545 ,530 ,515 ,500 ,485 ,469 ,454 ,438 +,423 ,407 ,391 ,375 ,358 ,342 ,326 ,309 ,292 ,276 ,259 ,242 ,225 ,208 ,191 ,174 +,156 ,139 ,122 ,105 ,87 ,70 ,52 ,35 ,17 ,0 ,-17 ,-35 ,-52 ,-70 ,-87 ,-105 ,-122 +,-139 ,-156 ,-174 ,-191 ,-208 ,-225 ,-242 ,-259 ,-276 ,-292 ,-309 ,-326 ,-342 +,-358 ,-375 ,-391 ,-407 ,-423 ,-438 ,-454 ,-469 ,-485 ,-500 ,-515 ,-530 ,-545 +,-559 ,-574 ,-588 ,-602 ,-616 ,-629 ,-643 ,-656 ,-669 ,-682 ,-695 ,-707 ,-719 +,-731 ,-743 ,-755 ,-766 ,-777 ,-788 ,-799 ,-809 ,-819 ,-829 ,-839 ,-848 ,-857 +,-866 ,-875 ,-883 ,-891 ,-899 ,-906 ,-914 ,-921 ,-927 ,-934 ,-940 ,-946 ,-951 +,-956 ,-961 ,-966 ,-970 ,-974 ,-978 ,-982 ,-985 ,-988 ,-990 ,-993 ,-995 ,-996 +,-998 ,-999 ,-999 ,-1000 ,-1000 ,-1000 ,-999 ,-999 ,-998 ,-996 ,-995 ,-993 ,-990 +,-988 ,-985 ,-982 ,-978 ,-974 ,-970 ,-966 ,-961 ,-956 ,-951 ,-946 ,-940 ,-934 +,-927 ,-921 ,-914 ,-906 ,-899 ,-891 ,-883 ,-875 ,-866 ,-857 ,-848 ,-839 ,-829 +,-819 ,-809 ,-799 ,-788 ,-777 ,-766 ,-755 ,-743 ,-731 ,-719 ,-707 ,-695 ,-682 +,-669 ,-656 ,-643 ,-629 ,-616 ,-602 ,-588 ,-574 ,-559 ,-545 ,-530 ,-515 ,-500 +,-485 ,-469 ,-454 ,-438 ,-423 ,-407 ,-391 ,-375 ,-358 ,-342 ,-326 ,-309 ,-292 +,-276 ,-259 ,-242 ,-225 ,-208 ,-191 ,-174 ,-156 ,-139 ,-122 ,-105 ,-87 ,-70 ,-52 +,-35 ,-17 ,0 ,17 ,35 ,52 ,70 ,87 ,105 ,122 ,139 ,156 ,174 ,191 ,208 ,225 ,242 +,259 ,276 ,292 ,309 ,326 ,342 ,358 ,375 ,391 ,407 ,423 ,438 ,454 ,469 ,485 ,500 +,515 ,530 ,545 ,559 ,574 ,588 ,602 ,616 ,629 ,643 ,656 ,669 ,682 ,695 ,707 ,719 +,731 ,743 ,755 ,766 ,777 ,788 ,799 ,809 ,819 ,829 ,839 ,848 ,857 ,866 ,875 ,883 +,891 ,899 ,906 ,914 ,921 ,927 ,934 ,940 ,946 ,951 ,956 ,961 ,966 ,970 ,974 ,978 +,982 ,985 ,988 ,990 ,993 ,995 ,996 ,998 ,999 ,999 ,1000 ,1000 +}; + + +const unsigned char sintab[256]={ //正弦表,0 - 1024代表 0 - 2PI,结果0 - 255表示0 - 1,表中只有0 - PI/2即1/4周期的数据,其他的数据用对称和镜像得到。 + 0, 1, 3, 4, 6, 7, 9, 10, 12, 14, 15, 17, 18, 20, 21, 23, 25, 26, 28, 29, 31, 32, 34, 36, 37, 39, 40, 42, 43, 45, 46, + 48, 49, 51, 53, 54, 56, 57, 59, 60, 62, 63, 65, 66, 68, 69, 71, 72, 74, 75, 77, 78, 80, 81, 83, 84, 86, 87, 89, 90, + 92, 93, 95, 96, 97, 99, 100, 102, 103, 105, 106, 108, 109, 110, 112, 113, 115, 116, 117, 119, 120, 122, 123, 124, + 126, 127, 128, 130, 131, 132, 134, 135, 136, 138, 139, 140, 142, 143, 144, 146, 147, 148, 149, 151, 152, 153, 155, + 156, 157, 158, 159, 161, 162, 163, 164, 166, 167, 168, 169, 170, 171, 173, 174, 175, 176, 177, 178, 179, 181, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 211, 212, 213, 214, 215, 216, 217, 217, 218, 219, 220, 221, 221, 222, 223, + 224, 225, 225, 226, 227, 227, 228, 229, 230, 230, 231, 232, 232, 233, 234, 234, 235, 235, 236, 237, 237, 238, + 238, 239, 239, 240, 241, 241, 242, 242, 243, 243, 244, 244, 244, 245, 245, 246, 246, 247, 247, 247, 248, 248, + 249, 249, 249, 250, 250, 250, 251, 251, 251, 251, 252, 252, 252, 252, 253, 253, 253, 253, 254, 254, 254, 254, + 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,// 255 +}; + + + + +char StartCMD[2] = { 0xA5,0x60 }; +char StopCMD[2] = { 0xA5,0x65 }; + + +int StartAngle; +int EndAngle; + +int YdLidarStart(int nIdx) +{ + if (nIdx == 0 || nIdx == -1 ) { + Uart3SendPacket(StartCMD,sizeof(StartCMD)); + } + if (nIdx == 1 || nIdx == -1) { + Uart5SendPacket(StartCMD,sizeof(StartCMD)); + } + return 0; +}; + + +int YdLidarStop(int nIdx){ + if (nIdx == 0 || nIdx == -1 ) { + Uart3SendPacket(StopCMD,sizeof(StopCMD)); + } + if (nIdx == 1 || nIdx == -1) { + Uart5SendPacket(StopCMD,sizeof(StopCMD)); + } + return 0; +}; + +char startFlag0 = 0; +char startFlag1 = 0; + +#define VALID_DATA_MAX 200 +stLidarDot validData0[200]; +stLidarDot validData1[200]; + +int nValidCount0 = 0; +int nValidCount1 = 0; + +#define SUB_DEGREE 64 + +#define START_DEGREE 135 +#define END_DEGREE 225 + +#define MAX_DISTANCE 500 //mm + +//整数求SIN值,带线性插值功能, 输入0 - 360*64 为 0 - 2PI,一个周期;输出-1000 至 +1000,代表-1到+1; +int sini(int a) +{ + + a = a % (360 * SUB_DEGREE); + int b; + b=a / SUB_DEGREE; + int xx = a % SUB_DEGREE; + if (b< 90 ) + { + int d1= SinTable[b ]; + int d2 =SinTable[b+1 ]; + int d; + d = ((SUB_DEGREE-xx) * d1 + xx * d2 ) / SUB_DEGREE; + + return (d); + } + else if (b<180 ) + { + int c; + c=180-b; + + int d1= SinTable[c ]; + int d2 =SinTable[c-1 ]; + int d; + d = ((SUB_DEGREE-xx) * d1 + xx * d2 ) / SUB_DEGREE; + + return (d); + } + + else if (b<270) + { + int c; + c=b-180; + int d1= SinTable[c ]; + int d2 =SinTable[c+1 ]; + int d; + d = ((SUB_DEGREE-xx) * d1 + xx * d2 ) / SUB_DEGREE; + + return (-d); + } + else + { + int c; + c=360 -b; + int d1= SinTable[c ]; + int d2 =SinTable[c-1 ]; + int d; + d = ((SUB_DEGREE-xx) * d1 + xx * d2 ) / SUB_DEGREE; + + return (-d); + } + +// return a; +} + +int cosi(int a) +{ + return sini(a+90*SUB_DEGREE); +} + +int YdLidarParsePkt(int nLidarIdx, stLidarDotsPkt * pLindarPkt, int len1) +{ + int iRet = 0; + if (pLindarPkt->StSign != 0x55AA) return 0; // check for start sign + if ((pLindarPkt->CT & 0x01) != 0x00) return 0; // check for CT bit0. + if (pLindarPkt->LSN<2) return 0; + + int startAngle = (pLindarPkt->FSA >> 1); // degree * 64; + int endAngle = (pLindarPkt->LSA >> 1); // degree * 64; + if (startAngle >= endAngle)return 0; + int nCount = pLindarPkt->LSN; + int diffAngle = (endAngle - startAngle); + int eachAngle = diffAngle / (nCount - 1); + + if (nLidarIdx == 0) + { + pCount1++; + for (int i = 0;i < nCount && i < 40 ;i++) + { + float intensity = pLindarPkt->LidarDotDatas[i].intensity; + int angle = eachAngle * i + startAngle; // degree * 64 + dCount1++; + + if (angle < START_DEGREE * SUB_DEGREE ) startFlag0 = 1; + if (angle > START_DEGREE * SUB_DEGREE && angle < END_DEGREE * SUB_DEGREE) // &&x>100000&&x<250000) + { + int value = (pLindarPkt->LidarDotDatas[i].s2 << 6) + (pLindarPkt->LidarDotDatas[i].s1 >> 2); // distance + + int x = value * sini(angle - 90 * SUB_DEGREE ); // uM + int y = value * cosi(angle - 90 * SUB_DEGREE ); // uM + + //vectorX.push_back(x); + //vectorY.push_back(y); + validData0[nValidCount0].distance = value; + validData0[nValidCount0].x = x; + validData0[nValidCount0].y = y; + if (nValidCount0 < 200 - 1 ) nValidCount0 ++; + vCount1++; + } + + if (angle > END_DEGREE * SUB_DEGREE) + { + if (startFlag0 == 1 && nValidCount0 > 0) + { + + int min = 1000000, max = -1000000; + int minX = 1000000; + for (int i = 0;i < nValidCount0;i++) + { + if (validData0[i].distance < 5000) continue; + + if (validData0[i].y > 0) + { + if (validData0[i].y < min) + min = validData0[i].y; + } + if (validData0[i].y < 0) + { + if (validData0[i].y > max) + max = validData0[i].y; + } + } + float avg=0; + for (int i = 0;i < nValidCount0;i++) + { + if (validData0[i].x < minX) + { + minX = validData0[i].x; + } + } + if (min != 0 && max != 0) + { + avg = (min + max) / 2000; + } + + nPosX = avg; + nPosZ1 = minX/1000; + } + startFlag0 = 0; + nValidCount0 = 0; + } + } + } + + if (nLidarIdx == 1) + { + pCount2++; + for (int i = 0;i < nCount && i < 40 ;i++) + { + float intensity = pLindarPkt->LidarDotDatas[i].intensity; + int angle = eachAngle * i + startAngle; + + dCount2++; + + if (angle < START_DEGREE * SUB_DEGREE) startFlag1 = 1; + if (angle > START_DEGREE * SUB_DEGREE && angle < END_DEGREE * SUB_DEGREE ) // &&x>100000&&x<250000) + { + int value = (pLindarPkt->LidarDotDatas[i].s2 << 6) + (pLindarPkt->LidarDotDatas[i].s1 >> 2); + + int x = value * sini(angle - 90 * SUB_DEGREE ); // uM + int y = value * cosi(angle - 90 * SUB_DEGREE ); // uM //vectorX.push_back(x); + //vectorY.push_back(y); + validData1[nValidCount1].distance = value; + validData1[nValidCount1].x = x; + validData1[nValidCount1].y = y; + nValidCount1 ++; + vCount2 ++; + } + + if (angle > END_DEGREE * SUB_DEGREE) + { + if (startFlag1 == 1 && nValidCount1 > 0 ) + { + int minDisIndex = 0; + int minDistance = 99999999; + + int min = 1000000, max = -1000000; + int minX = 1000000; + for (int i = 0;i < nValidCount1;i++) + { + if (validData1[i].distance < 30) continue; // skip too small points; + + if (validData1[i].distance < minDistance) { + minDisIndex = i; + minDistance = validData1[i].distance; + } + + if (validData1[i].x < minX) + { + minX = validData1[i].x; + } + + if (validData1[i].y > 0) + { + if (validData1[i].y < min) + min = validData1[i].y; + } + if (validData1[i].y < 0) + { + if (validData1[i].y > max) + max = validData1[i].y; + } + + } + int avg=0; + int leftcount = 0; + int midcount = 0; + int rightcount =0; + for (int i = 0;i < nValidCount1;i++) + { + if (validData1[i].distance < 30) continue; // skip too small points; + // 找中间空洞; + if (validData1[i].x > minX + 50000) { + // points, 50mm higher that minX; + if (leftcount>5 && rightcount <5) midcount++; + + continue; //skip + }else { + if (midcount ==0) {leftcount++;} + else {rightcount++;} + } + } + if (min != 0 && max != 0) + { + avg = (min + max) / 2000; + } + + nPosY = avg; + nPosZ1 = minX/1000; + nPosY = validData1[minDisIndex].y /1000; +// nPosZ2 = validData1[minDisIndex].x /1000; + nPosZ2 = midcount; + } + startFlag1 = 0; + nValidCount1 = 0; + } + } + } + nPosZ = (nPosZ1 + nPosZ2) /2; + + return iRet; +} + + diff --git a/KMini_CCT6/Src/functions.c b/KMini_CCT6/Src/functions.c index c9a13d1..e865344 100644 --- a/KMini_CCT6/Src/functions.c +++ b/KMini_CCT6/Src/functions.c @@ -13,15 +13,22 @@ #endif extern __IO uint32_t uwTick; -unsigned char Uart5RxBuf[RX5BUFSIZE]; -unsigned char Uart5TxBuf[TX5BUFSIZE]; +unsigned char Uart3RxBuf[UART3RXBUFSIZE]; +unsigned char Uart3TxBuf[UART3TXBUFSIZE]; +stUartStat Uart3Stat={0}; +unsigned int Uart3RecvBuf1DataLen =0; +unsigned int Uart3ToSendLen =0 ; +unsigned int Uart3SentLen = 0; + +unsigned char Uart5RxBuf[UART5RXBUFSIZE]; +unsigned char Uart5TxBuf[UART5TXBUFSIZE]; stUartStat Uart5Stat={0}; unsigned int Uart5RecvBuf1DataLen =0; unsigned int Uart5ToSendLen =0 ; unsigned int Uart5SentLen = 0; -unsigned char Uart6RxBuf[RX6BUFSIZE]; -unsigned char Uart6TxBuf[TX6BUFSIZE]; +unsigned char Uart6RxBuf[UART6RXBUFSIZE]; +unsigned char Uart6TxBuf[UART6TXBUFSIZE]; stUartStat Uart6Stat={0}; unsigned int Uart6RecvBuf1DataLen =0; unsigned int Uart6ToSendLen =0 ; @@ -312,25 +319,6 @@ SCB->ICSR=SCB_ICSR_PENDSVSET_Msk; //1<<SCB_ICSR_PENDSVSET_Pos; } -void PendSvCallBack() -{ -#if (BOARD_TYPE == 14) -///* - if (bSPI1RecvDone) - { - bSPI1RecvDone=0; - ParseFP0Pkg(SPI1RecvBuf,nSPI1RecvLenInBuf); - } -//*/ -#endif - if (Uart2Stat.bPacketRecved) - { - KBusParsePacket(2, (pKBPacket)Uart2RecvBuf1, Uart2RecvBuf1DataLen); - Uart2RecvBuf1DataLen=0; - Uart2Stat.bPacketRecved=0; - Uart2RecvDMA(Uart2RecvBuf1,sizeof(Uart2RecvBuf1)); - } -} void SPI1_IRQ_CallBack() { @@ -359,7 +347,6 @@ bSPI1RecvDone=1; nSPI1RecvPos=0; bSPI1Recving=0; - TriggerPendSV(); } @@ -426,6 +413,33 @@ // ParsePacket((pKBPacket)Uart2RecvBuf1,Uart2RecvBuf1DataLen); } +void Uart3SendDone() +{ +// Uart1Stat.TcCount++; + return; +} + +void Uart3RecvDone() +{ +// Uart3Stat.IdelCount++; +// NVIC_SetPendingIRQ(PendSV_IRQn); +// SCB->ICSR=SCB_ICSR_PENDSVSET_Msk; //1<<SCB_ICSR_PENDSVSET_Pos; + + if (Uart3RecvBuf1DataLen >0) + { + Uart3Stat.bPacketRecved=1; +// SCB->ICSR=SCB_ICSR_PENDSVSET_Msk; //1<<SCB_ICSR_PENDSVSET_Pos; +// KLParsePacket(Uart1RecvBuf1,Uart1RecvBuf1DataLen); +// Uart1RecvBuf1DataLen=0; + } +} +void Uart3SendPacket(char * str, int len) +{ + memcpy(Uart3TxBuf,str,len); + Uart3ToSendLen = len; + LL_USART_EnableIT_TXE(USART3); +} + void Uart5SendDone() { // Uart1Stat.TcCount++; @@ -474,7 +488,7 @@ // Uart1RecvBuf1DataLen=0; } } -void Uart6SendPacket(char * str, int len) +void Uart6SendPacket(unsigned char * str, int len) { memcpy(Uart6TxBuf,str,len); Uart6ToSendLen = len; @@ -482,7 +496,7 @@ LL_USART_EnableIT_TXE(USART6); } -void SLPSendPacket(char * str, uchar len) +void SLPSendPacket(void * str, uchar len) { Uart6SendPacket(str,len); } diff --git a/KMini_CCT6/Src/main.c b/KMini_CCT6/Src/main.c index 83de8a7..a767153 100644 --- a/KMini_CCT6/Src/main.c +++ b/KMini_CCT6/Src/main.c @@ -56,13 +56,15 @@ #include "../src/Ethernet/socket.h" #include "../src/Ethernet/loopback.h" #elif (BOARD_TYPE == 14) -#include "FP0.h" +#include "FPx.h" #elif (BOARD_TYPE == 15 || BOARD_TYPE == 16) #include "KWireless.h" //#include "user.h" //#include "../src/radio/inc/sx126x-board.h" #endif #include "SLP.h" +//#include "YDLidar.h" +#include "OrdLidar.h" /* USER CODE END Includes */ @@ -75,8 +77,8 @@ #define TX2BUFSIZE 64 -unsigned char Uart1RxBuf[128]; -unsigned char Uart1TxBuf[260]; +unsigned char Uart1RxBuf[RX1BUFSIZE]; +unsigned char Uart1TxBuf[TX1BUFSIZE]; unsigned char Uart2RxBuf[RX2BUFSIZE]; unsigned char Uart2TxBuf[TX2BUFSIZE]; @@ -85,10 +87,20 @@ unsigned char FastFlicker=0; unsigned int Uart1IdelTimer = 0; +#if (ENABLE_PLC) stBinProg1 * pProgs = (stBinProg1 *)STORE_PRG_BASE; +#endif uint32_t us1,us2,us3,us4,us5,us6; +stKBusDef KBus1; // + +extern stDeviceInfo MyDeviceInfo; + +unsigned char bSLPMaster =1; +unsigned char nSLPStation = 1; + +stSLPDef SLP1; /* USER CODE END PV */ /* Private function prototypes -----------------------------------------------*/ @@ -120,7 +132,7 @@ static int Count=0; CurTickuS += 100; nCurTick++; - nSlaveTick++; + KBus1.nSlaveTick++; Count++; if (Count>=10000) { @@ -134,6 +146,71 @@ return; } +void PendSvCallBack() +{ +#if (BOARD_TYPE == 14) +///* + if (bSPI1RecvDone) + { + bSPI1RecvDone=0; + FPxParsePkt(SPI1RecvBuf,nSPI1RecvLenInBuf); + } +//*/ +#endif + if (Uart2Stat.bPacketRecved) + { + KBusParsePacket(&KBus1, (pKBPacket)Uart2RecvBuf1, Uart2RecvBuf1DataLen); + Uart2RecvBuf1DataLen=0; + Uart2Stat.bPacketRecved=0; + Uart2RecvDMA(Uart2RecvBuf1,sizeof(Uart2RecvBuf1)); + } +} + +void * KBusEvCallBackFunc(void * pParam, int nEvent, void *pBuf, int nLen1) +{ + switch (nEvent){ + + case KBusEvNone: + break; + case KBusEvCreate: + break; + case KBusEvConnected: + break; + case KBusEvDisConnected: + break; + case KBusEvClosed: + break; + case KBusEvStateChange: + break; + case KBusEvTimeSync: + break; + case KBusEvDataUpdate: + KMem.WY[0]=KBusMem.WLY[0]; //KBus Slave + KBusMem.WLX[0]=KMem.WX[0]; + KBusMem.WLX[1]=KMem.WX[1]; + KBusMem.WLX[2]=KMem.WX[2]; + KBusMem.WLX[3]=KMem.WX[3]; + break; + case KBusEvCmdResponse: + break; + + default: + break; + } + return 0; +} + +//#define RAM_START_ADDR 0x20000000 // SRAM_BASE +#define VECTOR_SIZE 46 +#define ApplicationAddress 0x08001000 //搴旂敤绋嬪簭棣栧湴鍧�瀹氫箟 +/* +static void RemapIrqVector(void) +{ + memcpy((void*)RAM_START_ADDR, (void *)ApplicationAddress, VECTOR_SIZE * 4); + LL_APB1_GRP2_EnableClock(LL_APB1_GRP2_PERIPH_SYSCFG); + LL_SYSCFG_SetRemapMemory(LL_SYSCFG_REMAP_SRAM); +} +*/ /* USER CODE END 0 */ /** @@ -144,6 +221,9 @@ int main(void) { /* USER CODE BEGIN 1 */ +// RemapIrqVector(); + __set_PRIMASK(0); //鎵撳紑鍏ㄥ眬涓柇 + KMRunStat.bLEDFlick = 1; InitUartstat(&Uart1Stat,Uart1RxBuf,sizeof(Uart1RxBuf),Uart1TxBuf,sizeof(Uart1TxBuf)); @@ -157,21 +237,6 @@ /* USER CODE BEGIN Init */ - for (int i=0;i<9;i++) - { -// memset(KBusChnStats[i],0,0); - KBusChnStats[i].SendPackets=0; - KBusChnStats[i].RecvPackets=0; - KBusChnStats[i].LostPackets=0; - KBusChnStats[i].CtnLstPkts=0; - KBusChnStats[i].MaxCtnLstPkts=0; - KBusChnStats[i].NotPkgErr=0; - KBusChnStats[i].PkgLenErr=0; - KBusChnStats[i].TimeOutErr=0; - KBusChnStats[i].BCCErr=0; - KBusChnStats[i].Delay=0; - KBusChnStats[i].MaxDelay=0; - } KMem.LastScanTime=0; KMem.ScanTimeuS=0; @@ -202,35 +267,42 @@ /* Initialize all configured peripherals */ MX_GPIO_Init(); - LL_GPIO_InitTypeDef GPIO_InitStruct; - GPIO_InitStruct.Mode = LL_GPIO_MODE_OUTPUT; - GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_HIGH; - GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_PUSHPULL; - GPIO_InitStruct.Pull = LL_GPIO_PULL_NO; - LL_GPIO_Init(GPIOB, &GPIO_InitStruct); - MX_DMA_Init(); KMachineInit(); ReadSysCfgFromFlash(&storedKMSysCfg); KMRunStat.bLEDFlick = 1; - + int bKBusMaster,bKBusSlave,bKBusRepeater;; + int nKBusStationId; + int nKBusChilds; KMem.CurJumperSW=ReadJumperSW(); KMem.EffJumperSW=KMem.CurJumperSW; + nKBusStationId=KMem.EffJumperSW&0x0f; + + nKBusChilds = nKBusStationId; bSLPMaster = 1; // KMem.EffJumperSW&0x20 ; //master? - nStation = 1; - + nSLPStation = 1; + SLP1.bSLPMaster = 1; + SLP1.nStation = 1; + SLPInit(&SLP1,Uart6SendPacket); // Uart2Baud = AlterUart2Baud; + + #if (BOARD_TYPE == 14) KMem.EffJumperSW|=0x10; - nStationID=KMem.EffJumperSW&0x0f; + int nKBusChilds=KMem.EffJumperSW&0x0f; if ((KMem.EffJumperSW&0x10)!=0) {bKBusMaster=1;bKBusSlave=0;} else{bKBusMaster=0;bKBusSlave=1;} - nChilds=nStationID; - FP0_Init(); + + FPxSetCallBackFunc(&FPxCallBackFunc); + FPx_Init(nKBusChilds); + + int IOByteCount = nKBusChilds; + FPx_SetIOCount(IOByteCount,IOByteCount); + #elif (BOARD_TYPE == 15 || BOARD_TYPE == 16) nStationID=1 ;//KMem.EffJumperSW&0x0f; @@ -239,20 +311,34 @@ // else {bKBusMaster=0;bKBusSlave=1;} #else - nStationID=KMem.EffJumperSW&0x0f; - if (KMem.EffJumperSW == 0x1f) {bKBusRepeater=1;bKBusMaster=1;bKBusSlave=0;} - else if ((KMem.EffJumperSW&0x10)!=0) {bKBusMaster=1;bKBusSlave=0;} + nKBusStationId=KMem.EffJumperSW&0x0f; + if (KMem.EffJumperSW == 0x3f) {bKBusRepeater=1;bKBusMaster=1;bKBusSlave=0;} + else if ((KMem.EffJumperSW&0x20)!=0) {bKBusMaster=1;bKBusSlave=0;} else{bKBusMaster=0;bKBusSlave=1;} #endif - nChilds=nStationID; - nCurPollId=1; + + if (bKBusMaster) { + KBusInitMaster(&KBus1, (KBusSendPktFuncDef)PutStr2, nKBusChilds); + + } else if (bKBusSlave) { + KBusInitSlave(&KBus1, (KBusSendPktFuncDef)PutStr2, nKBusStationId,&MyDeviceInfo); + } + + KBusSetEvCallBackFunc(&KBus1, &KBusEvCallBackFunc); + //if (KMem.EffJumperSW == 0x00) Uart1Baud = DefaultUart1Baud; MX_USART1_UART_Init(); MX_USART2_UART_Init(); -// MX_USART5_UART_Init(); -// LL_USART_EnableIT_RXNE(USART5); -// LL_USART_EnableIT_IDLE(USART5); + + MX_USART3_UART_Init(); + + LL_USART_EnableIT_RXNE(USART3); + LL_USART_EnableIT_IDLE(USART3); + + MX_USART5_UART_Init(); + LL_USART_EnableIT_RXNE(USART5); + LL_USART_EnableIT_IDLE(USART5); MX_USART6_UART_Init(); LL_USART_EnableIT_RXNE(USART6); @@ -334,18 +420,21 @@ KMRunStat.WorkMode2=0; KMRunStat.WorkMode = storedKMSysCfg.theKMSysCfg.workmode; - +#if (ENABLE_PLC) if (KMRunStat.WorkMode == 1){ InitPLC(); KMRunStat.WorkMode2 = KMem.CurJumperSW&0x20 ; if (KMRunStat.WorkMode2) { StartPLC(); } } - KMem.WX[7]=0x5a; +#endif + #if (BOARD_TYPE == 15 || BOARD_TYPE == 16) KWireLessInit(KMem.EffJumperSW&0x20,KMem.EffJumperSW&0x0f); KWireLessStart(); #endif + + OrdLidarStart(-1); while (1) { @@ -360,14 +449,14 @@ int haltick=HAL_GetTick(); int thisJumperSW=ReadJumperSW(); - +#if (ENABLE_PLC) if (KMRunStat.WorkMode&1){ if (thisJumperSW&0x20 && !(KMem.CurJumperSW&0x20)) // Run 寮�鍏� 姝� 璺冲彉銆� {StartPLC();} if (!(thisJumperSW&0x20) && (KMem.CurJumperSW&0x20)) // Run 寮�鍏� 璐� 璺冲彉銆� {StopPLC();} } - +#endif KMem.CurJumperSW=thisJumperSW; KMem.haltick=haltick; // KMem.TotalRunTime=TotalRunTime; @@ -387,21 +476,12 @@ a = LL_GPIO_ReadInputPort(GPIOD); KMem.WDT[123]=a; -#if (BOARD_TYPE == 14) -// KMem.WX[0]= GetInput(); - FP0_Proc(); -#else + KMem.WXB[0]= GetInput(); -#endif - if (GetBoardType() == 7 || GetBoardType() ==8 - || GetBoardType() == 9 || GetBoardType() ==10 || GetBoardType() ==15 || GetBoardType() ==16) - { - displayInput(KMem.WX[0]); - } us2=GetuS(); if (PowerDownEvent) { KMem.WX[0]=0;} -///* +// /* if ((KMem.nRunCount &0x1f) == 0x02) { ADCProcess(); @@ -424,16 +504,10 @@ } } } -//*/ - -#if (BOARD_TYPE == 15 || BOARD_TYPE == 16) - Radio.IrqProcess( ); // Process Radio IRQ - KWL_Process(1); - -#endif +// */ // pProgs = (stBinProg1 *) STORE_PRG_BASE; - +#if (ENABLE_PLC) if ( KMRunStat.WorkMode==1 ) //&& bKBusMaster) { if (KMRunStat.nBinProgBank == 0){ @@ -446,7 +520,8 @@ ProcessPLCBinProg(pProgs, nSizeProg1); } - +#endif + KMem.ScanTimeuS=us2-KMem.LastScanTime; KMem.LastScanTime = us2; if (KMem.ScanTimeuS < KMem.MinScanTimeuS) {KMem.MinScanTimeuS = KMem.ScanTimeuS;} @@ -458,21 +533,7 @@ if (bKBusMaster) { -#if (BOARD_TYPE == 14) - for (int i=0;i<nOutputBytes;i++) - {BufferOut[i+1]=KMem.WYB[i];} -#else -// BufferOut[1]=KMem.WX[0]&0xff; -// BufferOut[2]=(KMem.WX[0]>>8)&0xff; -#endif - if (nChilds>0) { KBusMasterFunc(2); } - -#if (BOARD_TYPE == 14) -// KMem.WX[0]=BufferIn[1]+(BufferIn[2]<<8); -#else -// KMem.WY[0]=BufferIn[1]+(BufferIn[2]<<8); -#endif - + KBusLoopProcess(&KBus1); } if (haltick&0x00002000) SlowFlicker=1; else SlowFlicker=0; @@ -481,26 +542,23 @@ if (bKBusSlave) { -// BufferOut[0]=KMem.WX[0]; -#if (BOARD_TYPE == 15 || BOARD_TYPE == 16) -// KBusSlaveFunc(2); - // if (! KMem.RunStat) {BufferIn[0]=0;} - // KMem.WY[0]=BufferIn[0]; -#else - KBusSlaveFunc(2); - if (! KMem.RunStat) {BufferIn[0]=0;} - KMem.WLY[0]=BufferIn[0]; -#endif - if (nSlaveTick&0x00002000) SlowFlicker=1; + + KBusLoopProcess(&KBus1); + // if (! KBus1.RunStat) {KBusMem.WLY[0]=0;} + KMem.WLY[0]=KBusMem.WLY[0]; + + if (KBus1.nSlaveTick&0x00002000) SlowFlicker=1; else SlowFlicker=0; - if (nSlaveTick&0x00000800) FastFlicker=1; + if (KBus1.nSlaveTick&0x00000800) FastFlicker=1; else FastFlicker=0; } - -// KMem.WY[0]=nCount2>>5; - if (KMem.RunStat) {KMem.RunStat--;} - if (KMem.ErrStat) {KMem.ErrStat--;} + KBusMem.WLX[0]=KMem.WX[0]; + KMem.WY[0]=KBusMem.WLY[0]; + KBusMem.WLX[1]=KMem.WX[1]; + KBusMem.WLX[2]=KMem.WX[2]; + KBusMem.WLX[3]=KMem.WX[3]; + if (KMRunStat.bLEDFlick) { @@ -512,14 +570,18 @@ } else { +#if (ENABLE_PLC) if (KMRunStat.WorkMode==1 ) { if (PLCMem.bPLCRunning){SetRunLed(SlowFlicker);} else {SetRunLed(0);} } - else { + else +#endif + { if (!KMem.RunStat) SetRunLed(SlowFlicker); else SetRunLed(FastFlicker); } + KMem.ErrStat = KBus1.ErrStat + SLP1.SLPErrSign; if (!KMem.ErrStat) { SetErrLed(0); @@ -541,21 +603,6 @@ us4=GetuS(); // EffJumperSW = GetInput(20)&0xff; -#if (BOARD_TYPE == 15 || BOARD_TYPE == 16) - - if ((KMem.EffJumperSW&0x10)==0x10) { - KMem.WFY[1]=KMem.WLY[0]; - KMem.WLX[0]=KMem.WFX[1]; - }else - { - KMem.WFY[1]=KMem.WX[0]; - KMem.WY[0]=KMem.WFX[1]; - } -// KMem.WY[0]=KMem.WLY[0]; -#else - KMem.WLX[0]=KMem.WX[0]; - KMem.WY[0]=KMem.WLY[0]; -#endif us5=GetuS(); @@ -577,16 +624,16 @@ // memcpy(&KMem.SDT[64+nSize/2],&KBusChnStats[2],nSize); // for (int i=0;i<128;i++) { SDT[i]=i; } // SDT[48]=55; - if (Uart1RecvBuf1DataLen >0 && Uart1Stat.bPacketRecved) + if (Uart1Stat.bPacketRecved && Uart1RecvBuf1DataLen >0) { int res1 = -1; - res1 = ModBusSlaveParsePkg(1, Uart1RecvBuf1, Uart1RecvBuf1DataLen); - if (res1 !=0) - { - KLParsePacket(1, Uart1RecvBuf1, Uart1RecvBuf1DataLen); + if (Uart1RecvBuf1[0] == KLSignStart) { + res1 = KLParsePacket(1, Uart1RecvBuf1, Uart1RecvBuf1DataLen); + }else { + res1 = ModBusSlaveParsePkg(1, Uart1RecvBuf1, Uart1RecvBuf1DataLen); } - Uart1RecvBuf1DataLen=0; Uart1Stat.bPacketRecved=0; + Uart1RecvBuf1DataLen=0; Uart1IdelTimer = 0; }else { if (Uart1IdelTimer>600000) { // 瓒呰繃60绉掓病鏈夋暟鎹紶杈擄紝閲嶆柊杩涘叆鑷�傚簲娉㈢壒鐜囩姸鎬� @@ -599,87 +646,67 @@ if (bKBusSlave) HAL_Delay(0); if (Uart6Stat.bPacketRecved){ - SLPparsePacket(Uart6RxBuf,Uart6RecvBuf1DataLen); + SLPparsePacket(&SLP1,Uart6RxBuf,Uart6RecvBuf1DataLen); Uart6RecvBuf1DataLen =0; Uart6Stat.bPacketRecved = 0; } - - SLPinputB = KMem.WYB[1]; - SLPProcess(); - KMem.WXB[1] = SLPoutputB; - -/* - if ((KMem.nRunCount&0x7f)==1) { - - SLPSendPacket("ABCDEF",6); - - }; -*/ - - /* - if (!IsEmpty(&Uart1Stat.QRx)) - { - unsigned char k=PopOne(&Uart1Stat.QRx); - if (k=='L') - { - clearscreen(); - } - } -*/ -#if (BOARD_TYPE == 14) -// PutOutput (KMem.WY[0]); -#else - PutOutput (KMem.WY[0]); + SLP1.SLPinputB = KMem.WYB[1]; + SLPProcess(&SLP1); + KMem.WXB[1] = SLP1.SLPoutputB; -#endif + // YDLiDar process; -#if (BOARD_TYPE == 14) -const unsigned int pins[6]= { LL_GPIO_PIN_10,LL_GPIO_PIN_11,LL_GPIO_PIN_12,LL_GPIO_PIN_13,LL_GPIO_PIN_14,LL_GPIO_PIN_15}; - //process 6 output - { - // mapping bits. - for (int i=0;i<6;i++) - { - USHORT bitaddr = storedKMSysCfg.theKMSysCfg.OutMappings[i]; - UCHAR type = (bitaddr&0xf000) >>12; - USHORT byteaddr = (bitaddr&0x0ff0) >>4; - UCHAR bitpos = bitaddr &0x0f; - UCHAR bitvalue = 0 ; - if (byteaddr>0) { - if (type == 0) bitvalue = KMem.WXB[byteaddr-1] & ( 1 << bitpos ); - else if (type == 1 ) bitvalue = KMem.WYB[byteaddr-1] & ( 1 << bitpos ); - } - if (bitvalue){ LL_GPIO_SetOutputPin(GPIOB,pins[i]);} - else {LL_GPIO_ResetOutputPin(GPIOB,pins[i]);} - } - } -#endif - -/* - { - unsigned char pos,seg; - unsigned short val; - pos=((KMem.nRunCount)&0x3); - //val=(KMem.nRunCount)&0xfff; - val=KMem.ErrStat; - char buf5[20]; - sprintf(buf5,"%4d",val); - val=buf5[3-pos]; - if (val <'0' || val >'9') {seg=0;} - else {seg=LEDSEGTAB[val-'0'];} - - pos=1<<pos; - //pos=1; - //seg=2; - seg=~seg; - // PutOutputSPI1(pos|(seg<<8)); + if (Uart3Stat.bPacketRecved){ + KMem.WDT[8]++; + OrdLidarParsePkt(0,(OradarLidarFrame *)Uart3RxBuf,Uart3RecvBuf1DataLen); + Uart3RecvBuf1DataLen =0; + Uart3Stat.bPacketRecved = 0; } -*/ - -#if (BOARD_TYPE == 13) - w5500_network_info_show(); -// loopback_tcps(0,str1,5000); -#endif + KMem.WDT[9]=pCount1; + KMem.WDT[10]=dCount1; + KMem.WDT[11]=vCount1; + + KMem.WDT[12] = eCount1; + KMem.WDT[13] = eCount2; + + if (Uart5Stat.bPacketRecved){ + KMem.WDT[16]++; + OrdLidarParsePkt(1,(OradarLidarFrame *)Uart5RxBuf,Uart5RecvBuf1DataLen); + Uart5RecvBuf1DataLen =0; + Uart5Stat.bPacketRecved = 0; + } + +// nPosX,nPosY,nPosZ,nPosZ1,nPosZ2; + + KMem.WDT[17]=pCount2; + KMem.WDT[18]=dCount2; + KMem.WDT[19]=vCount2; + + KMem.WDT[24]=nPosX; + KMem.WDT[25]=nPosY; + KMem.WDT[26]=nPosZ; + KMem.WDT[27]=nPosZ1; + KMem.WDT[28]=nPosZ2; + + KMem.WDT[32]=results[0]; + KMem.WDT[33]=results[1]; + KMem.WDT[34]=results[2]; + KMem.WDT[35]=results[3]; + KMem.WDT[36]=results[4]; + KMem.WDT[37]=results[5]; + KMem.WDT[38]=results[6]; + KMem.WDT[39]=results[7]; + + + KMem.WX[1] = nPosX ; + KMem.WX[2] = nPosY ; + KMem.WX[3] = nPosZ; + +// KMem.WX[1]++ ; +// KMem.WX[2]++; + +// KMem.WYB[0]=1; + PutOutput (KMem.WY[0]); LL_IWDG_ReloadCounter(IWDG); diff --git a/KMini_CCT6/Src/stm32f0xx_it.c b/KMini_CCT6/Src/stm32f0xx_it.c index 33aeefb..2b04ba7 100644 --- a/KMini_CCT6/Src/stm32f0xx_it.c +++ b/KMini_CCT6/Src/stm32f0xx_it.c @@ -247,18 +247,22 @@ if (LL_USART_IsActiveFlag_RXNE(USART1)) { - Uart1BaudGot=1; - Uart1BaudFirstGot=1; - Uart1Stat.RXNECount++; +// Uart1BaudGot=1; +// Uart1BaudFirstGot=1; +// Uart1Stat.RXNECount++; unsigned char ch=LL_USART_ReceiveData8(USART1); // PushOne(&Uart1Stat.QRx,ch); Uart1Stat.RecvBytes++; - Uart1RecvBuf1[Uart1RecvBuf1DataLen++]=ch; + Uart1RecvBuf1[Uart1RecvBuf1DataLen]=ch; + if (Uart1RecvBuf1DataLen <RX1BUFSIZE -1 ) { + Uart1RecvBuf1DataLen++; + } //LL_USART_TransmitData8(USART1,ch); } if (LL_USART_IsActiveFlag_ORE(USART1)) { LL_USART_ClearFlag_ORE(USART1); + LL_USART_DisableOverrunDetect(USART1); Uart1Stat.OverRunCount++; } if (LL_USART_IsEnabledIT_IDLE(USART1)&&LL_USART_IsActiveFlag_IDLE(USART1)) @@ -294,6 +298,7 @@ if (LL_USART_IsActiveFlag_ORE(USART2)) { LL_USART_ClearFlag_ORE(USART2); + LL_USART_DisableOverrunDetect(USART2); Uart2Stat.OverRunCount++; } if (LL_USART_IsEnabledIT_IDLE(USART2)&&LL_USART_IsActiveFlag_IDLE(USART2)) @@ -315,12 +320,51 @@ { /* USER CODE BEGIN USART3_6_IRQn 0 */ + if (LL_USART_IsActiveFlag_RXNE(USART3)) + { + unsigned char ch=LL_USART_ReceiveData8(USART3); +// Uart3Stat.RXNECount++; +// Uart3Stat.RecvBytes++; + if (Uart3RecvBuf1DataLen < UART3RXBUFSIZE -1) { + Uart3RxBuf[Uart3RecvBuf1DataLen++]=ch; + } + } + if (LL_USART_IsActiveFlag_TXE(USART3)) + { + if (Uart3SentLen >= Uart3ToSendLen) + { + Uart3SentLen = 0; + Uart3ToSendLen = 0; + LL_USART_DisableIT_TXE(USART3); + }else + { + unsigned char ch=Uart3TxBuf[Uart3SentLen++]; + LL_USART_TransmitData8(USART3,ch); + } + } + if (LL_USART_IsActiveFlag_ORE(USART3)) + { + LL_USART_ClearFlag_ORE(USART3); + LL_USART_DisableOverrunDetect(USART3); +// Uart3Stat.OverRunCount++; + } + if (LL_USART_IsEnabledIT_IDLE(USART3)&&LL_USART_IsActiveFlag_IDLE(USART3)) + {//鎺ユ敹瀹屾垚 + LL_USART_ClearFlag_IDLE(USART3); + Uart3RecvDone(); + } + if (LL_USART_IsActiveFlag_TC(USART3)) + {//鍙戦�佸畬鎴� + LL_USART_ClearFlag_TC(USART3); + Uart3SendDone(); + } + if (LL_USART_IsActiveFlag_RXNE(USART5)) { unsigned char ch=LL_USART_ReceiveData8(USART5); // Uart5Stat.RXNECount++; // Uart5Stat.RecvBytes++; - if (Uart5RecvBuf1DataLen < RX5BUFSIZE -1) { + if (Uart5RecvBuf1DataLen < UART5RXBUFSIZE -1) { Uart5RxBuf[Uart5RecvBuf1DataLen++]=ch; } } @@ -360,7 +404,7 @@ unsigned char ch=LL_USART_ReceiveData8(USART6); // Uart6Stat.RXNECount++; // Uart6Stat.RecvBytes++; - if (Uart6RecvBuf1DataLen < RX6BUFSIZE -1) { + if (Uart6RecvBuf1DataLen < UART6RXBUFSIZE -1) { Uart6RxBuf[Uart6RecvBuf1DataLen++]=ch; } } diff --git a/KNet.uvmpw b/KNet.uvmpw index e1b4b16..c041965 100644 --- a/KNet.uvmpw +++ b/KNet.uvmpw @@ -12,6 +12,51 @@ </project> <project> + <PathAndName>.\Ext_FPx\MDK-ARM\Ext_FPx_C8T6_鏉句笅鎵╁睍.uvprojx</PathAndName> + </project> + + <project> + <PathAndName>.\MDK-ARM\KPLC_C8T6_绠�鏄揚LC.uvprojx</PathAndName> + </project> + + <project> + <PathAndName>.\KBus\MDK-ARM\KBus_C8T6_鍒嗗竷IO妯″潡_8璺�16璺�.uvprojx</PathAndName> + </project> + + <project> + <PathAndName>.\MDK-ARM\Radio_LLCC68_C8T6_8璺棤绾挎ā鍧�.uvprojx</PathAndName> + <NodeIsActive>1</NodeIsActive> + </project> + + <project> + <PathAndName>.\MDK-ARM\KMini_New_CCT6.uvprojx</PathAndName> + </project> + + <project> + <PathAndName>.\MDK-ARM\KMini_C8T6.uvprojx</PathAndName> + </project> + + <project> + <PathAndName>.\MDK-ARM\KLink_C8T6.uvprojx</PathAndName> + </project> + + <project> + <PathAndName>.\MDK-ARM\F030C8T6_KNet_缃戝彛妯″潡.uvprojx</PathAndName> + </project> + + <project> + <PathAndName>.\MDK-ARM\F030C8T6_KBox_鎺у埗鐩掑瓙.uvprojx</PathAndName> + </project> + + <project> + <PathAndName>.\MDK-ARM\F030C8T6_KAD_4璺ā鎷熼噺.uvprojx</PathAndName> + </project> + + <project> + <PathAndName>.\KSingleLineBus\KSingleLineBus_鍗曟�荤嚎.uvproj</PathAndName> + </project> + + <project> <PathAndName>.\C8T6_TestApp1\MDK-ARM\F030C8T6_Ext_FPx_New.uvprojx</PathAndName> </project> @@ -21,52 +66,6 @@ <project> <PathAndName>.\CCT6_TestApp1\MDK-ARM\F030CCT6_TestApp1.uvprojx</PathAndName> - <NodeIsExpanded>1</NodeIsExpanded> - </project> - - <project> - <PathAndName>.\MDK-ARM\F030C8T6_Ext_FPx.uvprojx</PathAndName> - <NodeIsActive>1</NodeIsActive> - </project> - - <project> - <PathAndName>.\MDK-ARM\F030C8T6_KBus.uvprojx</PathAndName> - </project> - - <project> - <PathAndName>.\MDK-ARM\F030C8T6_KMini.uvprojx</PathAndName> - </project> - - <project> - <PathAndName>.\MDK-ARM\F030CCT6_KMini.uvprojx</PathAndName> - </project> - - <project> - <PathAndName>.\MDK-ARM\F030C8T6_KLink.uvprojx</PathAndName> - </project> - - <project> - <PathAndName>.\MDK-ARM\F030C8T6_KNet.uvprojx</PathAndName> - </project> - - <project> - <PathAndName>.\MDK-ARM\F030C8T6_Radio_LLCC68.uvprojx</PathAndName> - </project> - - <project> - <PathAndName>.\MDK-ARM\F030C8T6_KBox.uvprojx</PathAndName> - </project> - - <project> - <PathAndName>.\MDK-ARM\F030C8T6_KAD.uvprojx</PathAndName> - </project> - - <project> - <PathAndName>.\MDK-ARM\F030C8T6_KPLC.uvprojx</PathAndName> - </project> - - <project> - <PathAndName>.\KSingleLineBus\KSingleLineBus.uvproj</PathAndName> </project> </ProjectWorkspace> diff --git a/KPLC/Inc/BoardType.h b/KPLC/Inc/BoardType.h index a864060..d1f0a4c 100644 --- a/KPLC/Inc/BoardType.h +++ b/KPLC/Inc/BoardType.h @@ -46,6 +46,8 @@ #define BOARD_TYPE 7 #define BOARD_VER 1 +#define ENABLE_PLC 1 + #if (BOARD_TYPE == 11) #define XLAT_FREQ 12 #elif (BOARD_TYPE == 14) @@ -74,4 +76,43 @@ #endif +typedef struct tagInfoBlockHdr { + unsigned short nBlkSign; // 开始标志 + unsigned short nBlkTypeVer; // 类型和版本 + unsigned short nBlkSize; // Block 大小, 包括开始和结束标志 + unsigned short Pad1; +}stInfoBlockHdr; + +typedef struct tagInfoBlockTail { + + unsigned short CRC16; + unsigned short EndSign; +}stInfoBlockTail; + +typedef struct tagBtLdrInfoBlock { + stInfoBlockHdr Hdr; + unsigned short nBtldrVer; + unsigned short nBtldrDevice; + unsigned short nBtldrSize; // 设计大小 + unsigned short nBtldrDataSize; //代码大小 + unsigned int nBtldr_AppAddr; + unsigned int nBtldr_NewAppInfoAddr; + unsigned int nBtldr_NewAppAddr; + stInfoBlockTail tail; +}stBtLdrInfoBlock, *pBtLdrInfoBlock; + +typedef struct tagAppInfoBlock { + stInfoBlockHdr Hdr; + unsigned short nAppVer; + unsigned short nAppDevice; + unsigned short nAppSize; // 代码设计大小 + unsigned short nAppDataSize; //实际代码大小 + unsigned int nAppStartAddr; + unsigned int nAppStartOffset; + unsigned int nApp; + stInfoBlockTail tail; +}stAppInfoBlock, * pAppInfoBlock; + + + #endif /* __BOARDTYPE_H__ */ diff --git a/KPLC/Inc/main.h b/KPLC/Inc/main.h index 67a1955..81823cb 100644 --- a/KPLC/Inc/main.h +++ b/KPLC/Inc/main.h @@ -74,7 +74,9 @@ /* #define USE_FULL_ASSERT 1U */ /* USER CODE BEGIN Private defines */ +#include "KBus.h" +extern stKBusDef KBus1; /* USER CODE END Private defines */ #ifdef __cplusplus diff --git a/KPLC/Src/BoardType.c b/KPLC/Src/BoardType.c index e69de29..27abde5 100644 --- a/KPLC/Src/BoardType.c +++ b/KPLC/Src/BoardType.c @@ -0,0 +1,95 @@ +#include "BoardType.h" +#include "KMachine.h" +#include "KBus.h" + +extern int __Vectors; + +#define APP_ADDR 0x08001000 //应用程序首地址定义 (int)(unsigned char *)(&__Vectors) +#define APPINFOBLOCK_ADDR (APP_ADDR + 0x100) //程序信息块 地址 +#define INFOBLOCK_ADDR (APP_ADDR + 0x1000) //信息块 地址 + +#define APP_START_ADDR IROM1_START_ADDRESS +extern int Region$$Table$$Limit; + +#define MAKE_VER(x,y) ((x<<8)|y) +#define APP_VER MAKE_VER(1,15) + +const stAppInfoBlock AppInfoBlock __attribute__((at(APPINFOBLOCK_ADDR))) = +{ + 0xAA55, // StartSign + 0x0301, // BlockType + sizeof(stAppInfoBlock), //BlockSize + 0, // Pad, + APP_VER, //AppVer + (BOARD_TYPE<<8) + BOARD_VER, //AppDevice; + 0x1000, //AppSize; + 0x0C00, //AppDataSize; + APP_ADDR, //nAppStartAddr + (int)&Region$$Table$$Limit, //nBtldr_NewAppInfoAddr + 0x08009000, //nBtldr_NewAppAddr + 0xCCCC, //crc16; + 0xAA55 //EndSign; + +}; + + +const stKMInfoBlock KMInfoBlock __attribute__((at(INFOBLOCK_ADDR))) = +{ +// sizeof(stKMInfoBlock), + (BOARD_TYPE<<8) + BOARD_VER, //nDeviceType BOARD_VER, //nDevieVer + APP_VER, //ProgVer + 0x0102, //KLinkVer + KBUS_VER, //KBusVer +// 0x0100, //KNetVer +// 0x0100, //KWLVer + + 4, //nCapacity1 ?K + 1, //nCapacity2 ?k + + DINPUT, //nDInput; + DOUTPUT, //nDOutput + + 0, //nAInput + 0, //nAOutput + 0, //nHInput + 0, //nHOutput + 0, //nExt1; + 0, //nExt2; + 0, //nLogSize; + 2, //nPorts; + 0, //nManSize; + 0, //nAbility; + 6, //nSwitchBits; +}; + + +const stDeviceInfo MyDeviceInfo={ + + (BOARD_TYPE<<8) + BOARD_VER, //nDeviceTypeVer // unsigned short ClientType; // 子机类型 + APP_VER, //ProgVer // unsigned short ClientVer; // 子机版本 + + DINPUT, // unsigned char InBitCount; // 输入开关量数量 + DOUTPUT, // unsigned char OutBitCount; // 输出开关量数量 + 0, // unsigned char InDWCount; // 输入数据字数 + 0, // unsigned char OutDWCount; // 输出数据字数 + 0, // unsigned char AIWCount; // 输入模拟量通道(字)数 // 16位为一个字(通道) + 0, // unsigned char AQWCount; // 输出模拟量通道(字)数 // 16位为一个字(通道) +// 0, // unsigned char AIBits; // 每通道位数 // 16位以下 +// 0, // unsigned char AQbits; // 每通道位数 // 16位以下 +}; + +const stExDeviceInfo MyExDeviceInfo ={ + (BOARD_TYPE<<8) + BOARD_VER, //nDeviceTypeVer // unsigned short ClientType; // 子机类型 + APP_VER, //ProgVer // unsigned short ClientVer; // 子机版本 + + DINPUT, // unsigned char InBitCount; // 输入开关量数量 + DOUTPUT, // unsigned char OutBitCount; // 输出开关量数量 + 0, // unsigned char InDWCount; // 输入数据字数 + 0, // unsigned char OutDWCount; // 输出数据字数 + 0, // unsigned char AIWCount; // 输入模拟量通道(字)数 // 16位为一个字(通道) + 0, // unsigned char AQWCount; // 输出模拟量通道(字)数 // 16位为一个字(通道) +// 0, // unsigned char AIBits; // 每通道位数 // 16位以下 +// 0, // unsigned char AQbits; // 每通道位数 // 16位以下 + +}; + diff --git a/KPLC/Src/main.c b/KPLC/Src/main.c index 7320932..d77ca74 100644 --- a/KPLC/Src/main.c +++ b/KPLC/Src/main.c @@ -83,10 +83,13 @@ unsigned char FastFlicker=0; unsigned int Uart1IdelTimer = 0; -stBinProg1 * pProgs = (stBinProg1 *)STORE_PRG_BASE; uint32_t us1,us2,us3,us4,us5,us6; + +stKBusDef KBus1; // + +extern stDeviceInfo MyDeviceInfo; /* USER CODE END PV */ /* Private function prototypes -----------------------------------------------*/ @@ -118,7 +121,7 @@ static int Count=0; CurTickuS += 100; nCurTick++; - nSlaveTick++; + KBus1.nSlaveTick++; Count++; if (Count>=10000) { @@ -132,7 +135,32 @@ return; } -void * KBusCallBackFunc(int nChn, int nEvent, void *pBuf, int nLen1) +void PendSvCallBack() +{ +#if (BOARD_TYPE == 14) +///* + if (bSPI1RecvDone) + { + bSPI1RecvDone=0; + FPxParsePkt(SPI1RecvBuf,nSPI1RecvLenInBuf); + } +//*/ +#endif + if (Uart2Stat.bPacketRecved) + { + KBusParsePacket(&KBus1, (pKBPacket)Uart2RecvBuf1, Uart2RecvBuf1DataLen); + Uart2RecvBuf1DataLen=0; + Uart2Stat.bPacketRecved=0; + Uart2RecvDMA(Uart2RecvBuf1,sizeof(Uart2RecvBuf1)); + KMem.WDT[2]++; + } +} + +/* +KBus閫氳鍥炶皟鍑芥暟锛屽綋閫氳鐘舵�佹敼鍙樻垨鏁版嵁鏇存柊鏃惰璋冪敤銆� +鎴栬�呯郴缁熻姹傛椂銆� +*/ +void * KBusEvCallBackFunc(void* pParam, int nEvent, void *pBuf, int nLen1) { switch (nEvent){ @@ -151,8 +179,13 @@ case KBusEvTimeSync: break; case KBusEvDataUpdate: -// KMem.WY[0]=KBusMem.WLY[0]; //KBus Slave -// KBusMem.WLX[0]=KMem.WX[0]; + if (KBus1.bMaster) { + KMem.WLX[0]=KBusMem.WLX[0]; //KPLC with KBus Master + KBusMem.WLY[0]=KMem.WLY[0]; + } else if (KBus1.bSlave) { + KMem.WLX[0]=KBusMem.WLY[0]; //KPLC with KBus Slave + KBusMem.WLX[0]=KMem.WLY[0]; + } break; case KBusEvCmdResponse: break; @@ -162,6 +195,7 @@ } return 0; } + /* USER CODE END 0 */ @@ -223,10 +257,16 @@ KMRunStat.bLEDFlick = 1; + + KLinkInit(1); + unsigned char bKBusMaster, bKBusSlave, bKBusRepeater; + int nKBusStationID; + int nKBusChilds; KMem.CurJumperSW=ReadJumperSW(); KMem.EffJumperSW=KMem.CurJumperSW; - // Uart2Baud = AlterUart2Baud; + nKBusStationID = KMem.EffJumperSW&0x0f; + nKBusChilds = nKBusStationID; #if (BOARD_TYPE == 14) KMem.EffJumperSW|=0x10; @@ -234,7 +274,7 @@ if ((KMem.EffJumperSW&0x10)!=0) {bKBusMaster=1;bKBusSlave=0;} else{bKBusMaster=0;bKBusSlave=1;} nChilds=nStationID; - FP0_Init(); + FP0_Init(nChilds); #elif (BOARD_TYPE == 15 || BOARD_TYPE == 16) nStationID=1 ;//KMem.EffJumperSW&0x0f; @@ -243,17 +283,25 @@ // else {bKBusMaster=0;bKBusSlave=1;} #else - nStationID=KMem.EffJumperSW&0x0f; + nKBusStationID=KMem.EffJumperSW&0x0f; if (KMem.EffJumperSW == 0x1f) {bKBusRepeater=1;bKBusMaster=1;bKBusSlave=0;} - else if ((KMem.EffJumperSW&0x10)!=0) {bKBusMaster=1;bKBusSlave=0;} - else{bKBusMaster=0;bKBusSlave=1;} + else if ((KMem.EffJumperSW&0x10)!=0) { + bKBusMaster=1;bKBusSlave=0; + } + else{ + bKBusMaster=0;bKBusSlave=1; + } #endif - KBusInit(2, bKBusMaster, nChilds); - KBusSetCallBackFunc(2, &KBusCallBackFunc), + if (bKBusMaster) { + KBusInitMaster(&KBus1, (KBusSendPktFuncDef)PutStr2, nKBusChilds); + } else if (bKBusSlave) { + KBusInitSlave(&KBus1, (KBusSendPktFuncDef)PutStr2, nKBusStationID,&MyDeviceInfo); + } + KBusSetEvCallBackFunc(&KBus1, &KBusEvCallBackFunc), + + UNUSED(bKBusRepeater); - nChilds=nStationID; - nCurPollId=1; //if (KMem.EffJumperSW == 0x00) Uart1Baud = DefaultUart1Baud; MX_USART1_UART_Init(); @@ -378,6 +426,16 @@ // KMem.SDD[13]=PendSvCount; // KMem.SDD[14]=RCC->CSR; + KMem.WDB[0] = KBus1.MyStat; + KMem.WDB[1] = KBus1.bMaster; + KMem.WDB[2] = KBus1.bMasterSent; + KMem.WDB[3] = KBus1.bMasterRecved; + KMem.WDB[4] = KBus1.bMasterRecvOK; + KMem.WDB[5] = KBus1.bSlaveRecved; + + KMem.WDB[8] = KBus1.RunStat; + KMem.WDB[9] = KBus1.ErrStat; + int a; a = LL_GPIO_ReadInputPort(GPIOA); KMem.WDT[120]=a; @@ -433,19 +491,21 @@ #endif -// pProgs = (stBinProg1 *) STORE_PRG_BASE; +// pProgs = (stBinInstrcn1 *) STORE_PRG_BASE; if ( KMRunStat.WorkMode==1 ) //&& bKBusMaster) { - if (KMRunStat.nBinProgBank == 0){ - pProgs=(stBinProg1 *)STORE_PRG_BASE; + stStoredBinProgs * pStoredBinProgs; + + if (storedKMSysCfg.theKMSysCfg.nProgBank == 0){ + pStoredBinProgs=((stStoredBinProgs *)STORE_PRG_BASE); }else { - pProgs=(stBinProg1 *)ALT_PRG_BASE; + pStoredBinProgs=((stStoredBinProgs *)ALT_PRG_BASE); ; } - nSizeProg1=KMRunStat.nBinProgSize; - // pProgs=(stBinProg1 *)prog1; + int nSizeProg1=pStoredBinProgs->StoredHdr.nSize ; + // pProgs=(stBinInstrcn1 *)prog1; - ProcessPLCBinProg(pProgs, nSizeProg1); + ProcessPLCBinProg(pStoredBinProgs->BinInstrcns, nSizeProg1); } KMem.ScanTimeuS=us2-KMem.LastScanTime; @@ -462,7 +522,7 @@ KBusMem.WLY[0]=KMem.WLY[0]; - if (nChilds>0) { KBusMasterFunc(2); } + if (nKBusChilds>0) { KBusMasterFunc(&KBus1); } KMem.WLX[0]=KBusMem.WLX[0]; @@ -480,20 +540,20 @@ // if (! KMem.RunStat) {BufferIn[0]=0;} // KMem.WY[0]=BufferIn[0]; #else - KBusSlaveFunc(2); + KBusSlaveFunc(&KBus1); if (! KMem.RunStat) {KMem.WLY[0]=0;} // KMem.WLY[0]=BufferIn[0]; #endif - if (nSlaveTick&0x00002000) SlowFlicker=1; + if (KBus1.nSlaveTick&0x00002000) SlowFlicker=1; else SlowFlicker=0; - if (nSlaveTick&0x00000800) FastFlicker=1; + if (KBus1.nSlaveTick&0x00000800) FastFlicker=1; else FastFlicker=0; } // KMem.WY[0]=nCount2>>5; - if (KMem.RunStat) {KMem.RunStat--;} - if (KMem.ErrStat) {KMem.ErrStat--;} + if (KBus1.RunStat) {KBus1.RunStat--;} + if (KBus1.ErrStat) {KBus1.ErrStat--;} if (KMRunStat.bLEDFlick) { @@ -513,6 +573,7 @@ if (!KMem.RunStat) SetRunLed(SlowFlicker); else SetRunLed(FastFlicker); } + KMem.ErrStat = 0 + KBus1.ErrStat; if (!KMem.ErrStat) { SetErrLed(0); diff --git a/KSingleLineBus/KSingleLineBus.uvopt "b/KSingleLineBus/KSingleLineBus_\345\215\225\346\200\273\347\272\277.uvopt" similarity index 80% rename from KSingleLineBus/KSingleLineBus.uvopt rename to "KSingleLineBus/KSingleLineBus_\345\215\225\346\200\273\347\272\277.uvopt" index 1806509..03a984e 100644 --- a/KSingleLineBus/KSingleLineBus.uvopt +++ "b/KSingleLineBus/KSingleLineBus_\345\215\225\346\200\273\347\272\277.uvopt" @@ -114,7 +114,56 @@ <tIfile></tIfile> <pMon></pMon> </DebugOpt> - <Breakpoint/> + <Breakpoint> + <Bp> + <Number>0</Number> + <Type>0</Type> + <LineNumber>267</LineNumber> + <EnabledFlag>1</EnabledFlag> + <Address>0</Address> + <ByteObject>0</ByteObject> + <HtxType>0</HtxType> + <ManyObjects>0</ManyObjects> + <SizeOfObject>0</SizeOfObject> + <BreakByAccess>0</BreakByAccess> + <BreakIfRCount>0</BreakIfRCount> + <Filename>E:\WORK\MCU&PCB\DIST_IO\ComLib\Src\stm32f0xx_it.c</Filename> + <ExecCommand></ExecCommand> + <Expression></Expression> + </Bp> + <Bp> + <Number>1</Number> + <Type>0</Type> + <LineNumber>301</LineNumber> + <EnabledFlag>1</EnabledFlag> + <Address>0</Address> + <ByteObject>0</ByteObject> + <HtxType>0</HtxType> + <ManyObjects>0</ManyObjects> + <SizeOfObject>0</SizeOfObject> + <BreakByAccess>0</BreakByAccess> + <BreakIfRCount>0</BreakIfRCount> + <Filename><5>../Radio_LLCC68\Radio\src\sx126x.c</Filename> + <ExecCommand></ExecCommand> + <Expression></Expression> + </Bp> + <Bp> + <Number>2</Number> + <Type>0</Type> + <LineNumber>611</LineNumber> + <EnabledFlag>1</EnabledFlag> + <Address>0</Address> + <ByteObject>0</ByteObject> + <HtxType>0</HtxType> + <ManyObjects>0</ManyObjects> + <SizeOfObject>0</SizeOfObject> + <BreakByAccess>0</BreakByAccess> + <BreakIfRCount>0</BreakIfRCount> + <Filename><5>../Radio_LLCC68\Radio\src\sx126x.c</Filename> + <ExecCommand></ExecCommand> + <Expression></Expression> + </Bp> + </Breakpoint> <Tracepoint> <THDelay>0</THDelay> </Tracepoint> diff --git a/KSingleLineBus/KSingleLineBus.uvproj "b/KSingleLineBus/KSingleLineBus_\345\215\225\346\200\273\347\272\277.uvproj" similarity index 100% rename from KSingleLineBus/KSingleLineBus.uvproj rename to "KSingleLineBus/KSingleLineBus_\345\215\225\346\200\273\347\272\277.uvproj" diff --git a/KSingleLineBus/Listings/demo.m51 b/KSingleLineBus/Listings/demo.m51 index b1e9ea6..8cf5390 100644 --- a/KSingleLineBus/Listings/demo.m51 +++ b/KSingleLineBus/Listings/demo.m51 @@ -1,4 +1,4 @@ -BL51 BANKED LINKER/LOCATER V6.22 03/17/2024 12:33:27 PAGE 1 +BL51 BANKED LINKER/LOCATER V6.22 06/13/2024 13:47:31 PAGE 1 BL51 BANKED LINKER/LOCATER V6.22, INVOKED BY: @@ -17,8 +17,23 @@ D:\KEIL_V5\C51\LIB\C51S.LIB (?C_INIT) D:\KEIL_V5\C51\LIB\C51S.LIB (?C?CLDPTR) D:\KEIL_V5\C51\LIB\C51S.LIB (?C?CLDOPTR) + D:\KEIL_V5\C51\LIB\C51S.LIB (?C?CILDOPTR) D:\KEIL_V5\C51\LIB\C51S.LIB (?C?CSTPTR) D:\KEIL_V5\C51\LIB\C51S.LIB (?C?CSTOPTR) + D:\KEIL_V5\C51\LIB\C51S.LIB (?C?ILDOPTR) + D:\KEIL_V5\C51\LIB\C51S.LIB (?C?IILDOPTR) + D:\KEIL_V5\C51\LIB\C51S.LIB (?C?ISTOPTR) + D:\KEIL_V5\C51\LIB\C51S.LIB (?C?PLDOPTR) + D:\KEIL_V5\C51\LIB\C51S.LIB (?C?PSTOPTR) + D:\KEIL_V5\C51\LIB\C51S.LIB (?C?ICALL) + D:\KEIL_V5\C51\LIB\C51S.LIB (?C?IILDX) + D:\KEIL_V5\C51\LIB\C51S.LIB (?C?PLDIDATA) + D:\KEIL_V5\C51\LIB\C51S.LIB (?C?PSTIDATA) + D:\KEIL_V5\C51\LIB\C51S.LIB (?C?PLDXDATA) + D:\KEIL_V5\C51\LIB\C51S.LIB (?C?PSTXDATA) + D:\KEIL_V5\C51\LIB\C51S.LIB (?C?PLDPDATA) + D:\KEIL_V5\C51\LIB\C51S.LIB (?C?PSTPDATA) + D:\KEIL_V5\C51\LIB\C51S.LIB (?C?PLDCODE) LINK MAP OF MODULE: .\Objects\demo (?C_STARTUP) @@ -29,48 +44,48 @@ * * * * * * * D A T A M E M O R Y * * * * * * * REG 0000H 0008H ABSOLUTE "REG BANK 0" - DATA 0008H 0017H UNIT ?DT?MAIN + DATA 0008H 0011H UNIT _DATA_GROUP_ + DATA 0019H 0006H UNIT ?DT?_SLPSETCALLBACK?SLP 001FH 0001H *** GAP *** BIT 0020H.0 0000H.2 UNIT ?BI?MAIN 0020H.2 0000H.6 *** GAP *** - DATA 0021H 0020H UNIT ?DT?SLP - DATA 0041H 000AH UNIT _DATA_GROUP_ - IDATA 004BH 0001H UNIT ?STACK + DATA 0021H 003CH UNIT ?DT?MAIN + IDATA 005DH 0001H UNIT ?STACK * * * * * * * C O D E M E M O R Y * * * * * * * CODE 0000H 0003H ABSOLUTE CODE 0003H 0005H UNIT ?PR?GETINPUT?MAIN CODE 0008H 0003H UNIT ?PR?_PUTOUTPUT?MAIN CODE 000BH 0003H ABSOLUTE - CODE 000EH 000BH UNIT ?PR?DELAY1MS?MAIN - CODE 0019H 0001H UNIT ?PR?TIMER0_ISR?MAIN - CODE 001AH 0001H UNIT ?PR?TIMER1_ISR?MAIN + CODE 000EH 0009H UNIT ?PR?_MODBUSPARSEPACKET?MODBUS + CODE 0017H 0001H UNIT ?PR?TIMER0_ISR?MAIN +BL51 BANKED LINKER/LOCATER V6.22 06/13/2024 13:47:31 PAGE 2 + + + CODE 0018H 0001H UNIT ?PR?TIMER1_ISR?MAIN + CODE 0019H 0001H UNIT ?PR?OTHERPROCESS?MAIN + CODE 001AH 0001H UNIT ?PR?MODBUSPROCESS?MODBUS CODE 001BH 0003H ABSOLUTE - CODE 001EH 005AH UNIT ?PR?MAIN?MAIN - CODE 0078H 0013H UNIT ?PR?_DELAY_US?MAIN + CODE 001EH 0035H UNIT ?PR?UART3_ISR?MAIN + CODE 0053H 0031H UNIT ?PR?_SLPINIT?SLP + 0084H 0007H *** GAP *** CODE 008BH 0003H ABSOLUTE - CODE 008EH 00B8H UNIT ?PR?_SLPPARSEPACKET?SLP - CODE 0146H 008CH UNIT ?C_C51STARTUP - CODE 01D2H 0083H UNIT ?PR?GETJUMPER?MAIN - CODE 0255H 007AH UNIT ?C?LIB_CODE - CODE 02CFH 0070H UNIT ?PR?SLPPROCESS?SLP - CODE 033FH 0048H UNIT ?PR?SLPMASTERSENDPACKET?SLP - CODE 0387H 0035H UNIT ?PR?UART3_ISR?MAIN - CODE 03BCH 002DH UNIT ?PR?_SLPBCC?SLP - CODE 03E9H 0026H UNIT ?PR?_UART3SENDPACKET?MAIN - CODE 040FH 0023H UNIT ?PR?IO_INIT?MAIN -BL51 BANKED LINKER/LOCATER V6.22 03/17/2024 12:33:27 PAGE 2 - - - CODE 0432H 001BH UNIT ?PR?UART3RECVPACKET?MAIN - CODE 044DH 001BH UNIT ?PR?UART1RECVPACKET?MAIN - CODE 0468H 0019H UNIT ?PR?UART3INIT?MAIN - CODE 0481H 0019H UNIT ?C_INITSEG - CODE 049AH 0014H UNIT ?PR?_DELAY_MS?MAIN - CODE 04AEH 0009H UNIT ?PR?_MODBUSPARSEPACKET?MODBUS - CODE 04B7H 0003H UNIT ?PR?_SLPSENDPACKET?MAIN - CODE 04BAH 0001H UNIT ?PR?OTHERPROCESS?MAIN - CODE 04BBH 0001H UNIT ?PR?MODBUSPROCESS?MODBUS + CODE 008EH 0246H UNIT ?C?LIB_CODE + CODE 02D4H 019DH UNIT ?PR?_SLPPARSEPACKET?SLP + CODE 0471H 0119H UNIT ?PR?_SLPPROCESS?SLP + CODE 058AH 00B6H UNIT ?PR?_SLPMASTERSENDPACKET?SLP + CODE 0640H 008CH UNIT ?C_C51STARTUP + CODE 06CCH 0083H UNIT ?PR?GETJUMPER?MAIN + CODE 074FH 0078H UNIT ?PR?MAIN?MAIN + CODE 07C7H 0026H UNIT ?PR?_UART3SENDPACKET?MAIN + CODE 07EDH 0025H UNIT ?PR?UART3RECVPACKET?MAIN + CODE 0812H 0023H UNIT ?PR?IO_INIT?MAIN + CODE 0835H 0022H UNIT ?PR?_SLPBCC?SLP + CODE 0857H 001FH UNIT ?PR?_SLPSETCALLBACK?SLP + CODE 0876H 001BH UNIT ?PR?UART1RECVPACKET?MAIN + CODE 0891H 0019H UNIT ?PR?UART3INIT?MAIN + CODE 08AAH 0013H UNIT ?PR?_DELAY_US?MAIN + CODE 08BDH 0011H UNIT ?C_INITSEG @@ -84,49 +99,48 @@ +--> ?PR?MAIN?MAIN +--> ?C_INITSEG -?PR?MAIN?MAIN 0041H 0001H +?PR?MAIN?MAIN 0008H 0001H +--> ?PR?IO_INIT?MAIN +--> ?PR?UART3INIT?MAIN +--> ?PR?GETJUMPER?MAIN + +--> ?PR?_UART3SENDPACKET?MAIN + +--> ?PR?_SLPINIT?SLP +--> ?PR?GETINPUT?MAIN +--> ?PR?UART3RECVPACKET?MAIN - +--> ?PR?SLPPROCESS?SLP + +--> ?PR?_SLPPROCESS?SLP +--> ?PR?_PUTOUTPUT?MAIN +--> ?PR?UART1RECVPACKET?MAIN +--> ?PR?MODBUSPROCESS?MODBUS +--> ?PR?OTHERPROCESS?MAIN +--> ?PR?_DELAY_US?MAIN -?PR?GETJUMPER?MAIN 0042H 0001H +?PR?GETJUMPER?MAIN 0009H 0001H + +?PR?_UART3SENDPACKET?MAIN 0009H 0003H + +?PR?_SLPINIT?SLP 0009H 0006H +BL51 BANKED LINKER/LOCATER V6.22 06/13/2024 13:47:31 PAGE 3 + + ?PR?UART3RECVPACKET?MAIN ----- ----- +--> ?PR?_SLPPARSEPACKET?SLP -?PR?_SLPPARSEPACKET?SLP 0042H 0006H +?PR?_SLPPARSEPACKET?SLP 0009H 000DH +--> ?PR?_SLPBCC?SLP - +--> ?PR?_SLPSENDPACKET?MAIN -?PR?_SLPBCC?SLP 0048H 0003H +?PR?_SLPBCC?SLP 0016H 0003H -?PR?_SLPSENDPACKET?MAIN ----- ----- - +--> ?PR?_UART3SENDPACKET?MAIN +?PR?_SLPPROCESS?SLP 0009H 0003H + +--> ?PR?_SLPMASTERSENDPACKET?SLP -?PR?_UART3SENDPACKET?MAIN 0048H 0003H - -?PR?SLPPROCESS?SLP ----- ----- - +--> ?PR?SLPMASTERSENDPACKET?SLP - -?PR?SLPMASTERSENDPACKET?SLP 0042H 0003H +?PR?_SLPMASTERSENDPACKET?SLP 000CH 0006H +--> ?PR?_SLPBCC?SLP - +--> ?PR?_SLPSENDPACKET?MAIN -BL51 BANKED LINKER/LOCATER V6.22 03/17/2024 12:33:27 PAGE 3 - - ?PR?UART1RECVPACKET?MAIN ----- ----- +--> ?PR?_MODBUSPARSEPACKET?MODBUS -?PR?_MODBUSPARSEPACKET?MODBUS 0042H 0004H +?PR?_MODBUSPARSEPACKET?MODBUS 0009H 0004H @@ -136,8 +150,8 @@ ---------------------------------- ------- MODULE ?C_STARTUP - C:0146H SEGMENT ?C_C51STARTUP - I:004BH SEGMENT ?STACK + C:0640H SEGMENT ?C_C51STARTUP + I:005DH SEGMENT ?STACK C:0000H PUBLIC ?C_STARTUP D:00E0H SYMBOL ACC D:00F0H SYMBOL B @@ -146,7 +160,7 @@ N:0000H SYMBOL IBPSTACK N:0100H SYMBOL IBPSTACKTOP N:0080H SYMBOL IDATALEN - C:0149H SYMBOL IDATALOOP + C:0643H SYMBOL IDATALOOP N:0000H SYMBOL PBPSTACK N:0100H SYMBOL PBPSTACKTOP N:0000H SYMBOL PDATALEN @@ -155,18 +169,21 @@ N:0000H SYMBOL PPAGEENABLE D:00A0H SYMBOL PPAGE_SFR D:0081H SYMBOL SP - C:0146H SYMBOL STARTUP1 + C:0640H SYMBOL STARTUP1 N:0000H SYMBOL XBPSTACK N:0000H SYMBOL XBPSTACKTOP N:0000H SYMBOL XDATALEN N:0000H SYMBOL XDATASTART C:0000H LINE# 126 - C:0146H LINE# 133 - C:0148H LINE# 134 - C:0149H LINE# 135 - C:014AH LINE# 136 - C:014CH LINE# 185 - C:014FH LINE# 196 + C:0640H LINE# 133 + C:0642H LINE# 134 + C:0643H LINE# 135 + C:0644H LINE# 136 +BL51 BANKED LINKER/LOCATER V6.22 06/13/2024 13:47:31 PAGE 4 + + + C:0646H LINE# 185 + C:0649H LINE# 196 ------- ENDMOD ?C_STARTUP ------- MODULE MAIN @@ -176,12 +193,9 @@ D:0096H PUBLIC P2M0 D:0091H PUBLIC P1M1 D:0080H PUBLIC P0 - C:0387H PUBLIC UART3_Isr + C:001EH PUBLIC UART3_Isr D:00B2H PUBLIC P3M0 D:0095H PUBLIC P2M1 -BL51 BANKED LINKER/LOCATER V6.22 03/17/2024 12:33:27 PAGE 4 - - D:0090H PUBLIC P1 D:00B4H PUBLIC P4M0 D:00B1H PUBLIC P3M1 @@ -192,7 +206,6 @@ D:00CCH PUBLIC P6M0 D:00C9H PUBLIC P5M1 D:00C0H PUBLIC P4 - C:000EH PUBLIC Delay1ms D:00E2H PUBLIC P7M0 D:00CBH PUBLIC P6M1 D:00C8H PUBLIC P5 @@ -202,9 +215,9 @@ D:00F8H PUBLIC P7 D:00BAH PUBLIC P_SW2 D:00A8H PUBLIC IE - C:040FH PUBLIC IO_Init + C:0812H PUBLIC IO_Init B:00A8H.4 PUBLIC ES - C:01D2H PUBLIC GetJumper + C:06CCH PUBLIC GetJumper D:00B8H PUBLIC IP B:00B0H.6 PUBLIC KEY1 B:00B0H.7 PUBLIC KEY2 @@ -212,447 +225,486 @@ B:00C0H.2 PUBLIC KEY4 B:00C0H.3 PUBLIC KEY5 B:00C0H.4 PUBLIC KEY6 + D:0021H PUBLIC SLP1 D:00D8H PUBLIC CCON - C:001EH PUBLIC main - D:0008H PUBLIC uart1recvtimeout - D:0009H PUBLIC uart3recvtimeout - C:049AH PUBLIC _Delay_ms + C:074FH PUBLIC main + D:0044H PUBLIC uart1recvtimeout + D:0045H PUBLIC uart3recvtimeout D:0098H PUBLIC SCON C:0003H PUBLIC GetInput D:0088H PUBLIC TCON B:0020H.0 PUBLIC uart1busy B:0020H.1 PUBLIC uart3busy - C:03E9H PUBLIC _Uart3SendPacket - C:0078H PUBLIC _Delay_us - C:044DH PUBLIC Uart1RecvPacket + C:07C7H PUBLIC _Uart3SendPacket + C:08AAH PUBLIC _Delay_us + C:0876H PUBLIC Uart1RecvPacket D:00AFH PUBLIC IE2 - C:0432H PUBLIC Uart3RecvPacket - C:0019H PUBLIC Timer0_Isr - C:001AH PUBLIC Timer1_Isr +BL51 BANKED LINKER/LOCATER V6.22 06/13/2024 13:47:31 PAGE 5 + + + C:07EDH PUBLIC Uart3RecvPacket + D:0046H PUBLIC bSLPMaster + C:0017H PUBLIC Timer0_Isr + C:0018H PUBLIC Timer1_Isr + D:0047H PUBLIC nSLPStation D:00D4H PUBLIC T3H - D:000AH PUBLIC inputdata + D:0048H PUBLIC inputdata C:0008H PUBLIC _PutOutput D:00D5H PUBLIC T3L - C:04B7H PUBLIC _SLPSendPacket D:0083H PUBLIC DPH D:00D1H PUBLIC T4T3M - D:000BH PUBLIC uart1recvbuf - D:0013H PUBLIC uart3recvbuf - D:001BH PUBLIC uart1recvlen -BL51 BANKED LINKER/LOCATER V6.22 03/17/2024 12:33:27 PAGE 5 - - + D:0049H PUBLIC uart1recvbuf + D:0051H PUBLIC uart3recvbuf + D:0059H PUBLIC uart1recvlen D:00ADH PUBLIC S3BUF - D:001CH PUBLIC uart3recvlen + D:005AH PUBLIC uart3recvlen D:00ACH PUBLIC S3CON - C:0468H PUBLIC Uart3Init - C:04BAH PUBLIC OtherProcess + C:0891H PUBLIC Uart3Init + C:0019H PUBLIC OtherProcess B:00C0H.5 PUBLIC ERR B:00C0H.6 PUBLIC RUN - D:001DH PUBLIC nCount + D:005BH PUBLIC nCount D:00D0H PUBLIC PSW D:0094H PUBLIC P0M0 - ------- PROC DELAY1MS - ------- DO - D:0007H SYMBOL i - D:0006H SYMBOL j - ------- ENDDO - C:000EH LINE# 97 - C:000EH LINE# 98 - C:000EH LINE# 101 - C:000FH LINE# 102 - C:0010H LINE# 103 - C:0012H LINE# 104 - C:0014H LINE# 106 - C:0014H LINE# 107 - C:0016H LINE# 108 - C:0018H LINE# 109 - ------- ENDPROC DELAY1MS - ------- PROC _DELAY_MS - D:0004H SYMBOL n - C:049AH LINE# 112 - C:049EH LINE# 113 - C:049EH LINE# 114 - C:04A8H LINE# 115 - C:04A8H LINE# 116 - C:04ABH LINE# 117 - C:04ADH LINE# 119 - ------- ENDPROC _DELAY_MS ------- PROC _DELAY_US D:0006H SYMBOL n ------- DO D:0005H SYMBOL j ------- ENDDO - C:0078H LINE# 121 - C:0078H LINE# 122 - C:0078H LINE# 124 - C:0082H LINE# 125 - C:0084H LINE# 126 - C:008AH LINE# 128 + C:08AAH LINE# 126 + C:08AAH LINE# 127 + C:08AAH LINE# 129 + C:08B4H LINE# 130 + C:08B6H LINE# 131 + C:08BCH LINE# 133 ------- ENDPROC _DELAY_US ------- PROC TIMER0_ISR - C:0019H LINE# 130 - C:0019H LINE# 131 + C:0017H LINE# 135 + C:0017H LINE# 136 ------- ENDPROC TIMER0_ISR ------- PROC TIMER1_ISR - C:001AH LINE# 145 - C:001AH LINE# 146 + C:0018H LINE# 150 + C:0018H LINE# 151 ------- ENDPROC TIMER1_ISR ------- PROC UART3INIT -BL51 BANKED LINKER/LOCATER V6.22 03/17/2024 12:33:27 PAGE 6 - - - C:0468H LINE# 187 - C:0468H LINE# 188 - C:0468H LINE# 189 - C:046BH LINE# 190 - C:046EH LINE# 191 - C:0471H LINE# 192 - C:0474H LINE# 193 - C:0477H LINE# 194 - C:047AH LINE# 195 - C:047DH LINE# 196 - C:0480H LINE# 198 + C:0891H LINE# 192 + C:0891H LINE# 193 + C:0891H LINE# 194 + C:0894H LINE# 195 + C:0897H LINE# 196 + C:089AH LINE# 197 + C:089DH LINE# 198 + C:08A0H LINE# 199 + C:08A3H LINE# 200 + C:08A6H LINE# 201 + C:08A9H LINE# 203 ------- ENDPROC UART3INIT +BL51 BANKED LINKER/LOCATER V6.22 06/13/2024 13:47:31 PAGE 6 + + ------- PROC UART3_ISR - C:0387H LINE# 201 - C:0390H LINE# 203 - C:0395H LINE# 204 - C:0395H LINE# 205 - C:0398H LINE# 207 - C:039FH LINE# 208 - C:03A8H LINE# 209 - C:03ABH LINE# 213 - C:03ABH LINE# 214 - C:03B0H LINE# 215 - C:03B0H LINE# 216 - C:03B3H LINE# 217 - C:03B5H LINE# 218 - C:03B5H LINE# 219 + C:001EH LINE# 206 + C:0027H LINE# 208 + C:002CH LINE# 209 + C:002CH LINE# 210 + C:002FH LINE# 212 + C:0036H LINE# 213 + C:003FH LINE# 214 + C:0042H LINE# 218 + C:0042H LINE# 219 + C:0047H LINE# 220 + C:0047H LINE# 221 + C:004AH LINE# 222 + C:004CH LINE# 223 + C:004CH LINE# 224 ------- ENDPROC UART3_ISR ------- PROC IO_INIT - C:040FH LINE# 222 - C:040FH LINE# 223 - C:040FH LINE# 224 - C:0414H LINE# 225 - C:0418H LINE# 226 - C:041DH LINE# 227 - C:0421H LINE# 228 - C:0425H LINE# 229 - C:0429H LINE# 230 - C:042DH LINE# 231 - C:0431H LINE# 234 + C:0812H LINE# 227 + C:0812H LINE# 228 + C:0812H LINE# 229 + C:0817H LINE# 230 + C:081BH LINE# 231 + C:0820H LINE# 232 + C:0824H LINE# 233 + C:0828H LINE# 234 + C:082CH LINE# 235 + C:0830H LINE# 236 + C:0834H LINE# 239 ------- ENDPROC IO_INIT ------- PROC GETINPUT - C:0003H LINE# 249 - C:0003H LINE# 250 - C:0003H LINE# 252 - C:0007H LINE# 269 + C:0003H LINE# 254 + C:0003H LINE# 255 + C:0003H LINE# 257 + C:0007H LINE# 274 ------- ENDPROC GETINPUT ------- PROC _PUTOUTPUT D:0007H SYMBOL out - C:0008H LINE# 271 - C:0008H LINE# 272 - C:0008H LINE# 273 - C:000AH LINE# 289 + C:0008H LINE# 276 + C:0008H LINE# 277 + C:0008H LINE# 278 + C:000AH LINE# 294 ------- ENDPROC _PUTOUTPUT ------- PROC _UART3SENDPACKET - D:0048H SYMBOL str + D:0009H SYMBOL str D:0005H SYMBOL len -BL51 BANKED LINKER/LOCATER V6.22 03/17/2024 12:33:27 PAGE 7 - - ------- DO D:0007H SYMBOL i ------- ENDDO - C:03E9H LINE# 291 - C:03EFH LINE# 292 - C:03EFH LINE# 294 - C:03F6H LINE# 295 - C:03F6H LINE# 296 - C:03F9H LINE# 297 - C:0409H LINE# 298 - C:040BH LINE# 299 - C:040EH LINE# 300 + C:07C7H LINE# 296 + C:07CDH LINE# 297 + C:07CDH LINE# 299 + C:07D4H LINE# 300 + C:07D4H LINE# 301 + C:07D7H LINE# 302 + C:07E7H LINE# 303 + C:07E9H LINE# 304 + C:07ECH LINE# 305 +BL51 BANKED LINKER/LOCATER V6.22 06/13/2024 13:47:31 PAGE 7 + + ------- ENDPROC _UART3SENDPACKET - ------- PROC _SLPSENDPACKET - D:0001H SYMBOL str - D:0005H SYMBOL len - C:04B7H LINE# 301 - C:04B7H LINE# 302 - C:04B7H LINE# 303 - ------- ENDPROC _SLPSENDPACKET ------- PROC UART3RECVPACKET - C:0432H LINE# 306 - C:0432H LINE# 307 - C:0432H LINE# 308 - C:0439H LINE# 309 - C:043BH LINE# 310 - C:043CH LINE# 311 - C:043CH LINE# 312 - C:043EH LINE# 313 - C:0449H LINE# 314 - C:044CH LINE# 315 - C:044CH LINE# 316 + C:07EDH LINE# 312 + C:07EDH LINE# 313 + C:07EDH LINE# 314 + C:07F4H LINE# 315 + C:07F6H LINE# 316 + C:07F7H LINE# 317 + C:07F7H LINE# 318 + C:07F9H LINE# 319 + C:080EH LINE# 320 + C:0811H LINE# 321 + C:0811H LINE# 322 ------- ENDPROC UART3RECVPACKET ------- PROC UART1RECVPACKET - C:044DH LINE# 318 - C:044DH LINE# 319 - C:044DH LINE# 320 - C:0454H LINE# 321 - C:0456H LINE# 322 - C:0457H LINE# 323 - C:0457H LINE# 324 - C:0459H LINE# 325 - C:0464H LINE# 326 - C:0467H LINE# 327 - C:0467H LINE# 328 + C:0876H LINE# 324 + C:0876H LINE# 325 + C:0876H LINE# 326 + C:087DH LINE# 327 + C:087FH LINE# 328 + C:0880H LINE# 329 + C:0880H LINE# 330 + C:0882H LINE# 331 + C:088DH LINE# 332 + C:0890H LINE# 333 + C:0890H LINE# 334 ------- ENDPROC UART1RECVPACKET ------- PROC OTHERPROCESS - C:04BAH LINE# 330 - C:04BAH LINE# 331 - C:04BAH LINE# 346 + C:0019H LINE# 336 + C:0019H LINE# 337 + C:0019H LINE# 352 ------- ENDPROC OTHERPROCESS ------- PROC GETJUMPER ------- DO - D:0042H SYMBOL keys + D:0009H SYMBOL keys ------- ENDDO - C:01D2H LINE# 348 - C:01D2H LINE# 349 -BL51 BANKED LINKER/LOCATER V6.22 03/17/2024 12:33:27 PAGE 8 - - - C:01D2H LINE# 351 - C:01E2H LINE# 352 - C:01F4H LINE# 353 - C:0208H LINE# 354 - C:021DH LINE# 355 - C:0230H LINE# 356 - C:0244H LINE# 357 - C:024BH LINE# 358 - C:0252H LINE# 360 - C:0254H LINE# 361 + C:06CCH LINE# 354 + C:06CCH LINE# 355 + C:06CCH LINE# 357 + C:06DCH LINE# 358 + C:06EEH LINE# 359 + C:0702H LINE# 360 + C:0717H LINE# 361 + C:072AH LINE# 362 + C:073EH LINE# 363 + C:0745H LINE# 364 + C:074CH LINE# 366 + C:074EH LINE# 367 ------- ENDPROC GETJUMPER ------- PROC MAIN ------- DO - D:0041H SYMBOL daa + D:0008H SYMBOL daa ------- ENDDO - C:001EH LINE# 362 - C:001EH LINE# 363 - C:001EH LINE# 365 - C:0021H LINE# 368 - C:0024H LINE# 370 - C:0027H LINE# 374 - C:0029H LINE# 375 - C:002BH LINE# 379 - C:0030H LINE# 380 - C:0039H LINE# 381 - C:003FH LINE# 384 - C:003FH LINE# 385 - C:003FH LINE# 391 - C:0044H LINE# 392 - C:0047H LINE# 393 - C:0049H LINE# 396 - C:004CH LINE# 398 - C:004FH LINE# 400 - C:0053H LINE# 401 - C:0055H LINE# 402 - C:0057H LINE# 403 - C:0059H LINE# 405 - C:0059H LINE# 408 - C:005EH LINE# 412 - C:0061H LINE# 414 - C:0064H LINE# 418 - C:0067H LINE# 421 - C:006EH LINE# 423 - C:0076H LINE# 424 + C:074FH LINE# 368 + C:074FH LINE# 369 + C:074FH LINE# 371 + C:0752H LINE# 374 +BL51 BANKED LINKER/LOCATER V6.22 06/13/2024 13:47:31 PAGE 8 + + + C:0755H LINE# 376 + C:0758H LINE# 380 + C:075AH LINE# 381 + C:075CH LINE# 385 + C:0761H LINE# 386 + C:076AH LINE# 387 + C:0770H LINE# 388 + C:0782H LINE# 389 + C:0785H LINE# 390 + C:0788H LINE# 394 + C:0788H LINE# 395 + C:0788H LINE# 401 + C:078DH LINE# 402 + C:0790H LINE# 403 + C:0792H LINE# 406 + C:0795H LINE# 408 + C:079EH LINE# 410 + C:07A2H LINE# 411 + C:07A4H LINE# 412 + C:07A6H LINE# 413 + C:07A8H LINE# 415 + C:07A8H LINE# 418 + C:07ADH LINE# 422 + C:07B0H LINE# 424 + C:07B3H LINE# 428 + C:07B6H LINE# 431 + C:07BDH LINE# 433 + C:07C5H LINE# 434 ------- ENDPROC MAIN ------- ENDMOD MAIN ------- MODULE SLP C:0000H SYMBOL _ICE_DUMMY_ - D:0023H PUBLIC nCurStation - D:0024H PUBLIC SLPOKSign - D:0025H PUBLIC SendBuf - D:002DH PUBLIC SLPErrSign - D:002EH PUBLIC SLPSlaveCountOut - C:03C7H PUBLIC _SLPBCC - D:0030H PUBLIC SLPMasterRecved - D:0031H PUBLIC bSLPMaster -BL51 BANKED LINKER/LOCATER V6.22 03/17/2024 12:33:27 PAGE 9 - - - D:0032H PUBLIC SLPLostPkt - C:033FH PUBLIC SLPMasterSendPacket - D:0034H PUBLIC inputBuf - D:0039H PUBLIC outputBuf - C:02CFH PUBLIC SLPProcess - D:003EH PUBLIC nStation - D:003FH PUBLIC SLPinputB - D:0040H PUBLIC SLPoutputB - C:008EH PUBLIC _SLPparsePacket - ------- PROC L?0031 - ------- ENDPROC L?0031 + C:0053H PUBLIC _SLPInit + C:0857H PUBLIC _SLPSetCallBack + C:0835H PUBLIC _SLPBCC + C:058AH PUBLIC _SLPMasterSendPacket + C:0471H PUBLIC _SLPProcess + C:02D4H PUBLIC _SLPparsePacket ------- PROC _SLPBCC - D:0048H SYMBOL pBuf + D:0016H SYMBOL pBuf D:0005H SYMBOL len1 ------- DO D:0006H SYMBOL i D:0007H SYMBOL BCC ------- ENDDO - C:03C7H LINE# 23 - C:03CDH LINE# 24 - C:03CDH LINE# 26 - C:03CFH LINE# 27 - C:03D5H LINE# 28 - C:03D5H LINE# 29 - C:03E5H LINE# 30 - C:03E8H LINE# 31 - C:03E8H LINE# 32 + C:0835H LINE# 5 + C:083BH LINE# 6 + C:083BH LINE# 8 + C:083DH LINE# 9 + C:0843H LINE# 10 + C:0843H LINE# 11 + C:0853H LINE# 12 + C:0856H LINE# 13 + C:0856H LINE# 14 ------- ENDPROC _SLPBCC + ------- PROC _SLPINIT +BL51 BANKED LINKER/LOCATER V6.22 06/13/2024 13:47:31 PAGE 9 + + + D:0009H SYMBOL pSLP + D:000CH SYMBOL pFunc1 + C:0053H LINE# 16 + C:0059H LINE# 17 + C:0059H LINE# 18 + C:0062H LINE# 19 + C:006BH LINE# 20 + C:0083H LINE# 22 + ------- ENDPROC _SLPINIT + ------- PROC _SLPSETCALLBACK + D:0019H SYMBOL pSLP + D:001CH SYMBOL pFunc1 + C:0857H LINE# 24 + C:085DH LINE# 25 + C:085DH LINE# 26 + C:0875H LINE# 27 + ------- ENDPROC _SLPSETCALLBACK ------- PROC _SLPPARSEPACKET - D:0001H SYMBOL pRecvBuf - D:0005H SYMBOL len1 + D:0009H SYMBOL pSLP + D:000CH SYMBOL pRecvBuf + D:000FH SYMBOL len1 ------- DO - D:0042H SYMBOL pPacket + D:0010H SYMBOL pPacket ------- DO - D:0045H SYMBOL pRplyPkt + D:0013H SYMBOL pRplyPkt ------- ENDDO ------- ENDDO - C:008EH LINE# 34 - C:008EH LINE# 35 - C:008EH LINE# 37 - C:0094H LINE# 38 - C:009CH LINE# 40 - C:00B4H LINE# 41 - C:00B8H LINE# 42 - C:00B8H LINE# 43 - C:00BEH LINE# 44 - C:00BEH LINE# 46 - C:00C7H LINE# 47 - C:00CAH LINE# 48 - C:00CFH LINE# 49 - C:00DDH LINE# 50 - C:00DDH LINE# 51 - C:00DDH LINE# 53 - C:00E0H LINE# 54 - C:00E1H LINE# 55 - C:00E1H LINE# 56 - C:00E8H LINE# 57 -BL51 BANKED LINKER/LOCATER V6.22 03/17/2024 12:33:27 PAGE 10 + C:02D4H LINE# 29 + C:02DAH LINE# 30 + C:02DAH LINE# 32 + C:02E6H LINE# 33 + C:02EFH LINE# 35 + C:0308H LINE# 36 + C:0316H LINE# 37 + C:0316H LINE# 38 + C:0323H LINE# 39 + C:0323H LINE# 41 + C:033FH LINE# 42 + C:034CH LINE# 43 + C:0355H LINE# 44 + C:0382H LINE# 45 + C:0382H LINE# 46 + C:0382H LINE# 48 + C:0394H LINE# 49 + C:0394H LINE# 50 + C:0394H LINE# 51 + C:03A4H LINE# 52 + C:03A4H LINE# 54 + C:03B3H LINE# 55 + C:03D2H LINE# 56 + C:03E4H LINE# 57 + C:03EDH LINE# 59 + C:03F8H LINE# 60 + C:0410H LINE# 61 + C:0428H LINE# 62 + C:0445H LINE# 65 + C:0470H LINE# 66 +BL51 BANKED LINKER/LOCATER V6.22 06/13/2024 13:47:31 PAGE 10 - C:00E8H LINE# 59 - C:00F0H LINE# 60 - C:0100H LINE# 61 - C:0108H LINE# 62 - C:010DH LINE# 64 - C:0118H LINE# 65 - C:0126H LINE# 66 - C:012BH LINE# 67 - C:013BH LINE# 70 - C:0145H LINE# 71 - C:0145H LINE# 72 - C:0145H LINE# 73 - C:0145H LINE# 74 + C:0470H LINE# 67 + C:0470H LINE# 68 + C:0470H LINE# 69 ------- ENDPROC _SLPPARSEPACKET - ------- PROC SLPMASTERSENDPACKET + ------- PROC _SLPMASTERSENDPACKET + D:000CH SYMBOL pSLP ------- DO - D:0042H SYMBOL pReqPkt + D:000FH SYMBOL pReqPkt ------- ENDDO - C:033FH LINE# 76 - C:033FH LINE# 77 - C:033FH LINE# 79 - C:0348H LINE# 80 - C:034BH LINE# 82 - C:0356H LINE# 83 - C:0364H LINE# 84 - C:036DH LINE# 85 - C:037DH LINE# 88 - ------- ENDPROC SLPMASTERSENDPACKET - ------- PROC SLPPROCESS - ------- DO - D:0021H SYMBOL nCount - ------- ENDDO - C:02CFH LINE# 90 - C:02CFH LINE# 91 - C:02CFH LINE# 93 - C:02D3H LINE# 94 - C:02D3H LINE# 95 - C:02D9H LINE# 96 - C:02D9H LINE# 97 - C:02DDH LINE# 99 - C:02E0H LINE# 100 - C:02E6H LINE# 102 - C:02E8H LINE# 103 - C:02F0H LINE# 104 - C:02F9H LINE# 105 - C:02FCH LINE# 106 - C:02FFH LINE# 107 - C:02FFH LINE# 108 - C:02FFH LINE# 109 - C:0306H LINE# 110 - C:0308H LINE# 111 - C:030FH LINE# 112 - C:0312H LINE# 113 - C:0312H LINE# 114 - C:0315H LINE# 115 - C:0318H LINE# 116 - C:0318H LINE# 117 -BL51 BANKED LINKER/LOCATER V6.22 03/17/2024 12:33:27 PAGE 11 + C:058AH LINE# 71 + C:0590H LINE# 72 + C:0590H LINE# 74 + C:059CH LINE# 75 + C:05AAH LINE# 77 + C:05B5H LINE# 78 + C:05CDH LINE# 79 + C:05F8H LINE# 80 + C:0615H LINE# 83 + ------- ENDPROC _SLPMASTERSENDPACKET + ------- PROC _SLPPROCESS + D:0009H SYMBOL pSLP + C:0471H LINE# 86 + C:0477H LINE# 87 + C:0477H LINE# 88 + C:047FH LINE# 89 + C:047FH LINE# 90 + C:048CH LINE# 91 + C:048CH LINE# 92 + C:0494H LINE# 94 + C:049CH LINE# 95 + C:04B2H LINE# 97 + C:04B4H LINE# 98 + C:04C4H LINE# 99 + C:04D3H LINE# 100 + C:04E1H LINE# 101 + C:04E8H LINE# 102 + C:04E8H LINE# 103 + C:04E8H LINE# 104 + C:04FCH LINE# 105 + C:0504H LINE# 106 + C:0515H LINE# 107 + C:0523H LINE# 108 + C:0523H LINE# 109 + C:0530H LINE# 110 + C:0533H LINE# 111 + C:0533H LINE# 112 + C:0533H LINE# 113 + C:0535H LINE# 114 + C:0535H LINE# 115 + C:0545H LINE# 116 + C:0554H LINE# 117 + C:0554H LINE# 118 + C:0562H LINE# 119 + C:0564H LINE# 120 + C:057AH LINE# 121 + C:057AH LINE# 122 + C:057AH LINE# 123 +BL51 BANKED LINKER/LOCATER V6.22 06/13/2024 13:47:31 PAGE 11 - C:0318H LINE# 118 - C:031AH LINE# 119 - C:031AH LINE# 120 - C:0322H LINE# 121 - C:032BH LINE# 122 - C:032BH LINE# 123 - C:032EH LINE# 124 - C:0330H LINE# 125 - C:0336H LINE# 126 - C:0336H LINE# 127 - C:0336H LINE# 128 - C:033EH LINE# 129 - ------- ENDPROC SLPPROCESS + ------- ENDPROC _SLPPROCESS ------- ENDMOD SLP ------- MODULE MODBUS C:0000H SYMBOL _ICE_DUMMY_ - C:04BBH PUBLIC ModbusProcess - C:04AEH PUBLIC _ModbusparsePacket + C:001AH PUBLIC ModbusProcess + C:000EH PUBLIC _ModbusparsePacket ------- PROC _MODBUSPARSEPACKET - D:0042H SYMBOL pBuf - D:0045H SYMBOL len1 - C:04AEH LINE# 4 - C:04B6H LINE# 5 - C:04B6H LINE# 6 + D:0009H SYMBOL pBuf + D:000CH SYMBOL len1 + C:000EH LINE# 4 + C:0016H LINE# 5 + C:0016H LINE# 6 ------- ENDPROC _MODBUSPARSEPACKET ------- PROC MODBUSPROCESS - C:04BBH LINE# 8 - C:04BBH LINE# 9 - C:04BBH LINE# 12 + C:001AH LINE# 8 + C:001AH LINE# 9 + C:001AH LINE# 12 ------- ENDPROC MODBUSPROCESS ------- ENDMOD MODBUS ------- MODULE ?C?CLDPTR - C:0255H PUBLIC ?C?CLDPTR + C:008EH PUBLIC ?C?CLDPTR ------- ENDMOD ?C?CLDPTR ------- MODULE ?C?CLDOPTR - C:026EH PUBLIC ?C?CLDOPTR + C:00A7H PUBLIC ?C?CLDOPTR ------- ENDMOD ?C?CLDOPTR + ------- MODULE ?C?CILDOPTR + C:00D4H PUBLIC ?C?CILDOPTR + ------- ENDMOD ?C?CILDOPTR + ------- MODULE ?C?CSTPTR - C:029BH PUBLIC ?C?CSTPTR + C:0107H PUBLIC ?C?CSTPTR ------- ENDMOD ?C?CSTPTR ------- MODULE ?C?CSTOPTR - C:02ADH PUBLIC ?C?CSTOPTR + C:0119H PUBLIC ?C?CSTOPTR ------- ENDMOD ?C?CSTOPTR -*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS - SEGMENT: ?PR?_DELAY_MS?MAIN + ------- MODULE ?C?ILDOPTR + C:013BH PUBLIC ?C?ILDOPTR + ------- ENDMOD ?C?ILDOPTR -Program Size: data=74.2 xdata=0 code=1212 + ------- MODULE ?C?IILDOPTR + C:0173H PUBLIC ?C?IILDOPTR + ------- ENDMOD ?C?IILDOPTR + + ------- MODULE ?C?ISTOPTR + C:01C0H PUBLIC ?C?ISTOPTR + ------- ENDMOD ?C?ISTOPTR + + ------- MODULE ?C?PLDOPTR + C:01EDH PUBLIC ?C?PLDOPTR + ------- ENDMOD ?C?PLDOPTR + +BL51 BANKED LINKER/LOCATER V6.22 06/13/2024 13:47:31 PAGE 12 + + + ------- MODULE ?C?PSTOPTR + C:021DH PUBLIC ?C?PSTOPTR + ------- ENDMOD ?C?PSTOPTR + + ------- MODULE ?C?ICALL + C:0276H PUBLIC ?C?ICALL + C:027AH PUBLIC ?C?ICALL2 + ------- ENDMOD ?C?ICALL + + ------- MODULE ?C?IILDX + C:027CH PUBLIC ?C?IILDX + ------- ENDMOD ?C?IILDX + + ------- MODULE ?C?PLDIDATA + C:0292H PUBLIC ?C?PLDIDATA + ------- ENDMOD ?C?PLDIDATA + + ------- MODULE ?C?PSTIDATA + C:029BH PUBLIC ?C?PSTIDATA + ------- ENDMOD ?C?PSTIDATA + + ------- MODULE ?C?PLDXDATA + C:02A4H PUBLIC ?C?PLDXDATA + ------- ENDMOD ?C?PLDXDATA + + ------- MODULE ?C?PSTXDATA + C:02ADH PUBLIC ?C?PSTXDATA + ------- ENDMOD ?C?PSTXDATA + + ------- MODULE ?C?PLDPDATA + C:02B6H PUBLIC ?C?PLDPDATA + ------- ENDMOD ?C?PLDPDATA + + ------- MODULE ?C?PSTPDATA + C:02BFH PUBLIC ?C?PSTPDATA + ------- ENDMOD ?C?PSTPDATA + + ------- MODULE ?C?PLDCODE + C:02C8H PUBLIC ?C?PLDCODE + ------- ENDMOD ?C?PLDCODE + +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_SLPSETCALLBACK?SLP + +Program Size: data=92.2 xdata=0 code=2247 LINK/LOCATE RUN COMPLETE. 1 WARNING(S), 0 ERROR(S) diff --git a/KSingleLineBus/Objects/SLP.__i b/KSingleLineBus/Objects/SLP.__i new file mode 100644 index 0000000..1b0ed43 --- /dev/null +++ b/KSingleLineBus/Objects/SLP.__i @@ -0,0 +1 @@ +"SLP.c" OPTIMIZE (8,SPEED) BROWSE INCDIR(.\user;.\drivers) DEBUG OBJECTEXTEND PRINT(.\Listings\SLP.lst) TABS (2) OBJECT(.\Objects\SLP.obj) \ No newline at end of file diff --git a/KSingleLineBus/Objects/SLP.obj b/KSingleLineBus/Objects/SLP.obj index 63139ae..7e1dd60 100644 --- a/KSingleLineBus/Objects/SLP.obj +++ b/KSingleLineBus/Objects/SLP.obj Binary files differ diff --git a/KSingleLineBus/Objects/demo b/KSingleLineBus/Objects/demo index 8693cb6..900a275 100644 --- a/KSingleLineBus/Objects/demo +++ b/KSingleLineBus/Objects/demo Binary files differ diff --git a/KSingleLineBus/Objects/demo.hex b/KSingleLineBus/Objects/demo.hex deleted file mode 100644 index a1ba950..0000000 --- a/KSingleLineBus/Objects/demo.hex +++ /dev/null @@ -1,106 +0,0 @@ -:03000000020146B4 -:0C014600787FE4F6D8FD75814A02018D37 -:10048100011B00010800011C00010900021D000000 -:0A000E0000007F167E80DEFEDFFC9E -:0100180022C5 -:10049A00AD07AC06ED1DAE0470011C4E60051200DE -:0404AA000E80F122AD -:10007800EF1FAA0670011E4A60087D051DED60F09D -:0200880080FAFC -:01008A002253 -:03000B00020019D7 -:0100190032B4 -:03001B0002001AC6 -:01001A0032B3 -:1004680075AC1043AC4043D10275D5A075D4FF4399 -:09047800D10843BA0243AF082287 -:03008B00020387E6 -:10038700C0E0C0D075D000C000E5AC30E01653AC7B -:10039700FE7413251CF8A6ADE51CC394075002058F -:1003A7001C750900E5AC30E10553ACFDC201D00076 -:0503B700D0D0D0E032BF -:10040F00E4F594F593F592F5917596FFF595F5B2A0 -:10041F00F5B1F5B4F5B3F5CAF5C9F5CCF5CBF5E201 -:03042F00F5E122D2 -:05000300E580F4FF227E -:030008008FA022A4 -:0603E9008B488A49894A95 -:1003EF00E4FFEFC39D50182001FDAB48AA49A94A6D -:0F03FF008F8275830012026EF5ADD2010F80E37D -:01040E0022CB -:0304B7000203E954 -:10043200E509C394025003050922B2C67B007A0083 -:0B0442007913AD1C12008EE4F51C22A3 -:10044D00E508C394025003050822B2C67B007A006A -:0B045D00790BAD1B1204AEE4F51B226E -:0104BA00221F -:1001D200A2B6B3E4335401FFAE42EE54FE4FF542F1 -:1001E200A2B7B3E433540125E0FFAE42EE54FD4F13 -:1001F200F542A2C1B3E433540125E025E0FFAE424B -:10020200EE54FB4FF542A2C2B3E43354013333330D -:1002120054F8FFAE42EE54F74FF542A2C3B3E433B3 -:100222005401C454F0FFAE42EE54EF4FF542A2C463 -:10023200B3E4335401C43354E0FFAE42EE54DF4F13 -:10024200F542AF42EF54BFF542AF42EF547FF54261 -:02025200AF42B9 -:010254002287 -:10001E0085834112040F120468D2ACD2AF1201D202 -:10002E008F0AAF0AEFC4135401F531E50A540FF5E8 -:10003E003E1200038F0A850A3FB2C6120432120224 -:10004E00CFE52D6004C2C58002D2C5AF40120008B4 -:10005E0012044D1204BB1204BA7F647E00120078A3 -:0A006E00051EE51E70CB051D80C7BE -:0804910002320000022100000C -:0B03BC001202AD7B007A0079257D0362 -:0603C7008B488A49894AB7 -:1003CD00E4FFFEEEC39D5013AB48AA49A94A8E82A5 -:0B03DD0075830012026E2FFF0E80E8F7 -:0103E80022F2 -:10008E008B428A438944ED64046003020145ED14FA -:10009E00FD1203C7AB42AA43A94490000312026E9D -:1000AE006F6003020145E5316029120255B4691FE4 -:1000BE0090000112026EB52316753001E4F532F58B -:1000CE003390000212026EFF74342523F8A60785C2 -:0A00DE003540221202556449705D9E -:1000E800F545754600754725AB42AA43A9449000DB -:1000F8000112026E653E704590000212026EF540D4 -:10010800E4F52EF52FAB45AA46A947746912029B60 -:10011800AB45AA46A947900001E53E1202AD900002 -:1001280002E53F1203BCAB45AA46A947900003EF7E -:0D0138001202AD7B007A0079250D1204B78C -:010145002297 -:10033F00754200754300754425853F3AAB42AA4389 -:10034F00A944744912029BAB42AA43A944900001ED -:10035F00E5231202AD74392523F8E690000212034B -:10036F00BCAB42AA43A944900003EF1202AD7B003D -:08037F007A0079250D0204B794 -:1002CF00E5316047E522540F705DE530600B752412 -:1002DF0001E52D601B152D80170533E533700205E1 -:1002EF0032D3940AE53294004006752D14E4F524B8 -:1002FF00E53ED3940040300523E523D3953E4003DC -:10030F00752301E4F53012033F801C052FE52F7094 -:10031F0002052ED394C8E52E94004005752D6480F8 -:0F032F0006E52D6002152D0522E522700205213D -:01033E00229C -:0904AE008B428A4389448D4522EA -:0104BB00221E -:1001520002001EE493A3F8E493A34003F68001F2A5 -:1001620008DFF48029E493A3F85407240CC8C333AE -:10017200C4540F4420C8834004F456800146F6DF7D -:10018200E4800B0102040810204080900481E47E88 -:10019200019360BCA3FF543F30E509541FFEE49372 -:1001A200A360010ECF54C025E060A840B8E493A339 -:1001B200FAE493A3F8E493A3C8C582C8CAC583CA64 -:1001C200F0A3C8C582C8CAC583CADFE9DEE780BE1C -:010499000062 -:10025500BB010689828A83E0225002E722BBFE02A7 -:09026500E32289828A83E49322DA -:10026E00BB010CE58229F582E5833AF583E0225045 -:10027E0006E92582F8E622BBFE06E92582F8E2228F -:0D028E00E58229F582E5833AF583E49322A9 -:10029B00BB010689828A83F0225002F722BBFE0142 -:0202AB00F3223C -:1002AD00F8BB010DE58229F582E5833AF583E8F087 -:1002BD00225006E92582C8F622BBFE05E92582C833 -:0202CD00F2221B -:00000001FF diff --git a/KSingleLineBus/Objects/main.obj b/KSingleLineBus/Objects/main.obj index 48f584a..ad95e31 100644 --- a/KSingleLineBus/Objects/main.obj +++ b/KSingleLineBus/Objects/main.obj Binary files differ diff --git a/KSingleLineBus/SLP.c b/KSingleLineBus/SLP.c index 8fce5cb..e0b4fc8 100644 --- a/KSingleLineBus/SLP.c +++ b/KSingleLineBus/SLP.c @@ -1,24 +1,6 @@ - #include "SLP.h" -void SLPSendPacket(char * buf, uchar len1); -uchar bSLPMaster; -uchar nStation; -uchar SLPinputB; -uchar SLPoutputB; -uchar nCurStation; -uchar inputBuf[5]; -uchar outputBuf[5]; - -uchar SendBuf[8]; - -uchar SLPMasterRecved; //主机收到子机回复 -unsigned int SLPSlaveCountOut; - -unsigned int SLPLostPkt=0; // 丢包数量 - -uchar SLPOKSign; -uchar SLPErrSign; +//void SLPSendPacket(char * buf, uchar len1); uchar SLPBCC(char * pBuf, uchar len1) { @@ -31,99 +13,112 @@ return BCC; } -void SLPparsePacket(char * pRecvBuf, uchar len1) +void SLPInit(stSLPDef * pSLP, SLPSendPktDef pFunc1) +{ + pSLP->SLPLostPkt = 0; + pSLP->nCount = 0; + pSLP->SLPSendPktFunc = pFunc1; + +} + +void SLPSetCallBack(stSLPDef * pSLP, SLPSendPktDef pFunc1) +{ + pSLP->SLPSendPktFunc = pFunc1; +} + +void SLPparsePacket(stSLPDef * pSLP, char * pRecvBuf, uchar len1) { stSLPPacket * pPacket = (stSLPPacket *)pRecvBuf; if (len1 != sizeof(stSLPPacket)) return; // if (pPacket->ED != EDsign) return; if (pPacket->BCC != SLPBCC(pRecvBuf,len1-1)) return; - if (bSLPMaster) //master + if (pSLP->bSLPMaster) //master { if (pPacket->ST ==ST_S) { //check - if (pPacket->Dst == nCurStation) { - SLPMasterRecved=1; - SLPLostPkt=0; - inputBuf[nCurStation] = pPacket->Data; + if (pPacket->Dst == pSLP->nCurStation) { + pSLP->SLPMasterRecved=1; + pSLP->SLPLostPkt=0; + pSLP->inputBuf[pSLP->nCurStation] = pPacket->Data; } } // SLPoutputB = (inputBuf[1] &0x0f) | ((inputBuf[2] &0x0f) << 4); - SLPoutputB = inputBuf[1]; + pSLP->SLPoutputB = pSLP->inputBuf[1]; }else { //slave if (pPacket->ST==ST_M) { //check - stSLPPacket * pRplyPkt = (stSLPPacket *)SendBuf; - if (pPacket->Dst == nStation) { - SLPoutputB = pPacket->Data; - SLPSlaveCountOut=0; + stSLPPacket * pRplyPkt = (stSLPPacket *)pSLP->SendBuf; + if (pPacket->Dst == pSLP->nStation) { + pSLP->SLPoutputB = pPacket->Data; + pSLP->SLPSlaveCountOut=0; pRplyPkt->ST = ST_S; - pRplyPkt->Dst = nStation; - pRplyPkt->Data = SLPinputB; - pRplyPkt->BCC = SLPBCC(SendBuf, sizeof(stSLPPacket)-1); + pRplyPkt->Dst = pSLP->nStation; + pRplyPkt->Data = pSLP->SLPinputB; + pRplyPkt->BCC = SLPBCC(pSLP->SendBuf, sizeof(stSLPPacket)-1); // pRplyPkt->ED = EDsign; - SLPSendPacket(SendBuf,sizeof(stSLPPacket)); + pSLP->SLPSendPktFunc(pSLP->SendBuf,sizeof(stSLPPacket)); } } } } -void SLPMasterSendPacket(void) +void SLPMasterSendPacket(stSLPDef * pSLP) { - stSLPPacket * pReqPkt = (stSLPPacket *)SendBuf; - outputBuf[1]=SLPinputB ;//&0xf; + stSLPPacket * pReqPkt = (stSLPPacket *)pSLP->SendBuf; + pSLP->outputBuf[1]=pSLP->SLPinputB ;//&0xf; // outputBuf[2] = (SLPinputB & 0xf0) >> 4; pReqPkt->ST = ST_M; - pReqPkt->Dst = nCurStation; - pReqPkt->Data = outputBuf[nCurStation]; ; - pReqPkt->BCC = SLPBCC(SendBuf, sizeof(stSLPPacket)-1); + pReqPkt->Dst = pSLP->nCurStation; + pReqPkt->Data = pSLP->outputBuf[pSLP->nCurStation]; ; + pReqPkt->BCC = SLPBCC(pSLP->SendBuf, sizeof(stSLPPacket)-1); // pReqPkt->ED = EDsign; - SLPSendPacket(SendBuf,sizeof(stSLPPacket)); + pSLP->SLPSendPktFunc(pSLP->SendBuf,sizeof(stSLPPacket)); } -void SLPProcess(void) + +void SLPProcess(stSLPDef * pSLP) { - static int nCount =0; - if (bSLPMaster) //master + if (pSLP->bSLPMaster) //master { - if ( (nCount & 0xf) == 0 ) + if ( (pSLP->nCount & 0xf) == 0 ) { //time up - if (SLPMasterRecved) { + if (pSLP->SLPMasterRecved) { // SLPMasterRecved=0; - SLPOKSign = 1; - if (SLPErrSign) SLPErrSign--; + pSLP->SLPOKSign = 1; + if (pSLP->SLPErrSign) pSLP->SLPErrSign--; }else { - SLPLostPkt++; - if (SLPLostPkt > 10) { - SLPErrSign=20; - SLPOKSign = 0; + pSLP->SLPLostPkt++; + if (pSLP->SLPLostPkt > 10) { + pSLP->SLPErrSign=20; + pSLP->SLPOKSign = 0; } } - if (nStation >0) { - nCurStation++; - if (nCurStation > nStation) { - nCurStation =1; + if (pSLP->nStation >0) { + pSLP->nCurStation++; + if (pSLP->nCurStation > pSLP->nStation) { + pSLP->nCurStation =1; } - SLPMasterRecved=0; - SLPMasterSendPacket(); + pSLP->SLPMasterRecved=0; + SLPMasterSendPacket(pSLP); } } }else { - SLPSlaveCountOut ++; - if (SLPSlaveCountOut >200) // 20mS + pSLP->SLPSlaveCountOut ++; + if (pSLP->SLPSlaveCountOut >200) // 20mS { - SLPErrSign=100; + pSLP->SLPErrSign=100; }else { - if (SLPErrSign) SLPErrSign--; + if (pSLP->SLPErrSign) pSLP->SLPErrSign--; } } - nCount++; + pSLP->nCount++; } diff --git a/KSingleLineBus/SLP.h b/KSingleLineBus/SLP.h index 9324d44..bb2c85a 100644 --- a/KSingleLineBus/SLP.h +++ b/KSingleLineBus/SLP.h @@ -19,14 +19,48 @@ // uchar ED; }stSLPPacket; -extern uchar bSLPMaster; -extern uchar nStation; -extern uchar SLPinputB; -extern uchar SLPoutputB; -extern uchar SLPErrSign; +//extern uchar bSLPMaster; +//extern uchar nStation; +//extern uchar SLPinputB; +//extern uchar SLPoutputB; +//extern uchar SLPErrSign; -void SLPparsePacket(char * pBuf, uchar len1); -void SLPMasterSendPacket(void); -void SLPProcess(void); +typedef void (*SLPSendPktDef)(char * pBuf, int Len1); + + +typedef struct tagSLPDef +{ + uchar bSLPMaster; + uchar nStation; + uchar SLPinputB; + uchar SLPoutputB; + uchar nCurStation; + uchar inputBuf[5]; + uchar outputBuf[5]; + + uchar SendBuf[8]; + + uchar SLPMasterRecved; //主机收到子机回复 + + SLPSendPktDef SLPSendPktFunc; + + unsigned int SLPSlaveCountOut; + + unsigned int SLPLostPkt; // 丢包数量 + + uchar SLPOKSign; + uchar SLPErrSign; + + int nCount; + +}stSLPDef; + +void SLPInit(stSLPDef * pSLP, SLPSendPktDef pFunc1); +void SLPSetCallBack(stSLPDef * pSLP, SLPSendPktDef pFunc1); + +void SLPparsePacket(stSLPDef * pSLP, char * pBuf, uchar len1); +void SLPMasterSendPacket(stSLPDef * pSLP); +void SLPProcess(stSLPDef * pSLP); + #endif /* __SLP_H_V10__ */ \ No newline at end of file diff --git a/KSingleLineBus/user/main.c b/KSingleLineBus/user/main.c index 4ca5711..768e02e 100644 --- a/KSingleLineBus/user/main.c +++ b/KSingleLineBus/user/main.c @@ -74,6 +74,10 @@ int nCount=0; +stSLPDef SLP1; + +unsigned char bSLPMaster; +unsigned char nSLPStation; void PutOutput(uchar a); @@ -94,6 +98,8 @@ }Coils; Coils inputdata; + +/* void Delay1ms() //@22.1184MHz { uchar data i, j; @@ -108,7 +114,6 @@ } while (--i); } - void Delay_ms(uint n) { while(n--) @@ -117,7 +122,7 @@ } } - +*/ void Delay_us(uint n) { uchar data j; @@ -298,11 +303,12 @@ uart3busy=1; } } +/* void SLPSendPacket(char * str, uchar len) { Uart3SendPacket(str,len); } - +*/ void Uart3RecvPacket() { if (uart3recvtimeout <2){ @@ -310,7 +316,7 @@ }else { /// recieved packet; RUN=~RUN; //闪灯 - SLPparsePacket(uart3recvbuf,uart3recvlen); + SLPparsePacket(&SLP1,uart3recvbuf,uart3recvlen); uart3recvlen =0; } } @@ -378,7 +384,11 @@ inputdata.Byte = GetJumper(); bSLPMaster = inputdata.bits.b5 ; //master? - nStation = inputdata.Byte & 0x0f; + nSLPStation = inputdata.Byte & 0x0f; + SLPInit(&SLP1,Uart3SendPacket); + SLP1.bSLPMaster = bSLPMaster; + SLP1.nStation = nSLPStation; + // bSLPMaster=1; while(1) @@ -389,15 +399,15 @@ // Get Input Port; inputdata.Byte = GetInput(); - SLPinputB = inputdata.Byte; + SLP1.SLPinputB = inputdata.Byte; RUN =~ RUN; // Delay_ms(1); // receive packet Uart3RecvPacket(); // Process Packet - SLPProcess(); + SLPProcess(&SLP1); - if (SLPErrSign) { + if (SLP1.SLPErrSign) { ERR = 0; }else { ERR =1; @@ -405,7 +415,7 @@ } // Set Ouput Port - PutOutput(SLPoutputB); + PutOutput(SLP1.SLPoutputB); // receive packet diff --git a/MDK-ARM/EXT_FPX/F030C8T6_Ext_FPx.sct b/MDK-ARM/EXT_FPX/F030C8T6_Ext_FPx.sct deleted file mode 100644 index 550bc5a..0000000 --- a/MDK-ARM/EXT_FPX/F030C8T6_Ext_FPx.sct +++ /dev/null @@ -1,15 +0,0 @@ -; ************************************************************* -; *** Scatter-Loading Description File generated by uVision *** -; ************************************************************* - -LR_IROM1 0x08001000 0x0000F000 { ; load region size_region - ER_IROM1 0x08001000 0x0000F000 { ; load address = execution address - *.o (RESET, +First) - *(InRoot$$Sections) - .ANY (+RO) - } - RW_IRAM1 0x200000C0 0x00001F40 { ; RW data - .ANY (+RW +ZI) - } -} - diff --git a/MDK-ARM/F030C8T6_KAD.uvprojx "b/MDK-ARM/F030C8T6_KAD_4\350\267\257\346\250\241\346\213\237\351\207\217.uvprojx" similarity index 100% rename from MDK-ARM/F030C8T6_KAD.uvprojx rename to "MDK-ARM/F030C8T6_KAD_4\350\267\257\346\250\241\346\213\237\351\207\217.uvprojx" diff --git a/MDK-ARM/F030C8T6_KBox.uvprojx "b/MDK-ARM/F030C8T6_KBox_\346\216\247\345\210\266\347\233\222\345\255\220.uvprojx" similarity index 100% rename from MDK-ARM/F030C8T6_KBox.uvprojx rename to "MDK-ARM/F030C8T6_KBox_\346\216\247\345\210\266\347\233\222\345\255\220.uvprojx" diff --git a/MDK-ARM/F030C8T6_KNet.uvprojx "b/MDK-ARM/F030C8T6_KNet_\347\275\221\345\217\243\346\250\241\345\235\227.uvprojx" similarity index 100% rename from MDK-ARM/F030C8T6_KNet.uvprojx rename to "MDK-ARM/F030C8T6_KNet_\347\275\221\345\217\243\346\250\241\345\235\227.uvprojx" diff --git a/MDK-ARM/F030C8T6_Radio/F030C8T6_Radio_LLCC68.sct b/MDK-ARM/F030C8T6_Radio/F030C8T6_Radio_LLCC68.sct deleted file mode 100644 index bfd263c..0000000 --- a/MDK-ARM/F030C8T6_Radio/F030C8T6_Radio_LLCC68.sct +++ /dev/null @@ -1,15 +0,0 @@ -; ************************************************************* -; *** Scatter-Loading Description File generated by uVision *** -; ************************************************************* - -LR_IROM1 0x08000000 0x00010000 { ; load region size_region - ER_IROM1 0x08000000 0x00010000 { ; load address = execution address - *.o (RESET, +First) - *(InRoot$$Sections) - .ANY (+RO) - } - RW_IRAM1 0x20000000 0x00002000 { ; RW data - .ANY (+RW +ZI) - } -} - diff --git a/MDK-ARM/F030C8T6_KLink.uvprojx b/MDK-ARM/KLink_C8T6.uvprojx similarity index 100% rename from MDK-ARM/F030C8T6_KLink.uvprojx rename to MDK-ARM/KLink_C8T6.uvprojx diff --git a/MDK-ARM/F030C8T6_KMini.uvprojx b/MDK-ARM/KMini_C8T6.uvprojx similarity index 100% rename from MDK-ARM/F030C8T6_KMini.uvprojx rename to MDK-ARM/KMini_C8T6.uvprojx diff --git a/MDK-ARM/F030CCT6_KMini.uvprojx b/MDK-ARM/KMini_New_CCT6.uvprojx similarity index 96% rename from MDK-ARM/F030CCT6_KMini.uvprojx rename to MDK-ARM/KMini_New_CCT6.uvprojx index c9a9f02..b7c99c8 100644 --- a/MDK-ARM/F030CCT6_KMini.uvprojx +++ b/MDK-ARM/KMini_New_CCT6.uvprojx @@ -544,6 +544,16 @@ <FileType>5</FileType> <FilePath>..\KMini_CCT6\Inc\lidar.h</FilePath> </File> + <File> + <FileName>LindarPos.h</FileName> + <FileType>5</FileType> + <FilePath>..\KMini_CCT6\Inc\LindarPos.h</FilePath> + </File> + <File> + <FileName>OrdLidar.h</FileName> + <FileType>5</FileType> + <FilePath>..\KMini_CCT6\Inc\OrdLidar.h</FilePath> + </File> </Files> </Group> <Group> @@ -583,6 +593,16 @@ <FileName>lidar.c</FileName> <FileType>1</FileType> <FilePath>..\KMini_CCT6\Src\lidar.c</FilePath> + </File> + <File> + <FileName>LidarPos.c</FileName> + <FileType>1</FileType> + <FilePath>..\KMini_CCT6\Src\LidarPos.c</FilePath> + </File> + <File> + <FileName>OrdLidar.c</FileName> + <FileType>1</FileType> + <FilePath>..\KMini_CCT6\Src\OrdLidar.c</FilePath> </File> </Files> </Group> @@ -714,6 +734,11 @@ <FileType>1</FileType> <FilePath>..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_ll_tim.c</FilePath> </File> + <File> + <FileName>stm32f0xx_ll_flash.c</FileName> + <FileType>1</FileType> + <FilePath>..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_ll_flash.c</FilePath> + </File> </Files> </Group> <Group> diff --git a/MDK-ARM/F030C8T6_KPLC.uvprojx "b/MDK-ARM/KPLC_C8T6_\347\256\200\346\230\223PLC.uvprojx" similarity index 98% rename from MDK-ARM/F030C8T6_KPLC.uvprojx rename to "MDK-ARM/KPLC_C8T6_\347\256\200\346\230\223PLC.uvprojx" index 005357c..c9e9d7a 100644 --- a/MDK-ARM/F030C8T6_KPLC.uvprojx +++ "b/MDK-ARM/KPLC_C8T6_\347\256\200\346\230\223PLC.uvprojx" @@ -272,8 +272,8 @@ </OCR_RVCT3> <OCR_RVCT4> <Type>1</Type> - <StartAddress>0x8000000</StartAddress> - <Size>0x10000</Size> + <StartAddress>0x8001000</StartAddress> + <Size>0xf000</Size> </OCR_RVCT4> <OCR_RVCT5> <Type>1</Type> @@ -297,8 +297,8 @@ </OCR_RVCT8> <OCR_RVCT9> <Type>0</Type> - <StartAddress>0x20000000</StartAddress> - <Size>0x2000</Size> + <StartAddress>0x200000c0</StartAddress> + <Size>0x1f40</Size> </OCR_RVCT9> <OCR_RVCT10> <Type>0</Type> @@ -689,6 +689,11 @@ <FileType>1</FileType> <FilePath>..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_ll_tim.c</FilePath> </File> + <File> + <FileName>stm32f0xx_ll_flash.c</FileName> + <FileType>1</FileType> + <FilePath>..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_ll_flash.c</FilePath> + </File> </Files> </Group> <Group> diff --git a/MDK-ARM/RTE/_F030C8T6_KBus/RTE_Components.h b/MDK-ARM/RTE/_F030C8T6_KBus/RTE_Components.h index ab685d8..202407c 100644 --- a/MDK-ARM/RTE/_F030C8T6_KBus/RTE_Components.h +++ b/MDK-ARM/RTE/_F030C8T6_KBus/RTE_Components.h @@ -3,7 +3,7 @@ * Auto generated Run-Time-Environment Component Configuration File * *** Do not modify ! *** * - * Project: 'F030C8T6_KBus' + * Project: 'KBus_C8T6_8路16路模块' * Target: 'F030C8T6_KBus' */ diff --git a/MDK-ARM/RTE/_F030C8T6_KLink/RTE_Components.h b/MDK-ARM/RTE/_F030C8T6_KLink/RTE_Components.h index d7b78c0..c0bfece 100644 --- a/MDK-ARM/RTE/_F030C8T6_KLink/RTE_Components.h +++ b/MDK-ARM/RTE/_F030C8T6_KLink/RTE_Components.h @@ -3,7 +3,7 @@ * Auto generated Run-Time-Environment Component Configuration File * *** Do not modify ! *** * - * Project: 'F030C8T6_KLink' + * Project: 'KLink_C8T6' * Target: 'F030C8T6_KLink' */ diff --git a/MDK-ARM/RTE/_F030C8T6_KNet/RTE_Components.h b/MDK-ARM/RTE/_F030C8T6_KNet/RTE_Components.h index 1f46491..253b2c6 100644 --- a/MDK-ARM/RTE/_F030C8T6_KNet/RTE_Components.h +++ b/MDK-ARM/RTE/_F030C8T6_KNet/RTE_Components.h @@ -3,7 +3,7 @@ * Auto generated Run-Time-Environment Component Configuration File * *** Do not modify ! *** * - * Project: 'F030C8T6_KNet' + * Project: 'F030C8T6_KNet_网口模块' * Target: 'F030C8T6_KNet' */ diff --git a/MDK-ARM/F030C8T6_Radio_LLCC68.uvprojx "b/MDK-ARM/Radio_LLCC68_C8T6_8\350\267\257\346\227\240\347\272\277\346\250\241\345\235\227.uvprojx" similarity index 96% rename from MDK-ARM/F030C8T6_Radio_LLCC68.uvprojx rename to "MDK-ARM/Radio_LLCC68_C8T6_8\350\267\257\346\227\240\347\272\277\346\250\241\345\235\227.uvprojx" index ab25e35..b313caa 100644 --- a/MDK-ARM/F030C8T6_Radio_LLCC68.uvprojx +++ "b/MDK-ARM/Radio_LLCC68_C8T6_8\350\267\257\346\227\240\347\272\277\346\250\241\345\235\227.uvprojx" @@ -48,7 +48,7 @@ <InvalidFlash>1</InvalidFlash> </TargetStatus> <OutputDirectory>.\F030C8T6_Radio\</OutputDirectory> - <OutputName>F030C8T6_Radio_LLCC68</OutputName> + <OutputName>Radio_LLCC68</OutputName> <CreateExecutable>1</CreateExecutable> <CreateLib>0</CreateLib> <CreateHexFile>1</CreateHexFile> @@ -272,8 +272,8 @@ </OCR_RVCT3> <OCR_RVCT4> <Type>1</Type> - <StartAddress>0x8000000</StartAddress> - <Size>0x10000</Size> + <StartAddress>0x8001000</StartAddress> + <Size>0xf000</Size> </OCR_RVCT4> <OCR_RVCT5> <Type>1</Type> @@ -297,8 +297,8 @@ </OCR_RVCT8> <OCR_RVCT9> <Type>0</Type> - <StartAddress>0x20000000</StartAddress> - <Size>0x2000</Size> + <StartAddress>0x200000c0</StartAddress> + <Size>0x1f40</Size> </OCR_RVCT9> <OCR_RVCT10> <Type>0</Type> @@ -310,7 +310,7 @@ </ArmAdsMisc> <Cads> <interw>1</interw> - <Optim>4</Optim> + <Optim>7</Optim> <oTime>0</oTime> <SplitLS>0</SplitLS> <OneElfS>1</OneElfS> @@ -324,8 +324,8 @@ <uSurpInc>0</uSurpInc> <uC99>1</uC99> <useXO>0</useXO> - <v6Lang>1</v6Lang> - <v6LangP>1</v6LangP> + <v6Lang>3</v6Lang> + <v6LangP>3</v6LangP> <vShortEn>1</vShortEn> <vShortWch>1</vShortWch> <v6Lto>0</v6Lto> @@ -544,6 +544,11 @@ <FileType>5</FileType> <FilePath>..\Radio_LLCC68\Inc\stm32f0xx_hal_conf.h</FilePath> </File> + <File> + <FileName>ATModem.h</FileName> + <FileType>5</FileType> + <FilePath>..\Radio_LLCC68\Inc\ATModem.h</FilePath> + </File> </Files> </Group> <Group> @@ -558,6 +563,11 @@ <FileName>BoardType.c</FileName> <FileType>1</FileType> <FilePath>..\Radio_LLCC68\Src\BoardType.c</FilePath> + </File> + <File> + <FileName>ATModem.c</FileName> + <FileType>1</FileType> + <FilePath>..\Radio_LLCC68\Src\ATModem.c</FilePath> </File> </Files> </Group> @@ -734,6 +744,11 @@ <FileType>1</FileType> <FilePath>..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_ll_tim.c</FilePath> </File> + <File> + <FileName>stm32f0xx_ll_flash.c</FileName> + <FileType>1</FileType> + <FilePath>..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_ll_flash.c</FilePath> + </File> </Files> </Group> </Groups> diff --git a/Radio_LLCC68/Inc/ATModem.h b/Radio_LLCC68/Inc/ATModem.h new file mode 100644 index 0000000..7f4bada --- /dev/null +++ b/Radio_LLCC68/Inc/ATModem.h @@ -0,0 +1,32 @@ +#ifndef __ATMODEM_H_V10__ +#define __ATMODEM_H_V10__ + +typedef unsigned char uchar; + +enum ATCmds +{ + ST_M = 0x49, + ST_S = 0x69, + EDsign = 0x0d, +}; + +typedef void (*ATSendPktDef)(char * pBuf, int Len1); + + +typedef struct tagATModemDef +{ + ATSendPktDef ATSendPktFunc; + uchar inputBuf[5]; + uchar outputBuf[5]; + uchar SendBuf[8]; + +}stATModemDef; + +void ATInit(stATModemDef * pATModem, ATSendPktDef pFunc1); +void ATSetCallBack(stATModemDef * pATModem, ATSendPktDef pFunc1); + +int ATParsePacket(stATModemDef * pATModem, char * pBuf, uchar len1); +void ATProcess(stATModemDef * pATModem); + + +#endif /* __ATMODEM_H_V10__ */ diff --git a/Radio_LLCC68/Inc/BoardType.h b/Radio_LLCC68/Inc/BoardType.h index a5552c0..dcc84de 100644 --- a/Radio_LLCC68/Inc/BoardType.h +++ b/Radio_LLCC68/Inc/BoardType.h @@ -45,7 +45,7 @@ }; -#define BOARD_TYPE 15 +#define BOARD_TYPE 16 #define BOARD_VER 1 #if (BOARD_TYPE == 11) @@ -58,22 +58,70 @@ #define GetBoardType() (BOARD_TYPE) +#define PLCFUNC 1 + #if ( BOARD_TYPE == 1) #define DINPUT 4 #define DOUTPUT 4 -#elif (BOARD_TYPE == 2 || BOARD_TYPE == 4 || BOARD_TYPE == 6 || BOARD_TYPE == 8 || BOARD_TYPE == 10 || BOARD_TYPE == 11 || BOARD_TYPE == 16) +#elif (BOARD_TYPE == 2 || BOARD_TYPE == 4 || BOARD_TYPE == 6 || BOARD_TYPE == 8 || BOARD_TYPE == 10 || BOARD_TYPE == 11 ) #define DINPUT 8 #define DOUTPUT 8 -#elif BOARD_TYPE == 3 || BOARD_TYPE == 5 || BOARD_TYPE == 7 || BOARD_TYPE == 9 || BOARD_TYPE == 13 || BOARD_TYPE == 15 +#elif BOARD_TYPE == 3 || BOARD_TYPE == 5 || BOARD_TYPE == 7 || BOARD_TYPE == 9 || BOARD_TYPE == 13 #define DINPUT 16 #define DOUTPUT 16 #elif BOARD_TYPE == 14 #define DINPUT 0 #define DOUTPUT 6 +#elif (BOARD_TYPE == 15) +#define DINPUT 16 +#define DOUTPUT 16 +#elif (BOARD_TYPE == 16) +#define DINPUT 16 +#define DOUTPUT 16 +#define EXDINPUT 8 +#define EXDOUPUT 8 #else #define DINPUT 0 #define DOUTPUT 0 #endif +typedef struct tagInfoBlockHdr { + unsigned short nBlkSign; // 开始标志 + unsigned short nBlkTypeVer; // 类型和版本 + unsigned short nBlkSize; // Block 大小, 包括开始和结束标志 + unsigned short Pad1; +}stInfoBlockHdr; + +typedef struct tagInfoBlockTail { + + unsigned short CRC16; + unsigned short EndSign; +}stInfoBlockTail; + +typedef struct tagBtLdrInfoBlock { + stInfoBlockHdr Hdr; + unsigned short nBtldrVer; + unsigned short nBtldrDevice; + unsigned short nBtldrSize; // 设计大小 + unsigned short nBtldrDataSize; //代码大小 + unsigned int nBtldr_AppAddr; + unsigned int nBtldr_NewAppInfoAddr; + unsigned int nBtldr_NewAppAddr; + stInfoBlockTail tail; +}stBtLdrInfoBlock, *pBtLdrInfoBlock; + +typedef struct tagAppInfoBlock { + stInfoBlockHdr Hdr; + unsigned short nAppVer; + unsigned short nAppDevice; + unsigned short nAppSize; // 代码设计大小 + unsigned short nAppDataSize; //实际代码大小 + unsigned int nAppStartAddr; + unsigned int nAppStartOffset; + unsigned int nApp; + stInfoBlockTail tail; +}stAppInfoBlock, * pAppInfoBlock; + + #endif /* __BOARDTYPE_H__ */ diff --git a/Radio_LLCC68/Inc/main.h b/Radio_LLCC68/Inc/main.h index 67a1955..81823cb 100644 --- a/Radio_LLCC68/Inc/main.h +++ b/Radio_LLCC68/Inc/main.h @@ -74,7 +74,9 @@ /* #define USE_FULL_ASSERT 1U */ /* USER CODE BEGIN Private defines */ +#include "KBus.h" +extern stKBusDef KBus1; /* USER CODE END Private defines */ #ifdef __cplusplus diff --git a/Radio_LLCC68/Radio/KWireLess.c b/Radio_LLCC68/Radio/KWireLess.c index cb2c987..07f25d8 100644 --- a/Radio_LLCC68/Radio/KWireLess.c +++ b/Radio_LLCC68/Radio/KWireLess.c @@ -20,6 +20,7 @@ #define USE_MODEM_LORA //#define USE_MODEM_FSK +/* #define REGION_CN779 #if defined( REGION_AS923 ) @@ -59,9 +60,45 @@ #error "Please define a frequency band in the compiler options." #endif +*/ +/* +#if defined( USE_MODEM_LORA ) +#define LORA_BANDWIDTH 1 // [0: 125 kHz, + // 1: 250 kHz, + // 2: 500 kHz, + // 3: Reserved] +#define LORA_SPREADING_FACTOR 8 // [SF5..SF12] +#define LORA_CODINGRATE 4 // [1: 4/5, + // 2: 4/6, + // 3: 4/7, + // 4: 4/8] +#define LORA_PREAMBLE_LENGTH 4 // Same for Tx and Rx + +*/ +#define LORA_SYMBOL_TIMEOUT 0 // Symbols +#define LORA_FIX_LENGTH_PAYLOAD_ON false +#define LORA_IQ_INVERSION_ON false + +/* +#elif defined( USE_MODEM_FSK ) + +#define FSK_FDEV 20e3 // Hz +#define FSK_DATARATE 19.2e3 // bps +#define FSK_BANDWIDTH 60e3 // Hz >> DSB in sx126x +#define FSK_AFC_BANDWIDTH 200e3 // Hz +#define FSK_PREAMBLE_LENGTH 5 // Same for Tx and Rx +#define FSK_FIX_LENGTH_PAYLOAD_ON false + +#else + #error "Please define a modem in the compiler options." +#endif +*/ +/* #define nChannelSpacing 530000 // Hz #define TX_OUTPUT_POWER 16 // 22 dBm +*/ + extern bool IrqFired; @@ -75,38 +112,30 @@ * Radio events function pointer */ +const stWLConfig defaultWLConfig = +{ + .RF_T_Freq = 430620000, // uint32_t Hz + .RF_R_Freq = 430620000, //uint32_t //Hz + .nChnSpacing = 530, // uint16_t ChannelSpacing; //kHz + .workMode = 1, // uchar workMode; //0: FSK, 1: LoRa + .Tx_Power = 22, // uchar Tx_Power; + .LoraBandWidth = 0, // uchar LoraBandWidth; // [0: 125 kHz, 1: 250 kHz, 2: 500 kHz, 3: Reserved ] + .LoRaFactor = 5, // uchar LoRaFactor; // [SF5 .. SF 12] + .LoRaCodingRate = 1, // uchar LoRaCodingRate; // [1 : 4/5, 2: 4/6, 3: 4/7, 4: 4/8 + .NetWorkAddr = 0x00, // uint8_t NetWorkAddr; + .DeviceAddr = 0x0102, // uint16_t DeviceAddr; + .bEnableAddr = 0, // uchar bEnableAddr; + .bEnableEncrypt = 0, // uchar bEnableEncrypt; + .bEnableRelay = 0, // uchar bEnableRelay; + .LoRaPreambleLen = 4, // uchar LoRaPreamble_Len; // 2 - 12 + .bAutoReSend = 1, // 鑷姩閲嶅彂 +}; + +//stWLConfig * pWLCfg = (stWLConfig *)&defaultWLConfig; static RadioEvents_t RadioEvents; +stWLConfig WLCfg ; stWLRunStat KwRunStat; - -#if defined( USE_MODEM_LORA ) - -#define LORA_BANDWIDTH 1 // [0: 125 kHz, - // 1: 250 kHz, - // 2: 500 kHz, - // 3: Reserved] -#define LORA_SPREADING_FACTOR 8 // [SF7..SF12] -#define LORA_CODINGRATE 4 // [1: 4/5, - // 2: 4/6, - // 3: 4/7, - // 4: 4/8] -#define LORA_PREAMBLE_LENGTH 4 // Same for Tx and Rx -#define LORA_SYMBOL_TIMEOUT 0 // Symbols -#define LORA_FIX_LENGTH_PAYLOAD_ON false -#define LORA_IQ_INVERSION_ON false - -#elif defined( USE_MODEM_FSK ) - -#define FSK_FDEV 20e3 // Hz -#define FSK_DATARATE 19.2e3 // bps -#define FSK_BANDWIDTH 60e3 // Hz >> DSB in sx126x -#define FSK_AFC_BANDWIDTH 200e3 // Hz -#define FSK_PREAMBLE_LENGTH 5 // Same for Tx and Rx -#define FSK_FIX_LENGTH_PAYLOAD_ON false - -#else - #error "Please define a modem in the compiler options." -#endif typedef enum { @@ -119,17 +148,22 @@ }States_t; #define MASTER_RX_TIMEOUT_VALUE 80 //mS -#define SLAVE_RX_TIMEOUT_VALUE 250 //mS -#define CYCLE_TIME 200 //mS +#define SLAVE_RX_TIMEOUT_VALUE 400 //mS +#define CYCLE_TIME 160 //mS -#define BUFFER_SIZE 32 // Define the payload size here +#define WL_RX_BUFFER_SIZE 256 // Define the payload size here +#define WL_TX_BUFFER_SIZE 128 // Define the payload size here +uint16_t nTimeOnAir; +/* const uint8_t PingMsg[] = "PING"; const uint8_t PongMsg[] = "PONG"; +*/ //uint16_t BufferSize = BUFFER_SIZE; -uint8_t TX_Buffer[BUFFER_SIZE]; -uint8_t RX_Buffer[BUFFER_SIZE]; +uint8_t RX_Buffer[WL_RX_BUFFER_SIZE]; +uint8_t TX_Buffer[WL_TX_BUFFER_SIZE]; + States_t State = LOWPOWER; @@ -148,9 +182,37 @@ LL_GPIO_TogglePin(GPIOC,LL_GPIO_PIN_13); } +int LoadKwConfig(void) +{ + stStoredWLConfig * pstStoredWLCFG = (stStoredWLConfig *)(STORE_KWCONFIG_BASE); + + if (pstStoredWLCFG->BlockSign == 0x55AA && pstStoredWLCFG->BlockType == 0x05) { + WLCfg = pstStoredWLCFG->WLConfig; + } else { + WLCfg = defaultWLConfig; + } + return 0; +} + +int SaveKwConfig(void) +{ +// stStoredWLConfig * pstStoredWLCFG = (stStoredWLConfig *)(STORE_KWCONFIG_BASE); + + stStoredWLConfig theStoredWLCFG; + theStoredWLCFG.BlockSign = 0x55AA; + theStoredWLCFG.BlockType = 0x05; + theStoredWLCFG.nSeq = 1; + theStoredWLCFG.nSize = sizeof(stWLConfig); + theStoredWLCFG.WLConfig = WLCfg; + theStoredWLCFG.nCRC16 = 0x0000; + EraseAndWriteToFlashMem(&theStoredWLCFG, (void *)STORE_KWCONFIG_BASE, sizeof(stStoredWLConfig)); + + return 0; +} + int KWireLessInit(bool bRadioEnableMaster, uint32_t nChn) { - + stWLConfig * pWLCfg = & WLCfg; RadioEnableMaster = bRadioEnableMaster; // Radio initialization RadioEvents.TxDone = OnTxDone; @@ -162,7 +224,9 @@ Radio.Init( &RadioEvents ); nRadioChannel = nChn; - Radio.SetChannel( RF_FREQUENCY + nRadioChannel * nChannelSpacing ); + KwRunStat.RF_Freq = pWLCfg->RF_T_Freq + nRadioChannel * pWLCfg->nChnSpacing*1000; + + Radio.SetChannel( pWLCfg->RF_T_Freq + nRadioChannel * pWLCfg->nChnSpacing*1000 ); // Radio.WriteBuffer(0x06C0,data,2); // Radio.ReadBuffer(0x06C0,test,2); @@ -178,15 +242,15 @@ LORA_CODINGRATE, 0, LORA_PREAMBLE_LENGTH, LORA_SYMBOL_TIMEOUT, LORA_FIX_LENGTH_PAYLOAD_ON, 0, true, 0, 0, LORA_IQ_INVERSION_ON, false ); -//*/ +// */ - Radio.SetTxConfig( MODEM_LORA, TX_OUTPUT_POWER, 0, LORA_BANDWIDTH, - LORA_SPREADING_FACTOR, LORA_CODINGRATE, - LORA_PREAMBLE_LENGTH, LORA_FIX_LENGTH_PAYLOAD_ON, + Radio.SetTxConfig( MODEM_LORA, pWLCfg->Tx_Power, 0, pWLCfg->LoraBandWidth, + pWLCfg->LoRaFactor, pWLCfg->LoRaCodingRate, + pWLCfg->LoRaPreambleLen, LORA_FIX_LENGTH_PAYLOAD_ON, true, 0, 0, LORA_IQ_INVERSION_ON, 3000 ); - Radio.SetRxConfig( MODEM_LORA, LORA_BANDWIDTH, LORA_SPREADING_FACTOR, - LORA_CODINGRATE, 0, LORA_PREAMBLE_LENGTH, + Radio.SetRxConfig( MODEM_LORA, pWLCfg->LoraBandWidth, pWLCfg->LoRaFactor, + pWLCfg->LoRaCodingRate, 0, pWLCfg->LoRaPreambleLen, LORA_SYMBOL_TIMEOUT, LORA_FIX_LENGTH_PAYLOAD_ON, 0, true, 0, 0, LORA_IQ_INVERSION_ON, false ); @@ -204,13 +268,15 @@ 0, FSK_FIX_LENGTH_PAYLOAD_ON, 0, true, 0, 0,false, false ); #else - #error "Please define a frequency band in the compiler options." + #error "Please define a modem in the compiler options.." #endif SX126xSetRxTxFallbackMode(0x40); // 0x40-> FS 0x30 -> SD_XOSC 0x20 -> SD_RC - SX126xSetCadParams(2,0,1,0,1); + SX126xSetCadParams(LORA_CAD_04_SYMBOL,0,1,LORA_CAD_ONLY,1); - + nTimeOnAir = Radio.TimeOnAir(MODEM_LORA,14); + KwRunStat.nTimeOnAir = nTimeOnAir; + KMem.WDT[38]=nTimeOnAir; KwRunStat.runStep=RS_IDEL; return 0; } @@ -239,6 +305,8 @@ void OnTxDone( void ) { + KwRunStat.bMasterSent = 1; + KwRunStat.bMasterRecved = 0; KwRunStat.runStep=RS_IDEL; KMem.WDT[42]++; KwRunStat.lastSenttime = GetTick(); @@ -275,14 +343,13 @@ void OnRxDone( uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr ) { KMem.WDT[44] = size; - memcpy( RX_Buffer, payload, size ); memcpy(&KMem.WDT[64],payload,size); Radio.Standby(); if (bThisRxError) { bThisRxError=0; -// return; + return; } KwRunStat.curStat = 0; @@ -305,7 +372,6 @@ else //slave { KWLSlaveParsePkt(nRadioChannel,size); - } } @@ -321,20 +387,27 @@ KwRunStat.LostPackets++; KwRunStat.CtnLstPkts++; if (KwRunStat.CtnLstPkts > KwRunStat.MaxCtnLstPkts) {KwRunStat.MaxCtnLstPkts = KwRunStat.CtnLstPkts;} -// KMem.ErrStat=500; - if (KwRunStat.CtnLstPkts > 1) { KMem.ErrStat=500;} - if (KwRunStat.CtnLstPkts == 2) {KwRunStat.Err1Count++;} - if (KwRunStat.CtnLstPkts > 3) { KMem.ErrStat=5000;} - if (KwRunStat.CtnLstPkts == 4) {KwRunStat.Err2Count++;} - if (KwRunStat.CtnLstPkts > 6) { KMem.ErrStat=5000; KMem.WFX[1]=0; } - if (KwRunStat.CtnLstPkts == 7) {KwRunStat.Err3Count++;} - +// KwRunStat.ErrStat=500; + if (KwRunStat.CtnLstPkts > 2) { KwRunStat.ErrStat=500;} + if (KwRunStat.CtnLstPkts ==3 ) {KwRunStat.Err1Count++;} + if (KwRunStat.CtnLstPkts > 5) { KwRunStat.ErrStat=5000;} + if (KwRunStat.CtnLstPkts == 6) {KwRunStat.Err2Count++;} + if (KwRunStat.CtnLstPkts > 9) { KwRunStat.ErrStat=5000; KMem.WFX[1]=0; } + if (KwRunStat.CtnLstPkts == 10) {KwRunStat.Err3Count++;} + if ((KwRunStat.CtnLstPkts &0x0f) == 0x0f) { + KMem.WDT[51]++; + LoadKwConfig(); + KWireLessInit(RadioEnableMaster,nRadioChannel); + Radio.Standby(); + // KWireLessStart(); + } if(RadioEnableMaster) { //KWLMasterSendReqPkt(1); } else { + Radio.Standby(); Radio.Rx( SLAVE_RX_TIMEOUT_VALUE ); KwRunStat.runStep=RS_RECVING; KwRunStat.lastActTime = GetTick(); @@ -345,8 +418,12 @@ void OnRxError( void ) { - -// Radio.Standby(); + Radio.Standby(); + Radio.Rx( SLAVE_RX_TIMEOUT_VALUE ); + KwRunStat.runStep=RS_RECVING; + KwRunStat.lastActTime = GetTick(); + KwRunStat.lastRecvtime = GetTick(); + KwRunStat.RXErr++; KMem.WDT[46]++; bThisRxError=1; @@ -363,14 +440,16 @@ KwRunStat.LostPackets++; KwRunStat.CtnLstPkts++; if (KwRunStat.CtnLstPkts > KwRunStat.MaxCtnLstPkts) {KwRunStat.MaxCtnLstPkts = KwRunStat.CtnLstPkts;} -// KMem.ErrStat=500; - if (KwRunStat.CtnLstPkts > 1) { KMem.ErrStat=500; } +// KwRunStat.ErrStat=500; + if (KwRunStat.CtnLstPkts > 1) { KwRunStat.ErrStat=500; } if (KwRunStat.CtnLstPkts == 2) {KwRunStat.Err1Count++;} - if (KwRunStat.CtnLstPkts > 3) { KMem.ErrStat=5000;} + if (KwRunStat.CtnLstPkts > 3) { KwRunStat.ErrStat=5000;} if (KwRunStat.CtnLstPkts == 4) {KwRunStat.Err2Count++;} - if (KwRunStat.CtnLstPkts > 6) { KMem.ErrStat=5000; KMem.WFX[1]=0; } + if (KwRunStat.CtnLstPkts > 6) { KwRunStat.ErrStat=5000; KMem.WFX[1]=0; } if (KwRunStat.CtnLstPkts == 7) {KwRunStat.Err3Count++;} + } +// Radio.Standby(); } void OnCadDone( bool channelActivityDetected) @@ -386,7 +465,7 @@ if (RX_Buffer[size-2] != (crc_value&0xff) && RX_Buffer[size-1] != (crc_value >> 8)) { KwRunStat.CRCErr++; - KMem.ErrStat=500; + KwRunStat.ErrStat=500; CRC_OK = 0; }else { CRC_OK = 1; @@ -397,6 +476,7 @@ { if (p1->DstAddr == MixAddr(nRadioChannel,nRadioAddr)) { + KwRunStat.bMasterRecved = 1; LedToggle();//LED闂儊 KwRunStat.lastRecvdtime=GetTick(); KwRunStat.lastAckTime = GetTick(); @@ -432,12 +512,20 @@ if (RX_Buffer[size-2] != (crc_value&0xff) && RX_Buffer[size-1] != (crc_value >> 8)) { KwRunStat.CRCErr++; - KMem.ErrStat=500; + KwRunStat.ErrStat=500; CRC_OK = 0; }else { CRC_OK = 1; + if (p1->STSign != enReqSign) { + KwRunStat.PktErr++; + }else { + if (p1->DstAddr != MixAddr(nRadioChannel,nRadioAddr)) { + KwRunStat.ChnErr++; + } + } } //*/ + if(CRC_OK && p1->STSign == enReqSign && p1->DstAddr == MixAddr(nRadioChannel,nRadioAddr))// memcmp(RX_Buffer,PingMsg,4)==0 && ) { @@ -580,21 +668,7 @@ int KWLSlaveProc(int nChn) { - return 0; -} - -int KWL_Process(int nChn) -{ - RadioState_t stat = Radio.GetStatus(); - KMem.WDT[32]=stat; -// KMem.WDT[38]=Radio.Rssi(MODEM_FSK); - if (RadioEnableMaster){ - if (GetTick() - KwRunStat.lastSendtime > CYCLE_TIME *10 && KwRunStat.curStat == 0 ) //&& stat == RF_IDLE ) //200mS - { - KWireLessStart(); - } - }else //slave - { + RadioState_t stat = Radio.GetStatus(); if (stat == RF_IDLE){ KMem.WDT[48]++; Radio.Standby(); @@ -616,13 +690,74 @@ KWireLessStart(); } if (GetTick() - KwRunStat.lastRecvdtime > 4000){ // 200mS - // KMem.ErrStat=500; - KMem.ErrStat=500; + // KwRunStat.ErrStat=500; + KwRunStat.ErrStat=500; +// Radio.Standby(); +// KWireLessStart(); } if (GetTick() - KwRunStat.lastRecvdtime > 12000){ // 1200mS - KMem.ErrStat=5000; KMem.WFX[1]=0; - } + KwRunStat.ErrStat=5000; KMem.WFX[1]=0; + } + if (GetTick() - KwRunStat.lastRecvtime > 16000){ + KMem.WDT[52]++; + LoadKwConfig(); + KWireLessInit(RadioEnableMaster,nRadioChannel); + Radio.Standby(); + KWireLessStart(); + KwRunStat.lastRecvtime = GetTick(); + } + return 0; +} + +int KWL_Process(int nChn) +{ + RadioState_t stat = Radio.GetStatus(); + KMem.WDT[32]=stat; +// KMem.WDT[38]=Radio.Rssi(MODEM_FSK); + if (RadioEnableMaster){ + if (GetTick() - KwRunStat.lastSendtime > CYCLE_TIME *10 && Radio.IsChannelFree(MODEM_LORA,KwRunStat.RF_Freq,-60,1)){ + if (!KwRunStat.bMasterRecved) { + KwRunStat.ErrStat=5000; + KwRunStat.LostPackets++; + KwRunStat.CtnLstPkts++; + if (KwRunStat.CtnLstPkts > KwRunStat.MaxCtnLstPkts) {KwRunStat.MaxCtnLstPkts = KwRunStat.CtnLstPkts;} + // KwRunStat.ErrStat=500; + if (KwRunStat.CtnLstPkts > 1) { KwRunStat.ErrStat=2000;} + if (KwRunStat.CtnLstPkts == 2) {KwRunStat.Err1Count++;} + if (KwRunStat.CtnLstPkts > 3) { KwRunStat.ErrStat=5000;} + if (KwRunStat.CtnLstPkts == 4) {KwRunStat.Err2Count++;} + if (KwRunStat.CtnLstPkts > 6) { KwRunStat.ErrStat=5000; KMem.WFX[1]=0; } + if (KwRunStat.CtnLstPkts == 7) {KwRunStat.Err3Count++;} + if ((KwRunStat.CtnLstPkts &0x0f) == 0x0f) { + KMem.WDT[51]++; + LoadKwConfig(); + KWireLessInit(RadioEnableMaster,nRadioChannel); + Radio.Standby(); + // KWireLessStart(); + } + } + if (KwRunStat.curStat == 0 ){ //&& stat == RF_IDLE ) //200mS +// Radio.Standby(); + KWireLessStart(); + }else { + Radio.Standby(); + KWireLessStart(); + } + } + }else //slave + { + KWLSlaveProc(nChn); } + if (KwRunStat.RunStat) KwRunStat.RunStat--; + if (KwRunStat.ErrStat) KwRunStat.ErrStat--; + + KwRunStat.Tx_Power = WLCfg.Tx_Power; + KwRunStat.LoraBandWidth = WLCfg.LoraBandWidth; + KwRunStat.LoRaFactor = WLCfg.LoRaFactor; + KwRunStat.LoRaCodingRate = WLCfg.LoRaCodingRate; + KwRunStat.LoRaPreambleLen = WLCfg.LoRaPreambleLen; + + return 0; } diff --git a/Radio_LLCC68/Radio/KWireLess.h b/Radio_LLCC68/Radio/KWireLess.h index 81af49f..ea94fac 100644 --- a/Radio_LLCC68/Radio/KWireLess.h +++ b/Radio_LLCC68/Radio/KWireLess.h @@ -38,17 +38,94 @@ KW_ERROR3, }KWStates; +#define STORE_KWCONFIG_BASE (FLASH_BASE + 0x0000F000) //50k K //and +//#define STORE_RUNSTAT_PAGESIZE (0x00000400) //Page Size = 1K +#define STORE_KWCONFIG_PAGES 1 //use 1 pages + +enum enWLWorkMode +{ + WLWorkModeNone, // + WLWorkModeUni, // 涓�瀵逛竴 + WLWorkModeMul, // 涓�瀵瑰 + WLWorkModeThr, // 閫忎紶 + +}; + +typedef struct tagWLConfig +{ + uint32_t RF_T_Freq; //Hz + uint32_t RF_R_Freq; //Hz + uint16_t nChnSpacing; //kHz + uchar workMode; //0: FSK, 1: LoRa + uchar Tx_Power; // dBm 5 - 22 dBm + uchar LoraBandWidth; // [0: 125 kHz, 1: 250 kHz, 2: 500 kHz, 3: Reserved ] + uchar LoRaFactor; // [SF5 .. SF 12] + uchar LoRaCodingRate; // [1 : 4/5, 2: 4/6, 3: 4/7, 4: 4/8 ] + uint8_t NetWorkAddr; + uint16_t DeviceAddr; + uchar bEnableAddr; + uchar bEnableEncrypt; + uchar bEnableRelay; + uchar LoRaPreambleLen; // 2 - 12 + uchar bAutoReSend; //鑷姩閲嶅彂 + + +// uchar ; // +// uchar + +}stWLConfig, *pstWLConfig; + +typedef struct tagStoredWLConfig +{ + unsigned short BlockSign; + unsigned char BlockType; + unsigned char nSeq; + unsigned short nSize; + unsigned short nCRC16; + stWLConfig WLConfig; +}stStoredWLConfig, *pstStoredWLConfig; + + typedef enum tag_runstep{ RS_IDEL, RS_SENDING, RS_RECVING, }enRunStep; +#pragma anon_unions typedef struct tagWLStat { - uint32_t Stat; //鐘舵�� - uint32_t curStat; //褰撳墠鐘舵�� - uint32_t runStep; //宸ヤ綔姝ラ + union { + uint32_t Status; //鐘舵�� + struct { + uint32_t bMasterSent:1; + uint32_t bMasterRecved:1; + }; + }; + uint16_t curStat; //褰撳墠鐘舵�� + uint16_t runStep; //宸ヤ綔姝ラ + + uint16_t RunStat; //杩愯鐘舵�� + uint16_t ErrStat; //閿欒鐘舵�� + + uint32_t RF_Freq; //杩愯棰戠巼 + uint16_t nTimeOnAir; + uint16_t DeviceAddr; + + uint8_t NetWorkAddr; + + uchar Tx_Power; // dBm 5 - 22 dBm + uchar LoraBandWidth; // [0: 125 kHz, 1: 250 kHz, 2: 500 kHz, 3: Reserved ] + uchar LoRaFactor; // [SF5 .. SF 12] + uchar LoRaCodingRate; // [1 : 4/5, 2: 4/6, 3: 4/7, 4: 4/8 ] + + uchar LoRaPreambleLen; // 2 - 12 + + uchar bEnableAddr; + uchar bEnableEncrypt; + uchar bEnableRelay; + uchar bAutoReSend; //鑷姩閲嶅彂 + uint32_t sentCount; //鍙戦�佽鏁� uint32_t recvCount; //鎺ユ敹璁℃暟 uint32_t lastSendtime; //涓婃鍙戦�佹椂闂� @@ -60,18 +137,20 @@ uint32_t lastErrTime; //涓婃閿欒鏃堕棿 uint32_t latancy; //寤惰繜 uint32_t cycleTime; //寰幆鏃堕棿 - uint32_t LostPackets; //涓㈠寘璁℃暟 - uint32_t CtnLstPkts; //杩炵画涓㈠寘璁℃暟 - uint32_t MaxCtnLstPkts; //鏈�澶ц繛缁涪鍖呰鏁� - uint32_t TXErr; //鍙戦�侀敊璇鏁� - uint32_t RXErr; //鎺ユ敹閿欒璁℃暟 - uint32_t CRCErr; //CRC閿欒璁℃暟 - uint32_t CADDoneCount; //CAD 瀹屾垚娆℃暟 - uint32_t StepErr1; //姝ラ閿欒1 - uint32_t StepErr2; //姝ラ閿欒2 - uint32_t Err1Count; //寰棯鎶ヨ娆℃暟 - uint32_t Err2Count; //澶ч棯鎶ヨ娆℃暟 - uint32_t Err3Count; //涓ラ噸涓㈠け淇″彿娆℃暟 + uint16_t LostPackets; //涓㈠寘璁℃暟 + uint16_t CtnLstPkts; //杩炵画涓㈠寘璁℃暟 + uint16_t MaxCtnLstPkts; //鏈�澶ц繛缁涪鍖呰鏁� + uint16_t TXErr; //鍙戦�侀敊璇鏁� + uint16_t RXErr; //鎺ユ敹閿欒璁℃暟 + uint16_t CRCErr; //CRC閿欒璁℃暟 + uint16_t ChnErr; //棰戦亾閿欒 + uint16_t PktErr; //鍖呴敊璇� + uint16_t CADDoneCount; //CAD 瀹屾垚娆℃暟 + uint16_t StepErr1; //姝ラ閿欒1 + uint16_t StepErr2; //姝ラ閿欒2 + uint16_t Err1Count; //寰棯鎶ヨ娆℃暟 + uint16_t Err2Count; //澶ч棯鎶ヨ娆℃暟 + uint16_t Err3Count; //涓ラ噸涓㈠け淇″彿娆℃暟 int8_t RSSI; //淇″彿寮哄害 int8_t SNR; //淇″櫔姣� @@ -89,23 +168,6 @@ }; -typedef struct tagWLConfig -{ - uint32_t RF_Freq; - uint32_t ChannelSpacing; - uchar Tx_Power; - - uchar workMode; //0: FSK, 1: LoRa - uchar LoraBandWidth; // [0: 125 kHz, 1: 250 kHz, 2: 500 kHz, 3: Reserved ] - uchar LoRaFactor; // [SF5 .. SF 12] - uchar LoRaCodingRate; // [1 : 4/5, 2: 4/6, 3: 4/7 - uchar LoRaPreamble_Len; // 2 - 12 -// uchar ; // -// uchar - -}stWLConfig; - - typedef struct tagKLPacket { uchar STSign; @@ -116,6 +178,8 @@ }stKLPacket, *pstKLPacket; +int LoadKwConfig(void); +int SaveKwConfig(void); int KWireLessInit(bool bRadioEnableMaster, uint32_t nChn); int KWireLessStart(void); @@ -156,6 +220,7 @@ extern uchar nRadioChannel; extern uchar nRadioAddr; +extern stWLConfig WLCfg ; extern stWLRunStat KwRunStat; diff --git a/Radio_LLCC68/Radio/src/radio.c b/Radio_LLCC68/Radio/src/radio.c index e0fc3b1..bbe4ebd 100644 --- a/Radio_LLCC68/Radio/src/radio.c +++ b/Radio_LLCC68/Radio/src/radio.c @@ -410,7 +410,7 @@ PacketStatus_t RadioPktStatus; -uint8_t RadioRxPayload[255]; +uint8_t RadioRxPayload[32]; bool IrqFired = false; @@ -522,7 +522,7 @@ return RF_TX_RUNNING; case MODE_RX: return RF_RX_RUNNING; - case RF_CAD: + case MODE_CAD: return RF_CAD; default: return RF_IDLE; diff --git a/Radio_LLCC68/Src/ATModem.c b/Radio_LLCC68/Src/ATModem.c new file mode 100644 index 0000000..61c776f --- /dev/null +++ b/Radio_LLCC68/Src/ATModem.c @@ -0,0 +1,29 @@ +/** + ****************************************************************************** + * @file : ATModem.c + * @brief : AT Modem Protocol program body + ****************************************************************************** + */ +#include "ATModem.h" + + +void ATInit(stATModemDef * pATModem, ATSendPktDef pFunc1) +{ + pATModem->ATSendPktFunc = pFunc1; + + return; +} +void ATSetCallBack(stATModemDef * pATModem, ATSendPktDef pFunc1) +{ + pATModem->ATSendPktFunc = pFunc1; + return; +} + +int ATParsePacket(stATModemDef * pATModem, char * pBuf, uchar len1) +{ + return 0; +} +void ATProcess(stATModemDef * pATModem) +{ + +} diff --git a/Radio_LLCC68/Src/BoardType.c b/Radio_LLCC68/Src/BoardType.c index e69de29..6f44466 100644 --- a/Radio_LLCC68/Src/BoardType.c +++ b/Radio_LLCC68/Src/BoardType.c @@ -0,0 +1,98 @@ +#include "BoardType.h" +#include "KMachine.h" +#include "KBus.h" + + +#define APP_ADDR 0x08001000 //应用程序首地址定义 +#define APPINFOBLOCK_ADDR (APP_ADDR + 0x100) //程序信息块 地址 +#define INFOBLOCK_ADDR (APP_ADDR + 0x1000) //信息块 地址 + +#define APP_START_ADDR IROM1_START_ADDRESS + +extern int Region$$Table$$Limit; + +#define MAKE_VER(x,y) ((x<<8)|y) +#define APP_VER MAKE_VER(1,14) + +const stAppInfoBlock AppInfoBlock __attribute__((at(APPINFOBLOCK_ADDR))) = +{ + 0xAA55, // StartSign + 0x0301, // BlockType + sizeof(stAppInfoBlock), //BlockSize + 0, // Pad, + APP_VER, //AppVer + (BOARD_TYPE<<8) + BOARD_VER, //AppDevice; + 0x1000, //AppSize; + 0x0C00, //AppDataSize; + APP_ADDR, //nAppStartAddr + (int)&Region$$Table$$Limit, //nBtldr_NewAppInfoAddr + 0x08009000, //nBtldr_NewAppAddr + 0xCCCC, //crc16; + 0xAA55 //EndSign; + +}; + +const stKMInfoBlock KMInfoBlock __attribute__((at(INFOBLOCK_ADDR))) = +{ +// sizeof(stKMInfoBlock), + (BOARD_TYPE<<8) + BOARD_VER, //nDeviceType BOARD_VER, //nDevieVer + APP_VER, //ProgVer + 0x0102, //KLinkVer + KBUS_VER, //KBusVer +// 0x0100, //KNetVer +// 0x0100, //KWLVer + + 4, //nCapacity1 ?K + 1, //nCapacity2 ?k + + DINPUT, //nDInput; + DOUTPUT, //nDOutput + + 0, //nAInput + 0, //nAOutput + 0, //nHInput + 0, //nHOutput + 0, //nExt1; + 0, //nExt2; + 0, //nLogSize; + 3, //nPorts; + 0, //nManSize; + 0, //nAbility; + 6, //nSwitchBits; +}; + + +const stDeviceInfo MyDeviceInfo={ + + (BOARD_TYPE<<8) + BOARD_VER, //nDeviceTypeVer // unsigned short ClientType; // 子机类型 + APP_VER, //ProgVer // unsigned short ClientVer; // 子机版本 + + DINPUT, // unsigned char InBitCount; // 输入开关量数量 + DOUTPUT, // unsigned char OutBitCount; // 输出开关量数量 + EXDOUPUT, // unsigned char ExInBitCount; // 扩展的输入开关量数量 + EXDOUPUT, // unsigned char ExOutBitCount; // 扩展的输出开关量数量 + 0, // unsigned char InDWCount; // 输入数据字数 + 0, // unsigned char OutDWCount; // 输出数据字数 + 0, // unsigned char AIWCount; // 输入模拟量通道(字)数 // 16位为一个字(通道) + 0, // unsigned char AQWCount; // 输出模拟量通道(字)数 // 16位为一个字(通道) +// 0, // unsigned char AIBits; // 每通道位数 // 16位以下 +// 0, // unsigned char AQbits; // 每通道位数 // 16位以下 +}; + +const stExDeviceInfo MyExDeviceInfo ={ + (BOARD_TYPE<<8) + BOARD_VER, //nDeviceTypeVer // unsigned short ClientType; // 子机类型 + APP_VER, //ProgVer // unsigned short ClientVer; // 子机版本 + + DINPUT, // unsigned char InBitCount; // 输入开关量数量 + DOUTPUT, // unsigned char OutBitCount; // 输出开关量数量 + EXDOUPUT, // unsigned char ExInBitCount; // 扩展的输入开关量数量 + EXDOUPUT, // unsigned char ExOutBitCount; // 扩展的输出开关量数量 + 0, // unsigned char InDWCount; // 输入数据字数 + 0, // unsigned char OutDWCount; // 输出数据字数 + 0, // unsigned char AIWCount; // 输入模拟量通道(字)数 // 16位为一个字(通道) + 0, // unsigned char AQWCount; // 输出模拟量通道(字)数 // 16位为一个字(通道) +// 0, // unsigned char AIBits; // 每通道位数 // 16位以下 +// 0, // unsigned char AQbits; // 每通道位数 // 16位以下 + +}; + diff --git a/Radio_LLCC68/Src/main.c b/Radio_LLCC68/Src/main.c index 6967761..0c2f3de 100644 --- a/Radio_LLCC68/Src/main.c +++ b/Radio_LLCC68/Src/main.c @@ -83,9 +83,14 @@ unsigned char FastFlicker=0; unsigned int Uart1IdelTimer = 0; +#if (ENABLE_PLC) stBinProg1 * pProgs = (stBinProg1 *)STORE_PRG_BASE; - +#endif uint32_t us1,us2,us3,us4,us5,us6; + +stKBusDef KBus1; // + +extern stDeviceInfo MyDeviceInfo; /* USER CODE END PV */ @@ -118,7 +123,7 @@ static int Count=0; CurTickuS += 100; nCurTick++; - nSlaveTick++; + KBus1.nSlaveTick++; Count++; if (Count>=10000) { @@ -131,6 +136,73 @@ return; } + + +void PendSvCallBack() +{ +#if (BOARD_TYPE == 14) +///* + if (bSPI1RecvDone) + { + bSPI1RecvDone=0; + FPxParsePkt(SPI1RecvBuf,nSPI1RecvLenInBuf); + } +//*/ +#endif + if (Uart2Stat.bPacketRecved) + { + KBusParsePacket(&KBus1, (pKBPacket)Uart2RecvBuf1, Uart2RecvBuf1DataLen); + Uart2RecvBuf1DataLen=0; + Uart2Stat.bPacketRecved=0; + Uart2RecvDMA(Uart2RecvBuf1,sizeof(Uart2RecvBuf1)); + KMem.WDT[2]++; + } +} + +/* +KBus閫氳鍥炶皟鍑芥暟锛屽綋閫氳鐘舵�佹敼鍙樻垨鏁版嵁鏇存柊鏃惰璋冪敤銆� +鎴栬�呯郴缁熻姹傛椂銆� +*/ +void * KBusEvCallBackFunc(void* pParam, int nEvent, void *pBuf, int nLen1) +{ + switch (nEvent){ + + case KBusEvNone: + break; + case KBusEvCreate: + break; + case KBusEvConnected: + break; + case KBusEvDisConnected: + break; + case KBusEvClosed: + break; + case KBusEvStateChange: + break; + case KBusEvTimeSync: + break; + case KBusEvDataUpdate: + KMem.WLX[0] = KBusMem.WLX[0]; + KMem.WLY[0] = KBusMem.WLY[0]; + + if (KBus1.bMaster) { + KMem.WY[0]=KBusMem.WLX[0]; //KPLC with KBus Master + KBusMem.WLY[0]=KMem.WX[0]; + } else if (KBus1.bSlave) { + KMem.WYB[0]=KBusMem.WLYB[0]; //WireLess with KBus Slave + KBusMem.WLXB[0]=KMem.WXB[0]; + + } + break; + case KBusEvCmdResponse: + break; + + default: + break; + } + return 0; +} + /* USER CODE END 0 */ @@ -155,36 +227,6 @@ /* USER CODE BEGIN Init */ - for (int i=0;i<9;i++) - { -// memset(KBusChnStats[i],0,0); - KBusChnStats[i].SendPackets=0; - KBusChnStats[i].RecvPackets=0; - KBusChnStats[i].LostPackets=0; - KBusChnStats[i].CtnLstPkts=0; - KBusChnStats[i].MaxCtnLstPkts=0; - KBusChnStats[i].NotPkgErr=0; - KBusChnStats[i].PkgLenErr=0; - KBusChnStats[i].TimeOutErr=0; - KBusChnStats[i].BCCErr=0; - KBusChnStats[i].Delay=0; - KBusChnStats[i].MaxDelay=0; - } - - KMem.LastScanTime=0; - KMem.ScanTimeuS=0; - KMem.MinScanTimeuS=99999; - KMem.MaxScanTimeuS=0; - -// KMem.SDD[14]=(unsigned int)&KMStoreSysCfg; -// KMem.SDD[15]=(unsigned int)&KMStoreSysCfg1; - KMem.SDD[12]=((uint32_t *)UID_BASE)[0]; -// KMem.SDD[13]=((uint32_t *)UID_BASE)[1]; -// KMem.SDD[14]=((uint32_t *)UID_BASE)[2]; - KMem.SDD[13]=PendSvCount; - KMem.SDD[14]=RCC->CSR; -// KMem.SDD[15]=*(uint32_t *)FLASHSIZE_BASE; -// KMem.SDD[16]=(unsigned int)&KMSysCfg; /* USER CODE END Init */ @@ -207,6 +249,16 @@ KMRunStat.bLEDFlick = 1; + KLinkInit(1); //娉ㄥ唽KLink绔彛 + +// stPortDef PortReg1 = {.nPortHardType = 3,.nPortUseType = 2}; +// KMRegisterPort(0,&PortReg1); + + + unsigned char bKBusMaster, bKBusSlave, bKBusRepeater; + int nKBusStationID; + int nKBusChilds; + KMem.CurJumperSW=ReadJumperSW(); KMem.EffJumperSW=KMem.CurJumperSW; @@ -221,7 +273,7 @@ FP0_Init(); #elif (BOARD_TYPE == 15 || BOARD_TYPE == 16) - nStationID=1 ;//KMem.EffJumperSW&0x0f; + nKBusStationID=KMem.EffJumperSW&0x0f; // if (KMem.EffJumperSW == 0x1f) {bKBusRepeater=1;bKBusMaster=1;bKBusSlave=0;} // else if ((KMem.EffJumperSW&0x10)!=0) {bKBusMaster=1;bKBusSlave=0;} // else @@ -232,10 +284,23 @@ else if ((KMem.EffJumperSW&0x10)!=0) {bKBusMaster=1;bKBusSlave=0;} else{bKBusMaster=0;bKBusSlave=1;} #endif - nChilds=nStationID; - nCurPollId=1; + nKBusChilds=nKBusStationID; + + if (bKBusMaster) { + KBusInitMaster(&KBus1, (KBusSendPktFuncDef)PutStr2, nKBusChilds); + } else if (bKBusSlave) { + KBusInitSlave(&KBus1, (KBusSendPktFuncDef)PutStr2, nKBusStationID,&MyDeviceInfo); + } + KBusSetEvCallBackFunc(&KBus1, &KBusEvCallBackFunc); + + UNUSED(bKBusRepeater); + // 娉ㄥ唽KBus绔彛 +/* + stPortDef PortReg2 = {.nPortHardType = 4,.nPortUseType = 3}; + KMRegisterPort(1,&PortReg2); +*/ //if (KMem.EffJumperSW == 0x00) - Uart1Baud = DefaultUart1Baud; + Uart1Baud = DefaultUart1Baud; MX_USART1_UART_Init(); MX_USART2_UART_Init(); @@ -264,6 +329,7 @@ Uart2RecvDMA(Uart2RecvBuf1,sizeof(Uart2RecvBuf1)); LL_USART_EnableIT_IDLE(USART2); LL_USART_EnableIT_TC(USART2); + #if (BOARD_TYPE == 13) int res; res = w5500_init(); @@ -314,18 +380,27 @@ KMRunStat.WorkMode2=0; KMRunStat.WorkMode = storedKMSysCfg.theKMSysCfg.workmode; - + +#if (ENABLE_PLC) if (KMRunStat.WorkMode == 1){ InitPLC(); KMRunStat.WorkMode2 = KMem.CurJumperSW&0x20 ; if (KMRunStat.WorkMode2) { StartPLC(); } } - KMem.WX[7]=0x5a; +#endif + #if (BOARD_TYPE == 15 || BOARD_TYPE == 16) + LoadKwConfig(); +// KWireLessInit(&KWInitStruct); + KWireLessInit(KMem.EffJumperSW&0x20,KMem.EffJumperSW&0x0f); KWireLessStart(); #endif + + + stPortDef PortReg3 = {.nPortHardType = 7,.nPortUseType = 6}; + KMRegisterPort(2,&PortReg3); while (1) { @@ -341,13 +416,14 @@ int thisJumperSW=ReadJumperSW(); +#if (ENABLE_PLC) if (KMRunStat.WorkMode&1){ if (thisJumperSW&0x20 && !(KMem.CurJumperSW&0x20)) // Run 寮�鍏� 姝� 璺冲彉銆� {StartPLC();} if (!(thisJumperSW&0x20) && (KMem.CurJumperSW&0x20)) // Run 寮�鍏� 璐� 璺冲彉銆� {StopPLC();} } - +#endif KMem.CurJumperSW=thisJumperSW; KMem.haltick=haltick; // KMem.TotalRunTime=TotalRunTime; @@ -356,6 +432,7 @@ // *((unsigned int *)&(PLCMem.SDT[2]))=nChilds; // KMem.SDD[13]=PendSvCount; // KMem.SDD[14]=RCC->CSR; + int a; a = LL_GPIO_ReadInputPort(GPIOA); @@ -413,7 +490,7 @@ #endif // pProgs = (stBinProg1 *) STORE_PRG_BASE; - +#if (ENABLE_PLC) if ( KMRunStat.WorkMode==1 ) //&& bKBusMaster) { if (KMRunStat.nBinProgBank == 0){ @@ -426,7 +503,7 @@ ProcessPLCBinProg(pProgs, nSizeProg1); } - +#endif // ENABLE_PLC KMem.ScanTimeuS=us2-KMem.LastScanTime; KMem.LastScanTime = us2; if (KMem.ScanTimeuS < KMem.MinScanTimeuS) {KMem.MinScanTimeuS = KMem.ScanTimeuS;} @@ -445,15 +522,9 @@ // BufferOut[1]=KMem.WX[0]&0xff; // BufferOut[2]=(KMem.WX[0]>>8)&0xff; #endif - if (nChilds>0) { KBusMasterFunc(2); } - -#if (BOARD_TYPE == 14) -// KMem.WX[0]=BufferIn[1]+(BufferIn[2]<<8); -#else -// KMem.WY[0]=BufferIn[1]+(BufferIn[2]<<8); -#endif - } + KBusLoopProcess(&KBus1); + if (haltick&0x00002000) SlowFlicker=1; else SlowFlicker=0; if (haltick&0x00000800) FastFlicker=1; @@ -467,20 +538,18 @@ // if (! KMem.RunStat) {BufferIn[0]=0;} // KMem.WY[0]=BufferIn[0]; #else - KBusSlaveFunc(2); + KBusSlaveFunc(&KBus1); if (! KMem.RunStat) {BufferIn[0]=0;} KMem.WY[0]=BufferIn[0]; #endif - if (nSlaveTick&0x00002000) SlowFlicker=1; + if (KBus1.nSlaveTick&0x00002000) SlowFlicker=1; else SlowFlicker=0; - if (nSlaveTick&0x00000800) FastFlicker=1; + if (KBus1.nSlaveTick&0x00000800) FastFlicker=1; else FastFlicker=0; - } // KMem.WY[0]=nCount2>>5; - if (KMem.RunStat) {KMem.RunStat--;} - if (KMem.ErrStat) {KMem.ErrStat--;} + if (KMRunStat.bLEDFlick) { @@ -492,14 +561,20 @@ } else { + KMem.ErrStat = KwRunStat.ErrStat; + if ((KMem.EffJumperSW&0x10)==0x10) KMem.ErrStat += KBus1.ErrStat; +#if (ENABLE_PLC) if (KMRunStat.WorkMode==1 ) { if (PLCMem.bPLCRunning){SetRunLed(SlowFlicker);} else {SetRunLed(0);} } - else { + else +#endif // ENABLE_PLC + { if (!KMem.RunStat) SetRunLed(SlowFlicker); else SetRunLed(FastFlicker); } + if (!KMem.ErrStat) { SetErrLed(0); @@ -521,11 +596,12 @@ us4=GetuS(); // EffJumperSW = GetInput(20)&0xff; + #if (BOARD_TYPE == 15 || BOARD_TYPE == 16) if ((KMem.EffJumperSW&0x10)==0x10) { - KMem.WFY[1]=KMem.WLY[0]; - KMem.WLX[0]=KMem.WFX[1]; + KMem.WFY[1]=KBusMem.WLYB[1]; + KBusMem.WLXB[1]=KMem.WFX[1]; }else { KMem.WFY[1]=KMem.WX[0]; @@ -573,14 +649,15 @@ Uart1Stat.bPacketRecved=0; Uart1IdelTimer = 0; }else { - if (Uart1IdelTimer>600000) { // 瓒呰繃60绉掓病鏈夋暟鎹紶杈擄紝閲嶆柊杩涘叆鑷�傚簲娉㈢壒鐜囩姸鎬� + + if (Uart1IdelTimer>300000) { // 瓒呰繃60绉掓病鏈夋暟鎹紶杈擄紝閲嶆柊杩涘叆鑷�傚簲娉㈢壒鐜囩姸鎬� LL_USART_EnableAutoBaudRate(USART1); LL_USART_SetAutoBaudRateMode(USART1, LL_USART_AUTOBAUD_DETECT_ON_FALLINGEDGE); }else { Uart1IdelTimer++; } } - if (bKBusSlave) HAL_Delay(0); +// if (bKBusSlave) HAL_Delay(0); /* if (!IsEmpty(&Uart1Stat.QRx)) { -- Gitblit v1.9.1