From 224cea156bd5b0f37ba4eed4205c5393442ca2b6 Mon Sep 17 00:00:00 2001 From: liumin Date: Tue, 21 Oct 2025 21:25:35 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E6=AC=A1=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E6=9C=BA=E6=B8=A9=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 5 + CAN.C | 1356 +++++++++++ CAN.H | 762 ++++++ CAN鍗忚.xls | Bin 0 -> 30208 bytes CL2.0.asm | 4129 +++++++++++++++++++++++++++++++++ CL2.0.dav | Bin 0 -> 88725 bytes CL2.0.dpt | 3928 +++++++++++++++++++++++++++++++ CL2.0.plg | 1543 ++++++++++++ CL2.0.rtf | 1141 +++++++++ CL2.0.uvgui.Administrator | 2488 ++++++++++++++++++++ CL2.0.uvgui.liuminVir | 1914 +++++++++++++++ CL2.0.uvgui_Administrator.bak | 2488 ++++++++++++++++++++ CL2.0.uvopt | 357 +++ CL2.0.uvproj | 445 ++++ CL2.0_uvopt.bak | 1702 ++++++++++++++ CL2.0_uvproj.bak | 410 ++++ Config.H | 209 ++ Config.H.bak | 247 ++ ExtDll.iex | 2 + IO.C | 375 +++ IO.H | 248 ++ MAIN.C | 271 +++ MAIN.H | 625 +++++ PS.C | 295 +++ PS.H | 202 ++ RTC.c | 415 ++++ RTC.h | 101 + SHARED_INT.C | 223 ++ SHARED_INT.H | 121 + SSC.C | 264 +++ SSC.H | 107 + START_XC.a51 | 521 +++++ SwDriver.C | 496 ++++ SwDriver.C.bak | 893 +++++++ SwDriver.H | 122 + T2.C | 175 ++ T2.H | 104 + UART.C | 350 +++ UART.H | 127 + UART1.C | 261 +++ UART1.H | 153 ++ User.c | 465 ++++ User.c.bak | 330 +++ WDT.C | 206 ++ WDT.H | 130 ++ XC88x_FLADDR.H | 876 +++++++ XC88x_FLHANDLER.ASM | 166 ++ XC8Memory.c | 134 ++ XC8Memory.h | 72 + boot.H | 79 + boot.c | 128 + temperature.C | 522 +++++ temperature.h | 164 ++ user.H | 177 ++ user.H.bak | 57 + 55 files changed, 33081 insertions(+) create mode 100644 .vscode/settings.json create mode 100644 CAN.C create mode 100644 CAN.H create mode 100644 CAN鍗忚.xls create mode 100644 CL2.0.asm create mode 100644 CL2.0.dav create mode 100644 CL2.0.dpt create mode 100644 CL2.0.plg create mode 100644 CL2.0.rtf create mode 100644 CL2.0.uvgui.Administrator create mode 100644 CL2.0.uvgui.liuminVir create mode 100644 CL2.0.uvgui_Administrator.bak create mode 100644 CL2.0.uvopt create mode 100644 CL2.0.uvproj create mode 100644 CL2.0_uvopt.bak create mode 100644 CL2.0_uvproj.bak create mode 100644 Config.H create mode 100644 Config.H.bak create mode 100644 ExtDll.iex create mode 100644 IO.C create mode 100644 IO.H create mode 100644 MAIN.C create mode 100644 MAIN.H create mode 100644 PS.C create mode 100644 PS.H create mode 100644 RTC.c create mode 100644 RTC.h create mode 100644 SHARED_INT.C create mode 100644 SHARED_INT.H create mode 100644 SSC.C create mode 100644 SSC.H create mode 100644 START_XC.a51 create mode 100644 SwDriver.C create mode 100644 SwDriver.C.bak create mode 100644 SwDriver.H create mode 100644 T2.C create mode 100644 T2.H create mode 100644 UART.C create mode 100644 UART.H create mode 100644 UART1.C create mode 100644 UART1.H create mode 100644 User.c create mode 100644 User.c.bak create mode 100644 WDT.C create mode 100644 WDT.H create mode 100644 XC88x_FLADDR.H create mode 100644 XC88x_FLHANDLER.ASM create mode 100644 XC8Memory.c create mode 100644 XC8Memory.h create mode 100644 boot.H create mode 100644 boot.c create mode 100644 temperature.C create mode 100644 temperature.h create mode 100644 user.H create mode 100644 user.H.bak diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..54a4f23 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "files.associations": { + "temperature.C": "cpp" + } +} \ No newline at end of file diff --git a/CAN.C b/CAN.C new file mode 100644 index 0000000..5aa54eb --- /dev/null +++ b/CAN.C @@ -0,0 +1,1356 @@ +//**************************************************************************** +// @Module MultiCAN Controller +// @Filename CAN.C +// @Project CL2.0.dav +//---------------------------------------------------------------------------- +// @Controller Infineon XC886CLM-8FF +// +// @Compiler Keil +// +// @Codegenerator 1.3 +// +// @Description: This file contains functions that use the CAN module. +// +//---------------------------------------------------------------------------- +// @Date 2025/3/30 07:12:29 +// +//**************************************************************************** + +// USER CODE BEGIN (CAN_General,1) + +// USER CODE END + + + +//**************************************************************************** +// @Project Includes +//**************************************************************************** + +#include "MAIN.H" + +// USER CODE BEGIN (CAN_General,2) + +// USER CODE END + + +//**************************************************************************** +// @Macros +//**************************************************************************** + + +// USER CODE BEGIN (CAN_General,3) + +// USER CODE END + + +//**************************************************************************** +// @Defines +//**************************************************************************** + +// USER CODE BEGIN (CAN_General,4) + +// USER CODE END + + +//**************************************************************************** +// @Typedefs +//**************************************************************************** + +// USER CODE BEGIN (CAN_General,5) + +// USER CODE END + + +//**************************************************************************** +// @Imported Global Variables +//**************************************************************************** + +// USER CODE BEGIN (CAN_General,6) + +// USER CODE END + + +//**************************************************************************** +// @Global Variables +//**************************************************************************** + + +// USER CODE BEGIN (CAN_General,7) + +// USER CODE END + + +//**************************************************************************** +// @External Prototypes +//**************************************************************************** + +// USER CODE BEGIN (CAN_General,8) + +// USER CODE END + + +//**************************************************************************** +// @Prototypes Of Local Functions +//**************************************************************************** + +// USER CODE BEGIN (CAN_General,9) + +// USER CODE END + + +//**************************************************************************** +// @Function void CAN_vInit(void) +// +//---------------------------------------------------------------------------- +// @Description This is the initialization function of the CAN function +// library. It is assumed that the SFRs used by this library +// are in their reset state. +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2025/3/30 +// +//**************************************************************************** + +// USER CODE BEGIN (Init,1) + +// USER CODE END + +void CAN_vInit(void) +{ + + // USER CODE BEGIN (Init,2) + + // USER CODE END + + /// ----------------------------------------------------------------------- + /// Configuration of the Module Clock: + /// ----------------------------------------------------------------------- + /// - the CAN module clock = 48.00 MHz + /// - FCLK runs at 2 times the frequency of PCLK. + + /// - CMCON - Clock Control Register is Configured in MAIN_vInit + + // - wait until Panel has finished the initialisation + CAN_vWriteCANAddress(CAN_PANCTR); // Addressing CAN_PANCTR + CAN_DATA1 = CAN_PANCTR_BUSY; + while(CAN_DATA1 & CAN_PANCTR_BUSY){ // wait until Panel has finished the + // initialisation + CAN_ADCON &= ~0x01; + } + + /// ----------------------------------------------------------------------- + /// Configuration of CAN Node 0: + /// ----------------------------------------------------------------------- + + /// General Configuration of the Node 0: + /// - set INIT and CCE + + //-----------CAN_NCR0 = 0x00000041------------------------------------- + + CAN_vWriteCANAddress(CAN_NCR0); // Addressing CAN_NCR0 + CAN_DATA0 = 0x41; // load NODE 0 control register[7-0] + CAN_vWriteEN(D0_VALID+ADR_INC); // Data0 is Valid for transmission and + // Write is EnabledCAN Address pointing + // to the CAN_NSR0. + + // CAN Address pointing to the CAN_NIPR0 + CAN_ADCON = ADR_INC; // Auto Increment the current address(+1) + + /// - load NODE 0 interrupt pointer register + //-----------CAN_NIPR0 = 0x00000000------------------------------------- + + CAN_DATA0 = 0x00; // load NIPR0_LECINP, NIPR0_ALINP + CAN_DATA1 = 0x00; // load NIPR0_CFCINP, NIPR0_TRINP + CAN_vWriteEN(D0_VALID+D1_VALID+ADR_INC); // Data0 and Data1 are Valid for + // with Auto Increment + // transmission and Write is + // Enabled CAN Address pointing + // to the CAN_NPCR0 + + /// ----------------------------------------------------------------------- + /// Configuration of the used CAN Input Port Pins: + /// ----------------------------------------------------------------------- + /// - Pin P1.0 is used as RXDC0_0 input + + //-----------CAN_NPCR0 = 0x00000000------------------------------------- + /// - Loop-back mode is disabled + + CAN_DATA0 = 0x00; // Receive Select NPCR0_RXSEL + CAN_DATA1 = 0x00; // Loop-back mode is disabled + CAN_vWriteEN(D0_VALID+D1_VALID+ADR_INC); // Data0 & 1 are Valid for + // transmission and Write is + // Enabled with AutoIncrement + // CAN Address pointing to the + // CAN_NBTR0 + + + + /// Configuration of the Node 0 Baud Rate: + /// - required baud rate = 250.000 kbaud + /// - real baud rate = 252.632 kbaud + /// - sample point = 60.00 % + /// - there are 5 time quanta before sample point + /// - there are 4 time quanta after sample point + /// - the (re)synchronization jump width is 2 time quanta + + //-----------CAN_NBTR0 = 0x00003452------------------------------------- + + CAN_DATA0 = 0x52; // load NBTR0_SJW, BRP + CAN_DATA1 = 0x34; // load NBTR0_DIV8, TSEG2, TSEG1 + CAN_vWriteEN(D0_VALID+D1_VALID+ADR_INC); // Data0, 1 are valid for + // transmission and Write is + // Enabled with Auto + // Increment(+1) CAN Address + // pointing to the CAN_NECNT0 + + /// Configuration of the Node 0 Error Counter: + /// - the error warning threshold value (warning level) is 96 + + //-----------CAN_NECNT0 = 0x00600000------------------------------------- + + CAN_DATA2 = 0x60; // load NECNT0_EWRNLVL register + CAN_vWriteEN(D2_VALID+ADR_INC); // Data2 is Valid for transmission, Auto + // Increment current address(+1) and + // Write is Enabled CAN Address pointing + // to the CAN_NFCR0 + + /// Configuration of the Frame Counter: + /// - Frame Counter Mode: the counter is incremented upon the reception + /// and transmission of frames + /// - frame counter: 0x0000 + + + //-----------CAN_NFCR0 = 0x00000000------------------------------------- + + CAN_DATA0 = 0x00; // load NFCR0_CFCL + CAN_DATA1 = 0x00; // load NFCR0_CFCH + CAN_DATA2 = 0x00; // load NFCR0_CFCOV, CFCIE, CFMOD, CFSEL + CAN_vWriteEN(D0_VALID+D1_VALID+D2_VALID); // Data0, 1, 2 are valid for + // transmission and Write is + // Enabled + + /// ----------------------------------------------------------------------- + /// Configuration of CAN Node 1: + /// ----------------------------------------------------------------------- + + /// General Configuration of the Node 1: + /// - set INIT and CCE + + //-----------CAN_NCR1 = 0x00000041------------------------------------- + + CAN_vWriteCANAddress(CAN_NCR1); // Addressing CAN_NCR1 + CAN_DATA0 = 0x41; // load NODE 1 control register[7-0] + CAN_vWriteEN(D0_VALID+ADR_INC); // Data0 is Valid for transmission and + // Write is EnabledCAN Address pointing + // to the CAN_NSR1. + + /// ----------------------------------------------------------------------- + /// Configuration of the used CAN Output Port Pins: + /// ----------------------------------------------------------------------- + /// Pin P1.1 is used as TXDC0_0 Output + /// - NODE1 TXD Pin's are not used + + SFR_PAGE(_pp2, noSST); // switch to page 2 + P1_ALTSEL0 |= 0x02; // set AltSel0 + P1_ALTSEL1 |= 0x02; // set AltSel1 + + SFR_PAGE(_pp0, noSST); // switch to page 0 + P1_DIR |= 0x02; // set Direction as Output + + + /// ----------------------------------------------------------------------- + /// Configuration of the CAN Message Object List Structure: + /// ----------------------------------------------------------------------- + + CAN_vWriteCANAddress(CAN_PANCTR); // Addressing CAN_PANCTR + + /// Allocate MOs for list 1: + CAN_vSetListCommand(0x01080002); // MO8 for list 1 + CAN_vSetListCommand(0x01050002); // MO5 for list 1 + CAN_vSetListCommand(0x01060002); // MO6 for list 1 + CAN_vSetListCommand(0x01070002); // MO7 for list 1 + CAN_vSetListCommand(0x01090002); // MO9 for list 1 + CAN_vSetListCommand(0x010A0002); // MO10 for list 1 + + /// ----------------------------------------------------------------------- + /// Configuration of the CAN Message Objects 0 - 31: + /// ----------------------------------------------------------------------- + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 0: + /// ----------------------------------------------------------------------- + /// - message object 0 is not valid + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 1: + /// ----------------------------------------------------------------------- + /// - message object 1 is not valid + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 2: + /// ----------------------------------------------------------------------- + /// - message object 2 is not valid + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 3: + /// ----------------------------------------------------------------------- + /// - message object 3 is not valid + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 4: + /// ----------------------------------------------------------------------- + /// - message object 4 is not valid + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 5: + /// ----------------------------------------------------------------------- + /// - message object 5 is valid + /// - message object is used as receive object + /// - this message object is assigned to list 1 (node 0) + + //--------------MOCTR5 = 0x00A00000--------------------------------------- + + CAN_vWriteCANAddress(CAN_MOCTR5); // Addressing MO5 control register + + CAN_vWriteAMData(0x00A00000); // load MO5 control register + + // CAN Address pointing to the CAN_MOAR5 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + /// - priority class 3; transmit acceptance filtering is based on the list + /// order (like class 1) + /// - extended 29-bit identifier + /// - identifier 29-bit: 0x00000003 + + //--------------MOAR5 = 0xE0000003--------------------------------------- + + CAN_vWriteAMData(0xE0000003); // load MO5 arbitration register + + // CAN Address pointing to the CAN_MODATAH5 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + + //--------------MODATAH5 = 0x00000000--------------------------------------- + + CAN_vWriteAMData(0x00000000); // load MO5 data register high + + // CAN Address pointing to the CAN_MODATAL5 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + //--------------MODATAL5 = 0x00000000--------------------------------------- + + CAN_vWriteAMData(0x00000000); // load MO5 data register low + + // CAN Address pointing to the CAN_MOAMR5 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + /// - only accept receive frames with matching IDE bit + /// - acceptance mask 29-bit: 0x1FFFFFFF + + //--------------CAN_MOAMR5 = 0x3FFFFFFF------------------------------------ + + CAN_vWriteAMData(0x3FFFFFFF); // load MO5 acceptance mask register + + // CAN Address pointing to the CAN_MOIPR5 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + /// - use message pending register 0 bit position 5 + + //--------------MOIPR5 = 0x00000500--------------------------------------- + + CAN_vWriteAMData(0x00000500); // load MO5 interrupt pointer register + + // CAN Address pointing to the CAN_MOFGPR5 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + + //--------------MOFGPR5 = 0x00000000--------------------------------------- + + CAN_vWriteAMData(0x00000000); // load MO5 FIFO/gateway pointer register + + // CAN Address pointing to the CAN_MOFCR5 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + /// - this object is a STANDARD MESSAGE OBJECT + /// - 8 valid data bytes + + //--------------MOFCR5 = 0x08000000--------------------------------------- + + CAN_vWriteAMData(0x08000000); // load MO5 function control register + + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 6: + /// ----------------------------------------------------------------------- + /// - message object 6 is valid + /// - message object is used as transmit object + /// - this message object is assigned to list 1 (node 0) + + //--------------MOCTR6 = 0x0EA80000--------------------------------------- + + CAN_vWriteCANAddress(CAN_MOCTR6); // Addressing MO6 control register + + CAN_vWriteAMData(0x0EA80000); // load MO6 control register + + // CAN Address pointing to the CAN_MOAR6 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + /// - priority class 3; transmit acceptance filtering is based on the list + /// order (like class 1) + /// - extended 29-bit identifier + /// - identifier 29-bit: 0x11000001 + + //--------------MOAR6 = 0xF1000001--------------------------------------- + + CAN_vWriteAMData(0xF1000001); // load MO6 arbitration register + + // CAN Address pointing to the CAN_MODATAH6 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + + //--------------MODATAH6 = 0x00000000--------------------------------------- + + CAN_vWriteAMData(0x00000000); // load MO6 data register high + + // CAN Address pointing to the CAN_MODATAL6 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + //--------------MODATAL6 = 0x00000000--------------------------------------- + + CAN_vWriteAMData(0x00000000); // load MO6 data register low + + // CAN Address pointing to the CAN_MOAMR6 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + /// - only accept receive frames with matching IDE bit + /// - acceptance mask 29-bit: 0x1FFFFFFF + + //--------------CAN_MOAMR6 = 0x3FFFFFFF------------------------------------ + + CAN_vWriteAMData(0x3FFFFFFF); // load MO6 acceptance mask register + + // CAN Address pointing to the CAN_MOIPR6 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + /// - use message pending register 0 bit position 6 + + //--------------MOIPR6 = 0x00000600--------------------------------------- + + CAN_vWriteAMData(0x00000600); // load MO6 interrupt pointer register + + // CAN Address pointing to the CAN_MOFGPR6 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + + //--------------MOFGPR6 = 0x00000000--------------------------------------- + + CAN_vWriteAMData(0x00000000); // load MO6 FIFO/gateway pointer register + + // CAN Address pointing to the CAN_MOFCR6 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + /// - this object is a STANDARD MESSAGE OBJECT + /// - 8 valid data bytes + + //--------------MOFCR6 = 0x08000000--------------------------------------- + + CAN_vWriteAMData(0x08000000); // load MO6 function control register + + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 7: + /// ----------------------------------------------------------------------- + /// - message object 7 is valid + /// - message object is used as receive object + /// - this message object is assigned to list 1 (node 0) + + //--------------MOCTR7 = 0x00A00000--------------------------------------- + + CAN_vWriteCANAddress(CAN_MOCTR7); // Addressing MO7 control register + + CAN_vWriteAMData(0x00A00000); // load MO7 control register + + // CAN Address pointing to the CAN_MOAR7 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + /// - priority class 3; transmit acceptance filtering is based on the list + /// order (like class 1) + /// - extended 29-bit identifier + /// - identifier 29-bit: 0x11000002 + + //--------------MOAR7 = 0xF1000002--------------------------------------- + + CAN_vWriteAMData(0xF1000002); // load MO7 arbitration register + + // CAN Address pointing to the CAN_MODATAH7 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + + //--------------MODATAH7 = 0x00000000--------------------------------------- + + CAN_vWriteAMData(0x00000000); // load MO7 data register high + + // CAN Address pointing to the CAN_MODATAL7 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + //--------------MODATAL7 = 0x00000000--------------------------------------- + + CAN_vWriteAMData(0x00000000); // load MO7 data register low + + // CAN Address pointing to the CAN_MOAMR7 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + /// - only accept receive frames with matching IDE bit + /// - acceptance mask 29-bit: 0x1FFFFFFF + + //--------------CAN_MOAMR7 = 0x3FFFFFFF------------------------------------ + + CAN_vWriteAMData(0x3FFFFFFF); // load MO7 acceptance mask register + + // CAN Address pointing to the CAN_MOIPR7 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + /// - use message pending register 0 bit position 7 + + //--------------MOIPR7 = 0x00000700--------------------------------------- + + CAN_vWriteAMData(0x00000700); // load MO7 interrupt pointer register + + // CAN Address pointing to the CAN_MOFGPR7 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + + //--------------MOFGPR7 = 0x00000000--------------------------------------- + + CAN_vWriteAMData(0x00000000); // load MO7 FIFO/gateway pointer register + + // CAN Address pointing to the CAN_MOFCR7 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + /// - this object is a STANDARD MESSAGE OBJECT + /// - 8 valid data bytes + + //--------------MOFCR7 = 0x08000000--------------------------------------- + + CAN_vWriteAMData(0x08000000); // load MO7 function control register + + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 8: + /// ----------------------------------------------------------------------- + /// - message object 8 is valid + /// - message object is used as receive object + /// - this message object is assigned to list 1 (node 0) + + //--------------MOCTR8 = 0x00A00000--------------------------------------- + + CAN_vWriteCANAddress(CAN_MOCTR8); // Addressing MO8 control register + + CAN_vWriteAMData(0x00A00000); // load MO8 control register + + // CAN Address pointing to the CAN_MOAR8 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + /// - priority class 3; transmit acceptance filtering is based on the list + /// order (like class 1) + /// - extended 29-bit identifier + /// - identifier 29-bit: 0x11000003 + + //--------------MOAR8 = 0xF1000003--------------------------------------- + + CAN_vWriteAMData(0xF1000003); // load MO8 arbitration register + + // CAN Address pointing to the CAN_MODATAH8 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + + //--------------MODATAH8 = 0x00000000--------------------------------------- + + CAN_vWriteAMData(0x00000000); // load MO8 data register high + + // CAN Address pointing to the CAN_MODATAL8 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + //--------------MODATAL8 = 0x00000000--------------------------------------- + + CAN_vWriteAMData(0x00000000); // load MO8 data register low + + // CAN Address pointing to the CAN_MOAMR8 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + /// - only accept receive frames with matching IDE bit + /// - acceptance mask 29-bit: 0x1FFFFFFF + + //--------------CAN_MOAMR8 = 0x3FFFFFFF------------------------------------ + + CAN_vWriteAMData(0x3FFFFFFF); // load MO8 acceptance mask register + + // CAN Address pointing to the CAN_MOIPR8 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + /// - use message pending register 0 bit position 8 + + //--------------MOIPR8 = 0x00000800--------------------------------------- + + CAN_vWriteAMData(0x00000800); // load MO8 interrupt pointer register + + // CAN Address pointing to the CAN_MOFGPR8 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + + //--------------MOFGPR8 = 0x00000000--------------------------------------- + + CAN_vWriteAMData(0x00000000); // load MO8 FIFO/gateway pointer register + + // CAN Address pointing to the CAN_MOFCR8 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + /// - this object is a STANDARD MESSAGE OBJECT + /// - 8 valid data bytes + + //--------------MOFCR8 = 0x08000000--------------------------------------- + + CAN_vWriteAMData(0x08000000); // load MO8 function control register + + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 9: + /// ----------------------------------------------------------------------- + /// - message object 9 is valid + /// - message object is used as transmit object + /// - this message object is assigned to list 1 (node 0) + + //--------------MOCTR9 = 0x0EA80000--------------------------------------- + + CAN_vWriteCANAddress(CAN_MOCTR9); // Addressing MO9 control register + + CAN_vWriteAMData(0x0EA80000); // load MO9 control register + + // CAN Address pointing to the CAN_MOAR9 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + /// - priority class 3; transmit acceptance filtering is based on the list + /// order (like class 1) + /// - extended 29-bit identifier + /// - identifier 29-bit: 0x1FFFFFF0 + + //--------------MOAR9 = 0xFFFFFFF0--------------------------------------- + + CAN_vWriteAMData(0xFFFFFFF0); // load MO9 arbitration register + + // CAN Address pointing to the CAN_MODATAH9 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + + //--------------MODATAH9 = 0x00000000--------------------------------------- + + CAN_vWriteAMData(0x00000000); // load MO9 data register high + + // CAN Address pointing to the CAN_MODATAL9 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + //--------------MODATAL9 = 0x00000000--------------------------------------- + + CAN_vWriteAMData(0x00000000); // load MO9 data register low + + // CAN Address pointing to the CAN_MOAMR9 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + /// - only accept receive frames with matching IDE bit + /// - acceptance mask 29-bit: 0x1FFFFFFF + + //--------------CAN_MOAMR9 = 0x3FFFFFFF------------------------------------ + + CAN_vWriteAMData(0x3FFFFFFF); // load MO9 acceptance mask register + + // CAN Address pointing to the CAN_MOIPR9 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + /// - use message pending register 0 bit position 9 + + //--------------MOIPR9 = 0x00000900--------------------------------------- + + CAN_vWriteAMData(0x00000900); // load MO9 interrupt pointer register + + // CAN Address pointing to the CAN_MOFGPR9 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + + //--------------MOFGPR9 = 0x00000000--------------------------------------- + + CAN_vWriteAMData(0x00000000); // load MO9 FIFO/gateway pointer register + + // CAN Address pointing to the CAN_MOFCR9 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + /// - this object is a STANDARD MESSAGE OBJECT + /// - 8 valid data bytes + + //--------------MOFCR9 = 0x08000000--------------------------------------- + + CAN_vWriteAMData(0x08000000); // load MO9 function control register + + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 10: + /// ----------------------------------------------------------------------- + /// - message object 10 is valid + /// - message object is used as transmit object + /// - this message object is assigned to list 1 (node 0) + + //--------------MOCTR10 = 0x0EA80000--------------------------------------- + + CAN_vWriteCANAddress(CAN_MOCTR10); // Addressing MO10 control register + + CAN_vWriteAMData(0x0EA80000); // load MO10 control register + + // CAN Address pointing to the CAN_MOAR10 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + /// - priority class 3; transmit acceptance filtering is based on the list + /// order (like class 1) + /// - extended 29-bit identifier + /// - identifier 29-bit: 0x11000000 + + //--------------MOAR10 = 0xF1000000--------------------------------------- + + CAN_vWriteAMData(0xF1000000); // load MO10 arbitration register + + // CAN Address pointing to the CAN_MODATAH10 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + + //--------------MODATAH10 = 0x00000000--------------------------------------- + + CAN_vWriteAMData(0x00000000); // load MO10 data register high + + // CAN Address pointing to the CAN_MODATAL10 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + //--------------MODATAL10 = 0x00000000--------------------------------------- + + CAN_vWriteAMData(0x00000000); // load MO10 data register low + + // CAN Address pointing to the CAN_MOAMR10 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + /// - only accept receive frames with matching IDE bit + /// - acceptance mask 29-bit: 0x1FFFFFFF + + //--------------CAN_MOAMR10 = 0x3FFFFFFF------------------------------------ + + CAN_vWriteAMData(0x3FFFFFFF); // load MO10 acceptance mask register + + // CAN Address pointing to the CAN_MOIPR10 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + /// - use message pending register 0 bit position 10 + + //--------------MOIPR10 = 0x00000A00--------------------------------------- + + CAN_vWriteAMData(0x00000A00); // load MO10 interrupt pointer register + + // CAN Address pointing to the CAN_MOFGPR10 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + + //--------------MOFGPR10 = 0x00000000--------------------------------------- + + CAN_vWriteAMData(0x00000000); // load MO10 FIFO/gateway pointer register + + // CAN Address pointing to the CAN_MOFCR10 + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + /// - this object is a STANDARD MESSAGE OBJECT + /// - 8 valid data bytes + + //--------------MOFCR10 = 0x08000000--------------------------------------- + + CAN_vWriteAMData(0x08000000); // load MO10 function control register + + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 11: + /// ----------------------------------------------------------------------- + /// - message object 11 is not valid + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 12: + /// ----------------------------------------------------------------------- + /// - message object 12 is not valid + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 13: + /// ----------------------------------------------------------------------- + /// - message object 13 is not valid + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 14: + /// ----------------------------------------------------------------------- + /// - message object 14 is not valid + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 15: + /// ----------------------------------------------------------------------- + /// - message object 15 is not valid + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 16: + /// ----------------------------------------------------------------------- + /// - message object 16 is not valid + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 17: + /// ----------------------------------------------------------------------- + /// - message object 17 is not valid + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 18: + /// ----------------------------------------------------------------------- + /// - message object 18 is not valid + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 19: + /// ----------------------------------------------------------------------- + /// - message object 19 is not valid + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 20: + /// ----------------------------------------------------------------------- + /// - message object 20 is not valid + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 21: + /// ----------------------------------------------------------------------- + /// - message object 21 is not valid + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 22: + /// ----------------------------------------------------------------------- + /// - message object 22 is not valid + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 23: + /// ----------------------------------------------------------------------- + /// - message object 23 is not valid + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 24: + /// ----------------------------------------------------------------------- + /// - message object 24 is not valid + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 25: + /// ----------------------------------------------------------------------- + /// - message object 25 is not valid + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 26: + /// ----------------------------------------------------------------------- + /// - message object 26 is not valid + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 27: + /// ----------------------------------------------------------------------- + /// - message object 27 is not valid + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 28: + /// ----------------------------------------------------------------------- + /// - message object 28 is not valid + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 29: + /// ----------------------------------------------------------------------- + /// - message object 29 is not valid + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 30: + /// ----------------------------------------------------------------------- + /// - message object 30 is not valid + /// ----------------------------------------------------------------------- + /// Configuration of Message Object 31: + /// ----------------------------------------------------------------------- + /// - message object 31 is not valid + + /// ----------------------------------------------------------------------- + /// Configuration of the Interrupts: + /// ----------------------------------------------------------------------- + /// - CAN interrupt node 0 is disabled + /// - CAN interrupt node 1 is disabled + /// - CAN interrupt node 2 is disabled + /// - CAN interrupt node 3 is disabled + /// - CAN interrupt node 4 is disabled + /// - CAN interrupt node 5 is disabled + /// - CAN interrupt node 6 is disabled + /// - CAN interrupt node 7 is disabled + + + // ----------------------------------------------------------------------- + // Start the CAN Nodes: + // ----------------------------------------------------------------------- + + /// - -----------CAN_NCR0-------------------------------------------------------- + + CAN_vWriteCANAddress(CAN_NCR0); // Addressing CAN_NCR0 + CAN_vReadEN(); // Read Mode is Enabled + CAN_DATA0 &= ~0x41; // reset INIT and CCE + CAN_vWriteEN(D0_VALID); // Data0 is Valid for transmission and Write + // is Enabled + + + + // USER CODE BEGIN (Init,3) + + // USER CODE END + +} // End of function CAN_vInit + +//**************************************************************************** +// @Function void CAN_vWriteAMData(ulong ulValue) +// +//---------------------------------------------------------------------------- +// @Description This function writes 32-bit Data to CAN Data Register's +// 0-3respectively. +// Note: +// Write Process : +// ->Write the address of the MultiCAN kernel register to the +// CAN_ADL and CAN_ADH registers. +// use macro : CAN_vWriteCANAddress. +// ->Write the data to the +// CAN_DATA0/CAN_DATA1/CAN_DATA2/CAN_DATA3 registers. +// ->Write the register CAN_ADCON, including setting the valid +// bit of the data registers and setting register bit RWEN to +// 1. +// ->The valid data will be written to the MultiCAN kernel +// only once. Register bit BSY will become 1. +// ->When Register bit BSY becomes 0, the transmission is +// finished. +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters ulValue: +// 32-bit Data +// +//---------------------------------------------------------------------------- +// @Date 2025/3/30 +// +//**************************************************************************** + +// USER CODE BEGIN (WriteAMData,1) + +// USER CODE END + +void CAN_vWriteAMData(ulong ulValue) +{ + un_32bit ulData; + ulData.ulVal = ulValue; + + CAN_DATA0 = ulData.ubDB[3]; // load CAN Data Register 0 + CAN_DATA1 = ulData.ubDB[2]; // load CAN Data Register 1 + CAN_DATA2 = ulData.ubDB[1]; // load CAN Data Register 2 + CAN_DATA3 = ulData.ubDB[0]; // load CAN Data Register 3 + CAN_vWriteEN(ALL_DATA_VALID); // Writemode is Enabled +} // End of function CAN_vWriteAMData + +//**************************************************************************** +// @Function void CAN_vSetListCommand(ulong ulVal) +// +//---------------------------------------------------------------------------- +// @Description This function write's 32-bit Data to CAN_PANCTR Register. +// +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters ulVal: +// 32-bit Data +// +//---------------------------------------------------------------------------- +// @Date 2025/3/30 +// +//**************************************************************************** + +// USER CODE BEGIN (SetListCommand,1) + +// USER CODE END + +void CAN_vSetListCommand(ulong ulVal) +{ + CAN_vWriteAMData(ulVal); // - load Panel Control Register + CAN_DATA1 = CAN_PANCTR_BUSY; + while(CAN_DATA1 & CAN_PANCTR_BUSY){ // wait until Panel has finished the + // initialisation + CAN_ADCON &= ~0x01; + } +} // End of function CAN_vSetListCommand + +//**************************************************************************** +// @Function void CAN_vGetMsgObj(ubyte ubObjNr, stCAN_SWObj *pstObj) +// +//---------------------------------------------------------------------------- +// @Description This function fills the forwarded SW message object with +// the content of the chosen HW message object. +// +// The structure of the SW message object is defined in the +// header file CAN.H (see stCAN_SWObj). +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters ubObjNr: +// Number of the message object to be read (0-31) +// @Parameters *pstObj: +// Pointer on a message object to be filled by this function +// +//---------------------------------------------------------------------------- +// @Date 2025/3/30 +// +//**************************************************************************** + +// USER CODE BEGIN (GetMsgObj,1) + +// USER CODE END + +void CAN_vGetMsgObj(ubyte ubObjNr, stCAN_SWObj *pstObj) +{ +ubyte ubTemp; + + CAN_pushAMRegs(); // PUSH the CAN Access Mediator Register + + //----- get DLC ------------------------------------------------------- + + CAN_vWriteCANAddress(CAN_MOFCR(ubObjNr)); + CAN_vReadEN(); // Readmode is Enabled + + pstObj->ubMOdlc = CAN_DATA3;//MOFCRn[31-24] DLC + + //----- get MODATAL --------------------------------------------------- + CAN_vWriteCANAddress(CAN_MODATAL(ubObjNr)); + + CAN_vReadEN(); // Readmode is Enabled + pstObj->ulDATAL.ubDB[3] = CAN_DATA0; // Read CAN Data Register 0 + pstObj->ulDATAL.ubDB[2] = CAN_DATA1; // Read CAN Data Register 1 + pstObj->ulDATAL.ubDB[1] = CAN_DATA2; // Read CAN Data Register 2 + pstObj->ulDATAL.ubDB[0] = CAN_DATA3; // Read CAN Data Register 3 + + // CAN Address pointing to the CAN_MODATAH + CAN_ADCON = ADR_INC; + + //----- get MODATAH --------------------------------------------------- + + CAN_vReadEN(); // Readmode is Enabled + pstObj->ulDATAH.ubDB[3] = CAN_DATA0; // Read CAN Data Register 0 + pstObj->ulDATAH.ubDB[2] = CAN_DATA1; // Read CAN Data Register 1 + pstObj->ulDATAH.ubDB[1] = CAN_DATA2; // Read CAN Data Register 2 + pstObj->ulDATAH.ubDB[0] = CAN_DATA3; // Read CAN Data Register 3 + + //----- get DIR ------------------------------------------------------- + CAN_vWriteCANAddress(CAN_MOCTR(ubObjNr)); + CAN_vReadEN(); // Readmode is Enabled + + if(CAN_DATA1 & 0x08) // if transmit object (MOSTAT_DIR) + { + pstObj->ubMOcfg = (pstObj->ubMOcfg | 0x08); // set DIR + } + + //----- get XID - Extended Identifier --------------------------------- + + // CAN Address pointing to the CAN_MOARn + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + CAN_vReadEN(); // ReadMode is Enabled + + if(CAN_DATA3 & 0x20) // if extended identifier + { + + //----- get XID - Extended Identifier (MOARn) ------------------------ + pstObj->ulID.ubDB[3] = CAN_DATA0; // MOARn[7-0] + pstObj->ulID.ubDB[2] = CAN_DATA1; // MOARn[15-8] + pstObj->ulID.ubDB[1] = CAN_DATA2; // MOARn[23-16] + pstObj->ulID.ubDB[0] = (CAN_DATA3 & 0x1f); // MOARn[31-24] + + // CAN Address pointing to the CAN_MODATAH + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + // CAN Address pointing to the CAN_MODATAL + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + // CAN Address pointing to the CAN_MOAMR + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + CAN_vReadEN(); // ReadMode is Enabled + + //----- get XID - Extended Acceptance Mask (MOAMRn) ----------------- + pstObj->ulMask.ubDB[3] = CAN_DATA0; // MOAMRn[7-0] + pstObj->ulMask.ubDB[2] = CAN_DATA1; // MOAMRn[15-8] + pstObj->ulMask.ubDB[1] = CAN_DATA2; // MOAMRn[23-16] + pstObj->ulMask.ubDB[0] = (CAN_DATA3 & 0x1f); // MOAMRn[31-24] + + pstObj->ubMOcfg = (pstObj->ubMOcfg | 0x04); // set IDE 29-bit + } + else // standard identifier + { + //----- get - ID - Standard Identifier (MOARn) --------------------- + pstObj->ulID.ubDB[3] = (CAN_DATA2 & 0xFC) >> 2; // MOARn[23-16] + pstObj->ulID.ubDB[2] = (CAN_DATA3 & 0x1f); // MOARn[31-24] + pstObj->ulID.ubDB[1] = 0x00; // MOARn[15-8] + pstObj->ulID.ubDB[0] = 0x00; // MOARn[15-8] + + ubTemp = 0; + ubTemp = ((pstObj->ulID.ubDB[2]) & 0x03) << 6; + pstObj->ulID.ubDB[2] = (pstObj->ulID.ubDB[2] >> 2); + pstObj->ulID.ubDB[3] = (pstObj->ulID.ubDB[3] + ubTemp); + + // CAN Address pointing to the CAN_MODATAH + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + // CAN Address pointing to the CAN_MODATAL + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + // CAN Address pointing to the CAN_MOAMR + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + CAN_vReadEN(); // ReadMode is Enabled + + //----- get - ID - Acceptance Mask (MOAMRn) ----------------------- + + pstObj->ulMask.ubDB[3] = (CAN_DATA2 & 0xFC) >> 2; // MOAMRn[23-16] + pstObj->ulMask.ubDB[2] = (CAN_DATA3 & 0x1f); // MOAMRn[31-24] + pstObj->ulMask.ubDB[1] = 0x00; // MOAMRn[15-8] + pstObj->ulMask.ubDB[0] = 0x00; // MOAMRn[15-8] + + ubTemp = 0; + ubTemp = ((pstObj->ulMask.ubDB[2]) & 0x03) << 6; + pstObj->ulMask.ubDB[2] = (pstObj->ulMask.ubDB[2] >> 2); + pstObj->ulMask.ubDB[3] = (pstObj->ulMask.ubDB[3] + ubTemp); + } + + //----- get CFCVAL - CAN Frame Counter Value (MOIPRn) ----------------- + + CAN_vWriteCANAddress(CAN_MOIPR(ubObjNr)); + CAN_vReadEN(); // Readmode is Enabled + + pstObj->uwCounter.ubDB[1] = CAN_DATA2; // MOIPRn[16-23] + pstObj->uwCounter.ubDB[0] = CAN_DATA3; // MOIPRn[31-24] + + CAN_popAMRegs(); // POP the CAN Access Mediator Register +} // End of function CAN_vGetMsgObj + +//**************************************************************************** +// @Function ubyte CAN_ubRequestMsgObj(ubyte ubObjNr) +// +//---------------------------------------------------------------------------- +// @Description If a TRANSMIT OBJECT is to be reconfigured it must first be +// accessed. The access to the transmit object is exclusive. +// This function checks whether the choosen message object is +// still executing a transmit request, or if the object can be +// accessed exclusively. +// After the message object is reserved, it can be +// reconfigured by using the function CAN_vConfigMsgObj or +// CAN_vLoadData. +// Both functions enable access to the object for the CAN +// controller. +// By calling the function CAN_vTransmit transfering of data +// is started. +// +//---------------------------------------------------------------------------- +// @Returnvalue 0 message object is busy (a transfer is active), else 1 +// +//---------------------------------------------------------------------------- +// @Parameters ubObjNr: +// Number of the message object (0-31) +// +//---------------------------------------------------------------------------- +// @Date 2025/3/30 +// +//**************************************************************************** + +// USER CODE BEGIN (RequestMsgObj,1) + +// USER CODE END + +ubyte CAN_ubRequestMsgObj(ubyte ubObjNr) +{ +ubyte ubReturn = 0; + + CAN_pushAMRegs(); // PUSH the CAN Access Mediator Register + + CAN_vWriteCANAddress(CAN_MOCTR(ubObjNr)); + CAN_vReadEN(); // Readmode is Enabled + + if((CAN_DATA1 & 0x01) == 0) // if reset TXRQ + { + CAN_vWriteCANData(0x00000020); // reset MSGVAL + ubReturn = 1; + } + CAN_popAMRegs(); // POP the CAN Access Mediator Register + +return(ubReturn); +} // End of function CAN_ubRequestMsgObj + +//**************************************************************************** +// @Function ubyte CAN_ubNewData(ubyte ubObjNr) +// +//---------------------------------------------------------------------------- +// @Description This function checks whether the selected RECEIVE OBJECT +// has received a new message. If so the function returns the +// value '1'. +// +//---------------------------------------------------------------------------- +// @Returnvalue 1 the message object has received a new message, else 0 +// +//---------------------------------------------------------------------------- +// @Parameters ubObjNr: +// Number of the message object (0-31) +// +//---------------------------------------------------------------------------- +// @Date 2025/3/30 +// +//**************************************************************************** + +// USER CODE BEGIN (NewData,1) + +// USER CODE END + +ubyte CAN_ubNewData(ubyte ubObjNr) +{ +ubyte ubReturn = 0; + + CAN_pushAMRegs(); // PUSH the CAN Access Mediator Register + + CAN_vWriteCANAddress(CAN_MOCTR(ubObjNr)); + CAN_vReadEN(); // Readmode is Enabled + if(CAN_DATA0 & 0x08) // if NEWDAT + { + ubReturn = 1; + } + CAN_popAMRegs(); // POP the CAN Access Mediator Register + +return(ubReturn); +} // End of function CAN_ubNewData + +//**************************************************************************** +// @Function void CAN_vTransmit(ubyte ubObjNr) +// +//---------------------------------------------------------------------------- +// @Description This function triggers the CAN controller to send the +// selected message. +// If the selected message object is a TRANSMIT OBJECT then +// this function triggers the sending of a data frame. If +// however the selected message object is a RECEIVE OBJECT +// this function triggers the sending of a remote frame. +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters ubObjNr: +// Number of the message object (0-31) +// +//---------------------------------------------------------------------------- +// @Date 2025/3/30 +// +//**************************************************************************** + +// USER CODE BEGIN (Transmit,1) + +// USER CODE END + +void CAN_vTransmit(ubyte ubObjNr) +{ + CAN_pushAMRegs(); // PUSH the CAN Access Mediator Register + + CAN_vWriteCANAddress(CAN_MOCTR(ubObjNr)); //Addressing CAN_MOCTR register + CAN_vWriteCANData(0x07200000); // set TXRQ,TXEN0,TXEN1,MSGVAL + + CAN_popAMRegs(); // POP the CAN Access Mediator Register + +} // End of function CAN_vTransmit + +//**************************************************************************** +// @Function void CAN_vLoadData(ubyte ubObjNr, ulong *ulpubData) +// +//---------------------------------------------------------------------------- +// @Description If a hardware TRANSMIT OBJECT has to be loaded with data +// but not with a new identifier, this function may be used +// instead of the function CAN_vConfigMsgObj. The message +// object should be accessed by calling the function +// CAN_ubRequestMsgObj before calling this function. This +// prevents the CAN controller from working with invalid data. +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters ubObjNr: +// Number of the message object to be configured (0-31) +// @Parameters *ulpubData: +// Pointer on a data buffer +// +//---------------------------------------------------------------------------- +// @Date 2025/3/30 +// +//**************************************************************************** + +// USER CODE BEGIN (LoadData,1) + +// USER CODE END + +void CAN_vLoadData(ubyte ubObjNr, ulong *ulpubData) +{ + CAN_pushAMRegs(); // PUSH the CAN Access Mediator Register + + CAN_vWriteCANAddress(CAN_MOCTR(ubObjNr)); // Addressing CAN_MOCTRn register + CAN_vWriteCANData(0x00080000); // Set NEWDATA + + // CAN Address pointing to the CAN_MOARn + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + // CAN Address pointing to the CAN_MODATAHn + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + // CAN Address pointing to the CAN_MODATALn + CAN_ADCON = ADR_DEC; // Auto Decrement the current address(-1) + + CAN_vWriteCANData(*ulpubData); // Loading CAN_MODATALn + + // CAN Address pointing to the CAN_MODATAH + CAN_ADCON = ADR_INC; // Auto Increment the current address(+1) + + ulpubData++; + + CAN_vWriteCANData(*ulpubData); // Loading CAN_MODATAHn + + // CAN Address pointing to the CAN_MOARn + CAN_ADCON = ADR_INC; // Auto Increment the current address(+1) + + // CAN Address pointing to the CAN_MOCTRn + CAN_ADCON = ADR_INC; // Auto Increment the current address(+1) + + CAN_vWriteCANData(0x00200040); // reset RTSEL, set MSGVAL + + CAN_popAMRegs(); // POP the CAN Access Mediator Register + +} // End of function CAN_vLoadData + +//**************************************************************************** +// @Function void CAN_vReleaseObj(ubyte ubObjNr) +// +//---------------------------------------------------------------------------- +// @Description This function resets the NEWDAT flag of the selected +// RECEIVE OBJECT, so that the CAN controller have access to +// it. This function must be called if the function +// CAN_ubNewData detects, that new data are present in the +// message object and the actual data have been read by +// calling the function CAN_vGetMsgObj. +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters ubObjNr: +// Number of the message object (0-31) +// +//---------------------------------------------------------------------------- +// @Date 2025/3/30 +// +//**************************************************************************** + +// USER CODE BEGIN (ReleaseObj,1) + +// USER CODE END + +void CAN_vReleaseObj(ubyte ubObjNr) +{ + + CAN_pushAMRegs(); // PUSH the CAN Access Mediator Register + CAN_vWriteCANAddress(CAN_MOCTR(ubObjNr)); // Addressing CAN_MOCTRn register + CAN_vWriteCANData(0x00000008); // reset NEWDAT + + CAN_popAMRegs(); // POP the CAN Access Mediator Register +} // End of function CAN_vReleaseObj + + +// USER CODE BEGIN (CAN_General,10) + +// USER CODE END + diff --git a/CAN.H b/CAN.H new file mode 100644 index 0000000..b9cc6f6 --- /dev/null +++ b/CAN.H @@ -0,0 +1,762 @@ +//**************************************************************************** +// @Module MultiCAN Controller +// @Filename CAN.H +// @Project CL2.0.dav +//---------------------------------------------------------------------------- +// @Controller Infineon XC886CLM-8FF +// +// @Compiler Keil +// +// @Codegenerator 1.3 +// +// @Description: This file contains all function prototypes and macros for +// the CAN module. +// +//---------------------------------------------------------------------------- +// @Date 2025/1/18 20:45:35 +// +//**************************************************************************** + +// USER CODE BEGIN (CAN_Header,1) + +// USER CODE END + + + +#ifndef _CAN_H_ +#define _CAN_H_ + +//**************************************************************************** +// @Project Includes +//**************************************************************************** + +// USER CODE BEGIN (CAN_Header,2) + +// USER CODE END + + +//**************************************************************************** +// @Macros +//**************************************************************************** + +// USER CODE BEGIN (CAN_Header,3) + +// USER CODE END + + +//**************************************************************************** +// @Defines +//**************************************************************************** + +// USER CODE BEGIN (CAN_Header,4) + +// USER CODE END + + +//**************************************************************************** +// @Typedefs +//**************************************************************************** + + +//**************************************************************************** +// @Declaration of SFRs +//**************************************************************************** + + +#define CAN_LIST0 0x0040 +#define CAN_LIST1 0x0041 +#define CAN_LIST2 0x0042 +#define CAN_LIST3 0x0043 +#define CAN_LIST4 0x0044 +#define CAN_LIST5 0x0045 +#define CAN_LIST6 0x0046 +#define CAN_LIST7 0x0047 +#define CAN_MCR 0x0072 +#define CAN_MITR 0x0073 +#define CAN_MOAMR0 0x0403 +#define CAN_MOAMR1 0x040b +#define CAN_MOAMR10 0x0453 +#define CAN_MOAMR11 0x045B +#define CAN_MOAMR12 0x0463 +#define CAN_MOAMR13 0x046B +#define CAN_MOAMR14 0x0473 +#define CAN_MOAMR15 0x047B +#define CAN_MOAMR16 0x0483 +#define CAN_MOAMR17 0x048B +#define CAN_MOAMR18 0x0493 +#define CAN_MOAMR19 0x049B +#define CAN_MOAMR2 0x0413 +#define CAN_MOAMR20 0x04A3 +#define CAN_MOAMR21 0x04AB +#define CAN_MOAMR22 0x04B3 +#define CAN_MOAMR23 0x04BB +#define CAN_MOAMR24 0x04C3 +#define CAN_MOAMR25 0x04CB +#define CAN_MOAMR26 0x04D3 +#define CAN_MOAMR27 0x04DB +#define CAN_MOAMR28 0x04E3 +#define CAN_MOAMR29 0x04EB +#define CAN_MOAMR3 0x041B +#define CAN_MOAMR30 0x04F3 +#define CAN_MOAMR31 0x04FB +#define CAN_MOAMR4 0x0423 +#define CAN_MOAMR5 0x042B +#define CAN_MOAMR6 0x0433 +#define CAN_MOAMR7 0x043B +#define CAN_MOAMR8 0x0443 +#define CAN_MOAMR9 0x044B +#define CAN_MOAR0 0x0406 +#define CAN_MOAR1 0x040e +#define CAN_MOAR10 0x0456 +#define CAN_MOAR11 0x045E +#define CAN_MOAR12 0x0466 +#define CAN_MOAR13 0x046E +#define CAN_MOAR14 0x0476 +#define CAN_MOAR15 0x047E +#define CAN_MOAR16 0x0486 +#define CAN_MOAR17 0x048E +#define CAN_MOAR18 0x0496 +#define CAN_MOAR19 0x049E +#define CAN_MOAR2 0x0416 +#define CAN_MOAR20 0x04A6 +#define CAN_MOAR21 0x04AE +#define CAN_MOAR22 0x04B6 +#define CAN_MOAR23 0x04BE +#define CAN_MOAR24 0x04C6 +#define CAN_MOAR25 0x04CE +#define CAN_MOAR26 0x04D6 +#define CAN_MOAR27 0x04DE +#define CAN_MOAR28 0x04E6 +#define CAN_MOAR29 0x04EE +#define CAN_MOAR3 0x041E +#define CAN_MOAR30 0x04F6 +#define CAN_MOAR31 0x04FE +#define CAN_MOAR4 0x0426 +#define CAN_MOAR5 0x042E +#define CAN_MOAR6 0x0436 +#define CAN_MOAR7 0x043E +#define CAN_MOAR8 0x0446 +#define CAN_MOAR9 0x044E +#define CAN_MOCTR0 0x0407 +#define CAN_MOCTR1 0x040f +#define CAN_MOCTR10 0x0457 +#define CAN_MOCTR11 0x045F +#define CAN_MOCTR12 0x0467 +#define CAN_MOCTR13 0x046F +#define CAN_MOCTR14 0x0477 +#define CAN_MOCTR15 0x047F +#define CAN_MOCTR16 0x0487 +#define CAN_MOCTR17 0x048F +#define CAN_MOCTR18 0x0497 +#define CAN_MOCTR19 0x049F +#define CAN_MOCTR2 0x0417 +#define CAN_MOCTR20 0x04A7 +#define CAN_MOCTR21 0x04AF +#define CAN_MOCTR22 0x04B7 +#define CAN_MOCTR23 0x04BF +#define CAN_MOCTR24 0x04C7 +#define CAN_MOCTR25 0x04CF +#define CAN_MOCTR26 0x04D7 +#define CAN_MOCTR27 0x04DF +#define CAN_MOCTR28 0x04E7 +#define CAN_MOCTR29 0x04EF +#define CAN_MOCTR3 0x041F +#define CAN_MOCTR30 0x04F7 +#define CAN_MOCTR31 0x04FF +#define CAN_MOCTR4 0x0427 +#define CAN_MOCTR5 0x042F +#define CAN_MOCTR6 0x0437 +#define CAN_MOCTR7 0x043F +#define CAN_MOCTR8 0x0447 +#define CAN_MOCTR9 0x044F +#define CAN_MODATAH0 0x0405 +#define CAN_MODATAH1 0x040d +#define CAN_MODATAH10 0x0455 +#define CAN_MODATAH11 0x045D +#define CAN_MODATAH12 0x0465 +#define CAN_MODATAH13 0x046D +#define CAN_MODATAH14 0x0475 +#define CAN_MODATAH15 0x047D +#define CAN_MODATAH16 0x0485 +#define CAN_MODATAH17 0x048D +#define CAN_MODATAH18 0x0495 +#define CAN_MODATAH19 0x049D +#define CAN_MODATAH2 0x0415 +#define CAN_MODATAH20 0x04A5 +#define CAN_MODATAH21 0x04AD +#define CAN_MODATAH22 0x04B5 +#define CAN_MODATAH23 0x04BD +#define CAN_MODATAH24 0x04C5 +#define CAN_MODATAH25 0x04CD +#define CAN_MODATAH26 0x04D5 +#define CAN_MODATAH27 0x04DD +#define CAN_MODATAH28 0x04E5 +#define CAN_MODATAH29 0x04ED +#define CAN_MODATAH3 0x041D +#define CAN_MODATAH30 0x04F5 +#define CAN_MODATAH31 0x04FD +#define CAN_MODATAH4 0x0425 +#define CAN_MODATAH5 0x042D +#define CAN_MODATAH6 0x0435 +#define CAN_MODATAH7 0x043D +#define CAN_MODATAH8 0x0445 +#define CAN_MODATAH9 0x044D +#define CAN_MODATAL0 0x0404 +#define CAN_MODATAL1 0x040c +#define CAN_MODATAL10 0x0454 +#define CAN_MODATAL11 0x045C +#define CAN_MODATAL12 0x0464 +#define CAN_MODATAL13 0x046C +#define CAN_MODATAL14 0x0474 +#define CAN_MODATAL15 0x047C +#define CAN_MODATAL16 0x0484 +#define CAN_MODATAL17 0x048C +#define CAN_MODATAL18 0x0494 +#define CAN_MODATAL19 0x049C +#define CAN_MODATAL2 0x0414 +#define CAN_MODATAL20 0x04A4 +#define CAN_MODATAL21 0x04AC +#define CAN_MODATAL22 0x04B4 +#define CAN_MODATAL23 0x04BC +#define CAN_MODATAL24 0x04C4 +#define CAN_MODATAL25 0x04CC +#define CAN_MODATAL26 0x04D4 +#define CAN_MODATAL27 0x04DC +#define CAN_MODATAL28 0x04E4 +#define CAN_MODATAL29 0x04EC +#define CAN_MODATAL3 0x041C +#define CAN_MODATAL30 0x04F4 +#define CAN_MODATAL31 0x04FC +#define CAN_MODATAL4 0x0424 +#define CAN_MODATAL5 0x042C +#define CAN_MODATAL6 0x0434 +#define CAN_MODATAL7 0x043C +#define CAN_MODATAL8 0x0444 +#define CAN_MODATAL9 0x044C +#define CAN_MOFCR0 0x0400 +#define CAN_MOFCR1 0x0408 +#define CAN_MOFCR10 0x0450 +#define CAN_MOFCR11 0x0458 +#define CAN_MOFCR12 0x0460 +#define CAN_MOFCR13 0x0468 +#define CAN_MOFCR14 0x0470 +#define CAN_MOFCR15 0x0478 +#define CAN_MOFCR16 0x0480 +#define CAN_MOFCR17 0x0488 +#define CAN_MOFCR18 0x0490 +#define CAN_MOFCR19 0x0498 +#define CAN_MOFCR2 0x0410 +#define CAN_MOFCR20 0x04A0 +#define CAN_MOFCR21 0x04A8 +#define CAN_MOFCR22 0x04B0 +#define CAN_MOFCR23 0x04B8 +#define CAN_MOFCR24 0x04C0 +#define CAN_MOFCR25 0x04C8 +#define CAN_MOFCR26 0x04D0 +#define CAN_MOFCR27 0x04D8 +#define CAN_MOFCR28 0x04E0 +#define CAN_MOFCR29 0x04E8 +#define CAN_MOFCR3 0x0418 +#define CAN_MOFCR30 0x04F0 +#define CAN_MOFCR31 0x04F8 +#define CAN_MOFCR4 0x0420 +#define CAN_MOFCR5 0x0428 +#define CAN_MOFCR6 0x0430 +#define CAN_MOFCR7 0x0438 +#define CAN_MOFCR8 0x0440 +#define CAN_MOFCR9 0x0448 +#define CAN_MOFGPR0 0x0401 +#define CAN_MOFGPR1 0x0409 +#define CAN_MOFGPR10 0x0451 +#define CAN_MOFGPR11 0x0459 +#define CAN_MOFGPR12 0x0461 +#define CAN_MOFGPR13 0x0469 +#define CAN_MOFGPR14 0x0471 +#define CAN_MOFGPR15 0x0479 +#define CAN_MOFGPR16 0x0481 +#define CAN_MOFGPR17 0x0489 +#define CAN_MOFGPR18 0x0491 +#define CAN_MOFGPR19 0x0499 +#define CAN_MOFGPR2 0x0411 +#define CAN_MOFGPR20 0x04A1 +#define CAN_MOFGPR21 0x04A9 +#define CAN_MOFGPR22 0x04B1 +#define CAN_MOFGPR23 0x04B9 +#define CAN_MOFGPR24 0x04C1 +#define CAN_MOFGPR25 0x04C9 +#define CAN_MOFGPR26 0x04D1 +#define CAN_MOFGPR27 0x04D9 +#define CAN_MOFGPR28 0x04E1 +#define CAN_MOFGPR29 0x04E9 +#define CAN_MOFGPR3 0x0419 +#define CAN_MOFGPR30 0x04F1 +#define CAN_MOFGPR31 0x04F9 +#define CAN_MOFGPR4 0x0421 +#define CAN_MOFGPR5 0x0429 +#define CAN_MOFGPR6 0x0431 +#define CAN_MOFGPR7 0x0439 +#define CAN_MOFGPR8 0x0441 +#define CAN_MOFGPR9 0x0449 +#define CAN_MOIPR0 0x0402 +#define CAN_MOIPR1 0x040a +#define CAN_MOIPR10 0x0452 +#define CAN_MOIPR11 0x045A +#define CAN_MOIPR12 0x0462 +#define CAN_MOIPR13 0x046A +#define CAN_MOIPR14 0x0472 +#define CAN_MOIPR15 0x047A +#define CAN_MOIPR16 0x0482 +#define CAN_MOIPR17 0x048A +#define CAN_MOIPR18 0x0492 +#define CAN_MOIPR19 0x049A +#define CAN_MOIPR2 0x0412 +#define CAN_MOIPR20 0x04A2 +#define CAN_MOIPR21 0x04AA +#define CAN_MOIPR22 0x04B2 +#define CAN_MOIPR23 0x04BA +#define CAN_MOIPR24 0x04C2 +#define CAN_MOIPR25 0x04CA +#define CAN_MOIPR26 0x04D2 +#define CAN_MOIPR27 0x04DA +#define CAN_MOIPR28 0x04E2 +#define CAN_MOIPR29 0x04EA +#define CAN_MOIPR3 0x041a +#define CAN_MOIPR30 0x04F2 +#define CAN_MOIPR31 0x04FA +#define CAN_MOIPR4 0x0422 +#define CAN_MOIPR5 0x042a +#define CAN_MOIPR6 0x0432 +#define CAN_MOIPR7 0x043A +#define CAN_MOIPR8 0x0442 +#define CAN_MOIPR9 0x044A +#define CAN_MSID0 0x0050 +#define CAN_MSID1 0x0051 +#define CAN_MSIMASK 0x0070 +#define CAN_MSPND0 0x0048 +#define CAN_MSPND1 0x0049 +#define CAN_NBTR0 0x0084 +#define CAN_NBTR1 0x00C4 +#define CAN_NCR0 0x0080 +#define CAN_NCR1 0x00C0 +#define CAN_NECNT0 0x0085 +#define CAN_NECNT1 0x00C5 +#define CAN_NFCR0 0x0086 +#define CAN_NFCR1 0x00C6 +#define CAN_NIPR0 0x0082 +#define CAN_NIPR1 0x00C2 +#define CAN_NPCR0 0x0083 +#define CAN_NPCR1 0x00C3 +#define CAN_NSR0 0x0081 +#define CAN_NSR1 0x00C1 +#define CAN_PANCTR 0x0071 + + + //------------------------------------------------------------ + //-- CAN Message Object x ------------------------------------ + //------------------------------------------------------------ + //------------------------------------------------------------ + // Note: DAvE Ignores Lower Address Lines A[1:0] + // + // MO = Message Ojbect; n = 31-0 + // MO base = 400H + n * 20H + // + // Message Object 0 Address Map... + // __________ + // |MOCTRn | -> 0x0407 + // |----------| + // |MOARn | -> 0x0406 + // |----------| + // |MODATAHn | -> 0x0405 + // |----------| + // |MODATALn | -> 0x0404 + // |----------| + // |MOAMRn | -> 0x0403 + // |----------| + // |MOOIPRn | -> 0x0402 + // |----------| + // |MOFGPRn | -> 0x0401 + // |----------| + // |MOFCRn | -> 0x0400 + // |__________| + // + //------------------------------------------------------------ + //------------------------------------------------------------ + //-- CAN Message Object x ------------------------------------ + //------------------------------------------------------------ + #define MO_BASE 0x0400 + + //------------------------------------------------------------ + //-- CAN Message Object 0-31 ------------------------------------ + //------------------------------------------------------------ + + // Message Object Nr Function Control Register + #define CAN_MOFCR(Nr) (MO_BASE + (Nr * 8)) + + // Message Object Nr FIFO/Gateway Pointer Register + #define CAN_MOFGPR(Nr) (MO_BASE + 01 + (Nr * 8)) + + // Message Object Nr Interrupt Pointer Register + #define CAN_MOIPR(Nr) (MO_BASE + 02 + (Nr * 8)) + + // Message Object Nr Acceptance Mask Register + #define CAN_MOAMR(Nr) (MO_BASE + 03 + (Nr * 8)) + + // Message Object Nr Data Register Low + #define CAN_MODATAL(Nr) (MO_BASE + 04 + (Nr * 8)) + + // Message Object Nr Data Register High + #define CAN_MODATAH(Nr) (MO_BASE + 05 + (Nr * 8)) + + // Message Object Nr Arbitration Register + #define CAN_MOAR(Nr) (MO_BASE + 06 + (Nr * 8)) + + // Message Object Nr Control Register + #define CAN_MOCTR(Nr) (MO_BASE + 07 + (Nr * 8)) + + //------------------------------------------------------------ + //-- CAN Node Registers 0-1 ---------------------------------- + //------------------------------------------------------------ + + // Node x Error Counter Register + #define CAN_NECNT(Nr) (CAN_NECNT0 + (Nr * 0x40)) + + //**************************************************************************** + // @Defines + //**************************************************************************** + + // Panel Busy Flag +#define CAN_PANCTR_BUSY 0x01 + +// Message Object Status Register +#define MOSTAT_RXPND 0x01 +#define MOSTAT_TXPND 0x02 +#define MOSTAT_NEWDAT 0x08 +#define MOSTAT_MSGLST 0x10 +#define MOSTAT_RST_MNR 0x19 + + // MultiCAN Access Mediator Registers + + // ADCON Read is enabled +#define ADCON_R 0x00 + + // ADCON Write is enabled +#define ADCON_W 0x01 + + // Data Transmission Busy +#define CAN_ADCON_BSY 0x02 + + // Auto increment the current address(+1) +#define ADR_INC 0x04 + + // Auto increment the current address(+8) +#define ADR_INC8 0x0C + + // Auto decrement the current address(-1) +#define ADR_DEC 0x08 + + // CAN Data 0 Valid +#define D0_VALID 0x10 + + // CAN Data 1 Valid +#define D1_VALID 0x20 + + // CAN Data 2 Valid +#define D2_VALID 0x40 + + // CAN Data 3 Valid +#define D3_VALID 0x80 + + // CAN Data 0-3 Valid +#define ALL_DATA_VALID 0xF0 + + + /// ------------------------------------------------------------------------- + /// @Definition of a union for the CAN data structure + /// ------------------------------------------------------------------------- + + // The following data type used for converting 32-bit data to Four 8-bit data types + // and vica-versa. This is used for accessing MultiCAN Kernel to Access Mediator + // Registers. The data type has the following fields: + // + // 31 24 23 16 15 8 7 0 + // |------------------------------------------------| + // | DB0 | DB1 | DB2 | DB3 | + // |------------------------------------------------| + // | | + // | <------------------ ulVal -------------------> | + // + +typedef union ulValue { + ulong ulVal; // 32-bit Data Type + ubyte ubDB[4]; // Four 8-bit Data Type +} un_32bit; + + + // The following data type used for converting 16-bit data to Two 8-bit data types + // and vica-versa. The data type has the following fields: + // + // 15 8 7 0 + // |----------------------| + // | DB0 | DB1 | + // |----------------------| + // | | + // | <----- uwVal ------> | + // + +typedef union uwValue { + uword uwVal; // 16-bit Data Type + ubyte ubDB[2]; // Two 8-bit Data Type +} un_16bit; + + /// ------------------------------------------------------------------------- + /// @Definition of a structure for the CAN data + /// ------------------------------------------------------------------------- + + // The following data type serves as a software message object. Each access to + // a hardware message object has to be made by forward a pointer to a software + // message object (MCAN_SWObj). The data type has the following fields: + // + // ubMOdlc: + // this byte has the same structure as the message configuration register of a + // MOFCRn message object. It contains the ' Data Lenght Code (DLC)' + // + // 7 6 5 4 3 2 1 0 + // |------------------------------------------------| + // | 0 | DLC | + // |------------------------------------------------| + // + // ubMOcfg: + // this byte contains the 'Extended Identifier (IDE)', the 'Message Direction (DIR)', + // the 'Node Select (NODE)' And the 'Remote Monitoring Mode (RMM)' + // + // + // 7 6 5 4 3 2 1 0 + // |------------------------------------------------| + // | | DIR | XTD | NODE | RMM | + // |------------------------------------------------| + // + // ulID: + // this field is four bytes long and contains either the 11-bit identifier + // or the 29-bit identifier + // + // ulMask: + // this field is four bytes long and contains either the 11-bit mask + // or the 29-bit mask + // + // ulDATAL: + // contains the lowest 4 bytes of message object + // + // ulDATAH: + // contains the upper 4 bytes of message object + // + // uwCounter: + // this field is two bytes long and contains the counter value + // + +typedef struct +{ + ubyte ubMOdlc; // message object function control register[31-24] + ubyte ubMOcfg; // message object configuration + un_32bit ulID; // standard (11-bit)/extended (29-bit) identifier + un_32bit ulMask; // standard (11-bit)/extended (29-bit) mask + un_32bit ulDATAL; // 32-bit data Lower bytes + un_32bit ulDATAH; // 32-bit data Higher bytes + un_16bit uwCounter; // frame counter(MOIPRn[31-16] +}stCAN_SWObj; + + +// USER CODE BEGIN (CAN_Header,5) + +// USER CODE END + + +//**************************************************************************** +// @Imported Global Variables +//**************************************************************************** + +// USER CODE BEGIN (CAN_Header,6) + +// USER CODE END + + +//**************************************************************************** +// @Global Variables +//**************************************************************************** + +// USER CODE BEGIN (CAN_Header,7) + +// USER CODE END + + +//**************************************************************************** +// @Prototypes Of Global Functions +//**************************************************************************** + +void CAN_vInit(void); +void CAN_vGetMsgObj(ubyte ubObjNr, stCAN_SWObj *pstObj); +ubyte CAN_ubRequestMsgObj(ubyte ubObjNr); +ubyte CAN_ubNewData(ubyte ubObjNr); +void CAN_vTransmit(ubyte ubObjNr); +void CAN_vLoadData(ubyte ubObjNr, ulong *ulpubData); +void CAN_vReleaseObj(ubyte ubObjNr); +void CAN_vWriteAMData(ulong ulValue); +void CAN_vSetListCommand(ulong ulVal); + + +// USER CODE BEGIN (CAN_Header,8) + +// USER CODE END + + +//**************************************************************************** +// @Macro CAN_vReadEN() +// +//---------------------------------------------------------------------------- +// @Description This macro enables Read mode (CAN Address/Data Control +// Register). +// +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2025/1/18 +// +//**************************************************************************** + +#define CAN_vReadEN() CAN_ADCON = 0x00; while(CAN_ADCON & CAN_ADCON_BSY) + +//**************************************************************************** +// @Macro CAN_vWriteEN(ubyte ubDCtrl) +// +//---------------------------------------------------------------------------- +// @Description This macro enables Write mode (CAN Address/Data Control +// Register). +// +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters ubDCtrl: +// Data Control Flags +// +//---------------------------------------------------------------------------- +// @Date 2025/1/18 +// +//**************************************************************************** + +#define CAN_vWriteEN(ubDCtrl) CAN_ADCON = ((ubDCtrl) | ADCON_W); while(CAN_ADCON & CAN_ADCON_BSY) + +//**************************************************************************** +// @Macro CAN_vWriteCANAddress(uword uwAdr) +// +//---------------------------------------------------------------------------- +// @Description This macro writes 16-bit CAN address to CAN Address +// Register Low and High respectively. +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters uwAdr: +// 16-bit Address +// +//---------------------------------------------------------------------------- +// @Date 2025/1/18 +// +//**************************************************************************** + +#define CAN_vWriteCANAddress(uwAdr) CAN_ADLH = uwAdr + +//**************************************************************************** +// @Macro CAN_vWriteCANData(ulong ulValue) +// +//---------------------------------------------------------------------------- +// @Description This macro writes 32-bit Data to CAN Data Register's +// 0-3respectively. +// Note: +// Write Process : +// ->Write the address of the MultiCAN kernel register to the +// CAN_ADL and CAN_ADH registers. +// use macro : CAN_vWriteCANAddress. +// ->Write the data to the +// CAN_DATA0/CAN_DATA1/CAN_DATA2/CAN_DATA3 registers. +// ->Write the register CAN_ADCON, including setting the valid +// bit of the data registers and setting register bit RWEN to +// 1. +// ->The valid data will be written to the MultiCAN kernel +// only once. Register bit BSY will become 1. +// ->When Register bit BSY becomes 0, the transmission is +// finished. +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters ulValue: +// 32-bit Data +// +//---------------------------------------------------------------------------- +// @Date 2025/1/18 +// +//**************************************************************************** + +#define CAN_vWriteCANData(ulValue) CAN_DATA01 = (ulValue & 0xFFFF); \ + CAN_DATA23 = (ulValue >> 16) & 0xFFFF; \ + CAN_vWriteEN(ALL_DATA_VALID) + +//**************************************************************************** +// @Macro CAN_pushAMRegs/_popAMRegs() +// +//---------------------------------------------------------------------------- +// @Description The macro CAN_pushAMRegs() PUSH the CAN Access Mediator +// Registers. +// The macro CAN_popAMRegs() POP the CAN Access Mediator +// Registers. +// Note: +// This macro is used in CAN ISR/Function's to protect Access +// Mediator Register +// MultiCAN Access Mediator Registers: +// ADL, ADH, DATA0, DATA1, DATA2, DATA3. +// +// The _push_/_pop_ routine inserts a PUSH/POP instruction +// into the program saving the contents of the Special +// Function Register(sfr) on the Stack. +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2025/1/18 +// +//**************************************************************************** + +#define CAN_pushAMRegs() while(CAN_ADCON & CAN_ADCON_BSY); \ + _push_(CAN_ADL); _push_(CAN_ADH); \ + _push_(CAN_DATA0); _push_(CAN_DATA1); \ + _push_(CAN_DATA2); _push_(CAN_DATA3) + +#define CAN_popAMRegs() _pop_(CAN_DATA3); _pop_(CAN_DATA2); \ + _pop_(CAN_DATA1); _pop_(CAN_DATA0); \ + _pop_(CAN_ADH); _pop_(CAN_ADL) + +//**************************************************************************** +// @Interrupt Vectors +//**************************************************************************** + +// Shared interrupt vector definitions are defined in SHARED_INT.H + + +// USER CODE BEGIN (CAN_Header,9) + +// USER CODE END + + +#endif // ifndef _CAN_H_ diff --git a/CAN鍗忚.xls b/CAN鍗忚.xls new file mode 100644 index 0000000000000000000000000000000000000000..53a81eb341cb69d0e844f14d8aa621146a2881d8 GIT binary patch literal 30208 zcmeHQ3vgW3dH(NewOZMh^{^}(W6Ntxv{p`0mer~6IqLg!O7F|+`*f*8n)k@wb$dG*ks_Ydc|%I? zBkH?Jeb2_XCr_$0FDprp)XQ<`r{w@cUH(K8-t^Y-vA0wH1aPzai^o4%ecE5?uz$Db z$r|}G-D%{jBab|pM}8bWbK#J;-oZ(kV~KJSV=$j6CxGJo0r; zxhI28UXe3SN3(s;V|OgvG0#z-+J9depU1|uSPKdB)D zz~Ep+Iv^{gCq^3RhP;u$O1S{BI~NUXv(9AO+HI}=@wT?cfBDPfiYBxC8ANWS7i`8@2Are>#iweK z$EC^Eve10h)$)XjhE_lXrP{W3hd$lbsyw$X6tHZ0GPDB*cgYu2G_=Okp;TgtbTou1 z2IY$?8e(KR2PU5~EwDkCX$UbOPpW7LNQ3ktZ;)6~BaXt9bLA;PZ`^e8#C1(;{qIeC zni`V}*epH8dt}z#x?ylISKhC@+HK!w^f?u;Y=rd zcnNy)j4Xw4DL&oOg}qyLz(s3it6U%xa)r`q#aZDr+mPl5Xt%iiM;11R+tCc=95t5Y zZ=WCNUXQU6Yzgh>G|rWuIZWV|{G{@KuKcrk#q z9F3^fe^D;QA+o9clR^*fvL}Uh&LwXMa6-R*M%jbjQ|rTi+F9eo<+8Fmso7gwJCqs9NNRBm2l|0L#5oQ4kl*a<`*I90OdP))7oq1>_<_DJ$Dq^H zPxUF@Tzj-Uw0|$?We9i3RZ1U$4V;>o{aQZ*xw3POZ>P^2_@^e28-B>e3G}5k%J0qT zdbv69FL*@8Hf zpC5#+(g{J1jT9~&Hep486fPZB`yxOJmkuju5g>(2hdo&lAcaeZ&2$kUg-eHZI|9Lp zSvz&z>Fq0AI&Aog04ZELYz>P5DO@^i3X1?KTsoQJKnj=6lHx$j(y`mlr2vVVLbjjr zw$saP#hMLPJ3%7tx59;sb6GJU*}=jf%ZmZA1Ix~T3qbPcAAN`2inoTWoKrj^schU~ z35GK-WWV+g+59b5y8(i+qZ{P;*W(};TAk7gfF$#GN)?Whh?mY%|6X`s`YsE&3&0f$ zm^u0FzC6~w`R1Ep7D-0s{rmT417MN`vS13mGA4t%+GaRpxkjyot~N@=98>yt@v4&# z{Ql5G59Js&I5?PN6lJzilqrkw6&MwlqP?H z+&If3@Nss^3$vXI@{SNBukU!FaCJMaIFQ0k@Y>=)3OB*)iUTR!1fO0UNZ}^M3k3IHSRrNWf{46C@Zi5)^SSbmoZ?v|9dKj|86bA8&c$1AyH8Za5LR z-5sBGq6F(KYt9K1u=2zkRF-g=92;Tf3rcfe+Rn{JTnuvK>-zO3w;4Sby3x=t$G1^P z3By@MPAlUp8&b1|7!PD;K z>5q6SCMJLMFF$kh)Vq0BIe5C9Ji1R(eoIeGzWmz1yLslic?KLjy-pr>TfW~aCnn$e z$#>m64dm%}L{V=yj*a}&kG|~YImON6inkR`o_M?+8##9LWjD_PH;*gcRyuj&@pf$F$?yNz&2y@o z#}#jVPM&zY9UJ-mcb;(bEF{lBQSp`mk4rO(x8A;wJ^qsBL9}y?RM@^Pa`U+2t=Y*F zkGI~wmk%Fu^EA47T=CZG~4CLg*n zb-{~QQgnBs5_jxayH&CK-g^(GSD4CW)!Bsb3I_(NFU81g@wxj{ta*1Qs_!1$OI9WMTm@88?iP-)KQuTF+2EI&$7ED;_?WQ zv1udLg@`&H^C0R9mr#f;5h9~-rIqVBAtEC$*K-(!R7fiZD&A|C985F5SQL8myi>ED zymm=Y)5|&f#Iz5s;xXrj{F)B8O$kcaDl|_}Xlu5A_4bh38~`PyZ7PjqohEN0jllTu zNB(f=p`BqubuSUNEERap2%Gm^oNMy}*u3xJxXqkp3T)<7ly7q-o(&?}&beysr8&K9 z*(orbS2$^)N+E7|Di$do?n#7E_5(hdr9Zat_6L|{} zN4yfRIh>LS;^+wGZNi!}K%Bep{O$R<@i-Sayb_Orcs#Nojd-LWibs7Gj{y&BE3}97 zHTDy$HUETzzh3cA82p^;2=XyFc%#XG^7SDpYo;pUcdNNfRKo9XUh?epYahGqMyvV4 z%*K>V1rDsja(e_{bW^$3ER5tLlyz`5D3GXc!i^-#KdembSWb)Z*j3qhOG3Q(fC{T5 zHjgUD^fYFx#POS!i}&Xi3u zHvY);ed+mfUyN7xka~T>r||Z{r()Nb_71rCUHClWA@s#d&cmYNAkA}LTAstnu2((z zy)=}65BeOYq4VX^gddLmdc11O8#gI;q4EctfBB-Vx8C}Jd+*$CU&bJhsYl0L7yY!? zOkBP5gEvoKWT(YYiD`d#^EDIpB_DQd^Y3o@#$EPBKiw~fm5aaG+XaP0-DTKp(0Bf8}R9#*p+q0{!4AoZoX}fW;M^;&v`PfdS?NME9FD8QCC9|^K^4SU5VbX+k=Ryn_ z-Y?hXAeCz**>Tbn1A{Gj1tuSNL=-6qyzBT^c4{24KCZ*LXcga1s-2STx zX4+IanwX(Ww|j3-PdB$dQ{nc1_5-84v){bJhRn}zC)$H<h;Y4%(J&Xirh>XRVGt9iYSZiE z0nV)K#`9Zm=u!4_>YblnY1zJi?5(L6wjA2d2%Ehn$k{W~SMMLaymHsZiG)?>H`Qg) z&8Ox0Zox2Ly*Lr*VU}Gu?n4 z3H+@AzYwFNI*iu(aO}$ZS3J2NvioB)w$yh(c84Y7eVKmOtj2iPY-WOMh4jV-dpDl+ zys<&#)0nBRV&{lFB(N^MS{>KoTQKXMmf!!)FTOo``R2hLO5U#IyiXIkRY|6x6Ku;c z0`{cCy9HOC!*Y4yVtV;wrG11(d&IP`_osz(rVbsoOgJf5@g) z76ZOow8-Pfyj}u6|nWVQrwo&SGJ5x zL~R*8Xv=CHvO0%sjzh*8Y2&em+A_98wv5XaZ5dk>TgJtNwv1~7Z5fyP*)p!&vt?X} zXUn**E-rfueF3*~r3K&5sP|GmoJF6MP=`Txp0MQfnI{|3p)tj5RrfaHoS$<4dP?4j znI5gp7(GwbDyC(taSmo-n6?IIn4I!IBd8_RVEm4vW!0(KzHG$2p4Kmee!vyzGqy)z zhqj;XXrQqX<9m(CSRduf28w}qD;u$HUSr|`W|$(-XFV8IZ?n*%l+vfCXmiS;&pNUm zyT<4A)q3o~SpsMD0d~i7>0y0 z^hSdTU#AS`v_+>#%GoNNJ}bu=>!?0UL9^38qjZ>WRSK~y4Qv_G*p;w3!mfnP5q2eP zjoc+02Sj$)``EJ#>{$jjrY~c5vk!>uW^51hJw}CHWnjHAU1MO^7}zxiHfw3*Z?;s!d~!_iAHp5veBk2tL1c)%$$UxREcl?Ofi7#9);-17O)FjgRf#}z1JJ3< z8l!a=__{SpcY#BfH9+g0>g(1k-BTU9jA*U9(AS->bQfB>>`fS<8!#HzE&d|tpM~e2 z!5M9C#@RDyMHj()ItO~Bz&G|c;8`LD#K=n{Ql2RCZ+rV$J|JKHA~Pnx$*YXt^z;{kDv`uw}~}GUmtDSK20gMMUkez9@f2FKw-{|C zpX*0s#TKKDYyrbC>a0#jAM0@_8Tc$eVrVrOS`CI)gQ3-6Xf+t)IZ?7~M*na78D;c^ChHitQ+hE|#e^leR${=FsHW=8N>(MJ2_)vl+ zU9a-cV=(j>41AyvG4vP=Jq82&20ex)L$ATmYcTN1M>N{xbBc(8s}rI;^coE8Y4k{z z41GSse3gejgMp7!A_hMGh#2||hCYLV{gxijlA+&V=rl7m*cr@{?8eSI{9LXqtYSl+-T)A=H{n4-4SlR7&qd+@*PUx z;c+jIJ`STFsD4G>hpD0rJ|0Y4f)9V2@Zm4tmEmtQKKxy#97Zyw?O|55Ciic8OLBKVdf_DS-egDn)<&$O3 z18_dz4(yyCcmTU=K0x2oS1T;2RB+(9Vb8Q<}pK*N{ zuXBwRS3z-|5?2y&tq<3^tj5mkZ(-+eX>)tv0{mSE{$+;@RwZ4H-)r#~AWmk(ihs2> zhvOq$<%o(Ml@s}t*s0 z%EkNfS1_3ObK!+aWfLXW51fdYE?KXlMRCmnQ?nSO$PhRk%5>B1wAyiuRK$KoF0QDc}kn?c1F9_}7rgvSey zx8!7WZ#vlD>+SU}$H&J<-J#5GxIkHC$ z**lKx9WDFaz~yW??snsI{KJ#2hI!W2Fi*c4=6P7dJRxhCXJ!ra6s=*Ns~J8OzfTLl zBV70$;ll3-7k)>$@H@hV-w`hSj&R}kTKrxYen+_QJHmzE5ib0WaN&1^3%?^=_#NTG z?~VAqDg2Ib;dg`!zaw1u9pS?72p4`wxbQo|?DzXJzq@hQ$Mj~s7Gj+iVtp23UGD{5 z3+UqBf24r%yjw3PY8mQCY`Q$#*4SoNW81F8=9B3?!lEanuiG#bRysDZ8IP8_>6&}G z=B`G$fN@_7j5}LkYQ(2oP`AVXV~tfKu3;W=p+exz7t85V5u{KxJEr$|&EbEvW(7B- z)$Gtp)a=kOcTkoK4eLI_B!ZM`^(w;U02iJ_>B5r;7oJ48@Fc>8CkQ*Ttk(rD2e|Mg zN*A6)xbP&xg(nd%JV79lWgY2U4shW~lrB7paN$XW3r`}0>`4`^Cd^3Y%)j-$!dGY-3#U-x9YC{+6ZMWC^F*EUU{P^m@v+=KIPp+??J$v!Z_37gWUrAML zFugZjZmG@bd~~+g`vcW(`ts_@wQ2f&u8mFajpnn7H2YXJyZ7MnqlaYZ2U+@Tx)skv z{6}2#;>)wE>%uu@f!eH=_dxx{VlQm(q{-7KFUP-LzW7@81j0p6em~o&JE9n!Eoa-k zFn}*-Paa+0%5Kj#pz^!D4UxKg`RI~(I+{IyrZ``ZI$7lRdg8lqzP@_$@X?d6P99x9 z|6$fg!sya^x}40GU|U*nr`8y!*e{uTOfy>0icen9Hu&Y{>U#e4!9(tmKvArlem*{r zDqn7{A3VE;&hF~(N~*f)Xo5ZO#T-KdYLR3pH@d6mFCJr1!0x`Hw`kLEwduFp3|egl z?KZt8>3ekBWph+?d1Qpi-588^MBrp*Qd^9~ZyNF?sj zY*dp5LZ|bK4JM6*!^_WKT%A6C@%+~k&CwE1tR(^=%x|7ro2$QzQ%iSY`uV1VXIN5F zhbhP*y?ORap0tW0*oQRM%=sKm=6gM<<8Y7`r;i>#o?pGZdR(>o{9-!2+-^Gr(I3ii zlO1&6#ntpTSnQrWc)We~=&P@;o~hX-2GJCa7whd8dp+qXTa>n6e{=o!Dqy9BFhHx2 zENNLja!?uJCcHqJMv*pNBkg!?I~q~J5axfkdHSns>VjHpHgOf*>xqxF9JCiuh^IAi zulIXt0jZZmxqPJ*U$(UC(b;sjTIbCs1N46dwAt#5BUY>tHr1o$ays838sF)qf^@|Q zAo#LC-w{BpWr2YsfY8bULr3613miBChg#s!5jfHUM~=W9EpSJoY2A&mJ?Tys#Fp#@ z1lojcaDnm0Ni`jB7Q6wr5KF0+>u$DUu>w=tKHtawW4e^|LbM5VDcOZgIfg>0lgBa# z1U)5y&w+Lf+{<11{NzGu7bgN1)XRb+n9?sxSAf|-u*eFvh1s&UAegnlSZzUI-Gv48 zF=xRCDr3>2P6c`x!TMQ1F>g~+Sm{)X_Bl1=HMM9-!L3N!P>*N@A}sWqF>R3mS{z9x zcuJ5-_K=3{?*)Yv|}2MqM%u>8x-6oQ}G%{UOTa`pEDctClQeGK~WWc1cjRpR4vV6@utJ zo@H6G?_277mH<|kfMrj!CBUVnfp2NxSpryD0_Ir)Tv{6XmWG}sfR!a+o+ZFyNmf@P zbYuofRw===tvr0A{bWq5(AM&>l5l0tjFvK|hD({t~xTrPU#W zhSed1hL3#R>bQfYV@^%dvJDMz+FMahOSQ5Q4z(#crW)BfQ;kW4Z6lrUT4QB$OSPG6 zN?-|*>j)V^+Dd>dLH&b~*7Qv#mPis?BpkYQ>ie-n*79xsIndwKTnr z+nhY}Qp!TIIY4x3LN#)6!?vQsx-2)FETs0cQHqDnO7UR5+dIJ_%kJbX+yIQ_ZZg}D ztyErjoXNZ`@*Fbn^-j)qIGjWGE~anyKKe7r_pB#wODswc9XZ1*uAiW&dTnwYet4$GzhyIk@MYn z)Hiw2fuh?!QITrq}zMfBLkp?7z`F|A*HoYsEmM8`~({9*Zz9XS?y_ukQTC{(m9^-(yjN zaldNvSN+4kIA&akBzypzBr`G$h?q%7(`4pcdN7}DwjmSxkPQfMGCiAd@}R+#t;kdn zNgQL6O_?eJZDzmVpvo4)U9qgJzjG|$rdZ5}vIV+RR#@ooY6}C&=CXx>XJO!309aZW zI2MMbg`sC*=ve?*S{OPO4oV9Lo`nO?0>IM3fn(vYv~cKIIP@$4EG-;57LG~_N1lZv z&jP^G!jWU)PHEweXW@=#0bpt2PO=~|vcT1cSEHgR6Ow8d>u^nxI9<$e6KJ;mt6@LH z<3}7u5suL-6LYb`qbi8F^=d;w6GT`2goY(U*WrN`Y2no20hMMQ9!P1{;Q^Fp9UeGo z*5Lt@W*r_VY1SRzPNy0k4;iH6tlYz|6lLDoxs%b z*L!ayF!lKL-gm;4ZLu2h@m;=s8=_P2(cUH=AkxVHJ~22FK?8`R-K=Bpbv)eUb@hpU#a z?x3me;0ATLMEU9to9Yg4P>1W0ukNU+?&t<}xcK<$?ljfixk24=OWko(-SG|T?zYt3 zZK}IlsFS^;On$9RM~hLWBJ74aj78fg4i$|ELrpWnu+BHsH6sj7+Ui;nhHFO4yBi`5 zSCfW!%?Lx2ws)-v!usLX`YepEF zSaqtWCL**M2;WZoyW(aq=^OJnJ0voZ}#JMKZ4vqJF)wYgmTFP*~=PRQMY#!r(X^+_T`%PuI z)9EXt3SZfvsSLL|ePvYPD;qYI9ki5Dg|F<^qs)n*=Afbs-mRAZp^>govnXfAvn(VyK4T@>6D;k<; zZtvkzKg_Z`-7VS0JkMRC+046$>wtfbq9^KxUayOi6B@kmWXFT;yc1$wdOJ3t2A zLIEGtS18{)EYP6WxUjwKJ}vdRCg?iawHd=p(qEeYk<^(1(X8 zYx?B0zoZZ611^1xJM`g|ZI?d0SvrH^rkK70_sr4O&dd-MTz=p)pjk6?$s1D`&DEBXj_=p(qM@6e_1(4$Z8 zla=)0Xvw9Iafd#9Kf$FBUkC8$1MJX8s6!vY4t<9{eF9hX5$w=Ma82KlOW%=4pWIO_ z>BDK7OCRG7efZpjOCLU%;L!)zp^s39K7t+kj(qwAuIMA!p^xC2zB?{`cRc#!-fKx8 z4iH`X70{iX z?{0&>yFPt@9r_4$=p)#n@2*duz!iN2JMdrU8 z>-h#e)27%2?yYtN*Yl0hdcHAS&o{t{J8RL)Gg!KwZwy!Aij!84zBJ=B({7pu1wMU@ zJM=ZuH0W{ZbJH{ujuTH4La;-hpQb^HOP`;nv2;zJo2KE!*_nNAng&syzDAk`d4Kl# zX&S`6+2^NeEbP$dr)iLO>GRVxmage@(=?pEJM_6}8a*rFT`UB5W?v&sgSH zE`5HQ#?lUbZkmRBDIR@Zng&sizDAlx&&as+HPST5yY#tf8VP&!`Dq%YUHbeqjinv> z+%ygMh&=kdG!3F2eT_5?(ms8SG!61DeQugY!XABong(f?K0i%kX@@>HO~d^%k3KI= zgQ!PeBTb`cpxoKlNYfzi(&wgWB<#`Wr)iLO>GRVxmUifK(=^-%^yu@_G>CfiHPSRl z`}8%^G|0R3xoH{+d-VBf8l+wN{4|ZF9s1lf4fjMn`n)s^q8@#XG>x8db7x;8O@q8k zpPQzUut%Stra{`J&rj1>+M&-))AF`YrDN zl_TZ-o)wL(6=>M)88mTLp=Fw;wtB_|Cr!g$ZD+m#t#^6=o%sedlcv%)!RxIG@JyRx z6Sz0u2(HsKM#G#abU1kiq!V{mn&9$SfTipC#&ES!#(jK`J}*s!s7GHTO@p)>uE2fz z{4@>X9({hA#=>=;0obL_Pt#c1p^v16J~btCnxVoqWf?{=a;FDS&Abv06VJezI2A!E z!7%nBZC2C?SCw5D*~D3emf=b{L}1Lg;1HG*3q@GUD^%;8RwxQ|R#Cz=VLGQ!eNZWd zvF8w`5(=vz2B|?k!c;a<$kv4ATtfLJsYH0w>?i-_Q$<_KCycnvv)A-P7CM_ywB=-? zkap*pN+pavhc=Z+s7|Xq!k`{)DvKy&Yua)Sq5P5*BGC59f7P^wJi=T}V;W(I&{>3{ zEhiC$v`d>xA&h$tZ7P9KomTmSK|R`3_E5;ywB_7E`6a1CpzYRw)3l}h!H7GvO=k~^ zwwyc|+H~%qd{(K0vFFgH5(lfm2~w3d7+E5-T-8XnrY+|T$}dS7Vvzo4O6}6JM5PSIov+7#f(TzQ&IBlf~c61Z$=qA|FjSR`t zO|YYzU`IE>j&5w{JlzC4x(Rl46YS{5&d1YDu%nw`M>oNaZfp-c-2^+j33hZ7?C8cd z)YDC{qnltyH^Gi>TxdMq1UtG3c61Z$=*DX7=_c6GO|YYzU`IEWEKfJVj&6b--2}64 z6Rjz9DwH)>C@Zee+GpIl^L%Ew_Lcb0Z^`|*yu2(E5F-dWnw?Z-Qg*j?RzytA~U+mCmgKfAj9cxP!xw;%5~ zoON~k@y^nYZa>~}a_Q>!LNH-lUMM(0ctN*_w|Ok48fZ#|o|Wl5DLv#iG%W zLa{t;6q%f?|S})1gdQ%J<4JiaGwAM?qwcZqeMnej}3a#~$Y^^uNp3#s( zuR?3RBwOos<8DsjVcz$cV7JYvNe&ar--6RVuq=NNPG9uqysu`(HEfP=Su;zs>RQ^- zO(EmxCfLzUu%nw`M>j1wj&6b--2^+j33hZ-NIJR+c61Z$=qA|FO=0QiCfLzUu%nw` zM>mD0qnltyH^Gi>f*suyo{nyU9o+;wx(Rl4Q;0gc33hZ7?C2)g(M@6M=qA|FO|YYz zU`IEFs-v4=M>oNaZh~32iPjW470Q|`loeNK?K5wQYo8geeP+1!nPEqFa@wp8yn%Lf z`|-}wj&48Rc?0d}_T!zU9o>Gs^9I_{?Z-PyJG%XN=MA)@+mCmac69sk&Kqb)w;%5; z?dbO7oj1^qZa>~x+R^RDJ8z&J-G02Yw4>XPciuody8U=(X-Bso@4SI_bo=qn(yZG= zYnt8_%9<;*j(7iB##`b#-WjfaX1I=bhHE}}r|jsaz;<-|@y<$WK2k`Uo)cR0kpi-k zt@WmGG_r)&dQ&h~vbEk6ibj^uT5k%(O19RU!qCVPTI)?gSjpCUQwSPaLTkM#04v#A zZwfynOK7b(1z#mw>rJ6&WC^YHrogLYS#NyN9ADZFpZ@*bka!-?daym_-^hqJK?R%x zqaUD>qv?pTVDyc_)2@^E!HwwIgCnI)8%&2LnTS%8ej-G`uwTdOyc zYxM?pEg0yv?IXWdG!Se>Bg0lSP+Wk*v2E{>96l+nNq!|rTfoBXkPNgYnZb(W{>~-2 zzw=0@4|kN)6S&hz&XD#H zmuH7$pf$-1RwNI6k_Rry^ud;jWISvq3x)N|BN@-s)g;q{c0!Wo6CVq&Nd{PxOwZ2M zB!>@+Ym#3H(w)Ihz#$oEO)`TO$wQyyp-VD-H>M&PZ)emb58auJ$D3-B>6xdRWPC5Z zCK+H&GClEBlN`RSu1S6+NRy0hkwY@jnq&qmk`H{64_uPzlR6d2c-pEa`M@O^4@%V} z)6-Km$@pY^O)|imWO^Q|COLdwUX%PvkR};>M2BRcHOUNCBp>=DAG##dCx+3cz9#vVAWbqh%nr#wYmynPNIvpOK5|K> z4>DCGTTLQOKjnq+!1t0oyACM|atuLNn5 zkxDrv1FcDBup;@`C;8YVnLg%Kk&MT|YLbs#lJS67O)@?8Rg-+|kqodVnV#dSNyZmj zOOjs+(j+6VbVvqTlgwa6@?D?gyDrJ}sk4e?JUmvDeAguz4}R4o)6-xz$#*@H0oEkb zQ(w|v<;)@R_}vh_l}!AqyfdUBCX3Elh#sCyuF)BD5Ti3tYp}qqX&m>)MlkSd1S73R zFsu(26H-m%$f;Uyal~Fu+*gAXGjv>EPh3K)i7Q|^ae;aX9^go>>JHF);sUHEF2KmI zZC_7Zh(?C3XuSkOw4S&CJ(BB`8MhxQ-rJBS8I#f>IZR)3R6(~m>Z1yvF3D~d4Pl35 zFN=nxN3xeiL)0VL%c3FbknCpBxam?c`bv-{+0CNqwoW~h-7FfSF3D~d4Pl35FN=nx zN3xeiL)0VL%c3FbknCpBxcgL*{7R4}+0CNq{#H%0n?*y^CE3lQA?%RsWzmrINcOU5 zhQIBLV zi-xE}vYSQYeq=@RD?yrMH;bk_o;AsC77bCCWH*b3utTz!MMKgf*~_9K>XGba(GYb= zcC%>Qn5{^DB}kL(X3=!(w}Jsrc1ZTJXh?b_ds#F@J(9gF8ln!#ZWfI@ z)D_9E1Zk4pESm0t*Ce}HG(=sJ-7Ffy4#{2?4M~q=FN=n#N3xeiL)0PJ&7yIuz9RXR zAWgEHMbpCoHOX!k4N;e5H;aa_L$a4eL((JJ%c3Fbk?dvB5Oqj)vuHfCP?7vfkS5v9 zqUouKnq)VNhNw%jn?*y|A=%5KA?cCqWzi7zNcOU5h&m*@S#;PFt1S8z5Su2+Yg(iy>ebw~-Fu@Wb) zVld=xzZ;^I=TuI4mNGdjSaYiKI3wzCnzA@!r(SV$4rc^wPICrl1Zz%H{$^ZsI1Qc4|&@hGqn7PIG={1Zz%Hc4l03I1P!I z;`9{|r99_l%CnG`8BTLnrZ`nenbGNRno=@jr{**#WJa*&G^b-mu;w%+W5z{?(~x&5 zPG130%5xf~JPTQv;WQ^<}{~UMzH2ICtF6a<}{^R#>L2K0?*dn z{_bS8#jm9Q!=K{mzWgicr(89@=vr0yC8t)^cD2q`i8(05!>YzuQD>|bb;ev#*S6Qc z!5%)Trh8{}VlS$@SJbub4Q{Z9Zw5B)A&G0+!#$2BpTisM;iG3wd)O8>?cun;Y46|$ zd-!Hp(;l`=O?x=`ZrVG%!5%)j)wGB0MAIG)ft&V@Zm@@MRWV-ti6g@O7l7JuJ~pdpIR)+Piy$J$zQEX%EX+(;g0tv^~9+72$5H zj5S+jjM*wcL%X)U8`d)1t!mr5VJ$cL%X)U8`d)1!)V*PVJ$YumeFEyFor+ujXp8QK|py6eT#Vylcb zTV*d2H*s5l~iUq~CYWAyGPIRkcHL+FAeidtpZdEKL zwyN2$Vj;1un*A!45#6d-MQl~GU&R`tTNO))t!nnGSU_wm)35ll-;C0_@##2xY&YhL z3@_Hp@F_=Rdof_S1}F8)wSJS3QRIw*#*c0TMIM*6M}GuY>i^ZJ${#dI`Yr4lz#@>` z*9LGuBK!ZR#sJ@H5LdMUzJpNr06Q4h0G?>e27YP`@GZI806&9P8^D&uHGp&fY~bG* z1AMAq8{p@!Y6DnJTmyKLDI55=#sD92*9Q36quKyAC9VNH#gh%(HU{{-w>H4f-P8uK zZny^U1WPusZw&C^XKjF=IjId`+u<6((;L}9-x%PNz}f&mZ&4e-3gH^SlMC6vz!>0T zvDyGXYfu}&#=MB&)iRNy>@~f3_(4W#kmo&c z<^6&79#!5l0oYq6kiYl_jQ@wmKWrFe*&p>0DK)Rs}{Ci`-UnVF)@eDMU3FH^bz<)3X z{AGeNl4w9(MRgdcWx_;3?^Cr*s30(CQm%Frlwo*523&dnAGPrb?D z6|PFTidLmu2dh$UV)c);auupdxr)@VL*C3Lcv5OPnO@Q^K7)9&CxXG=X0{k@KHJUs z3n&r8cg^>A;p65C>qqSS{OOkEXffT5SIg7c8Gbotb@KDQp7ibI`00~hJ^E_#{HxWM zem8bKI&3QK+O-^U0tG(XGT=U|~)5kBK|GK++@Q~mi zX7RJ>79WxsO*-T_7t_7oCnEp&?CP5EhtKXkc>Ll@w6Gh}08g!r_IkqNiy%CCaQ)!- zjOJqk$YD7N5cWJ|{2C5#GL)<=Bwp1d5dE|%MA zXMF5_!(NV`zIbwd^~^TIr|w(Lwx*f9f5+6#mNSs>4)@~a?8&2R8E~$fuSOFgRT{jU zKYj3!7!{6L1|6EOHc%lVFTO;7=1-qrD-rqLKZYiXEU&&LEiz+R3(buw*nCg?pgA#J zDo^s<5#nBa8K;e!1>JN$9c`vOZAJIX?&|T?gXdS6v}!hX)6Xxan=}-0Hg;Ek_u}e# z7!NfYH`6WsR>XLClA#qLms4H>h6UP8j+|ViuX;o z+^6W;oX?iq-OER~@@%`q+4E;sreDb%K}JYm=Afq!Me*ZF2}8pQ8#vg|!T5I#3LA%e zy&v=7e1n)BExN0(p8st3&C_q>PwO=76dfa{tqklIGIuMPgT3DOEJ6MKN(hdXLj6kU zs1_PjLU(GRVI_1-eA%wtB}h$HUL_V3RwDP3*MzShU8_a*VuMv=dOBN9C;fb6;|mP3 zz>jzcc#!XRv+b0Z$w@ceY~m{U^8T|&*H^quK74ld{JB~oiWa*W^>;iz+P(M|>(KV= zXX~qHkDfl1VJ>XMrC7pRjEoi(#meVsK-P?K<%s?i>jukG$jcKSqH(%Zal{gG!HCxu z)(fe7R{wy__-8;@N$cy0S=l3JE|M-_-HDclIW_p%}<)cr_ zsx%;bpJqqQW51*y=iubX9~npREN|rq4!(bW|Mgz{p%rP%F657@We{I2e69Dc%me!NE1aT=Bi5}i-S4a3_` zSELRE+H^VlkUG?FbqKqEze7~f=n$&h4$)R>hR0<-`ZJ+3bql|`*XR~f2GgxT+H}0! zVq)fwglR4K^nSOT-@_9&z5o6JTME}oshv-;Ims=<2*tYXBv%FhqzW67Mh#YpT%#NW z^BGqT_IEcqNL;iWq`HQKNV&8d%5_kvYeGQr*8=&``U(h>f+dh!=I!t@Li)oG30&Q) zB^Rqn4dU>hz-%{6(F(|pa1LrUF;qIjVCe{fl_LaNNBF>AjaZl%3?tf?cq}Xa7v>XJ zfuUv{&1&6FtHiw4RiX1xX{JqX!4axkWG94*R$bc(4ldnHcB#wNc8beg8lg3j+VOH3bP;y4Iz6R% zqaX@Cf*T@nn zyo5~QB{5fcNvALZN$=L9C4L@N23V$BKu#_;UywoBX9N)cj5_{OY7MLJ{buR$f|mf9 ztpV<=YRVUo@J+_^)%dfxVd#ad6dO5{F=vmcCgsPune3OS(qzS1Kr$5)uz7Hnki|Mn z(0+^T%FZp|HqXtC|0Qo7v{04RW?>;Q2utot+Ye*NCabxv5wfXi7LqY01G1TjcOD3d z>1W;=5gHQCtU@LQRfR;85?tOC$#2Um-CF|B8-5jUd(oOe(-Sc&qR&|t$2Oog=A zaEq*|FAe&og?`8K{dDmL zg`vm~OAEtbVOUx~1zQ-31zf$E*VEY?hof&%3V(Zym5IT{8hgpv>G^KK<3!`*R`t7P z)u3H9^s44!i$CFA*pjM#yK2y`8gdnaCiH8w9c^XWty?wyX3aoquy$H)tBdW?{tb0O zqucH#okP(XXZm6--f#OuIhVKH;?dpT@b1v5={IWz&6;7WX1&_*+F#p24POJ?8mv=2 zI(8uX&h^YY$Mu)M*>rinn=Z%aybr|+sleGpc7j%Pv*p=@YnBoPLu1~kSMZu)t9aY3 zdH-w`-xnXUhB-NgWs7BNxNsv#_kC#zoJz^SmzG$v(%b%ERdkU|0=8XTuFtV6T4N(e z+{caw6w)p_BsAJvuIHqIy6(eqr_2M8r3=-fL`cOYk%c!1ML}@wjz}D5B@_l3`=Th6 zM%ZG~ccmXB!29Q%l^2*<{Wh46o0`>#TBZV8uo_WU zwqP~L7OWClvl>w8Y*;TA;{~PKoBQD~qk_NSlZg!D>WO9GqT^j%0Z%X2HB9?~#hTWl zKpTosg1JXnxLOJZib*rads#uc-3ko!IjgrV#4NW67q?)8sOj)GSr0LT(t5+Y*u3*C zt5o_^R;dIi6G94kr;%0Gl}c${sno`OTyn>l$t&tW*n46B#}$C_r~KSX*jP&y zvmv-?!i!gG@-Jk?=KDa?<>+KS-JFjmtNZb^fbR$5=F!XPlLucuzS{iy!NaHD#=GBt zpc>OD#`$QuoX)%H8E&M~4Q(VX@xIge*AJdNxq6HninyD4^$d62=|aI~b4xLu+mmzQ zzEx;1_M;ZuzSUZ`i+nGg=*zdf!hQ5G8`)~QBTk*8JK}$$l+l?)=#B3a-y?T@3JV(B zphJlnZrhf3F6s7WC5KzNr5xSitmJUpwUncqoRu7Iy_RxxpOeNUGLPJIx}`1a#pZ-= zWD04xo&NmldUO5Y`o;5;N7rFeafi48Xy$vKL>!Cap5pH-t$9NZC#<*kQT`iJ=zfVMjHm;Oc?D#Ipm`|S$Vo0s(T4W zI#Qo{2^XG`;t;UnE*{%w8QP_gr`J!vfk@apr_<}Ohgpx#rn{A15*eZYQ_Cb{o9$9B zlj~78!XAtxYlpc+`y^!N5eUnKk-|)}QhiSf^TV#Eu|*o=Zr6t@VIh_s z87ML`!)R@W%g{cyz?+z|con>Z^(qELUs&zeNfj=H=Y~YC!KRTf)6~T13Kg}HP{BrG zpOPwUxJpg1v;N~iY^8&%-8RRwliRp94gOmi@%6I^0;lkF6C zQud=@o#rT*M=ykKhC5$Lx~o7#r=(d)SYrjA!xQW%_~17PpHqvm90X-qzTl4K7%1=w zF}?y91MbwSVRCBKNQD^4nv0!?Td%ac^-908j)285oP43DKiOsceDlSUcg#v5S5Wm4 z(`ak3PoWwf4!4GfHJe{!Hw0_zd*}I9sIFzY*L34O-r-L}F{GBma)5@^0;oQljJvAV z0Lh+YO1s-$>Ce`Mp`p*vaE((&bk8spqXRoiEXCNo^?7BA zDg`Ez=6tWQ!q=Tnh_*?-qd<-H6N)1+JXNWdLY4(ep_F4hQ3V^_dcli|gPSFV6^Z9=quFG|$Qd(Ck zwSfq_xAP|;Z?vXcpH=Ef)mWzRSa`b<&xf}w2ewjK9gk_tc5`*1x@>)ea$X+W%BlJW zHd!L<`AC9N z*IW@&X{u);0S*Zp*|M2twizaP5<$;%B_3*x3|2X1 zmI_-@QlV4GETFhGX=9eKD&T`8idjIp8I!|Y8Ln^afFy;vF04INhds+V5&<1(rWRR) zt;NGw6ME=mM_WZ&n2=irKyEu>N=Ug|ZSTpI2G33jB=?1I;1P>SOTsQOH)m(O+F}q% zuA5w9V~58~_((5#ufiS!O;)UAm30K*V#`-f=wM(w7nk>X6WkfX|M()7 zN_^=`CB9&#(vWPY5~SgC<5IH6rDTsw z$sU*3-aEbN3g*BM8+@0Fd=-l$HocsIvHczX#dEgQwGVm*W7i6d9V{?*Gh%qCjr6gz z1;#EH7(4z6*`;TF5xu+h{_R6r)p?I)Yx=hjQq7yaQ=B1EuKZ5#bV5Uaa>nDFiXHEz zZ-v_F>J*uiOdgTP9l?OS8)QzyId4>PI^kV&tX@v!q0{$*I9dyrWCJTOt-=>`zWq!h z*j}$`ufHavANEeCBRXat!z?|Pl0e+FG~lh?8MZMXfS!H9fz++u{Rv)enLK(<2gIgU zT|o?vL82#rlpYMxYd8owzkjlxbUXUzl4JB1Lz`}QLK8*i0M$lh$Iidgo8bYi4o^hz zpzKlc9*!Ql^qn5=Sz{LA*}2zxvA`n%Ij)h(l}cg8hdTB()?M;6OeL0t@#zw?3ZqT_ zy%&n(@ode~8sG*R;OVLXo~u!1NGsSL&0CgEr7-rGm>oSXM??J@qJOr+L&Yx$ zeH&8{NVu2J$oVZo_z+VL!C8XOz&}hi^jsTeI}I;{|O4tk?5YL``^8#1w_O4=~rJpzA`fW7}PrVM&46dqc_Y=I?csMt!V0}#~9fO0s>z&1WaPW zpj1LBw2Y(}$;bmqGJn)Ob)8UlJ)r0dwN8SmhXzf3qUPwv8oT8%M?n;o(iBx?o}sGD zQ%;q6egfm!{5xG{4I+|_?u-g zsJLTgE^!ueq*$Sq;xVxhU*0UlS2qjs#VtU1CVVo+W9VVBkzWB~Cos_k!uvLxZtP)k zs)*cFj(IRtQtpcKR?0yyzD~e;*?fU<_X393^jR)kzFBv~!sR<+NF73Va$CltV4FTA*v#fPW}I{zNnkd+rNVbRUj(H!rOV!@!7 zL&Ftx^!V|QN-@;qvV5_|Liv3oJfqixpS}2oR?MJTl2=v?M@g~Vx`o~!7D7txCt5UV zMZgBF@pdUIq}!!%I#zAE>E#wX0gN@jpUsmG|Qt_VXG455CQn-gy zNYUG*G#ue_hUc3Xc;69jvm?u|AE6$BjQaRG3G3vWSD5cu$3bZi_a`AD_s}Tgl!wXN zb@U2Zs~v6uHS6%(fKrD+4EDg>v|EmFqY3*(w;9? zVIdXQzS9eTGO2Qpk3L9%-oD+#1{i;-n!p2U_%EJb(uRH{XWE_4SNEkcU)DmGFK~BN z(7j&#`{U#azafoJjj_%5da78;1nW_Ti=|8$jVQy#QYMT_l;I)=DtCn)z^^J01@DSG zTq-2+WTcYdQXzq_vnvTM6%zQ?xRMAZ8Y0|8?`Xg{$Y~RhR}WgQnRf+4i>ww@iCsd+ zTb8sg5Xuvtnh0uIV3Q*)DCS9+N1TLb66p?>)>PRYv0Pd!6_zel5ktI^I;;)Y(vQzq zv+*>Yo_zXFZ!to~HAdzg!Q)Tg4WKNnZ*%GP_`QJ6Kf`uWxRSQ>&&U+#Dp3a!Syrl4 zrLI)RUGImMtHm07Y>djAz0a;5J-!v-^~G*6U6B1K2xR-k8oTjZz02|O@zHp``19k_ z)8H?nct!UV=pw)_39ws?kpA2%LE87dfqarBPr(Wqip8KO7B^pP-bC&HIth*-yWEJ{ zzmC2ML`v5f09G0m5@gbP9^_VdBzcD8=< zA^-O$arUgi6EiUij&!T&-y6N3{P|A;T2B&Np(Y3hdxCMsr&i)CSrNf|-{B>#h~QVr z3WR@-mS5zGGW>%(2H~HJVFXUFtqVFqkQYrY)X|7w%4Vt6dK?Z6F{d&dZ)#yoGsvS# z8WKu}WH8jR-U96=d`R|j)WEW&Eu7hf4&hzKqSJWcvP3Fkx{8>tBBsm4pv!oggU?4N zJe}fE$6|4U7dq(-VV@InIF*oog$ycW$Oz`RwA$Q1Nx--p;LXYHgqJLmAYih&*l<{2 zW->6nloql4bF8r;Y`A`Lg0UnZ3M}xTlo5yrzT`TYz*kJt5ilWGV=iTB76~cKS%@gz zExOTSLrS9rm90cP`q^VEyRPGB+e2w9C9Eb39LOvdG9O6U4E7Q5ot!We3xwc&NuKjh z08XU&>Jfp(;v&soZo+`L6!k7P_#grw^H4WPZ-*D}V>eBn?naq885Ol$uCIC%FlRs`^s?|VHA8b6X0 zjvS9>JRpdkg#UayI@^vvlNU0o3S8y+x{9fuT5Jb>j6Ewta3=Vo>vw`;Jq##5SGezB zeZjCcWVt~AP2+(GX6xZ3)`x?JQo2?W`%I)MX@=2bg0maD3rqmUvcH0H{>~u9AKhJv zaj3ze0}lETWINK_X^mseCP-e^^COqNyZI#E`sZ3JeYC>$-7E`=&J3iUOp zTW(7BAa8dRdg!7@E_x@UpG1H8R`UK&`PA-T=lbs#^>SvX1aQ%k4zmK)JF9tEX?~S@ zyysrE*Pc;*<(W3n-}Qfsg8pw)FsKw*19iRia8Migtpe7<%^dc3H`n7=TB{yt2dMr= z4hO%5L#qER3Vxf1uU?-*F+8)Ng08GmbF-{c;b*Hbv2rYwRZWHcT~i@gZYczR?JA`( zM;zxwUK_6P)nSD2%!uoRRJl%2Rf7wuYPM>0m|8VDOjY<9QLkT8)wDI#yyF@m3)A%S zbYOfhYLvP}Ew#}u*b3Dm&53X$QMvtt>;TemaK8KL*=RdeYv+$^iTk6^rhk61Rzjr( zWn6g$3#uZm8|+oTGHe@qbBi0Q>yK@rE@{sQvFPA)mpInIjh69r zc2Cn&3U213dwAS}KH`Yavnh(KV87HzJC9PNsq0@P@3z<#Chr`pe^5w@%DNj?WAZL( zB=@YY{!d%FusfAWz2{EQd>Q z4rvX;%hyyta2+cF+!U}9xFcWz*R%ev@XUmCcEPMe8dia!VHFk{F1#G<3NHsc+>Fp} z56C|a@Q){30Ap%_VoZm`mS%srgC7=v9~LP57?ytU4-V@l2fJc!9q5%dlW-tomqH%_ zj?dfXVb2wp6EjV0g_|ny?9_lu$ zrZ&_lZMyR-_o{=Au5=5e)rkS!AYF3k%Qv{*)K?SJQu$z7;(}4PL>4PHH{;Kotz^37 zNHwn1xVNv?Xw$sjjGN|ZA4yANnq9brDu)x%^7x&)?iMxeHs18Wv+#Ia&(}sZzBZ~+ z+Oo@LoD=uR^|hibKA2uQQ)vs>pGs1rd{U~kg>0F|E}Jm8Qj_t?%$Eo5%bN+T^qBdZ zW;{N?WO`;Rl!ZK~aUFO)uLID6wV^GohNjTtMJ{PGPMJ1lI@vUegP`|0#y11sPqd^=@+2VFF>VVfY`5hsgHCAAULJU?2#(7JF3jS zs4_dE%It+IvkR)s_TORqbSo8{yoOt5rBpmUEE}=OXXfZjm9r z!G(Wud;d);?;8|1^BL_M6u0gf9T*gM?HL^!^dO)I2E_-nS@zJN_(C?_5>Q^@bJ#40 ze+i9`NpNX}rz&|8r4o-;D)CsQ5|30WFW26BdB@OU6 zX@Eyc0|#$#RBPz4hK_PbYsoxz@CY#;SYX~F!b}*1*)Rw*Vi36XS{#9>34T?Wa?G@6 zt`Oz)1%yz-VAVe4rjd*tBUxP}7;q1tu5@7?5u&hBM zY`_tgQHihtM_5KB!f<+I^h$)`2+5!lVK_&^jE9C8VVG!xG~;RCsR3qA196t8CUKT0 zfTxje!m~&N;E;}~ve`JlS%+L{&HT=|o!=QBG~|a3JkIs3AVVfJ(mrm3{##{Q^|_1*r53 z5c`Fwm1lbLsu0WUk*a5RRGEEIWp+fB*$Y)>7gU+;BX(g=uL_~a)^jb4^EN-!!nQ8* zgvr7@TXK;N=OWw1%o&DN0Y|mGD&Sv(%BnErRUymDs({;5Mpjk@oZuQ%Rs|g68dO$= zA+HKqudE6~UKKJbs{&4Su_^$Ks{)twb$7^DVdgB=F=eU5jHMD2mP*W5DluKD#B5_`k-EI6vQK9rI;NHF+Ub!hAhM!S%_J(5RaFF5a@BWiGBep{Q^|_ z1*r53Q0W(-(l0=zUx3&zM87;Qm{*%vW{*@oyQ9kNiz>4ts?1)fGP|J4Y#)mN?1j~a z7m!fonUibTcrLQ-Tx8R^$d+@F4d)`;#aucFs|{|*@M?p94JxY*?#>t#s|}w8YcdMaj#MxcPf>*PpQORN+s?QLi3`Y6-Og&@g+T zfrEU|r{O~%#&$RUr={;?n7NE=0f&J>m>q*CM-2{7IsUney!yaZwa3pme06cVH_!6$ zHp(Mv59`%LLF})Uiczbim{ltkqgF}9s8vvmS_Sb~D_scWxSB*MK&4-RO1}V=egP`| z0#y11sPqdE`-SM1XN~h}63gt7s*kHltY=?TJv*Yx?1d_`3#!ca5#-RP_b#Ex)^lxK zO+qc(&b4eh7uj+yvf*50yNJX?6YEl9tErBSrV`ssB{rE#Y%!JCU@Eaa1lOU8b zjt_AGp&!7p2!3Mi-s^Z?{lg@Kn=W`*mv2BJghNBzewl}xND;ypFv5r8;0uXuyLr6L z^$}jtSkreiaPrH|QgOpYD3)5>>Pe5AN9ePT`wOpw%x4%n@;WKG&jKHa08SzCx?g&} zm>c02t47Nj8(-9z)0W;?>@Nd6CY^d?+F(JQ<+ zjyDq3S3@(BzZ#mc_|?$2d+W{p-G~Q9{vPu?8}hfzitsnj3He*T8}SymT@#7l;Xgb1 z4S`tT1{g+s<~V*}V7;ODT!Ewy3;;R*J|TSYh+fibu9#vM^hJX2Qbl~xb@BA!i^o@= zBw2YCEsBB|h{~(0A_-E0*7(^1lAw1{vps&heuLKz@d;zRG9>ood$y0Cemi;k?GsGl zpoLz#M<~$G(UKzi_P|5!59-&e`*?MXRf#_kT0i|3zxxYKA8Sq7CL17an_v+$Fj%Cg zB`(&q?PAW-2J3qy!EYN%?`f{?;Y~06Q&nNgQWgHGtHu{xHNL2;MB&&`hhGo=iH- z)Fe@!7bF@cB4IzEnV_&dt&~kYF{u%cL1+{k5YA!2cnAo*qlZT)i5{#@Vn?PVN$>SG zCl{wX{GxFv(WRg};h$4Q9hc-CE4(DkC4LPmRBaafa(gY6`$aiy8o23J)CNV{@IKWB zE3aDe-iMh0#1&6Lal!kDrKp$u!)7MBPK1P=MNo%3usixWM!Kvj==_AHs)6P;BtKAK zq}Kc;eHoVYg$5|TeJ*13MOy3*W}7^hbOqi#^eZ;HLgo>vB2DC}LZG5R&^Gsmrz!nD zA-!}?J$~`!$&2TIFI;jZ-q56%!ZC@tmVYi@<|J3+%Y^j21-*7m0`wE~^wZ4J3zmpq zbl_?V0g;rt4OAnNsU^Ok@B{vfYgYI)-Uv@?p5aP`mE_}Ke)Y}Ovj^9Yo_vK%_0^BE zI6lgBhBprvsloR{gY~ngUp;&9_1B@v@8u@EPR>`W^~q@bnOON@Xv7!t`O~N0oILpD z-;yPK4FWE*W1HzR{fa&Ny}5eAzhbYv!NO@3M{jVo)@o&9q|39A#;@|lk6-piIK&a9Nx6%oK!e-PAZ%^M-_JV%Gfe)6e-;35zn{qe5*Vc zXof#V?ltKV^k&MPgTWyqRJoh9H7c- z=1{ftgsS5Vu^NjxL6sQ(FX%FbX9cNT?Qs-C_U%I0rL`}tG+G{e{UAqg_Z9@0mxSmHg#I{NJf`W1vEz^{+%F2r9- z_+BjoM?PQ_Kb7!+e@;O=v&lcFzgbME(E!2kbDmBOu5sFbkmYV}&AOQg^2L!Nl z5CklJfCN#B-$CAz2FxMU@I=H)(v1iB#x8v)gU}b>;(|ud)mNAeQ7lCZfbc!LT*r)6 z9}uF?41t2EAk?2~#m6-V>N61Idbc zhE*tK4Ju~#FsLy&-o)Q@iUK5^q5wI^62#vtl5hEhz@YsCnXlr4sMBFV-4h{+3f3RK ztdeT{m^egCkk`dUfHkIw$W9~3H*NFKxfGS6}c+%`I;u#IgZ})i>1$$iE zFKXrYeLs-XyXt)8Pe&ic8XC`&F09nIG}_Tb`EEqc(jiH{Px)S`3>$~E`j()i;p|wk<1u z>_S-d#R;jW^uG9#B5j1eug&4qJN!I3$x7=lSKmGvJ$(4=>iKiy8r~z6gMQ^&_nYuR zOVe8%;PS5w(nd~nzU+P@r~Gk**v0OW791RZ#QFAR_Z!-a{k_pfDIGbfv{BkmE*k%0 z>Ze8nyEZu=ICdq~a3smQaq!tgEPnBfkS@x``)%d@R=kfyvW9p&;Qh$N{Re-0b@5Fc zw{+S2{ZLP@chXTduT%SK9kK#QTVx^2hu(2uyUWlvf5E({8s6qB055NmdVMY&C$pRY zpBzhyY*D;c!~)h~m_E7tV=|ip>I#q{nksnI^1cv%rJ2vei;3PLmyjTfBNm zqOpV9*!TR6_M&R2*4{Xr;iAc*Oxhg$F5z)nvV06ws)!`=Wi@OxiU6P;msm1!Y%)9M;L zjf<<+6z53R6qi=*SDG=|ue7jwa+&nJtjc^6&(wU9R40#aT2!OcVNI3ECC%fKD!Y!| zOIc9^{b@n{q0AXtPvc^m*UG9=@43R@rFArK)@)7xc2*c_()yDZSXXh0*gWqc10)j?{_8&)kP zPo2C^zj?tjvt_tJwnxx8sV1+uG>;_~$M3#S8UMV|`#%u*kQ&@adqU}7x!%3QKc|t- z%}_@N$@nK84!lJLx=}@#EHSvO?BT$T0A7DS%5~lJ6nousx(~$F-PNzKd;9eVS^|tx z>Q41v;{W(Ai&6pK@Cd{SomrB|{YOvm6VP9ZxfD_&&*!CM{N5>kPMB!;m|HNq#LrU1 z3VPg;RPik2Ya;z>LPUbga!#|4K7dc3&)hQ(J%FoMl{7X zH1;SwWr7d%(q8f$Pha5w#TInq!`Jlv+1vQJN&a_?!~b*KDxJ`w + +
+

礦ision Build Log

+

Project:

+C:\Documents and Settings\Administrator\桌面\cl2\CL2.0.uvproj +Project File Date: + +

Output:

+Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_SSC_VSENDDATA?SSC +Program Size: data=9.0 xdata=0 code=163 +"CL2.0" - 0 Error(s), 1 Warning(s). +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +Config.H(1006): warning C318: can't open file 'user_main.H' +Config.H(1007): warning C318: can't open file 'FlexrayDriver.h' +Config.H(1009): warning C318: can't open file 'CanDriver.H' +compiling SSC.C... +Config.H(1006): warning C318: can't open file 'user_main.H' +Config.H(1007): warning C318: can't open file 'FlexrayDriver.h' +Config.H(1009): warning C318: can't open file 'CanDriver.H' +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_SSC_VSENDDATA?SSC +Program Size: data=9.0 xdata=0 code=163 +"CL2.0" - 0 Error(s), 7 Warning(s). +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling SwDriver.C... +SwDriver.C(240): error C200: left side of '.' requires struct/union +SwDriver.C(777): error C202: 'P1_2': undefined identifier +SwDriver.C(778): error C202: 'P1_3': undefined identifier +SwDriver.C(779): error C202: 'P1_4': undefined identifier +SwDriver.C(780): error C202: 'P1_4': undefined identifier +SwDriver.C(781): error C202: 'P1_4': undefined identifier +SwDriver.C(782): error C202: 'P1_4': undefined identifier +SwDriver.C(783): error C202: 'P1_4': undefined identifier +SwDriver.C(784): error C202: 'P1_4': undefined identifier +SwDriver.C(785): error C202: 'P1_4': undefined identifier +SwDriver.C(786): error C202: 'P1_4': undefined identifier +SwDriver.C(787): error C202: 'P1_4': undefined identifier +SwDriver.C(788): error C202: 'P1_4': undefined identifier +SwDriver.C(789): error C202: 'P1_4': undefined identifier +SwDriver.C(790): error C202: 'P1_4': undefined identifier +SwDriver.C(791): error C202: 'P1_4': undefined identifier +SwDriver.C(792): error C202: 'P1_4': undefined identifier +SwDriver.C(793): error C202: 'P1_4': undefined identifier +SwDriver.C(794): error C202: 'P1_4': undefined identifier +SwDriver.C(795): error C202: 'P1_4': undefined identifier +SwDriver.C(796): error C202: 'P1_4': undefined identifier +SwDriver.C(797): error C202: 'P1_4': undefined identifier +Target not created +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling SwDriver.C... +SwDriver.C(240): error C200: left side of '.' requires struct/union +SwDriver.C(777): error C202: 'P1_2': undefined identifier +SwDriver.C(778): error C202: 'P1_3': undefined identifier +SwDriver.C(779): error C202: 'P1_3': undefined identifier +SwDriver.C(780): error C202: 'P1_3': undefined identifier +SwDriver.C(781): error C202: 'P1_3': undefined identifier +SwDriver.C(782): error C202: 'P1_3': undefined identifier +SwDriver.C(783): error C202: 'P1_3': undefined identifier +SwDriver.C(784): error C202: 'P1_3': undefined identifier +SwDriver.C(785): error C202: 'P1_3': undefined identifier +SwDriver.C(786): error C202: 'P1_3': undefined identifier +SwDriver.C(787): error C202: 'P1_3': undefined identifier +SwDriver.C(788): error C202: 'P1_3': undefined identifier +SwDriver.C(789): error C202: 'P1_3': undefined identifier +SwDriver.C(790): error C202: 'P1_3': undefined identifier +SwDriver.C(791): error C202: 'P1_3': undefined identifier +SwDriver.C(792): error C202: 'P1_3': undefined identifier +SwDriver.C(793): error C202: 'P1_3': undefined identifier +SwDriver.C(794): error C202: 'P1_3': undefined identifier +SwDriver.C(795): error C202: 'P1_3': undefined identifier +SwDriver.C(796): error C202: 'P1_3': undefined identifier +SwDriver.C(797): error C202: 'P1_3': undefined identifier +Target not created +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +SwDriver.C(863): warning C206: 'Mc33993DataSendRcv': missing function-prototype +SwDriver.C(863): error C267: 'Mc33993DataSendRcv': requires ANSI-style prototype +Target not created +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +SwDriver.C(806): warning C206: 'SSC_vGetData': missing function-prototype +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_SWSTASAMPLE?SWDRIVER +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_LEDLIGHT?SWDRIVER +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_TOGGLEONEBIT?SWDRIVER +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?INITSW?SWDRIVER +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_MC33993ANALOGCHSEL?SWDRIVER +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_MC33993STARCVONEBIT?SWDRIVER +*** WARNING L1: UNRESOLVED EXTERNAL SYMBOL + SYMBOL: SSC_VGETDATA + MODULE: SwDriver.obj (SWDRIVER) +*** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL + SYMBOL: SSC_VGETDATA + MODULE: SwDriver.obj (SWDRIVER) + ADDRESS: 195EH +Program Size: data=76.4 xdata=0 code=6607 +"CL2.0" - 0 Error(s), 9 Warning(s). +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +SwDriver.C(801): warning C206: 'SSC_vSendData': missing function-prototype +SwDriver.C(801): error C267: 'SSC_vSendData': requires ANSI-style prototype +Target not created +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_SWSTASAMPLE?SWDRIVER +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_LEDLIGHT?SWDRIVER +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_TOGGLEONEBIT?SWDRIVER +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?INITSW?SWDRIVER +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_MC33993ANALOGCHSEL?SWDRIVER +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_MC33993STARCVONEBIT?SWDRIVER +Program Size: data=76.4 xdata=0 code=6610 +"CL2.0" - 0 Error(s), 6 Warning(s). +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_SWSTASAMPLE?SWDRIVER +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_MC33993STARCVONEBIT?SWDRIVER +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_MC33993CMDSENDONEBIT?SWDRIVER +Program Size: data=63.3 xdata=0 code=4875 +"CL2.0" - 0 Error(s), 3 Warning(s). +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?INITMC33993SEC?SWDRIVER +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_MC33993STARCVONEBIT?SWDRIVER +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_MC33993CMDSENDONEBIT?SWDRIVER +Program Size: data=53.3 xdata=0 code=4634 +"CL2.0" - 0 Error(s), 3 Warning(s). +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?INITMC33993SEC?SWDRIVER +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_MC33993CMDSENDONEBIT?SWDRIVER +Program Size: data=52.2 xdata=0 code=4066 +"CL2.0" - 0 Error(s), 2 Warning(s). +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?INITMC33993SEC?SWDRIVER +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_MC33993CMDSENDONEBIT?SWDRIVER +Program Size: data=52.2 xdata=0 code=4066 +"CL2.0" - 0 Error(s), 2 Warning(s). +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?INITMC33993SEC?SWDRIVER +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_MC33993CMDSENDONEBIT?SWDRIVER +Program Size: data=59.2 xdata=0 code=4367 +"CL2.0" - 0 Error(s), 2 Warning(s). +"XC800_FLOAD.EXE" "C:\Documents and Settings\Administrator\桌面\cl2\CL2.HEX" f" +--- Error: failed to execute '"XC800_FLOAD.EXE" "C:\Documents and Settings\Administrator\桌面\cl2\CL2.HEX" f"' +Build target 'Target 1' +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?INITMC33993SEC?SWDRIVER +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_MC33993CMDSENDONEBIT?SWDRIVER +Program Size: data=59.2 xdata=0 code=4367 +"CL2.0" - 0 Error(s), 2 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_MC33993CMDSENDONEBIT?SWDRIVER +Program Size: data=59.2 xdata=0 code=4370 +"CL2.0" - 0 Error(s), 1 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_MC33993CMDSENDONEBIT?SWDRIVER +Program Size: data=59.2 xdata=0 code=4301 +"CL2.0" - 0 Error(s), 1 Warning(s). +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_MC33993CMDSENDONEBIT?SWDRIVER +Program Size: data=59.2 xdata=0 code=4301 +"CL2.0" - 0 Error(s), 1 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?INITMC33993SEC?SWDRIVER +Program Size: data=68.2 xdata=0 code=5591 +"CL2.0" - 0 Error(s), 1 Warning(s). +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +linking... +Program Size: data=67.2 xdata=0 code=5594 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?INITMC33993SEC?SWDRIVER +Program Size: data=68.2 xdata=0 code=5591 +"CL2.0" - 0 Error(s), 1 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?INITMC33993SEC?SWDRIVER +Program Size: data=68.2 xdata=0 code=5603 +"CL2.0" - 0 Error(s), 1 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?INITMC33993SEC?SWDRIVER +Program Size: data=68.2 xdata=0 code=5603 +"CL2.0" - 0 Error(s), 1 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?INITMC33993SEC?SWDRIVER +Program Size: data=68.2 xdata=0 code=5603 +"CL2.0" - 0 Error(s), 1 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?INITMC33993SEC?SWDRIVER +Program Size: data=68.2 xdata=0 code=5603 +"CL2.0" - 0 Error(s), 1 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?INITMC33993SEC?SWDRIVER +Program Size: data=68.2 xdata=0 code=5603 +"CL2.0" - 0 Error(s), 1 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?INITMC33993SEC?SWDRIVER +Program Size: data=76.2 xdata=0 code=5615 +"CL2.0" - 0 Error(s), 1 Warning(s). +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +user.H(53): error C129: missing ';' before 'UnInfCan_1' +compiling SSC.C... +user.H(53): error C129: missing ';' before 'UnInfCan_1' +compiling IO.C... +user.H(53): error C129: missing ';' before 'UnInfCan_1' +compiling SwDriver.C... +user.H(53): error C129: missing ';' before 'UnInfCan_1' +compiling User.c... +user.H(53): error C129: missing ';' before 'UnInfCan_1' +Target not created +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +SwDriver.C(205): error C231: 'UnSwOut_1': redefinition +compiling User.c... +User.c(11): error C231: 'UnSwOut_1': redefinition +Target not created +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +User.c(11): error C231: 'UnSwOut_1': redefinition +Target not created +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +User.c(11): error C231: 'UnSwOut_1': redefinition +Target not created +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?INITMC33993SEC?SWDRIVER +Program Size: data=72.2 xdata=0 code=5609 +"CL2.0" - 0 Error(s), 1 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?INITMC33993SEC?SWDRIVER +Program Size: data=72.2 xdata=0 code=5404 +"CL2.0" - 0 Error(s), 1 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?INITMC33993SEC?SWDRIVER +Program Size: data=72.2 xdata=0 code=5404 +"CL2.0" - 0 Error(s), 1 Warning(s). +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +SwDriver.C(368): error C204: 'ArrData': undefined member +SwDriver.C(375): error C204: 'ArrData': undefined member +SwDriver.C(376): error C204: 'ArrData': undefined member +SwDriver.C(377): error C204: 'ArrData': undefined member +SwDriver.C(378): error C204: 'ArrData': undefined member +SwDriver.C(379): error C204: 'ArrData': undefined member +SwDriver.C(380): error C204: 'ArrData': undefined member +SwDriver.C(381): error C204: 'ArrData': undefined member +SwDriver.C(382): error C204: 'ArrData': undefined member +SwDriver.C(383): error C204: 'ArrData': undefined member +SwDriver.C(384): error C204: 'ArrData': undefined member +SwDriver.C(385): error C204: 'ArrData': undefined member +SwDriver.C(386): error C204: 'ArrData': undefined member +SwDriver.C(387): error C204: 'ArrData': undefined member +SwDriver.C(388): error C204: 'ArrData': undefined member +SwDriver.C(389): error C204: 'ArrData': undefined member +SwDriver.C(390): error C204: 'ArrData': undefined member +SwDriver.C(391): error C204: 'ArrData': undefined member +SwDriver.C(392): error C204: 'ArrData': undefined member +SwDriver.C(393): error C204: 'ArrData': undefined member +SwDriver.C(394): error C204: 'ArrData': undefined member +SwDriver.C(395): error C204: 'ArrData': undefined member +compiling User.c... +User.c(11): error C242: 'union': too many initializers +Target not created +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +SwDriver.C(368): error C204: 'ArrData': undefined member +SwDriver.C(375): error C204: 'ArrData': undefined member +SwDriver.C(376): error C204: 'ArrData': undefined member +SwDriver.C(377): error C204: 'ArrData': undefined member +SwDriver.C(378): error C204: 'ArrData': undefined member +SwDriver.C(379): error C204: 'ArrData': undefined member +SwDriver.C(380): error C204: 'ArrData': undefined member +SwDriver.C(381): error C204: 'ArrData': undefined member +SwDriver.C(382): error C204: 'ArrData': undefined member +SwDriver.C(383): error C204: 'ArrData': undefined member +SwDriver.C(384): error C204: 'ArrData': undefined member +SwDriver.C(385): error C204: 'ArrData': undefined member +SwDriver.C(386): error C204: 'ArrData': undefined member +SwDriver.C(387): error C204: 'ArrData': undefined member +SwDriver.C(388): error C204: 'ArrData': undefined member +SwDriver.C(389): error C204: 'ArrData': undefined member +SwDriver.C(390): error C204: 'ArrData': undefined member +SwDriver.C(391): error C204: 'ArrData': undefined member +SwDriver.C(392): error C204: 'ArrData': undefined member +SwDriver.C(393): error C204: 'ArrData': undefined member +SwDriver.C(394): error C204: 'ArrData': undefined member +SwDriver.C(395): error C204: 'ArrData': undefined member +compiling User.c... +Target not created +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?INITMC33993SEC?SWDRIVER +Program Size: data=72.2 xdata=0 code=5404 +"CL2.0" - 0 Error(s), 1 Warning(s). +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +SwDriver.H(8): error C141: syntax error near '*', expected ')' +compiling SSC.C... +SwDriver.H(8): error C141: syntax error near '*', expected ')' +compiling IO.C... +SwDriver.H(8): error C141: syntax error near '*', expected ')' +compiling SwDriver.C... +SwDriver.H(8): error C141: syntax error near '*', expected ')' +compiling User.c... +SwDriver.H(8): error C141: syntax error near '*', expected ')' +Target not created +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +SwDriver.C(227): warning C280: 'i': unreferenced local variable +SwDriver.C(227): warning C280: 'j': unreferenced local variable +compiling User.c... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?INITMC33993SEC?SWDRIVER +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_MC33993CMDSENDONEBIT?SWDRIVER +Program Size: data=56.2 xdata=0 code=4073 +"CL2.0" - 0 Error(s), 4 Warning(s). +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +SwDriver.C(227): warning C280: 'i': unreferenced local variable +SwDriver.C(227): warning C280: 'j': unreferenced local variable +compiling User.c... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?INITMC33993SEC?SWDRIVER +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_MC33993CMDSENDONEBIT?SWDRIVER +Program Size: data=56.2 xdata=0 code=4073 +"CL2.0" - 0 Error(s), 4 Warning(s). +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +SwDriver.C(227): warning C280: 'i': unreferenced local variable +SwDriver.C(227): warning C280: 'j': unreferenced local variable +compiling User.c... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?INITMC33993SEC?SWDRIVER +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_MC33993CMDSENDONEBIT?SWDRIVER +Program Size: data=56.2 xdata=0 code=4073 +"CL2.0" - 0 Error(s), 4 Warning(s). +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?INITMC33993SEC?SWDRIVER +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_MC33993CMDSENDONEBIT?SWDRIVER +Program Size: data=56.2 xdata=0 code=4073 +"CL2.0" - 0 Error(s), 2 Warning(s). +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?INITMC33993SEC?SWDRIVER +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_MC33993CMDSENDONEBIT?SWDRIVER +Program Size: data=56.2 xdata=0 code=4073 +"CL2.0" - 0 Error(s), 2 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?INITMC33993SEC?SWDRIVER +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_MC33993CMDSENDONEBIT?SWDRIVER +Program Size: data=56.2 xdata=0 code=4076 +"CL2.0" - 0 Error(s), 2 Warning(s). +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +Config.H(67): error C238: 'fff': duplicate member +compiling SSC.C... +Config.H(67): error C238: 'fff': duplicate member +compiling IO.C... +Config.H(67): error C238: 'fff': duplicate member +compiling SwDriver.C... +Config.H(67): error C238: 'fff': duplicate member +compiling User.c... +Config.H(67): error C238: 'fff': duplicate member +Target not created +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?INITMC33993SEC?SWDRIVER +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?_MC33993CMDSENDONEBIT?SWDRIVER +Program Size: data=58.2 xdata=0 code=4093 +"CL2.0" - 0 Error(s), 2 Warning(s). +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +SwDriver.C(264): warning C206: 'LedLight': missing function-prototype +SwDriver.C(264): error C267: 'LedLight': requires ANSI-style prototype +SwDriver.C(266): error C202: 'j': undefined identifier +SwDriver.C(266): error C202: 'i': undefined identifier +SwDriver.C(287): error C204: 'RES43': undefined member +SwDriver.C(288): error C204: 'RES44': undefined member +SwDriver.C(292): error C202: 'j': undefined identifier +SwDriver.C(292): error C202: 'i': undefined identifier +SwDriver.C(353): error C231: 'LedLight': redefinition +SwDriver.C(390): error C231: 'LedLight': redefinition +compiling User.c... +User.c(11): error C242: 'union': too many initializers +Target not created +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +SwDriver.C(264): warning C206: 'LedLight': missing function-prototype +SwDriver.C(264): error C267: 'LedLight': requires ANSI-style prototype +SwDriver.C(266): error C202: 'j': undefined identifier +SwDriver.C(266): error C202: 'i': undefined identifier +SwDriver.C(287): error C204: 'RES43': undefined member +SwDriver.C(288): error C204: 'RES44': undefined member +SwDriver.C(292): error C202: 'j': undefined identifier +SwDriver.C(292): error C202: 'i': undefined identifier +SwDriver.C(353): error C231: 'LedLight': redefinition +SwDriver.C(390): error C231: 'LedLight': redefinition +compiling User.c... +Target not created +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +SwDriver.C(266): warning C206: 'LedLight': missing function-prototype +SwDriver.C(266): error C267: 'LedLight': requires ANSI-style prototype +SwDriver.C(355): error C231: 'LedLight': redefinition +SwDriver.C(392): error C231: 'LedLight': redefinition +compiling User.c... +Target not created +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS + SEGMENT: ?PR?INITMC33993SEC?SWDRIVER +Program Size: data=68.2 xdata=0 code=5692 +"CL2.0" - 0 Error(s), 1 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5695 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5695 +"CL2.0" - 0 Error(s), 0 Warning(s). +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5698 +"CL2.0" - 0 Error(s), 0 Warning(s). +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5698 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5572 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5632 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5560 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5623 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5617 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5614 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5611 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5605 +"CL2.0" - 0 Error(s), 0 Warning(s). +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5602 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5593 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5563 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5560 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5623 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5620 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5617 +"CL2.0" - 0 Error(s), 0 Warning(s). +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5623 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5620 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5617 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5614 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5611 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5608 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5605 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5602 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5599 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5596 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=5593 +"CL2.0" - 0 Error(s), 0 Warning(s). +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=7877 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0, 1 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=9978 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0, 1, 2 +Erasing Bank 1 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=9977 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0, 1, 2 +Erasing Bank 1 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=9977 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0, 1, 2 +Erasing Bank 1 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=9976 +"CL2.0" - 0 Error(s), 0 Warning(s). +Load "C:\\Documents and Settings\\Administrator\\桌面\\cl2\\CL2.0" +Searching for DAS Server 'UDAS'... +DAS Server 'UDAS' is installed. +DAS Server 'UDAS' is not started yet. Trying to start it now... +DAS Server 'UDAS' has been started successfully. +Erasing Bank 0 Sectors: 0, 1, 2 +Erasing Bank 1 Sectors: 0 +Erase Done. +Programming Done. +Verify Done. +Application running ... +Rebuild target 'Target 1' +assembling START_XC.a51... +compiling MAIN.C... +compiling SSC.C... +compiling IO.C... +compiling SwDriver.C... +compiling User.c... +linking... +Program Size: data=67.2 xdata=0 code=9976 +creating hex file from ".\output\CL2.0"... +".\output\CL2.0" - 0 Error(s), 0 Warning(s). diff --git a/CL2.0.rtf b/CL2.0.rtf new file mode 100644 index 0000000..f34f6a4 --- /dev/null +++ b/CL2.0.rtf @@ -0,0 +1,1141 @@ +{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fnil MS Sans Serif;}{\f1\fnil\fcharset2 Symbol;}{\f2\fswiss\fprq2 System;}{\f3\fnil Times New Roman;}{\f4\fswiss\fprq2 Arial;}} +{\colortbl\red0\green0\blue0;\red0\green0\blue128;\red255\green0\blue0;} +\deflang1031\pard\plain\f4\fs28\cf0 DAvE's Project Documentation +\par \plain\f4\fs22\cf0 +\par \plain\f4\fs22\cf0 Project: \tab\tab\b CL2.0.dav +\par +\par \plain\f4\fs22\cf0 Controller: \tab\tab\b XC886CLM-8FF +\par \plain\f4\fs22\cf0 Compiler: \tab\tab\b Keil +\par \plain\f4\fs22\cf0 Memory Model: \tab\b COMPACT +\par +\par \plain\f4\fs22\cf0 Date: \tab\tab\tab\b 2025/1/18 20:45:36 +\par +\par +\par \plain\f4\fs22\cf2\b Please read this document carefully and note +\par \plain\f4\fs22\cf2\b the red-colored hints. +\par +\par \plain\f4\fs22\cf2\b If you miss a file in the generated files list +\par \plain\f4\fs22\cf2\b maybe you have forgotten to select the +\par \plain\f4\fs22\cf2\b initialisation function of the related module. +\par +\par \plain\f4\fs22\cf0 Generated Files: +\plain\f4\fs20\cf0\b +\par \tab\tab\tab MAIN.H +\par \tab\tab\tab MAIN.C +\par \tab\tab\tab SHARED_INT.H +\par \tab\tab\tab SHARED_INT.C +\par \tab\tab\tab IO.H +\par \tab\tab\tab IO.C +\par \tab\tab\tab T2.H +\par \tab\tab\tab T2.C +\par \tab\tab\tab WDT.H +\par \tab\tab\tab WDT.C +\par \tab\tab\tab CAN.H +\par \tab\tab\tab CAN.C +\par \tab\tab\tab CL2.0.ASM +\par +\par +\par \plain\f4\fs20\cf0 +\par \plain\f4\fs28\cf0\ul Project Settings +\par +\par \plain\f4\fs24\cf0 Macros:\f4\fs20\cf0 +\par \plain\f4\fs24\cf0 Functions:\f4\fs20\cf0 +\par +\par \plain\f4\fs20\cf0 \tab Function: +\par \plain\f4\fs20\cf0\b \tab \tab void MAIN_vInit(void)\plain\f4\fs20\cf0 +\par \tab Description: +\par \plain\f4\fs20\cf0\i +\tab \tab This function initializes the microcontroller. It is + +\par \tab \tab assumed that the SFRs are in their reset state. + +\par \plain\f4\fs20\cf0 \tab Returnvalue: +\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0 +\par \plain\f4\fs20\cf0 \tab Parameters: +\par \plain\f4\fs20\cf0\b +\tab \tab None + +\par +\par \plain\f4\fs20\cf0 \tab Function: +\par \plain\f4\fs20\cf0\b \tab \tab void main(void)\plain\f4\fs20\cf0 +\par \tab Description: +\par \plain\f4\fs20\cf0\i +\tab \tab This is the main function. + +\par \plain\f4\fs20\cf0 \tab Returnvalue: +\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0 +\par \plain\f4\fs20\cf0 \tab Parameters: +\par \plain\f4\fs20\cf0\b +\tab \tab None + +\par +\par \plain\f4\fs24\cf0 Initialization: +\par \plain\f4\fs20\cf0\b +\par +\tab Configuration of the System Clock:\par +\tab - External Osc is selected (configuration is done in the startup file\par +\tab 'START_XC.A51')\par +\tab - PLL Mode, NDIV = 24\par +\tab - input frequency is 8 MHz\par +\par +\tab *********************************************************************************\par +\tab Note : All peripheral related IO configurations are done in the\par +\tab respective peripheral modules (alternate functions selection)\par +\tab *********************************************************************************\par +\par +\tab Initialization of module 'GPIO'\par +\par +\tab Initialization of module 'Timer 2'\par +\par +\tab Initialization of module 'Watch Dog Timer'\par +\par +\tab Initialization of module 'MultiCAN Controller '\par +\par +\tab Initialization of 'Shared interrupts'\par +\par +\tab \cf2Interrupt structure 2 mode 0 is selected.\cf0\par +\par +\tab \cf2Interrupt service routine choice 2 is selected.\cf0\par +\par + +\par \plain\f4\fs20\cf0 +\par \plain\f4\fs28\cf0\ul Shared Interrupt Routines +\par +\par \plain\f4\fs24\cf0 Macros:\f4\fs20\cf0 +\par \plain\f4\fs24\cf0 Functions:\f4\fs20\cf0 +\par +\par \plain\f4\fs20\cf0 \tab Function: +\par \plain\f4\fs20\cf0\b \tab \tab void SHINT_vInit(void)\plain\f4\fs20\cf0 +\par \tab Description: +\par \plain\f4\fs20\cf0\i +\tab \tab This function initializes the shared interrupts. + +\par \plain\f4\fs20\cf0 \tab Returnvalue: +\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0 +\par \plain\f4\fs20\cf0 \tab Parameters: +\par \plain\f4\fs20\cf0\b +\tab \tab None + +\par +\par \plain\f4\fs20\cf0 \tab Function: +\par \plain\f4\fs20\cf0\b \tab \tab void SHINT_viXINTR5Isr(void)\plain\f4\fs20\cf0 +\par \tab Description: +\par \plain\f4\fs20\cf0\i +\tab \tab This is the service routine for the shared interrupt node + +\par \tab \tab XINTR5. XINTR5 ISR Node is shared by Timer 2, UART + +\par \tab \tab Fractional Divider(BRG Interrupt),MultiCAN Node 0 and LIN. + +\par \tab \tab Depending on the selected module interrupt it is called. + +\par \tab \tab T2 - Depending on the selected operating mode it is called + +\par \tab \tab when TF2 is set by an overflow or underflow of the timer 2 + +\par \tab \tab register or when EXF2 is set by a negative transition on + +\par \tab \tab T2EX. + +\par \tab \tab UART - It is called after the BRG timer overflows and sets + +\par \tab \tab the NDOV bit. + +\par \tab \tab CAN - It is called for the Service Request Node 0 of the + +\par \tab \tab MultiCAN module. + +\par \tab \tab Please note that you have to add application specific code + +\par \tab \tab to this function. + +\par \plain\f4\fs20\cf0 \tab Returnvalue: +\par \tab \tab \plain\f4\fs20\cf0\b none\plain\f4\fs20\cf0 +\par \plain\f4\fs20\cf0 \tab Parameters: +\par \plain\f4\fs20\cf0\b +\tab \tab None + +\par +\par \plain\f4\fs24\cf0 Initialization: +\par \plain\f4\fs20\cf0\b +\par +\tab Configuration of the Shared Interrupts:\par +\tab - Timer 2 Interrupt is Selected\par +\par + +\par \plain\f4\fs20\cf0 +\par \plain\f4\fs28\cf0\ul GPIO +\par +\par \plain\f4\fs24\cf0 Macros:\f4\fs20\cf0 +\par +\par +\par \plain\f4\fs20\cf0 \tab Macro: +\par \plain\f4\fs20\cf0\b \tab \tab IO_ubReadPin(PinName)\plain\f4\fs20\cf0 +\par \tab Description: +\par \plain\f4\fs20\cf0\i +\tab \tab This macro returns the status of the chosen portpin. + +\par \tab \tab Note: + +\par \tab \tab 'PinName' identifies the pin of a bit-addressable port. The + +\par \tab \tab default names can be changed in the port configuration + +\par \tab \tab dialog. + +\par \plain\f4\fs20\cf0 \tab Returnvalue: +\par \tab \tab \plain\f4\fs20\cf0\b Status of the chosen portpin\plain\f4\fs20\cf0 +\par \plain\f4\fs20\cf0 \tab Parameters: +\par \plain\f4\fs20\cf0\b +\tab \tab PinName: + +\par \tab \tab Pin to be read + +\par +\par +\par \plain\f4\fs20\cf0 \tab Macro: +\par \plain\f4\fs20\cf0\b \tab \tab IO_vSetPin(PinName)\plain\f4\fs20\cf0 +\par \tab Description: +\par \plain\f4\fs20\cf0\i +\tab \tab The chosen portpin is set to '1'. + +\par \tab \tab Note: + +\par \tab \tab 'PinName' identifies the pin of a bit-addressable port. The + +\par \tab \tab default names can be changed in the port configuration + +\par \tab \tab dialog. + +\par \plain\f4\fs20\cf0 \tab Returnvalue: +\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0 +\par \plain\f4\fs20\cf0 \tab Parameters: +\par \plain\f4\fs20\cf0\b +\tab \tab PinName: + +\par \tab \tab Pin to be set to '1' + +\par +\par +\par \plain\f4\fs20\cf0 \tab Macro: +\par \plain\f4\fs20\cf0\b \tab \tab IO_vResetPin(PinName)\plain\f4\fs20\cf0 +\par \tab Description: +\par \plain\f4\fs20\cf0\i +\tab \tab The chosen portpin is set to '0'. + +\par \tab \tab Note: + +\par \tab \tab 'PinName' identifies the pin of a bit-addressable port. The + +\par \tab \tab default names can be changed in the port configuration + +\par \tab \tab dialog. + +\par \plain\f4\fs20\cf0 \tab Returnvalue: +\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0 +\par \plain\f4\fs20\cf0 \tab Parameters: +\par \plain\f4\fs20\cf0\b +\tab \tab PinName: + +\par \tab \tab Pin to be set to '0' + +\par +\par +\par \plain\f4\fs20\cf0 \tab Macro: +\par \plain\f4\fs20\cf0\b \tab \tab IO_vTogglePin(PinName)\plain\f4\fs20\cf0 +\par \tab Description: +\par \plain\f4\fs20\cf0\i +\tab \tab The chosen portpin will be toggled. + +\par \tab \tab Note: + +\par \tab \tab 'PinName' identifies the pin of a bit-addressable port. The + +\par \tab \tab default names can be changed in the port configuration + +\par \tab \tab dialog. + +\par \plain\f4\fs20\cf0 \tab Returnvalue: +\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0 +\par \plain\f4\fs20\cf0 \tab Parameters: +\par \plain\f4\fs20\cf0\b +\tab \tab PinName: + +\par \tab \tab Pin to be toggled + +\par \plain\f4\fs24\cf0 Functions:\f4\fs20\cf0 +\par +\par \plain\f4\fs20\cf0 \tab Function: +\par \plain\f4\fs20\cf0\b \tab \tab void IO_vInit(void)\plain\f4\fs20\cf0 +\par \tab Description: +\par \plain\f4\fs20\cf0\i +\tab \tab This is the initialization function of the IO function + +\par \tab \tab library. It is assumed that the SFRs used by this library + +\par \tab \tab are in their reset state. + +\par \plain\f4\fs20\cf0 \tab Returnvalue: +\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0 +\par \plain\f4\fs20\cf0 \tab Parameters: +\par \plain\f4\fs20\cf0\b +\tab \tab None + +\par +\par \plain\f4\fs24\cf0 Initialization: +\par \plain\f4\fs20\cf0\b +\par +\tab ***********************************************************************\par +\tab Note : All peripheral related IO configurations are done in the\par +\tab respective peripheral modules (alternate functions selection)\par +\tab \par +\tab If no pins are selected DAvE assumes that registers are in default\par +\tab settings\par +\tab ***********************************************************************\par +\par +\tab Configuration of Port P0:\par +\tab P0.0:\par +\tab - is used as general purpose output\par +\tab - push/pull output is selected\par +\tab - the pin status is low level\par +\tab - pull-down device is assigned\par +\tab P0.1:\par +\tab - is used as general purpose output\par +\tab - push/pull output is selected\par +\tab - the pin status is low level\par +\tab - pull-down device is assigned\par +\tab P0.2:\par +\tab - is used as general purpose output\par +\tab - push/pull output is selected\par +\tab - the pin status is low level\par +\tab - pull-down device is assigned\par +\tab P0.3:\par +\tab - is used as general purpose output\par +\tab - push/pull output is selected\par +\tab - the pin status is low level\par +\tab - pull-down device is assigned\par +\tab P0.7:\par +\tab - is used as general purpose output\par +\tab - push/pull output is selected\par +\tab - the pin status is low level\par +\tab - pull-down device is assigned\par +\par +\tab Configuration of Port P1:\par +\tab P1.0:\par +\tab - is used as alternate input for the MCAN Node 0 Receiver Input\par +\tab - pull-up device is assigned\par +\tab P1.1:\par +\tab - is used as alternate output for the MCAN Node 0 Transmitter Output\par +\tab - push/pull output is selected\par +\tab - pull-up device is assigned\par +\tab P1.2:\par +\tab - is used as general input\par +\tab - pull device is disabled (tristate)\par +\tab P1.3:\par +\tab - is used as general input\par +\tab - pull device is disabled (tristate)\par +\tab P1.4:\par +\tab - is used as general input\par +\tab - pull device is disabled (tristate)\par +\tab P1.5:\par +\tab - is used as general input\par +\tab - pull device is disabled (tristate)\par +\tab P1.7:\par +\tab - is used as general purpose output\par +\tab - push/pull output is selected\par +\tab - the pin status is low level\par +\tab - pull-down device is assigned\par +\par +\tab Configuration of Port P2:\par +\tab P2.4:\par +\tab - is used as general input\par +\tab - input driver is enabled\par +\tab - pull-up device is assigned\par +\tab P2.5:\par +\tab - is used as general input\par +\tab - input driver is enabled\par +\tab - pull-up device is assigned\par +\tab P2.6:\par +\tab - is used as general input\par +\tab - input driver is enabled\par +\tab - pull-up device is assigned\par +\tab P2.7:\par +\tab - is used as general input\par +\tab - input driver is enabled\par +\tab - pull-up device is assigned\par +\par +\tab Configuration of Port P3:\par +\tab P3.0:\par +\tab - is used as general input\par +\tab - pull-up device is assigned\par +\tab P3.1:\par +\tab - is used as general input\par +\tab - pull-up device is assigned\par +\tab P3.2:\par +\tab - is used as general purpose output\par +\tab - open drain output is selected\par +\tab - the pin status is low level\par +\tab - pull device is disabled (tristate)\par +\tab P3.3:\par +\tab - is used as general purpose output\par +\tab - open drain output is selected\par +\tab - the pin status is low level\par +\tab - pull device is disabled (tristate)\par +\tab P3.4:\par +\tab - is used as general purpose output\par +\tab - open drain output is selected\par +\tab - the pin status is low level\par +\tab - pull device is disabled (tristate)\par +\tab P3.5:\par +\tab - is used as general purpose output\par +\tab - open drain output is selected\par +\tab - the pin status is low level\par +\tab - pull device is disabled (tristate)\par +\tab P3.6:\par +\tab - is used as general input\par +\tab - pull device is disabled (tristate)\par +\tab P3.7:\par +\tab - is used as general input\par +\tab - pull-up device is assigned\par +\par +\tab Configuration of Port P4:\par +\tab P4.0:\par +\tab - is used as general purpose output\par +\tab - push/pull output is selected\par +\tab - the pin status is low level\par +\tab - pull-down device is assigned\par +\tab P4.1:\par +\tab - is used as general purpose output\par +\tab - push/pull output is selected\par +\tab - the pin status is low level\par +\tab - pull-down device is assigned\par +\tab P4.3:\par +\tab - is used as general input\par +\tab - pull device is disabled (tristate)\par +\par + +\par \plain\f4\fs20\cf0 +\par \plain\f4\fs28\cf0\ul Timer 2 +\par +\par \plain\f4\fs24\cf0 Macros:\f4\fs20\cf0 +\par \plain\f4\fs24\cf0 Functions:\f4\fs20\cf0 +\par +\par \plain\f4\fs20\cf0 \tab Function: +\par \plain\f4\fs20\cf0\b \tab \tab void T2_vInit(void)\plain\f4\fs20\cf0 +\par \tab Description: +\par \plain\f4\fs20\cf0\i +\tab \tab This is the initialization function of the Timer 2 function + +\par \tab \tab library. It is assumed that the SFRs used by this library + +\par \tab \tab are in their reset state. + +\par \tab \tab The following SFRs and SFR fields will be initialized: + +\par \tab \tab T2_RC2H/RC2L - reload/capture timer 2 register + +\par \tab \tab T2_T2H/T2L - timer 2 register + +\par \tab \tab ET2 - timer 2 interrupt enable + +\par \tab \tab T2_T2MOD - timer 2 mode register + +\par \tab \tab CP/RL2 - Capture/Reload select + +\par \tab \tab EXEN2 - External enable control + +\par \tab \tab TR2 - Timer2 run control + +\par \plain\f4\fs20\cf0 \tab Returnvalue: +\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0 +\par \plain\f4\fs20\cf0 \tab Parameters: +\par \plain\f4\fs20\cf0\b +\tab \tab None + +\par +\par \plain\f4\fs24\cf0 Initialization: +\par \plain\f4\fs20\cf0\b +\par +\tab 16-bit timer function with automatic reload when timer 2 overflows\par +\tab the timer 2 resolution is 1 ?s\par +\tab the timer 2 overflow is 1000.000 ?s\par +\tab timer 2 interrupt: enabled\par +\tab timer 2 will be started\par +\par +\tab timer 2 Interrupt enable bit is set in SHINT_vInit() function\par +\par + +\par \plain\f4\fs20\cf0 +\par \plain\f4\fs28\cf0\ul Watch Dog Timer +\par +\par \plain\f4\fs24\cf0 Macros:\f4\fs20\cf0 +\par +\par +\par \plain\f4\fs20\cf0 \tab Macro: +\par \plain\f4\fs20\cf0\b \tab \tab WDT_vRefresh()\plain\f4\fs20\cf0 +\par \tab Description: +\par \plain\f4\fs20\cf0\i +\tab \tab This macro refreshes the watchdog timer to the reload + +\par \tab \tab value. The interrupts are disabled during execution of the + +\par \tab \tab instructions that set bit WDTRS. + +\par \tab \tab Note: The user has to take care that this macro is called + +\par \tab \tab before expiry of the watchdog timer. + +\par \tab \tab pls refer to the Note on WDT_vInit function Description + +\par \plain\f4\fs20\cf0 \tab Returnvalue: +\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0 +\par \plain\f4\fs20\cf0 \tab Parameters: +\par \plain\f4\fs20\cf0\b +\tab \tab None + +\par \plain\f4\fs24\cf0 Functions:\f4\fs20\cf0 +\par +\par \plain\f4\fs20\cf0 \tab Function: +\par \plain\f4\fs20\cf0\b \tab \tab void WDT_vInit(void)\plain\f4\fs20\cf0 +\par \tab Description: +\par \plain\f4\fs20\cf0\i +\tab \tab This is the initialization function of the 'Watch Dog + +\par \tab \tab Timer' function library. It is assumed that the SFRs used + +\par \tab \tab by this library are in their reset state. + +\par \tab \tab The watchdog timer is used. + +\par \tab \tab The following SFR fields will be initialized: + +\par \tab \tab WDTREL - WDT reload value + +\par \tab \tab WDTIN - WDT input frequency selection + +\par \tab \tab Then the watchdog timer will be refreshed. + +\par \tab \tab Note: The user has to take care that RMAP bit in SYSCON0 is + +\par \tab \tab to be set while using the registers of Watch dog timer. + +\par \tab \tab Registers are WDTCON,WDTWINB,WDTREL,WDTH,WDTL + +\par \plain\f4\fs20\cf0 \tab Returnvalue: +\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0 +\par \plain\f4\fs20\cf0 \tab Parameters: +\par \plain\f4\fs20\cf0\b +\tab \tab None + +\par +\par \plain\f4\fs20\cf0 \tab Function: +\par \plain\f4\fs20\cf0\b \tab \tab void WDT_vDisable(void)\plain\f4\fs20\cf0 +\par \tab Description: +\par \plain\f4\fs20\cf0\i +\tab \tab This function disables the WDT. + +\par \tab \tab pls refer to the Note on WDT_vInit function Description + +\par \plain\f4\fs20\cf0 \tab Returnvalue: +\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0 +\par \plain\f4\fs20\cf0 \tab Parameters: +\par \plain\f4\fs20\cf0\b +\tab \tab None + +\par +\par \plain\f4\fs24\cf0 Initialization: +\par \plain\f4\fs20\cf0\b +\par +\tab the watchdog timer is used and it is enabled in INIT function,user has\par +\tab to take care of WDT refresh\par +\tab the RMAP bit of SYSCON0 is set\par +\tab the input frequency is fSYS/128\par +\tab the watchdog timer reload value is 0xDB\par +\tab the watchdog timeout period is 50 ms\par +\par + +\par \plain\f4\fs20\cf0 +\par \plain\f4\fs28\cf0\ul MultiCAN Controller +\par +\par \plain\f4\fs24\cf0 Macros:\f4\fs20\cf0 +\par +\par +\par \plain\f4\fs20\cf0 \tab Macro: +\par \plain\f4\fs20\cf0\b \tab \tab CAN_vReadEN()\plain\f4\fs20\cf0 +\par \tab Description: +\par \plain\f4\fs20\cf0\i +\tab \tab This macro enables Read mode (CAN Address/Data Control + +\par \tab \tab Register). + +\par \plain\f4\fs20\cf0 \tab Returnvalue: +\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0 +\par \plain\f4\fs20\cf0 \tab Parameters: +\par \plain\f4\fs20\cf0\b +\tab \tab None + +\par +\par +\par \plain\f4\fs20\cf0 \tab Macro: +\par \plain\f4\fs20\cf0\b \tab \tab CAN_vWriteEN(ubyte ubDCtrl)\plain\f4\fs20\cf0 +\par \tab Description: +\par \plain\f4\fs20\cf0\i +\tab \tab This macro enables Write mode (CAN Address/Data Control + +\par \tab \tab Register). + +\par \plain\f4\fs20\cf0 \tab Returnvalue: +\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0 +\par \plain\f4\fs20\cf0 \tab Parameters: +\par \plain\f4\fs20\cf0\b +\tab \tab ubDCtrl: + +\par \tab \tab Data Control Flags + +\par +\par +\par \plain\f4\fs20\cf0 \tab Macro: +\par \plain\f4\fs20\cf0\b \tab \tab CAN_vWriteCANAddress(uword uwAdr)\plain\f4\fs20\cf0 +\par \tab Description: +\par \plain\f4\fs20\cf0\i +\tab \tab This macro writes 16-bit CAN address to CAN Address + +\par \tab \tab Register Low and High respectively. + +\par \plain\f4\fs20\cf0 \tab Returnvalue: +\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0 +\par \plain\f4\fs20\cf0 \tab Parameters: +\par \plain\f4\fs20\cf0\b +\tab \tab uwAdr: + +\par \tab \tab 16-bit Address + +\par +\par +\par \plain\f4\fs20\cf0 \tab Macro: +\par \plain\f4\fs20\cf0\b \tab \tab CAN_vWriteCANData(ulong ulValue)\plain\f4\fs20\cf0 +\par \tab Description: +\par \plain\f4\fs20\cf0\i +\tab \tab This macro writes 32-bit Data to CAN Data Register's + +\par \tab \tab 0-3respectively. + +\par \tab \tab Note: + +\par \tab \tab Write Process : + +\par \tab \tab ->Write the address of the MultiCAN kernel register to the + +\par \tab \tab CAN_ADL and CAN_ADH registers. + +\par \tab \tab use macro : CAN_vWriteCANAddress. + +\par \tab \tab ->Write the data to the + +\par \tab \tab CAN_DATA0/CAN_DATA1/CAN_DATA2/CAN_DATA3 registers. + +\par \tab \tab ->Write the register CAN_ADCON, including setting the valid + +\par \tab \tab bit of the data registers and setting register bit RWEN to + +\par \tab \tab 1. + +\par \tab \tab ->The valid data will be written to the MultiCAN kernel + +\par \tab \tab only once. Register bit BSY will become 1. + +\par \tab \tab ->When Register bit BSY becomes 0, the transmission is + +\par \tab \tab finished. + +\par \plain\f4\fs20\cf0 \tab Returnvalue: +\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0 +\par \plain\f4\fs20\cf0 \tab Parameters: +\par \plain\f4\fs20\cf0\b +\tab \tab ulValue: + +\par \tab \tab 32-bit Data + +\par +\par +\par \plain\f4\fs20\cf0 \tab Macro: +\par \plain\f4\fs20\cf0\b \tab \tab CAN_pushAMRegs/_popAMRegs()\plain\f4\fs20\cf0 +\par \tab Description: +\par \plain\f4\fs20\cf0\i +\tab \tab The macro CAN_pushAMRegs() PUSH the CAN Access Mediator + +\par \tab \tab Registers. + +\par \tab \tab The macro CAN_popAMRegs() POP the CAN Access Mediator + +\par \tab \tab Registers. + +\par \tab \tab Note: + +\par \tab \tab This macro is used in CAN ISR/Function's to protect Access + +\par \tab \tab Mediator Register + +\par \tab \tab MultiCAN Access Mediator Registers: + +\par \tab \tab ADL, ADH, DATA0, DATA1, DATA2, DATA3. + +\par \tab \tab The _push_/_pop_ routine inserts a PUSH/POP instruction + +\par \tab \tab into the program saving the contents of the Special + +\par \tab \tab Function Register(sfr) on the Stack. + +\par \plain\f4\fs20\cf0 \tab Returnvalue: +\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0 +\par \plain\f4\fs20\cf0 \tab Parameters: +\par \plain\f4\fs20\cf0\b +\tab \tab None + +\par \plain\f4\fs24\cf0 Functions:\f4\fs20\cf0 +\par +\par \plain\f4\fs20\cf0 \tab Function: +\par \plain\f4\fs20\cf0\b \tab \tab void CAN_vInit(void)\plain\f4\fs20\cf0 +\par \tab Description: +\par \plain\f4\fs20\cf0\i +\tab \tab This is the initialization function of the CAN function + +\par \tab \tab library. It is assumed that the SFRs used by this library + +\par \tab \tab are in their reset state. + +\par \plain\f4\fs20\cf0 \tab Returnvalue: +\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0 +\par \plain\f4\fs20\cf0 \tab Parameters: +\par \plain\f4\fs20\cf0\b +\tab \tab None + +\par +\par \plain\f4\fs20\cf0 \tab Function: +\par \plain\f4\fs20\cf0\b \tab \tab void CAN_vWriteAMData(ulong ulValue)\plain\f4\fs20\cf0 +\par \tab Description: +\par \plain\f4\fs20\cf0\i +\tab \tab This function writes 32-bit Data to CAN Data Register's + +\par \tab \tab 0-3respectively. + +\par \tab \tab Note: + +\par \tab \tab Write Process : + +\par \tab \tab ->Write the address of the MultiCAN kernel register to the + +\par \tab \tab CAN_ADL and CAN_ADH registers. + +\par \tab \tab use macro : CAN_vWriteCANAddress. + +\par \tab \tab ->Write the data to the + +\par \tab \tab CAN_DATA0/CAN_DATA1/CAN_DATA2/CAN_DATA3 registers. + +\par \tab \tab ->Write the register CAN_ADCON, including setting the valid + +\par \tab \tab bit of the data registers and setting register bit RWEN to + +\par \tab \tab 1. + +\par \tab \tab ->The valid data will be written to the MultiCAN kernel + +\par \tab \tab only once. Register bit BSY will become 1. + +\par \tab \tab ->When Register bit BSY becomes 0, the transmission is + +\par \tab \tab finished. + +\par \plain\f4\fs20\cf0 \tab Returnvalue: +\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0 +\par \plain\f4\fs20\cf0 \tab Parameters: +\par \plain\f4\fs20\cf0\b +\tab \tab ulValue: + +\par \tab \tab 32-bit Data + +\par +\par \plain\f4\fs20\cf0 \tab Function: +\par \plain\f4\fs20\cf0\b \tab \tab void CAN_vSetListCommand(ulong ulVal)\plain\f4\fs20\cf0 +\par \tab Description: +\par \plain\f4\fs20\cf0\i +\tab \tab This function write's 32-bit Data to CAN_PANCTR Register. + +\par \plain\f4\fs20\cf0 \tab Returnvalue: +\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0 +\par \plain\f4\fs20\cf0 \tab Parameters: +\par \plain\f4\fs20\cf0\b +\tab \tab ulVal: + +\par \tab \tab 32-bit Data + +\par +\par \plain\f4\fs20\cf0 \tab Function: +\par \plain\f4\fs20\cf0\b \tab \tab void CAN_vGetMsgObj(ubyte ubObjNr, stCAN_SWObj *pstObj)\plain\f4\fs20\cf0 +\par \tab Description: +\par \plain\f4\fs20\cf0\i +\tab \tab This function fills the forwarded SW message object with + +\par \tab \tab the content of the chosen HW message object. + +\par \tab \tab The structure of the SW message object is defined in the + +\par \tab \tab header file CAN.H (see stCAN_SWObj). + +\par \plain\f4\fs20\cf0 \tab Returnvalue: +\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0 +\par \plain\f4\fs20\cf0 \tab Parameters: +\par \plain\f4\fs20\cf0\b +\tab \tab ubObjNr: + +\par \tab \tab Number of the message object to be read (0-31) + +\par \tab \tab *pstObj: + +\par \tab \tab Pointer on a message object to be filled by this function + +\par +\par \plain\f4\fs20\cf0 \tab Function: +\par \plain\f4\fs20\cf0\b \tab \tab ubyte CAN_ubRequestMsgObj(ubyte ubObjNr)\plain\f4\fs20\cf0 +\par \tab Description: +\par \plain\f4\fs20\cf0\i +\tab \tab If a TRANSMIT OBJECT is to be reconfigured it must first be + +\par \tab \tab accessed. The access to the transmit object is exclusive. + +\par \tab \tab This function checks whether the choosen message object is + +\par \tab \tab still executing a transmit request, or if the object can be + +\par \tab \tab accessed exclusively. + +\par \tab \tab After the message object is reserved, it can be + +\par \tab \tab reconfigured by using the function CAN_vConfigMsgObj or + +\par \tab \tab CAN_vLoadData. + +\par \tab \tab Both functions enable access to the object for the CAN + +\par \tab \tab controller. + +\par \tab \tab By calling the function CAN_vTransmit transfering of data + +\par \tab \tab is started. + +\par \plain\f4\fs20\cf0 \tab Returnvalue: +\par \tab \tab \plain\f4\fs20\cf0\b 0 message object is busy (a transfer is active), else 1\plain\f4\fs20\cf0 +\par \plain\f4\fs20\cf0 \tab Parameters: +\par \plain\f4\fs20\cf0\b +\tab \tab ubObjNr: + +\par \tab \tab Number of the message object (0-31) + +\par +\par \plain\f4\fs20\cf0 \tab Function: +\par \plain\f4\fs20\cf0\b \tab \tab ubyte CAN_ubNewData(ubyte ubObjNr)\plain\f4\fs20\cf0 +\par \tab Description: +\par \plain\f4\fs20\cf0\i +\tab \tab This function checks whether the selected RECEIVE OBJECT + +\par \tab \tab has received a new message. If so the function returns the + +\par \tab \tab value '1'. + +\par \plain\f4\fs20\cf0 \tab Returnvalue: +\par \tab \tab \plain\f4\fs20\cf0\b 1 the message object has received a new message, else 0\plain\f4\fs20\cf0 +\par \plain\f4\fs20\cf0 \tab Parameters: +\par \plain\f4\fs20\cf0\b +\tab \tab ubObjNr: + +\par \tab \tab Number of the message object (0-31) + +\par +\par \plain\f4\fs20\cf0 \tab Function: +\par \plain\f4\fs20\cf0\b \tab \tab void CAN_vTransmit(ubyte ubObjNr)\plain\f4\fs20\cf0 +\par \tab Description: +\par \plain\f4\fs20\cf0\i +\tab \tab This function triggers the CAN controller to send the + +\par \tab \tab selected message. + +\par \tab \tab If the selected message object is a TRANSMIT OBJECT then + +\par \tab \tab this function triggers the sending of a data frame. If + +\par \tab \tab however the selected message object is a RECEIVE OBJECT + +\par \tab \tab this function triggers the sending of a remote frame. + +\par \plain\f4\fs20\cf0 \tab Returnvalue: +\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0 +\par \plain\f4\fs20\cf0 \tab Parameters: +\par \plain\f4\fs20\cf0\b +\tab \tab ubObjNr: + +\par \tab \tab Number of the message object (0-31) + +\par +\par \plain\f4\fs20\cf0 \tab Function: +\par \plain\f4\fs20\cf0\b \tab \tab void CAN_vLoadData(ubyte ubObjNr, ulong *ulpubData)\plain\f4\fs20\cf0 +\par \tab Description: +\par \plain\f4\fs20\cf0\i +\tab \tab If a hardware TRANSMIT OBJECT has to be loaded with data + +\par \tab \tab but not with a new identifier, this function may be used + +\par \tab \tab instead of the function CAN_vConfigMsgObj. The message + +\par \tab \tab object should be accessed by calling the function + +\par \tab \tab CAN_ubRequestMsgObj before calling this function. This + +\par \tab \tab prevents the CAN controller from working with invalid data. + +\par \plain\f4\fs20\cf0 \tab Returnvalue: +\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0 +\par \plain\f4\fs20\cf0 \tab Parameters: +\par \plain\f4\fs20\cf0\b +\tab \tab ubObjNr: + +\par \tab \tab Number of the message object to be configured (0-31) + +\par \tab \tab *ulpubData: + +\par \tab \tab Pointer on a data buffer + +\par +\par \plain\f4\fs20\cf0 \tab Function: +\par \plain\f4\fs20\cf0\b \tab \tab void CAN_vReleaseObj(ubyte ubObjNr)\plain\f4\fs20\cf0 +\par \tab Description: +\par \plain\f4\fs20\cf0\i +\tab \tab This function resets the NEWDAT flag of the selected + +\par \tab \tab RECEIVE OBJECT, so that the CAN controller have access to + +\par \tab \tab it. This function must be called if the function + +\par \tab \tab CAN_ubNewData detects, that new data are present in the + +\par \tab \tab message object and the actual data have been read by + +\par \tab \tab calling the function CAN_vGetMsgObj. + +\par \plain\f4\fs20\cf0 \tab Returnvalue: +\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0 +\par \plain\f4\fs20\cf0 \tab Parameters: +\par \plain\f4\fs20\cf0\b +\tab \tab ubObjNr: + +\par \tab \tab Number of the message object (0-31) + +\par +\par \plain\f4\fs24\cf0 Initialization: +\par \plain\f4\fs20\cf0\b +\par +\tab Configuration of the Module Clock:\par +\tab - the CAN module clock = 48.00 MHz\par +\tab - FCLK runs at 2 times the frequency of PCLK.\par +\par +\tab - CMCON - Clock Control Register is Configured in MAIN_vInit\par +\par +\tab Configuration of CAN Node 0:\par +\par +\tab General Configuration of the Node 0:\par +\tab - set INIT and CCE\par +\par +\tab - load NODE 0 interrupt pointer register\par +\par +\tab Configuration of the used CAN Input Port Pins:\par +\tab - Pin P1.0 is used as RXDC0_0 input\par +\par +\tab - Loop-back mode is disabled\par +\par +\tab Configuration of the Node 0 Baud Rate:\par +\tab - required baud rate = 100.000 kbaud\par +\tab - real baud rate = 100.000 kbaud\par +\tab - sample point = 60.00 %\par +\tab - there are 5 time quanta before sample point\par +\tab - there are 4 time quanta after sample point\par +\tab - the (re)synchronization jump width is 2 time quanta\par +\par +\tab Configuration of the Node 0 Error Counter:\par +\tab - the error warning threshold value (warning level) is 96\par +\par +\tab Configuration of the Frame Counter:\par +\tab - Frame Counter Mode: the counter is incremented upon the reception\par +\tab and transmission of frames\par +\tab - frame counter: 0x0000\par +\par +\tab Configuration of CAN Node 1:\par +\par +\tab General Configuration of the Node 1:\par +\tab - set INIT and CCE\par +\par +\tab Configuration of the used CAN Output Port Pins:\par +\tab Pin P1.1 is used as TXDC0_0 Output\par +\tab - NODE1 TXD Pin's are not used\par +\par +\tab Configuration of the CAN Message Object List Structure:\par +\par +\tab Allocate MOs for list 1:\par +\par +\tab Configuration of the CAN Message Objects 0 - 31:\par +\tab Configuration of Message Object 0:\par +\tab - message object 0 is not valid\par +\tab Configuration of Message Object 1:\par +\tab - message object 1 is not valid\par +\tab Configuration of Message Object 2:\par +\tab - message object 2 is not valid\par +\tab Configuration of Message Object 3:\par +\tab - message object 3 is not valid\par +\tab Configuration of Message Object 4:\par +\tab - message object 4 is not valid\par +\tab Configuration of Message Object 5:\par +\tab - message object 5 is valid\par +\tab - message object is used as receive object\par +\tab - this message object is assigned to list 1 (node 0)\par +\par +\tab - priority class 3; transmit acceptance filtering is based on the list\par +\tab order (like class 1)\par +\tab - extended 29-bit identifier\par +\tab - identifier 29-bit: 0x00000003\par +\par +\tab - only accept receive frames with matching IDE bit\par +\tab - acceptance mask 29-bit: 0x1FFFFFFF\par +\par +\tab - use message pending register 0 bit position 5\par +\par +\tab - this object is a STANDARD MESSAGE OBJECT\par +\tab - 8 valid data bytes\par +\par +\tab Configuration of Message Object 6:\par +\tab - message object 6 is valid\par +\tab - message object is used as transmit object\par +\tab - this message object is assigned to list 1 (node 0)\par +\par +\tab - priority class 3; transmit acceptance filtering is based on the list\par +\tab order (like class 1)\par +\tab - extended 29-bit identifier\par +\tab - identifier 29-bit: 0x11000001\par +\par +\tab - only accept receive frames with matching IDE bit\par +\tab - acceptance mask 29-bit: 0x1FFFFFFF\par +\par +\tab - use message pending register 0 bit position 6\par +\par +\tab - this object is a STANDARD MESSAGE OBJECT\par +\tab - 8 valid data bytes\par +\par +\tab Configuration of Message Object 7:\par +\tab - message object 7 is valid\par +\tab - message object is used as receive object\par +\tab - this message object is assigned to list 1 (node 0)\par +\par +\tab - priority class 3; transmit acceptance filtering is based on the list\par +\tab order (like class 1)\par +\tab - extended 29-bit identifier\par +\tab - identifier 29-bit: 0x11000002\par +\par +\tab - only accept receive frames with matching IDE bit\par +\tab - acceptance mask 29-bit: 0x1FFFFFFF\par +\par +\tab - use message pending register 0 bit position 7\par +\par +\tab - this object is a STANDARD MESSAGE OBJECT\par +\tab - 8 valid data bytes\par +\par +\tab Configuration of Message Object 8:\par +\tab - message object 8 is valid\par +\tab - message object is used as receive object\par +\tab - this message object is assigned to list 1 (node 0)\par +\par +\tab - priority class 3; transmit acceptance filtering is based on the list\par +\tab order (like class 1)\par +\tab - extended 29-bit identifier\par +\tab - identifier 29-bit: 0x11000003\par +\par +\tab - only accept receive frames with matching IDE bit\par +\tab - acceptance mask 29-bit: 0x1FFFFFFF\par +\par +\tab - use message pending register 0 bit position 8\par +\par +\tab - this object is a STANDARD MESSAGE OBJECT\par +\tab - 8 valid data bytes\par +\par +\tab Configuration of Message Object 9:\par +\tab - message object 9 is valid\par +\tab - message object is used as transmit object\par +\tab - this message object is assigned to list 1 (node 0)\par +\par +\tab - priority class 3; transmit acceptance filtering is based on the list\par +\tab order (like class 1)\par +\tab - extended 29-bit identifier\par +\tab - identifier 29-bit: 0x1FFFFFF0\par +\par +\tab - only accept receive frames with matching IDE bit\par +\tab - acceptance mask 29-bit: 0x1FFFFFFF\par +\par +\tab - use message pending register 0 bit position 9\par +\par +\tab - this object is a STANDARD MESSAGE OBJECT\par +\tab - 8 valid data bytes\par +\par +\tab Configuration of Message Object 10:\par +\tab - message object 10 is not valid\par +\tab Configuration of Message Object 11:\par +\tab - message object 11 is not valid\par +\tab Configuration of Message Object 12:\par +\tab - message object 12 is not valid\par +\tab Configuration of Message Object 13:\par +\tab - message object 13 is not valid\par +\tab Configuration of Message Object 14:\par +\tab - message object 14 is not valid\par +\tab Configuration of Message Object 15:\par +\tab - message object 15 is not valid\par +\tab Configuration of Message Object 16:\par +\tab - message object 16 is not valid\par +\tab Configuration of Message Object 17:\par +\tab - message object 17 is not valid\par +\tab Configuration of Message Object 18:\par +\tab - message object 18 is not valid\par +\tab Configuration of Message Object 19:\par +\tab - message object 19 is not valid\par +\tab Configuration of Message Object 20:\par +\tab - message object 20 is not valid\par +\tab Configuration of Message Object 21:\par +\tab - message object 21 is not valid\par +\tab Configuration of Message Object 22:\par +\tab - message object 22 is not valid\par +\tab Configuration of Message Object 23:\par +\tab - message object 23 is not valid\par +\tab Configuration of Message Object 24:\par +\tab - message object 24 is not valid\par +\tab Configuration of Message Object 25:\par +\tab - message object 25 is not valid\par +\tab Configuration of Message Object 26:\par +\tab - message object 26 is not valid\par +\tab Configuration of Message Object 27:\par +\tab - message object 27 is not valid\par +\tab Configuration of Message Object 28:\par +\tab - message object 28 is not valid\par +\tab Configuration of Message Object 29:\par +\tab - message object 29 is not valid\par +\tab Configuration of Message Object 30:\par +\tab - message object 30 is not valid\par +\tab Configuration of Message Object 31:\par +\tab - message object 31 is not valid\par +\par +\tab Configuration of the Interrupts:\par +\tab - CAN interrupt node 0 is disabled\par +\tab - CAN interrupt node 1 is disabled\par +\tab - CAN interrupt node 2 is disabled\par +\tab - CAN interrupt node 3 is disabled\par +\tab - CAN interrupt node 4 is disabled\par +\tab - CAN interrupt node 5 is disabled\par +\tab - CAN interrupt node 6 is disabled\par +\tab - CAN interrupt node 7 is disabled\par +\par + +} diff --git a/CL2.0.uvgui.Administrator b/CL2.0.uvgui.Administrator new file mode 100644 index 0000000..2ac16cd --- /dev/null +++ b/CL2.0.uvgui.Administrator @@ -0,0 +1,2488 @@ + + + + -3.1 + +
### uVision Project, (C) Keil Software
+ + + + + + 38003 + Registers + 115 98 + + + 346 + Code Coverage + 900 160 + + + 204 + Performance Analyzer + 1060 + + + + + + 1506 + Symbols + + 133 133 133 + + + 1936 + Watch 1 + + 133 133 133 + + + 1937 + Watch 2 + + 133 133 133 + + + 1935 + Call Stack + Locals + + 133 133 133 + + + 2506 + Trace Data + + 75 135 130 95 70 230 200 + + + + + + 0 + 0 + 0 + + + + + + + 44 + 2 + 3 + + -1 + -1 + + + -1 + -1 + + + 418 + 586 + 1846 + 1165 + + + + 0 + + 380 + 01000000040000000100000001000000010000000100000000000000020000000000000001000000010000000000000028000000280000000100000002000000010000000100000050433A5C446F63756D656E747320616E642053657474696E67735C41646D696E6973747261746F725CD7C0C3E65CB3CCD0F232303133303731325C32D3A6D3C3B3CCD0F25C53544152545F58432E613531000000000C53544152545F58432E61353100000000C5D4F200FFFFFFFF4A433A5C446F63756D656E747320616E642053657474696E67735C41646D696E6973747261746F725CD7C0C3E65CB3CCD0F232303133303731325C32D3A6D3C3B3CCD0F25C626F6F742E630000000006626F6F742E6300000000FFDC7800FFFFFFFF0100000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD500010000000000000002000000E300000069000000900600005A030000 + + + + 0 + Build + + -1 + -1 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + B60000004F000000E4040000DC000000 + + + 16 + 28010000FE000000560500008B010000 + + + + 1005 + 1005 + 1 + 0 + 0 + 1 + 32767 + 0 + 4096 + 0 + + 16 + 0300000067000000DC00000027030000 + + + 16 + 1A0000003B000000CC00000072020000 + + + + 109 + 109 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000067000000DC00000027030000 + + + 16 + 1A0000003B000000CC00000072020000 + + + + 1465 + 1465 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000029020000E10400009A020000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 1466 + 1466 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000029020000E10400009A020000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 1467 + 1467 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000029020000E10400009A020000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 1468 + 1468 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000029020000E10400009A020000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 1506 + 1506 + 0 + 0 + 0 + 0 + 32767 + 0 + 16384 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 1913 + 1913 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + B900000067000000E1040000C3000000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 1935 + 1935 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + 0300000029020000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 1936 + 1936 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000029020000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 1937 + 1937 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000029020000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 1939 + 1939 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000029020000E10400009A020000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 1940 + 1940 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000029020000E10400009A020000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 1941 + 1941 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000029020000E10400009A020000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 1942 + 1942 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000029020000E10400009A020000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 195 + 195 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000067000000DC00000027030000 + + + 16 + 1A0000003B000000CC00000072020000 + + + + 196 + 196 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000067000000DC00000027030000 + + + 16 + 1A0000003B000000CC00000072020000 + + + + 197 + 197 + 1 + 0 + 0 + 1 + 32767 + 0 + 32768 + 0 + + 16 + 030000005C0300008D060000B8030000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 198 + 198 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + 0000000011020000E4040000B3020000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 199 + 199 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 030000005C0300008D060000B8030000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 203 + 203 + 0 + 0 + 0 + 0 + 32767 + 0 + 8192 + 0 + + 16 + B900000067000000E1040000C3000000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 204 + 204 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + B900000067000000E1040000C3000000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 221 + 221 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 00000000000000000000000000000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 2506 + 2506 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 540300004F000000E404000022020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 2507 + 2507 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 540300004F000000E404000022020000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 343 + 343 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + B900000067000000E1040000C3000000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 346 + 346 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + B900000067000000E1040000C3000000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 35824 + 35824 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + B900000067000000E1040000C3000000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 35885 + 35885 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35886 + 35886 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35887 + 35887 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35888 + 35888 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35889 + 35889 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35890 + 35890 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35891 + 35891 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35892 + 35892 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35893 + 35893 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35894 + 35894 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35895 + 35895 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35896 + 35896 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35897 + 35897 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35898 + 35898 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35899 + 35899 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35900 + 35900 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35901 + 35901 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35902 + 35902 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35903 + 35903 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35904 + 35904 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35905 + 35905 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 38003 + 38003 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000067000000DC00000027030000 + + + 16 + 1A0000003B000000CC00000072020000 + + + + 38007 + 38007 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 030000005C0300008D060000B8030000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 59392 + 59392 + 1 + 0 + 0 + 0 + 940 + 0 + 8192 + 0 + + 16 + 0000000000000000B70300001C000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 59393 + 0 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 00000000D103000090060000E2030000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 59399 + 59399 + 1 + 0 + 0 + 0 + 391 + 0 + 8192 + 1 + + 16 + 000000001C0000009201000038000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 59400 + 59400 + 0 + 0 + 0 + 0 + 612 + 0 + 8192 + 2 + + 16 + 00000000380000006F02000054000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 2604 + 000000000D000000000000000020000000000000FFFFFFFFFFFFFFFFB6000000DC000000E4040000E0000000000000000100000004000000010000000000000000000000FFFFFFFF06000000CB00000057010000CC000000F08B00005A01000079070000FFFF02000B004354616262656450616E65002000000000000028010000FE000000560500008B010000B60000004F000000E4040000DC0000000000000040280046060000000B446973617373656D626C7900000000CB00000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A6572000000005701000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A657200000000CC00000001000000FFFFFFFFFFFFFFFF0E4C6F67696320416E616C797A657200000000F08B000001000000FFFFFFFFFFFFFFFF0D436F646520436F766572616765000000005A01000001000000FFFFFFFFFFFFFFFF11496E737472756374696F6E205472616365000000007907000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFCB00000001000000FFFFFFFFCB000000000000000040000000000000FFFFFFFFFFFFFFFF500300004F00000054030000B302000000000000020000000400000001000000000000000000000000000000000000000000000001000000FFFFFFFF16000000E20500002D8C00002E8C00002F8C0000308C0000318C0000328C0000338C0000348C0000358C0000368C0000378C0000388C0000398C00003A8C00003B8C00003C8C00003D8C00003E8C00003F8C0000408C0000418C000001800040000000000000C6030000FE0000005605000062030000540300004F000000E4040000B30200000000000040410046160000000753796D626F6C7300000000E205000001000000FFFFFFFFFFFFFFFF00000000002D8C000001000000FFFFFFFFFFFFFFFF00000000002E8C000001000000FFFFFFFFFFFFFFFF00000000002F8C000001000000FFFFFFFFFFFFFFFF0000000000308C000001000000FFFFFFFFFFFFFFFF0000000000318C000001000000FFFFFFFFFFFFFFFF0000000000328C000001000000FFFFFFFFFFFFFFFF0000000000338C000001000000FFFFFFFFFFFFFFFF0000000000348C000001000000FFFFFFFFFFFFFFFF0000000000358C000001000000FFFFFFFFFFFFFFFF0000000000368C000001000000FFFFFFFFFFFFFFFF0000000000378C000001000000FFFFFFFFFFFFFFFF0000000000388C000001000000FFFFFFFFFFFFFFFF0000000000398C000001000000FFFFFFFFFFFFFFFF00000000003A8C000001000000FFFFFFFFFFFFFFFF00000000003B8C000001000000FFFFFFFFFFFFFFFF00000000003C8C000001000000FFFFFFFFFFFFFFFF00000000003D8C000001000000FFFFFFFFFFFFFFFF00000000003E8C000001000000FFFFFFFFFFFFFFFF00000000003F8C000001000000FFFFFFFFFFFFFFFF0000000000408C000001000000FFFFFFFFFFFFFFFF0000000000418C000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000001000000000000000000000001000000FFFFFFFF00000000C400000090010000C80000000000000001000000040000000000000000000000000000000000000001000000CA090000CB09000002000000000000000000000002000000FFFFFFFF540300003A010000E40400003E01000000000000010000000400000000000000000000000000000000000000000000000000000003000000FFFFFFFFE2050000CA090000CB09000001000000CB09000001000000CA09000001000000FFFFFFFFE2050000000000000010000001000000FFFFFFFFFFFFFFFFDF0000004F000000E3000000400300000100000002000010040000000100000014FFFFFF99050000FFFFFFFF05000000ED0300006D000000C3000000C4000000739400000180001000000100000072000000FE00000051010000EF030000000000004F000000DF000000400300000000000040140056050000000750726F6A65637401000000ED03000001000000FFFFFFFFFFFFFFFF05426F6F6B73010000006D00000001000000FFFFFFFFFFFFFFFF0946756E6374696F6E7301000000C300000001000000FFFFFFFFFFFFFFFF0954656D706C6174657301000000C400000001000000FFFFFFFFFFFFFFFF09526567697374657273000000007394000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFFED03000001000000FFFFFFFFED030000000000000080000000000000FFFFFFFFFFFFFFFF000000000D020000E40400001102000000000000010000000400000001000000000000000000000000000000000000000000000001000000C6000000FFFFFFFF0B0000008F070000930700009407000095070000960700009007000091070000B9050000BA050000BB050000BC0500000180008000000000000072000000C002000056050000620300000000000011020000E4040000B302000000000000404100460B0000001343616C6C20537461636B202B204C6F63616C73000000008F07000001000000FFFFFFFFFFFFFFFF0755415254202331000000009307000001000000FFFFFFFFFFFFFFFF0755415254202332000000009407000001000000FFFFFFFFFFFFFFFF0755415254202333000000009507000001000000FFFFFFFFFFFFFFFF15446562756720287072696E74662920566965776572000000009607000001000000FFFFFFFFFFFFFFFF0757617463682031000000009007000001000000FFFFFFFFFFFFFFFF0757617463682032000000009107000001000000FFFFFFFFFFFFFFFF084D656D6F7279203100000000B905000001000000FFFFFFFFFFFFFFFF084D656D6F7279203200000000BA05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203300000000BB05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203400000000BC05000001000000FFFFFFFFFFFFFFFFFFFFFFFF0000000003000000000000000000000003000000FFFFFFFF720200001102000076020000B302000000000000020000000400000000000000000000000000000000000000000000000000000002000000C6000000FFFFFFFF8F07000001000000FFFFFFFF8F07000001000000C6000000000000000080000001000000FFFFFFFFFFFFFFFF00000000400300009006000044030000010000000100001004000000010000000000000000000000FFFFFFFF03000000C5000000C7000000779400000180008000000100000072000000F30300000207000080040000000000004403000090060000D10300000000000040820056030000000C4275696C64204F757470757401000000C500000001000000FFFFFFFFFFFFFFFF0D46696E6420496E2046696C657301000000C700000001000000FFFFFFFFFFFFFFFF0742726F77736572000000007794000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFFC500000001000000FFFFFFFFC5000000000000000000000000000000 + + + 59392 + File + + 2308 + 00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000040004000000000000000000000000000000000100000001000000018022E100000000040005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000000000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000004000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000400460000000000000000000000000000000001000000010000000180FE880000000004004500000000000000000000000000000000010000000100000001800B810000000004001300000000000000000000000000000000010000000100000001800C810000000004001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE803000000000000000000000000000000000000000000000001000000010000009600000002002050000000001242595445535F5045525F574F52444C494E45960000000000000014000F6175624649464F52656164507472300E6175624649464F52656164507472054E4D495352064D534756414C0C7265736574204D534756414C1043414E5F776169745472616E736D69740D43414E5F765472616E736D69740430784246012A0F44465F426F6F7452784D53474F424A05535441434B0676656373656707737461727475700A466C674F6E6554696D65085553455F42414E4B0252300341523017574F52444C494E455F4255464645525F4144445245535305574C4275661242595445535F5045525F574F52444C494E450000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018024E10000000000001100000000000000000000000000000000010000000100000001800A810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018022800000020000001500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000000180C8880000000000001700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E4C010000020001001A0000000F50726F6A6563742057696E646F7773000000000000000000000000010000000100000000000000000000000100000008002880DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002880DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002880E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002880E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000288018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000028800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002880D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002880E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C65AC030000 + + + 1423 + 2800FFFF01001100434D4643546F6F6C426172427574746F6E00E1000000000000FFFFFFFF000100000000000000010000000000000001000000018001E1000000000000FFFFFFFF000100000000000000010000000000000001000000018003E1000000000000FFFFFFFF0001000000000000000100000000000000010000000180CD7F000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF000000000000000000010000000000000001000000018023E1000000000000FFFFFFFF000100000000000000010000000000000001000000018022E1000000000000FFFFFFFF000100000000000000010000000000000001000000018025E1000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001802BE1000000000000FFFFFFFF00010000000000000001000000000000000100000001802CE1000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001807A8A000000000000FFFFFFFF00010000000000000001000000000000000100000001807B8A000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180D3B0000000000000FFFFFFFF000100000000000000010000000000000001000000018015B1000000000000FFFFFFFF0001000000000000000100000000000000010000000180F4B0000000000000FFFFFFFF000100000000000000010000000000000001000000018036B1000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180FF88000000000000FFFFFFFF0001000000000000000100000000000000010000000180FE88000000000000FFFFFFFF00010000000000000001000000000000000100000001800B81000000000000FFFFFFFF00010000000000000001000000000000000100000001800C81000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180F088000000000000FFFFFFFF0001000000000000000100000000000000010000000180EE7F000000000000FFFFFFFF000100000000000000010000000000000001000000018024E1000000000000FFFFFFFF00010000000000000001000000000000000100000001800A81000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001802280000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180C488000000000000FFFFFFFF0001000000000000000100000000000000010000000180C988000000000000FFFFFFFF0001000000000000000100000000000000010000000180C788000000000000FFFFFFFF0001000000000000000100000000000000010000000180C888000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180DD88000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180FB7F000000000000FFFFFFFF000100000000000000010000000000000001000000 + + + 1423 + 2800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000000004000000000000000000000000000000000100000001000000018022E100000000000005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000000000700000000000000000000000000000000010000000100000001802CE10000000000000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000000000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000000000C0000000000000000000000000000000001000000010000000180F4B00000000000000D000000000000000000000000000000000100000001000000018036B10000000000000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF880000000000000F0000000000000000000000000000000001000000010000000180FE880000000000001000000000000000000000000000000000010000000100000001800B810000000000001100000000000000000000000000000000010000000100000001800C810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F088000000000000130000000000000000000000000000000001000000010000000180EE7F00000000000014000000000000000000000000000000000100000001000000018024E10000000000001500000000000000000000000000000000010000000100000001800A810000000000001600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018022800000000000001700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000180000000000000000000000000000000001000000010000000180C988000000000000190000000000000000000000000000000001000000010000000180C7880000000000001A0000000000000000000000000000000001000000010000000180C8880000000000001B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180DD880000000000001C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001D000000000000000000000000000000000100000001000000 + + + + 59399 + Build + + 573 + 00200000010000000D00FFFF01001100434D4643546F6F6C426172427574746F6ECF7F0000000000001C0000000000000000000000000000000001000000010000000180D07F0000000000001D000000000000000000000000000000000100000001000000018030800000000000001E00000000000000000000000000000000010000000100000001809E8A0000000004001F0000000000000000000000000000000001000000010000000180D17F0000000004002000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000002100000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6EBA000000000000000000000000000000000000000000000000010000000100000096000000030020500000000008546172676574203196000000000000000100085461726765742031000000000180EB880000000000002200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000230000000000000000000000000000000001000000010000000180B08A0000000004002400000000000000000000000000000000010000000100000000000000054275696C6487010000 + + + 478 + 0D00FFFF01001100434D4643546F6F6C426172427574746F6ECF7F000000000000FFFFFFFF0001000000000000000100000000000000010000000180D07F000000000000FFFFFFFF00010000000000000001000000000000000100000001803080000000000000FFFFFFFF00010000000000000001000000000000000100000001809E8A000000000000FFFFFFFF0001000000000000000100000000000000010000000180D17F000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001804C8A000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001806680000000000000FFFFFFFF0001000000000000000100000000000000010000000180EB88000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180C07F000000000000FFFFFFFF0001000000000000000100000000000000010000000180B08A000000000000FFFFFFFF000100000000000000010000000000000001000000 + + + 478 + 0D00FFFF01001100434D4643546F6F6C426172427574746F6ECF7F000000000000000000000000000000000000000000000001000000010000000180D07F00000000000001000000000000000000000000000000000100000001000000018030800000000000000200000000000000000000000000000000010000000100000001809E8A000000000000030000000000000000000000000000000001000000010000000180D17F0000000000000400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000000500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001806680000000000000060000000000000000000000000000000001000000010000000180EB880000000000000700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000080000000000000000000000000000000001000000010000000180B08A00000000000009000000000000000000000000000000000100000001000000 + + + + 59400 + Debug + + 2220 + 00200000000000001900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000002500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000002600000000000000000000000000000000010000000100000001801D800000000000002700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000002800000000000000000000000000000000010000000100000001801B80000000000000290000000000000000000000000000000001000000010000000180E57F0000000000002A00000000000000000000000000000000010000000100000001801C800000000000002B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000002C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B0000000000002D0000000000000000000000000000000001000000010000000180F07F0000000000002E0000000000000000000000000000000001000000010000000180E8880000000000003700000000000000000000000000000000010000000100000001803B010000000000002F0000000000000000000000000000000001000000010000000180BB8A00000000000030000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E0E01000000000000310000000D57617463682057696E646F7773000000000000000000000000010000000100000000000000000000000100000002001380D88B000000000000310000000757617463682031000000000000000000000000010000000100000000000000000000000100000000001380D98B0000000000003100000007576174636820320000000000000000000000000100000001000000000000000000000001000000000013800F01000000000000320000000E4D656D6F72792057696E646F7773000000000000000000000000010000000100000000000000000000000100000004001380D28B00000000000032000000084D656D6F72792031000000000000000000000000010000000100000000000000000000000100000000001380D38B00000000000032000000084D656D6F72792032000000000000000000000000010000000100000000000000000000000100000000001380D48B00000000000032000000084D656D6F72792033000000000000000000000000010000000100000000000000000000000100000000001380D58B00000000000032000000084D656D6F727920340000000000000000000000000100000001000000000000000000000001000000000013801001000000000000330000000E53657269616C2057696E646F77730000000000000000000000000100000001000000000000000000000001000000040013809307000000000000330000000755415254202331000000000000000000000000010000000100000000000000000000000100000000001380940700000000000033000000075541525420233200000000000000000000000001000000010000000000000000000000010000000000138095070000000000003300000007554152542023330000000000000000000000000100000001000000000000000000000001000000000013809607000000000000330000000E49544D2F525441205669657765720000000000000000000000000100000001000000000000000000000001000000000013803C010000000000003400000010416E616C797369732057696E646F7773000000000000000000000000010000000100000000000000000000000100000003001380658A000000000000340000000E4C6F67696320416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380DC7F0000000000003E00000014506572666F726D616E636520416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380E788000000000000380000000D436F646520436F76657261676500000000000000000000000001000000010000000000000000000000010000000000138053010000000000003F0000000D54726163652057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013805401000000000000FFFFFFFF115472616365204D656E7520416E63686F720100000000000000010000000000000001000000000000000000000001000000000013802901000000000000350000001553797374656D205669657765722057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013804B01000000000000FFFFFFFF1453797374656D2056696577657220416E63686F720100000000000000010000000000000001000000000000000000000001000000000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000138001890000000000003600000007546F6F6C626F7800000000000000000000000001000000010000000000000000000000010000000300138044C5000000000000FFFFFFFF0E5570646174652057696E646F77730100000000000000010000000000000001000000000000000000000001000000000013800000000000000400FFFFFFFF000000000000000000010000000000000001000000000000000000000001000000000013805B01000000000000FFFFFFFF12546F6F6C626F78204D656E75416E63686F72010000000000000001000000000000000100000000000000000000000100000000000000000005446562756764020000 + + + 898 + 1900FFFF01001100434D4643546F6F6C426172427574746F6ECC88000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001801780000000000000FFFFFFFF00010000000000000001000000000000000100000001801D80000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001801A80000000000000FFFFFFFF00010000000000000001000000000000000100000001801B80000000000000FFFFFFFF0001000000000000000100000000000000010000000180E57F000000000000FFFFFFFF00010000000000000001000000000000000100000001801C80000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001800089000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180E48B000000000000FFFFFFFF0001000000000000000100000000000000010000000180F07F000000000000FFFFFFFF0001000000000000000100000000000000010000000180E888000000000000FFFFFFFF00010000000000000001000000000000000100000001803B01000000000000FFFFFFFF0001000000000000000100000000000000010000000180BB8A000000000000FFFFFFFF0001000000000000000100000000000000010000000180D88B000000000000FFFFFFFF0001000000000000000100000000000000010000000180D28B000000000000FFFFFFFF00010000000000000001000000000000000100000001809307000000000000FFFFFFFF0001000000000000000100000000000000010000000180658A000000000000FFFFFFFF0001000000000000000100000000000000010000000180C18A000000000000FFFFFFFF0001000000000000000100000000000000010000000180EE8B000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001800189000000000000FFFFFFFF000100000000000000010000000000000001000000 + + + 898 + 1900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000000000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000000100000000000000000000000000000000010000000100000001801D800000000000000200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000000300000000000000000000000000000000010000000100000001801B80000000000000040000000000000000000000000000000001000000010000000180E57F0000000000000500000000000000000000000000000000010000000100000001801C800000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000000700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B000000000000080000000000000000000000000000000001000000010000000180F07F000000000000090000000000000000000000000000000001000000010000000180E8880000000000000A00000000000000000000000000000000010000000100000001803B010000000000000B0000000000000000000000000000000001000000010000000180BB8A0000000000000C0000000000000000000000000000000001000000010000000180D88B0000000000000D0000000000000000000000000000000001000000010000000180D28B0000000000000E000000000000000000000000000000000100000001000000018093070000000000000F0000000000000000000000000000000001000000010000000180658A000000000000100000000000000000000000000000000001000000010000000180C18A000000000000110000000000000000000000000000000001000000010000000180EE8B0000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180018900000000000013000000000000000000000000000000000100000001000000 + + + + 0 + 1680 + 1050 + + + + 1 + Debug + + -1 + -1 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + B60000004F000000F5040000DC000000 + + + 16 + B600000069000000F5040000F6000000 + + + + 1005 + 1005 + 1 + 0 + 0 + 1 + 32767 + 0 + 4096 + 0 + + 16 + 0300000067000000AF00000012030000 + + + 16 + 3000000058000000E20000008F020000 + + + + 109 + 109 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000067000000AF00000012030000 + + + 16 + 3000000058000000E20000008F020000 + + + + 1465 + 1465 + 1 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + FC040000670000008D060000B8030000 + + + 16 + EF0500001002000033090000B2020000 + + + + 1466 + 1466 + 1 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + FC040000670000008D060000B8030000 + + + 16 + EF0500001002000033090000B2020000 + + + + 1467 + 1467 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + FC040000670000008D060000B8030000 + + + 16 + EF0500001002000033090000B2020000 + + + + 1468 + 1468 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + FC040000670000008D060000B8030000 + + + 16 + EF0500001002000033090000B2020000 + + + + 1506 + 1506 + 0 + 0 + 0 + 0 + 32767 + 0 + 16384 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 1913 + 1913 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + B900000067000000F2040000C3000000 + + + 16 + 3000000058000000A2020000E5000000 + + + + 1935 + 1935 + 1 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + FC040000670000008D060000B8030000 + + + 16 + EF0500001002000033090000B2020000 + + + + 1936 + 1936 + 1 + 0 + 0 + 1 + 32767 + 0 + 32768 + 0 + + 16 + FC040000670000008D060000B8030000 + + + 16 + EF0500001002000033090000B2020000 + + + + 1937 + 1937 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + FC040000670000008D060000B8030000 + + + 16 + EF0500001002000033090000B2020000 + + + + 1939 + 1939 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + FC040000670000008D060000B8030000 + + + 16 + EF0500001002000033090000B2020000 + + + + 1940 + 1940 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + FC040000670000008D060000B8030000 + + + 16 + EF0500001002000033090000B2020000 + + + + 1941 + 1941 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + FC040000670000008D060000B8030000 + + + 16 + EF0500001002000033090000B2020000 + + + + 1942 + 1942 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + FC040000670000008D060000B8030000 + + + 16 + EF0500001002000033090000B2020000 + + + + 195 + 195 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000067000000AF00000012030000 + + + 16 + 3000000058000000E20000008F020000 + + + + 196 + 196 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000067000000AF00000012030000 + + + 16 + 3000000058000000E20000008F020000 + + + + 197 + 197 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + 030000003E020000E10400009A020000 + + + 16 + 3000000058000000A2020000E5000000 + + + + 198 + 198 + 1 + 0 + 0 + 1 + 32767 + 0 + 32768 + 0 + + 16 + 000000002F030000F5040000D1030000 + + + 16 + 3000000058000000A2020000E5000000 + + + + 199 + 199 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 030000003E020000E10400009A020000 + + + 16 + 3000000058000000A2020000E5000000 + + + + 203 + 203 + 1 + 0 + 0 + 1 + 32767 + 0 + 8192 + 0 + + 16 + B600000064000000F5040000DC000000 + + + 16 + 3000000058000000A2020000E5000000 + + + + 204 + 204 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + B900000067000000F2040000C3000000 + + + 16 + 3000000058000000A2020000E5000000 + + + + 221 + 221 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 00000000000000000000000000000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 2506 + 2506 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 540300004F000000E404000022020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 2507 + 2507 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 540300004F000000E404000022020000 + + + 16 + 3000000058000000A2020000E5000000 + + + + 343 + 343 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + B900000067000000F2040000C3000000 + + + 16 + 3000000058000000A2020000E5000000 + + + + 346 + 346 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + B900000067000000F2040000C3000000 + + + 16 + 3000000058000000A2020000E5000000 + + + + 35824 + 35824 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + B900000067000000F2040000C3000000 + + + 16 + 3000000058000000A2020000E5000000 + + + + 35885 + 35885 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35886 + 35886 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35887 + 35887 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35888 + 35888 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35889 + 35889 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35890 + 35890 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35891 + 35891 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35892 + 35892 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35893 + 35893 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35894 + 35894 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35895 + 35895 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35896 + 35896 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35897 + 35897 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35898 + 35898 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35899 + 35899 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35900 + 35900 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35901 + 35901 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35902 + 35902 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35903 + 35903 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35904 + 35904 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35905 + 35905 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 38003 + 38003 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000067000000AF00000012030000 + + + 16 + 3000000058000000E20000008F020000 + + + + 38007 + 38007 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 030000003E020000E10400009A020000 + + + 16 + 3000000058000000A2020000E5000000 + + + + 59392 + 59392 + 1 + 0 + 0 + 0 + 940 + 0 + 8192 + 0 + + 16 + 0000000000000000B70300001C000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 59393 + 0 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 00000000D103000090060000E2030000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 59399 + 59399 + 0 + 0 + 0 + 0 + 391 + 0 + 8192 + 1 + + 16 + 000000001C0000009201000038000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 59400 + 59400 + 1 + 0 + 0 + 0 + 612 + 0 + 8192 + 2 + + 16 + 000000001C0000006F02000038000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 2707 + 000000000E000000000000000020000001000000FFFFFFFFFFFFFFFFB6000000DC000000F5040000E0000000010000000100001004000000010000000000000000000000FFFFFFFF06000000CB00000057010000CC000000F08B00005A01000079070000FFFF02000B004354616262656450616E650020000001000000B600000069000000F5040000F6000000B60000004F000000F5040000DC0000000000000040280056060000000B446973617373656D626C7901000000CB00000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A6572000000005701000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A657200000000CC00000001000000FFFFFFFFFFFFFFFF0E4C6F67696320416E616C797A657200000000F08B000001000000FFFFFFFFFFFFFFFF0D436F646520436F766572616765000000005A01000001000000FFFFFFFFFFFFFFFF11496E737472756374696F6E205472616365000000007907000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFFCB00000001000000FFFFFFFFCB000000000000000040000000000000FFFFFFFFFFFFFFFF500300004F00000054030000B302000000000000020000000400000001000000000000000000000000000000000000000000000001000000FFFFFFFF16000000E20500002D8C00002E8C00002F8C0000308C0000318C0000328C0000338C0000348C0000358C0000368C0000378C0000388C0000398C00003A8C00003B8C00003C8C00003D8C00003E8C00003F8C0000408C0000418C0000018000400000000000005403000069000000E4040000CD020000540300004F000000E4040000B30200000000000040410046160000000753796D626F6C7300000000E205000001000000FFFFFFFFFFFFFFFF00000000002D8C000001000000FFFFFFFFFFFFFFFF00000000002E8C000001000000FFFFFFFFFFFFFFFF00000000002F8C000001000000FFFFFFFFFFFFFFFF0000000000308C000001000000FFFFFFFFFFFFFFFF0000000000318C000001000000FFFFFFFFFFFFFFFF0000000000328C000001000000FFFFFFFFFFFFFFFF0000000000338C000001000000FFFFFFFFFFFFFFFF0000000000348C000001000000FFFFFFFFFFFFFFFF0000000000358C000001000000FFFFFFFFFFFFFFFF0000000000368C000001000000FFFFFFFFFFFFFFFF0000000000378C000001000000FFFFFFFFFFFFFFFF0000000000388C000001000000FFFFFFFFFFFFFFFF0000000000398C000001000000FFFFFFFFFFFFFFFF00000000003A8C000001000000FFFFFFFFFFFFFFFF00000000003B8C000001000000FFFFFFFFFFFFFFFF00000000003C8C000001000000FFFFFFFFFFFFFFFF00000000003D8C000001000000FFFFFFFFFFFFFFFF00000000003E8C000001000000FFFFFFFFFFFFFFFF00000000003F8C000001000000FFFFFFFFFFFFFFFF0000000000408C000001000000FFFFFFFFFFFFFFFF0000000000418C000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000001000000000000000000000001000000FFFFFFFF00000000C400000090010000C80000000000000001000000040000000000000000000000000000000000000001000000CA090000CB09000002000000000000000000000002000000FFFFFFFF540300003A010000E40400003E01000000000000010000000400000000000000000000000000000000000000000000000000000003000000FFFFFFFFE2050000CA090000CB09000001000000CB09000001000000CA09000001000000FFFFFFFFE2050000000000000010000001000000FFFFFFFFFFFFFFFFB20000004F000000B60000002B030000010000000200001004000000010000000000000000000000FFFFFFFF05000000ED0300006D000000C3000000C400000073940000018000100000010000000000000069000000B200000045030000000000004F000000B20000002B0300000000000040140056050000000750726F6A65637401000000ED03000001000000FFFFFFFFFFFFFFFF05426F6F6B73000000006D00000001000000FFFFFFFFFFFFFFFF0946756E6374696F6E7300000000C300000001000000FFFFFFFFFFFFFFFF0954656D706C6174657300000000C400000001000000FFFFFFFFFFFFFFFF09526567697374657273010000007394000001000000FFFFFFFFFFFFFFFF04000000000000000000000000000000000000000000000001000000FFFFFFFFED03000001000000FFFFFFFFED030000000000000080000001000000FFFFFFFFFFFFFFFF000000002B030000F50400002F03000001000000010000100400000001000000000000000000000000000000000000000000000001000000C60000000000000003000000000000000000000003000000FFFFFFFF480300002F0300004C030000D103000000000000020000000400000000000000000000000000000000000000000000000000000001000000C600000001000000C6000000000000000080000000000000FFFFFFFFFFFFFFFF0000000022020000E404000026020000000000000100000004000000010000000000000000000000FFFFFFFF03000000C5000000C700000077940000018000800000000000000000000040020000E4040000CD0200000000000026020000E4040000B30200000000000040820046030000000C4275696C64204F757470757400000000C500000001000000FFFFFFFFFFFFFFFF0D46696E6420496E2046696C657300000000C700000001000000FFFFFFFFFFFFFFFF0642726F777365000000007794000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFC500000001000000FFFFFFFFC5000000000000000040000001000000FFFFFFFFFFFFFFFFF50400004F000000F9040000D1030000010000000200001004000000010000001CFDFFFFEB02000000000000000000000000000001000000FFFFFFFF0B0000008F070000930700009407000095070000960700009007000091070000B9050000BA050000BB050000BC05000001800040000001000000F90400006900000090060000EB030000F90400004F00000090060000D103000000000000404100560B0000001343616C6C20537461636B202B204C6F63616C73010000008F07000001000000FFFFFFFFFFFFFFFF0755415254202331000000009307000001000000FFFFFFFFFFFFFFFF0755415254202332000000009407000001000000FFFFFFFFFFFFFFFF0755415254202333000000009507000001000000FFFFFFFFFFFFFFFF15446562756720287072696E74662920566965776572000000009607000001000000FFFFFFFFFFFFFFFF0757617463682031010000009007000001000000FFFFFFFFFFFFFFFF0757617463682032000000009107000001000000FFFFFFFFFFFFFFFF084D656D6F7279203101000000B905000001000000FFFFFFFFFFFFFFFF084D656D6F7279203201000000BA05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203300000000BB05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203400000000BC05000001000000FFFFFFFFFFFFFFFF0500000000000000000000000000000000000000000000000000000001000000FFFFFFFF8F07000001000000FFFFFFFF8F070000000000000000000000000000 + + + 59392 + File + + 2308 + 00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000040004000000000000000000000000000000000100000001000000018022E100000000040005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000000000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000400460000000000000000000000000000000001000000010000000180FE880000000004004500000000000000000000000000000000010000000100000001800B810000000004001300000000000000000000000000000000010000000100000001800C810000000004001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE803000000000000000000000000000000000000000000000001000000010000009600000002002050000000001242595445535F5045525F574F52444C494E45960000000000000014000F6175624649464F52656164507472300E6175624649464F52656164507472054E4D495352064D534756414C0C7265736574204D534756414C1043414E5F776169745472616E736D69740D43414E5F765472616E736D69740430784246012A0F44465F426F6F7452784D53474F424A05535441434B0676656373656707737461727475700A466C674F6E6554696D65085553455F42414E4B0252300341523017574F52444C494E455F4255464645525F4144445245535305574C4275661242595445535F5045525F574F52444C494E450000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018024E10000000000001100000000000000000000000000000000010000000100000001800A810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018022800000020001001500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000400160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000000180C8880000000000001700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E4C010000020001001A0000000F50726F6A6563742057696E646F7773000000000000000000000000010000000100000000000000000000000100000008002880DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002880DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002880E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002880E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000288018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000028800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002880D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002880E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C65AC030000 + + + 1423 + 2800FFFF01001100434D4643546F6F6C426172427574746F6E00E1000000000000FFFFFFFF000100000000000000010000000000000001000000018001E1000000000000FFFFFFFF000100000000000000010000000000000001000000018003E1000000000000FFFFFFFF0001000000000000000100000000000000010000000180CD7F000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF000000000000000000010000000000000001000000018023E1000000000000FFFFFFFF000100000000000000010000000000000001000000018022E1000000000000FFFFFFFF000100000000000000010000000000000001000000018025E1000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001802BE1000000000000FFFFFFFF00010000000000000001000000000000000100000001802CE1000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001807A8A000000000000FFFFFFFF00010000000000000001000000000000000100000001807B8A000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180D3B0000000000000FFFFFFFF000100000000000000010000000000000001000000018015B1000000000000FFFFFFFF0001000000000000000100000000000000010000000180F4B0000000000000FFFFFFFF000100000000000000010000000000000001000000018036B1000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180FF88000000000000FFFFFFFF0001000000000000000100000000000000010000000180FE88000000000000FFFFFFFF00010000000000000001000000000000000100000001800B81000000000000FFFFFFFF00010000000000000001000000000000000100000001800C81000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180F088000000000000FFFFFFFF0001000000000000000100000000000000010000000180EE7F000000000000FFFFFFFF000100000000000000010000000000000001000000018024E1000000000000FFFFFFFF00010000000000000001000000000000000100000001800A81000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001802280000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180C488000000000000FFFFFFFF0001000000000000000100000000000000010000000180C988000000000000FFFFFFFF0001000000000000000100000000000000010000000180C788000000000000FFFFFFFF0001000000000000000100000000000000010000000180C888000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180DD88000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180FB7F000000000000FFFFFFFF000100000000000000010000000000000001000000 + + + 1423 + 2800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000000004000000000000000000000000000000000100000001000000018022E100000000000005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000000000700000000000000000000000000000000010000000100000001802CE10000000000000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000000000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000000000C0000000000000000000000000000000001000000010000000180F4B00000000000000D000000000000000000000000000000000100000001000000018036B10000000000000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF880000000000000F0000000000000000000000000000000001000000010000000180FE880000000000001000000000000000000000000000000000010000000100000001800B810000000000001100000000000000000000000000000000010000000100000001800C810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F088000000000000130000000000000000000000000000000001000000010000000180EE7F00000000000014000000000000000000000000000000000100000001000000018024E10000000000001500000000000000000000000000000000010000000100000001800A810000000000001600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018022800000000000001700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000180000000000000000000000000000000001000000010000000180C988000000000000190000000000000000000000000000000001000000010000000180C7880000000000001A0000000000000000000000000000000001000000010000000180C8880000000000001B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180DD880000000000001C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001D000000000000000000000000000000000100000001000000 + + + + 59399 + Build + + 552 + 00200000000000000D00FFFF01001100434D4643546F6F6C426172427574746F6ECF7F0000000000001C0000000000000000000000000000000001000000010000000180D07F0000000000001D000000000000000000000000000000000100000001000000018030800000000000001E00000000000000000000000000000000010000000100000001809E8A0000000000001F0000000000000000000000000000000001000000010000000180D17F0000000000002000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000002100000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6EBA00000000000000000000000000000000000000000000000001000000010000009600000003002050FFFFFFFF00960000000000000000000180EB880000000000002200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000230000000000000000000000000000000001000000010000000180B08A0000000000002400000000000000000000000000000000010000000100000000000000054275696C6487010000 + + + 478 + 0D00FFFF01001100434D4643546F6F6C426172427574746F6ECF7F000000000000FFFFFFFF0001000000000000000100000000000000010000000180D07F000000000000FFFFFFFF00010000000000000001000000000000000100000001803080000000000000FFFFFFFF00010000000000000001000000000000000100000001809E8A000000000000FFFFFFFF0001000000000000000100000000000000010000000180D17F000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001804C8A000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001806680000000000000FFFFFFFF0001000000000000000100000000000000010000000180EB88000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180C07F000000000000FFFFFFFF0001000000000000000100000000000000010000000180B08A000000000000FFFFFFFF000100000000000000010000000000000001000000 + + + 478 + 0D00FFFF01001100434D4643546F6F6C426172427574746F6ECF7F000000000000000000000000000000000000000000000001000000010000000180D07F00000000000001000000000000000000000000000000000100000001000000018030800000000000000200000000000000000000000000000000010000000100000001809E8A000000000000030000000000000000000000000000000001000000010000000180D17F0000000000000400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000000500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001806680000000000000060000000000000000000000000000000001000000010000000180EB880000000000000700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000080000000000000000000000000000000001000000010000000180B08A00000000000009000000000000000000000000000000000100000001000000 + + + + 59400 + Debug + + 2220 + 00200000010000001900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000002500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000002600000000000000000000000000000000010000000100000001801D800000000004002700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000002800000000000000000000000000000000010000000100000001801B80000000000000290000000000000000000000000000000001000000010000000180E57F0000000004002A00000000000000000000000000000000010000000100000001801C800000000004002B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000002C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B0000020001002D0000000000000000000000000000000001000000010000000180F07F0000020001002E0000000000000000000000000000000001000000010000000180E8880000020000003700000000000000000000000000000000010000000100000001803B010000020001002F0000000000000000000000000000000001000000010000000180BB8A00000200010030000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E0E01000002000100310000000D57617463682057696E646F7773000000000000000000000000010000000100000000000000000000000100000002001380D88B000000000000310000000757617463682031000000000000000000000000010000000100000000000000000000000100000000001380D98B0000000000003100000007576174636820320000000000000000000000000100000001000000000000000000000001000000000013800F01000002000100320000000E4D656D6F72792057696E646F7773000000000000000000000000010000000100000000000000000000000100000004001380D28B00000000000032000000084D656D6F72792031000000000000000000000000010000000100000000000000000000000100000000001380D38B00000000000032000000084D656D6F72792032000000000000000000000000010000000100000000000000000000000100000000001380D48B00000000000032000000084D656D6F72792033000000000000000000000000010000000100000000000000000000000100000000001380D58B00000000000032000000084D656D6F727920340000000000000000000000000100000001000000000000000000000001000000000013801001000002000000330000000E53657269616C2057696E646F77730000000000000000000000000100000001000000000000000000000001000000040013809307000000000000330000000755415254202331000000000000000000000000010000000100000000000000000000000100000000001380940700000000000033000000075541525420233200000000000000000000000001000000010000000000000000000000010000000000138095070000000000003300000007554152542023330000000000000000000000000100000001000000000000000000000001000000000013809607000000000000330000000E49544D2F525441205669657765720000000000000000000000000100000001000000000000000000000001000000000013803C010000020000003400000010416E616C797369732057696E646F7773000000000000000000000000010000000100000000000000000000000100000003001380658A000000000000340000000E4C6F67696320416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380DC7F0000000000003E00000014506572666F726D616E636520416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380E788000000000000380000000D436F646520436F76657261676500000000000000000000000001000000010000000000000000000000010000000000138053010000000000003F0000000D54726163652057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013805401000000000000FFFFFFFF115472616365204D656E7520416E63686F720100000000000000010000000000000001000000000000000000000001000000000013802901000000000000350000001553797374656D205669657765722057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013804B01000000000000FFFFFFFF1453797374656D2056696577657220416E63686F720100000000000000010000000000000001000000000000000000000001000000000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000138001890000020000003600000007546F6F6C626F7800000000000000000000000001000000010000000000000000000000010000000300138044C5000000000000FFFFFFFF0E5570646174652057696E646F77730100000000000000010000000000000001000000000000000000000001000000000013800000000000000400FFFFFFFF000000000000000000010000000000000001000000000000000000000001000000000013805B01000000000000FFFFFFFF12546F6F6C626F78204D656E75416E63686F72010000000000000001000000000000000100000000000000000000000100000000000000000005446562756764020000 + + + 898 + 1900FFFF01001100434D4643546F6F6C426172427574746F6ECC88000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001801780000000000000FFFFFFFF00010000000000000001000000000000000100000001801D80000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001801A80000000000000FFFFFFFF00010000000000000001000000000000000100000001801B80000000000000FFFFFFFF0001000000000000000100000000000000010000000180E57F000000000000FFFFFFFF00010000000000000001000000000000000100000001801C80000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001800089000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180E48B000000000000FFFFFFFF0001000000000000000100000000000000010000000180F07F000000000000FFFFFFFF0001000000000000000100000000000000010000000180E888000000000000FFFFFFFF00010000000000000001000000000000000100000001803B01000000000000FFFFFFFF0001000000000000000100000000000000010000000180BB8A000000000000FFFFFFFF0001000000000000000100000000000000010000000180D88B000000000000FFFFFFFF0001000000000000000100000000000000010000000180D28B000000000000FFFFFFFF00010000000000000001000000000000000100000001809307000000000000FFFFFFFF0001000000000000000100000000000000010000000180658A000000000000FFFFFFFF0001000000000000000100000000000000010000000180C18A000000000000FFFFFFFF0001000000000000000100000000000000010000000180EE8B000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001800189000000000000FFFFFFFF000100000000000000010000000000000001000000 + + + 898 + 1900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000000000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000000100000000000000000000000000000000010000000100000001801D800000000000000200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000000300000000000000000000000000000000010000000100000001801B80000000000000040000000000000000000000000000000001000000010000000180E57F0000000000000500000000000000000000000000000000010000000100000001801C800000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000000700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B000000000000080000000000000000000000000000000001000000010000000180F07F000000000000090000000000000000000000000000000001000000010000000180E8880000000000000A00000000000000000000000000000000010000000100000001803B010000000000000B0000000000000000000000000000000001000000010000000180BB8A0000000000000C0000000000000000000000000000000001000000010000000180D88B0000000000000D0000000000000000000000000000000001000000010000000180D28B0000000000000E000000000000000000000000000000000100000001000000018093070000000000000F0000000000000000000000000000000001000000010000000180658A000000000000100000000000000000000000000000000001000000010000000180C18A000000000000110000000000000000000000000000000001000000010000000180EE8B0000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180018900000000000013000000000000000000000000000000000100000001000000 + + + + 0 + 1680 + 1050 + + + + + + + + 1 + 0 + + 100 + 1 + + .\START_XC.a51 + 25 + 63 + 82 + 1 + + + + .\boot.c + 35 + 97 + 123 + 1 + + + + + +
diff --git a/CL2.0.uvgui.liuminVir b/CL2.0.uvgui.liuminVir new file mode 100644 index 0000000..fb83c37 --- /dev/null +++ b/CL2.0.uvgui.liuminVir @@ -0,0 +1,1914 @@ + + + + -6.1 + +
### uVision Project, (C) Keil Software
+ + + C:\Users\liuminVir\Desktop\20250115_IO閲囬泦 + + + + + + + 38003 + Registers + 140 133 + + + 346 + Code Coverage + 883 160 + + + 204 + Performance Analyzer + 1043 + + + + + + 35141 + Event Statistics + + 200 50 700 + + + 1506 + Symbols + + 79 79 79 + + + 1936 + Watch 1 + + 200 133 133 + + + 1937 + Watch 2 + + 200 133 133 + + + 1935 + Call Stack + Locals + + 200 133 133 + + + 2506 + Trace Data + + 75 135 130 95 70 230 200 150 + + + 466 + Source Browser + 500 + 166 + + + + + + + + 1 + 1 + 0 + 0 + -1 + + + + + + + 44 + 2 + 3 + + -1 + -1 + + + -1 + -1 + + + 25 + 852 + 1809 + 963 + + + + 0 + + 735 + 01000000040000000100000001000000010000000100000000000000020000000000000001000000010000000000000028000000280000000100000005000000030000000100000055433A5C55736572735C6C69756D696E5669725C4465736B746F705C322D3230323530333134BCC6CBE3BBFACEC2BFD8D0C2B0E6B1BE5C3230323530333134BCC6CBE3BBFACEC2BFD8D0C2B0E6B1BE5C557365722E630000000006557365722E6300000000C5D4F200FFFFFFFF55433A5C55736572735C6C69756D696E5669725C4465736B746F705C322D3230323530333134BCC6CBE3BBFACEC2BFD8D0C2B0E6B1BE5C3230323530333134BCC6CBE3BBFACEC2BFD8D0C2B0E6B1BE5C757365722E480000000006757365722E4800000000FFDC7800FFFFFFFF57433A5C55736572735C6C69756D696E5669725C4465736B746F705C322D3230323530333134BCC6CBE3BBFACEC2BFD8D0C2B0E6B1BE5C3230323530333134BCC6CBE3BBFACEC2BFD8D0C2B0E6B1BE5C436F6E6669672E480000000008436F6E6669672E4800000000BECEA100FFFFFFFF5C433A5C55736572735C6C69756D696E5669725C4465736B746F705C322D3230323530333134BCC6CBE3BBFACEC2BFD8D0C2B0E6B1BE5C3230323530333134BCC6CBE3BBFACEC2BFD8D0C2B0E6B1BE5C74656D70657261747572652E43000000000D74656D70657261747572652E4300000000F0A0A100FFFFFFFF55433A5C55736572735C6C69756D696E5669725C4465736B746F705C322D3230323530333134BCC6CBE3BBFACEC2BFD8D0C2B0E6B1BE5C3230323530333134BCC6CBE3BBFACEC2BFD8D0C2B0E6B1BE5C4D41494E2E4300000000064D41494E2E4300000000BCA8E100FFFFFFFF0100000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD5000100000000000000020000001F010000650000007A07000049030000 + + + + 0 + Build + + -1 + -1 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + DA0000004F000000F7040000C7000000 + + + 16 + 360400008600000053080000FE000000 + + + + 1005 + 1005 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000066000000180100001A030000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 109 + 109 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000066000000180100001A030000 + + + 16 + B7000000CD000000B5010000B0020000 + + + + 1465 + 1465 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000D3010000F40400002F020000 + + + 16 + B7000000CD0000003203000045010000 + + + + 1466 + 1466 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000D3010000F40400002F020000 + + + 16 + B7000000CD0000003203000045010000 + + + + 1467 + 1467 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000D3010000F40400002F020000 + + + 16 + B7000000CD0000003203000045010000 + + + + 1468 + 1468 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000D3010000F40400002F020000 + + + 16 + B7000000CD0000003203000045010000 + + + + 1506 + 1506 + 0 + 0 + 0 + 0 + 32767 + 0 + 16384 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 1913 + 1913 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + DD00000066000000F4040000AE000000 + + + 16 + B7000000CD0000003203000045010000 + + + + 1935 + 1935 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + 03000000D3010000F40400002F020000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 1936 + 1936 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000D3010000F40400002F020000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 1937 + 1937 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000D3010000F40400002F020000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 1939 + 1939 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000D3010000F40400002F020000 + + + 16 + B7000000CD0000003203000045010000 + + + + 1940 + 1940 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000D3010000F40400002F020000 + + + 16 + B7000000CD0000003203000045010000 + + + + 1941 + 1941 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000D3010000F40400002F020000 + + + 16 + B7000000CD0000003203000045010000 + + + + 1942 + 1942 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000D3010000F40400002F020000 + + + 16 + B7000000CD0000003203000045010000 + + + + 195 + 195 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000066000000180100001A030000 + + + 16 + B7000000CD000000B5010000B0020000 + + + + 196 + 196 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000066000000180100001A030000 + + + 16 + B7000000CD000000B5010000B0020000 + + + + 197 + 197 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + 00000000420300007A0700001D040000 + + + 16 + B7000000CD0000003203000045010000 + + + + 198 + 198 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + 00000000BC010000F704000048020000 + + + 16 + B7000000CD0000003203000045010000 + + + + 199 + 199 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + 000000005B030000AD03000036040000 + + + 16 + B7000000CD0000003203000045010000 + + + + 203 + 203 + 0 + 0 + 0 + 0 + 32767 + 0 + 8192 + 0 + + 16 + DD00000066000000F4040000AE000000 + + + 16 + B7000000CD0000003203000045010000 + + + + 204 + 204 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + DD00000066000000F4040000AE000000 + + + 16 + B7000000CD0000003203000045010000 + + + + 221 + 221 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 00000000000000000000000000000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 2506 + 2506 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 2507 + 2507 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000D3010000F40400002F020000 + + + 16 + B7000000CD0000003203000045010000 + + + + 343 + 343 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + DD00000066000000F4040000AE000000 + + + 16 + B7000000CD0000003203000045010000 + + + + 346 + 346 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + DD00000066000000F4040000AE000000 + + + 16 + B7000000CD0000003203000045010000 + + + + 35141 + 35141 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + DD00000066000000F4040000AE000000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 35824 + 35824 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + DD00000066000000F4040000AE000000 + + + 16 + B7000000CD0000003203000045010000 + + + + 35885 + 35885 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 35886 + 35886 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 35887 + 35887 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 35888 + 35888 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 35889 + 35889 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 35890 + 35890 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 35891 + 35891 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 35892 + 35892 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 35893 + 35893 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 35894 + 35894 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 35895 + 35895 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 35896 + 35896 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 35897 + 35897 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 35898 + 35898 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 35899 + 35899 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 35900 + 35900 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 35901 + 35901 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 35902 + 35902 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 35903 + 35903 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 35904 + 35904 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 35905 + 35905 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 38003 + 38003 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000066000000180100001A030000 + + + 16 + B7000000CD000000B5010000B0020000 + + + + 38007 + 38007 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + 000000005B030000AD03000036040000 + + + 16 + B7000000CD0000003203000045010000 + + + + 436 + 436 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + 030000005B020000770700001A030000 + + + 16 + B7000000CD000000B5010000B0020000 + + + + 437 + 437 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000D3010000F40400002F020000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 440 + 440 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000D3010000F40400002F020000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 463 + 463 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + 030000005B020000770700001A030000 + + + 16 + B7000000CD000000B5010000B0020000 + + + + 466 + 466 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + 030000005B020000770700001A030000 + + + 16 + B7000000CD000000B5010000B0020000 + + + + 470 + 470 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + DD00000066000000F4040000AE000000 + + + 16 + B7000000CD0000003203000045010000 + + + + 50000 + 50000 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 50001 + 50001 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 50002 + 50002 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 50003 + 50003 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 50004 + 50004 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 50005 + 50005 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 50006 + 50006 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 50007 + 50007 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 50008 + 50008 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 50009 + 50009 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 50010 + 50010 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 50011 + 50011 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 50012 + 50012 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 50013 + 50013 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 50014 + 50014 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 50015 + 50015 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 50016 + 50016 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 50017 + 50017 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 50018 + 50018 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 50019 + 50019 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 2404000066000000F4040000B3010000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 59392 + 59392 + 1 + 0 + 0 + 0 + 966 + 0 + 8192 + 0 + + 16 + 0000000000000000D10300001C000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 59393 + 0 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 00000000490300007A0700005C030000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 59399 + 59399 + 1 + 0 + 0 + 0 + 476 + 0 + 8192 + 1 + + 16 + 000000001C000000E701000038000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 59400 + 59400 + 0 + 0 + 0 + 0 + 612 + 0 + 8192 + 2 + + 16 + 00000000380000006F02000054000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 824 + 824 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000D3010000F40400002F020000 + + + 16 + B7000000CD0000008D01000078010000 + + + + 3325 + 000000000B000000000000000020000000000000FFFFFFFFFFFFFFFFDA000000C7000000F7040000CB000000000000000100000004000000010000000000000000000000FFFFFFFF08000000CB00000057010000CC000000F08B00005A01000079070000D601000045890000FFFF02000B004354616262656450616E650020000000000000360400008600000053080000FE000000DA0000004F000000F7040000C70000000000000040280046080000000B446973617373656D626C7900000000CB00000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A6572000000005701000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A657200000000CC00000001000000FFFFFFFFFFFFFFFF0E4C6F67696320416E616C797A657200000000F08B000001000000FFFFFFFFFFFFFFFF0D436F646520436F766572616765000000005A01000001000000FFFFFFFFFFFFFFFF11496E737472756374696F6E205472616365000000007907000001000000FFFFFFFFFFFFFFFF0F53797374656D20416E616C797A657200000000D601000001000000FFFFFFFFFFFFFFFF104576656E742053746174697374696373000000004589000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFCB00000001000000FFFFFFFFCB000000000000000040000000000000FFFFFFFFFFFFFFFF1D0400004F00000021040000CC010000000000000200000004000000010000000000000000000000FFFFFFFF2B000000E2050000CA0900002D8C00002E8C00002F8C0000308C0000318C0000328C0000338C0000348C0000358C0000368C0000378C0000388C0000398C00003A8C00003B8C00003C8C00003D8C00003E8C00003F8C0000408C0000418C000050C3000051C3000052C3000053C3000054C3000055C3000056C3000057C3000058C3000059C300005AC300005BC300005CC300005DC300005EC300005FC3000060C3000061C3000062C3000063C30000018000400000000000007D070000860000005308000003020000210400004F000000F7040000CC01000000000000404100462B0000000753796D626F6C7300000000E205000001000000FFFFFFFFFFFFFFFF0A5472616365204461746100000000CA09000001000000FFFFFFFFFFFFFFFF00000000002D8C000001000000FFFFFFFFFFFFFFFF00000000002E8C000001000000FFFFFFFFFFFFFFFF00000000002F8C000001000000FFFFFFFFFFFFFFFF0000000000308C000001000000FFFFFFFFFFFFFFFF0000000000318C000001000000FFFFFFFFFFFFFFFF0000000000328C000001000000FFFFFFFFFFFFFFFF0000000000338C000001000000FFFFFFFFFFFFFFFF0000000000348C000001000000FFFFFFFFFFFFFFFF0000000000358C000001000000FFFFFFFFFFFFFFFF0000000000368C000001000000FFFFFFFFFFFFFFFF0000000000378C000001000000FFFFFFFFFFFFFFFF0000000000388C000001000000FFFFFFFFFFFFFFFF0000000000398C000001000000FFFFFFFFFFFFFFFF00000000003A8C000001000000FFFFFFFFFFFFFFFF00000000003B8C000001000000FFFFFFFFFFFFFFFF00000000003C8C000001000000FFFFFFFFFFFFFFFF00000000003D8C000001000000FFFFFFFFFFFFFFFF00000000003E8C000001000000FFFFFFFFFFFFFFFF00000000003F8C000001000000FFFFFFFFFFFFFFFF0000000000408C000001000000FFFFFFFFFFFFFFFF0000000000418C000001000000FFFFFFFFFFFFFFFF000000000050C3000001000000FFFFFFFFFFFFFFFF000000000051C3000001000000FFFFFFFFFFFFFFFF000000000052C3000001000000FFFFFFFFFFFFFFFF000000000053C3000001000000FFFFFFFFFFFFFFFF000000000054C3000001000000FFFFFFFFFFFFFFFF000000000055C3000001000000FFFFFFFFFFFFFFFF000000000056C3000001000000FFFFFFFFFFFFFFFF000000000057C3000001000000FFFFFFFFFFFFFFFF000000000058C3000001000000FFFFFFFFFFFFFFFF000000000059C3000001000000FFFFFFFFFFFFFFFF00000000005AC3000001000000FFFFFFFFFFFFFFFF00000000005BC3000001000000FFFFFFFFFFFFFFFF00000000005CC3000001000000FFFFFFFFFFFFFFFF00000000005DC3000001000000FFFFFFFFFFFFFFFF00000000005EC3000001000000FFFFFFFFFFFFFFFF00000000005FC3000001000000FFFFFFFFFFFFFFFF000000000060C3000001000000FFFFFFFFFFFFFFFF000000000061C3000001000000FFFFFFFFFFFFFFFF000000000062C3000001000000FFFFFFFFFFFFFFFF000000000063C3000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFE205000001000000FFFFFFFFE2050000000000000010000001000000FFFFFFFFFFFFFFFF1B0100004F0000001F0100003303000001000000020000100400000001000000D6FEFFFF45060000FFFFFFFF05000000ED0300006D000000C3000000C400000073940000018000100000010000005C03000086000000770400006A030000000000004F0000001B010000330300000000000040410056050000000750726F6A65637401000000ED03000001000000FFFFFFFFFFFFFFFF05426F6F6B73010000006D00000001000000FFFFFFFFFFFFFFFF0946756E6374696F6E7301000000C300000001000000FFFFFFFFFFFFFFFF0954656D706C6174657301000000C400000001000000FFFFFFFFFFFFFFFF09526567697374657273000000007394000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFFED03000001000000FFFFFFFFED030000000000000080000000000000FFFFFFFFFFFFFFFF00000000B8010000F7040000BC01000000000000010000000400000001000000000000000000000000000000000000000000000001000000C6000000FFFFFFFF0F0000008F070000930700009407000095070000960700009007000091070000B5010000B801000038030000B9050000BA050000BB050000BC050000CB090000018000800000000000005C030000F3010000530800007F02000000000000BC010000F70400004802000000000000404100460F0000001343616C6C20537461636B202B204C6F63616C73000000008F07000001000000FFFFFFFFFFFFFFFF0755415254202331000000009307000001000000FFFFFFFFFFFFFFFF0755415254202332000000009407000001000000FFFFFFFFFFFFFFFF0755415254202333000000009507000001000000FFFFFFFFFFFFFFFF15446562756720287072696E74662920566965776572000000009607000001000000FFFFFFFFFFFFFFFF0757617463682031000000009007000001000000FFFFFFFFFFFFFFFF0757617463682032000000009107000001000000FFFFFFFFFFFFFFFF10547261636520457863657074696F6E7300000000B501000001000000FFFFFFFFFFFFFFFF0E4576656E7420436F756E7465727300000000B801000001000000FFFFFFFFFFFFFFFF09554C494E4B706C7573000000003803000001000000FFFFFFFFFFFFFFFF084D656D6F7279203100000000B905000001000000FFFFFFFFFFFFFFFF084D656D6F7279203200000000BA05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203300000000BB05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203400000000BC05000001000000FFFFFFFFFFFFFFFF105472616365204E617669676174696F6E00000000CB09000001000000FFFFFFFFFFFFFFFFFFFFFFFF0000000001000000000000000000000001000000FFFFFFFF7C020000BC010000800200004802000000000000020000000400000000000000000000000000000000000000000000000000000002000000C6000000FFFFFFFF8F07000001000000FFFFFFFF8F07000001000000C6000000000000000080000000000000FFFFFFFFFFFFFFFF00000000400200007A070000440200000000000001000000040000000100000089FDFFFF76000000FFFFFFFF03000000B4010000D2010000CF010000018000800000000000005C0300007B020000D60A00006A03000000000000440200007A070000330300000000000040820046030000000A4572726F72204C69737400000000B401000001000000FFFFFFFFFFFFFFFF0E536F757263652042726F7773657200000000D201000001000000FFFFFFFFFFFFFFFF0E416C6C205265666572656E63657300000000CF01000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFB401000001000000FFFFFFFFB40100000000000003000000C700000000800000010000000000000071030000AD0300004C040000010000000100000001000000C5000000008000000100000000000000580300007A070000330400000100000001000000010000007794000000800000010000000000000071030000AD0300004C04000001000000010000000100000000000000 + + + 59392 + File + + 2856 + 00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000040004000000000000000000000000000000000100000001000000018022E100000000040005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000000000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000000000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000400460000000000000000000000000000000001000000010000000180FE880000000004004500000000000000000000000000000000010000000100000001800B810000000004001300000000000000000000000000000000010000000100000001800C810000000004001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE803000000000000000000000000000000000000000000000001000000010000009600000002002050000000001C556E496E6643616E5F312E417272446174612E4172725B305D5B345D960000000000000014001C556E496E6643616E5F312E417272446174612E4172725B305D5B345D1C556E496E6643616E5F312E417272446174612E4172725B305D5B355D0743616E52585458056954656D70064D41584E554D0C4F575F52656164324269747306526F6D4E756D16556E496E6643616E5F312E417272446174612E4172720450335F350A556E496E6643616E5F310450315F3204736269740450305F320753774F757431340F496E697443616E5472616E736D69740650315F4449520650335F44495204CAFDBEDD0864664F75745F31300568646174610000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018024E10000000000001100000000000000000000000000000000010000000100000001800A810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E2280000002000000150000002153746172742F53746F70202644656275672053657373696F6E094374726C2B46350000000000000000000000000100000001000000000000000000000001000000020021802280000000000000150000002153746172742F53746F70202644656275672053657373696F6E094374726C2B4635000000000000000000000000010000000100000000000000000000000100000000002180E0010000000000007500000021456E65726779204D6561737572656D656E742026776974686F75742044656275670000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000002180C8880000000000001700000027264B696C6C20416C6C20427265616B706F696E747320696E2043757272656E7420546172676574000000000000000000000000010000000100000000000000000000000100000003002180C8880000000000001700000027264B696C6C20416C6C20427265616B706F696E747320696E2043757272656E7420546172676574000000000000000000000000010000000100000000000000000000000100000000002180E50100000000000078000000264B696C6C20416C6C20427265616B706F696E747320696E204163746976652050726F6A656374000000000000000000000000010000000100000000000000000000000100000000002180E601000000000000790000002F4B696C6C20416C6C20427265616B706F696E747320696E204D756C74692D50726F6A65637420576F726B73706163650000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000021804C010000020001001A0000000F2650726F6A6563742057696E646F77000000000000000000000000010000000100000000000000000000000100000008002180DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002180DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002180E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002180E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000218018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000021800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002180D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002180E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C65C6030000 + + + 1423 + 2800FFFF01001100434D4643546F6F6C426172427574746F6E00E1000000000000FFFFFFFF000100000000000000010000000000000001000000018001E1000000000000FFFFFFFF000100000000000000010000000000000001000000018003E1000000000000FFFFFFFF0001000000000000000100000000000000010000000180CD7F000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF000000000000000000010000000000000001000000018023E1000000000000FFFFFFFF000100000000000000010000000000000001000000018022E1000000000000FFFFFFFF000100000000000000010000000000000001000000018025E1000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001802BE1000000000000FFFFFFFF00010000000000000001000000000000000100000001802CE1000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001807A8A000000000000FFFFFFFF00010000000000000001000000000000000100000001807B8A000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180D3B0000000000000FFFFFFFF000100000000000000010000000000000001000000018015B1000000000000FFFFFFFF0001000000000000000100000000000000010000000180F4B0000000000000FFFFFFFF000100000000000000010000000000000001000000018036B1000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180FF88000000000000FFFFFFFF0001000000000000000100000000000000010000000180FE88000000000000FFFFFFFF00010000000000000001000000000000000100000001800B81000000000000FFFFFFFF00010000000000000001000000000000000100000001800C81000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180F088000000000000FFFFFFFF0001000000000000000100000000000000010000000180EE7F000000000000FFFFFFFF000100000000000000010000000000000001000000018024E1000000000000FFFFFFFF00010000000000000001000000000000000100000001800A81000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001802280000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180C488000000000000FFFFFFFF0001000000000000000100000000000000010000000180C988000000000000FFFFFFFF0001000000000000000100000000000000010000000180C788000000000000FFFFFFFF0001000000000000000100000000000000010000000180C888000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180DD88000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180FB7F000000000000FFFFFFFF000100000000000000010000000000000001000000 + + + 1423 + 2800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000000004000000000000000000000000000000000100000001000000018022E100000000000005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000000000700000000000000000000000000000000010000000100000001802CE10000000000000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000000000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000000000C0000000000000000000000000000000001000000010000000180F4B00000000000000D000000000000000000000000000000000100000001000000018036B10000000000000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF880000000000000F0000000000000000000000000000000001000000010000000180FE880000000000001000000000000000000000000000000000010000000100000001800B810000000000001100000000000000000000000000000000010000000100000001800C810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F088000000000000130000000000000000000000000000000001000000010000000180EE7F00000000000014000000000000000000000000000000000100000001000000018024E10000000000001500000000000000000000000000000000010000000100000001800A810000000000001600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018022800000000000001700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000180000000000000000000000000000000001000000010000000180C988000000000000190000000000000000000000000000000001000000010000000180C7880000000000001A0000000000000000000000000000000001000000010000000180C8880000000000001B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180DD880000000000001C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001D000000000000000000000000000000000100000001000000 + + + + 59399 + Build + + 976 + 00200000010000001000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F0000000000001C0000000000000000000000000000000001000000010000000180D07F0000000000001D000000000000000000000000000000000100000001000000018030800000000000001E000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6EC7040000000000006A0000000C4261746368204275696C2664000000000000000000000000010000000100000000000000000000000100000004000580C7040000000000006A0000000C4261746368204275696C266400000000000000000000000001000000010000000000000000000000010000000000058046070000000000006B0000000D42617463682052656275696C640000000000000000000000000100000001000000000000000000000001000000000005804707000000000000FFFFFFFF0B426174636820436C65616E0100000000000000000000000100000001000000000000000000000001000000000005809E8A0000000000001F0000000F4261746326682053657475702E2E2E000000000000000000000000010000000100000000000000000000000100000000000180D17F0000000004002000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000002100000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6EBA000000000000000000000000000000000000000000000000010000000100000096000000030020500000000008546172676574203196000000000000000100085461726765742031000000000180EB880000000000002200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000230000000000000000000000000000000001000000010000000180B08A000000000400240000000000000000000000000000000001000000010000000180A8010000000004004E00000000000000000000000000000000010000000100000001807202000000000400530000000000000000000000000000000001000000010000000180BE010000000004005000000000000000000000000000000000010000000100000000000000054275696C64DC010000 + + + 583 + 1000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F000000000000FFFFFFFF0001000000000000000100000000000000010000000180D07F000000000000FFFFFFFF00010000000000000001000000000000000100000001803080000000000000FFFFFFFF00010000000000000001000000000000000100000001809E8A000000000000FFFFFFFF0001000000000000000100000000000000010000000180D17F000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001804C8A000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001806680000000000000FFFFFFFF0001000000000000000100000000000000010000000180EB88000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180C07F000000000000FFFFFFFF0001000000000000000100000000000000010000000180B08A000000000000FFFFFFFF0001000000000000000100000000000000010000000180A801000000000000FFFFFFFF00010000000000000001000000000000000100000001807202000000000000FFFFFFFF0001000000000000000100000000000000010000000180BE01000000000000FFFFFFFF000100000000000000010000000000000001000000 + + + 583 + 1000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F000000000000000000000000000000000000000000000001000000010000000180D07F00000000000001000000000000000000000000000000000100000001000000018030800000000000000200000000000000000000000000000000010000000100000001809E8A000000000000030000000000000000000000000000000001000000010000000180D17F0000000000000400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000000500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001806680000000000000060000000000000000000000000000000001000000010000000180EB880000000000000700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000080000000000000000000000000000000001000000010000000180B08A000000000000090000000000000000000000000000000001000000010000000180A8010000000000000A000000000000000000000000000000000100000001000000018072020000000000000B0000000000000000000000000000000001000000010000000180BE010000000000000C000000000000000000000000000000000100000001000000 + + + + 59400 + Debug + + 2373 + 00200000000000001900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000002500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000002600000000000000000000000000000000010000000100000001801D800000000000002700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000002800000000000000000000000000000000010000000100000001801B80000000000000290000000000000000000000000000000001000000010000000180E57F0000000000002A00000000000000000000000000000000010000000100000001801C800000000000002B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000002C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B0000000000002D0000000000000000000000000000000001000000010000000180F07F0000000000002E0000000000000000000000000000000001000000010000000180E8880000000000003700000000000000000000000000000000010000000100000001803B010000000000002F0000000000000000000000000000000001000000010000000180BB8A00000000000030000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E0E01000000000000310000000D57617463682057696E646F7773000000000000000000000000010000000100000000000000000000000100000003001380D88B00000000000031000000085761746368202631000000000000000000000000010000000100000000000000000000000100000000001380D98B00000000000031000000085761746368202632000000000000000000000000010000000100000000000000000000000100000000001380CE01000000000000FFFFFFFF0C576174636820416E63686F720000000000000000010000000000000001000000000000000000000001000000000013800F01000000000000320000000E4D656D6F72792057696E646F7773000000000000000000000000010000000100000000000000000000000100000004001380D28B00000000000032000000094D656D6F7279202631000000000000000000000000010000000100000000000000000000000100000000001380D38B00000000000032000000094D656D6F7279202632000000000000000000000000010000000100000000000000000000000100000000001380D48B00000000000032000000094D656D6F7279202633000000000000000000000000010000000100000000000000000000000100000000001380D58B00000000000032000000094D656D6F72792026340000000000000000000000000100000001000000000000000000000001000000000013801001000000000000330000000E53657269616C2057696E646F77730000000000000000000000000100000001000000000000000000000001000000040013809307000000000000330000000855415254202326310000000000000000000000000100000001000000000000000000000001000000000013809407000000000000330000000855415254202326320000000000000000000000000100000001000000000000000000000001000000000013809507000000000000330000000855415254202326330000000000000000000000000100000001000000000000000000000001000000000013809607000000000000330000001626446562756720287072696E746629205669657765720000000000000000000000000100000001000000000000000000000001000000000013803C010000000000003400000010416E616C797369732057696E646F7773000000000000000000000000010000000100000000000000000000000100000004001380658A000000000000340000000F264C6F67696320416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380DC7F0000000000003E0000001526506572666F726D616E636520416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380E788000000000000380000000E26436F646520436F766572616765000000000000000000000000010000000100000000000000000000000100000000001380CD01000000000000FFFFFFFF0F416E616C7973697320416E63686F7200000000000000000100000000000000010000000000000000000000010000000000138053010000000000003F0000000D54726163652057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013805401000000000000FFFFFFFF115472616365204D656E7520416E63686F720000000000000000010000000000000001000000000000000000000001000000000013802901000000000000350000001553797374656D205669657765722057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013804B01000000000000FFFFFFFF1453797374656D2056696577657220416E63686F720000000000000000010000000000000001000000000000000000000001000000000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000013800189000000000000360000000F26546F6F6C626F782057696E646F7700000000000000000000000001000000010000000000000000000000010000000300138044C5000000000000FFFFFFFF0E5570646174652057696E646F77730000000000000000010000000000000001000000000000000000000001000000000013800000000000000400FFFFFFFF000000000000000000010000000000000001000000000000000000000001000000000013805B01000000000000FFFFFFFF12546F6F6C626F78204D656E75416E63686F72000000000000000001000000000000000100000000000000000000000100000000000000000005446562756764020000 + + + 898 + 1900FFFF01001100434D4643546F6F6C426172427574746F6ECC88000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001801780000000000000FFFFFFFF00010000000000000001000000000000000100000001801D80000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001801A80000000000000FFFFFFFF00010000000000000001000000000000000100000001801B80000000000000FFFFFFFF0001000000000000000100000000000000010000000180E57F000000000000FFFFFFFF00010000000000000001000000000000000100000001801C80000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001800089000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180E48B000000000000FFFFFFFF0001000000000000000100000000000000010000000180F07F000000000000FFFFFFFF0001000000000000000100000000000000010000000180E888000000000000FFFFFFFF00010000000000000001000000000000000100000001803B01000000000000FFFFFFFF0001000000000000000100000000000000010000000180BB8A000000000000FFFFFFFF0001000000000000000100000000000000010000000180D88B000000000000FFFFFFFF0001000000000000000100000000000000010000000180D28B000000000000FFFFFFFF00010000000000000001000000000000000100000001809307000000000000FFFFFFFF0001000000000000000100000000000000010000000180658A000000000000FFFFFFFF0001000000000000000100000000000000010000000180C18A000000000000FFFFFFFF0001000000000000000100000000000000010000000180EE8B000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001800189000000000000FFFFFFFF000100000000000000010000000000000001000000 + + + 898 + 1900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000000000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000000100000000000000000000000000000000010000000100000001801D800000000000000200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000000300000000000000000000000000000000010000000100000001801B80000000000000040000000000000000000000000000000001000000010000000180E57F0000000000000500000000000000000000000000000000010000000100000001801C800000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000000700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B000000000000080000000000000000000000000000000001000000010000000180F07F000000000000090000000000000000000000000000000001000000010000000180E8880000000000000A00000000000000000000000000000000010000000100000001803B010000000000000B0000000000000000000000000000000001000000010000000180BB8A0000000000000C0000000000000000000000000000000001000000010000000180D88B0000000000000D0000000000000000000000000000000001000000010000000180D28B0000000000000E000000000000000000000000000000000100000001000000018093070000000000000F0000000000000000000000000000000001000000010000000180658A000000000000100000000000000000000000000000000001000000010000000180C18A000000000000110000000000000000000000000000000001000000010000000180EE8B0000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180018900000000000013000000000000000000000000000000000100000001000000 + + + + 0 + 1914 + 922 + + + + + + 1 + 0 + + 100 + 3 + + .\User.c + 11 + 424 + 454 + 1 + + 0 + + + user.H + 28 + 64 + 70 + 1 + + 0 + + + Config.H + 0 + 120 + 163 + 1 + + 0 + + + .\temperature.C + 38 + 481 + 497 + 1 + + 0 + + + .\MAIN.C + 14 + 147 + 157 + 1 + + 0 + + + + +
diff --git a/CL2.0.uvgui_Administrator.bak b/CL2.0.uvgui_Administrator.bak new file mode 100644 index 0000000..f5b622a --- /dev/null +++ b/CL2.0.uvgui_Administrator.bak @@ -0,0 +1,2488 @@ + + + + -3.1 + +
### uVision Project, (C) Keil Software
+ + + + + + 38003 + Registers + 115 98 + + + 346 + Code Coverage + 900 160 + + + 204 + Performance Analyzer + 1060 + + + + + + 1506 + Symbols + + 133 133 133 + + + 1936 + Watch 1 + + 133 133 133 + + + 1937 + Watch 2 + + 133 133 133 + + + 1935 + Call Stack + Locals + + 133 133 133 + + + 2506 + Trace Data + + 75 135 130 95 70 230 200 + + + + + + 0 + 0 + 0 + + + + + + + 44 + 2 + 3 + + -1 + -1 + + + -1 + -1 + + + 418 + 586 + 1846 + 1165 + + + + 0 + + 381 + 01000000040000000100000001000000010000000100000000000000020000000000000001000000010000000000000028000000280000000100000002000000010000000100000050433A5C446F63756D656E747320616E642053657474696E67735C41646D696E6973747261746F725CD7C0C3E65CB3CCD0F232303133303731325C32D3A6D3C3B3CCD0F25C53544152545F58432E613531000000000C53544152545F58432E61353100000000C5D4F200FFFFFFFF4A433A5C446F63756D656E747320616E642053657474696E67735C41646D696E6973747261746F725CD7C0C3E65CB3CCD0F232303133303731325C32D3A6D3C3B3CCD0F25C626F6F742E630000000007626F6F742E632A00000000FFDC7800FFFFFFFF0100000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD500010000000000000002000000E300000069000000900600005A030000 + + + + 0 + Build + + -1 + -1 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + B60000004F000000E4040000DC000000 + + + 16 + 28010000FE000000560500008B010000 + + + + 1005 + 1005 + 1 + 0 + 0 + 1 + 32767 + 0 + 4096 + 0 + + 16 + 0300000067000000DC00000027030000 + + + 16 + 1A0000003B000000CC00000072020000 + + + + 109 + 109 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000067000000DC00000027030000 + + + 16 + 1A0000003B000000CC00000072020000 + + + + 1465 + 1465 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000029020000E10400009A020000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 1466 + 1466 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000029020000E10400009A020000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 1467 + 1467 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000029020000E10400009A020000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 1468 + 1468 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000029020000E10400009A020000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 1506 + 1506 + 0 + 0 + 0 + 0 + 32767 + 0 + 16384 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 1913 + 1913 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + B900000067000000E1040000C3000000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 1935 + 1935 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + 0300000029020000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 1936 + 1936 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000029020000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 1937 + 1937 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000029020000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 1939 + 1939 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000029020000E10400009A020000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 1940 + 1940 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000029020000E10400009A020000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 1941 + 1941 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000029020000E10400009A020000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 1942 + 1942 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000029020000E10400009A020000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 195 + 195 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000067000000DC00000027030000 + + + 16 + 1A0000003B000000CC00000072020000 + + + + 196 + 196 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000067000000DC00000027030000 + + + 16 + 1A0000003B000000CC00000072020000 + + + + 197 + 197 + 1 + 0 + 0 + 1 + 32767 + 0 + 32768 + 0 + + 16 + 030000005C0300008D060000B8030000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 198 + 198 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + 0000000011020000E4040000B3020000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 199 + 199 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 030000005C0300008D060000B8030000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 203 + 203 + 0 + 0 + 0 + 0 + 32767 + 0 + 8192 + 0 + + 16 + B900000067000000E1040000C3000000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 204 + 204 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + B900000067000000E1040000C3000000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 221 + 221 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 00000000000000000000000000000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 2506 + 2506 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 540300004F000000E404000022020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 2507 + 2507 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 540300004F000000E404000022020000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 343 + 343 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + B900000067000000E1040000C3000000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 346 + 346 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + B900000067000000E1040000C3000000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 35824 + 35824 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + B900000067000000E1040000C3000000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 35885 + 35885 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35886 + 35886 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35887 + 35887 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35888 + 35888 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35889 + 35889 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35890 + 35890 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35891 + 35891 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35892 + 35892 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35893 + 35893 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35894 + 35894 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35895 + 35895 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35896 + 35896 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35897 + 35897 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35898 + 35898 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35899 + 35899 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35900 + 35900 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35901 + 35901 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35902 + 35902 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35903 + 35903 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35904 + 35904 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 35905 + 35905 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 1A0000003B000000AA010000CB010000 + + + + 38003 + 38003 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000067000000DC00000027030000 + + + 16 + 1A0000003B000000CC00000072020000 + + + + 38007 + 38007 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 030000005C0300008D060000B8030000 + + + 16 + 1A0000003B0000008C020000C8000000 + + + + 59392 + 59392 + 1 + 0 + 0 + 0 + 940 + 0 + 8192 + 0 + + 16 + 0000000000000000B70300001C000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 59393 + 0 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 00000000D103000090060000E2030000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 59399 + 59399 + 1 + 0 + 0 + 0 + 391 + 0 + 8192 + 1 + + 16 + 000000001C0000009201000038000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 59400 + 59400 + 0 + 0 + 0 + 0 + 612 + 0 + 8192 + 2 + + 16 + 00000000380000006F02000054000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 2604 + 000000000D000000000000000020000000000000FFFFFFFFFFFFFFFFB6000000DC000000E4040000E0000000000000000100000004000000010000000000000000000000FFFFFFFF06000000CB00000057010000CC000000F08B00005A01000079070000FFFF02000B004354616262656450616E65002000000000000028010000FE000000560500008B010000B60000004F000000E4040000DC0000000000000040280046060000000B446973617373656D626C7900000000CB00000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A6572000000005701000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A657200000000CC00000001000000FFFFFFFFFFFFFFFF0E4C6F67696320416E616C797A657200000000F08B000001000000FFFFFFFFFFFFFFFF0D436F646520436F766572616765000000005A01000001000000FFFFFFFFFFFFFFFF11496E737472756374696F6E205472616365000000007907000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFCB00000001000000FFFFFFFFCB000000000000000040000000000000FFFFFFFFFFFFFFFF500300004F00000054030000B302000000000000020000000400000001000000000000000000000000000000000000000000000001000000FFFFFFFF16000000E20500002D8C00002E8C00002F8C0000308C0000318C0000328C0000338C0000348C0000358C0000368C0000378C0000388C0000398C00003A8C00003B8C00003C8C00003D8C00003E8C00003F8C0000408C0000418C000001800040000000000000C6030000FE0000005605000062030000540300004F000000E4040000B30200000000000040410046160000000753796D626F6C7300000000E205000001000000FFFFFFFFFFFFFFFF00000000002D8C000001000000FFFFFFFFFFFFFFFF00000000002E8C000001000000FFFFFFFFFFFFFFFF00000000002F8C000001000000FFFFFFFFFFFFFFFF0000000000308C000001000000FFFFFFFFFFFFFFFF0000000000318C000001000000FFFFFFFFFFFFFFFF0000000000328C000001000000FFFFFFFFFFFFFFFF0000000000338C000001000000FFFFFFFFFFFFFFFF0000000000348C000001000000FFFFFFFFFFFFFFFF0000000000358C000001000000FFFFFFFFFFFFFFFF0000000000368C000001000000FFFFFFFFFFFFFFFF0000000000378C000001000000FFFFFFFFFFFFFFFF0000000000388C000001000000FFFFFFFFFFFFFFFF0000000000398C000001000000FFFFFFFFFFFFFFFF00000000003A8C000001000000FFFFFFFFFFFFFFFF00000000003B8C000001000000FFFFFFFFFFFFFFFF00000000003C8C000001000000FFFFFFFFFFFFFFFF00000000003D8C000001000000FFFFFFFFFFFFFFFF00000000003E8C000001000000FFFFFFFFFFFFFFFF00000000003F8C000001000000FFFFFFFFFFFFFFFF0000000000408C000001000000FFFFFFFFFFFFFFFF0000000000418C000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000001000000000000000000000001000000FFFFFFFF00000000C400000090010000C80000000000000001000000040000000000000000000000000000000000000001000000CA090000CB09000002000000000000000000000002000000FFFFFFFF540300003A010000E40400003E01000000000000010000000400000000000000000000000000000000000000000000000000000003000000FFFFFFFFE2050000CA090000CB09000001000000CB09000001000000CA09000001000000FFFFFFFFE2050000000000000010000001000000FFFFFFFFFFFFFFFFDF0000004F000000E3000000400300000100000002000010040000000100000014FFFFFF99050000FFFFFFFF05000000ED0300006D000000C3000000C4000000739400000180001000000100000072000000FE00000051010000EF030000000000004F000000DF000000400300000000000040140056050000000750726F6A65637401000000ED03000001000000FFFFFFFFFFFFFFFF05426F6F6B73010000006D00000001000000FFFFFFFFFFFFFFFF0946756E6374696F6E7301000000C300000001000000FFFFFFFFFFFFFFFF0954656D706C6174657301000000C400000001000000FFFFFFFFFFFFFFFF09526567697374657273000000007394000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFFED03000001000000FFFFFFFFED030000000000000080000000000000FFFFFFFFFFFFFFFF000000000D020000E40400001102000000000000010000000400000001000000000000000000000000000000000000000000000001000000C6000000FFFFFFFF0B0000008F070000930700009407000095070000960700009007000091070000B9050000BA050000BB050000BC0500000180008000000000000072000000C002000056050000620300000000000011020000E4040000B302000000000000404100460B0000001343616C6C20537461636B202B204C6F63616C73000000008F07000001000000FFFFFFFFFFFFFFFF0755415254202331000000009307000001000000FFFFFFFFFFFFFFFF0755415254202332000000009407000001000000FFFFFFFFFFFFFFFF0755415254202333000000009507000001000000FFFFFFFFFFFFFFFF15446562756720287072696E74662920566965776572000000009607000001000000FFFFFFFFFFFFFFFF0757617463682031000000009007000001000000FFFFFFFFFFFFFFFF0757617463682032000000009107000001000000FFFFFFFFFFFFFFFF084D656D6F7279203100000000B905000001000000FFFFFFFFFFFFFFFF084D656D6F7279203200000000BA05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203300000000BB05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203400000000BC05000001000000FFFFFFFFFFFFFFFFFFFFFFFF0000000003000000000000000000000003000000FFFFFFFF720200001102000076020000B302000000000000020000000400000000000000000000000000000000000000000000000000000002000000C6000000FFFFFFFF8F07000001000000FFFFFFFF8F07000001000000C6000000000000000080000001000000FFFFFFFFFFFFFFFF00000000400300009006000044030000010000000100001004000000010000000000000000000000FFFFFFFF03000000C5000000C7000000779400000180008000000100000072000000F30300000207000080040000000000004403000090060000D10300000000000040820056030000000C4275696C64204F757470757401000000C500000001000000FFFFFFFFFFFFFFFF0D46696E6420496E2046696C657301000000C700000001000000FFFFFFFFFFFFFFFF0742726F77736572000000007794000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFFC500000001000000FFFFFFFFC5000000000000000000000000000000 + + + 59392 + File + + 2308 + 00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000040004000000000000000000000000000000000100000001000000018022E100000000040005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000000000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000004000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000400460000000000000000000000000000000001000000010000000180FE880000000004004500000000000000000000000000000000010000000100000001800B810000000004001300000000000000000000000000000000010000000100000001800C810000000004001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE803000000000000000000000000000000000000000000000001000000010000009600000002002050000000001242595445535F5045525F574F52444C494E45960000000000000014000F6175624649464F52656164507472300E6175624649464F52656164507472054E4D495352064D534756414C0C7265736574204D534756414C1043414E5F776169745472616E736D69740D43414E5F765472616E736D69740430784246012A0F44465F426F6F7452784D53474F424A05535441434B0676656373656707737461727475700A466C674F6E6554696D65085553455F42414E4B0252300341523017574F52444C494E455F4255464645525F4144445245535305574C4275661242595445535F5045525F574F52444C494E450000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018024E10000000000001100000000000000000000000000000000010000000100000001800A810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018022800000020000001500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000000180C8880000000000001700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E4C010000020001001A0000000F50726F6A6563742057696E646F7773000000000000000000000000010000000100000000000000000000000100000008002880DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002880DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002880E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002880E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000288018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000028800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002880D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002880E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C65AC030000 + + + 1423 + 2800FFFF01001100434D4643546F6F6C426172427574746F6E00E1000000000000FFFFFFFF000100000000000000010000000000000001000000018001E1000000000000FFFFFFFF000100000000000000010000000000000001000000018003E1000000000000FFFFFFFF0001000000000000000100000000000000010000000180CD7F000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF000000000000000000010000000000000001000000018023E1000000000000FFFFFFFF000100000000000000010000000000000001000000018022E1000000000000FFFFFFFF000100000000000000010000000000000001000000018025E1000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001802BE1000000000000FFFFFFFF00010000000000000001000000000000000100000001802CE1000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001807A8A000000000000FFFFFFFF00010000000000000001000000000000000100000001807B8A000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180D3B0000000000000FFFFFFFF000100000000000000010000000000000001000000018015B1000000000000FFFFFFFF0001000000000000000100000000000000010000000180F4B0000000000000FFFFFFFF000100000000000000010000000000000001000000018036B1000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180FF88000000000000FFFFFFFF0001000000000000000100000000000000010000000180FE88000000000000FFFFFFFF00010000000000000001000000000000000100000001800B81000000000000FFFFFFFF00010000000000000001000000000000000100000001800C81000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180F088000000000000FFFFFFFF0001000000000000000100000000000000010000000180EE7F000000000000FFFFFFFF000100000000000000010000000000000001000000018024E1000000000000FFFFFFFF00010000000000000001000000000000000100000001800A81000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001802280000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180C488000000000000FFFFFFFF0001000000000000000100000000000000010000000180C988000000000000FFFFFFFF0001000000000000000100000000000000010000000180C788000000000000FFFFFFFF0001000000000000000100000000000000010000000180C888000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180DD88000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180FB7F000000000000FFFFFFFF000100000000000000010000000000000001000000 + + + 1423 + 2800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000000004000000000000000000000000000000000100000001000000018022E100000000000005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000000000700000000000000000000000000000000010000000100000001802CE10000000000000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000000000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000000000C0000000000000000000000000000000001000000010000000180F4B00000000000000D000000000000000000000000000000000100000001000000018036B10000000000000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF880000000000000F0000000000000000000000000000000001000000010000000180FE880000000000001000000000000000000000000000000000010000000100000001800B810000000000001100000000000000000000000000000000010000000100000001800C810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F088000000000000130000000000000000000000000000000001000000010000000180EE7F00000000000014000000000000000000000000000000000100000001000000018024E10000000000001500000000000000000000000000000000010000000100000001800A810000000000001600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018022800000000000001700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000180000000000000000000000000000000001000000010000000180C988000000000000190000000000000000000000000000000001000000010000000180C7880000000000001A0000000000000000000000000000000001000000010000000180C8880000000000001B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180DD880000000000001C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001D000000000000000000000000000000000100000001000000 + + + + 59399 + Build + + 573 + 00200000010000000D00FFFF01001100434D4643546F6F6C426172427574746F6ECF7F0000000000001C0000000000000000000000000000000001000000010000000180D07F0000000000001D000000000000000000000000000000000100000001000000018030800000000000001E00000000000000000000000000000000010000000100000001809E8A0000000004001F0000000000000000000000000000000001000000010000000180D17F0000000004002000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000002100000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6EBA000000000000000000000000000000000000000000000000010000000100000096000000030020500000000008546172676574203196000000000000000100085461726765742031000000000180EB880000000000002200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000230000000000000000000000000000000001000000010000000180B08A0000000004002400000000000000000000000000000000010000000100000000000000054275696C6487010000 + + + 478 + 0D00FFFF01001100434D4643546F6F6C426172427574746F6ECF7F000000000000FFFFFFFF0001000000000000000100000000000000010000000180D07F000000000000FFFFFFFF00010000000000000001000000000000000100000001803080000000000000FFFFFFFF00010000000000000001000000000000000100000001809E8A000000000000FFFFFFFF0001000000000000000100000000000000010000000180D17F000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001804C8A000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001806680000000000000FFFFFFFF0001000000000000000100000000000000010000000180EB88000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180C07F000000000000FFFFFFFF0001000000000000000100000000000000010000000180B08A000000000000FFFFFFFF000100000000000000010000000000000001000000 + + + 478 + 0D00FFFF01001100434D4643546F6F6C426172427574746F6ECF7F000000000000000000000000000000000000000000000001000000010000000180D07F00000000000001000000000000000000000000000000000100000001000000018030800000000000000200000000000000000000000000000000010000000100000001809E8A000000000000030000000000000000000000000000000001000000010000000180D17F0000000000000400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000000500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001806680000000000000060000000000000000000000000000000001000000010000000180EB880000000000000700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000080000000000000000000000000000000001000000010000000180B08A00000000000009000000000000000000000000000000000100000001000000 + + + + 59400 + Debug + + 2220 + 00200000000000001900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000002500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000002600000000000000000000000000000000010000000100000001801D800000000000002700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000002800000000000000000000000000000000010000000100000001801B80000000000000290000000000000000000000000000000001000000010000000180E57F0000000000002A00000000000000000000000000000000010000000100000001801C800000000000002B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000002C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B0000000000002D0000000000000000000000000000000001000000010000000180F07F0000000000002E0000000000000000000000000000000001000000010000000180E8880000000000003700000000000000000000000000000000010000000100000001803B010000000000002F0000000000000000000000000000000001000000010000000180BB8A00000000000030000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E0E01000000000000310000000D57617463682057696E646F7773000000000000000000000000010000000100000000000000000000000100000002001380D88B000000000000310000000757617463682031000000000000000000000000010000000100000000000000000000000100000000001380D98B0000000000003100000007576174636820320000000000000000000000000100000001000000000000000000000001000000000013800F01000000000000320000000E4D656D6F72792057696E646F7773000000000000000000000000010000000100000000000000000000000100000004001380D28B00000000000032000000084D656D6F72792031000000000000000000000000010000000100000000000000000000000100000000001380D38B00000000000032000000084D656D6F72792032000000000000000000000000010000000100000000000000000000000100000000001380D48B00000000000032000000084D656D6F72792033000000000000000000000000010000000100000000000000000000000100000000001380D58B00000000000032000000084D656D6F727920340000000000000000000000000100000001000000000000000000000001000000000013801001000000000000330000000E53657269616C2057696E646F77730000000000000000000000000100000001000000000000000000000001000000040013809307000000000000330000000755415254202331000000000000000000000000010000000100000000000000000000000100000000001380940700000000000033000000075541525420233200000000000000000000000001000000010000000000000000000000010000000000138095070000000000003300000007554152542023330000000000000000000000000100000001000000000000000000000001000000000013809607000000000000330000000E49544D2F525441205669657765720000000000000000000000000100000001000000000000000000000001000000000013803C010000000000003400000010416E616C797369732057696E646F7773000000000000000000000000010000000100000000000000000000000100000003001380658A000000000000340000000E4C6F67696320416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380DC7F0000000000003E00000014506572666F726D616E636520416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380E788000000000000380000000D436F646520436F76657261676500000000000000000000000001000000010000000000000000000000010000000000138053010000000000003F0000000D54726163652057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013805401000000000000FFFFFFFF115472616365204D656E7520416E63686F720100000000000000010000000000000001000000000000000000000001000000000013802901000000000000350000001553797374656D205669657765722057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013804B01000000000000FFFFFFFF1453797374656D2056696577657220416E63686F720100000000000000010000000000000001000000000000000000000001000000000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000138001890000000000003600000007546F6F6C626F7800000000000000000000000001000000010000000000000000000000010000000300138044C5000000000000FFFFFFFF0E5570646174652057696E646F77730100000000000000010000000000000001000000000000000000000001000000000013800000000000000400FFFFFFFF000000000000000000010000000000000001000000000000000000000001000000000013805B01000000000000FFFFFFFF12546F6F6C626F78204D656E75416E63686F72010000000000000001000000000000000100000000000000000000000100000000000000000005446562756764020000 + + + 898 + 1900FFFF01001100434D4643546F6F6C426172427574746F6ECC88000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001801780000000000000FFFFFFFF00010000000000000001000000000000000100000001801D80000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001801A80000000000000FFFFFFFF00010000000000000001000000000000000100000001801B80000000000000FFFFFFFF0001000000000000000100000000000000010000000180E57F000000000000FFFFFFFF00010000000000000001000000000000000100000001801C80000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001800089000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180E48B000000000000FFFFFFFF0001000000000000000100000000000000010000000180F07F000000000000FFFFFFFF0001000000000000000100000000000000010000000180E888000000000000FFFFFFFF00010000000000000001000000000000000100000001803B01000000000000FFFFFFFF0001000000000000000100000000000000010000000180BB8A000000000000FFFFFFFF0001000000000000000100000000000000010000000180D88B000000000000FFFFFFFF0001000000000000000100000000000000010000000180D28B000000000000FFFFFFFF00010000000000000001000000000000000100000001809307000000000000FFFFFFFF0001000000000000000100000000000000010000000180658A000000000000FFFFFFFF0001000000000000000100000000000000010000000180C18A000000000000FFFFFFFF0001000000000000000100000000000000010000000180EE8B000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001800189000000000000FFFFFFFF000100000000000000010000000000000001000000 + + + 898 + 1900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000000000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000000100000000000000000000000000000000010000000100000001801D800000000000000200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000000300000000000000000000000000000000010000000100000001801B80000000000000040000000000000000000000000000000001000000010000000180E57F0000000000000500000000000000000000000000000000010000000100000001801C800000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000000700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B000000000000080000000000000000000000000000000001000000010000000180F07F000000000000090000000000000000000000000000000001000000010000000180E8880000000000000A00000000000000000000000000000000010000000100000001803B010000000000000B0000000000000000000000000000000001000000010000000180BB8A0000000000000C0000000000000000000000000000000001000000010000000180D88B0000000000000D0000000000000000000000000000000001000000010000000180D28B0000000000000E000000000000000000000000000000000100000001000000018093070000000000000F0000000000000000000000000000000001000000010000000180658A000000000000100000000000000000000000000000000001000000010000000180C18A000000000000110000000000000000000000000000000001000000010000000180EE8B0000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180018900000000000013000000000000000000000000000000000100000001000000 + + + + 0 + 1680 + 1050 + + + + 1 + Debug + + -1 + -1 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + B60000004F000000F5040000DC000000 + + + 16 + B600000069000000F5040000F6000000 + + + + 1005 + 1005 + 1 + 0 + 0 + 1 + 32767 + 0 + 4096 + 0 + + 16 + 0300000067000000AF00000012030000 + + + 16 + 3000000058000000E20000008F020000 + + + + 109 + 109 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000067000000AF00000012030000 + + + 16 + 3000000058000000E20000008F020000 + + + + 1465 + 1465 + 1 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + FC040000670000008D060000B8030000 + + + 16 + EF0500001002000033090000B2020000 + + + + 1466 + 1466 + 1 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + FC040000670000008D060000B8030000 + + + 16 + EF0500001002000033090000B2020000 + + + + 1467 + 1467 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + FC040000670000008D060000B8030000 + + + 16 + EF0500001002000033090000B2020000 + + + + 1468 + 1468 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + FC040000670000008D060000B8030000 + + + 16 + EF0500001002000033090000B2020000 + + + + 1506 + 1506 + 0 + 0 + 0 + 0 + 32767 + 0 + 16384 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 1913 + 1913 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + B900000067000000F2040000C3000000 + + + 16 + 3000000058000000A2020000E5000000 + + + + 1935 + 1935 + 1 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + FC040000670000008D060000B8030000 + + + 16 + EF0500001002000033090000B2020000 + + + + 1936 + 1936 + 1 + 0 + 0 + 1 + 32767 + 0 + 32768 + 0 + + 16 + FC040000670000008D060000B8030000 + + + 16 + EF0500001002000033090000B2020000 + + + + 1937 + 1937 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + FC040000670000008D060000B8030000 + + + 16 + EF0500001002000033090000B2020000 + + + + 1939 + 1939 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + FC040000670000008D060000B8030000 + + + 16 + EF0500001002000033090000B2020000 + + + + 1940 + 1940 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + FC040000670000008D060000B8030000 + + + 16 + EF0500001002000033090000B2020000 + + + + 1941 + 1941 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + FC040000670000008D060000B8030000 + + + 16 + EF0500001002000033090000B2020000 + + + + 1942 + 1942 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + FC040000670000008D060000B8030000 + + + 16 + EF0500001002000033090000B2020000 + + + + 195 + 195 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000067000000AF00000012030000 + + + 16 + 3000000058000000E20000008F020000 + + + + 196 + 196 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000067000000AF00000012030000 + + + 16 + 3000000058000000E20000008F020000 + + + + 197 + 197 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + 030000003E020000E10400009A020000 + + + 16 + 3000000058000000A2020000E5000000 + + + + 198 + 198 + 1 + 0 + 0 + 1 + 32767 + 0 + 32768 + 0 + + 16 + 000000002F030000F5040000D1030000 + + + 16 + 3000000058000000A2020000E5000000 + + + + 199 + 199 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 030000003E020000E10400009A020000 + + + 16 + 3000000058000000A2020000E5000000 + + + + 203 + 203 + 1 + 0 + 0 + 1 + 32767 + 0 + 8192 + 0 + + 16 + B600000064000000F5040000DC000000 + + + 16 + 3000000058000000A2020000E5000000 + + + + 204 + 204 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + B900000067000000F2040000C3000000 + + + 16 + 3000000058000000A2020000E5000000 + + + + 221 + 221 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 00000000000000000000000000000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 2506 + 2506 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 540300004F000000E404000022020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 2507 + 2507 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 540300004F000000E404000022020000 + + + 16 + 3000000058000000A2020000E5000000 + + + + 343 + 343 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + B900000067000000F2040000C3000000 + + + 16 + 3000000058000000A2020000E5000000 + + + + 346 + 346 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + B900000067000000F2040000C3000000 + + + 16 + 3000000058000000A2020000E5000000 + + + + 35824 + 35824 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + B900000067000000F2040000C3000000 + + + 16 + 3000000058000000A2020000E5000000 + + + + 35885 + 35885 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35886 + 35886 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35887 + 35887 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35888 + 35888 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35889 + 35889 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35890 + 35890 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35891 + 35891 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35892 + 35892 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35893 + 35893 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35894 + 35894 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35895 + 35895 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35896 + 35896 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35897 + 35897 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35898 + 35898 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35899 + 35899 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35900 + 35900 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35901 + 35901 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35902 + 35902 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35903 + 35903 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35904 + 35904 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 35905 + 35905 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 5703000067000000E10400009A020000 + + + 16 + 3000000058000000C0010000E8010000 + + + + 38003 + 38003 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000067000000AF00000012030000 + + + 16 + 3000000058000000E20000008F020000 + + + + 38007 + 38007 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 030000003E020000E10400009A020000 + + + 16 + 3000000058000000A2020000E5000000 + + + + 59392 + 59392 + 1 + 0 + 0 + 0 + 940 + 0 + 8192 + 0 + + 16 + 0000000000000000B70300001C000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 59393 + 0 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 00000000D103000090060000E2030000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 59399 + 59399 + 0 + 0 + 0 + 0 + 391 + 0 + 8192 + 1 + + 16 + 000000001C0000009201000038000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 59400 + 59400 + 1 + 0 + 0 + 0 + 612 + 0 + 8192 + 2 + + 16 + 000000001C0000006F02000038000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 2707 + 000000000E000000000000000020000001000000FFFFFFFFFFFFFFFFB6000000DC000000F5040000E0000000010000000100001004000000010000000000000000000000FFFFFFFF06000000CB00000057010000CC000000F08B00005A01000079070000FFFF02000B004354616262656450616E650020000001000000B600000069000000F5040000F6000000B60000004F000000F5040000DC0000000000000040280056060000000B446973617373656D626C7901000000CB00000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A6572000000005701000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A657200000000CC00000001000000FFFFFFFFFFFFFFFF0E4C6F67696320416E616C797A657200000000F08B000001000000FFFFFFFFFFFFFFFF0D436F646520436F766572616765000000005A01000001000000FFFFFFFFFFFFFFFF11496E737472756374696F6E205472616365000000007907000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFFCB00000001000000FFFFFFFFCB000000000000000040000000000000FFFFFFFFFFFFFFFF500300004F00000054030000B302000000000000020000000400000001000000000000000000000000000000000000000000000001000000FFFFFFFF16000000E20500002D8C00002E8C00002F8C0000308C0000318C0000328C0000338C0000348C0000358C0000368C0000378C0000388C0000398C00003A8C00003B8C00003C8C00003D8C00003E8C00003F8C0000408C0000418C0000018000400000000000005403000069000000E4040000CD020000540300004F000000E4040000B30200000000000040410046160000000753796D626F6C7300000000E205000001000000FFFFFFFFFFFFFFFF00000000002D8C000001000000FFFFFFFFFFFFFFFF00000000002E8C000001000000FFFFFFFFFFFFFFFF00000000002F8C000001000000FFFFFFFFFFFFFFFF0000000000308C000001000000FFFFFFFFFFFFFFFF0000000000318C000001000000FFFFFFFFFFFFFFFF0000000000328C000001000000FFFFFFFFFFFFFFFF0000000000338C000001000000FFFFFFFFFFFFFFFF0000000000348C000001000000FFFFFFFFFFFFFFFF0000000000358C000001000000FFFFFFFFFFFFFFFF0000000000368C000001000000FFFFFFFFFFFFFFFF0000000000378C000001000000FFFFFFFFFFFFFFFF0000000000388C000001000000FFFFFFFFFFFFFFFF0000000000398C000001000000FFFFFFFFFFFFFFFF00000000003A8C000001000000FFFFFFFFFFFFFFFF00000000003B8C000001000000FFFFFFFFFFFFFFFF00000000003C8C000001000000FFFFFFFFFFFFFFFF00000000003D8C000001000000FFFFFFFFFFFFFFFF00000000003E8C000001000000FFFFFFFFFFFFFFFF00000000003F8C000001000000FFFFFFFFFFFFFFFF0000000000408C000001000000FFFFFFFFFFFFFFFF0000000000418C000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000001000000000000000000000001000000FFFFFFFF00000000C400000090010000C80000000000000001000000040000000000000000000000000000000000000001000000CA090000CB09000002000000000000000000000002000000FFFFFFFF540300003A010000E40400003E01000000000000010000000400000000000000000000000000000000000000000000000000000003000000FFFFFFFFE2050000CA090000CB09000001000000CB09000001000000CA09000001000000FFFFFFFFE2050000000000000010000001000000FFFFFFFFFFFFFFFFB20000004F000000B60000002B030000010000000200001004000000010000000000000000000000FFFFFFFF05000000ED0300006D000000C3000000C400000073940000018000100000010000000000000069000000B200000045030000000000004F000000B20000002B0300000000000040140056050000000750726F6A65637401000000ED03000001000000FFFFFFFFFFFFFFFF05426F6F6B73000000006D00000001000000FFFFFFFFFFFFFFFF0946756E6374696F6E7300000000C300000001000000FFFFFFFFFFFFFFFF0954656D706C6174657300000000C400000001000000FFFFFFFFFFFFFFFF09526567697374657273010000007394000001000000FFFFFFFFFFFFFFFF04000000000000000000000000000000000000000000000001000000FFFFFFFFED03000001000000FFFFFFFFED030000000000000080000001000000FFFFFFFFFFFFFFFF000000002B030000F50400002F03000001000000010000100400000001000000000000000000000000000000000000000000000001000000C60000000000000003000000000000000000000003000000FFFFFFFF480300002F0300004C030000D103000000000000020000000400000000000000000000000000000000000000000000000000000001000000C600000001000000C6000000000000000080000000000000FFFFFFFFFFFFFFFF0000000022020000E404000026020000000000000100000004000000010000000000000000000000FFFFFFFF03000000C5000000C700000077940000018000800000000000000000000040020000E4040000CD0200000000000026020000E4040000B30200000000000040820046030000000C4275696C64204F757470757400000000C500000001000000FFFFFFFFFFFFFFFF0D46696E6420496E2046696C657300000000C700000001000000FFFFFFFFFFFFFFFF0642726F777365000000007794000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFC500000001000000FFFFFFFFC5000000000000000040000001000000FFFFFFFFFFFFFFFFF50400004F000000F9040000D1030000010000000200001004000000010000001CFDFFFFEB02000000000000000000000000000001000000FFFFFFFF0B0000008F070000930700009407000095070000960700009007000091070000B9050000BA050000BB050000BC05000001800040000001000000F90400006900000090060000EB030000F90400004F00000090060000D103000000000000404100560B0000001343616C6C20537461636B202B204C6F63616C73010000008F07000001000000FFFFFFFFFFFFFFFF0755415254202331000000009307000001000000FFFFFFFFFFFFFFFF0755415254202332000000009407000001000000FFFFFFFFFFFFFFFF0755415254202333000000009507000001000000FFFFFFFFFFFFFFFF15446562756720287072696E74662920566965776572000000009607000001000000FFFFFFFFFFFFFFFF0757617463682031010000009007000001000000FFFFFFFFFFFFFFFF0757617463682032000000009107000001000000FFFFFFFFFFFFFFFF084D656D6F7279203101000000B905000001000000FFFFFFFFFFFFFFFF084D656D6F7279203201000000BA05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203300000000BB05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203400000000BC05000001000000FFFFFFFFFFFFFFFF0500000000000000000000000000000000000000000000000000000001000000FFFFFFFF8F07000001000000FFFFFFFF8F070000000000000000000000000000 + + + 59392 + File + + 2308 + 00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000040004000000000000000000000000000000000100000001000000018022E100000000040005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000000000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000400460000000000000000000000000000000001000000010000000180FE880000000004004500000000000000000000000000000000010000000100000001800B810000000004001300000000000000000000000000000000010000000100000001800C810000000004001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE803000000000000000000000000000000000000000000000001000000010000009600000002002050000000001242595445535F5045525F574F52444C494E45960000000000000014000F6175624649464F52656164507472300E6175624649464F52656164507472054E4D495352064D534756414C0C7265736574204D534756414C1043414E5F776169745472616E736D69740D43414E5F765472616E736D69740430784246012A0F44465F426F6F7452784D53474F424A05535441434B0676656373656707737461727475700A466C674F6E6554696D65085553455F42414E4B0252300341523017574F52444C494E455F4255464645525F4144445245535305574C4275661242595445535F5045525F574F52444C494E450000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018024E10000000000001100000000000000000000000000000000010000000100000001800A810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018022800000020001001500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000400160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000000180C8880000000000001700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E4C010000020001001A0000000F50726F6A6563742057696E646F7773000000000000000000000000010000000100000000000000000000000100000008002880DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002880DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002880E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002880E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000288018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000028800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002880D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002880E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C65AC030000 + + + 1423 + 2800FFFF01001100434D4643546F6F6C426172427574746F6E00E1000000000000FFFFFFFF000100000000000000010000000000000001000000018001E1000000000000FFFFFFFF000100000000000000010000000000000001000000018003E1000000000000FFFFFFFF0001000000000000000100000000000000010000000180CD7F000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF000000000000000000010000000000000001000000018023E1000000000000FFFFFFFF000100000000000000010000000000000001000000018022E1000000000000FFFFFFFF000100000000000000010000000000000001000000018025E1000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001802BE1000000000000FFFFFFFF00010000000000000001000000000000000100000001802CE1000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001807A8A000000000000FFFFFFFF00010000000000000001000000000000000100000001807B8A000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180D3B0000000000000FFFFFFFF000100000000000000010000000000000001000000018015B1000000000000FFFFFFFF0001000000000000000100000000000000010000000180F4B0000000000000FFFFFFFF000100000000000000010000000000000001000000018036B1000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180FF88000000000000FFFFFFFF0001000000000000000100000000000000010000000180FE88000000000000FFFFFFFF00010000000000000001000000000000000100000001800B81000000000000FFFFFFFF00010000000000000001000000000000000100000001800C81000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180F088000000000000FFFFFFFF0001000000000000000100000000000000010000000180EE7F000000000000FFFFFFFF000100000000000000010000000000000001000000018024E1000000000000FFFFFFFF00010000000000000001000000000000000100000001800A81000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001802280000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180C488000000000000FFFFFFFF0001000000000000000100000000000000010000000180C988000000000000FFFFFFFF0001000000000000000100000000000000010000000180C788000000000000FFFFFFFF0001000000000000000100000000000000010000000180C888000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180DD88000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180FB7F000000000000FFFFFFFF000100000000000000010000000000000001000000 + + + 1423 + 2800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000000004000000000000000000000000000000000100000001000000018022E100000000000005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000000000700000000000000000000000000000000010000000100000001802CE10000000000000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000000000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000000000C0000000000000000000000000000000001000000010000000180F4B00000000000000D000000000000000000000000000000000100000001000000018036B10000000000000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF880000000000000F0000000000000000000000000000000001000000010000000180FE880000000000001000000000000000000000000000000000010000000100000001800B810000000000001100000000000000000000000000000000010000000100000001800C810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F088000000000000130000000000000000000000000000000001000000010000000180EE7F00000000000014000000000000000000000000000000000100000001000000018024E10000000000001500000000000000000000000000000000010000000100000001800A810000000000001600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018022800000000000001700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000180000000000000000000000000000000001000000010000000180C988000000000000190000000000000000000000000000000001000000010000000180C7880000000000001A0000000000000000000000000000000001000000010000000180C8880000000000001B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180DD880000000000001C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001D000000000000000000000000000000000100000001000000 + + + + 59399 + Build + + 552 + 00200000000000000D00FFFF01001100434D4643546F6F6C426172427574746F6ECF7F0000000000001C0000000000000000000000000000000001000000010000000180D07F0000000000001D000000000000000000000000000000000100000001000000018030800000000000001E00000000000000000000000000000000010000000100000001809E8A0000000000001F0000000000000000000000000000000001000000010000000180D17F0000000000002000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000002100000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6EBA00000000000000000000000000000000000000000000000001000000010000009600000003002050FFFFFFFF00960000000000000000000180EB880000000000002200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000230000000000000000000000000000000001000000010000000180B08A0000000000002400000000000000000000000000000000010000000100000000000000054275696C6487010000 + + + 478 + 0D00FFFF01001100434D4643546F6F6C426172427574746F6ECF7F000000000000FFFFFFFF0001000000000000000100000000000000010000000180D07F000000000000FFFFFFFF00010000000000000001000000000000000100000001803080000000000000FFFFFFFF00010000000000000001000000000000000100000001809E8A000000000000FFFFFFFF0001000000000000000100000000000000010000000180D17F000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001804C8A000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001806680000000000000FFFFFFFF0001000000000000000100000000000000010000000180EB88000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180C07F000000000000FFFFFFFF0001000000000000000100000000000000010000000180B08A000000000000FFFFFFFF000100000000000000010000000000000001000000 + + + 478 + 0D00FFFF01001100434D4643546F6F6C426172427574746F6ECF7F000000000000000000000000000000000000000000000001000000010000000180D07F00000000000001000000000000000000000000000000000100000001000000018030800000000000000200000000000000000000000000000000010000000100000001809E8A000000000000030000000000000000000000000000000001000000010000000180D17F0000000000000400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000000500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001806680000000000000060000000000000000000000000000000001000000010000000180EB880000000000000700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000080000000000000000000000000000000001000000010000000180B08A00000000000009000000000000000000000000000000000100000001000000 + + + + 59400 + Debug + + 2220 + 00200000010000001900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000002500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000002600000000000000000000000000000000010000000100000001801D800000000004002700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000002800000000000000000000000000000000010000000100000001801B80000000000000290000000000000000000000000000000001000000010000000180E57F0000000004002A00000000000000000000000000000000010000000100000001801C800000000004002B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000002C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B0000020001002D0000000000000000000000000000000001000000010000000180F07F0000020001002E0000000000000000000000000000000001000000010000000180E8880000020000003700000000000000000000000000000000010000000100000001803B010000020001002F0000000000000000000000000000000001000000010000000180BB8A00000200010030000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E0E01000002000100310000000D57617463682057696E646F7773000000000000000000000000010000000100000000000000000000000100000002001380D88B000000000000310000000757617463682031000000000000000000000000010000000100000000000000000000000100000000001380D98B0000000000003100000007576174636820320000000000000000000000000100000001000000000000000000000001000000000013800F01000002000100320000000E4D656D6F72792057696E646F7773000000000000000000000000010000000100000000000000000000000100000004001380D28B00000000000032000000084D656D6F72792031000000000000000000000000010000000100000000000000000000000100000000001380D38B00000000000032000000084D656D6F72792032000000000000000000000000010000000100000000000000000000000100000000001380D48B00000000000032000000084D656D6F72792033000000000000000000000000010000000100000000000000000000000100000000001380D58B00000000000032000000084D656D6F727920340000000000000000000000000100000001000000000000000000000001000000000013801001000002000000330000000E53657269616C2057696E646F77730000000000000000000000000100000001000000000000000000000001000000040013809307000000000000330000000755415254202331000000000000000000000000010000000100000000000000000000000100000000001380940700000000000033000000075541525420233200000000000000000000000001000000010000000000000000000000010000000000138095070000000000003300000007554152542023330000000000000000000000000100000001000000000000000000000001000000000013809607000000000000330000000E49544D2F525441205669657765720000000000000000000000000100000001000000000000000000000001000000000013803C010000020000003400000010416E616C797369732057696E646F7773000000000000000000000000010000000100000000000000000000000100000003001380658A000000000000340000000E4C6F67696320416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380DC7F0000000000003E00000014506572666F726D616E636520416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380E788000000000000380000000D436F646520436F76657261676500000000000000000000000001000000010000000000000000000000010000000000138053010000000000003F0000000D54726163652057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013805401000000000000FFFFFFFF115472616365204D656E7520416E63686F720100000000000000010000000000000001000000000000000000000001000000000013802901000000000000350000001553797374656D205669657765722057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013804B01000000000000FFFFFFFF1453797374656D2056696577657220416E63686F720100000000000000010000000000000001000000000000000000000001000000000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000138001890000020000003600000007546F6F6C626F7800000000000000000000000001000000010000000000000000000000010000000300138044C5000000000000FFFFFFFF0E5570646174652057696E646F77730100000000000000010000000000000001000000000000000000000001000000000013800000000000000400FFFFFFFF000000000000000000010000000000000001000000000000000000000001000000000013805B01000000000000FFFFFFFF12546F6F6C626F78204D656E75416E63686F72010000000000000001000000000000000100000000000000000000000100000000000000000005446562756764020000 + + + 898 + 1900FFFF01001100434D4643546F6F6C426172427574746F6ECC88000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001801780000000000000FFFFFFFF00010000000000000001000000000000000100000001801D80000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001801A80000000000000FFFFFFFF00010000000000000001000000000000000100000001801B80000000000000FFFFFFFF0001000000000000000100000000000000010000000180E57F000000000000FFFFFFFF00010000000000000001000000000000000100000001801C80000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001800089000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180E48B000000000000FFFFFFFF0001000000000000000100000000000000010000000180F07F000000000000FFFFFFFF0001000000000000000100000000000000010000000180E888000000000000FFFFFFFF00010000000000000001000000000000000100000001803B01000000000000FFFFFFFF0001000000000000000100000000000000010000000180BB8A000000000000FFFFFFFF0001000000000000000100000000000000010000000180D88B000000000000FFFFFFFF0001000000000000000100000000000000010000000180D28B000000000000FFFFFFFF00010000000000000001000000000000000100000001809307000000000000FFFFFFFF0001000000000000000100000000000000010000000180658A000000000000FFFFFFFF0001000000000000000100000000000000010000000180C18A000000000000FFFFFFFF0001000000000000000100000000000000010000000180EE8B000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001800189000000000000FFFFFFFF000100000000000000010000000000000001000000 + + + 898 + 1900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000000000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000000100000000000000000000000000000000010000000100000001801D800000000000000200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000000300000000000000000000000000000000010000000100000001801B80000000000000040000000000000000000000000000000001000000010000000180E57F0000000000000500000000000000000000000000000000010000000100000001801C800000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000000700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B000000000000080000000000000000000000000000000001000000010000000180F07F000000000000090000000000000000000000000000000001000000010000000180E8880000000000000A00000000000000000000000000000000010000000100000001803B010000000000000B0000000000000000000000000000000001000000010000000180BB8A0000000000000C0000000000000000000000000000000001000000010000000180D88B0000000000000D0000000000000000000000000000000001000000010000000180D28B0000000000000E000000000000000000000000000000000100000001000000018093070000000000000F0000000000000000000000000000000001000000010000000180658A000000000000100000000000000000000000000000000001000000010000000180C18A000000000000110000000000000000000000000000000001000000010000000180EE8B0000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180018900000000000013000000000000000000000000000000000100000001000000 + + + + 0 + 1680 + 1050 + + + + + + + + 1 + 0 + + 100 + 1 + + .\START_XC.a51 + 25 + 63 + 82 + 1 + + + + .\boot.c + 12 + 97 + 117 + 1 + + + + + +
diff --git a/CL2.0.uvopt b/CL2.0.uvopt new file mode 100644 index 0000000..843e5ec --- /dev/null +++ b/CL2.0.uvopt @@ -0,0 +1,357 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 187610842 + 31157159 + + + + Target 1 + 0x0 + MCS-51 + + 96000000 + + 1 + 1 + 1 + 0 + 0 + + + 0 + 65535 + 0 + 0 + 0 + + + 120 + 65 + 8 + .\output\ + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + + + 1 + 0 + 1 + + 6 + + + 0 + User's Manual + DATASHTS\INFINEON\XC886_UM.PDF + + + 1 + XC800 Instruction Set Manual + DATASHTS\INFINEON\XC800_IS.PDF + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 1 + 0 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 0 + 0 + 7 + + + + + + + + + + + BIN\DAS2XC800.DLL + + + + 0 + DLGDC51 + (5130=-1,-1,-1,-1,0)(5131=-1,-1,-1,-1,0)(5132=-1,-1,-1,-1,0)(5133=-1,-1,-1,-1,0)(5134=-1,-1,-1,-1,0)(1203=-1,-1,-1,-1,0)(5152=-1,-1,-1,-1,0)(94=-1,-1,-1,-1,0)(5150=-1,-1,-1,-1,0)(5140=-1,-1,-1,-1,0)(5141=-1,-1,-1,-1,0)(5142=-1,-1,-1,-1,0)(5143=-1,-1,-1,-1,0)(5144=-1,-1,-1,-1,0)(5145=-1,-1,-1,-1,0)(5019=-1,-1,-1,-1,0)(5020=-1,-1,-1,-1,0)(5018=-1,-1,-1,-1,0)(5021=-1,-1,-1,-1,0)(5022=-1,-1,-1,-1,0)(5151=-1,-1,-1,-1,0)(5155=-1,-1,-1,-1,0)(1219=-1,-1,-1,-1,0)(90=-1,-1,-1,-1,0)(91=-1,-1,-1,-1,0)(1207=-1,-1,-1,-1,0)(5154=-1,-1,-1,-1,0)(5153=-1,-1,-1,-1,0)(1208=-1,-1,-1,-1,0)(5156=-1,-1,-1,-1,0)(5157=-1,-1,-1,-1,0)(5158=-1,-1,-1,-1,0)(5159=-1,-1,-1,-1,0)(3047=-1,-1,-1,-1,0)(3050=-1,-1,-1,-1,0)(3060=-1,-1,-1,-1,0)(3051=-1,-1,-1,-1,0)(3061=-1,-1,-1,-1,0) + + + 0 + DLGTC51 + (5130=-1,-1,-1,-1,0)(5131=-1,-1,-1,-1,0)(5132=-1,-1,-1,-1,0)(5133=-1,-1,-1,-1,0)(5134=-1,-1,-1,-1,0)(1203=-1,-1,-1,-1,0)(5152=-1,-1,-1,-1,0)(94=-1,-1,-1,-1,0)(5150=-1,-1,-1,-1,0)(5140=-1,-1,-1,-1,0)(5141=-1,-1,-1,-1,0)(5142=-1,-1,-1,-1,0)(5143=-1,-1,-1,-1,0)(5144=-1,-1,-1,-1,0)(5145=-1,-1,-1,-1,0)(5019=-1,-1,-1,-1,0)(5020=-1,-1,-1,-1,0)(5018=-1,-1,-1,-1,0)(5021=-1,-1,-1,-1,0)(5022=-1,-1,-1,-1,0)(5151=-1,-1,-1,-1,0)(5155=-1,-1,-1,-1,0)(1219=-1,-1,-1,-1,0)(90=-1,-1,-1,-1,0)(91=-1,-1,-1,-1,0)(1207=-1,-1,-1,-1,0)(5154=-1,-1,-1,-1,0)(5153=-1,-1,-1,-1,0)(1208=-1,-1,-1,-1,0)(5156=-1,-1,-1,-1,0)(5157=-1,-1,-1,-1,0)(5158=-1,-1,-1,-1,0)(5159=-1,-1,-1,-1,0)(3047=-1,-1,-1,-1,0)(3050=-1,-1,-1,-1,0)(3051=-1,-1,-1,-1,0) + + + 0 + DAS2XC800 + -O255 -F29 -U768 -H"localhost" -S"UDAS" -D"MW000099A" -T4294967295 + + + + + + 0 + 1 + WLBuf + + + + + 1 + 0 + PntSta + 0 + + + + 0 + + + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + 0 + 0 + 0 + + + + + + + + + + + + + Dave Files + 1 + 0 + 0 + 0 + + 1 + 1 + 2 + 0 + 0 + 1 + .\START_XC.a51 + START_XC.a51 + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 1 + .\MAIN.C + MAIN.C + 0 + 0 + + + 1 + 3 + 1 + 0 + 0 + 1 + .\IO.C + IO.C + 0 + 0 + + + 1 + 4 + 1 + 0 + 0 + 1 + .\SHARED_INT.C + SHARED_INT.C + 0 + 0 + + + 1 + 5 + 1 + 0 + 0 + 1 + .\CAN.C + CAN.C + 0 + 0 + + + 1 + 6 + 1 + 0 + 0 + 1 + .\T2.C + T2.C + 0 + 0 + + + 1 + 7 + 1 + 0 + 0 + 1 + .\WDT.C + WDT.C + 0 + 0 + + + + + User Files + 1 + 0 + 0 + 0 + + 2 + 8 + 1 + 0 + 0 + 0 + .\User.c + User.c + 0 + 0 + + + 2 + 9 + 1 + 0 + 0 + 0 + .\boot.c + boot.c + 0 + 0 + + + 2 + 10 + 2 + 0 + 0 + 0 + .\XC88x_FLHANDLER.ASM + XC88x_FLHANDLER.ASM + 0 + 0 + + + 2 + 11 + 1 + 0 + 0 + 0 + .\temperature.C + temperature.C + 0 + 0 + + + +
diff --git a/CL2.0.uvproj b/CL2.0.uvproj new file mode 100644 index 0000000..9724ee2 --- /dev/null +++ b/CL2.0.uvproj @@ -0,0 +1,445 @@ + + + + 1.1 + +
### uVision Project, (C) Keil Software
+ + + + Target 1 + 0x0 + MCS-51 + 0 + + + XC886CLM-8FF + Infineon + IRAM(0-0xFF) XRAM(0xF000-0xF5FF) IROM(0-0x5FFF) IROM2(0xA000-0xBFFF) CLOCK(24000000) MOD517DP + XC800_FLOAD.EXE ("#H" f") + "LIB\START_XC88x.A51" ("Infineon XC800 Startup Code") + + 4021 + XC886CLM.H + + + + + + + + + + + 0 + 0 + + + + Infineon\ + Infineon\ + + 0 + 0 + 0 + 0 + 1 + + .\output\ + CL2.0 + 1 + 0 + 1 + 1 + 1 + .\output\ + 0 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + 0 + 0 + + 0 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + 65535 + + + S8051.DLL + -m8051EW + DCore51.DLL + -pXC886 + S8051.DLL + + TCore51.DLL + -pXC886 + + + + 0 + 0 + 0 + 0 + 16 + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + + + 1 + 1 + 0 + 1 + 1 + 1 + 0 + 1 + 0 + 1 + + 0 + 7 + + + + + + + + + + + + + + BIN\DAS2XC800.DLL + + + + + 1 + 0 + 0 + 0 + 1 + 4100 + + 0 + BIN\DAS2XC800.DLL + "XC800_FLOAD.EXE" ("#H" f") + + + + + 0 + + + + 2 + 0 + 2 + 0 + 0 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + + + 0 + 0x0 + 0xffff + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x6000 + + + 0 + 0x0 + 0x100 + + + 0 + 0xf000 + 0x600 + + + 0 + 0x0 + 0x0 + + + 0 + 0xa000 + 0x2000 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + + + 0 + 0 + 1 + 0 + 1 + 3 + 9 + 2 + 1 + 1 + 1 + 8192 + + + + + + + + + 0 + 1 + 0 + 0 + + + + + + + + + 0 + 0 + 1 + 0 + 2 + 1 + + RESERVE (I:0xC0-I:0xFF) + + + + + + CODE(C:0x2100-C:0x5FFF) + + ?C_C51STARTUP(C:0x2100), ?PR?main?MAIN + + + + + + + + + + + + + + + + + + + Dave Files + + + START_XC.a51 + 2 + .\START_XC.a51 + + + MAIN.C + 1 + .\MAIN.C + + + IO.C + 1 + .\IO.C + + + SHARED_INT.C + 1 + .\SHARED_INT.C + + + CAN.C + 1 + .\CAN.C + + + T2.C + 1 + .\T2.C + + + WDT.C + 1 + .\WDT.C + + + + + User Files + + + User.c + 1 + .\User.c + + + boot.c + 1 + .\boot.c + + + XC88x_FLHANDLER.ASM + 2 + .\XC88x_FLHANDLER.ASM + + + temperature.C + 1 + .\temperature.C + + + + + + + +
diff --git a/CL2.0_uvopt.bak b/CL2.0_uvopt.bak new file mode 100644 index 0000000..1d7f89e --- /dev/null +++ b/CL2.0_uvopt.bak @@ -0,0 +1,1702 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + + + + -261637721 + 30791276 + + + + Target 1 + 0x0 + MCS-51 + + 96000000 + + 1 + 1 + 1 + 0 + + + 0 + 65535 + 0 + 0 + 0 + + + 120 + 65 + 8 + .\output\ + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + + + 1 + 0 + 1 + + 6 + + + 0 + User's Manual + DATASHTS\INFINEON\XC886_UM.PDF + + + 1 + XC800 Instruction Set Manual + DATASHTS\INFINEON\XC800_IS.PDF + + + + S8051.DLL + -m8051EW + DCore51.DLL + -pXC886 + S8051.DLL + + TCore51.DLL + -pXC886 + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 1 + 0 + 1 + 0 + 0 + 7 + + + + + + + + + + + BIN\DAS2XC800.DLL + + + + 0 + DLGDC51 + (5130=-1,-1,-1,-1,0)(5131=-1,-1,-1,-1,0)(5132=-1,-1,-1,-1,0)(5133=-1,-1,-1,-1,0)(5134=-1,-1,-1,-1,0)(1203=-1,-1,-1,-1,0)(5152=-1,-1,-1,-1,0)(94=-1,-1,-1,-1,0)(5150=-1,-1,-1,-1,0)(5140=-1,-1,-1,-1,0)(5141=-1,-1,-1,-1,0)(5142=-1,-1,-1,-1,0)(5143=-1,-1,-1,-1,0)(5144=-1,-1,-1,-1,0)(5145=-1,-1,-1,-1,0)(5019=-1,-1,-1,-1,0)(5020=-1,-1,-1,-1,0)(5018=-1,-1,-1,-1,0)(5021=-1,-1,-1,-1,0)(5022=-1,-1,-1,-1,0)(5151=-1,-1,-1,-1,0)(5155=-1,-1,-1,-1,0)(1219=-1,-1,-1,-1,0)(90=-1,-1,-1,-1,0)(91=-1,-1,-1,-1,0)(1207=-1,-1,-1,-1,0)(5154=-1,-1,-1,-1,0)(5153=-1,-1,-1,-1,0)(1208=-1,-1,-1,-1,0)(5156=-1,-1,-1,-1,0)(5157=-1,-1,-1,-1,0)(5158=-1,-1,-1,-1,0)(5159=-1,-1,-1,-1,0)(3047=-1,-1,-1,-1,0)(3050=-1,-1,-1,-1,0)(3060=-1,-1,-1,-1,0)(3051=-1,-1,-1,-1,0)(3061=-1,-1,-1,-1,0) + + + 0 + DLGTC51 + (5130=-1,-1,-1,-1,0)(5131=-1,-1,-1,-1,0)(5132=-1,-1,-1,-1,0)(5133=-1,-1,-1,-1,0)(5134=-1,-1,-1,-1,0)(1203=-1,-1,-1,-1,0)(5152=-1,-1,-1,-1,0)(94=-1,-1,-1,-1,0)(5150=-1,-1,-1,-1,0)(5140=-1,-1,-1,-1,0)(5141=-1,-1,-1,-1,0)(5142=-1,-1,-1,-1,0)(5143=-1,-1,-1,-1,0)(5144=-1,-1,-1,-1,0)(5145=-1,-1,-1,-1,0)(5019=-1,-1,-1,-1,0)(5020=-1,-1,-1,-1,0)(5018=-1,-1,-1,-1,0)(5021=-1,-1,-1,-1,0)(5022=-1,-1,-1,-1,0)(5151=-1,-1,-1,-1,0)(5155=-1,-1,-1,-1,0)(1219=-1,-1,-1,-1,0)(90=-1,-1,-1,-1,0)(91=-1,-1,-1,-1,0)(1207=-1,-1,-1,-1,0)(5154=-1,-1,-1,-1,0)(5153=-1,-1,-1,-1,0)(1208=-1,-1,-1,-1,0)(5156=-1,-1,-1,-1,0)(5157=-1,-1,-1,-1,0)(5158=-1,-1,-1,-1,0)(5159=-1,-1,-1,-1,0)(3047=-1,-1,-1,-1,0)(3050=-1,-1,-1,-1,0)(3051=-1,-1,-1,-1,0) + + + 0 + DAS2XC800 + -O255 -F29 -U768 -H"localhost" -S"UDAS" -D"MW000099A" -T4294967295 + + + + + 0 + 1 + WLBuf + + + + + 1 + 0 + PntSta + + + + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + + + Dave Files + 1 + 0 + 0 + + 1 + 1 + 2 + 0 + 0 + 35 + 0 + 0 + 0 + 1 + .\START_XC.a51 + START_XC.a51 + + + 1 + 2 + 1 + 0 + 0 + 9 + 0 + 0 + 0 + 1 + .\MAIN.C + MAIN.C + + + 1 + 3 + 1 + 0 + 0 + 31 + 0 + 0 + 0 + 1 + .\IO.C + IO.C + + + 1 + 4 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + .\SHARED_INT.C + SHARED_INT.C + + + 1 + 5 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + .\CAN.C + CAN.C + + + 1 + 6 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + .\T2.C + T2.C + + + 1 + 7 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + .\WDT.C + WDT.C + + + + + User Files + 1 + 0 + 0 + + 2 + 8 + 1 + 0 + 0 + 0 + 0 + 198 + 201 + 0 + .\User.c + User.c + + + 2 + 9 + 1 + 1 + 0 + 24 + 0 + 0 + 0 + 0 + .\boot.c + boot.c + + + 2 + 10 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + .\XC88x_FLHANDLER.ASM + XC88x_FLHANDLER.ASM + + + + + Default + 1 + Build + 0 + + Default + 1 + + 59392 + 1 + File + 0 + + 0 + + 1 + 2 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 100 + 0 + 1 + 0 + + + 59398 + 2 + Build + 0 + + 0 + + 1 + 2 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 100 + 0 + 0 + 0 + + + 59399 + 3 + Debug + 0 + + 0 + + 1 + 2 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 100 + 0 + 1 + 0 + + + 197 + 4 + Build Output + 0 + + 0 + + 1 + 2 + 4 + 0 + 0 + 0 + 210 + 600 + 0 + 0 + 250 + 600 + 100 + 1 + 0 + 0 + + + 198 + 5 + Command + 197 + + 197 + + 1 + 4 + 2 + 0 + 0 + 0 + 210 + 600 + 0 + 0 + 250 + 600 + 100 + 1 + 1 + 0 + + + 199 + 6 + Find in Files + 197 + + 197 + + 1 + 4 + 2 + 0 + 0 + 0 + 210 + 600 + 0 + 0 + 250 + 600 + 100 + 0 + 0 + 0 + + + 38007 + 7 + Browse + 197 + + 197 + + 1 + 4 + 2 + 0 + 0 + 0 + 210 + 600 + 0 + 0 + 250 + 600 + 100 + 0 + 0 + 0 + + + 1939 + 8 + UART #1 + 197 + + 197 + + 1 + 4 + 2 + 0 + 0 + 0 + 210 + 600 + 0 + 0 + 250 + 600 + 100 + 0 + 0 + 0 + + + 1940 + 9 + UART #2 + 197 + + 197 + + 1 + 4 + 2 + 0 + 0 + 0 + 210 + 600 + 0 + 0 + 250 + 600 + 100 + 0 + 0 + 0 + + + 1941 + 10 + UART #3 + 197 + + 197 + + 1 + 4 + 2 + 0 + 0 + 0 + 210 + 600 + 0 + 0 + 250 + 600 + 100 + 0 + 0 + 0 + + + 1942 + 11 + UART #4 + 197 + + 197 + + 1 + 4 + 2 + 0 + 0 + 0 + 210 + 600 + 0 + 0 + 250 + 600 + 100 + 0 + 0 + 0 + + + 1944 + 12 + Call Stack + 197 + + 197 + + 1 + 2 + 2 + 0 + 0 + 0 + 600 + 210 + 0 + 0 + 600 + 250 + 50 + 0 + 1 + 0 + + + 1507 + 13 + Call Stack + 1944 + + 197 + + 1 + 4 + 2 + 0 + 0 + 0 + 600 + 210 + 0 + 0 + 600 + 250 + 50 + 0 + 1 + 0 + + + 1935 + 14 + Locals + 1944 + + 197 + + 1 + 4 + 2 + 0 + 0 + 0 + 210 + 600 + 0 + 0 + 250 + 600 + 100 + 0 + 1 + 0 + + + 1936 + 15 + Watch 1 + 1944 + + 197 + + 1 + 4 + 2 + 0 + 0 + 0 + 210 + 600 + 0 + 0 + 250 + 600 + 100 + 0 + 1 + 0 + + + 1937 + 16 + Watch 2 + 1944 + + 197 + + 1 + 4 + 2 + 0 + 0 + 0 + 210 + 600 + 0 + 0 + 250 + 600 + 100 + 0 + 0 + 0 + + + 1465 + 17 + Memory 1 + 1944 + + 197 + + 1 + 4 + 2 + 0 + 0 + 0 + 210 + 600 + 0 + 0 + 250 + 600 + 100 + 0 + 1 + 0 + + + 1466 + 18 + Memory 2 + 1944 + + 197 + + 1 + 4 + 2 + 0 + 0 + 0 + 210 + 600 + 0 + 0 + 250 + 600 + 100 + 0 + 0 + 0 + + + 1467 + 19 + Memory 3 + 1944 + + 197 + + 1 + 4 + 2 + 0 + 0 + 0 + 210 + 600 + 0 + 0 + 250 + 600 + 100 + 0 + 0 + 0 + + + 1468 + 20 + Memory 4 + 1944 + + 197 + + 1 + 4 + 2 + 0 + 0 + 0 + 210 + 600 + 0 + 0 + 250 + 600 + 100 + 0 + 0 + 0 + + + 1506 + 21 + Symbols + 1944 + + 197 + + 1 + 4 + 2 + 0 + 0 + 0 + 210 + 600 + 0 + 0 + 250 + 600 + 100 + 0 + 1 + 0 + + + 1005 + 22 + Project + 0 + + 0 + + 1 + 2 + 1 + 0 + 0 + 0 + 600 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 1 + 0 + + + 109 + 23 + Books + 1005 + + 1005 + + 1 + 4 + 2 + 0 + 0 + 0 + 600 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 195 + 24 + Functions + 1005 + + 1005 + + 1 + 4 + 2 + 0 + 0 + 0 + 600 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 196 + 25 + Templates + 1005 + + 1005 + + 1 + 4 + 2 + 0 + 0 + 0 + 600 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 38003 + 26 + Registers + 1005 + + 1005 + + 1 + 4 + 2 + 0 + 0 + 0 + 600 + 210 + 0 + 0 + 600 + 250 + 100 + 1 + 1 + 0 + + + 35885 + 27 + not set + 0 + + 0 + + 1 + 2 + 2 + 0 + 0 + 0 + 600 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35886 + 28 + not set + 35885 + + 35885 + + 1 + 4 + 2 + 0 + 0 + 0 + 600 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35887 + 29 + not set + 35885 + + 35885 + + 1 + 4 + 2 + 0 + 0 + 0 + 600 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35888 + 30 + not set + 35885 + + 35885 + + 1 + 4 + 2 + 0 + 0 + 0 + 600 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35889 + 31 + not set + 35885 + + 35885 + + 1 + 4 + 2 + 0 + 0 + 0 + 600 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35890 + 32 + not set + 35885 + + 35885 + + 1 + 4 + 2 + 0 + 0 + 0 + 600 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35891 + 33 + not set + 35885 + + 35885 + + 1 + 4 + 2 + 0 + 0 + 0 + 600 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35892 + 34 + not set + 35885 + + 35885 + + 1 + 4 + 2 + 0 + 0 + 0 + 600 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35893 + 35 + not set + 35885 + + 35885 + + 1 + 4 + 2 + 0 + 0 + 0 + 600 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35894 + 36 + not set + 35885 + + 35885 + + 1 + 4 + 2 + 0 + 0 + 0 + 600 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35895 + 37 + not set + 35885 + + 35885 + + 1 + 4 + 2 + 0 + 0 + 0 + 600 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35896 + 38 + not set + 35885 + + 35885 + + 1 + 4 + 2 + 0 + 0 + 0 + 600 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35897 + 39 + not set + 35885 + + 35885 + + 1 + 4 + 2 + 0 + 0 + 0 + 600 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35898 + 40 + not set + 35885 + + 35885 + + 1 + 4 + 2 + 0 + 0 + 0 + 600 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35899 + 41 + not set + 35885 + + 35885 + + 1 + 4 + 2 + 0 + 0 + 0 + 600 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35900 + 42 + not set + 35885 + + 35885 + + 1 + 4 + 2 + 0 + 0 + 0 + 600 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35901 + 43 + not set + 35885 + + 35885 + + 1 + 4 + 2 + 0 + 0 + 0 + 600 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35902 + 44 + not set + 35885 + + 35885 + + 1 + 4 + 2 + 0 + 0 + 0 + 600 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35903 + 45 + not set + 35885 + + 35885 + + 1 + 4 + 2 + 0 + 0 + 0 + 600 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35904 + 46 + not set + 35885 + + 35885 + + 1 + 4 + 2 + 0 + 0 + 0 + 600 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35905 + 47 + not set + 35885 + + 35885 + + 1 + 4 + 2 + 0 + 0 + 0 + 600 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 203 + 48 + Disassembly + 0 + + 0 + + 1 + 2 + 3 + 0 + 0 + 0 + 210 + 600 + 0 + 0 + 250 + 600 + 100 + 0 + 1 + 0 + + + 1913 + 49 + Instruction Trace + 203 + + 203 + + 1 + 4 + 2 + 0 + 0 + 0 + 600 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35824 + 50 + Logic Analyzer + 0 + + 0 + + 1 + 6 + 0 + 0 + 0 + 0 + 210 + 600 + 0 + 0 + 250 + 600 + 1 + 0 + 0 + 0 + + + 343 + 51 + Performance Analyzer + 203 + + 203 + + 1 + 4 + 2 + 0 + 0 + 0 + 210 + 600 + 0 + 0 + 250 + 600 + 100 + 0 + 0 + 0 + + + 204 + 52 + Performance Analyzer + 203 + + 203 + + 1 + 4 + 2 + 0 + 0 + 0 + 210 + 600 + 0 + 0 + 250 + 600 + 100 + 0 + 0 + 0 + + + 346 + 53 + Code Coverage + 203 + + 203 + + 1 + 4 + 2 + 0 + 0 + 0 + 210 + 600 + 0 + 0 + 250 + 600 + 100 + 0 + 0 + 0 + + + + + + 1 + 0 + + 100 + 0 + + + .\User.c + 0 + 198 + 201 + + + + + +
diff --git a/CL2.0_uvproj.bak b/CL2.0_uvproj.bak new file mode 100644 index 0000000..fe007f1 --- /dev/null +++ b/CL2.0_uvproj.bak @@ -0,0 +1,410 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + + Target 1 + 0x0 + MCS-51 + + + XC886CLM-8FF + Infineon + IRAM(0-0xFF) XRAM(0xF000-0xF5FF) IROM(0-0x5FFF) IROM2(0xA000-0xBFFF) CLOCK(24000000) MOD517DP + XC800_FLOAD.EXE ("#H" f") + "LIB\START_XC88x.A51" ("Infineon XC800 Startup Code") + + 4021 + XC886CLM.H + + + + + + + + + + 0 + + + + Infineon\ + Infineon\ + + 0 + 0 + 0 + 0 + 1 + + .\output\ + CL2.0 + 1 + 0 + 1 + 1 + 1 + .\output\ + 0 + 0 + 0 + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + 0 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 65535 + + + S8051.DLL + -m8051EW + DCore51.DLL + -pXC886 + S8051.DLL + + TCore51.DLL + -pXC886 + + + + 0 + 0 + 0 + 0 + 16 + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + + + 1 + 1 + 0 + 1 + 1 + 1 + 0 + 1 + + 0 + -1 + + + + + + + + + + + + + + BIN\DAS2XC800.DLL + + + + + 1 + 0 + 0 + 0 + 1 + 4100 + + BIN\DAS2XC800.DLL + "XC800_FLOAD.EXE" ("#H" f") + + + + + 2 + 0 + 2 + 0 + 0 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + + + 0 + 0x0 + 0xffff + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x6000 + + + 0 + 0x0 + 0x100 + + + 0 + 0xf000 + 0x600 + + + 0 + 0x0 + 0x0 + + + 0 + 0xa000 + 0x2000 + + + + + 0 + 0 + 1 + 0 + 1 + 3 + 9 + 2 + 1 + 1 + 1 + 8192 + + + + + + + + + 0 + 1 + 0 + 0 + + + + + + + + + 0 + 0 + 1 + 0 + 2 + 1 + + RESERVE (I:0xC0-I:0xFF) + + + + + + CODE(C:0x2100-C:0x5FFF) + + ?C_C51STARTUP(C:0x2100), ?PR?main?MAIN + + + + + + + + + + + + + + + + + + + Dave Files + + + START_XC.a51 + 2 + .\START_XC.a51 + + + MAIN.C + 1 + .\MAIN.C + + + IO.C + 1 + .\IO.C + + + SHARED_INT.C + 1 + .\SHARED_INT.C + + + CAN.C + 1 + .\CAN.C + + + T2.C + 1 + .\T2.C + + + WDT.C + 1 + .\WDT.C + + + + + User Files + + + User.c + 1 + .\User.c + + + boot.c + 1 + .\boot.c + + + XC88x_FLHANDLER.ASM + 2 + .\XC88x_FLHANDLER.ASM + + + + + + + +
diff --git a/Config.H b/Config.H new file mode 100644 index 0000000..507123b --- /dev/null +++ b/Config.H @@ -0,0 +1,209 @@ +#ifndef _Configfff_H_ +#define _Configfff_H_ + + +//-----宏定义----------------------------------------------------------------- +//开关部分-------------------------------------------------------------- +//支持平台: +// ___XC164CM___ SSC工作于查询方式 +// ___XC2765X___ SSC工作于查询方式 +#define ___XC886CLM___ + +#define NumChipSw 2//定义MC33993芯片的数量 +#define DF_SwInNum 1//定义采集芯片的数量 +#define DF_SwOutNum 1//定义输出芯片的数量 + +#define Tog 2 +#define On 1 +#define Off 0 + +//#define N 6 //N为偶数 + + +#define uchar unsigned char +#define ulong unsigned long +#define uint unsigned int +//如果有CAN数据接收,需要定义___CANRX___ +//#define ___CANRX___ + +//看门狗 +//#define DF_WDT P1_OUT_P0 + +//定义 +#define SwIn01 P3_1 +#define SwIn02 P3_7 +#define SwIn03 P2_4 +#define SwIn04 P2_7 +#define SwIn05 P2_6 +#define SwIn06 P2_5 +#define SwIn07 P3_0 +#define SwIn08 P3_6 + +#define SwOut01 P3_2 +#define SwOut02 P3_4 +#define SwOut03 P4_0 +#define SwOut04 P0_7 +#define SwOut05 P0_0 +#define SwOut06 P0_1 +#define SwOut07 P1_3 +#define SwOut08 P1_5 +#define SwOut09 P0_3 +#define SwOut10 P4_1 +#define SwOut11 P3_3 +#define SwOut12 P3_3 +#define SwOut13 P1_4 +#define SwOut14 P1_2 +#define SwOut15 P0_2 +#define SwOut16 P1_7 + +//LED输出数据结构 +typedef union _SwOut +{ + struct + { +// ubyte Arr[DF_SwOutNum][4]; //芯片数量改变需修改 + ubyte Arr[DF_SwOutNum][4]; //芯片数量改变需修改 + }ArrData; + struct + { +//-------输出芯片1------------------------------- + unsigned int S21 : 1;//FLGSP0 + unsigned int S22 : 1;//FLGSP1 + unsigned int S23 : 1;//FLGSP2 + unsigned int S24 : 1;//FLGSP3 + unsigned int S34 : 1;//FLGSP4 + unsigned int S33 : 1;//FLGSP5 + unsigned int S32 : 1;//FLGSP6 + unsigned int S31 : 1;//FLGSP7 + unsigned int S25 : 1;//FLGSG0 + unsigned int S26 : 1;//FLGSG1 + unsigned int S27 : 1;//FLGSG2 + unsigned int S28 : 1;//FLGSG3 + unsigned int S30 : 1;//FLGSG4 + unsigned int S29 : 1;//FLGSG5 + unsigned int S43 : 1;//FLGSG6 + unsigned int S35 : 1;//FLGSG7 + unsigned int S36 : 1;//FLGSG8 + unsigned int S37 : 1;//FLGSG9 + unsigned int S38 : 1;//FLGSG10 + unsigned int S40 : 1;//FLGSG11 + unsigned int S39 : 1;//FLGSG12 + unsigned int S44 : 1;//FLGSG13 + unsigned int : 1; + unsigned int : 1; + unsigned int : 8; +//------------------------------------------------- + }BitData; +}UnSwOut,*pUnSwOut; + + +//CAN部分-------------------------------------------------------------- +#define NumTxCan 1 +#define NumRxCan 1//15 +#define NumTxCanMoS 16 //发送消息存放的消息对象起始 +#define NumRxCanMoS 0 //接收消息存放的消息对象起始 +#define ___CANRX___ + +//CAN信息结构 +typedef union _InfCan +{ + struct + { + ubyte Arr[1][8]; + ubyte ArrRX[2][8]; + }ArrData; + struct + { +//----------发送0-0x14000001 ------------------------------------------- + unsigned int Sta09 : 1 ; //FlgSp1 + unsigned int Sta10 : 1 ; //FlgSp0 + unsigned int Sta11 : 1 ; //FlgSp7 + unsigned int Sta12 : 1 ; //FlgSp6 + unsigned int Sta13 : 1 ; //FlgSp5 + unsigned int Sta14 : 1 ; //FlgSp4 + + unsigned int Sta15 : 1 ; //FlgSg7 + unsigned int Sta16 : 1 ; //FlgSg8 + + unsigned int Sta01 : 1 ; //FlgSg4 + unsigned int Sta02 : 1 ; //FlgSg5 + unsigned int Sta03 : 1 ; //FlgSg3 + unsigned int Sta04 : 1 ; //FlgSg2 + unsigned int Sta05 : 1 ; //FlgSg1 + unsigned int Sta06 : 1 ; //FlgSg0 + unsigned int Sta07 : 1 ; //FlgSp3 + unsigned int Sta08 : 1 ; //FlgSp2 + + unsigned int CanTx3 : 8 ; //// + + unsigned int Dia01 : 1 ; //FlgSg4 + unsigned int Dia02 : 1 ; //FlgSg5 + unsigned int Dia03 : 1 ; //FlgSg3 + unsigned int Dia04 : 1 ; //FlgSg2 + unsigned int Dia05 : 1 ; //FlgSg1 + unsigned int Dia06 : 1 ; //FlgSg0 + unsigned int Dia07 : 1 ; //FlgSp3 + unsigned int Dia08 : 1 ; //FlgSp2 + + unsigned int CanTx5 : 8 ; //// + unsigned int CanTx4 : 8 ; //// + unsigned int CanTx7 : 8 ; //// + unsigned int CanTx6 : 8 ; //// + +//----------接收0x14000002 -------------------------------------------- + unsigned int D29 : 1 ; //FlgSp1 + unsigned int D30 : 1 ; //FlgSp0 + unsigned int D31 : 1 ; //FlgSp7 + unsigned int D32 : 1 ; //FlgSp6 + unsigned int D33 : 1 ; //FlgSp5 + unsigned int D34 : 1 ; //FlgSp4 + unsigned int D35 : 1 ; //FlgSg7 + unsigned int D36 : 1 ; //FlgSg8 + + unsigned int D21 : 1 ; //FlgSg4 + unsigned int D22 : 1 ; //FlgSg5 + unsigned int D23 : 1 ; //FlgSg3 + unsigned int D24 : 1 ; //FlgSg2 + unsigned int D25 : 1 ; //FlgSg1 + unsigned int D26 : 1 ; //FlgSg0 + unsigned int D27 : 1 ; //FlgSp3 + unsigned int D28 : 1 ; //FlgSp2 + + unsigned int CanRx3 : 8 ; //// + unsigned int CanRx2 : 8 ; //// + unsigned int CanRx5 : 8 ; //// + unsigned int CanRx4 : 8 ; //// + unsigned int CanRx7 : 8 ; //// + unsigned int CanRx6 : 8 ; //// + +//----------接收0x14000003 -------------------------------------------- + unsigned int Pwm_01 : 4 ; //FlgSp1 + unsigned int Pwm_02 : 4 ; //FlgSp0 + unsigned int Pwm_03 : 4 ; //FlgSp7 + unsigned int Pwm_04 : 4 ; //FlgSp6 + unsigned int Pwm_05 : 4 ; //FlgSp5 + unsigned int Pwm_06 : 4 ; //FlgSp4 + unsigned int Pwm_07 : 4 ; //FlgSg7 + unsigned int Pwm_08 : 4 ; //FlgSg8 + unsigned int Pwm_09 : 4 ; //FlgSg4 + unsigned int Pwm_10 : 4 ; //FlgSg5 + unsigned int Pwm_11 : 4 ; //FlgSg3 + unsigned int Pwm_12 : 4 ; //FlgSg2 + unsigned int Pwm_13 : 4 ; //FlgSg1 + unsigned int Pwm_14 : 4 ; //FlgSg0 + unsigned int Pwm_15 : 4 ; //FlgSp3 + unsigned int Pwm_16 : 4 ; //FlgSp2 + + }BitData; +}UnInfCan,*pInfCan; + + + + + + +//-----文件包含---------------------------------------------- +#include "user.H" +#include "boot.H" +#include "temperature.H" +#endif \ No newline at end of file diff --git a/Config.H.bak b/Config.H.bak new file mode 100644 index 0000000..8f29e50 --- /dev/null +++ b/Config.H.bak @@ -0,0 +1,247 @@ +#ifndef _Configfff_H_ +#define _Configfff_H_ + + +//-----宏定义----------------------------------------------------------------- +//开关部分-------------------------------------------------------------- +//支持平台: +// ___XC164CM___ SSC工作于查询方式 +// ___XC2765X___ SSC工作于查询方式 +#define ___XC886CLM___ + +#define NumChipSw 2//定义MC33993芯片的数量 +#define DF_SwInNum 1//定义采集芯片的数量 +#define DF_SwOutNum 1//定义输出芯片的数量 + +#define Tog 2 +#define On 1 +#define Off 0 + +//#define N 6 //N为偶数 + + +#define uchar unsigned char +#define ulong unsigned long +#define uint unsigned int +//如果有CAN数据接收,需要定义___CANRX___ +//#define ___CANRX___ + +//看门狗 +//#define DF_WDT P1_OUT_P0 + +//定义 +#define SwIn01 P3_0 +#define SwIn02 P3_7 +#define SwIn03 P2_4 +#define SwIn04 P2_5 +#define SwIn05 P3_1 +#define SwIn06 P3_6 +#define SwIn07 P2_6 +#define SwIn08 P2_7 +#define SwOut01 P3_2 +#define SwOut02 P3_4 +#define SwOut03 P4_0 +#define SwOut04 P0_7 +#define SwOut05 P0_0 +#define SwOut06 P0_1 +#define SwOut07 P1_3 +#define SwOut08 P1_5 +#define SwOut09 P0_3 +#define SwOut10 P4_1 +#define SwOut11 P3_5 +#define SwOut12 P3_3 +#define SwOut13 P1_4 +#define SwOut14 P1_2 +#define SwOut15 P0_2 +#define SwOut16 P1_7 + + +//开关采集数据结构,和硬件相关,硬件修改需要响应修改 +typedef union _SwSample +{ + struct + { + ubyte Arr[DF_SwInNum][4]; + }ArrData; + struct + { +//-------采集芯片1------------------------------- + unsigned int S6 : 1;//FlgSg0 + unsigned int S5 : 1;//FlgSg1 + unsigned int S4 : 1;//FlgSg2 + unsigned int S3 : 1;//FlgSg3 + unsigned int S1 : 1;//FlgSg4 + unsigned int S2 : 1;//FlgSg5 + unsigned int S41 : 1;//FlgSg6 + unsigned int S15 : 1;//FlgSg7 + unsigned int S16 : 1;//FlgSg8 + unsigned int S17 : 1;//FlgSg9 + unsigned int S18 : 1;//FlgSg10 + unsigned int S20 : 1;//FlgSg11 + unsigned int S19 : 1;//FlgSg12 + unsigned int S42 : 1;//FlgSg13 + unsigned int S10 : 1;//FlgSp0 + unsigned int S9 : 1;//FlgSp1 + unsigned int S8 : 1;//FlgSp2 + unsigned int S7 : 1;//FlgSp3 + unsigned int S14 : 1;//FlgSp4 + unsigned int S13 : 1;//FlgSp5 + unsigned int S12 : 1;//FlgSp6 + unsigned int S11 : 1;//FlgSp7 + unsigned int : 1;//FlgInt + unsigned int : 1;//FlgThem + unsigned int : 8;// + + }BitData; +}UnSwSample,*pUnSwSample; + +//LED输出数据结构 +typedef union _SwOut +{ + struct + { + ubyte Arr[DF_SwOutNum][4]; //芯片数量改变需修改 + }ArrData; + struct + { +//-------输出芯片1------------------------------- + unsigned int S21 : 1;//FLGSP0 + unsigned int S22 : 1;//FLGSP1 + unsigned int S23 : 1;//FLGSP2 + unsigned int S24 : 1;//FLGSP3 + unsigned int S34 : 1;//FLGSP4 + unsigned int S33 : 1;//FLGSP5 + unsigned int S32 : 1;//FLGSP6 + unsigned int S31 : 1;//FLGSP7 + unsigned int S25 : 1;//FLGSG0 + unsigned int S26 : 1;//FLGSG1 + unsigned int S27 : 1;//FLGSG2 + unsigned int S28 : 1;//FLGSG3 + unsigned int S30 : 1;//FLGSG4 + unsigned int S29 : 1;//FLGSG5 + unsigned int S43 : 1;//FLGSG6 + unsigned int S35 : 1;//FLGSG7 + unsigned int S36 : 1;//FLGSG8 + unsigned int S37 : 1;//FLGSG9 + unsigned int S38 : 1;//FLGSG10 + unsigned int S40 : 1;//FLGSG11 + unsigned int S39 : 1;//FLGSG12 + unsigned int S44 : 1;//FLGSG13 + unsigned int : 1; + unsigned int : 1; + unsigned int : 8; +//------------------------------------------------- + }BitData; +}UnSwOut,*pUnSwOut; + + +//CAN部分-------------------------------------------------------------- +#define NumTxCan 1 +#define NumRxCan 1//15 +#define NumTxCanMoS 16 //发送消息存放的消息对象起始 +#define NumRxCanMoS 0 //接收消息存放的消息对象起始 +#define ___CANRX___ + +//CAN信息结构 +typedef union _InfCan +{ + struct + { + ubyte Arr[1][8]; + ubyte ArrRX[2][8]; + }ArrData; + struct + { +//----------发送0-0x10000001 ------------------------------------------- + unsigned int Sta09 : 1 ; //FlgSp1 + unsigned int Sta10 : 1 ; //FlgSp0 + unsigned int Sta11 : 1 ; //FlgSp7 + unsigned int Sta12 : 1 ; //FlgSp6 + unsigned int Sta13 : 1 ; //FlgSp5 + unsigned int Sta14 : 1 ; //FlgSp4 + unsigned int Sta15 : 1 ; //FlgSg7 + unsigned int Sta16 : 1 ; //FlgSg8 + + unsigned int Sta01 : 1 ; //FlgSg4 + unsigned int Sta02 : 1 ; //FlgSg5 + unsigned int Sta03 : 1 ; //FlgSg3 + unsigned int Sta04 : 1 ; //FlgSg2 + unsigned int Sta05 : 1 ; //FlgSg1 + unsigned int Sta06 : 1 ; //FlgSg0 + unsigned int Sta07 : 1 ; //FlgSp3 + unsigned int Sta08 : 1 ; //FlgSp2 + + unsigned int CanTx3 : 8 ; //// + + unsigned int Dia01 : 1 ; //FlgSg4 + unsigned int Dia02 : 1 ; //FlgSg5 + unsigned int Dia03 : 1 ; //FlgSg3 + unsigned int Dia04 : 1 ; //FlgSg2 + unsigned int Dia05 : 1 ; //FlgSg1 + unsigned int Dia06 : 1 ; //FlgSg0 + unsigned int Dia07 : 1 ; //FlgSp3 + unsigned int Dia08 : 1 ; //FlgSp2 + + unsigned int CanTx5 : 8 ; //// + unsigned int CanTx4 : 8 ; //// + unsigned int CanTx7 : 8 ; //// + unsigned int CanTx6 : 8 ; //// + +//----------接收0x10000002 -------------------------------------------- + unsigned int D29 : 1 ; //FlgSp1 + unsigned int D30 : 1 ; //FlgSp0 + unsigned int D31 : 1 ; //FlgSp7 + unsigned int D32 : 1 ; //FlgSp6 + unsigned int D33 : 1 ; //FlgSp5 + unsigned int D34 : 1 ; //FlgSp4 + unsigned int D35 : 1 ; //FlgSg7 + unsigned int D36 : 1 ; //FlgSg8 + + unsigned int D21 : 1 ; //FlgSg4 + unsigned int D22 : 1 ; //FlgSg5 + unsigned int D23 : 1 ; //FlgSg3 + unsigned int D24 : 1 ; //FlgSg2 + unsigned int D25 : 1 ; //FlgSg1 + unsigned int D26 : 1 ; //FlgSg0 + unsigned int D27 : 1 ; //FlgSp3 + unsigned int D28 : 1 ; //FlgSp2 + + unsigned int CanRx3 : 8 ; //// + unsigned int CanRx2 : 8 ; //// + unsigned int CanRx5 : 8 ; //// + unsigned int CanRx4 : 8 ; //// + unsigned int CanRx7 : 8 ; //// + unsigned int CanRx6 : 8 ; //// + +//----------接收0x14000003 -------------------------------------------- + unsigned int Pwm01 : 4 ; //FlgSp1 + unsigned int Pwm02 : 4 ; //FlgSp0 + unsigned int Pwm03 : 4 ; //FlgSp7 + unsigned int Pwm04 : 4 ; //FlgSp6 + unsigned int Pwm05 : 4 ; //FlgSp5 + unsigned int Pwm06 : 4 ; //FlgSp4 + unsigned int Pwm07 : 4 ; //FlgSg7 + unsigned int Pwm08 : 4 ; //FlgSg8 + unsigned int Pwm09 : 4 ; //FlgSg4 + unsigned int Pwm10 : 4 ; //FlgSg5 + unsigned int Pwm11 : 4 ; //FlgSg3 + unsigned int Pwm12 : 4 ; //FlgSg2 + unsigned int Pwm13 : 4 ; //FlgSg1 + unsigned int Pwm14 : 4 ; //FlgSg0 + unsigned int Pwm15 : 4 ; //FlgSp3 + unsigned int Pwm16 : 4 ; //FlgSp2 + + }BitData; +}UnInfCan,*pInfCan; + + + + + + + + +//-----文件包含---------------------------------------------- +#include "user.H" +#include "boot.H" +#endif \ No newline at end of file diff --git a/ExtDll.iex b/ExtDll.iex new file mode 100644 index 0000000..b661f48 --- /dev/null +++ b/ExtDll.iex @@ -0,0 +1,2 @@ +[EXTDLL] +Count=0 diff --git a/IO.C b/IO.C new file mode 100644 index 0000000..0465a69 --- /dev/null +++ b/IO.C @@ -0,0 +1,375 @@ +//**************************************************************************** +// @Module GPIO +// @Filename IO.C +// @Project CL2.0.dav +//---------------------------------------------------------------------------- +// @Controller Infineon XC886CLM-8FF +// +// @Compiler Keil +// +// @Codegenerator 1.3 +// +// @Description: This file contains functions that use the IO module. +// +//---------------------------------------------------------------------------- +// @Date 2021/9/7 09:54:12 +// +//**************************************************************************** + +// USER CODE BEGIN (IO_General,1) + +// USER CODE END + + + +//**************************************************************************** +// @Project Includes +//**************************************************************************** + +#include "MAIN.H" + +// USER CODE BEGIN (IO_General,2) + +// USER CODE END + + +//**************************************************************************** +// @Macros +//**************************************************************************** + +// USER CODE BEGIN (IO_General,3) + +// USER CODE END + + +//**************************************************************************** +// @Defines +//**************************************************************************** + +// USER CODE BEGIN (IO_General,4) + +// USER CODE END + + +//**************************************************************************** +// @Typedefs +//**************************************************************************** + +// USER CODE BEGIN (IO_General,5) + +// USER CODE END + + +//**************************************************************************** +// @Imported Global Variables +//**************************************************************************** + +// USER CODE BEGIN (IO_General,6) + +// USER CODE END + + +//**************************************************************************** +// @Global Variables +//**************************************************************************** + +// USER CODE BEGIN (IO_General,7) + +// USER CODE END + + +//**************************************************************************** +// @External Prototypes +//**************************************************************************** + +// USER CODE BEGIN (IO_General,8) + +// USER CODE END + + +//**************************************************************************** +// @Prototypes Of Local Functions +//**************************************************************************** + +// USER CODE BEGIN (IO_General,9) + +// USER CODE END + + +//**************************************************************************** +// @Function void IO_vInit(void) +// +//---------------------------------------------------------------------------- +// @Description This is the initialization function of the IO function +// library. It is assumed that the SFRs used by this library +// are in their reset state. +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2021/9/7 +// +//**************************************************************************** + +// USER CODE BEGIN (IO_Init,1) + +// USER CODE END + +void IO_vInit(void) +{ + // USER CODE BEGIN (IO_Init,2) + ubyte i = 0; +// ubyte j = 0; + // USER CODE END + + + /// *********************************************************************** + /// Note : All peripheral related IO configurations are done in the + /// respective peripheral modules (alternate functions selection) + /// + /// If no pins are selected DAvE assumes that registers are in default + /// settings + /// *********************************************************************** + + /// ----------------------------------------------------------------------- + /// Configuration of Port P0: + /// ----------------------------------------------------------------------- + /// P0.0: + /// - is used as general purpose output + /// - push/pull output is selected + /// - the pin status is low level + /// - pull-down device is assigned + /// P0.1: + /// - is used as general purpose output + /// - push/pull output is selected + /// - the pin status is low level + /// - pull-down device is assigned + /// P0.2: + /// - is used as general purpose output + /// - push/pull output is selected + /// - the pin status is low level + /// - pull-down device is assigned + /// P0.3: + /// - is used as general purpose output + /// - push/pull output is selected + /// - the pin status is low level + /// - pull-down device is assigned + /// P0.7: + /// - is used as general purpose output + /// - push/pull output is selected + /// - the pin status is low level + /// - pull-down device is assigned + + + SFR_PAGE(_pp1, noSST); // switch to page 1 + P0_PUDSEL = 0x70; // load pullup/pulldown select register + P0_PUDEN = 0xCF; // load pullup/pulldown enable register + + SFR_PAGE(_pp0, noSST); // switch to page 0 + P0_DIR = 0x8F; // load direction register + + /// ----------------------------------------------------------------------- + /// Configuration of Port P1: + /// ----------------------------------------------------------------------- + /// P1.0: + /// - is used as alternate input for the MCAN Node 0 Receiver Input + /// - pull-up device is assigned + /// P1.1: + /// - is used as alternate output for the MCAN Node 0 Transmitter Output + /// - push/pull output is selected + /// - pull-up device is assigned + /// P1.2: + /// - is used as general purpose output + /// - push/pull output is selected + /// - the pin status is low level + /// - pull-down device is assigned + /// P1.3: + /// - is used as general purpose output + /// - push/pull output is selected + /// - the pin status is low level + /// - pull-down device is assigned + /// P1.4: + /// - is used as general purpose output + /// - push/pull output is selected + /// - the pin status is low level + /// - pull-down device is assigned + /// P1.5: + /// - is used as general purpose output + /// - push/pull output is selected + /// - the pin status is low level + /// - pull-down device is assigned + /// P1.7: + /// - is used as general purpose output + /// - push/pull output is selected + /// - the pin status is low level + /// - pull-down device is assigned + + + SFR_PAGE(_pp1, noSST); // switch to page 1 + P1_PUDSEL = 0x43; // load pullup/pulldown select register + + SFR_PAGE(_pp0, noSST); // switch to page 0 + P1_DIR = 0xBC; // load direction register + + /// ----------------------------------------------------------------------- + /// Configuration of Port P2: + /// ----------------------------------------------------------------------- + /// P2.4: + /// - is used as general input + /// - input driver is enabled + /// - pull-up device is assigned + /// P2.5: + /// - is used as general input + /// - input driver is enabled + /// - pull-up device is assigned + /// P2.6: + /// - is used as general input + /// - input driver is enabled + /// - pull-up device is assigned + /// P2.7: + /// - is used as general input + /// - input driver is enabled + /// - pull-up device is assigned + + SFR_PAGE(_pp1, noSST); // switch to page 1 + P2_PUDEN = 0xF0; // load pullup/pulldown enable register + + /// ----------------------------------------------------------------------- + /// Configuration of Port P3: + /// ----------------------------------------------------------------------- + /// P3.0: + /// - is used as general input + /// - pull-up device is assigned + /// P3.1: + /// - is used as general input + /// - pull-up device is assigned + /// P3.2: + /// - is used as general purpose output + /// - push/pull output is selected + /// - the pin status is low level + /// - pull-down device is assigned + /// P3.3: + /// - is used as general purpose output + /// - push/pull output is selected + /// - the pin status is low level + /// - pull-down device is assigned + /// P3.4: + /// - is used as general purpose output + /// - push/pull output is selected + /// - the pin status is low level + /// - pull-down device is assigned + /// P3.5: + /// - is used as general purpose output + /// - open drain output is selected + /// - the pin status is high level + /// - pull-up device is assigned + /// P3.6: + /// - is used as general input + /// - pull-up device is assigned + /// P3.7: + /// - is used as general input + /// - pull-up device is assigned + + SFR_PAGE(_pp3, noSST); // switch to page 3 + P3_OD = 0x20; // load open-drain register + + SFR_PAGE(_pp1, noSST); // switch to page 1 + P3_PUDSEL = 0xE3; // load pullup/pulldown select register + P3_PUDEN = 0xFF; // load pullup/pulldown enable register + + SFR_PAGE(_pp0, noSST); // switch to page 0 + P3_DIR = 0x3C; // load direction register + P3_DATA = 0x20; // load data output register + /// ----------------------------------------------------------------------- + /// Configuration of Port P4: + /// ----------------------------------------------------------------------- + /// P4.0: + /// - is used as general purpose output + /// - push/pull output is selected + /// - the pin status is low level + /// - pull-down device is assigned + /// P4.1: + /// - is used as general purpose output + /// - push/pull output is selected + /// - the pin status is low level + /// - pull-down device is assigned + /// P4.3: + /// - is used as general purpose output + /// - push/pull output is selected + /// - the pin status is low level + /// - pull-down device is assigned + + + SFR_PAGE(_pp1, noSST); // switch to page 1 + P4_PUDSEL = 0x00; // load pullup/pulldown select register + P4_PUDEN = 0x0B; // load pullup/pulldown enable register + + SFR_PAGE(_pp0, noSST); // switch to page 0 + P4_DIR = 0x0B; // load direction register + + + // USER CODE BEGIN (IO_Init,3) + if((0x55 != RestartDataFlg1) || (0x55 != RestartDataFlg2))//只要有一个值不相同,说明为上电重启 + { + for(i=0;i<8;i++)//0xF5E8~0xF5FF + { + UnInfCan_1.ArrData.Arr[0][i] = 0; + UnInfCan_1.ArrData.ArrRX[0][i] = 0; + UnInfCan_1.ArrData.ArrRX[1][i] = 0; + } + RestartDataFlg1 = 0x55;//正常运行状态,就需要赋值为0x55 0xF5E7 + RestartDataFlg2 = 0x55;//地址0xF600 + + dfOut_01 = 0;//重新上电,初始化 + dfOut_02 = 0; + dfOut_03 = 0; + dfOut_04 = 0; + dfOut_05 = 0; + dfOut_06 = 0; + dfOut_07 = 0; + dfOut_08 = 0; + dfOut_09 = 0; + dfOut_10 = 0; + dfOut_11 = 0; + dfOut_12 = 0; + dfOut_13 = 0; + dfOut_14 = 0; + dfOut_15 = 0; + dfOut_16 = 0; + RestartDataKGF = 0; + } + else//重启,IO口就恢复 + { + dfOut_01 = (bit)(RestartDataKGF&0x0001); //20210906恢复IO口状态 解决KGF重启指示灯闪烁问题 注意ubyte转为bit类型,不是直接取最低为,而是根据该值为0就取0,为1就取1 + dfOut_02 = (bit)((RestartDataKGF >> 1)&0x0001); + dfOut_03 = (bit)((RestartDataKGF >> 2)&0x0001); + dfOut_04 = (bit)((RestartDataKGF >> 3)&0x0001); + dfOut_05 = (bit)((RestartDataKGF >> 4)&0x0001); + dfOut_06 = (bit)((RestartDataKGF >> 5)&0x0001); + dfOut_07 = (bit)((RestartDataKGF >> 6)&0x0001); + dfOut_08 = (bit)((RestartDataKGF >> 7)&0x0001); + dfOut_09 = (bit)((RestartDataKGF >> 8)&0x0001); + dfOut_10 = (bit)((RestartDataKGF >> 9)&0x0001); + dfOut_11 = (bit)((RestartDataKGF >> 10)&0x0001); + dfOut_12 = (bit)((RestartDataKGF >> 11)&0x0001); + dfOut_13 = (bit)((RestartDataKGF >> 12)&0x0001); + dfOut_14 = (bit)((RestartDataKGF >> 13)&0x0001); + dfOut_15 = (bit)((RestartDataKGF >> 14)&0x0001); + dfOut_16 = (bit)((RestartDataKGF >> 15)&0x0001); + } + + // USER CODE END + +} // End of function IO_vInit + + + + +// USER CODE BEGIN (IO_General,10) + +// USER CODE END + diff --git a/IO.H b/IO.H new file mode 100644 index 0000000..3605c35 --- /dev/null +++ b/IO.H @@ -0,0 +1,248 @@ +//**************************************************************************** +// @Module GPIO +// @Filename IO.H +// @Project CL2.0.dav +//---------------------------------------------------------------------------- +// @Controller Infineon XC886CLM-8FF +// +// @Compiler Keil +// +// @Codegenerator 1.3 +// +// @Description: This file contains all function prototypes and macros for +// the IO module. +// +//---------------------------------------------------------------------------- +// @Date 2025/1/18 20:45:29 +// +//**************************************************************************** + +// USER CODE BEGIN (IO_Header,1) + +// USER CODE END + + + +#ifndef _IO_H_ +#define _IO_H_ + +//**************************************************************************** +// @Project Includes +//**************************************************************************** + +// USER CODE BEGIN (IO_Header,2) + +// USER CODE END + + +//**************************************************************************** +// @Macros +//**************************************************************************** + +// USER CODE BEGIN (IO_Header,3) + +// USER CODE END + + +//**************************************************************************** +// @Defines +//**************************************************************************** + +// USER CODE BEGIN (IO_Header,4) + +// USER CODE END + +// Port 0 + +sbit P0_0 = 0x80; +sbit P0_1 = 0x81; +sbit P0_2 = 0x82; +sbit P0_3 = 0x83; +sbit P0_4 = 0x84; +sbit P0_5 = 0x85; +sbit P0_7 = 0x87; + +// Port 1 + +sbit P1_0 = 0x90; +sbit P1_1 = 0x91; +sbit P1_2 = 0x92; +sbit P1_3 = 0x93; +sbit P1_4 = 0x94; +sbit P1_5 = 0x95; +sbit P1_6 = 0x96; +sbit P1_7 = 0x97; + +// Port 2 + +sbit P2_0 = 0xA0; +sbit P2_1 = 0xA1; +sbit P2_2 = 0xA2; +sbit P2_3 = 0xA3; +sbit P2_4 = 0xA4; +sbit P2_5 = 0xA5; +sbit P2_6 = 0xA6; +sbit P2_7 = 0xA7; + +// Port 3 + +sbit P3_0 = 0xB0; +sbit P3_1 = 0xB1; +sbit P3_2 = 0xB2; +sbit P3_3 = 0xB3; +sbit P3_4 = 0xB4; +sbit P3_5 = 0xB5; +sbit P3_6 = 0xB6; +sbit P3_7 = 0xB7; + +// Port 4 + +sbit P4_0 = 0xC8; +sbit P4_1 = 0xC9; +sbit P4_3 = 0xCB; + +//**************************************************************************** +// @Typedefs +//**************************************************************************** + +// USER CODE BEGIN (IO_Header,5) + +// USER CODE END + + +//**************************************************************************** +// @Imported Global Variables +//**************************************************************************** + +// USER CODE BEGIN (IO_Header,6) + +// USER CODE END + + +//**************************************************************************** +// @Global Variables +//**************************************************************************** + +// USER CODE BEGIN (IO_Header,7) + +// USER CODE END + + +//**************************************************************************** +// @Prototypes Of Global Functions +//**************************************************************************** + +void IO_vInit(void); + + +// USER CODE BEGIN (IO_Header,8) + +// USER CODE END + + +//**************************************************************************** +// @Macro IO_ubReadPin(PinName) +// +//---------------------------------------------------------------------------- +// @Description This macro returns the status of the chosen portpin. +// Note: +// 'PinName' identifies the pin of a bit-addressable port. The +// default names can be changed in the port configuration +// dialog. +// +//---------------------------------------------------------------------------- +// @Returnvalue Status of the chosen portpin +// +//---------------------------------------------------------------------------- +// @Parameters PinName: +// Pin to be read +// +//---------------------------------------------------------------------------- +// @Date 2025/1/18 +// +//**************************************************************************** + +#define IO_ubReadPin(PinName) PinName + +//**************************************************************************** +// @Macro IO_vSetPin(PinName) +// +//---------------------------------------------------------------------------- +// @Description The chosen portpin is set to '1'. +// Note: +// 'PinName' identifies the pin of a bit-addressable port. The +// default names can be changed in the port configuration +// dialog. +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters PinName: +// Pin to be set to '1' +// +//---------------------------------------------------------------------------- +// @Date 2025/1/18 +// +//**************************************************************************** + +#define IO_vSetPin(PinName) PinName = 1 + +//**************************************************************************** +// @Macro IO_vResetPin(PinName) +// +//---------------------------------------------------------------------------- +// @Description The chosen portpin is set to '0'. +// Note: +// 'PinName' identifies the pin of a bit-addressable port. The +// default names can be changed in the port configuration +// dialog. +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters PinName: +// Pin to be set to '0' +// +//---------------------------------------------------------------------------- +// @Date 2025/1/18 +// +//**************************************************************************** + +#define IO_vResetPin(PinName) PinName = 0 + +//**************************************************************************** +// @Macro IO_vTogglePin(PinName) +// +//---------------------------------------------------------------------------- +// @Description The chosen portpin will be toggled. +// Note: +// 'PinName' identifies the pin of a bit-addressable port. The +// default names can be changed in the port configuration +// dialog. +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters PinName: +// Pin to be toggled +// +//---------------------------------------------------------------------------- +// @Date 2025/1/18 +// +//**************************************************************************** + +#define IO_vTogglePin(PinName) PinName ^= 1 + +//**************************************************************************** +// @Interrupt Vectors +//**************************************************************************** + +// USER CODE BEGIN (IO_Header,9) + +// USER CODE END + + +#endif // ifndef _IO_H_ diff --git a/MAIN.C b/MAIN.C new file mode 100644 index 0000000..08a19a6 --- /dev/null +++ b/MAIN.C @@ -0,0 +1,271 @@ +//**************************************************************************** +// @Module Project Settings +// @Filename MAIN.C +// @Project CL2.0.dav +//---------------------------------------------------------------------------- +// @Controller Infineon XC886CLM-8FF +// +// @Compiler Keil +// +// @Codegenerator 1.3 +// +// @Description This file contains the Project initialization function. +// +//---------------------------------------------------------------------------- +// @Date 2025/1/18 20:45:29 +// +//**************************************************************************** + +// USER CODE BEGIN (MAIN_General,1) + +// USER CODE END + + + +//**************************************************************************** +// @Project Includes +//**************************************************************************** + +#include "MAIN.H" + +// USER CODE BEGIN (MAIN_General,2) + +// USER CODE END + + +//**************************************************************************** +// @Macros +//**************************************************************************** + +// USER CODE BEGIN (MAIN_General,3) + +// USER CODE END + + +//**************************************************************************** +// @Defines +//**************************************************************************** + +// USER CODE BEGIN (MAIN_General,4) + +// USER CODE END + + +//**************************************************************************** +// @Typedefs +//**************************************************************************** + +// USER CODE BEGIN (MAIN_General,5) + +// USER CODE END + + +//**************************************************************************** +// @Imported Global Variables +//**************************************************************************** + +// USER CODE BEGIN (MAIN_General,6) + +// USER CODE END + + +//**************************************************************************** +// @Global Variables +//**************************************************************************** + +// USER CODE BEGIN (MAIN_General,7) + +// USER CODE END + + +//**************************************************************************** +// @External Prototypes +//**************************************************************************** + + +// USER CODE BEGIN (MAIN_General,8) + +// USER CODE END + + +//**************************************************************************** +// @Prototypes Of Local Functions +//**************************************************************************** + +// USER CODE BEGIN (MAIN_General,9) + +// USER CODE END + + +//**************************************************************************** +// @Function void MAIN_vInit(void) +// +//---------------------------------------------------------------------------- +// @Description This function initializes the microcontroller. It is +// assumed that the SFRs are in their reset state. +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2025/1/18 +// +//**************************************************************************** + +// USER CODE BEGIN (MAIN_Init,1) + +// USER CODE END + +void MAIN_vInit(void) +{ + // USER CODE BEGIN (MAIN_Init,2) + + // USER CODE END + + /// ----------------------------------------------------------------------- + /// Configuration of the System Clock: + /// ----------------------------------------------------------------------- + /// - External Osc is selected (configuration is done in the startup file + /// 'START_XC.A51') + /// - PLL Mode, NDIV = 24 + /// - input frequency is 8 MHz + + + // FCLK runs at 2 times the frequency of PCLK. + SFR_PAGE(_su1, noSST); // switch to page1 + + CMCON = 0x10; // load Clock Control Register + + SFR_PAGE(_su0, noSST); // switch to page0 + + + /// ********************************************************************************* + /// Note : All peripheral related IO configurations are done in the + /// respective peripheral modules (alternate functions selection) + /// ********************************************************************************* + + /// Initialization of module 'GPIO' + IO_vInit(); + + /// Initialization of module 'Timer 2' + T2_vInit(); + + /// Initialization of module 'Watch Dog Timer' + WDT_vInit(); + + /// Initialization of module 'MultiCAN Controller ' + CAN_vInit(); + + /// Initialization of 'Shared interrupts' + SHINT_vInit(); + + // Interrupt Priority + + IP = 0x00; // load Interrupt Priority Register + IPH = 0x00; // load Interrupt Priority High Register + IP1 = 0x00; // load Interrupt Priority 1 Register + IPH1 = 0x00; // load Interrupt Priority 1 High Register + + + // USER CODE BEGIN (MAIN_Init,3) + + // USER CODE END + + //// Interrupt structure 2 mode 0 is selected. + + //// Interrupt service routine choice 2 is selected. + + // globally enable interrupts + EA = 1; + +} // End of function MAIN_vInit + + +//**************************************************************************** +// @Function void main(void) +// +//---------------------------------------------------------------------------- +// @Description This is the main function. +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2025/1/18 +// +//**************************************************************************** + +// USER CODE BEGIN (MAIN_Main,1) + +// USER CODE END + +void main(void) +{ + // USER CODE BEGIN (MAIN_Main,2) +// ulong i,j; +// static ubyte tmp[8] = {0}; +// for(j=0;j<200;j++){for(i=0;i<133;i++);} + + // USER CODE END + + MAIN_vInit(); + + // USER CODE BEGIN (MAIN_Main,3) + SCU_PAGE = 0; + SP = 0xC0; // Initialize Stack Pointer to 0xC0; +// CanTransmit(); + +// BM8563_InitTime(); +// BM8563_Set4HourAlarm();// +// KGF_PIN = 1;//KGF唤醒 + + SetConfig(CFG_MPS_Single,CFG_Repeatbility_High); +// FlgCan_1 = 1;//复位后延时一段时间再调用CAN发送 + // USER CODE END + +// SetConfig(1,CFG_MPS_Single,CFG_Repeatbility_High); + +// RomNum = Search_ROM(romid);//搜索当前总线上的所有芯片,将ROM ID存入数组romid,并返回芯片个数 + + + while(1) + { + + // USER CODE BEGIN (MAIN_Main,4) +// for(j=0;j<200;j++){for(i=0;i<133;i++)WDT_vRefresh();} +// tmp[3] = (ubyte)CntCan_1; +// tmp[2] = (ubyte)(CntCan_1>>8); + +// SwSample(); + RestartDataFlg1 = 0x55;//正常运行状态,就需要赋值为0x55 + RestartDataFlg2 = 0x55; + + CanRXTX(); + CanErrorProcess(); + WDT_vRefresh(); + LedDr(); + BootMain(); + + +// tmp[1] = (ubyte)CntCan_1; +// tmp[0] = (ubyte)(CntCan_1>>8); +// CAN_vLoadData(0x2, (ulong *)(tmp)); // Add this Line +// CAN_vTransmit(2); +// for(j=0;j<200;j++){for(i=0;i<133;i++)WDT_vRefresh();} + // USER CODE END + + } + +} // End of function main + + +// USER CODE BEGIN (MAIN_General,10) + +// USER CODE END + diff --git a/MAIN.H b/MAIN.H new file mode 100644 index 0000000..df8056c --- /dev/null +++ b/MAIN.H @@ -0,0 +1,625 @@ +//**************************************************************************** +// @Module Project Settings +// @Filename MAIN.H +// @Project CL2.0.dav +//---------------------------------------------------------------------------- +// @Controller Infineon XC886CLM-8FF +// +// @Compiler Keil +// +// @Codegenerator 1.3 +// +// @Description This is the include header file for all other modules. +// +//---------------------------------------------------------------------------- +// @Date 2025/1/18 20:45:27 +// +//**************************************************************************** + +// USER CODE BEGIN (MAIN_Header,1) + +// USER CODE END + + + +#ifndef _MAIN_H_ +#define _MAIN_H_ + +//**************************************************************************** +// @Project Includes +//**************************************************************************** + +// USER CODE BEGIN (MAIN_Header,2) + +// USER CODE END + + +//**************************************************************************** +// @Macros +//**************************************************************************** + +// Please ensure that SCU_PAGE is switched to Page 1 before using these macros +#define MAIN_vUnlockProtecReg() PASSWD = 0x9B +#define MAIN_vlockProtecReg() PASSWD = 0xAB + + +// USER CODE BEGIN (MAIN_Header,3) + +// USER CODE END + + +//**************************************************************************** +// @Defines +//**************************************************************************** + +// USER CODE BEGIN (MAIN_Header,4) + +// USER CODE END + +#define bool bit +#define ulong unsigned long +#define uword unsigned int +#define ubyte unsigned char + + +#define KEIL + + +//**************************************************************************** +// @Prototypes Of Global Functions +//**************************************************************************** + + +// USER CODE BEGIN (MAIN_Header,5) + +// USER CODE END + + +// ------------------------------------------------------------------------- +// Declaration of SFRs +// ------------------------------------------------------------------------- + +// Notes: You can avoid the problem that your compiler does not yet support +// the latest derivatives if you use the SFR definitions generated +// by DAvE instead of those that come along with your compiler (in +// the "Register File"). + +// PORT SFRs are defined in file 'IO.H'. + +// SFR byte definitions +sfr ACC = 0xE0; +sfr ADC_CHCTR0 = 0xCA; +sfr ADC_CHCTR1 = 0xCB; +sfr ADC_CHCTR2 = 0xCC; +sfr ADC_CHCTR3 = 0xCD; +sfr ADC_CHCTR4 = 0xCE; +sfr ADC_CHCTR5 = 0xCF; +sfr ADC_CHCTR6 = 0xD2; +sfr ADC_CHCTR7 = 0xD3; +sfr ADC_CHINCR = 0xCB; +sfr ADC_CHINFR = 0xCA; +sfr ADC_CHINPR = 0xCD; +sfr ADC_CHINSR = 0xCC; +sfr ADC_CRCR1 = 0xCA; +sfr ADC_CRMR1 = 0xCC; +sfr ADC_CRPR1 = 0xCB; +sfr ADC_ETRCR = 0xCF; +sfr ADC_EVINCR = 0xCF; +sfr ADC_EVINFR = 0xCE; +sfr ADC_EVINPR = 0xD3; +sfr ADC_EVINSR = 0xD2; +sfr ADC_GLOBCTR = 0xCA; +sfr ADC_GLOBSTR = 0xCB; +sfr ADC_INPCR0 = 0xCE; +sfr ADC_LCBR = 0xCD; +sfr ADC_PAGE = 0xD1; +sfr ADC_PRAR = 0xCC; +sfr ADC_Q0R0 = 0xCF; +sfr ADC_QBUR0 = 0xD2; +sfr ADC_QINR0 = 0xD2; +sfr ADC_QMR0 = 0xCD; +sfr ADC_QSR0 = 0xCE; +sfr ADC_RCR0 = 0xCA; +sfr ADC_RCR1 = 0xCB; +sfr ADC_RCR2 = 0xCC; +sfr ADC_RCR3 = 0xCD; +sfr ADC_RESR0H = 0xCB; +sfr ADC_RESR0L = 0xCA; +sfr ADC_RESR1H = 0xCD; +sfr ADC_RESR1L = 0xCC; +sfr ADC_RESR2H = 0xCF; +sfr ADC_RESR2L = 0xCE; +sfr ADC_RESR3H = 0xD3; +sfr ADC_RESR3L = 0xD2; +sfr ADC_RESRA0H = 0xCB; +sfr ADC_RESRA0L = 0xCA; +sfr ADC_RESRA1H = 0xCD; +sfr ADC_RESRA1L = 0xCC; +sfr ADC_RESRA2H = 0xCF; +sfr ADC_RESRA2L = 0xCE; +sfr ADC_RESRA3H = 0xD3; +sfr ADC_RESRA3L = 0xD2; +sfr ADC_VFCR = 0xCE; +sfr B = 0xF0; +sfr BCON = 0xBD; +sfr BG = 0xBE; +sfr CAN_ADCON = 0xD8; +sfr CAN_ADH = 0xDA; +sfr CAN_ADL = 0xD9; +sfr CAN_DATA0 = 0xDB; +sfr CAN_DATA1 = 0xDC; +sfr CAN_DATA2 = 0xDD; +sfr CAN_DATA3 = 0xDE; +sfr CCU6_CC60RH = 0xFB; +sfr CCU6_CC60RL = 0xFA; +sfr CCU6_CC60SRH = 0xFB; +sfr CCU6_CC60SRL = 0xFA; +sfr CCU6_CC61RH = 0xFD; +sfr CCU6_CC61RL = 0xFC; +sfr CCU6_CC61SRH = 0xFD; +sfr CCU6_CC61SRL = 0xFC; +sfr CCU6_CC62RH = 0xFF; +sfr CCU6_CC62RL = 0xFE; +sfr CCU6_CC62SRH = 0xFF; +sfr CCU6_CC62SRL = 0xFE; +sfr CCU6_CC63RH = 0x9B; +sfr CCU6_CC63RL = 0x9A; +sfr CCU6_CC63SRH = 0x9B; +sfr CCU6_CC63SRL = 0x9A; +sfr CCU6_CMPMODIFH = 0xA7; +sfr CCU6_CMPMODIFL = 0xA6; +sfr CCU6_CMPSTATH = 0xFF; +sfr CCU6_CMPSTATL = 0xFE; +sfr CCU6_IENH = 0x9D; +sfr CCU6_IENL = 0x9C; +sfr CCU6_INPH = 0x9F; +sfr CCU6_INPL = 0x9E; +sfr CCU6_ISH = 0x9D; +sfr CCU6_ISL = 0x9C; +sfr CCU6_ISRH = 0xA5; +sfr CCU6_ISRL = 0xA4; +sfr CCU6_ISSH = 0xA5; +sfr CCU6_ISSL = 0xA4; +sfr CCU6_MCMCTR = 0xA7; +sfr CCU6_MCMOUTH = 0x9B; +sfr CCU6_MCMOUTL = 0x9A; +sfr CCU6_MCMOUTSH = 0x9F; +sfr CCU6_MCMOUTSL = 0x9E; +sfr CCU6_MODCTRH = 0xFD; +sfr CCU6_MODCTRL = 0xFC; +sfr CCU6_PAGE = 0xA3; +sfr CCU6_PISEL0H = 0x9F; +sfr CCU6_PISEL0L = 0x9E; +sfr CCU6_PISEL2 = 0xA4; +sfr CCU6_PSLR = 0xA6; +sfr CCU6_T12DTCH = 0xA5; +sfr CCU6_T12DTCL = 0xA4; +sfr CCU6_T12H = 0xFB; +sfr CCU6_T12L = 0xFA; +sfr CCU6_T12MSELH = 0x9B; +sfr CCU6_T12MSELL = 0x9A; +sfr CCU6_T12PRH = 0x9D; +sfr CCU6_T12PRL = 0x9C; +sfr CCU6_T13H = 0xFD; +sfr CCU6_T13L = 0xFC; +sfr CCU6_T13PRH = 0x9F; +sfr CCU6_T13PRL = 0x9E; +sfr CCU6_TCTR0H = 0xA7; +sfr CCU6_TCTR0L = 0xA6; +sfr CCU6_TCTR2H = 0xFB; +sfr CCU6_TCTR2L = 0xFA; +sfr CCU6_TCTR4H = 0x9D; +sfr CCU6_TCTR4L = 0x9C; +sfr CCU6_TRPCTRH = 0xFF; +sfr CCU6_TRPCTRL = 0xFE; +sfr CD_CON = 0xA1; +sfr CD_CORDXH = 0x9B; +sfr CD_CORDXL = 0x9A; +sfr CD_CORDYH = 0x9D; +sfr CD_CORDYL = 0x9C; +sfr CD_CORDZH = 0x9F; +sfr CD_CORDZL = 0x9E; +sfr CD_STATC = 0xA0; +sfr CMCON = 0xBA; +sfr COCON = 0xBE; +sfr DPH = 0x83; +sfr DPL = 0x82; +sfr EO = 0xA2; +sfr EXICON0 = 0xB7; +sfr EXICON1 = 0xBA; +sfr FDCON = 0xE9; +sfr FDRES = 0xEB; +sfr FDSTEP = 0xEA; +sfr FEAH = 0xBD; +sfr FEAL = 0xBC; +sfr HWBPDR = 0xF7; +sfr HWBPSR = 0xF6; +sfr ID = 0xB3; +sfr IEN0 = 0xA8; +sfr IEN1 = 0xE8; +sfr IP = 0xB8; +sfr IP1 = 0xF8; +sfr IPH = 0xB9; +sfr IPH1 = 0xF9; +sfr IRCON0 = 0xB4; +sfr IRCON1 = 0xB5; +sfr IRCON2 = 0xB6; +sfr IRCON3 = 0xB4; +sfr IRCON4 = 0xB5; +sfr MDU_MD0 = 0xB2; +sfr MDU_MD1 = 0xB3; +sfr MDU_MD2 = 0xB4; +sfr MDU_MD3 = 0xB5; +sfr MDU_MD4 = 0xB6; +sfr MDU_MD5 = 0xB7; +sfr MDU_MDUCON = 0xB1; +sfr MDU_MDUSTAT = 0xB0; +sfr MDU_MR0 = 0xB2; +sfr MDU_MR1 = 0xB3; +sfr MDU_MR2 = 0xB4; +sfr MDU_MR3 = 0xB5; +sfr MDU_MR4 = 0xB6; +sfr MDU_MR5 = 0xB7; +sfr MISC_CON = 0xE9; +sfr MMBPCR = 0xF3; +sfr MMCR = 0xF1; +sfr MMCR2 = 0xE9; +sfr MMDR = 0xF5; +sfr MMICR = 0xF4; +sfr MMSR = 0xF2; +sfr MMWR1 = 0xEB; +sfr MMWR2 = 0xEC; +sfr MODPISEL = 0xB3; +sfr MODPISEL1 = 0xB7; +sfr MODPISEL2 = 0xBA; +sfr MODSUSP = 0xBD; +sfr NMICON = 0xBB; +sfr NMISR = 0xBC; +sfr OSC_CON = 0xB6; +sfr P0_ALTSEL0 = 0x80; +sfr P0_ALTSEL1 = 0x86; +sfr P0_DATA = 0x80; +sfr P0_DIR = 0x86; +sfr P0_OD = 0x80; +sfr P0_PUDEN = 0x86; +sfr P0_PUDSEL = 0x80; +sfr P1_ALTSEL0 = 0x90; +sfr P1_ALTSEL1 = 0x91; +sfr P1_DATA = 0x90; +sfr P1_DIR = 0x91; +sfr P1_OD = 0x90; +sfr P1_PUDEN = 0x91; +sfr P1_PUDSEL = 0x90; +sfr P2_DATA = 0xA0; +sfr P2_DIR = 0xA1; +sfr P2_PUDEN = 0xA1; +sfr P2_PUDSEL = 0xA0; +sfr P3_ALTSEL0 = 0xB0; +sfr P3_ALTSEL1 = 0xB1; +sfr P3_DATA = 0xB0; +sfr P3_DIR = 0xB1; +sfr P3_OD = 0xB0; +sfr P3_PUDEN = 0xB1; +sfr P3_PUDSEL = 0xB0; +sfr P4_ALTSEL0 = 0xC8; +sfr P4_ALTSEL1 = 0xC9; +sfr P4_DATA = 0xC8; +sfr P4_DIR = 0xC9; +sfr P4_OD = 0xC8; +sfr P4_PUDEN = 0xC9; +sfr P4_PUDSEL = 0xC8; +sfr P5_ALTSEL0 = 0x92; +sfr P5_ALTSEL1 = 0x93; +sfr P5_DATA = 0x92; +sfr P5_DIR = 0x93; +sfr P5_OD = 0x92; +sfr P5_PUDEN = 0x93; +sfr P5_PUDSEL = 0x92; +sfr PASSWD = 0xBB; +sfr PCON = 0x87; +sfr PLL_CON = 0xB7; +sfr PMCON0 = 0xB4; +sfr PMCON1 = 0xB5; +sfr PMCON2 = 0xBB; +sfr PORT_PAGE = 0xB2; +sfr PSW = 0xD0; +sfr SBUF = 0x99; +sfr SCON = 0x98; +sfr SCU_PAGE = 0xBF; +sfr SP = 0x81; +sfr SSC_BRH = 0xAF; +sfr SSC_BRL = 0xAE; +sfr SSC_CONH_O = 0xAB; +sfr SSC_CONH_P = 0xAB; +sfr SSC_CONL_O = 0xAA; +sfr SSC_CONL_P = 0xAA; +sfr SSC_PISEL = 0xA9; +sfr SSC_RBL = 0xAD; +sfr SSC_TBL = 0xAC; +sfr SYSCON0 = 0x8F; +sfr T21_RC2H = 0xC3; +sfr T21_RC2L = 0xC2; +sfr T21_T2CON = 0xC0; +sfr T21_T2H = 0xC5; +sfr T21_T2L = 0xC4; +sfr T21_T2MOD = 0xC1; +sfr T2_RC2H = 0xC3; +sfr T2_RC2L = 0xC2; +sfr T2_T2CON = 0xC0; +sfr T2_T2H = 0xC5; +sfr T2_T2L = 0xC4; +sfr T2_T2MOD = 0xC1; +sfr TCON = 0x88; +sfr TH0 = 0x8C; +sfr TH1 = 0x8D; +sfr TL0 = 0x8A; +sfr TL1 = 0x8B; +sfr TMOD = 0x89; +sfr UART1_BCON = 0xCA; +sfr UART1_BG = 0xCB; +sfr UART1_FDCON = 0xCC; +sfr UART1_FDRES = 0xCE; +sfr UART1_FDSTEP = 0xCD; +sfr UART1_SBUF = 0xC9; +sfr UART1_SCON = 0xC8; +sfr WDTCON = 0xBB; // located in the mapped SFR area +sfr WDTH = 0xBF; // located in the mapped SFR area +sfr WDTL = 0xBE; // located in the mapped SFR area +sfr WDTREL = 0xBC; // located in the mapped SFR area +sfr WDTWINB = 0xBD; // located in the mapped SFR area +sfr XADDRH = 0xB3; + +// SFR bit definitions + +// CD_STATC +sbit CD_BSY = 0xA0; +sbit DMAP = 0xA4; +sbit EOC = 0xA2; +sbit ERROR = 0xA1; +sbit INT_EN = 0xA3; +sbit KEEPX = 0xA5; +sbit KEEPY = 0xA6; +sbit KEEPZ = 0xA7; + +// IEN0 +sbit EA = 0xAF; +sbit ES = 0xAC; +sbit ET0 = 0xA9; +sbit ET1 = 0xAB; +sbit ET2 = 0xAD; +sbit EX0 = 0xA8; +sbit EX1 = 0xAA; + +// IEN1 +sbit EADC = 0xE8; +sbit ECCIP0 = 0xEC; +sbit ECCIP1 = 0xED; +sbit ECCIP2 = 0xEE; +sbit ECCIP3 = 0xEF; +sbit ESSC = 0xE9; +sbit EX2 = 0xEA; +sbit EXM = 0xEB; + +// IP1 +sbit PADC = 0xF8; +sbit PCCIP0 = 0xFC; +sbit PCCIP1 = 0xFD; +sbit PCCIP2 = 0xFE; +sbit PCCIP3 = 0xFF; +sbit PSSC = 0xF9; +sbit PX2 = 0xFA; +sbit PXM = 0xFB; + +// IP +sbit PS = 0xBC; +sbit PT0 = 0xB9; +sbit PT1 = 0xBB; +sbit PT2 = 0xBD; +sbit PX0 = 0xB8; +sbit PX1 = 0xBA; + +// MDU_MDUSTAT +sbit IERR = 0xB1; +sbit IRDY = 0xB0; +sbit MDU_BSY = 0xB2; + +// PSW +sbit AC = 0xD6; +sbit CY = 0xD7; +sbit F0 = 0xD5; +sbit F1 = 0xD1; +sbit OV = 0xD2; +sbit P = 0xD0; +sbit RS0 = 0xD3; +sbit RS1 = 0xD4; + +// SCON +sbit RB8 = 0x9A; +sbit REN = 0x9C; +sbit RI = 0x98; +sbit SM0 = 0x9F; +sbit SM1 = 0x9E; +sbit SM2 = 0x9D; +sbit TB8 = 0x9B; +sbit TI = 0x99; + +// T2_T2CON and T21_T2CON +sbit C_T2 = 0xC1; +sbit CP_RL2 = 0xC0; +sbit EXEN2 = 0xC3; +sbit EXF2 = 0xC6; +sbit TF2 = 0xC7; +sbit TR2 = 0xC2; + +// TCON +sbit IE0 = 0x89; +sbit IE1 = 0x8B; +sbit IT0 = 0x88; +sbit IT1 = 0x8A; +sbit TF0 = 0x8D; +sbit TF1 = 0x8F; +sbit TR0 = 0x8C; +sbit TR1 = 0x8E; + +// UART1_SCON +sbit RB8_1 = 0xCA; +sbit REN_1 = 0xCC; +sbit RI_1 = 0xC8; +sbit SM0_1 = 0xCF; +sbit SM1_1 = 0xCE; +sbit SM2_1 = 0xCD; +sbit TB8_1 = 0xCB; +sbit TI_1 = 0xC9; + + +// Definition of the 16-bit SFR +// sfr16 data type to access two 8-bit SFRs as a single 16-bit SFR. + +sfr16 CAN_ADLH = 0xD9; // 16-bit Address +sfr16 CAN_DATA01 = 0xDB; // 16-bit Address +sfr16 CAN_DATA23 = 0xDD; // 16-bit Address +sfr16 CCU6_CC60RLH = 0xFA; // 16-bit Address +sfr16 CCU6_CC60SRLH = 0xFA; // 16-bit Address +sfr16 CCU6_CC61RLH = 0xFC; // 16-bit Address +sfr16 CCU6_CC61SRLH = 0xFC; // 16-bit Address +sfr16 CCU6_CC62RLH = 0xFE; // 16-bit Address +sfr16 CCU6_CC62SRLH = 0xFE; // 16-bit Address +sfr16 CCU6_CC63RLH = 0x9A; // 16-bit Address +sfr16 CCU6_CC63SRLH = 0x9A; // 16-bit Address +sfr16 CCU6_T12LH = 0xFA; // 16-bit Address +sfr16 CCU6_T12PRLH = 0x9C; // 16-bit Address +sfr16 CCU6_T13LH = 0xFC; // 16-bit Address +sfr16 CCU6_T13PRLH = 0x9E; // 16-bit Address +sfr16 T21_RC2LH = 0xC2; // 16-bit Address +sfr16 T21_T2LH = 0xC4; // 16-bit Address +sfr16 T2_RC2LH = 0xC2; // 16-bit Address +sfr16 T2_T2LH = 0xC4; // 16-bit Address + +// Definition of the PAGE SFR + +// PORT_PAGE +#define _pp0 PORT_PAGE=0 // PORT_PAGE postfix +#define _pp1 PORT_PAGE=1 // PORT_PAGE postfix +#define _pp2 PORT_PAGE=2 // PORT_PAGE postfix +#define _pp3 PORT_PAGE=3 // PORT_PAGE postfix + +// ADC_PAGE +#define _ad0 ADC_PAGE=0 // ADC_PAGE postfix +#define _ad1 ADC_PAGE=1 // ADC_PAGE postfix +#define _ad2 ADC_PAGE=2 // ADC_PAGE postfix +#define _ad3 ADC_PAGE=3 // ADC_PAGE postfix +#define _ad4 ADC_PAGE=4 // ADC_PAGE postfix +#define _ad5 ADC_PAGE=5 // ADC_PAGE postfix +#define _ad6 ADC_PAGE=6 // ADC_PAGE postfix + +// SCU_PAGE +#define _su0 SCU_PAGE=0 // SCU_PAGE postfix +#define _su1 SCU_PAGE=1 // SCU_PAGE postfix +#define _su2 SCU_PAGE=2 // SCU_PAGE postfix +#define _su3 SCU_PAGE=3 // SCU_PAGE postfix + +// CCU6_PAGE +#define _cc0 CCU6_PAGE=0 // CCU6_PAGE postfix +#define _cc1 CCU6_PAGE=1 // CCU6_PAGE postfix +#define _cc2 CCU6_PAGE=2 // CCU6_PAGE postfix +#define _cc3 CCU6_PAGE=3 // CCU6_PAGE postfix + +#define SST0 0x80 // Save SFR page to ST0 +#define RST0 0xC0 // Restore SFR page from ST0 +#define SST1 0x90 // Save SFR page to ST1 +#define RST1 0xD0 // Restore SFR page from ST1 +#define SST2 0xA0 // Save SFR page to ST2 +#define RST2 0xE0 // Restore SFR page from ST2 +#define SST3 0xB0 // Save SFR page to ST3 +#define RST3 0xF0 // Restore SFR page from ST3 +#define noSST 0x00 // Switch page without saving + +#define SFR_PAGE(pg,op) pg+op + +// SYSCON0_RMAP +// The access to the mapped SFR area is enabled. +#define SET_RMAP() SYSCON0 |= 0x01 + +// The access to the standard SFR area is enabled. +#define RESET_RMAP() SYSCON0 &= ~0x01 + + +#define _su SCU_PAGE // SCU_PAGE + +#define STR_PAGE(pg,op) { _push_(op); \ + pg ; } + +#define RST_PAGE(op) _pop_(op) + +//**************************************************************************** +// @Typedefs +//**************************************************************************** + +// USER CODE BEGIN (MAIN_Header,6) + +// USER CODE END + + +//**************************************************************************** +// @Imported Global Variables +//**************************************************************************** + +// USER CODE BEGIN (MAIN_Header,7) + +// USER CODE END + + +//**************************************************************************** +// @Global Variables +//**************************************************************************** + +// USER CODE BEGIN (MAIN_Header,8) + +// USER CODE END + + +//**************************************************************************** +// @Prototypes Of Global Functions +//**************************************************************************** + +// USER CODE BEGIN (MAIN_Header,9) + +// USER CODE END + + +//**************************************************************************** +// @Interrupt Vectors +//**************************************************************************** + +// USER CODE BEGIN (MAIN_Header,10) + +// USER CODE END + + +//**************************************************************************** +// @Project Includes +//**************************************************************************** + + + +#include + +#include "IO.H" +#include "T2.H" +#include "WDT.H" +#include "PS.H" +#include "CAN.H" +#include "SHARED_INT.H" + + + + + + + +// USER CODE BEGIN (MAIN_Header,11) +#include "Config.H" +// USER CODE END + + +#endif // ifndef _MAIN_H_ diff --git a/PS.C b/PS.C new file mode 100644 index 0000000..b581d11 --- /dev/null +++ b/PS.C @@ -0,0 +1,295 @@ +//**************************************************************************** +// @Module Power Saving Modes +// @Filename PS.C +// @Project CL2.0.dav +//---------------------------------------------------------------------------- +// @Controller Infineon XC886CLM-8FF +// +// @Compiler Keil +// +// @Codegenerator 1.3 +// +// @Description: This file contains functions that use the PS module. +// +//---------------------------------------------------------------------------- +// @Date 2025/1/21 08:53:36 +// +//**************************************************************************** + +// USER CODE BEGIN (PS_General,1) + +// USER CODE END + + + +//**************************************************************************** +// @Project Includes +//**************************************************************************** + +#include "MAIN.H" + +// USER CODE BEGIN (PS_General,2) + +// USER CODE END + + +//**************************************************************************** +// @Macros +//**************************************************************************** + +// USER CODE BEGIN (PS_General,3) + +// USER CODE END + + +//**************************************************************************** +// @Defines +//**************************************************************************** + +// USER CODE BEGIN (PS_General,4) + +// USER CODE END + + +//**************************************************************************** +// @Typedefs +//**************************************************************************** + +// USER CODE BEGIN (PS_General,5) + +// USER CODE END + + +//**************************************************************************** +// @Imported Global Variables +//**************************************************************************** + +// USER CODE BEGIN (PS_General,6) + +// USER CODE END + + +//**************************************************************************** +// @Global Variables +//**************************************************************************** + +// USER CODE BEGIN (PS_General,7) + +// USER CODE END + + +//**************************************************************************** +// @External Prototypes +//**************************************************************************** + +// USER CODE BEGIN (PS_General,8) + +// USER CODE END + + +//**************************************************************************** +// @Prototypes Of Local Functions +//**************************************************************************** + +// USER CODE BEGIN (PS_General,9) + +// USER CODE END + + +//**************************************************************************** +// @Function void PS_vInit(void) +// +//---------------------------------------------------------------------------- +// @Description This is the initialization function of the Power Saving +// function library. It is assumed that the SFRs used by this +// library are in their reset state. +// +// This function does not contain any generated C-code, but it +// is possible to insert application specific source lines. +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2025/1/21 +// +//**************************************************************************** + +// USER CODE BEGIN (PS_Init,1) + +// USER CODE END + +void PS_vInit(void) +{ + // USER CODE BEGIN (PS_Init,2) + + // USER CODE END + + /// Slow Down Clock is 48.00 MHz + /// which is 1/4 of the System Clock fSYS + + /// wake up with reset is selected + + + SFR_PAGE(_su1, noSST); // switch to page1 with out saving + + /// Pin P0.1 (input) + /// - used as wake up pin via RXD_1 from powerdown + + /// Pin P0.5 (input) + /// - used as wake up pin via EXINT0 from powerdown + + PMCON0 = 0x13; // wakeup control register + + // ---------- Modules configuration status for PMCON1 reg.---------- + + /// ADC enabled + /// SSC disabled + /// CCU enabled + /// T2 enabled + /// MDU enabled + /// CAN enabled + /// CDC enabled + PMCON1 = 0x02; // Power mode control register 1 + + SFR_PAGE(_su3, noSST); // switch to page3 with out saving + + // ---------- Modules configuration status for PMCON2 reg.---------- + + /// T21 enabled + /// UART1 enabled + PMCON2 = 0x00; // Power mode control register 2 + + SFR_PAGE(_su0, noSST); // switch to page0 with out saving + + IEN0 |= 0x01; // interrupt enable register 0 + TCON = 0x01; // Set TCON.IT0 + + MODPISEL = 0x01; // load peripheral input select reg + +} // End of function PS_vInit + + +//**************************************************************************** +// @Function void PS_vSetPowerDown(void) +// +//---------------------------------------------------------------------------- +// @Description This function invokes the software power down mode by +// execution of following steps: +// - the external wake-up from software power down remains +// disabled +// - bit PD in SFR PMCON0 will be set +// (this will stop all controller functions) +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2025/1/21 +// +//**************************************************************************** + +void PS_vSetPowerDown(void) +{ + // enter software power down mode + STR_PAGE(_su1, _su); // push current SCU page and switch to page1 + + /// External wake-up enabled + + /// Wake-up via pin RxD_1 and EXINT0 is selected + PMCON0|=0x03; + + MAIN_vUnlockProtecReg(); // open access to protected register + + PMCON0 |= 0x04; // set PD + + MAIN_vlockProtecReg(); // close access to protected register + + RST_PAGE(_su); // restore the old SCU page + +} // End of function PS_vSetPowerDown + + +//**************************************************************************** +// @Function void PS_vSetSlowDown(void) +// +//---------------------------------------------------------------------------- +// @Description This function activates the slow down mode by setting bit +// SD in SFR PMCON0. +// Note: DAvE's project settings for the on-chip peripheral +// components are only valid for normal clock operation. +// During slow down mode the behavior of the peripherals can +// differ from these settings due to the reduced clock rate! +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2025/1/21 +// +//**************************************************************************** + +//void PS_vSetSlowDown(void) +//{ + +// STR_PAGE(_su1, _su); // push current SCU page and switch to page1 + + +// MAIN_vUnlockProtecReg(); // open access to protected register + +// PMCON0 |= 0x08; // set SD + +// MAIN_vlockProtecReg(); // close access to protected register + +// RST_PAGE(_su); // restore the old SCU page + +//} // End of function PS_vSetSlowDown + + +//**************************************************************************** +// @Function void PS_vResetSlowDown(void) +// +//---------------------------------------------------------------------------- +// @Description This function terminates the slow down mode by clearing bit +// SD in SFR PMCON0. +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2025/1/21 +// +//**************************************************************************** + +//void PS_vResetSlowDown(void) +//{ + +// STR_PAGE(_su1, _su); // push current SCU page and switch to page1 + +// MAIN_vUnlockProtecReg(); // open access to protected register + +// PMCON0 &= ~(ubyte)0x08; // clear SD + +// MAIN_vlockProtecReg(); // close access to protected register + +// RST_PAGE(_su); // restore the old SCU page + +//} // End of function PS_vResetSlowDown + + +// USER CODE BEGIN (PS_General,10) + +// USER CODE END + diff --git a/PS.H b/PS.H new file mode 100644 index 0000000..fc8ce79 --- /dev/null +++ b/PS.H @@ -0,0 +1,202 @@ +//**************************************************************************** +// @Module Power Saving Modes +// @Filename PS.H +// @Project CL2.0.dav +//---------------------------------------------------------------------------- +// @Controller Infineon XC886CLM-8FF +// +// @Compiler Keil +// +// @Codegenerator 1.3 +// +// @Description: This file contains all function prototypes and macros for +// the PS module. +// +//---------------------------------------------------------------------------- +// @Date 2025/1/21 08:53:36 +// +//**************************************************************************** + +// USER CODE BEGIN (PS_Header,1) + +// USER CODE END + + + +#ifndef _PS_H_ +#define _PS_H_ + +//**************************************************************************** +// @Project Includes +//**************************************************************************** + +// USER CODE BEGIN (PS_Header,2) + +// USER CODE END + + +//**************************************************************************** +// @Macros +//**************************************************************************** + +// USER CODE BEGIN (PS_Header,3) + +// USER CODE END + + +//**************************************************************************** +// @Defines +//**************************************************************************** + +// USER CODE BEGIN (PS_Header,4) + +// USER CODE END + + +//**************************************************************************** +// @Typedefs +//**************************************************************************** + +// USER CODE BEGIN (PS_Header,5) + +// USER CODE END + + +//**************************************************************************** +// @Imported Global Variables +//**************************************************************************** + +// USER CODE BEGIN (PS_Header,6) + +// USER CODE END + + +//**************************************************************************** +// @Global Variables +//**************************************************************************** + +// USER CODE BEGIN (PS_Header,7) + +// USER CODE END + + +//**************************************************************************** +// @Prototypes Of Global Functions +//**************************************************************************** + +void PS_vInit(void); +void PS_vSetPowerDown(void); +void PS_vSetSlowDown(void); +void PS_vResetSlowDown(void); + +// USER CODE BEGIN (PS_Header,8) + +// USER CODE END + + +//**************************************************************************** +// @Macro void PS_vSetIdle() +// +//---------------------------------------------------------------------------- +// @Description This macro enters the idle mode by setting bit IDLE in SFR +// PCON. The instruction will stop the CPU immediately. Thus +// any following code will not be executed before the +// controller has been restarted by an interrupt. +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2025/1/21 +// +//**************************************************************************** + +#define PS_vSetIdle() PCON |= 0x01 + + +//**************************************************************************** +// @Macro PS_vDisableModule(ModuleName) +// +//---------------------------------------------------------------------------- +// @Description This macro disables a specific peripheral module which is +// passed in a parameter.Switch the page to 1 using the +// statementSFR_PAGE(_su1, SST1); before calling this +// Disable macro.After that again switch back the page to 0 +// with the macro SFR_PAGE(_su1, RST1);.The following +// constants are available for 'ModuleName': +// ADC, T2, CCU, SSC, MDU, CAN, CDC, T21, UART1 +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters ModuleName: +// Name of the Module +// +//---------------------------------------------------------------------------- +// @Date 2025/1/21 +// +//**************************************************************************** + +#define PS_vDisableModule(Module) PS_vDisableModule_(Module) + +#define PS_vDisableModule_(Module) PS_vDisableModule_##Module + +#define PS_vDisableModule_ADC PMCON1 |= 0x01 +#define PS_vDisableModule_T2 PMCON1 |= 0x08 +#define PS_vDisableModule_CCU PMCON1 |= 0x04 +#define PS_vDisableModule_SSC PMCON1 |= 0x02 +#define PS_vDisableModule_MDU PMCON1 |= 0x10 +#define PS_vDisableModule_CAN PMCON1 |= 0x20 +#define PS_vDisableModule_CDC PMCON1 |= 0x40 +#define PS_vDisableModule_T21 PMCON2 |= 0x01 +#define PS_vDisableModule_UART1 PMCON2 |= 0x02 + + +//**************************************************************************** +// @Macro PS_vEnableModule(ModuleName) +// +//---------------------------------------------------------------------------- +// @Description This macro enables a specific peripheral module which is +// passed in a parameter. Switch the page to 1 using the +// statement SFR_PAGE(_su1, SST1); before calling this +// Enable macro.After that again switch back the page to 0 +// with the macro SFR_PAGE(_su1, RST1);.The following +// constants are available for 'ModuleName': +// ADC, T2, CCU, SSC, MDU, CAN, CDC, T21, UART1 +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters ModuleName: +// Name of the Module +// +//---------------------------------------------------------------------------- +// @Date 2025/1/21 +// +//**************************************************************************** + +#define PS_vEnableModule(Module) PS_vEnableModule_(Module) + +#define PS_vEnableModule_(Module) PS_vEnableModule_##Module + +#define PS_vEnableModule_ADC PMCON1 &= ~(ubyte)0x01 +#define PS_vEnableModule_T2 PMCON1 &= ~(ubyte)0x08 +#define PS_vEnableModule_CCU PMCON1 &= ~(ubyte)0x04 +#define PS_vEnableModule_SSC PMCON1 &= ~(ubyte)0x02 +#define PS_vEnableModule_MDU PMCON1 &= ~(ubyte)0x10 +#define PS_vEnableModule_CAN PMCON1 &= ~(ubyte)0x20 +#define PS_vEnableModule_CDC PMCON1 &= ~(ubyte)0x40 +#define PS_vEnableModule_T21 PMCON2 &= ~(ubyte)0x01 +#define PS_vEnableModule_UART1 PMCON2 &= ~(ubyte)0x02 + + +// USER CODE BEGIN (PS_Header,9) + +// USER CODE END + +#endif // ifndef _PS_H_ diff --git a/RTC.c b/RTC.c new file mode 100644 index 0000000..380954c --- /dev/null +++ b/RTC.c @@ -0,0 +1,415 @@ +#include "MAIN.H" +#include +#include "RTC.H" + +unsigned char bySta = 0; + +// 静态月份天数表(平年,索引1~12对应1月~12月) +ubyte days_in_month[12] = { + 31, // 1月 + 28, // 2月(平年) + 31, // 3月 + 30, // 4月 + 31, // 5月 + 30, // 6月 + 31, // 7月 + 31, // 8月 + 30, // 9月 + 31, // 10月 + 30, // 11月 + 31 // 12月 +}; + + +void SDAOut(bit c) +{ + SFR_PAGE(_pp0, noSST); // switch to page 0 + P0_DIR = P0_DIR | 0x08;//修改P0.3为输出 + P0_3 = c; + +} + +void SCLOut(bit c) +{ + P0_2 = c; +} + +void iic_start(void) +{ + SDAOut(1); + _nop_(); + SCLOut(1); + somenop; + SDAOut(0); + somenop; + SCLOut(0); +} + +void iic_stop(void) +{ + SDAOut(0); + _nop_(); + SCLOut(1); + somenop; + SDAOut(1); +} + +void iic_ack(bit ackbit) +{ + if(ackbit) + SDAOut(0); + else + SDAOut(1); + somenop; + SCLOut(1); + somenop; + SCLOut(0); + SDAOut(1); + somenop; +} + +bit iic_waitack(void) +{ + SDAOut(1); + somenop; + SCLOut(1); + + SFR_PAGE(_pp0, noSST); // switch to page 0 + P0_DIR = P0_DIR & 0xF7;//修改P4.3为输入 + + somenop; + if(P0_3) + { + SCLOut(0); + iic_stop(); + return 0; + } + else + { + SCLOut(0); + return 1; + } +} + +void iic_sendbyte(unsigned char byt) +{ + unsigned char i; + for(i=0;i<8;i++) + { + if(byt&0x80) + SDAOut(1); + else + SDAOut(0); + somenop; + SCLOut(1); + byt <<= 1; + somenop; + SCLOut(0); + } +} + + +unsigned char iic_recbyte(void) +{ + unsigned char da; + unsigned char i; + + SFR_PAGE(_pp0, noSST); // switch to page 0 + P0_DIR = P0_DIR & 0xF7;//修改P4.3为输入 + + for(i=0;i<8;i++) + { + SCLOut(1); + somenop; + da <<= 1; + +// P1_IOCR01 = 0x0020; // load port control register 1 + if(P0_3) + da |= 0x01; + SCLOut(0); + somenop; + } + return da; +} + +// 十进制转 BCD 码 +unsigned char DecToBcd(unsigned char dec) +{ + return ((dec / 10) << 4) | (dec % 10); +} + +// BCD 码转十进制 +unsigned char BcdToDec(unsigned char bcd) +{ + return ((bcd >> 4) * 10) + (bcd & 0x0F); +} + + + +// BM8563 写寄存器函数 +void BM8563_WriteReg(unsigned char reg, unsigned char rdata) +{ + iic_start(); + iic_sendbyte(BM8563_ADDR); // 发送 BM8563 的 I2C 地址,写操作 + iic_waitack(); + iic_sendbyte(reg); // 发送寄存器地址 + iic_waitack(); + iic_sendbyte(rdata); // 发送数据 + iic_waitack(); + iic_stop(); +} + + +// BM8563 读寄存器函数 +unsigned char BM8563_ReadReg(unsigned char reg) +{ + unsigned char rdata; + iic_start(); + iic_sendbyte(BM8563_ADDR); // 发送 BM8563 的 I2C 地址,写操作 + iic_waitack(); + iic_sendbyte(reg); // 发送寄存器地址 + iic_waitack(); + iic_start(); + iic_sendbyte(BM8563_ADDR | 0x01); // 发送 BM8563 的 I2C 地址,读操作 + iic_waitack(); + rdata = iic_recbyte(); + iic_ack(0); + iic_stop(); + return rdata; +} + +// 判断闰年 +ubyte leapYear(uword year) { + return (year % 4 == 0 && year % 100 != 0) || year % 400 == 0; +} + + +/** + * @brief 获取指定年份和月份的天数(自动处理闰年) + * @param year: 年份(四位数,如2024) + * @param month: 月份(1-12) + * @retval 该月天数(若参数非法返回0) + */ +ubyte getMonthDays(uword year, ubyte month) { + // 静态月份天数表(平年,索引1~12对应1月~12月) + ubyte days_in_month[13] = { + 0, 31, 28, 31, 30, 31, 30, + 31, 31, 30, 31, 30, 31 + }; + + // 参数校验 + if (month < 1 || month > 12) return 0; + + // 处理闰年2月 + if (month == 2 && leapYear(year)) { + return 29; + } + + // 返回常规天数 + return days_in_month[month]; +} + + +/** + * @brief 检查报警标志AF是否置位(Bit3) + * @retval true-报警已触发,false-无报警 + */ +bool bm8563CheckAlarmFlag(void) { + ubyte reg_val = BM8563_ReadReg(BM8563_CSR2); + return (reg_val & BM8563_AF_BIT) != 0; // 检查Bit3 +} + +/** + * @brief 清除报警标志AF(Bit3) + * @note 保留其他位(如Bit1 AIE标志)状态 + */ +void bm8563ClearAlarmFlag(void) { + ubyte reg_val = BM8563_ReadReg(BM8563_CSR2); + reg_val &= ~BM8563_AF_BIT; // 仅清除Bit3 + BM8563_WriteReg(BM8563_CSR2, reg_val); +} + + + +/** + * @brief 设置BM8563当前时间(整合世纪位到月份寄存器) + * @param pTime: 时间结构体指针(年份需为完整四位数,如1984、2024) + * @retval 无 + */ +void bm8563SetTime(UnTimeOutput *pTime) { + + ubyte century_bit = 0; // 完整四位数年份 + ubyte reg_sec = 0; + ubyte month_bcd = 0; + if (pTime == NULL) return; + + // --- 世纪位计算 --- + // 根据年份设置世纪标志(0:20世纪及之后,1:19世纪) +// uint8_t century_bit = (pTime->bit_data.year >= 2000) ? 0 : 1; // 完整四位数年份 + + // --- 寄存器写入(带掩码)--- + // 秒(地址0x02):保留Bit7(CH时钟停止位) + reg_sec = BM8563_ReadReg(BM8563_SEC) & 0x80; + BM8563_WriteReg(BM8563_SEC, reg_sec | (DecToBcd(pTime->bit_data.second) & 0x7F)); + + // 分(地址0x03) + BM8563_WriteReg(BM8563_MIN, DecToBcd(pTime->bit_data.minute) & 0x7F); + + // 小时(地址0x04):24小时制 + BM8563_WriteReg(BM8563_HOUR, DecToBcd(pTime->bit_data.hour) & 0x3F); + + // 日(地址0x05):屏蔽闹钟使能位 + BM8563_WriteReg(BM8563_DAY, DecToBcd(pTime->bit_data.day) & 0x3F); + + // 周(地址0x06):值范围1-7 + BM8563_WriteReg(BM8563_WEEK, pTime->bit_data.week & 0x07); + + // 月(地址0x07):世纪位写入Bit7,月份占低5位 + month_bcd = DecToBcd(pTime->bit_data.month); + BM8563_WriteReg(BM8563_MONTH, (century_bit << 7) | (month_bcd & 0x1F)); + + // 年(地址0x08):存储后两位(如2024→0x24) + BM8563_WriteReg(BM8563_YEAR, DecToBcd(pTime->bit_data.year)); +} + + +/** + * @brief 读取BM8563当前时间到联合体 + * @param pTime: UnTimeOutput联合体指针(用于存储读取到的时间数据) + * @retval 无 + */ +void bm8563GetTime(UnTimeOutput *pTime) { + if (pTime == NULL) { + return; // 错误处理可扩展 + } + + // 读取秒(地址0x02) + pTime->bit_data.second = BcdToDec(BM8563_ReadReg(BM8563_SEC) & 0x7F); // 屏蔽无效位 + + // 读取分钟(地址0x03) + pTime->bit_data.minute = BcdToDec(BM8563_ReadReg(BM8563_MIN) & 0x7F); + + // 读取小时(地址0x04) + pTime->bit_data.hour = BcdToDec(BM8563_ReadReg(BM8563_HOUR) & 0x3F); // 24小时制需屏蔽Bit6-7 + + // 读取日(地址0x05) + pTime->bit_data.day = BcdToDec(BM8563_ReadReg(BM8563_DAY) & 0x3F); // 屏蔽控制位 + + // 读取周(地址0x06,BM8563周值为0x01-0x07,无需BCD转换) + pTime->bit_data.week = BM8563_ReadReg(BM8563_WEEK) & 0x07; // 仅保留低3位 + + // 读取月(地址0x07) + pTime->bit_data.month = BcdToDec(BM8563_ReadReg(BM8563_MONTH) & 0x1F); // 屏蔽Bit5-7 + + // 读取年(地址0x08,假设为2000+年) + pTime->bit_data.year = BcdToDec(BM8563_ReadReg(BM8563_YEAR)); +} + + + + +/** + * @brief 设置BM8563闹钟(字段为0时禁用对应报警) + * @param pTime: UnTimeOutput联合体指针,包含闹钟时间参数 + * @retval 无 + */ +ubyte bm8563SetAlarm(UnTimeOutput *pTime) { + + UnTimeOutput un_temp_output = {0};//接收设定时间 + ubyte carry_hour = 0; + ubyte carry_day = 0; + ubyte month_days = 0; +//------------------------------------------------- + // 检查指针有效性 + if( (pTime == NULL) || ( (0 == pTime->bit_data.minute) && (0 == pTime->bit_data.hour) && (0 == pTime->bit_data.day) ) )//数据都为0或者指针都为0 + { + // 可选:添加错误处理(如日志输出) + return 1; + } + + bm8563GetTime(¤ttime); + + // 分钟溢出处理(0-59) + un_temp_output.bit_data.minute = currenttime.bit_data.minute + pTime->bit_data.minute; + if (un_temp_output.bit_data.minute >= 60) { + un_temp_output.bit_data.minute -= 60; + carry_hour = 1; // 向小时进位 + } + + // 小时溢出处理(0-23) + un_temp_output.bit_data.hour = currenttime.bit_data.hour + pTime->bit_data.hour + carry_hour; + if (un_temp_output.bit_data.hour >= 24) { + un_temp_output.bit_data.hour -= 24; + carry_day = 1; // 向天进位 + } + + // 天溢出处理(需考虑月份最大天数) + un_temp_output.bit_data.day = currenttime.bit_data.day + pTime->bit_data.day + carry_day; + //2月考虑平年和闰年 + month_days = getMonthDays( (currenttime.bit_data.year+2000),currenttime.bit_data.month); + + // 天溢出处理(需考虑月份最大天数) + if (un_temp_output.bit_data.day > month_days) + { + un_temp_output.bit_data.day -= month_days; + //最大限制,如果超过1个月,就少一天,BM8563最大只支持这么大 + if(un_temp_output.bit_data.day == currenttime.bit_data.day) + { + un_temp_output.bit_data.day = (currenttime.bit_data.day - 1); + } + } + + un_temp_output.bit_data.week = 0;//不需要周报警 + +// 报警分钟设置(地址0x09) + BM8563_WriteReg(BM8563_ALARM_MIN, DecToBcd(un_temp_output.bit_data.minute) & 0x7F); // AE_M=0(启用) +// 报警小时设置(地址0x0A) + BM8563_WriteReg(BM8563_ALARM_HOUR, DecToBcd(un_temp_output.bit_data.hour) & 0x7F); // AE_H=0(启用) +// 日报警/周报警互斥设置 + BM8563_WriteReg(BM8563_ALARM_DAY, DecToBcd(un_temp_output.bit_data.day) & 0x7F); // AE_D=0(启用日) + BM8563_WriteReg(BM8563_ALARM_WEEK, 0x80); // AE_W=1(禁用周) +// 使能闹钟中断(地址0x01,AIE=1,AF=0) + BM8563_WriteReg(BM8563_CSR2, 0x02); + + return 0; +} + + + + + + + + + + + + +//// 配置 BM8563 的闹钟,实现间隔 4 小时的唤醒 +//void BM8563_Set4HourAlarm() +//{ +// unsigned char alarmMin = BcdToDec( BM8563_ReadReg(BM8563_MIN) ); +// unsigned char alarmMinBcd = 0; +////------------------------------------------------------------ +// alarmMin = (alarmMin + 2) % 60;//计算 4 小时后的小时数 +// alarmMinBcd = DecToBcd(alarmMin); + +// BM8563_WriteReg(BM8563_ALARM_MIN,alarmMinBcd&0x7F);// 闹钟分钟设置 +// BM8563_WriteReg(BM8563_ALARM_HOUR, 0x80); // 无效 +// BM8563_WriteReg(BM8563_ALARM_DAY , 0x80); // 无效 +// BM8563_WriteReg(BM8563_ALARM_WEEK, 0x80); // 无效 +// +// // 配置闹钟控制寄存器,使能闹钟中断 +// BM8563_WriteReg(BM8563_CSR2, 0x02); +//} + + + + + + + + + + + diff --git a/RTC.h b/RTC.h new file mode 100644 index 0000000..a3d5eba --- /dev/null +++ b/RTC.h @@ -0,0 +1,101 @@ +#ifndef _RTC_H_ +#define _RTC_H_ + +//#define _nop_() udelay(1); +#define somenop {_nop_();_nop_();_nop_();_nop_();_nop_();} + + +typedef enum { + STATE_INIT = 0, // 初始化状态(首次运行) + STATE_ON, // ON状态(唤醒工作模式) + STATE_OFF, // OFF状态(准备休眠) + STATE_OFF2, // OFF2状态(休眠监控) + STATE_ON2 // ON2状态(工作模式) +} SystemState; + + + + +typedef struct { + ubyte year; // 年(建议存储后两位,如2025→25) + ubyte month; // 月(1-12) + ubyte day; // 日(1-31) + ubyte hour; // 小时(0-23) + ubyte week; // 周 (0-6) + ubyte minute; // 分钟(0-59) + ubyte second; // 秒 (0-59) + ubyte resver; +} DateTimeInfo; // 类型名使用大驼峰法(帕斯卡命名法) + +typedef union _UnTimeOutput +{ + DateTimeInfo bit_data; // 使用定义的结构体变量名 + ubyte arr[sizeof(DateTimeInfo)]; // 通过结构体类型确定大小 +} UnTimeOutput; + + + +extern unsigned char bySta; +extern UnTimeOutput currenttime; +extern UnTimeOutput un_time_output1;//接收设定时间 + + + +// 假设 BM8563 的 I2C 地址 +#define BM8563_ADDR 0xA2 + +// 假设 BM8563 寄存器地址 +#define BM8563_CSR2 0x01 +#define BM8563_SEC 0x02 +#define BM8563_MIN 0x03 +#define BM8563_HOUR 0x04 +#define BM8563_DAY 0x05 +#define BM8563_WEEK 0x06 +#define BM8563_MONTH 0x07 +#define BM8563_YEAR 0x08 +#define BM8563_ALARM_MIN 0x09 +#define BM8563_ALARM_HOUR 0x0A +#define BM8563_ALARM_DAY 0x0B +#define BM8563_ALARM_WEEK 0x0C +#define BM8563_CONTROL 0x0E // 定时器控制寄存器 +#define BM8563_STATUS 0x01 +#define BM8563_TIMER_VALUE 0x0F // 定时器计数寄存器 + +#define BM8563_AF_BIT 0x08 // AF标志位(Bit3) + + +ubyte leapYear(uword year); +void BM8563_InitTime(); +void BM8563_Set4HourCountdown(); +unsigned char BM8563_ReadReg(unsigned char reg); +void BM8563_WriteReg(unsigned char reg, unsigned char rdata); +void BM8563_Set4HourAlarm(); +void bm8563GetTime(UnTimeOutput *pTime); +ubyte bm8563SetAlarm(UnTimeOutput *pTime); +void bm8563SetTime(UnTimeOutput *pTime); +bool bm8563CheckAlarmFlag(void); +void bm8563ClearAlarmFlag(void); + +void iic_start(void); +void iic_stop(void); +void iic_ack(bit ackbit); +void iic_sendbyte(unsigned char byt); +void wrbyte_24c02(unsigned int add,unsigned char dat); + +bit iic_waitack(void); +unsigned char i2c_recbyte(void); +unsigned char rdbyte_24c02(unsigned int add); +unsigned char wrEE_CRC_Bak(unsigned char add,unsigned char *eeData,unsigned char len,unsigned char addbak); +unsigned char rdEE_CRC_Bak(unsigned char add,unsigned char *eeData,unsigned char len,unsigned char addbak); + + + + + + + + + + + +#endif \ No newline at end of file diff --git a/SHARED_INT.C b/SHARED_INT.C new file mode 100644 index 0000000..bd52036 --- /dev/null +++ b/SHARED_INT.C @@ -0,0 +1,223 @@ +//**************************************************************************** +// @Module Shared Interrupt Routines +// @Filename SHARED_INT.C +// @Project CL2.0.dav +//---------------------------------------------------------------------------- +// @Controller Infineon XC886CLM-8FF +// +// @Compiler Keil +// +// @Codegenerator 1.3 +// +// @Description This file contains the Shared interrupt routines. +// +//---------------------------------------------------------------------------- +// @Date 2025/1/18 20:45:29 +// +//**************************************************************************** + +// USER CODE BEGIN (SHARED_INT_General,1) + +// USER CODE END + + + +//**************************************************************************** +// @Project Includes +//**************************************************************************** + +#include "SHARED_INT.H" + +// USER CODE BEGIN (SHARED_INT_General,2) + +// USER CODE END + + +//**************************************************************************** +// @Macros +//**************************************************************************** + +// USER CODE BEGIN (SHARED_INT_General,3) + +// USER CODE END + + +//**************************************************************************** +// @Defines +//**************************************************************************** + +// USER CODE BEGIN (SHARED_INT_General,4) + +// USER CODE END + + +//**************************************************************************** +// @Typedefs +//**************************************************************************** + +// USER CODE BEGIN (SHARED_INT_General,5) + +// USER CODE END + + +//**************************************************************************** +// @Imported Global Variables +//**************************************************************************** + +// USER CODE BEGIN (SHARED_INT_General,6) + +// USER CODE END + + +//**************************************************************************** +// @Global Variables +//**************************************************************************** + +// USER CODE BEGIN (SHARED_INT_General,7) + +// USER CODE END + + +//**************************************************************************** +// @External Prototypes +//**************************************************************************** + + +// USER CODE BEGIN (SHARED_INT_General,8) + +// USER CODE END + + +//**************************************************************************** +// @Prototypes Of Local Functions +//**************************************************************************** + +// USER CODE BEGIN (SHARED_INT_General,9) + +// USER CODE END + + +//**************************************************************************** +// @Function void SHINT_vInit(void) +// +//---------------------------------------------------------------------------- +// @Description This function initializes the shared interrupts. +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2025/1/18 +// +//**************************************************************************** + +// USER CODE BEGIN (SHINT_Init,1) + +// USER CODE END + +void SHINT_vInit(void) +{ + // USER CODE BEGIN (SHINT_Init,2) + + // USER CODE END + + /// ----------------------------------------------------------------------- + /// Configuration of the Shared Interrupts: + /// ----------------------------------------------------------------------- + /// - Timer 2 Interrupt is Selected + + + IEN0 |= 0x20; // load interrupt enable register 0 + + + + IEN1 |= 0x00; // load interrupt enable register 1 + + + // USER CODE BEGIN (SHINT_Init,3) + + // USER CODE END + + +} // End of function SHINT_vInit + + +//**************************************************************************** +// @Function void SHINT_viXINTR5Isr(void) +// +//---------------------------------------------------------------------------- +// @Description This is the service routine for the shared interrupt node +// XINTR5. XINTR5 ISR Node is shared by Timer 2, UART +// Fractional Divider(BRG Interrupt),MultiCAN Node 0 and LIN. +// Depending on the selected module interrupt it is called. +// T2 - Depending on the selected operating mode it is called +// when TF2 is set by an overflow or underflow of the timer 2 +// register or when EXF2 is set by a negative transition on +// T2EX. +// UART - It is called after the BRG timer overflows and sets +// the NDOV bit. +// CAN - It is called for the Service Request Node 0 of the +// MultiCAN module. +// Please note that you have to add application specific code +// to this function. +// +//---------------------------------------------------------------------------- +// @Returnvalue none +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2025/1/18 +// +//**************************************************************************** + +// You have two choices for interrupt type select in Project Settings Page +// under Global Settings Section. +// If you select CHOICE 1 then ISR will be generated with push and pop. +// If you select CHOICE 2 then ISR will be generated without push and pop. +// Default choice is CHOICE 2. +// Current selection is CHOICE 2 + +// USER CODE BEGIN (SHINT_XINTR5Isr,1) + +// USER CODE END + +void SHINT_viXINTR5Isr(void) interrupt XINTR5INT +{ + // USER CODE BEGIN (SHINT_XINTR5Isr,2) + + // USER CODE END + + SFR_PAGE(_su0, SST0); // switch to page 0 + + // Timer 2 interrupt handling section... + + if (TF2) + { + // a timer 2 overflow has occured + + TF2 = 0; + + // USER CODE BEGIN (SHINT_XINTR5Isr,3) +RTCProcess(); + // USER CODE END + + } + + // USER CODE BEGIN (SHINT_XINTR5Isr,7) + + // USER CODE END + + SFR_PAGE(_su0, RST0); // restore the old SCU page +} // End of function SHINT_viXINTR5Isr + + +// USER CODE BEGIN (SHARED_INT_General,10) + +// USER CODE END + + diff --git a/SHARED_INT.H b/SHARED_INT.H new file mode 100644 index 0000000..5daa27a --- /dev/null +++ b/SHARED_INT.H @@ -0,0 +1,121 @@ +//**************************************************************************** +// @Module Shared Interrupt Routines +// @Filename SHARED_INT.H +// @Project CL2.0.dav +//---------------------------------------------------------------------------- +// @Controller Infineon XC886CLM-8FF +// +// @Compiler Keil +// +// @Codegenerator 1.3 +// +// @Description This is the include header file for shared interrupts. +// +//---------------------------------------------------------------------------- +// @Date 2025/1/18 20:45:29 +// +//**************************************************************************** + +// USER CODE BEGIN (SHARED_Header,1) + +// USER CODE END + + + +#ifndef _SHARED_INT_H_ +#define _SHARED_INT_H_ + +//**************************************************************************** +// @Project Includes +//**************************************************************************** + +// USER CODE BEGIN (SHARED_INT_Header,2) + +// USER CODE END + + +//**************************************************************************** +// @Macros +//**************************************************************************** + +// USER CODE BEGIN (SHARED_INT_Header,3) + +// USER CODE END + + +//**************************************************************************** +// @Defines +//**************************************************************************** + +// USER CODE BEGIN (SHARED_INT_Header,4) + +// USER CODE END + +//**************************************************************************** +// @Prototypes Of Global Functions +//**************************************************************************** + +void SHINT_vInit(void); + + +// USER CODE BEGIN (SHARED_INT_Header,5) + +// USER CODE END + + +//**************************************************************************** +// @Typedefs +//**************************************************************************** + +// USER CODE BEGIN (SHARED_INT_Header,6) + +// USER CODE END + + +//**************************************************************************** +// @Imported Global Variables +//**************************************************************************** + +// USER CODE BEGIN (SHARED_INT_Header,7) + +// USER CODE END + + +//**************************************************************************** +// @Global Variables +//**************************************************************************** + +// USER CODE BEGIN (SHARED_INT_Header,8) + +// USER CODE END + + +//**************************************************************************** +// @Interrupt Vectors +//**************************************************************************** + +#define XINTR5INT 5 + +// USER CODE BEGIN (SHARED_INT_Header,9) + +// USER CODE END + + +//**************************************************************************** +// @Project Includes +//**************************************************************************** + + + + + + +#include "MAIN.H" + + +// USER CODE BEGIN (SHARED_INT_Header,10) + +// USER CODE END + + +#endif // ifndef _SHARED_INT_H_ diff --git a/SSC.C b/SSC.C new file mode 100644 index 0000000..d73aaef --- /dev/null +++ b/SSC.C @@ -0,0 +1,264 @@ +//**************************************************************************** +// @Module High Speed Synchronous Serial Interface(SSC) +// @Filename SSC.C +// @Project CL2.0.dav +//---------------------------------------------------------------------------- +// @Controller Infineon XC886CLM-8FF +// +// @Compiler Keil +// +// @Codegenerator 1.9 +// +// @Description: This file contains functions that use the SSC module. +// +//---------------------------------------------------------------------------- +// @Date 2013-11-11 12:29:47 +// +//**************************************************************************** + +// USER CODE BEGIN (SSC_General,1) + +// USER CODE END + + + +//**************************************************************************** +// @Project Includes +//**************************************************************************** + +#include "MAIN.H" + +// USER CODE BEGIN (SSC_General,2) + +// USER CODE END + + +//**************************************************************************** +// @Macros +//**************************************************************************** + +// USER CODE BEGIN (SSC_General,3) + +// USER CODE END + + +//**************************************************************************** +// @Defines +//**************************************************************************** + +// USER CODE BEGIN (SSC_General,4) + +// USER CODE END + + +//**************************************************************************** +// @Typedefs +//**************************************************************************** + +// USER CODE BEGIN (SSC_General,5) + +// USER CODE END + + +//**************************************************************************** +// @Imported Global Variables +//**************************************************************************** + +// USER CODE BEGIN (SSC_General,6) + +// USER CODE END + + +//**************************************************************************** +// @Global Variables +//**************************************************************************** + +// USER CODE BEGIN (SSC_General,7) + +// USER CODE END + + +//**************************************************************************** +// @External Prototypes +//**************************************************************************** + +// USER CODE BEGIN (SSC_General,8) + +// USER CODE END + + +//**************************************************************************** +// @Prototypes Of Local Functions +//**************************************************************************** + +// USER CODE BEGIN (SSC_General,9) + +// USER CODE END + + +//**************************************************************************** +// @Function void SSC_vInit(void) +// +//---------------------------------------------------------------------------- +// @Description This is the initialization function of the SSC function +// library. It is assumed that the SFRs used by this library +// are in their reset state. +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2013-11-11 +// +//**************************************************************************** + +// USER CODE BEGIN (Init,1) + +// USER CODE END + +void SSC_vInit(void) +{ + // USER CODE BEGIN (Init,2) + + // USER CODE END + + /// - Port Selection + SSC_PISEL = 0x01; // load SSC Port Input Select Register to + // Port A + + /// ----------------------------------------------------------------------- + /// Configuration of the used SSC Port Pins: + /// ----------------------------------------------------------------------- + /// Pin SCLK (P0.3) is selected for SCLK ouput + /// Pin MTSR_1 (P0.4) is selected for Master Transmit Output + /// Pin MRST_1 (P0.5) is selected for Master Receive Input + + SFR_PAGE(_pp2, noSST); // switch to page 2 without saving + P0_ALTSEL0 |= 0x18; // set AltSel0 + P0_ALTSEL1 &= ~(ubyte)0x18; // set AltSel1 + + SFR_PAGE(_pp0, noSST); // switch to page 0 without saving + P0_DIR |= 0x18; // set OutPut Direction + + + /// Pin SCLK (P1.2) is Not selected for SCLK ouput + /// Pin MTSR_0 (P1.3) is Not selected for Master Transmit Output + /// Pin MRST_0 (P1.4) Not is selected for Master Receive Input + + SSC_CONH_P &= ~(ubyte)0x80; // enable access to control bits + + /// ----------------------------------------------------------------------- + /// Configuration of the SSC Baud Rate Generator: + /// ----------------------------------------------------------------------- + /// - required baud rate = 2000.000 kbaud + /// - real baud rate = 2000.000 kbaud + /// - deviation = 0.000 % + + SSC_BRH = 0x00; // load SSC baud rate time reload register + // high + SSC_BRL = 0x05; // load SSC baud rate time reload register + // low + + /// ----------------------------------------------------------------------- + /// Configuration of the SSC Operation Mode: + /// ----------------------------------------------------------------------- + /// - this device is configured as SSC master + /// - transfer data width is 8 bit + /// - transfer/receive MSB first + /// - shift transmit data on the leading clock edge, latch on trailing edge + /// - idle clock line is low, leading clock edge is low-to-high transition + /// - ignore receive error + /// - ignore phase error + + + SSC_CONH_P = 0x40; // load SSC control register + + SSC_CONL_P = 0x17; // load SSC control register + + SSC_CONH_P |= 0x80; // disable access to control bits + + /// - SSC interrupt is disabled + + // USER CODE BEGIN (Init,3) + + // USER CODE END + +} // End of function SSC_vInit + + +//**************************************************************************** +// @Function void SSC_vSendData(ubyte Data) +// +//---------------------------------------------------------------------------- +// @Description The master device can initiate the first data transfer by +// writing the transmit data into transmit buffer. This value +// is copied into the shift register (which is assumed to be +// empty at this time), and the selected first bit of the +// transmit data is placed onto the MTSR line on the next +// clock from the baud rate generator. +// A slave device immediately outputs the selected first bit +// (MSB or LSB of the transfer data) at pin MRST, when the +// contents of the transmit buffer are copied into the slave's +// shift register. +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters Data: +// Data to be send +// +//---------------------------------------------------------------------------- +// @Date 2013-11-11 +// +//**************************************************************************** + +// USER CODE BEGIN (SendData,1) + +// USER CODE END + +void SSC_vSendData(ubyte Data) +{ + SSC_TBL = Data; // load transmit buffer register + +} // End of function SSC_vSendData + + +//**************************************************************************** +// @Function ubyte SSC_vGetData(void) +// +//---------------------------------------------------------------------------- +// @Description This function returns the contents of the receive buffer. +// When the receive interrupt request flag is set this implies +// that data is available for reading in the receive buffer. +// +//---------------------------------------------------------------------------- +// @Returnvalue Received data +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2013-11-11 +// +//**************************************************************************** + +// USER CODE BEGIN (GetData,1) + +// USER CODE END + +ubyte SSC_vGetData(void) +{ + return(SSC_RBL); // return receive buffer register + +} // End of function SSC_vGetData + + + +// USER CODE BEGIN (SSC_General,10) + +// USER CODE END + diff --git a/SSC.H b/SSC.H new file mode 100644 index 0000000..6d112f6 --- /dev/null +++ b/SSC.H @@ -0,0 +1,107 @@ +//**************************************************************************** +// @Module High Speed Synchronous Serial Interface(SSC) +// @Filename SSC.H +// @Project CL2.0.dav +//---------------------------------------------------------------------------- +// @Controller Infineon XC886CLM-8FF +// +// @Compiler Keil +// +// @Codegenerator 1.9 +// +// @Description: This file contains all function prototypes and macros for +// the SSC module. +// +//---------------------------------------------------------------------------- +// @Date 2013-11-11 12:29:47 +// +//**************************************************************************** + +// USER CODE BEGIN (SSC_Header,1) + +// USER CODE END + + + +#ifndef _SSC_H_ +#define _SSC_H_ + +//**************************************************************************** +// @Project Includes +//**************************************************************************** + +// USER CODE BEGIN (SSC_Header,2) + +// USER CODE END + + +//**************************************************************************** +// @Macros +//**************************************************************************** + +// USER CODE BEGIN (SSC_Header,3) + +// USER CODE END + + +//**************************************************************************** +// @Defines +//**************************************************************************** + +// USER CODE BEGIN (SSC_Header,4) + +// USER CODE END + + +//**************************************************************************** +// @Typedefs +//**************************************************************************** + +// USER CODE BEGIN (SSC_Header,5) + +// USER CODE END + + +//**************************************************************************** +// @Imported Global Variables +//**************************************************************************** + +// USER CODE BEGIN (SSC_Header,6) + +// USER CODE END + + +//**************************************************************************** +// @Global Variables +//**************************************************************************** + +// USER CODE BEGIN (SSC_Header,7) + +// USER CODE END + + +//**************************************************************************** +// @Prototypes Of Global Functions +//**************************************************************************** + +void SSC_vInit(void); +void SSC_vSendData(ubyte Data); +ubyte SSC_vGetData(void); + + +// USER CODE BEGIN (SSC_Header,8) + +// USER CODE END + + +//**************************************************************************** +// @Interrupt Vectors +//**************************************************************************** + + +// USER CODE BEGIN (SSC_Header,9) + +// USER CODE END + + +#endif // ifndef _SSC_H_ diff --git a/START_XC.a51 b/START_XC.a51 new file mode 100644 index 0000000..d34a0dd --- /dev/null +++ b/START_XC.a51 @@ -0,0 +1,521 @@ +$NOMOD51 +;------------------------------------------------------------------------------ +; This file is part of the C51 Compiler package +; Startup Code for the Infineon XC8xx devices +; Copyright (c) 1988-2005 Keil Elektronik GmbH and Keil Software, Inc. +; Version 20100601 +; -------- Revision --------- +; - Previous version 20100405 +; - Added XC864 with option for LIN_BSL parameters +; - Renamed NDIV_XC866 to NDIV_XC86x +; +; *** <<< Use Configuration Wizard in Context Menu >>> *** +;------------------------------------------------------------------------------ +; STARTUP.A51: This code is executed after processor reset. +; +; To translate this file use A51 with the following invocation: +; +; A51 STARTUP.A51 +; +; To link the modified STARTUP.OBJ file to your application use the following +; Lx51 invocation: +; +; Lx51 your object file list, STARTUP.OBJ controls +; +;------------------------------------------------------------------------------ +; +; Use off-chip XTAL +; XC8xx series runs by default from on-chip osciallator. +; optionally you may use a off-chip XTAL +; +XTAL EQU 1 ; set to 0 On-chip oscillator/ not used for XC82x devices +; +; Device = " XC82x " +XC82x_CHIP EQU 0 ;applicable to XC83x +;--------------------------------------------------------------------- +;resulting in fsys = 80MHz for XC866/XC864 and fsys = 96MHz for XC88x unless otherwise mentioned +; +; Device = " XC866 " +XC866_CHIP EQU 0 +; Device = " XC864 " +XC864_CHIP EQU 0 +; +; PLL N-Divider +; PLL N-Divider must result in fsys = 80MHz +; <0=> N=14 +; <1=> N=15 +; <2=> N=16 (10 MHz XTAL) +; <3=> N=17 +; <4=> N=18 +; <5=> N=19 +; <6=> N=20 (8 MHz XTAL) +; <7=> N=21 +; <8=> N=24 +; <9=> N=28 +; <10=> N=30 +; <11=> N=32 (5 MHz XTAL) +; <12=> N=40 +; <13=> N=42 +; <14=> N=45 +; <15=> N=50 +; +NDIV_XC86x EQU 2 ; default 2 +; + +;--------------------------------------------------------------------- +; Device = " XC88x " +XC88x_CHIP EQU 1 +; +; PLL N-Divider for *NON-SAL* device fsys = 96 MHz +; <0=> N=10 +; <1=> N=12 +; <2=> N=13 +; <3=> N=14 +; <4=> N=15 +; <5=> N=16 (12 MHz XTAL) +; <6=> N=17 +; <7=> N=18 +; <8=> N=19 +; <9=> N=20 (9.6 MHz On-Chip XTAL) +; <10=> N=24 (8 MHz XTAL) +; <11=> N=30 +; <12=> N=32 (6 MHz XTAL) +; <13=> N=36 +; <14=> N=40 +; <15=> N=48 (4 MHz XTAL) +; +; PLL N-Divider for *SAL* device -> fsys = 80 MHz +; <0=> N=10 +; <1=> N=12 +; <2=> N=13 +; <3=> N=14 +; <4=> N=15 +; <5=> N=16 (10 MHz On-Chip XTAL) +; <6=> N=17 +; <7=> N=18 +; <8=> N=19 +; <9=> N=20 (8 MHz XTAL) +; <10=> N=24 +; <11=> N=30 +; <12=> N=32 (5 MHz XTAL) +; <13=> N=36 +; <14=> N=40 (4 MHz XTAL) +; <15=> N=48 +; + +NDIV_XC88x EQU 10 ; default 10 +; + +;--------------------------------------------------------------------- +; Device = " XC87x " +XC878_CHIP_16FF EQU 0 +XC878_CHIP_13FF EQU 0 +XC874_CHIP_16FF EQU 0 +XC874_CHIP_13FF EQU 0 + +;4 MHz +NDIV_XC87x_PLL_CON EQU 0x18 +NDIV_XC87x_PLL_CON1 EQU 0x20 +NR_XC87x EQU 0x00 +OD_XC87x EQU 0x00 + +;6 MHz +;NDIV_XC87x_PLL_CON EQU 0x18 +;NDIV_XC87x_PLL_CON1 EQU 0x20 +;NR_XC87x EQU 0x01 +;OD_XC87x EQU 0x00 + +;8 MHz default +;NDIV_XC87x_PLL_CON EQU 0x18 +;NDIV_XC87x_PLL_CON1 EQU 0x20 +;NR_XC87x EQU 0x02 +;OD_XC87x EQU 0x00 + +; + +; +;------------------------------------------------------------------------------ +; +; User-defined Power-On Initialization of Memory +; +; With the following EQU statements the initialization of memory +; at processor reset can be defined: +; +; IDATA memory length <0x0-0x100> +; Note: The absolute start-address of IDATA memory is always 0 +; The IDATA space overlaps physically the DATA and BIT areas. +IDATALEN EQU 0x100 +; +; XDATA memory start address <0x0-0xFFFF> +; absolute start-address of XDATA memory +XDATASTART EQU 0xF000 +; +; XDATA memory length <0x0-0xFFFF> +; length of XDATA memory in bytes. +IF (XC82x_CHIP) + XDATALEN EQU 0x100 +ELSEIF (XC866_CHIP || XC864_CHIP) + XDATALEN EQU 0x200 +ELSEIF (XC88x_CHIP) + XDATALEN EQU 0x600 +ELSEIF (XC878_CHIP_16FF || XC878_CHIP_13FF) + XDATALEN EQU 0xC00 +ELSEIF (XC874_CHIP_16FF || XC874_CHIP_13FF) + XDATALEN EQU 0xC00 + +ENDIF + +; +; PDATA memory start address <0x0-0xFFFF> +; absolute start-address of PDATA memory +PDATASTART EQU 0xF000 +; +; PDATA memory length <0x0-0xFF> +; length of PDATA memory in bytes. +PDATALEN EQU 0 +; +; +;------------------------------------------------------------------------------ +; +; Reentrant Stack Initilization +; +; The following EQU statements define the stack pointer for reentrant +; functions and initialized it: +; +; Stack Space for reentrant functions in the SMALL model. +; Activate reentrant Stack (SMALL model) +IBPSTACK EQU 0 ; set to 1 if small reentrant is used. +; top of stack <0x0-0xFF> +; set top of stack to highest location+1 +IBPSTACKTOP EQU 0xFF +1 ; default 0FFH+1 +; +; +; Stack Space for reentrant functions in the LARGE model. +; Activate reentrant Stack (LARGE model) +XBPSTACK EQU 0 ; set to 1 if large reentrant is used. +; top of stack <0x0-0xFFFF> +; set top of stack to highest location+1. +XBPSTACKTOP EQU 0xFFFF +1 ; default 0FFFFH+1 +; +; +; Stack Space for reentrant functions in the COMPACT model. +; Activate reentrant Stack (COMPACT model) +PBPSTACK EQU 0 ; set to 1 if compact reentrant is used. +; +; top of stack <0x0-0xFF> +; set top of stack to highest location+1. +PBPSTACKTOP EQU 0xFF +1 ; default 0FFH+1 +; +; +;------------------------------------------------------------------------------ +; +; Set Memory Page for Using the Compact Model with 64 KByte xdata RAM +; +; Define the xdata page used for pdata variables. +; PPAGE must conform with the PPAGE set in the linker invocation. +; +; Enable pdata memory page initalization +PPAGEENABLE EQU 0 ; set to 1 if pdata object are used. +; +; PPAGE number <0x0-0xFF> +; uppermost 256-byte address of the page used for pdata variables. +PPAGE EQU 0xF0 +; +; +;------------------------------------------------------------------------------ +; +; Parameters for LIN Boostrap Loader (XC864 only) +; When these values are not defined, an XC864 device stays in +; LIN-BSL mode and does not start the user application +; +; Enable LIN BSL parameter initialization +LIN_BSL EQU 1 ; set to 1 if LIN BSL parameters should be generated in flash table +; +; NAC: No. Activity Count <0x00-0xFF> +; specifies the delay (n * 5ms) before jumping to user mode. +; 0x01: 0 ms delay. Jump to User Mode immediately +; 0x02: 5 ms delay before jumping to User Mode +; 0x03: 10 ms delay before jumping to User Mode +; 0x04 - 0x0C: 15 - 55 ms delay before jumping to User Mode +; 0x0D - 0xFF, 0x00: Enter LIN BSL Mode (Invalid NAC) +LIN_NAC EQU 0x01 +; +; NAD: Node Address for Diagnostic <0x00-0xFF> +; specifies the address of the active slave node. +LIN_NAD EQU 0x01 +; +; +;------------------------------------------------------------------------------ + +;Check the chip selection +IF ((XC82x_CHIP + XC866_CHIP + XC864_CHIP + XC88x_CHIP + XC878_CHIP_16FF + XC878_CHIP_13FF + XC874_CHIP_16FF + XC874_CHIP_13FF) > 1) + __ERROR__ "Please select only one chip!" +ELSEIF ((XC82x_CHIP + XC866_CHIP + XC864_CHIP + XC88x_CHIP + XC878_CHIP_16FF + XC878_CHIP_13FF + XC874_CHIP_16FF + XC874_CHIP_13FF) == 0) + __ERROR__ "Please select a chip!" +ENDIF + +IF (XTAL <> 0) + IF (XC866_CHIP <> 0 || XC864_CHIP <> 0) + NDIV EQU NDIV_XC86x + ELSEIF (XC88x_CHIP <> 0) + NDIV EQU NDIV_XC88x + ELSEIF (XC878_CHIP_16FF <> 0 || XC878_CHIP_13FF <> 0) + ;nothing + ELSEIF (XC874_CHIP_16FF <> 0 || XC874_CHIP_13FF <> 0) + ;nothing + ELSEIF (XC82x_CHIP <> 0) + ;nothing + ELSE + __WARNING__ "Default NDIV selection is XC866" + NDIV EQU NDIV_XC86x ;Default + ENDIF + ENDIF ;End of XTAL selection + +; Standard SFR Symbols +ACC DATA 0E0H +B DATA 0F0H +SP DATA 81H +DPL DATA 82H +DPH DATA 83H + +; XC8xx specific SFR Symbols used in STARTUP code +IF (XC82x_CHIP == 0) +; Take note of different SFR addresses for XC82x. Currently not used. + sfr SCU_PAGE = 0xBF + sfr PLL_CON = 0xB7 + sfr PLL_CON1 = 0xEA;//SCU,RMAP=0,Page=1 + sfr CMCON = 0xBA + sfr OSC_CON = 0xB6 + sfr PASSWD = 0xBB + sfr XADDRH = 0xB3 + sfr MEX3 = 0x96 +ENDIF + +IF(XC874_CHIP_13FF == 1 || XC874_CHIP_16FF == 1) + sfr PORT_PAGE = 0xB2 + sfr P3_PUDEN = 0xB1 + sfr P4_PUDEN = 0xC9 +ENDIF + + NAME ?C_STARTUP + +?C_C51STARTUP SEGMENT CODE +?STACK SEGMENT IDATA + + RSEG ?STACK + DS 1 + + EXTRN CODE (?C_START) + PUBLIC ?C_STARTUP + + CSEG AT 0x2000 +?C_STARTUP: LJMP STARTUP1 + + RSEG ?C_C51STARTUP +//判断为重新上电还是重启 20210907解决重启时指示灯闪烁问题 +STARTUP1: + MOV DPTR,#0xF5E7 + MOVX A,@DPTR + CJNE A,#0x55,ClOCKINIT ;判断数据是否相等,不相等就初始化时钟表示为重新上电 + AJMP Restart1 + +Restart1: MOV DPTR,#0xF600 + MOVX A,@DPTR + CJNE A,#0x55,ClOCKINIT ;判断数据是否相等,不相等就初始化时钟表示为重新上电 + AJMP STARECMAIN ;两次判断相等就直接跳转到main函数 + + +STARECMAIN: MOV SP,#?STACK-1 + LJMP ?C_START + + +ClOCKINIT: + +IF (XTAL <> 0) + ; switch to external XTAL + IF(XC878_CHIP_16FF <> 0 || XC878_CHIP_13FF <> 0 || XC874_CHIP_16FF <> 0 || XC874_CHIP_13FF <> 0) + MOV SCU_PAGE,#1; + MOV PASSWD, #11000000B ;Disable Bit-Protection + ANL OSC_CON, #~(0x01 << 2) ;OSCSS = 0 + ORL OSC_CON, #(0x01 << 6) ;Bypass PLL Output ( PLLBYP = 1 ) + ORL OSC_CON, #(0x01 << 5) ;Set PLL Power Down Mode ( PLLPD = 1) + ANL OSC_CON, #~(0x01 << 3) ;XPD = 0, XTAL not powered down + + + WAIT_XTAL_STABLE: ; delay necssary for external clock to stablise + MOV R2,#0x1E ; wait about 1.5 ms ( varies with oscillator freq ) + LOOP: + MOV R3,#0x64 + DJNZ R3, $ + DJNZ R2, LOOP + OSC_WDT: + ORL OSC_CON, #(0x01 << 1) ;Restart external oscillator watchdog + MOV R0,#0x41 ;Wait for 65 cycles + DJNZ R0, $ + ;user may want to add an error counter for oscillator detection + CHECK_EXTOSCR: + MOV A, OSC_CON + JNB ACC.0, OSC_WDT + ORL OSC_CON, #(0x01 << 2) ;Select external oscillator + MOV PLL_CON, #NDIV_XC87x_PLL_CON ; NDIV value + MOV PLL_CON1, #NDIV_XC87x_PLL_CON1 ; NDIV Value + MOV A, #NR_XC87x ; PDIV Value + ORL PLL_CON1, A + MOV A, #OD_XC87x ; KDIV Value + ORL CMCON, A + ANL OSC_CON, #~(0x01 << 5) ;Change to PLL Normal Mode ( PLLPD = 0) + ORL OSC_CON, #(0x01 << 7) ;Restart the PLL watchdog ( PLLRDRES = 1) + + ;user may want to add an error counter for PLL lock detection + PLLNOTRUN: + MOV A, PLL_CON + JNB ACC.1, PLLNOTRUN ;PLL_Run Status + + PLLNOTLOCKED: + MOV A, PLL_CON + JNB ACC.0, PLLNOTLOCKED ;PLL_Lock Status + + ANL OSC_CON, #~(0x01 << 6) ;Disable bypass PLL output + MOV PASSWD, #11000011B ;Enable Bit-Protection + MOV SCU_PAGE,#0 + +ELSEIF(XC866_CHIP <> 0 || XC864_CHIP <> 0 || XC88x_CHIP <> 0) + MOV SCU_PAGE,#1 + ORL PLL_CON, #0x08 ; VCOBYP = 1 + ORL PLL_CON, #0x04 ; OSCDISC = 1 _ _ _ NDIV, VCOBYP, OSCDISC, RESLD, LOCK + ANL OSC_CON, #0xF7 ; XPD = 0 power xtal + ORL OSC_CON, #0x04 ; OSCSS = 1 0, 0, 0, OSCPD, XPD, OSCSS, ORDRES, OSCR + ;all calculations are based on no wait state + MOV R1,#0 +DelayXTAL0: + MOV R0,#10 ; delay necssary for external clock to stablise (amplitude >= 0.4 * VDDC - refer to product data sheet) +DelayXTAL: ; delay time should be adjusted according to different external osciallators + DJNZ R1,$ + DJNZ R0,DelayXTAL + + ; redetection of osc +OSCR_NOTSET: + MOV R0, #86 + ORL OSC_CON, #0x02 ; ORDRES = 1 ;restart oscillator run detection + ;assume no wait state, K = 2, + ;Apollo requires to wait for 256 clock cycles -> 2048 vco cycles + ;Elektra requires to wait for 342 clock cycles -> 2048 vco cycles + ;djnz = 4 cc + DJNZ R0, $ + MOV A,OSC_CON + JNB ACC.0, OSCR_NOTSET + + ;reprogram the NDIV factor to required value + ;ORL PLL_CON, #0x08 ; VCOBYP = 1 to change N-Divider + MOV PASSWD, #0x98 ; open access to writing protected bit + ANL PLL_CON, #0x0F + ORL PLL_CON, #NDIV*16 + ANL PLL_CON, #0xFB ; OSCDISC = 0, reconnect oscillator to the PLL + + ;PLL lock detection + ORL PLL_CON, #0x02 ; detect PLL lock + MOV R0, #100 ; LOCK flag should be set within 200us, user need to adapt accordingly + ; assume a 10MHz XTAL for XC866/XC864 device + ; device is in prescaler mode, k = 2 therefore fsys = 5MHz + ; ## 1cclk = 1/(5MHz/3) = 600 ns + ; DJNZ requires 4 x 600ns = 2.4 us therefore 100 DJNZ -> 240us + ; for XC88x, the factor 3 (##) is changed to 4 then the calculated value is + ; 320 us based on a 10MHz XTAL +WAIT_LOCK: + DJNZ R0, $ + MOV A, PLL_CON + JNB ACC.0, OSCR_NOTSET + ; reconnect to PLL + ANL PLL_CON, #0xF7 ; VCOBYP = 0 + MOV SCU_PAGE,#0 + ENDIF +ENDIF + +IF IDATALEN <> 0 + MOV R0,#IDATALEN - 1 + CLR A +IDATALOOP: MOV @R0,A + DJNZ R0,IDATALOOP +ENDIF + +IF (XC878_CHIP_16FF <> 0 || XC874_CHIP_16FF <> 0) + MOV MEX3, #0x1F +ENDIF + +IF (XC874_CHIP_13FF <> 0 || XC874_CHIP_16FF <> 0) + MOV PORT_PAGE, #0x01 + ORL P3_PUDEN, #0x80 + ORL P4_PUDEN, #0xF0 + MOV PORT_PAGE, #0x00 +ENDIF + + + +IF XDATALEN <> 0 + MOV DPTR,#XDATASTART + MOV R7,#LOW (XDATALEN) + IF (LOW (XDATALEN)) <> 0 + MOV R6,#(HIGH (XDATALEN)) +1 + ELSE + MOV R6,#HIGH (XDATALEN) + ENDIF + CLR A +XDATALOOP: MOVX @DPTR,A + INC DPTR + DJNZ R7,XDATALOOP + DJNZ R6,XDATALOOP +ENDIF + +IF PPAGEENABLE <> 0 + MOV SCU_PAGE,#3 + MOV XADDRH,#PPAGE + MOV SCU_PAGE,#0 +ENDIF + +IF PDATALEN <> 0 + MOV R0,#LOW (PDATASTART) + MOV R7,#LOW (PDATALEN) + CLR A +PDATALOOP: MOVX @R0,A + INC R0 + DJNZ R7,PDATALOOP +ENDIF + +IF IBPSTACK <> 0 +EXTRN DATA (?C_IBP) + + MOV ?C_IBP,#LOW IBPSTACKTOP +ENDIF + +IF XBPSTACK <> 0 +EXTRN DATA (?C_XBP) + + MOV ?C_XBP,#HIGH XBPSTACKTOP + MOV ?C_XBP+1,#LOW XBPSTACKTOP +ENDIF + +IF PBPSTACK <> 0 +EXTRN DATA (?C_PBP) + MOV ?C_PBP,#LOW PBPSTACKTOP +ENDIF + + MOV SP,#?STACK-1 + + LJMP ?C_START + +; Overwrite ?C?DPSEL address for XC866 Device +PUBLIC ?C?DPSEL +?C?DPSEL DATA 0A2H ; DPSEL address for Mentor M8051EW + +IF XC864_CHIP <> 0 + ; Optional ROM-table for XC864 LIN-BSL + IF LIN_BSL <> 0 + CSEG AT 0FFCH + DB LIN_NAC + DB NOT(LIN_NAC) + DB LIN_NAD + DB NOT(LIN_NAD) + ENDIF +ENDIF + + END diff --git a/SwDriver.C b/SwDriver.C new file mode 100644 index 0000000..2fda42b --- /dev/null +++ b/SwDriver.C @@ -0,0 +1,496 @@ +#include "MAIN.h" + + + +//***************************************************************************** +//数据结构 +//***************************************************************************** +//每个33993的开关命令状态,由于掉电或者干扰导致33993内部复位时,可以用该状态恢复。 +struct StaMc33993CmdSet +{ + unsigned char CmdSetting ; + unsigned char CmdInt_Sp ; + unsigned int CmdInt_Sg ; + unsigned char CmdMetallic_Sp ; + unsigned int CmdMetallic_Sg ; + unsigned char CmdWetCurr_Sp ; + unsigned int CmdWetCurr_Sg ; + unsigned char CmdTriState_Sp ; + unsigned int CmdTriState_Sg ; + unsigned char CmdAnalog ; +}; +//33993的开关状态,可以采用字节访问,也可以按位访问//XC886不一样,修改 +union ByteBitAccess +{ + struct + { + ubyte SoMc33993Byte1; + ubyte SoMc33993Byte0; + ubyte SoMc33993Byte3; + ubyte SoMc33993Byte2; + }ByteData; + struct + { + unsigned int FlgSg0 : 1; + unsigned int FlgSg1 : 1; + unsigned int FlgSg2 : 1; + unsigned int FlgSg3 : 1; + unsigned int FlgSg4 : 1; + unsigned int FlgSg5 : 1; + unsigned int FlgSg6 : 1; + unsigned int FlgSg7 : 1; + unsigned int FlgSg8 : 1; + unsigned int FlgSg9 : 1; + unsigned int FlgSg10 : 1; + unsigned int FlgSg11 : 1; + unsigned int FlgSg12 : 1; + unsigned int FlgSg13 : 1; + unsigned int FlgSp0 : 1; + unsigned int FlgSp1 : 1; + unsigned int FlgSp2 : 1; + unsigned int FlgSp3 : 1; + unsigned int FlgSp4 : 1; + unsigned int FlgSp5 : 1; + unsigned int FlgSp6 : 1; + unsigned int FlgSp7 : 1; + unsigned int FlgInt : 1; + unsigned int FlgThem : 1; + unsigned int : 8; + }BitData; +}; +//33993的开关状态,可以采用字节访问,也可以按位访问 +union WordByteBitAccess +{ + uword StaSg; + struct + { + ubyte StaSgH; + ubyte StaSgL; + }ByteData; + struct + { + unsigned int FlgSg0_FlgSp0 : 1; + unsigned int FlgSg1_FlgSp1 : 1; + unsigned int FlgSg2_FlgSp2 : 1; + unsigned int FlgSg3_FlgSp3 : 1; + unsigned int FlgSg4_FlgSp4 : 1; + unsigned int FlgSg5_FlgSp5 : 1; + unsigned int FlgSg6_FlgSp6 : 1; + unsigned int FlgSg7_FlgSp7 : 1; + unsigned int FlgSg8 : 1; + unsigned int FlgSg9 : 1; + unsigned int FlgSg10 : 1; + unsigned int FlgSg11 : 1; + unsigned int FlgSg12 : 1; + unsigned int FlgSg13 : 1; + unsigned int : 1; + unsigned int : 1; + }BitData; +}; +//***************************************************************************** +//全局变量 +//***************************************************************************** +static struct StaMc33993CmdSet PntSta[2] = {0}; +//***************************************************************************** +//本文件全局函数声明 +//***************************************************************************** +bit Mc33993StaRcvOneBit(ubyte NumMc,ubyte Sp0ToSg13); +ubyte Mc33993CmdSendOneBit(ubyte NumMc,ubyte CmdBit,ubyte Sp0ToSg13,bit Status); +void InitMc33993Sec(void); +void ToggleOneBit(ubyte NumMc,ubyte CmdBit,ubyte Sp0ToSg13); + +union ByteBitAccess *Mc33993CmdSend(ubyte NumMc,ubyte CmdBit,ubyte SetBitH,ubyte SetBitL); + + + +////**************************************************************************** +//// @Function ubyte Mc33993AnalogChSel(struct StaMc33993CmdSet *PntSta,ubyte NumMc,ubyte Mode,ubyte Channal) +//// +////---------------------------------------------------------------------------- +//// @Description 模拟通道选择、模式选择 +//// +////---------------------------------------------------------------------------- +//// @Returnvalue 通道切换成功返回1 +//// Mode,高阻,2mA,16mA +////---------------------------------------------------------------------------- +//// @Parameters None +//// +////---------------------------------------------------------------------------- +//// @Date 2008-12-2 +//// +////**************************************************************************** +//ubyte Mc33993AnalogChSel(ubyte NumMc,ubyte Mode,ubyte Channal) +//{ +// union WordByteBitAccess RcvSoMc33993; +////---------------------------------------------------------------------------- +// if(NumMc > (NumChipSw-1))NumMc = (NumChipSw-1); //多余NumChipSw片 +// RcvSoMc33993.ByteData.StaSgL = 0; +// RcvSoMc33993.ByteData.StaSgL = (RcvSoMc33993.ByteData.StaSgL | Channal); +// switch(Mode) +// { +// case DF_AN_HIMP: +// RcvSoMc33993.BitData.FlgSg6_FlgSp6 = 0;//该两位决定选择哪种模式 +// RcvSoMc33993.BitData.FlgSg5_FlgSp5 = 0; +// break; +// case DF_AN_2MA: +// RcvSoMc33993.BitData.FlgSg6_FlgSp6 = 0; +// RcvSoMc33993.BitData.FlgSg5_FlgSp5 = 1; +// break; +// case DF_AN_16MA: +// RcvSoMc33993.BitData.FlgSg6_FlgSp6 = 1; +// RcvSoMc33993.BitData.FlgSg5_FlgSp5 = 0; +// break; +// default: +// RcvSoMc33993.BitData.FlgSg6_FlgSp6 = 0; +// RcvSoMc33993.BitData.FlgSg5_FlgSp5 = 0; +// } +// Mc33993CmdSend(NumMc,DF_CMDANALOG,RcvSoMc33993.ByteData.StaSgH,RcvSoMc33993.ByteData.StaSgL); +// +// (*(PntSta+NumMc)).CmdAnalog = RcvSoMc33993.ByteData.StaSgL;//保存命令状态 +// +// return 1; +//} + + +//--------------------------------------------------- + +//***************************************************************************** +//函数 +//***************************************************************************** + +////**************************************************************************** +//// @Function void SwStaSample(UnSwSample *ptmp,ubyte NumSampleChip) +//// +////---------------------------------------------------------------------------- +//// @Description 采集33993的开关信号。 +//// +////---------------------------------------------------------------------------- +//// @Returnvalue None +//// +////---------------------------------------------------------------------------- +//// @Parameters ptmp,存放数据结构体指针,NumSampleChip,33993芯片数量 +//// +////---------------------------------------------------------------------------- +//// @Date 2008-12-2 +//// +////**************************************************************************** +void SwStaSample(UnSwSample *ptmp) +{ + union ByteBitAccess *pStaSwIn; + uword i,k; +//----初始化------------------------------------------------------------------------ + InitMc33993Sec();//一个大循环必须调用一次,这样就算12V掉电或33993复位,马上可以恢复。 +//初始化用作采集的IO + for(i=0;i>0 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP0 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP0 ,Gnd);break; + case 1 :if(((((*tmpUn).ArrData.Arr[i][1])>>1 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP1 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP1 ,Gnd);break; + case 2 :if(((((*tmpUn).ArrData.Arr[i][1])>>2 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP2 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP2 ,Gnd);break; + case 3 :if(((((*tmpUn).ArrData.Arr[i][1])>>3 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP3 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP3 ,Gnd);break; + case 4 :if(((((*tmpUn).ArrData.Arr[i][1])>>4 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP4 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP4 ,Gnd);break; + case 5 :if(((((*tmpUn).ArrData.Arr[i][1])>>5 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP5 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP5 ,Gnd);break; + case 6 :if(((((*tmpUn).ArrData.Arr[i][1])>>6 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP6 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP6 ,Gnd);break; + case 7 :if(((((*tmpUn).ArrData.Arr[i][1])>>7 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP7 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP7 ,Gnd);break; + case 8 :if(((((*tmpUn).ArrData.Arr[i][0])>>0 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG0 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG0 ,Gnd);break; + case 9 :if(((((*tmpUn).ArrData.Arr[i][0])>>1 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG1 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG1 ,Gnd);break; + case 10:if(((((*tmpUn).ArrData.Arr[i][0])>>2 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG2 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG2 ,Gnd);break; + case 11:if(((((*tmpUn).ArrData.Arr[i][0])>>3 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG3 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG3 ,Gnd);break; + case 12:if(((((*tmpUn).ArrData.Arr[i][0])>>4 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG4 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG4 ,Gnd);break; + case 13:if(((((*tmpUn).ArrData.Arr[i][0])>>5 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG5 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG5 ,Gnd);break; + case 14:if(((((*tmpUn).ArrData.Arr[i][0])>>6 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG6 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG6 ,Gnd);break; + case 15:if(((((*tmpUn).ArrData.Arr[i][0])>>7 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG7 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG7 ,Gnd);break; + case 16:if(((((*tmpUn).ArrData.Arr[i][3])>>0 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG8 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG8 ,Gnd);break; + case 17:if(((((*tmpUn).ArrData.Arr[i][3])>>1 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG9 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG9 ,Gnd);break; + case 18:if(((((*tmpUn).ArrData.Arr[i][3])>>2 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG10,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG10,Gnd);break; + case 19:if(((((*tmpUn).ArrData.Arr[i][3])>>3 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG11,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG11,Gnd);break; + case 20:if(((((*tmpUn).ArrData.Arr[i][3])>>4 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG12,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG12,Gnd);break; + case 21:if(((((*tmpUn).ArrData.Arr[i][3])>>5 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG13,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG13,Gnd);break; + default:; + } + } + } +} + + + +//**************************************************************************** +// @Function void InitMc33993Sec(struct StaMc33993CmdSet *PntSta) +// +//---------------------------------------------------------------------------- +// @Description 所有MC33993二次初始化,也就是每次操作33993时都用之前的状态初始化 +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters MC33993状态存储结构体指针PntSta +// +//---------------------------------------------------------------------------- +// @Date 2008-12-2 +// +//**************************************************************************** +void InitMc33993Sec(void) +{ + ubyte i; + for(i=DF_SwInNum;i>8)&0x00ff),(ubyte)(((*(PntSta+i)).CmdInt_Sg)&0x00ff)); //1,关闭中断 + Mc33993CmdSend(i,DF_CMDMETALLIC_SP, 0, (*(PntSta+i)).CmdMetallic_Sp); //0,2mA + Mc33993CmdSend(i,DF_CMDMETALLIC_SG, (ubyte)((((*(PntSta+i)).CmdMetallic_Sg)>>8)&0x00ff),(ubyte)(((*(PntSta+i)).CmdMetallic_Sg)&0x00ff)); //0,2mA + Mc33993CmdSend(i,DF_CMDANALOG, 0, (*(PntSta+i)).CmdAnalog); //0,不选择任何通道 + Mc33993CmdSend(i,DF_CMDWETCURR_SP, 0, (*(PntSta+i)).CmdWetCurr_Sp); //0,湿电流定时器关闭 + Mc33993CmdSend(i,DF_CMDWETCURR_SG, (ubyte)((((*(PntSta+i)).CmdWetCurr_Sg) >>8)&0x00ff),(ubyte)(((*(PntSta+i)).CmdWetCurr_Sg)&0x00ff)); //0,湿电流定时器关闭 + Mc33993CmdSend(i,DF_CMDTRISTATE_SP, 0, (*(PntSta+i)).CmdTriState_Sp); //0,禁止三态 + Mc33993CmdSend(i,DF_CMDTRISTATE_SG, (ubyte)((((*(PntSta+i)).CmdTriState_Sg)>>8)&0x00ff),(ubyte)(((*(PntSta+i)).CmdTriState_Sg)&0x00ff)); //0,使能三态 + } +} + +//**************************************************************************** +// @Function void InitMc33993(struct StaMc33993CmdSet *PntSta) +// +//---------------------------------------------------------------------------- +// @Description 所有MC33993在单片机上电时初始化 +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2008-12-2 +// +//**************************************************************************** +void InitSW(void) +{ + ubyte i; + for(i=0;i (NumChipSw-1))NumMc = (NumChipSw-1); + switch(CmdBit) + { +//DF_CMDTRISTATE_SP + case DF_CMDTRISTATE_SP: + RcvSoMc33993.ByteData.StaSgL = (*(PntSta+NumMc)).CmdTriState_Sp; + if(Sp0ToSg13 == DF_FLGSP7)RcvSoMc33993.BitData.FlgSg7_FlgSp7 = Status; + else if(Sp0ToSg13 == DF_FLGSP6)RcvSoMc33993.BitData.FlgSg6_FlgSp6 = Status; + else if(Sp0ToSg13 == DF_FLGSP5)RcvSoMc33993.BitData.FlgSg5_FlgSp5 = Status; + else if(Sp0ToSg13 == DF_FLGSP4)RcvSoMc33993.BitData.FlgSg4_FlgSp4 = Status; + else if(Sp0ToSg13 == DF_FLGSP3)RcvSoMc33993.BitData.FlgSg3_FlgSp3 = Status; + else if(Sp0ToSg13 == DF_FLGSP2)RcvSoMc33993.BitData.FlgSg2_FlgSp2 = Status; + else if(Sp0ToSg13 == DF_FLGSP1)RcvSoMc33993.BitData.FlgSg1_FlgSp1 = Status; + else if(Sp0ToSg13 == DF_FLGSP0)RcvSoMc33993.BitData.FlgSg0_FlgSp0 = Status; + else ; + Mc33993CmdSend(NumMc,CmdBit,RcvSoMc33993.ByteData.StaSgH,RcvSoMc33993.ByteData.StaSgL); + //(*(PntSta+NumMc)).CmdTriState_Sp = RcvSoMc33993.ByteData.StaSgL; + break; +//DF_CMDTRISTATE_SG + case DF_CMDTRISTATE_SG: + RcvSoMc33993.StaSg = (*(PntSta+NumMc)).CmdTriState_Sg; + if(Sp0ToSg13 == DF_FLGSG13) RcvSoMc33993.BitData.FlgSg13 = Status; + else if(Sp0ToSg13 == DF_FLGSG12) RcvSoMc33993.BitData.FlgSg12 = Status; + else if(Sp0ToSg13 == DF_FLGSG11) RcvSoMc33993.BitData.FlgSg11 = Status; + else if(Sp0ToSg13 == DF_FLGSG10) RcvSoMc33993.BitData.FlgSg10 = Status; + else if(Sp0ToSg13 == DF_FLGSG9 ) RcvSoMc33993.BitData.FlgSg9 = Status; + else if(Sp0ToSg13 == DF_FLGSG8 ) RcvSoMc33993.BitData.FlgSg8 = Status; + else if(Sp0ToSg13 == DF_FLGSG7 ) RcvSoMc33993.BitData.FlgSg7_FlgSp7 = Status; + else if(Sp0ToSg13 == DF_FLGSG6 ) RcvSoMc33993.BitData.FlgSg6_FlgSp6 = Status; + else if(Sp0ToSg13 == DF_FLGSG5 ) RcvSoMc33993.BitData.FlgSg5_FlgSp5 = Status; + else if(Sp0ToSg13 == DF_FLGSG4 ) RcvSoMc33993.BitData.FlgSg4_FlgSp4 = Status; + else if(Sp0ToSg13 == DF_FLGSG3 ) RcvSoMc33993.BitData.FlgSg3_FlgSp3 = Status; + else if(Sp0ToSg13 == DF_FLGSG2 ) RcvSoMc33993.BitData.FlgSg2_FlgSp2 = Status; + else if(Sp0ToSg13 == DF_FLGSG1 ) RcvSoMc33993.BitData.FlgSg1_FlgSp1 = Status; + else if(Sp0ToSg13 == DF_FLGSG0 ) RcvSoMc33993.BitData.FlgSg0_FlgSp0 = Status; + else ; + Mc33993CmdSend(NumMc,CmdBit,RcvSoMc33993.ByteData.StaSgH,RcvSoMc33993.ByteData.StaSgL); + //(*(PntSta+NumMc)).CmdTriState_Sg = RcvSoMc33993.StaSg; + break; + default:; + } + return 1; +} + +//片选产生 +//多余20片需要增加 +void ChangeCsMc33993(ubyte NumMc,bit HorL) +{ + switch(NumMc) + { + case Mc33993_0 : CS_SwChip_0 = HorL;break; + case Mc33993_1 : CS_SwChip_1 = HorL;break; + default:; + } +} +//**************************************************************************** +// @Function ubyte Mc33993DataSendRcv(ubyte Data) +// +//---------------------------------------------------------------------------- +// @Description 发送数据,返回接收数据 +// 此函数与CPU平台相关,不同CPU需要修改。 +// 此函数适用于XC2765,SSC采用查询方式 +//---------------------------------------------------------------------------- +// @Returnvalue 返回接收的数据 +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2011-3-4 10:28:27 +// +//**************************************************************************** +ubyte Mc33993DataSendRcv(ubyte Data) +{ + uword i; + SSC_vSendData(Data); + for(i=0;(i<6000)&&(!(IRCON1&0x02));i++); + IRCON1 &= 0xFD; + for(i=0;(i<6000)&&(!(IRCON1&0x04));i++); + IRCON1 &= 0xFB; + return((ubyte)(SSC_vGetData())); +} + +//**************************************************************************** +// @Function union ByteBitAccess *Mc33993CmdSend(ubyte NumMc,ubyte CmdBit,ubyte SetBitH,ubyte SetBitL) +// +//---------------------------------------------------------------------------- +// @Description 发送33993的操作命令,返回开关状态 +// +//---------------------------------------------------------------------------- +// @Returnvalue 返回接收的3个字节的开关状态 +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2011-3-4 10:36:27 +// +//**************************************************************************** +union ByteBitAccess *Mc33993CmdSend(ubyte NumMc,ubyte CmdBit,ubyte SetBitH,ubyte SetBitL) +{ + union ByteBitAccess RcvSoMc,*Pnt; + union WordByteBitAccess RcvSoMc33993W; +// uword i; +//---------------------------------------------------------------------------- + RcvSoMc33993W.ByteData.StaSgH = SetBitH; + RcvSoMc33993W.ByteData.StaSgL = SetBitL; + switch(CmdBit)//保存命令状态 + { + case DF_CMDSETTING :(*(PntSta+NumMc)).CmdSetting = RcvSoMc33993W.ByteData.StaSgL;break; + case DF_CMDINT_SP :(*(PntSta+NumMc)).CmdInt_Sp = RcvSoMc33993W.ByteData.StaSgL;break; + case DF_CMDINT_SG :(*(PntSta+NumMc)).CmdInt_Sg = RcvSoMc33993W.StaSg;break; + case DF_CMDMETALLIC_SP:(*(PntSta+NumMc)).CmdMetallic_Sp = RcvSoMc33993W.ByteData.StaSgL;break; + case DF_CMDMETALLIC_SG:(*(PntSta+NumMc)).CmdMetallic_Sg = RcvSoMc33993W.StaSg;break; + case DF_CMDANALOG :(*(PntSta+NumMc)).CmdAnalog = RcvSoMc33993W.ByteData.StaSgL;break; + case DF_CMDWETCURR_SP :(*(PntSta+NumMc)).CmdWetCurr_Sp = RcvSoMc33993W.ByteData.StaSgL;break; + case DF_CMDWETCURR_SG :(*(PntSta+NumMc)).CmdWetCurr_Sg = RcvSoMc33993W.StaSg;break; + case DF_CMDTRISTATE_SP:(*(PntSta+NumMc)).CmdTriState_Sp = RcvSoMc33993W.ByteData.StaSgL;break; + case DF_CMDTRISTATE_SG:(*(PntSta+NumMc)).CmdTriState_Sg = RcvSoMc33993W.StaSg;break; + default:; + } + + + if(NumMc > (NumChipSw-1))NumMc = (NumChipSw-1); + ChangeCsMc33993(NumMc,0); +//---------------------------- + _nop_(); + _nop_(); + _nop_(); + _nop_(); + +//------------------------------- + + RcvSoMc.ByteData.SoMc33993Byte2 = Mc33993DataSendRcv(CmdBit); + + RcvSoMc.ByteData.SoMc33993Byte1 = Mc33993DataSendRcv(SetBitH); + + RcvSoMc.ByteData.SoMc33993Byte0 = Mc33993DataSendRcv(SetBitL); + + ChangeCsMc33993(NumMc,1); +//---------------------------- + _nop_(); + _nop_(); + _nop_(); + _nop_(); +//------------------------------- + Pnt = &RcvSoMc; + return (Pnt); +} diff --git a/SwDriver.C.bak b/SwDriver.C.bak new file mode 100644 index 0000000..d6ac035 --- /dev/null +++ b/SwDriver.C.bak @@ -0,0 +1,893 @@ +#include "MAIN.h" + +//***************************************************************************** +//宏定义 +//***************************************************************************** +//多余20片需要增加 +#define Mc33993_0 0 +#define Mc33993_1 1 +#define Mc33993_2 2 +#define Mc33993_3 3 +#define Mc33993_4 4 +#define Mc33993_5 5 +#define Mc33993_6 6 +#define Mc33993_7 7 +#define Mc33993_8 8 +#define Mc33993_9 9 +#define Mc33993_10 10 +#define Mc33993_11 11 +#define Mc33993_12 12 +#define Mc33993_13 13 +#define Mc33993_14 14 +#define Mc33993_15 15 +#define Mc33993_16 16 +#define Mc33993_17 17 +#define Mc33993_18 18 +#define Mc33993_19 19 +#define Mc33993_20 20 + + +#define D24V 0 +#define Gnd 1 + +#define TriOff 0 +#define TriOn 1 + +#define WetCur2mA 0 +#define WetCur16mA 1 + +#define SwToGnd 0 +#define SwToPwr 1 + +#define ALLTRI 0xff +#define ALLD24V 0x0 + +#define DF_CMDSWSTATUS 0x00 +#define DF_CMDSETTING 0x01 +#define DF_CMDINT_SP 0x02 +#define DF_CMDINT_SG 0x03 +#define DF_CMDMETALLIC_SP 0x04 +#define DF_CMDMETALLIC_SG 0x05 +#define DF_CMDANALOG 0x06 +#define DF_CMDWETCURR_SP 0x07 +#define DF_CMDWETCURR_SG 0x08 +#define DF_CMDTRISTATE_SP 0x09 +#define DF_CMDTRISTATE_SG 0x0A +#define DF_CMDCALIBRATION 0x0B +#define DF_CMDSLEEP 0x0C +#define DF_CMDRESET 0x7F + + +#define DF_FLGTHEM 10 +#define DF_FLGINT 11 +#define DF_FLGSP7 12 +#define DF_FLGSP6 13 +#define DF_FLGSP5 14 +#define DF_FLGSP4 15 +#define DF_FLGSP3 16 +#define DF_FLGSP2 17 +#define DF_FLGSP1 18 +#define DF_FLGSP0 19 +#define DF_FLGSG13 20 +#define DF_FLGSG12 21 +#define DF_FLGSG11 22 +#define DF_FLGSG10 23 +#define DF_FLGSG9 24 +#define DF_FLGSG8 25 +#define DF_FLGSG7 26 +#define DF_FLGSG6 27 +#define DF_FLGSG5 28 +#define DF_FLGSG4 29 +#define DF_FLGSG3 30 +#define DF_FLGSG2 31 +#define DF_FLGSG1 32 +#define DF_FLGSG0 33 + +//Analog +#define DF_AN_HIMP 1 +#define DF_AN_2MA 2 +#define DF_AN_16MA 3 + +#define DF_CH_SG0 1 +#define DF_CH_SG1 2 +#define DF_CH_SG2 3 +#define DF_CH_SG3 4 +#define DF_CH_SG4 5 +#define DF_CH_SG5 6 +#define DF_CH_SG6 7 +#define DF_CH_SG7 8 +#define DF_CH_SG8 9 +#define DF_CH_SG9 10 +#define DF_CH_SG10 11 +#define DF_CH_SG11 12 +#define DF_CH_SG12 13 +#define DF_CH_SG13 14 +#define DF_CH_SP0 15 +#define DF_CH_SP1 16 +#define DF_CH_SP2 17 +#define DF_CH_SP3 18 +#define DF_CH_SP4 19 +#define DF_CH_SP5 20 +#define DF_CH_SP6 21 +#define DF_CH_SP7 22 + +//***************************************************************************** +//数据结构 +//***************************************************************************** +//每个33993的开关命令状态,由于掉电或者干扰导致33993内部复位时,可以用该状态恢复。 +struct StaMc33993CmdSet +{ + unsigned char CmdSetting ; + unsigned char CmdInt_Sp ; + unsigned int CmdInt_Sg ; + unsigned char CmdMetallic_Sp ; + unsigned int CmdMetallic_Sg ; + unsigned char CmdWetCurr_Sp ; + unsigned int CmdWetCurr_Sg ; + unsigned char CmdTriState_Sp ; + unsigned int CmdTriState_Sg ; + unsigned char CmdAnalog ; +}; +//33993的开关状态,可以采用字节访问,也可以按位访问//XC886不一样,修改 +union ByteBitAccess +{ + struct + { + ubyte SoMc33993Byte1; + ubyte SoMc33993Byte0; + ubyte SoMc33993Byte3; + ubyte SoMc33993Byte2; + }ByteData; + struct + { + unsigned int FlgSg0 : 1; + unsigned int FlgSg1 : 1; + unsigned int FlgSg2 : 1; + unsigned int FlgSg3 : 1; + unsigned int FlgSg4 : 1; + unsigned int FlgSg5 : 1; + unsigned int FlgSg6 : 1; + unsigned int FlgSg7 : 1; + unsigned int FlgSg8 : 1; + unsigned int FlgSg9 : 1; + unsigned int FlgSg10 : 1; + unsigned int FlgSg11 : 1; + unsigned int FlgSg12 : 1; + unsigned int FlgSg13 : 1; + unsigned int FlgSp0 : 1; + unsigned int FlgSp1 : 1; + unsigned int FlgSp2 : 1; + unsigned int FlgSp3 : 1; + unsigned int FlgSp4 : 1; + unsigned int FlgSp5 : 1; + unsigned int FlgSp6 : 1; + unsigned int FlgSp7 : 1; + unsigned int FlgInt : 1; + unsigned int FlgThem : 1; + unsigned int : 8; + }BitData; +}; +//33993的开关状态,可以采用字节访问,也可以按位访问 +union WordByteBitAccess +{ + uword StaSg; + struct + { + ubyte StaSgH; + ubyte StaSgL; + }ByteData; + struct + { + unsigned int FlgSg0_FlgSp0 : 1; + unsigned int FlgSg1_FlgSp1 : 1; + unsigned int FlgSg2_FlgSp2 : 1; + unsigned int FlgSg3_FlgSp3 : 1; + unsigned int FlgSg4_FlgSp4 : 1; + unsigned int FlgSg5_FlgSp5 : 1; + unsigned int FlgSg6_FlgSp6 : 1; + unsigned int FlgSg7_FlgSp7 : 1; + unsigned int FlgSg8 : 1; + unsigned int FlgSg9 : 1; + unsigned int FlgSg10 : 1; + unsigned int FlgSg11 : 1; + unsigned int FlgSg12 : 1; + unsigned int FlgSg13 : 1; + unsigned int : 1; + unsigned int : 1; + }BitData; +}; +//***************************************************************************** +//全局变量 +//***************************************************************************** +static struct StaMc33993CmdSet PntSta[2] = {0}; +//***************************************************************************** +//本文件全局函数声明 +//***************************************************************************** +bit Mc33993StaRcvOneBit(ubyte NumMc,ubyte Sp0ToSg13); +ubyte Mc33993CmdSendOneBit(ubyte NumMc,ubyte CmdBit,ubyte Sp0ToSg13,bit Status); +void InitMc33993Sec(void); +void ToggleOneBit(ubyte NumMc,ubyte CmdBit,ubyte Sp0ToSg13); +ubyte Mc33993AnalogChSel(ubyte NumMc,ubyte Mode,ubyte Channal); +union ByteBitAccess *Mc33993CmdSend(ubyte NumMc,ubyte CmdBit,ubyte SetBitH,ubyte SetBitL); + + + + + + +//--------------------------------------------------- + +//***************************************************************************** +//函数 +//***************************************************************************** +void Swtest2(void) +{ + ulong i,j; + + UnSwOut_1.BitData.S21 = 1;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S22 = 1;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S23 = 1;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S24 = 1;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S25 = 1;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S26 = 1;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S27 = 1;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S28 = 1;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S29 = 1;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S30 = 1;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S31 = 1;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S32 = 1;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S33 = 1;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S34 = 1;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S35 = 1;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S36 = 1;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S37 = 1;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S38 = 1;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S39 = 1;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S40 = 1;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + + UnSwOut_1.BitData.S21 = 0;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S22 = 0;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S23 = 0;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S24 = 0;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S25 = 0;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S26 = 0;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S27 = 0;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S28 = 0;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S29 = 0;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S30 = 0;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S31 = 0;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S32 = 0;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S33 = 0;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S34 = 0;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S35 = 0;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S36 = 0;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S37 = 0;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S38 = 0;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S39 = 0;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + UnSwOut_1.BitData.S40 = 0;LedLight(&UnSwOut_1); for(j=0;j<200;j++){for(i=0;i<133;i++);} + + +} + +//**************************************************************************** +// @Function void SwStaSample(UnSwSample *ptmp,ubyte NumSampleChip) +// +//---------------------------------------------------------------------------- +// @Description 采集33993的开关信号。 +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters ptmp,存放数据结构体指针,NumSampleChip,33993芯片数量 +// +//---------------------------------------------------------------------------- +// @Date 2008-12-2 +// +//**************************************************************************** +void SwStaSample(UnSwSample *ptmp) +{ + union ByteBitAccess *pStaSwIn; + uword i,k; +//----初始化------------------------------------------------------------------------ + InitMc33993Sec();//一个大循环必须调用一次,这样就算12V掉电或33993复位,马上可以恢复。 +//初始化用作采集的IO + for(i=0;i>0 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP0 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP0 ,Gnd);break; + case 1 :if(((((*tmpUn).ArrData.Arr[i][1])>>1 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP1 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP1 ,Gnd);break; + case 2 :if(((((*tmpUn).ArrData.Arr[i][1])>>2 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP2 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP2 ,Gnd);break; + case 3 :if(((((*tmpUn).ArrData.Arr[i][1])>>3 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP3 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP3 ,Gnd);break; + case 4 :if(((((*tmpUn).ArrData.Arr[i][1])>>4 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP4 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP4 ,Gnd);break; + case 5 :if(((((*tmpUn).ArrData.Arr[i][1])>>5 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP5 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP5 ,Gnd);break; + case 6 :if(((((*tmpUn).ArrData.Arr[i][1])>>6 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP6 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP6 ,Gnd);break; + case 7 :if(((((*tmpUn).ArrData.Arr[i][1])>>7 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP7 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SP,DF_FLGSP7 ,Gnd);break; + case 8 :if(((((*tmpUn).ArrData.Arr[i][0])>>0 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG0 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG0 ,Gnd);break; + case 9 :if(((((*tmpUn).ArrData.Arr[i][0])>>1 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG1 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG1 ,Gnd);break; + case 10:if(((((*tmpUn).ArrData.Arr[i][0])>>2 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG2 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG2 ,Gnd);break; + case 11:if(((((*tmpUn).ArrData.Arr[i][0])>>3 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG3 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG3 ,Gnd);break; + case 12:if(((((*tmpUn).ArrData.Arr[i][0])>>4 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG4 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG4 ,Gnd);break; + case 13:if(((((*tmpUn).ArrData.Arr[i][0])>>5 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG5 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG5 ,Gnd);break; + case 14:if(((((*tmpUn).ArrData.Arr[i][0])>>6 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG6 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG6 ,Gnd);break; + case 15:if(((((*tmpUn).ArrData.Arr[i][0])>>7 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG7 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG7 ,Gnd);break; + case 16:if(((((*tmpUn).ArrData.Arr[i][3])>>0 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG8 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG8 ,Gnd);break; + case 17:if(((((*tmpUn).ArrData.Arr[i][3])>>1 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG9 ,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG9 ,Gnd);break; + case 18:if(((((*tmpUn).ArrData.Arr[i][3])>>2 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG10,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG10,Gnd);break; + case 19:if(((((*tmpUn).ArrData.Arr[i][3])>>3 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG11,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG11,Gnd);break; + case 20:if(((((*tmpUn).ArrData.Arr[i][3])>>4 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG12,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG12,Gnd);break; + case 21:if(((((*tmpUn).ArrData.Arr[i][3])>>5 )&0x01) == 1)Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG13,D24V);else Mc33993CmdSendOneBit(i+DF_SwInNum,DF_CMDTRISTATE_SG,DF_FLGSG13,Gnd);break; + default:; + } + } + } +} + + +//**************************************************************************** +// @Function void ToggleOneBit(ubyte NumMc,ubyte CmdBit,ubyte Sp0ToSg13) +// +//---------------------------------------------------------------------------- +// @Description 取反给定芯片的给定位,需要提供命令位 +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters MC33993状态存储结构体指针PntSta +// +//---------------------------------------------------------------------------- +// @Date 2008-12-2 +// +//**************************************************************************** +// void ToggleOneBit(ubyte NumMc,ubyte CmdBit,ubyte Sp0ToSg13) +// { +// union WordByteBitAccess RcvSoMc33993; +// bit status; + +// if(CmdBit == DF_CMDTRISTATE_SG) +// { +// RcvSoMc33993.StaSg = (*(PntSta+NumMc)).CmdTriState_Sg; + +// switch(Sp0ToSg13) +// { +// case DF_FLGSG13: status = RcvSoMc33993.BitData.FlgSg13 ;break; +// case DF_FLGSG12: status = RcvSoMc33993.BitData.FlgSg12 ;break; +// case DF_FLGSG11: status = RcvSoMc33993.BitData.FlgSg11 ;break; +// case DF_FLGSG10: status = RcvSoMc33993.BitData.FlgSg10 ;break; +// case DF_FLGSG9 : status = RcvSoMc33993.BitData.FlgSg9 ;break; +// case DF_FLGSG8 : status = RcvSoMc33993.BitData.FlgSg8 ;break; +// case DF_FLGSG7 : status = RcvSoMc33993.BitData.FlgSg7_FlgSp7;break; +// case DF_FLGSG6 : status = RcvSoMc33993.BitData.FlgSg6_FlgSp6;break; +// case DF_FLGSG5 : status = RcvSoMc33993.BitData.FlgSg5_FlgSp5;break; +// case DF_FLGSG4 : status = RcvSoMc33993.BitData.FlgSg4_FlgSp4;break; +// case DF_FLGSG3 : status = RcvSoMc33993.BitData.FlgSg3_FlgSp3;break; +// case DF_FLGSG2 : status = RcvSoMc33993.BitData.FlgSg2_FlgSp2;break; +// case DF_FLGSG1 : status = RcvSoMc33993.BitData.FlgSg1_FlgSp1;break; +// case DF_FLGSG0 : status = RcvSoMc33993.BitData.FlgSg0_FlgSp0;break; +// default:; +// } +// if(status)Mc33993CmdSendOneBit(Mc33993_1,DF_CMDTRISTATE_SG,Sp0ToSg13,D24V); +// else Mc33993CmdSendOneBit(Mc33993_1,DF_CMDTRISTATE_SG,Sp0ToSg13,Gnd); +// } +// else if(CmdBit == DF_CMDTRISTATE_SP) +// { +// RcvSoMc33993.ByteData.StaSgL = (*(PntSta+NumMc)).CmdTriState_Sp; + +// switch(Sp0ToSg13) +// { +// case DF_FLGSG7 : status = RcvSoMc33993.BitData.FlgSg7_FlgSp7;break; +// case DF_FLGSG6 : status = RcvSoMc33993.BitData.FlgSg6_FlgSp6;break; +// case DF_FLGSG5 : status = RcvSoMc33993.BitData.FlgSg5_FlgSp5;break; +// case DF_FLGSG4 : status = RcvSoMc33993.BitData.FlgSg4_FlgSp4;break; +// case DF_FLGSG3 : status = RcvSoMc33993.BitData.FlgSg3_FlgSp3;break; +// case DF_FLGSG2 : status = RcvSoMc33993.BitData.FlgSg2_FlgSp2;break; +// case DF_FLGSG1 : status = RcvSoMc33993.BitData.FlgSg1_FlgSp1;break; +// case DF_FLGSG0 : status = RcvSoMc33993.BitData.FlgSg0_FlgSp0;break; +// default:; +// } +// if(status)Mc33993CmdSendOneBit(Mc33993_1,DF_CMDTRISTATE_SP,Sp0ToSg13,D24V); +// else Mc33993CmdSendOneBit(Mc33993_1,DF_CMDTRISTATE_SP,Sp0ToSg13,Gnd); +// } +// } + +//**************************************************************************** +// @Function void InitMc33993Sec(struct StaMc33993CmdSet *PntSta) +// +//---------------------------------------------------------------------------- +// @Description 所有MC33993二次初始化,也就是每次操作33993时都用之前的状态初始化 +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters MC33993状态存储结构体指针PntSta +// +//---------------------------------------------------------------------------- +// @Date 2008-12-2 +// +//**************************************************************************** +void InitMc33993Sec(void) +{ + ubyte i; + for(i=0;i>8)&0x00ff),(ubyte)(((*(PntSta+i)).CmdInt_Sg)&0x00ff)); //1,关闭中断 + Mc33993CmdSend(i,DF_CMDMETALLIC_SP, 0, (*(PntSta+i)).CmdMetallic_Sp); //0,2mA + Mc33993CmdSend(i,DF_CMDMETALLIC_SG, (ubyte)((((*(PntSta+i)).CmdMetallic_Sg)>>8)&0x00ff),(ubyte)(((*(PntSta+i)).CmdMetallic_Sg)&0x00ff)); //0,2mA + Mc33993CmdSend(i,DF_CMDANALOG, 0, (*(PntSta+i)).CmdAnalog); //0,不选择任何通道 + Mc33993CmdSend(i,DF_CMDWETCURR_SP, 0, (*(PntSta+i)).CmdWetCurr_Sp); //0,湿电流定时器关闭 + Mc33993CmdSend(i,DF_CMDWETCURR_SG, (ubyte)((((*(PntSta+i)).CmdWetCurr_Sg) >>8)&0x00ff),(ubyte)(((*(PntSta+i)).CmdWetCurr_Sg)&0x00ff)); //0,湿电流定时器关闭 + Mc33993CmdSend(i,DF_CMDTRISTATE_SP, 0, (*(PntSta+i)).CmdTriState_Sp); //0,禁止三态 + Mc33993CmdSend(i,DF_CMDTRISTATE_SG, (ubyte)((((*(PntSta+i)).CmdTriState_Sg)>>8)&0x00ff),(ubyte)(((*(PntSta+i)).CmdTriState_Sg)&0x00ff)); //0,使能三态 + } +} + +//**************************************************************************** +// @Function void InitMc33993(struct StaMc33993CmdSet *PntSta) +// +//---------------------------------------------------------------------------- +// @Description 所有MC33993在单片机上电时初始化 +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2008-12-2 +// +//**************************************************************************** +void InitSW(void) +{ + ubyte i; + for(i=0;i (NumChipSw-1))NumMc = (NumChipSw-1); //多余NumChipSw片 +// RcvSoMc33993.ByteData.StaSgL = 0; +// RcvSoMc33993.ByteData.StaSgL = (RcvSoMc33993.ByteData.StaSgL | Channal); +// switch(Mode) +// { +// case DF_AN_HIMP: +// RcvSoMc33993.BitData.FlgSg6_FlgSp6 = 0;//该两位决定选择哪种模式 +// RcvSoMc33993.BitData.FlgSg5_FlgSp5 = 0; +// break; +// case DF_AN_2MA: +// RcvSoMc33993.BitData.FlgSg6_FlgSp6 = 0; +// RcvSoMc33993.BitData.FlgSg5_FlgSp5 = 1; +// break; +// case DF_AN_16MA: +// RcvSoMc33993.BitData.FlgSg6_FlgSp6 = 1; +// RcvSoMc33993.BitData.FlgSg5_FlgSp5 = 0; +// break; +// default: +// RcvSoMc33993.BitData.FlgSg6_FlgSp6 = 0; +// RcvSoMc33993.BitData.FlgSg5_FlgSp5 = 0; +// } +// Mc33993CmdSend(NumMc,DF_CMDANALOG,RcvSoMc33993.ByteData.StaSgH,RcvSoMc33993.ByteData.StaSgL); + +// (*(PntSta+NumMc)).CmdAnalog = RcvSoMc33993.ByteData.StaSgL;//保存命令状态 + +// return 1; +// } + +//**************************************************************************** +// @Function bit Mc33993StaRcvOneBit(ubyte NumMc,ubyte Sp0ToSg13) +// +//---------------------------------------------------------------------------- +// @Description 读取任意一位的开关状态 +// +//---------------------------------------------------------------------------- +// @Returnvalue 返回位状态 +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2008-12-2 +// +//**************************************************************************** +// bit Mc33993StaRcvOneBit(ubyte NumMc,ubyte Sp0ToSg13) +// { +// union ByteBitAccess *Pnt; +// bit BitRcvOneBit; +// //----------------------------------------------------------------------------- +// if(NumMc > (NumChipSw-1))NumMc = (NumChipSw-1); +// Pnt = Mc33993CmdSend(NumMc,DF_CMDSWSTATUS,0xff,0xff); + +// if(Sp0ToSg13 == DF_FLGTHEM)BitRcvOneBit = (*Pnt).BitData.FlgThem; +// else if(Sp0ToSg13 == DF_FLGINT )BitRcvOneBit = (*Pnt).BitData.FlgInt; +// else if(Sp0ToSg13 == DF_FLGSP7 )BitRcvOneBit = (*Pnt).BitData.FlgSp7; +// else if(Sp0ToSg13 == DF_FLGSP6 )BitRcvOneBit = (*Pnt).BitData.FlgSp6; +// else if(Sp0ToSg13 == DF_FLGSP5 )BitRcvOneBit = (*Pnt).BitData.FlgSp5; +// else if(Sp0ToSg13 == DF_FLGSP4 )BitRcvOneBit = (*Pnt).BitData.FlgSp4; +// else if(Sp0ToSg13 == DF_FLGSP3 )BitRcvOneBit = (*Pnt).BitData.FlgSp3; +// else if(Sp0ToSg13 == DF_FLGSP2 )BitRcvOneBit = (*Pnt).BitData.FlgSp2; +// else if(Sp0ToSg13 == DF_FLGSP1 )BitRcvOneBit = (*Pnt).BitData.FlgSp1; +// else if(Sp0ToSg13 == DF_FLGSP0 )BitRcvOneBit = (*Pnt).BitData.FlgSp0; +// else if(Sp0ToSg13 == DF_FLGSG13)BitRcvOneBit = (*Pnt).BitData.FlgSg13; +// else if(Sp0ToSg13 == DF_FLGSG12)BitRcvOneBit = (*Pnt).BitData.FlgSg12; +// else if(Sp0ToSg13 == DF_FLGSG11)BitRcvOneBit = (*Pnt).BitData.FlgSg11; +// else if(Sp0ToSg13 == DF_FLGSG10)BitRcvOneBit = (*Pnt).BitData.FlgSg10; +// else if(Sp0ToSg13 == DF_FLGSG9 )BitRcvOneBit = (*Pnt).BitData.FlgSg9; +// else if(Sp0ToSg13 == DF_FLGSG8 )BitRcvOneBit = (*Pnt).BitData.FlgSg8; +// else if(Sp0ToSg13 == DF_FLGSG7 )BitRcvOneBit = (*Pnt).BitData.FlgSg7; +// else if(Sp0ToSg13 == DF_FLGSG6 )BitRcvOneBit = (*Pnt).BitData.FlgSg6; +// else if(Sp0ToSg13 == DF_FLGSG5 )BitRcvOneBit = (*Pnt).BitData.FlgSg5; +// else if(Sp0ToSg13 == DF_FLGSG4 )BitRcvOneBit = (*Pnt).BitData.FlgSg4; +// else if(Sp0ToSg13 == DF_FLGSG3 )BitRcvOneBit = (*Pnt).BitData.FlgSg3; +// else if(Sp0ToSg13 == DF_FLGSG2 )BitRcvOneBit = (*Pnt).BitData.FlgSg2; +// else if(Sp0ToSg13 == DF_FLGSG1 )BitRcvOneBit = (*Pnt).BitData.FlgSg1; +// else if(Sp0ToSg13 == DF_FLGSG0 )BitRcvOneBit = (*Pnt).BitData.FlgSg0; +// else ; +// return BitRcvOneBit; +// } + +//**************************************************************************** +// @Function ubyte Mc33993CmdSendOneBit(struct StaMc33993CmdSet *PntSta,ubyte NumMc,ubyte CmdBit,ubyte Sp0ToSg13,bit Status) +// +//---------------------------------------------------------------------------- +// @Description 写MC33993任意位,调用Mc33993CmdSend(NumMc,CmdBit,RcvSoMc33993.ByteData.StaSgH,RcvSoMc33993.ByteData.StaSgL); +// +//---------------------------------------------------------------------------- +// @Returnvalue 成功返回1 +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2008-12-2 +// +//**************************************************************************** +ubyte Mc33993CmdSendOneBit(ubyte NumMc,ubyte CmdBit,ubyte Sp0ToSg13,bit Status) +{ + union WordByteBitAccess RcvSoMc33993; +//---------------------------------------------------------------------------- + if(NumMc > (NumChipSw-1))NumMc = (NumChipSw-1); + switch(CmdBit) + { +//DF_CMDSETTING + case DF_CMDSETTING: + RcvSoMc33993.ByteData.StaSgL = (*(PntSta+NumMc)).CmdSetting; //用之前的状态填充RcvSoMc33993低字节,也就是不改变其它位的状态 + if(Sp0ToSg13 == DF_FLGSP7)RcvSoMc33993.BitData.FlgSg7_FlgSp7 = Status;//更新需要改变的位 + else if(Sp0ToSg13 == DF_FLGSP6)RcvSoMc33993.BitData.FlgSg6_FlgSp6 = Status; + else if(Sp0ToSg13 == DF_FLGSP5)RcvSoMc33993.BitData.FlgSg5_FlgSp5 = Status; + else if(Sp0ToSg13 == DF_FLGSP4)RcvSoMc33993.BitData.FlgSg4_FlgSp4 = Status; + else if(Sp0ToSg13 == DF_FLGSP3)RcvSoMc33993.BitData.FlgSg3_FlgSp3 = Status; + else if(Sp0ToSg13 == DF_FLGSP2)RcvSoMc33993.BitData.FlgSg2_FlgSp2 = Status; + else if(Sp0ToSg13 == DF_FLGSP1)RcvSoMc33993.BitData.FlgSg1_FlgSp1 = Status; + else if(Sp0ToSg13 == DF_FLGSP0)RcvSoMc33993.BitData.FlgSg0_FlgSp0 = Status; + else ; + Mc33993CmdSend(NumMc,CmdBit,RcvSoMc33993.ByteData.StaSgH,RcvSoMc33993.ByteData.StaSgL); + //(*(PntSta+NumMc)).CmdSetting = RcvSoMc33993.ByteData.StaSgL;//更新后的状态保存 + break; +//DF_CMDINT_SP + case DF_CMDINT_SP: + RcvSoMc33993.ByteData.StaSgL = (*(PntSta+NumMc)).CmdInt_Sp; + if(Sp0ToSg13 == DF_FLGSP7)RcvSoMc33993.BitData.FlgSg7_FlgSp7 = Status; + else if(Sp0ToSg13 == DF_FLGSP6)RcvSoMc33993.BitData.FlgSg6_FlgSp6 = Status; + else if(Sp0ToSg13 == DF_FLGSP5)RcvSoMc33993.BitData.FlgSg5_FlgSp5 = Status; + else if(Sp0ToSg13 == DF_FLGSP4)RcvSoMc33993.BitData.FlgSg4_FlgSp4 = Status; + else if(Sp0ToSg13 == DF_FLGSP3)RcvSoMc33993.BitData.FlgSg3_FlgSp3 = Status; + else if(Sp0ToSg13 == DF_FLGSP2)RcvSoMc33993.BitData.FlgSg2_FlgSp2 = Status; + else if(Sp0ToSg13 == DF_FLGSP1)RcvSoMc33993.BitData.FlgSg1_FlgSp1 = Status; + else if(Sp0ToSg13 == DF_FLGSP0)RcvSoMc33993.BitData.FlgSg0_FlgSp0 = Status; + else ; + Mc33993CmdSend(NumMc,CmdBit,RcvSoMc33993.ByteData.StaSgH,RcvSoMc33993.ByteData.StaSgL); + //(*(PntSta+NumMc)).CmdInt_Sp = RcvSoMc33993.ByteData.StaSgL; + break; +//DF_CMDMETALLIC_SP + case DF_CMDMETALLIC_SP: + RcvSoMc33993.ByteData.StaSgL = (*(PntSta+NumMc)).CmdMetallic_Sp; + if(Sp0ToSg13 == DF_FLGSP7)RcvSoMc33993.BitData.FlgSg7_FlgSp7 = Status; + else if(Sp0ToSg13 == DF_FLGSP6)RcvSoMc33993.BitData.FlgSg6_FlgSp6 = Status; + else if(Sp0ToSg13 == DF_FLGSP5)RcvSoMc33993.BitData.FlgSg5_FlgSp5 = Status; + else if(Sp0ToSg13 == DF_FLGSP4)RcvSoMc33993.BitData.FlgSg4_FlgSp4 = Status; + else if(Sp0ToSg13 == DF_FLGSP3)RcvSoMc33993.BitData.FlgSg3_FlgSp3 = Status; + else if(Sp0ToSg13 == DF_FLGSP2)RcvSoMc33993.BitData.FlgSg2_FlgSp2 = Status; + else if(Sp0ToSg13 == DF_FLGSP1)RcvSoMc33993.BitData.FlgSg1_FlgSp1 = Status; + else if(Sp0ToSg13 == DF_FLGSP0)RcvSoMc33993.BitData.FlgSg0_FlgSp0 = Status; + else ; + Mc33993CmdSend(NumMc,CmdBit,RcvSoMc33993.ByteData.StaSgH,RcvSoMc33993.ByteData.StaSgL); + //(*(PntSta+NumMc)).CmdMetallic_Sp = RcvSoMc33993.ByteData.StaSgL; + break; +//DF_CMDWETCURR_SP + case DF_CMDWETCURR_SP: + RcvSoMc33993.ByteData.StaSgL = (*(PntSta+NumMc)).CmdWetCurr_Sp; + if(Sp0ToSg13 == DF_FLGSP7)RcvSoMc33993.BitData.FlgSg7_FlgSp7 = Status; + else if(Sp0ToSg13 == DF_FLGSP6)RcvSoMc33993.BitData.FlgSg6_FlgSp6 = Status; + else if(Sp0ToSg13 == DF_FLGSP5)RcvSoMc33993.BitData.FlgSg5_FlgSp5 = Status; + else if(Sp0ToSg13 == DF_FLGSP4)RcvSoMc33993.BitData.FlgSg4_FlgSp4 = Status; + else if(Sp0ToSg13 == DF_FLGSP3)RcvSoMc33993.BitData.FlgSg3_FlgSp3 = Status; + else if(Sp0ToSg13 == DF_FLGSP2)RcvSoMc33993.BitData.FlgSg2_FlgSp2 = Status; + else if(Sp0ToSg13 == DF_FLGSP1)RcvSoMc33993.BitData.FlgSg1_FlgSp1 = Status; + else if(Sp0ToSg13 == DF_FLGSP0)RcvSoMc33993.BitData.FlgSg0_FlgSp0 = Status; + else ; + Mc33993CmdSend(NumMc,CmdBit,RcvSoMc33993.ByteData.StaSgH,RcvSoMc33993.ByteData.StaSgL); + //(*(PntSta+NumMc)).CmdWetCurr_Sp = RcvSoMc33993.ByteData.StaSgL; + break; +//DF_CMDTRISTATE_SP + case DF_CMDTRISTATE_SP: + RcvSoMc33993.ByteData.StaSgL = (*(PntSta+NumMc)).CmdTriState_Sp; + if(Sp0ToSg13 == DF_FLGSP7)RcvSoMc33993.BitData.FlgSg7_FlgSp7 = Status; + else if(Sp0ToSg13 == DF_FLGSP6)RcvSoMc33993.BitData.FlgSg6_FlgSp6 = Status; + else if(Sp0ToSg13 == DF_FLGSP5)RcvSoMc33993.BitData.FlgSg5_FlgSp5 = Status; + else if(Sp0ToSg13 == DF_FLGSP4)RcvSoMc33993.BitData.FlgSg4_FlgSp4 = Status; + else if(Sp0ToSg13 == DF_FLGSP3)RcvSoMc33993.BitData.FlgSg3_FlgSp3 = Status; + else if(Sp0ToSg13 == DF_FLGSP2)RcvSoMc33993.BitData.FlgSg2_FlgSp2 = Status; + else if(Sp0ToSg13 == DF_FLGSP1)RcvSoMc33993.BitData.FlgSg1_FlgSp1 = Status; + else if(Sp0ToSg13 == DF_FLGSP0)RcvSoMc33993.BitData.FlgSg0_FlgSp0 = Status; + else ; + Mc33993CmdSend(NumMc,CmdBit,RcvSoMc33993.ByteData.StaSgH,RcvSoMc33993.ByteData.StaSgL); + //(*(PntSta+NumMc)).CmdTriState_Sp = RcvSoMc33993.ByteData.StaSgL; + break; +//DF_CMDINT_SG + case DF_CMDINT_SG: + RcvSoMc33993.StaSg = (*(PntSta+NumMc)).CmdInt_Sg; + if(Sp0ToSg13 == DF_FLGSG13) RcvSoMc33993.BitData.FlgSg13 = Status; + else if(Sp0ToSg13 == DF_FLGSG12) RcvSoMc33993.BitData.FlgSg12 = Status; + else if(Sp0ToSg13 == DF_FLGSG11) RcvSoMc33993.BitData.FlgSg11 = Status; + else if(Sp0ToSg13 == DF_FLGSG10) RcvSoMc33993.BitData.FlgSg10 = Status; + else if(Sp0ToSg13 == DF_FLGSG9 ) RcvSoMc33993.BitData.FlgSg9 = Status; + else if(Sp0ToSg13 == DF_FLGSG8 ) RcvSoMc33993.BitData.FlgSg8 = Status; + else if(Sp0ToSg13 == DF_FLGSG7 ) RcvSoMc33993.BitData.FlgSg7_FlgSp7 = Status; + else if(Sp0ToSg13 == DF_FLGSG6 ) RcvSoMc33993.BitData.FlgSg6_FlgSp6 = Status; + else if(Sp0ToSg13 == DF_FLGSG5 ) RcvSoMc33993.BitData.FlgSg5_FlgSp5 = Status; + else if(Sp0ToSg13 == DF_FLGSG4 ) RcvSoMc33993.BitData.FlgSg4_FlgSp4 = Status; + else if(Sp0ToSg13 == DF_FLGSG3 ) RcvSoMc33993.BitData.FlgSg3_FlgSp3 = Status; + else if(Sp0ToSg13 == DF_FLGSG2 ) RcvSoMc33993.BitData.FlgSg2_FlgSp2 = Status; + else if(Sp0ToSg13 == DF_FLGSG1 ) RcvSoMc33993.BitData.FlgSg1_FlgSp1 = Status; + else if(Sp0ToSg13 == DF_FLGSG0 ) RcvSoMc33993.BitData.FlgSg0_FlgSp0 = Status; + else ; + Mc33993CmdSend(NumMc,CmdBit,RcvSoMc33993.ByteData.StaSgH,RcvSoMc33993.ByteData.StaSgL); + //(*(PntSta+NumMc)).CmdInt_Sg = RcvSoMc33993.StaSg; + break; +//DF_CMDMETALLIC_SG + case DF_CMDMETALLIC_SG: + RcvSoMc33993.StaSg = (*(PntSta+NumMc)).CmdMetallic_Sg; + if(Sp0ToSg13 == DF_FLGSG13) RcvSoMc33993.BitData.FlgSg13 = Status; + else if(Sp0ToSg13 == DF_FLGSG12) RcvSoMc33993.BitData.FlgSg12 = Status; + else if(Sp0ToSg13 == DF_FLGSG11) RcvSoMc33993.BitData.FlgSg11 = Status; + else if(Sp0ToSg13 == DF_FLGSG10) RcvSoMc33993.BitData.FlgSg10 = Status; + else if(Sp0ToSg13 == DF_FLGSG9 ) RcvSoMc33993.BitData.FlgSg9 = Status; + else if(Sp0ToSg13 == DF_FLGSG8 ) RcvSoMc33993.BitData.FlgSg8 = Status; + else if(Sp0ToSg13 == DF_FLGSG7 ) RcvSoMc33993.BitData.FlgSg7_FlgSp7 = Status; + else if(Sp0ToSg13 == DF_FLGSG6 ) RcvSoMc33993.BitData.FlgSg6_FlgSp6 = Status; + else if(Sp0ToSg13 == DF_FLGSG5 ) RcvSoMc33993.BitData.FlgSg5_FlgSp5 = Status; + else if(Sp0ToSg13 == DF_FLGSG4 ) RcvSoMc33993.BitData.FlgSg4_FlgSp4 = Status; + else if(Sp0ToSg13 == DF_FLGSG3 ) RcvSoMc33993.BitData.FlgSg3_FlgSp3 = Status; + else if(Sp0ToSg13 == DF_FLGSG2 ) RcvSoMc33993.BitData.FlgSg2_FlgSp2 = Status; + else if(Sp0ToSg13 == DF_FLGSG1 ) RcvSoMc33993.BitData.FlgSg1_FlgSp1 = Status; + else if(Sp0ToSg13 == DF_FLGSG0 ) RcvSoMc33993.BitData.FlgSg0_FlgSp0 = Status; + else ; + Mc33993CmdSend(NumMc,CmdBit,RcvSoMc33993.ByteData.StaSgH,RcvSoMc33993.ByteData.StaSgL); + //(*(PntSta+NumMc)).CmdMetallic_Sg = RcvSoMc33993.StaSg; + break; +//DF_CMDWETCURR_SG + case DF_CMDWETCURR_SG: + RcvSoMc33993.StaSg = (*(PntSta+NumMc)).CmdWetCurr_Sg; + if(Sp0ToSg13 == DF_FLGSG13) RcvSoMc33993.BitData.FlgSg13 = Status; + else if(Sp0ToSg13 == DF_FLGSG12) RcvSoMc33993.BitData.FlgSg12 = Status; + else if(Sp0ToSg13 == DF_FLGSG11) RcvSoMc33993.BitData.FlgSg11 = Status; + else if(Sp0ToSg13 == DF_FLGSG10) RcvSoMc33993.BitData.FlgSg10 = Status; + else if(Sp0ToSg13 == DF_FLGSG9 ) RcvSoMc33993.BitData.FlgSg9 = Status; + else if(Sp0ToSg13 == DF_FLGSG8 ) RcvSoMc33993.BitData.FlgSg8 = Status; + else if(Sp0ToSg13 == DF_FLGSG7 ) RcvSoMc33993.BitData.FlgSg7_FlgSp7 = Status; + else if(Sp0ToSg13 == DF_FLGSG6 ) RcvSoMc33993.BitData.FlgSg6_FlgSp6 = Status; + else if(Sp0ToSg13 == DF_FLGSG5 ) RcvSoMc33993.BitData.FlgSg5_FlgSp5 = Status; + else if(Sp0ToSg13 == DF_FLGSG4 ) RcvSoMc33993.BitData.FlgSg4_FlgSp4 = Status; + else if(Sp0ToSg13 == DF_FLGSG3 ) RcvSoMc33993.BitData.FlgSg3_FlgSp3 = Status; + else if(Sp0ToSg13 == DF_FLGSG2 ) RcvSoMc33993.BitData.FlgSg2_FlgSp2 = Status; + else if(Sp0ToSg13 == DF_FLGSG1 ) RcvSoMc33993.BitData.FlgSg1_FlgSp1 = Status; + else if(Sp0ToSg13 == DF_FLGSG0 ) RcvSoMc33993.BitData.FlgSg0_FlgSp0 = Status; + else ; + Mc33993CmdSend(NumMc,CmdBit,RcvSoMc33993.ByteData.StaSgH,RcvSoMc33993.ByteData.StaSgL); + //(*(PntSta+NumMc)).CmdWetCurr_Sg = RcvSoMc33993.StaSg; + break; +//DF_CMDTRISTATE_SG + case DF_CMDTRISTATE_SG: + RcvSoMc33993.StaSg = (*(PntSta+NumMc)).CmdTriState_Sg; + if(Sp0ToSg13 == DF_FLGSG13) RcvSoMc33993.BitData.FlgSg13 = Status; + else if(Sp0ToSg13 == DF_FLGSG12) RcvSoMc33993.BitData.FlgSg12 = Status; + else if(Sp0ToSg13 == DF_FLGSG11) RcvSoMc33993.BitData.FlgSg11 = Status; + else if(Sp0ToSg13 == DF_FLGSG10) RcvSoMc33993.BitData.FlgSg10 = Status; + else if(Sp0ToSg13 == DF_FLGSG9 ) RcvSoMc33993.BitData.FlgSg9 = Status; + else if(Sp0ToSg13 == DF_FLGSG8 ) RcvSoMc33993.BitData.FlgSg8 = Status; + else if(Sp0ToSg13 == DF_FLGSG7 ) RcvSoMc33993.BitData.FlgSg7_FlgSp7 = Status; + else if(Sp0ToSg13 == DF_FLGSG6 ) RcvSoMc33993.BitData.FlgSg6_FlgSp6 = Status; + else if(Sp0ToSg13 == DF_FLGSG5 ) RcvSoMc33993.BitData.FlgSg5_FlgSp5 = Status; + else if(Sp0ToSg13 == DF_FLGSG4 ) RcvSoMc33993.BitData.FlgSg4_FlgSp4 = Status; + else if(Sp0ToSg13 == DF_FLGSG3 ) RcvSoMc33993.BitData.FlgSg3_FlgSp3 = Status; + else if(Sp0ToSg13 == DF_FLGSG2 ) RcvSoMc33993.BitData.FlgSg2_FlgSp2 = Status; + else if(Sp0ToSg13 == DF_FLGSG1 ) RcvSoMc33993.BitData.FlgSg1_FlgSp1 = Status; + else if(Sp0ToSg13 == DF_FLGSG0 ) RcvSoMc33993.BitData.FlgSg0_FlgSp0 = Status; + else ; + Mc33993CmdSend(NumMc,CmdBit,RcvSoMc33993.ByteData.StaSgH,RcvSoMc33993.ByteData.StaSgL); + //(*(PntSta+NumMc)).CmdTriState_Sg = RcvSoMc33993.StaSg; + break; + default:; + } + return 1; +} + +//片选产生 +//多余20片需要增加 +void ChangeCsMc33993(ubyte NumMc,bit HorL) +{ + switch(NumMc) + { + case Mc33993_0 : CS_SwChip_0 = HorL;break; + case Mc33993_1 : CS_SwChip_1 = HorL;break; + default:; + } +} +//**************************************************************************** +// @Function ubyte Mc33993DataSendRcv(ubyte Data) +// +//---------------------------------------------------------------------------- +// @Description 发送数据,返回接收数据 +// 此函数与CPU平台相关,不同CPU需要修改。 +// 此函数适用于XC2765,SSC采用查询方式 +//---------------------------------------------------------------------------- +// @Returnvalue 返回接收的数据 +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2011-3-4 10:28:27 +// +//**************************************************************************** +ubyte Mc33993DataSendRcv(ubyte Data) +{ + uword i; + SSC_vSendData(Data); + for(i=0;(i<6000)&&(!(IRCON1&0x02));i++); + IRCON1 &= 0xFD; + for(i=0;(i<6000)&&(!(IRCON1&0x04));i++); + IRCON1 &= 0xFB; + return((ubyte)(SSC_vGetData())); +} + +//**************************************************************************** +// @Function union ByteBitAccess *Mc33993CmdSend(ubyte NumMc,ubyte CmdBit,ubyte SetBitH,ubyte SetBitL) +// +//---------------------------------------------------------------------------- +// @Description 发送33993的操作命令,返回开关状态 +// +//---------------------------------------------------------------------------- +// @Returnvalue 返回接收的3个字节的开关状态 +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2011-3-4 10:36:27 +// +//**************************************************************************** +union ByteBitAccess *Mc33993CmdSend(ubyte NumMc,ubyte CmdBit,ubyte SetBitH,ubyte SetBitL) +{ + union ByteBitAccess RcvSoMc33993,*Pnt; + union WordByteBitAccess RcvSoMc33993W; +// uword i; +//---------------------------------------------------------------------------- + RcvSoMc33993W.ByteData.StaSgH = SetBitH; + RcvSoMc33993W.ByteData.StaSgL = SetBitL; + switch(CmdBit)//保存命令状态 + { + case DF_CMDSETTING :(*(PntSta+NumMc)).CmdSetting = RcvSoMc33993W.StaSg;break; + case DF_CMDINT_SP :(*(PntSta+NumMc)).CmdInt_Sp = RcvSoMc33993W.StaSg;break; + case DF_CMDINT_SG :(*(PntSta+NumMc)).CmdInt_Sg = RcvSoMc33993W.StaSg;break; + case DF_CMDMETALLIC_SP:(*(PntSta+NumMc)).CmdMetallic_Sp = RcvSoMc33993W.StaSg;break; + case DF_CMDMETALLIC_SG:(*(PntSta+NumMc)).CmdMetallic_Sg = RcvSoMc33993W.StaSg;break; + case DF_CMDANALOG :(*(PntSta+NumMc)).CmdAnalog = RcvSoMc33993W.StaSg;break; + case DF_CMDWETCURR_SP :(*(PntSta+NumMc)).CmdWetCurr_Sp = RcvSoMc33993W.StaSg;break; + case DF_CMDWETCURR_SG :(*(PntSta+NumMc)).CmdWetCurr_Sg = RcvSoMc33993W.StaSg;break; + case DF_CMDTRISTATE_SP:(*(PntSta+NumMc)).CmdTriState_Sp = RcvSoMc33993W.StaSg;break; + case DF_CMDTRISTATE_SG:(*(PntSta+NumMc)).CmdTriState_Sg = RcvSoMc33993W.StaSg;break; + default:; + } + + + if(NumMc > (NumChipSw-1))NumMc = (NumChipSw-1); + ChangeCsMc33993(NumMc,0); +//---------------------------- + _nop_(); + _nop_(); + _nop_(); + _nop_(); + +//------------------------------- + + RcvSoMc33993.ByteData.SoMc33993Byte2 = Mc33993DataSendRcv(CmdBit); + + RcvSoMc33993.ByteData.SoMc33993Byte1 = Mc33993DataSendRcv(SetBitH); + + RcvSoMc33993.ByteData.SoMc33993Byte0 = Mc33993DataSendRcv(SetBitL); + + ChangeCsMc33993(NumMc,1); +//---------------------------- + _nop_(); + _nop_(); + _nop_(); + _nop_(); +//------------------------------- + Pnt = &RcvSoMc33993; + return (Pnt); +} diff --git a/SwDriver.H b/SwDriver.H new file mode 100644 index 0000000..91e78e1 --- /dev/null +++ b/SwDriver.H @@ -0,0 +1,122 @@ +#ifndef _MC33993_H_ +#define _MC33993_H_ + +//***************************************************************************** +//宏定义 +//***************************************************************************** +//多余20片需要增加 +#define Mc33993_0 0 +#define Mc33993_1 1 +#define Mc33993_2 2 +#define Mc33993_3 3 +#define Mc33993_4 4 +#define Mc33993_5 5 +#define Mc33993_6 6 +#define Mc33993_7 7 +#define Mc33993_8 8 +#define Mc33993_9 9 +#define Mc33993_10 10 +#define Mc33993_11 11 +#define Mc33993_12 12 +#define Mc33993_13 13 +#define Mc33993_14 14 +#define Mc33993_15 15 +#define Mc33993_16 16 +#define Mc33993_17 17 +#define Mc33993_18 18 +#define Mc33993_19 19 +#define Mc33993_20 20 + + +#define D24V 0 +#define Gnd 1 + +#define TriOff 0 +#define TriOn 1 + +#define WetCur2mA 0 +#define WetCur16mA 1 + +#define SwToGnd 0 +#define SwToPwr 1 + +#define ALLTRI 0xff +#define ALLD24V 0x0 + +#define DF_CMDSWSTATUS 0x00 +#define DF_CMDSETTING 0x01 +#define DF_CMDINT_SP 0x02 +#define DF_CMDINT_SG 0x03 +#define DF_CMDMETALLIC_SP 0x04 +#define DF_CMDMETALLIC_SG 0x05 +#define DF_CMDANALOG 0x06 +#define DF_CMDWETCURR_SP 0x07 +#define DF_CMDWETCURR_SG 0x08 +#define DF_CMDTRISTATE_SP 0x09 +#define DF_CMDTRISTATE_SG 0x0A +#define DF_CMDCALIBRATION 0x0B +#define DF_CMDSLEEP 0x0C +#define DF_CMDRESET 0x7F + + +#define DF_FLGTHEM 10 +#define DF_FLGINT 11 +#define DF_FLGSP7 12 +#define DF_FLGSP6 13 +#define DF_FLGSP5 14 +#define DF_FLGSP4 15 +#define DF_FLGSP3 16 +#define DF_FLGSP2 17 +#define DF_FLGSP1 18 +#define DF_FLGSP0 19 +#define DF_FLGSG13 20 +#define DF_FLGSG12 21 +#define DF_FLGSG11 22 +#define DF_FLGSG10 23 +#define DF_FLGSG9 24 +#define DF_FLGSG8 25 +#define DF_FLGSG7 26 +#define DF_FLGSG6 27 +#define DF_FLGSG5 28 +#define DF_FLGSG4 29 +#define DF_FLGSG3 30 +#define DF_FLGSG2 31 +#define DF_FLGSG1 32 +#define DF_FLGSG0 33 + +//Analog +#define DF_AN_HIMP 1 +#define DF_AN_2MA 2 +#define DF_AN_16MA 3 + +#define DF_CH_SG0 1 +#define DF_CH_SG1 2 +#define DF_CH_SG2 3 +#define DF_CH_SG3 4 +#define DF_CH_SG4 5 +#define DF_CH_SG5 6 +#define DF_CH_SG6 7 +#define DF_CH_SG7 8 +#define DF_CH_SG8 9 +#define DF_CH_SG9 10 +#define DF_CH_SG10 11 +#define DF_CH_SG11 12 +#define DF_CH_SG12 13 +#define DF_CH_SG13 14 +#define DF_CH_SP0 15 +#define DF_CH_SP1 16 +#define DF_CH_SP2 17 +#define DF_CH_SP3 18 +#define DF_CH_SP4 19 +#define DF_CH_SP5 20 +#define DF_CH_SP6 21 +#define DF_CH_SP7 22 +//***************************************************************************** +//外部引用全局函数声明 +//***************************************************************************** +void SwStaSample(UnSwSample *ptmp); +void InitSW(void); +void LedLight(UnSwOut *tmpUn); +//void Swtest2(void); +//ubyte Mc33993AnalogChSel(ubyte NumMc,ubyte Mode,ubyte Channal); +#endif \ No newline at end of file diff --git a/T2.C b/T2.C new file mode 100644 index 0000000..c9fc744 --- /dev/null +++ b/T2.C @@ -0,0 +1,175 @@ +//**************************************************************************** +// @Module Timer 2 +// @Filename T2.C +// @Project CL2.0.dav +//---------------------------------------------------------------------------- +// @Controller Infineon XC886CLM-8FF +// +// @Compiler Keil +// +// @Codegenerator 1.3 +// +// @Description: This file contains functions that use the T2 module. +// +//---------------------------------------------------------------------------- +// @Date 2025/1/18 20:45:31 +// +//**************************************************************************** + +// USER CODE BEGIN (T2_General,1) + +// USER CODE END + + + +//**************************************************************************** +// @Project Includes +//**************************************************************************** + +#include "MAIN.H" + +// USER CODE BEGIN (T2_General,2) + +// USER CODE END + + +//**************************************************************************** +// @Macros +//**************************************************************************** + +// USER CODE BEGIN (T2_General,3) + +// USER CODE END + + +//**************************************************************************** +// @Defines +//**************************************************************************** + +// USER CODE BEGIN (T2_General,4) + +// USER CODE END + + +//**************************************************************************** +// @Typedefs +//**************************************************************************** + +// USER CODE BEGIN (T2_General,5) + +// USER CODE END + + +//**************************************************************************** +// @Imported Global Variables +//**************************************************************************** + +// USER CODE BEGIN (T2_General,6) + +// USER CODE END + + +//**************************************************************************** +// @Global Variables +//**************************************************************************** + +// USER CODE BEGIN (T2_General,7) + +// USER CODE END + + +//**************************************************************************** +// @External Prototypes +//**************************************************************************** + +// USER CODE BEGIN (T2_General,8) + +// USER CODE END + + +//**************************************************************************** +// @Prototypes Of Local Functions +//**************************************************************************** + +// USER CODE BEGIN (T2_General,9) + +// USER CODE END + + +//**************************************************************************** +// @Function void T2_vInit(void) +// +//---------------------------------------------------------------------------- +// @Description This is the initialization function of the Timer 2 function +// library. It is assumed that the SFRs used by this library +// are in their reset state. +// +// The following SFRs and SFR fields will be initialized: +// T2_RC2H/RC2L - reload/capture timer 2 register +// T2_T2H/T2L - timer 2 register +// ET2 - timer 2 interrupt enable +// T2_T2MOD - timer 2 mode register +// CP/RL2 - Capture/Reload select +// EXEN2 - External enable control +// TR2 - Timer2 run control +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2025/1/18 +// +//**************************************************************************** + +// USER CODE BEGIN (T2_Init,1) + +// USER CODE END + +void T2_vInit(void) +{ + // USER CODE BEGIN (T2_Init,2) + + // USER CODE END + + // ----------------------------------------------------------------------- + // Operating Mode + // ----------------------------------------------------------------------- + + /// 16-bit timer function with automatic reload when timer 2 overflows + /// the timer 2 resolution is 1 ?s + /// the timer 2 overflow is 1000.000 ?s + /// timer 2 interrupt: enabled + /// timer 2 will be started + + // ----------------------------------------------------------------------- + // Register Initialization + // ----------------------------------------------------------------------- + + T2_T2L = 0x30; // load timer 2 register, low byte + + T2_T2H = 0xF8; // load timer 2 register, high byte + + T2_RC2L = 0x30; // load timer 2 reload/capture register, + // low byte + T2_RC2H = 0xF8; // load timer 2 reload/capture register, + // high byte + T2_T2MOD = 0x00; // load timer 2 mode register + + /// timer 2 Interrupt enable bit is set in SHINT_vInit() function + + // USER CODE BEGIN (T2_Init,3) + + // USER CODE END + + TR2 = 1; // start timer + +} // End of function T2_vInit + + +// USER CODE BEGIN (T2_General,10) + +// USER CODE END + diff --git a/T2.H b/T2.H new file mode 100644 index 0000000..a55512d --- /dev/null +++ b/T2.H @@ -0,0 +1,104 @@ +//**************************************************************************** +// @Module Timer 2 +// @Filename T2.H +// @Project CL2.0.dav +//---------------------------------------------------------------------------- +// @Controller Infineon XC886CLM-8FF +// +// @Compiler Keil +// +// @Codegenerator 1.3 +// +// @Description: This file contains all function prototypes and macros for +// the T2 module. +// +//---------------------------------------------------------------------------- +// @Date 2025/1/18 20:45:31 +// +//**************************************************************************** + +// USER CODE BEGIN (T2_Header,1) + +// USER CODE END + + + +#ifndef _T2_H_ +#define _T2_H_ + +//**************************************************************************** +// @Project Includes +//**************************************************************************** + +// USER CODE BEGIN (T2_Header,2) + +// USER CODE END + + +//**************************************************************************** +// @Macros +//**************************************************************************** + +// USER CODE BEGIN (T2_Header,3) + +// USER CODE END + + +//**************************************************************************** +// @Defines +//**************************************************************************** + +// USER CODE BEGIN (T2_Header,4) + +// USER CODE END + +//**************************************************************************** +// @Typedefs +//**************************************************************************** + +// USER CODE BEGIN (T2_Header,5) + +// USER CODE END + + +//**************************************************************************** +// @Imported Global Variables +//**************************************************************************** + +// USER CODE BEGIN (T2_Header,6) + +// USER CODE END + + +//**************************************************************************** +// @Global Variables +//**************************************************************************** + +// USER CODE BEGIN (T2_Header,7) + +// USER CODE END + + +//**************************************************************************** +// @Prototypes Of Global Functions +//**************************************************************************** + +void T2_vInit(void); + +// USER CODE BEGIN (T2_Header,8) + +// USER CODE END + + +//**************************************************************************** +// @Interrupt Vectors +//**************************************************************************** + + +// Shared interrupt vector definitions are defined in SHARED_INT.H + +// USER CODE BEGIN (T2_Header,9) + +// USER CODE END + +#endif // ifndef _T2_H_ diff --git a/UART.C b/UART.C new file mode 100644 index 0000000..9d28748 --- /dev/null +++ b/UART.C @@ -0,0 +1,350 @@ +//**************************************************************************** +// @Module UART (Serial Interface) +// @Filename UART.C +// @Project CL2.0.dav +//---------------------------------------------------------------------------- +// @Controller Infineon XC886CLM-8FF +// +// @Compiler Keil +// +// @Codegenerator 1.3 +// +// @Description: This file contains functions that use the UART module. +// +//---------------------------------------------------------------------------- +// @Date 2024/12/12 19:56:03 +// +//**************************************************************************** + +// USER CODE BEGIN (UART_General,1) + +// USER CODE END + + + +//**************************************************************************** +// @Project Includes +//**************************************************************************** + +#include "MAIN.H" + +// USER CODE BEGIN (UART_General,2) + +// USER CODE END + + +//**************************************************************************** +// @Macros +//**************************************************************************** + +// USER CODE BEGIN (UART_General,3) + +// USER CODE END + + +//**************************************************************************** +// @Defines +//**************************************************************************** + +// USER CODE BEGIN (UART_General,4) + +// USER CODE END + + +//**************************************************************************** +// @Typedefs +//**************************************************************************** + +// USER CODE BEGIN (UART_General,5) + +// USER CODE END + + +//**************************************************************************** +// @Imported Global Variables +//**************************************************************************** + +// USER CODE BEGIN (UART_General,6) + +// USER CODE END + + +//**************************************************************************** +// @Global Variables +//**************************************************************************** + +// USER CODE BEGIN (UART_General,7) + +// USER CODE END + + +//**************************************************************************** +// @External Prototypes +//**************************************************************************** + +// USER CODE BEGIN (UART_General,8) + +// USER CODE END + + +//**************************************************************************** +// @Prototypes Of Local Functions +//**************************************************************************** + +// USER CODE BEGIN (UART_General,9) + +// USER CODE END + + +//**************************************************************************** +// @Function void UART_vInit(void) +// +//---------------------------------------------------------------------------- +// @Description This is the initialization function of the UART function +// library. It is assumed that the SFRs used by this library +// are in their reset state. +// +// The following SFR fields will be initialized: +// - register SCON +// - bits SMOD and ES +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2024/12/12 +// +//**************************************************************************** + +// USER CODE BEGIN (UART_Init,1) + +// USER CODE END + +void UART_vInit(void) +{ + // USER CODE BEGIN (UART_Init,2) + + // USER CODE END + + /// ----------------------------------------------------------------------- + /// UART settings + /// ----------------------------------------------------------------------- + /// Pin TXD_1 (P0.2) is selected for transmission + /// Pin RXD_1 (P0.1) is selected for reception + /// Receiver enabled + /// Mode 1: 8-bit data, 1 start bit, 1 stop bit, variable baud rate + /// BRG is selected for baudrate generation + + SFR_PAGE(_pp2, noSST); // switch to page 2 without saving + P0_ALTSEL0 &= ~(ubyte)0x04; // configure alternate function register 0 + P0_ALTSEL1 |= (ubyte)0x04; // configure alternate function register 1 + SFR_PAGE(_pp0, noSST); // switch to page 0 without saving + P0_DIR |= (ubyte)0x04; // set output direction + + + MODPISEL |= (ubyte)0x01; // configure peripheral input select register + BCON = 0x00; // reset baudrate timer/reload register + SCON = 0x50; // load serial channel control register + + /// ----------------------------------------------------------------------- + /// Baudrate generator settings + /// ----------------------------------------------------------------------- + /// input clock = fPCLK + /// Fractional divider is disabled + /// baudrate = 100.0000 kbaud + + BG = 0x0E; // load baudrate timer/reload register + BCON |= 0x01; // load baud rate control register + + + // USER CODE BEGIN (UART_Init,3) + + // USER CODE END + + /// UART interrupt enabled + ES = 1; + +} // End of function UART_vInit + + +//**************************************************************************** +// @Function void UART_viIsr(void) +// +//---------------------------------------------------------------------------- +// @Description This is the service routine for the UART interrupt. It is +// called after each transmission (flag TI set) or reception +// (flag RI set) of a data unit. +// Please note that you have to add application specific code +// to this function. +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2024/12/12 +// +//**************************************************************************** + +// You have two choices for interrupt type select in Project Settings Page +// under Global Settings Section. +// If you select CHOICE 1 then ISR will be generated with push and pop. +// If you select CHOICE 2 then ISR will be generated without push and pop. +// Default choice is CHOICE 2. +// Current selection is CHOICE 2 + +// USER CODE BEGIN (UART_Isr,1) +uint16_t char_data[25] = {0}; +// USER CODE END + +void UART_viIsr(void) interrupt UARTINT +{ + + // USER CODE BEGIN (UART_Isr,2) +// static uint8_t i = 0; + static uint8_t cnt_sbus = 0; + static uint8_t state = 0; + static uint8_t receive = 0; + static uint8_t sbus_buff[25]; + SBusData *tmp_sbus_data; + // USER CODE END + SFR_PAGE(_su0, SST0); // switch to page 0 + if (TI) + { + // USER CODE BEGIN (UART_Isr,3) + + TI = 0; + + // USER CODE END + } + if (RI) + { + // USER CODE BEGIN (UART_Isr,4) + RI = 0; + + char_data[0] = (ubyte)SBUF; +// UART_vSendData8(char_data[0]); + + switch(state) + { + case 0: + if(0x0f == char_data[0]) + { + receive = 0; + cnt_sbus = 0; + sbus_buff[cnt_sbus] = char_data[0]; + cnt_sbus++; + state = 1; + } + else + { + state = 0; + } + break; + case 1: + if(cnt_sbus >= 24) + { + if(0x0 == char_data[0]) + { + cnt_sbus = 0; + receive = 0; + sbus_buff[cnt_sbus] = char_data[0]; + state = 0; + tmp_sbus_data = parseSBusData(sbus_buff); + } + } + else if( (0x0f == char_data[0]) && (10 != cnt_sbus) )//当为第10个字节为0x0F是正常的,所以不用清0 + { + receive = 0; + cnt_sbus = 0; + sbus_buff[cnt_sbus] = char_data[0]; + cnt_sbus++; + state = 1; + } + else + { + sbus_buff[cnt_sbus] = char_data[0]; + cnt_sbus ++; + state = 1; + } + break; + default:break; + } + + // USER CODE END + } + + // USER CODE BEGIN (UART_Isr,5) + + // USER CODE END + SFR_PAGE(_su0, RST0); // restore the old page +} // End of function UART_viIsr + + +//**************************************************************************** +// @Function ubyte UART_ubGetData8(void) +// +//---------------------------------------------------------------------------- +// @Description This function returns the last received 8-bit data unit. +// Interrupt flag RI will be cleared. +// +//---------------------------------------------------------------------------- +// @Returnvalue received data unit +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2024/12/12 +// +//**************************************************************************** + +//ubyte UART_ubGetData8(void) +//{ +// // Clear the receiver interrupt flag +// RI = 0; + +// // Return the received data byte +// return(SBUF); + +//} // End of function UART_ubGetData8 + + +//**************************************************************************** +// @Function void UART_vSendData8(ubyte ubData) +// +//---------------------------------------------------------------------------- +// @Description This function transmits an 8-bit data unit. At first +// interrupt flag TI is cleared, then buffer SBUF is written. +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters ubData: +// data to be transmitted +// +//---------------------------------------------------------------------------- +// @Date 2024/12/12 +// +//**************************************************************************** + +//void UART_vSendData8(ubyte ubData) +//{ +// // Clear the transmitter interrupt flag +// TI = 0; + +// // Write the transmit data byte, this initiates the transmission. +// SBUF = ubData; +//} // End of function UART_vSendData8 + + +// USER CODE BEGIN (UART_General,10) + +// USER CODE END + diff --git a/UART.H b/UART.H new file mode 100644 index 0000000..22efa1c --- /dev/null +++ b/UART.H @@ -0,0 +1,127 @@ +//**************************************************************************** +// @Module UART (Serial Interface) +// @Filename UART.H +// @Project CL2.0.dav +//---------------------------------------------------------------------------- +// @Controller Infineon XC886CLM-8FF +// +// @Compiler Keil +// +// @Codegenerator 1.3 +// +// @Description: This file contains all function prototypes and macros for +// the UART module. +// +//---------------------------------------------------------------------------- +// @Date 2024/12/12 19:56:03 +// +//**************************************************************************** + +// USER CODE BEGIN (UART_Header,1) + +// USER CODE END + + + +#ifndef _UART_H_ +#define _UART_H_ + +//**************************************************************************** +// @Project Includes +//**************************************************************************** + +// USER CODE BEGIN (UART_Header,2) + +// USER CODE END + + +//**************************************************************************** +// @Macros +//**************************************************************************** + +// USER CODE BEGIN (UART_Header,3) + +// USER CODE END + + +//**************************************************************************** +// @Defines +//**************************************************************************** + +// USER CODE BEGIN (UART_Header,4) + +// USER CODE END + + +//**************************************************************************** +// @Typedefs +//**************************************************************************** + +// USER CODE BEGIN (UART_Header,5) + +// USER CODE END + + +//**************************************************************************** +// @Imported Global Variables +//**************************************************************************** + +// USER CODE BEGIN (UART_Header,6) + +// USER CODE END + + +//**************************************************************************** +// @Global Variables +//**************************************************************************** + +// USER CODE BEGIN (UART_Header,7) + +// USER CODE END + + +//**************************************************************************** +// @Prototypes Of Global Functions +//**************************************************************************** + +void UART_vInit(void); +ubyte UART_ubGetData8(void); +void UART_vSendData8(ubyte ubData); + +// USER CODE BEGIN (UART_Header,8) + +// USER CODE END + + +//**************************************************************************** +// @Macro UART_vRxEnable() +// +//---------------------------------------------------------------------------- +// @Description This macro releases the receive function of the UART by +// setting bit REN. +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2024/12/12 +// +//**************************************************************************** + +#define UART_vRxEnable() REN = 1 + + +//**************************************************************************** +// @Interrupt Vectors +//**************************************************************************** + +#define UARTINT 4 + +// USER CODE BEGIN (UART_Header,9) + +// USER CODE END + +#endif // ifndef _UART_H_ diff --git a/UART1.C b/UART1.C new file mode 100644 index 0000000..416fc49 --- /dev/null +++ b/UART1.C @@ -0,0 +1,261 @@ +//**************************************************************************** +// @Module UART1 (Serial Interface) +// @Filename UART1.C +// @Project CL2.0.dav +//---------------------------------------------------------------------------- +// @Controller Infineon XC886CLM-8FF +// +// @Compiler Keil +// +// @Codegenerator 1.3 +// +// @Description: This file contains functions that use the UART1 module. +// +//---------------------------------------------------------------------------- +// @Date 2024/10/31 19:17:02 +// +//**************************************************************************** + +// USER CODE BEGIN (UART1_General,1) + +// USER CODE END + + + +//**************************************************************************** +// @Project Includes +//**************************************************************************** + +#include "MAIN.H" + +// USER CODE BEGIN (UART1_General,2) + +// USER CODE END + + +//**************************************************************************** +// @Macros +//**************************************************************************** + +// USER CODE BEGIN (UART1_General,3) + +// USER CODE END + + +//**************************************************************************** +// @Defines +//**************************************************************************** + +// USER CODE BEGIN (UART1_General,4) + +// USER CODE END + + +//**************************************************************************** +// @Typedefs +//**************************************************************************** + +// USER CODE BEGIN (UART1_General,5) + +// USER CODE END + + +//**************************************************************************** +// @Imported Global Variables +//**************************************************************************** + +// USER CODE BEGIN (UART1_General,6) + +// USER CODE END + + +//**************************************************************************** +// @Global Variables +//**************************************************************************** + +// USER CODE BEGIN (UART1_General,7) + +// USER CODE END + + +//**************************************************************************** +// @External Prototypes +//**************************************************************************** + +// USER CODE BEGIN (UART1_General,8) + +// USER CODE END + + +//**************************************************************************** +// @Prototypes Of Local Functions +//**************************************************************************** + +// USER CODE BEGIN (UART1_General,9) + +// USER CODE END + + +//**************************************************************************** +// @Function void UART1_vInit(void) +// +//---------------------------------------------------------------------------- +// @Description This is the initialization function of the UART1 function +// library. It is assumed that the SFRs used by this library +// are in their reset state. +// +// The following SFR fields will be initialized: +// - register SCON +// - bits SMOD and EX2 +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2024/10/31 +// +//**************************************************************************** + +// USER CODE BEGIN (UART1_Init,1) + +// USER CODE END + +void UART1_vInit(void) +{ + // USER CODE BEGIN (UART1_Init,2) + + // USER CODE END + + /// ----------------------------------------------------------------------- + /// UART1 settings + /// ----------------------------------------------------------------------- + /// Pin TXD1_1 (P3.1) is selected for transmission + /// Pin RXD1_1 (P3.2) is selected for reception + /// Receiver enabled + /// UART1 interrupt is enabled + /// Ignore Normal divider overflow interrupt + /// Mode 1: 8-bit data, 1 start bit, 1 stop bit, variable baud rate + /// Receiver interrupt flag RI_1 will only be activated if a valid stop + /// bit was received + /// BRG is selected for baudrate generation + + SFR_PAGE(_pp2, noSST); // switch to page 2 without saving + P3_ALTSEL0 |= (ubyte)0x02; // configure alternate function register 0 + P3_ALTSEL1 |= (ubyte)0x02; // configure alternate function register 1 + SFR_PAGE(_pp0, noSST); // switch to page 0 without saving + P3_DIR |= (ubyte)0x02; // set output direction + + + SFR_PAGE(_su3, noSST); // switch to page 3 without saving + MODPISEL1 |= (ubyte)0x08; // configure peripheral input select register + SFR_PAGE(_su0, noSST); // switch to page 0 without saving + + SET_RMAP(); + + UART1_BCON = 0x00; // reset baudrate timer/reload register + UART1_SCON = 0x50; // load serial channel control register + + /// ----------------------------------------------------------------------- + /// Baudrate generator settings + /// ----------------------------------------------------------------------- + /// input clock = fPCLK + /// Fractional divider is disabled + /// baudrate = 9.6154 kbaud + + UART1_BG = 0x9B; // load baudrate timer/reload register + UART1_BCON |= 0x01; // load baud rate control register + + + RESET_RMAP(); + + + // USER CODE BEGIN (UART1_Init,3) + + // USER CODE END + +} // End of function UART1_vInit + + +//**************************************************************************** +// @Function ubyte UART1_ubGetData8(void) +// +//---------------------------------------------------------------------------- +// @Description This function returns the last received 8-bit data unit. +// Interrupt flag RI_1 will be cleared. +// +//---------------------------------------------------------------------------- +// @Returnvalue received data unit +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2024/10/31 +// +//**************************************************************************** + +ubyte UART1_ubGetData8(void) +{ + + ubyte ubData; + + _push_(SYSCON0); // push the current RMAP + SET_RMAP(); + + // Clear the receiver interrupt flag + UART1_SCON &= ~(ubyte)0x01; + + + // Read the received data bits 0..7 + ubData = (ubyte)UART1_SBUF; + + + _pop_(SYSCON0); // restore the old RMAP + + // Return the received data byte + return(ubData); + +} // End of function UART1_ubGetData8 +//**************************************************************************** +// @Function void UART1_vSendData8(ubyte ubData) +// +//---------------------------------------------------------------------------- +// @Description This function transmits an 8-bit data unit. At first +// interrupt flag TI_1 is cleared, then buffer SBUF is written. +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters ubData: +// data to be transmitted +// +//---------------------------------------------------------------------------- +// @Date 2024/10/31 +// +//**************************************************************************** + +void UART1_vSendData8(ubyte ubData) +{ + + _push_(SYSCON0); // push the current RMAP + SET_RMAP(); + + // Clear the transmitter interrupt flag + UART1_SCON &= ~(ubyte)0x02; + + // Write the transmit data byte, this initiates the transmission. + UART1_SBUF = ubData; + + _pop_(SYSCON0); // restore the old RMAP + +} // End of function UART1_vSendData8 + + +// USER CODE BEGIN (UART1_General,10) + +// USER CODE END + diff --git a/UART1.H b/UART1.H new file mode 100644 index 0000000..7fa5c4f --- /dev/null +++ b/UART1.H @@ -0,0 +1,153 @@ +//**************************************************************************** +// @Module UART1 (Serial Interface) +// @Filename UART1.H +// @Project CL2.0.dav +//---------------------------------------------------------------------------- +// @Controller Infineon XC886CLM-8FF +// +// @Compiler Keil +// +// @Codegenerator 1.3 +// +// @Description: This file contains all function prototypes and macros for +// the UART1 module. +// +//---------------------------------------------------------------------------- +// @Date 2024/10/31 19:17:02 +// +//**************************************************************************** + +// USER CODE BEGIN (UART1_Header,1) + +// USER CODE END + + + +#ifndef _UART1_H_ +#define _UART1_H_ + +//**************************************************************************** +// @Project Includes +//**************************************************************************** + +// USER CODE BEGIN (UART1_Header,2) + +// USER CODE END + + +//**************************************************************************** +// @Macros +//**************************************************************************** + +// USER CODE BEGIN (UART1_Header,3) + +// USER CODE END + + +//**************************************************************************** +// @Defines +//**************************************************************************** + +// USER CODE BEGIN (UART1_Header,4) + +// USER CODE END + + +//**************************************************************************** +// @Typedefs +//**************************************************************************** + +// USER CODE BEGIN (UART1_Header,5) + +// USER CODE END + + +//**************************************************************************** +// @Imported Global Variables +//**************************************************************************** + +// USER CODE BEGIN (UART1_Header,6) + +// USER CODE END + + +//**************************************************************************** +// @Global Variables +//**************************************************************************** + +// USER CODE BEGIN (UART1_Header,7) + +// USER CODE END + + +//**************************************************************************** +// @Prototypes Of Global Functions +//**************************************************************************** + +void UART1_vInit(void); +ubyte UART1_ubGetData8(void); +void UART1_vSendData8(ubyte ubData); + +// USER CODE BEGIN (UART1_Header,8) + +// USER CODE END + + +//**************************************************************************** +// @Macro UART1_vRxEnable() +// +//---------------------------------------------------------------------------- +// @Description This macro releases the receive function of the UART1 by +// setting bit REN_1. +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2024/10/31 +// +//**************************************************************************** + +// RMAP should be set before calling this macro. + +#define UART1_vRxEnable() REN_1 = 1 + + +//**************************************************************************** +// @Macro UART1_vRxDisable() +// +//---------------------------------------------------------------------------- +// @Description This macro disables the receive function of the UART1 by +// clearing bit REN_1. +// Note: Any data that is currently being received is received +// to completion, including the setting of interrupt flag RI_1. +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2024/10/31 +// +//**************************************************************************** + +// RMAP should be set before calling this macro. + +#define UART1_vRxDisable() REN_1 = 0 + + +//**************************************************************************** +// @Interrupt Vectors +//**************************************************************************** + + +// USER CODE BEGIN (UART1_Header,9) + +// USER CODE END + +#endif // ifndef _UART1_H_ diff --git a/User.c b/User.c new file mode 100644 index 0000000..befaf01 --- /dev/null +++ b/User.c @@ -0,0 +1,465 @@ +#include "MAIN.H" +#include "temperature.H" +#include + + +//RAM重启保存标志 +ubyte RestartDataFlg1 _at_ 0xF5E7; +ubyte RestartDataFlg2 _at_ 0xF600; +//KGF保存数据 +uword RestartDataKGF _at_ 0xF5E5; + +//can信息 +UnInfCan UnInfCan_1 _at_ 0xF5E8; +UnSwOut UnSwOut_1 = {0}; + +//CAN发送周期 +uword CntCan_1 = 0; +bit FlgCan_1 = 0; +//第一次采集到有效数据指示 +bit FlgOneTime = 0; + +uword RgCanPerid = 1000; + +//UnTimeOutput sleeptime = {0}; +//UnTimeOutput waketime = {0}; +//UnTimeOutput currenttime = {0}; +//UnTimeOutput un_time_output1 = {0};//接收设定时间 +//UnInfCanKGFOutput un_inf_can_kgf_output2 = {0};//kgf输出 +//UnTimeOutput waketimelast = {0}; +//UnTimeOutput wake_time_10min = {0}; +//SystemState sleepstate = STATE_INIT; +//PWM 20181227 +ubyte PwmH[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; + +ubyte powerstate = 0;//电源状态 + +ubyte vcu_can_cnt = 0; // 帧累加器 +ubyte vcu_can_last = 0; // 帧累加器过去值 +bool flg_wake_ecu = 0; //控制器唤醒标志 +//----------------------------------------------------------------------- +//RTC定时器 +//----------------------------------------------------------------------- +void RTCProcess(void) +{ +//************************************************************************ +//////CAN发送周期 + if(FlgCan_1){CntCan_1++;if(CntCan_1 >= RgCanPerid){FlgCan_1=0; CntCan_1=0;}}else{CntCan_1=0;} + +//************************************************************************ +} + + +//can错误处理 +void CanErrorProcess(void) +{ + ubyte ubNSRL; + ubyte ubNSRH; + ubyte ubResetLEC = 0x3F; +//------------------------------------------- + EA = 0; + + CAN_pushAMRegs(); // push the CAN Access Mediator Registers + SFR_PAGE(_su0, SST0); // switch to page 0 + + CAN_vWriteCANAddress(CAN_NSR0); + CAN_vReadEN(); + ubNSRL = CAN_DATA0; + ubNSRH = CAN_DATA1; + if (ubNSRL & 0x20) // if ALERT + { + CAN_vInit(); + } + if (ubNSRL & 0x07) // if LEC + { + ubResetLEC = 0x38; + } + //// Reset LEC, TXOK, RXOK, ALERT, EWRN, BOFF, LLE, LOE (if set) + CAN_vWriteCANAddress(CAN_NSR0); // Addressing CAN_NSR0 + CAN_DATA0 = ~(ubNSRL & ubResetLEC); // load CAN_NSR0 status register[7-0] + CAN_DATA1 = ~(ubNSRH); // load CAN_NSR0 status register[15-8] + CAN_vWriteEN(D0_VALID+D1_VALID); // Data0 and Data1 are Valid for + + SFR_PAGE(_su0, RST0); // restore the old SCU page + CAN_popAMRegs(); // restore the CAN Access Mediator Registers + + EA = 1; +} + +//输出PWM 20181227 +/* +ubyte *pStt, 状态机变量 +bit Cmd, 状态机输入,1,根据PwmH的值来决定输出,0,输出0 +bit Out, 状态机输出 +ubyte *pCnt, 定时计数器 +ubyte *pPwmH 状态机参数,PWM的高电平时间 +*/ +bit funcPwmOut(ubyte *pStt,bit Cmd,ubyte *pCnt,ubyte *pPwmH) +{ +ubyte PwmL = 0; +bit Out = 0; +//------------------------------------------------------------------------------------------------ + if((*pPwmH) > dfPwmH)(*pPwmH) = dfPwmH; //限制最大值 + PwmL = dfPwmH - (*pPwmH);//计算PWM低电平 + + if((1 == Cmd) ) + { + if(0 == (*pPwmH)) //高电平为0,表示PWM无效,由Cmd来控制,Cmd为1输出1,Cmd为0,输出0 + { + Out = 1; + (*pStt) = 0; + } + else + { + switch((*pStt)) + { + case 0: + (*pCnt) = 0; + (*pStt) = 1; + Out = 1; + break; + case 1: + if((*pCnt) >= (*pPwmH)) + { + (*pCnt) = 0; + (*pStt) = 2; + Out = 0; + } + else + { + (*pCnt)++; + (*pStt) = 1; + Out = 1; + } + break; + case 2: + if((*pCnt) >= PwmL) + { + (*pCnt) = 0; + (*pStt) = 1; + Out = 1; + } + else + { + (*pCnt)++; + (*pStt) = 2; + Out = 0; + } + break; + //----------------------------------------------------- + default:; + }//switch + }//else + }//if + else + { + Out = 0; + (*pStt) = 0; + } + return Out; +} + +//根据接收的CAN缓冲区数据驱动相应LED指示灯。 +void LedDr(void) +{ +static ubyte RgSTT[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; +static ubyte CntTime[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; + ubyte i = 0; +//------------------------------------------------------------------------------------------------ + +// dfOut_01 = funcPwmOut(&RgSTT[0 ],dfCmd_01,&CntTime[0 ],&PwmH[0 ]); +// dfOut_02 = funcPwmOut(&RgSTT[1 ],dfCmd_02,&CntTime[1 ],&PwmH[1 ]); +// dfOut_03 = funcPwmOut(&RgSTT[2 ],dfCmd_03,&CntTime[2 ],&PwmH[2 ]); +// dfOut_04 = funcPwmOut(&RgSTT[3 ],dfCmd_04,&CntTime[3 ],&PwmH[3 ]); +// dfOut_05 = funcPwmOut(&RgSTT[4 ],dfCmd_05,&CntTime[4 ],&PwmH[4 ]); +// dfOut_06 = funcPwmOut(&RgSTT[5 ],dfCmd_06,&CntTime[5 ],&PwmH[5 ]); +// dfOut_07 = funcPwmOut(&RgSTT[6 ],dfCmd_07,&CntTime[6 ],&PwmH[6 ]); +// dfOut_08 = funcPwmOut(&RgSTT[7 ],dfCmd_08,&CntTime[7 ],&PwmH[7 ]); +// dfOut_09 = funcPwmOut(&RgSTT[8 ],dfCmd_09,&CntTime[8 ],&PwmH[8 ]); +// dfOut_10 = funcPwmOut(&RgSTT[9 ],dfCmd_10,&CntTime[9 ],&PwmH[9 ]); +// dfOut_11 = funcPwmOut(&RgSTT[10],dfCmd_11,&CntTime[10],&PwmH[10]); +// dfOut_12 = funcPwmOut(&RgSTT[11],dfCmd_12,&CntTime[11],&PwmH[11]); +// dfOut_13 = funcPwmOut(&RgSTT[12],dfCmd_13,&CntTime[12],&PwmH[12]); +// dfOut_14 = funcPwmOut(&RgSTT[13],dfCmd_14,&CntTime[13],&PwmH[13]); +// dfOut_15 = funcPwmOut(&RgSTT[14],dfCmd_15,&CntTime[14],&PwmH[14]); +// dfOut_16 = funcPwmOut(&RgSTT[15],dfCmd_16,&CntTime[15],&PwmH[15]); + + i = dfOut_02; //20210906保存IO口状态 解决KGF重启指示灯闪烁问题 + RestartDataKGF = dfOut_01; + RestartDataKGF = RestartDataKGF + (i<<1); + i = dfOut_03; + RestartDataKGF = RestartDataKGF + (i<<2); + i = dfOut_04; + RestartDataKGF = RestartDataKGF + (i<<3); + i = dfOut_05; + RestartDataKGF = RestartDataKGF + (i<<4); + i = dfOut_06; + RestartDataKGF = RestartDataKGF + (i<<5); + i = dfOut_07; + RestartDataKGF = RestartDataKGF + (i<<6); + i = dfOut_08; + RestartDataKGF = RestartDataKGF + (i<<7); + i = dfOut_09; + RestartDataKGF = RestartDataKGF + (i<<8); + i = dfOut_10; + RestartDataKGF = RestartDataKGF + (i<<9); + i = dfOut_11; + RestartDataKGF = RestartDataKGF + (i<<10); + i = dfOut_12; + RestartDataKGF = RestartDataKGF + (i<<11); + i = dfOut_13; + RestartDataKGF = RestartDataKGF + (i<<12); + i = dfOut_14; + RestartDataKGF = RestartDataKGF + (i<<13); + i = dfOut_15; + RestartDataKGF = RestartDataKGF + (i<<14); + i = dfOut_16; + RestartDataKGF = RestartDataKGF + (i<<15); +} +void CanTransmit(void) +{ +// ulong i; +//----------------- -------- + CAN_waitTransmit(DF_SwTx);//发送前等待上一帧发送完毕,这样不会丢帧 +// Password(); + + CAN_vLoadData(DF_SwTx, (ulong *)(&UnInfCan_1.ArrData.Arr[0][0])); // 装载数据 + CAN_vTransmit(DF_SwTx); +} + + +void canSendTo(ubyte index,ubyte *buf) +{ + ubyte CanTransmitbuf[8] = {0,0,0,0,0,0,0,0}; +//----------------- -------- + CanTransmitbuf[2] = buf[0]; + CanTransmitbuf[3] = buf[1]; + CanTransmitbuf[0] = buf[2]; + CanTransmitbuf[1] = buf[3]; + CanTransmitbuf[6] = buf[4]; + CanTransmitbuf[7] = buf[5]; + CanTransmitbuf[4] = buf[6]; + CanTransmitbuf[5] = buf[7]; + + CAN_waitTransmit(index);//发送前等待上一帧发送完毕,这样不会丢帧 + CAN_vLoadData(index, (ulong *)CanTransmitbuf);// 装载数据 + CAN_vTransmit(index); +} + +//CAN发送一帧 +void CanTX(void) +{ +//----------------------------------- + if(1 == SwOut09)UnInfCan_1.ArrData.Arr[0][3] |= 0x01;else UnInfCan_1.ArrData.Arr[0][3] &= (~0x01); //KGF1 //20200303修改为与接收到的数据一致,反馈与接收到时数据为一致 + if(1 == SwOut10)UnInfCan_1.ArrData.Arr[0][3] |= 0x02;else UnInfCan_1.ArrData.Arr[0][3] &= (~0x02); //KGF2 + if(1 == SwOut04)UnInfCan_1.ArrData.Arr[0][3] |= 0x04;else UnInfCan_1.ArrData.Arr[0][3] &= (~0x04); //KGF3 + if(1 == SwOut03)UnInfCan_1.ArrData.Arr[0][3] |= 0x08;else UnInfCan_1.ArrData.Arr[0][3] &= (~0x08); //KGF4 + if(1 == SwOut06)UnInfCan_1.ArrData.Arr[0][3] |= 0x10;else UnInfCan_1.ArrData.Arr[0][3] &= (~0x10); //KGF5 + if(1 == SwOut05)UnInfCan_1.ArrData.Arr[0][3] |= 0x20;else UnInfCan_1.ArrData.Arr[0][3] &= (~0x20); //KGF6 + if(1 == SwOut15)UnInfCan_1.ArrData.Arr[0][3] |= 0x40;else UnInfCan_1.ArrData.Arr[0][3] &= (~0x40); //KGF7 + if(1 == SwOut16)UnInfCan_1.ArrData.Arr[0][3] |= 0x80;else UnInfCan_1.ArrData.Arr[0][3] &= (~0x80); //KGF8 + if(1 == SwOut13)UnInfCan_1.ArrData.Arr[0][2] |= 0x01;else UnInfCan_1.ArrData.Arr[0][2] &= (~0x01); //KGF9 + if(1 == SwOut14)UnInfCan_1.ArrData.Arr[0][2] |= 0x02;else UnInfCan_1.ArrData.Arr[0][2] &= (~0x02); //KGF10 + if(1 == SwOut08)UnInfCan_1.ArrData.Arr[0][2] |= 0x04;else UnInfCan_1.ArrData.Arr[0][2] &= (~0x04); //KGF11 + if(1 == SwOut07)UnInfCan_1.ArrData.Arr[0][2] |= 0x08;else UnInfCan_1.ArrData.Arr[0][2] &= (~0x08); //KGF12 + if(1 == SwOut02)UnInfCan_1.ArrData.Arr[0][2] |= 0x10;else UnInfCan_1.ArrData.Arr[0][2] &= (~0x10); //KGF13 + if(1 == SwOut01)UnInfCan_1.ArrData.Arr[0][2] |= 0x20;else UnInfCan_1.ArrData.Arr[0][2] &= (~0x20); //KGF14 + if(1 == SwOut11)UnInfCan_1.ArrData.Arr[0][2] |= 0x40;else UnInfCan_1.ArrData.Arr[0][2] &= (~0x40); //KGF15 + if(1 == SwOut12)UnInfCan_1.ArrData.Arr[0][2] |= 0x80;else UnInfCan_1.ArrData.Arr[0][2] &= (~0x80); //KGF16 + + if(1 == SwIn01 )UnInfCan_1.ArrData.Arr[0][1] &= (~0x01);else UnInfCan_1.ArrData.Arr[0][1] |= 0x01; //Dia01 20200225修改为0数据变为1,1数据变为0,这样大CPU方便处理 + if(1 == SwIn02 )UnInfCan_1.ArrData.Arr[0][1] &= (~0x02);else UnInfCan_1.ArrData.Arr[0][1] |= 0x02; //Dia02 + if(1 == SwIn03 )UnInfCan_1.ArrData.Arr[0][1] &= (~0x04);else UnInfCan_1.ArrData.Arr[0][1] |= 0x04; //Dia03 + if(1 == SwIn04 )UnInfCan_1.ArrData.Arr[0][1] &= (~0x08);else UnInfCan_1.ArrData.Arr[0][1] |= 0x08; //Dia04 + if(1 == SwIn05 )UnInfCan_1.ArrData.Arr[0][1] &= (~0x10);else UnInfCan_1.ArrData.Arr[0][1] |= 0x10; //Dia05 + if(1 == SwIn06 )UnInfCan_1.ArrData.Arr[0][1] &= (~0x20);else UnInfCan_1.ArrData.Arr[0][1] |= 0x20; //Dia06 + if(1 == SwIn07 )UnInfCan_1.ArrData.Arr[0][1] &= (~0x40);else UnInfCan_1.ArrData.Arr[0][1] |= 0x40; //Dia07 + if(1 == SwIn08 )UnInfCan_1.ArrData.Arr[0][1] &= (~0x80);else UnInfCan_1.ArrData.Arr[0][1] |= 0x80; //Dia08 + + UnInfCan_1.ArrData.Arr[0][0] = 0; + UnInfCan_1.ArrData.Arr[0][7] = 0; + UnInfCan_1.ArrData.Arr[0][6] = RomNum; + UnInfCan_1.ArrData.Arr[0][5] = (ubyte)(UnSwSample_1.bit_data.temperature[0]); + UnInfCan_1.ArrData.Arr[0][4] = (ubyte)(UnSwSample_1.bit_data.temperature[0]>>8); + + CanTransmit(); +} + +//------------------------------------------------------------------ +// 三状态温度控制状态机 +// 参数说明: +// current_state - 当前状态指针(需保持生命周期) +// current_temp - 当前温度值(建议通过中断更新[6](@ref)) +//------------------------------------------------------------------ +void tempStateMachine(SystemState *current_state, float current_temp) +{ + switch (*current_state) + { + // 初始检测状态(网页5初始化逻辑强化) + case STATE_INIT_CHECK: + if(current_temp < INIT_THRESHOLD) + { + *current_state = STATE_INIT_HEATING; + HERTER_CMD(1); + PC_CMD(0); + } + else + { + // 非低温环境直接进入冷却状态 + *current_state = STATE_COOLING; + HERTER_CMD(0); + PC_CMD(1); + } + break; + + case STATE_INIT_HEATING://20250330初始加热状态,只有当温度大于设定才会,此状态未加热到设定温度会关闭计算机,后面的状态不会。 + if(current_temp > (HEATING_STOP + TEMP_HYSTERESIS)) + { + *current_state = STATE_COOLING; + HERTER_CMD(0); + PC_CMD(1); + } + else + { + // 非低温环境直接进入冷却状态 + *current_state = STATE_INIT_HEATING; + HERTER_CMD(1); + PC_CMD(0); + } + break; + + + // 加热状态(网页3加热阶段优化) + case STATE_HEATING: + if(current_temp > (HEATING_STOP + TEMP_HYSTERESIS)) + { + *current_state = STATE_COOLING; + HERTER_CMD(0); + PC_CMD(1); + } + else + { + HERTER_CMD(1); + PC_CMD(1); + } + break; + + // 冷却状态(网页6状态切换改进) + case STATE_COOLING: + if(current_temp < (COOLING_RESTART - TEMP_HYSTERESIS)) + { + *current_state = STATE_HEATING; + HERTER_CMD(1); + PC_CMD(1); + } + else + { + HERTER_CMD(0); + PC_CMD(1); + } + break; + + default: + // 异常处理(网页1安全规范) + *current_state = STATE_INIT_CHECK; + break; + } +} + +//CAN发送接收 +void CanRXTX(void) +{ + stCAN_SWObj StrCanRx = {0}; + uword tmp = 0; + ubyte i = 0,j = 0; + static SystemState temp_state = STATE_INIT_CHECK; + float current_temp = 0.0f; +//------------------------------------ + if(CAN_ubNewData(DF_SwRx)) + { + CAN_vGetMsgObj(DF_SwRx, &StrCanRx); + + UnInfCan_1.ArrData.ArrRX[0][3] = StrCanRx.ulDATAL.ubDB[0]; + UnInfCan_1.ArrData.ArrRX[0][2] = StrCanRx.ulDATAL.ubDB[1]; + UnInfCan_1.ArrData.ArrRX[0][1] = StrCanRx.ulDATAL.ubDB[2]; + UnInfCan_1.ArrData.ArrRX[0][0] = StrCanRx.ulDATAL.ubDB[3]; + UnInfCan_1.ArrData.ArrRX[0][7] = StrCanRx.ulDATAH.ubDB[0]; + UnInfCan_1.ArrData.ArrRX[0][6] = StrCanRx.ulDATAH.ubDB[1]; + UnInfCan_1.ArrData.ArrRX[0][5] = StrCanRx.ulDATAH.ubDB[2]; + UnInfCan_1.ArrData.ArrRX[0][4] = StrCanRx.ulDATAH.ubDB[3]; + + CAN_vReleaseObj(DF_SwRx); + + //CAN发送周期 50-5000ms + tmp = (uword)UnInfCan_1.ArrData.ArrRX[0][6]; + tmp = (tmp << 8); + tmp |= ((uword)UnInfCan_1.ArrData.ArrRX[0][7]); + if(tmp >= 50)RgCanPerid = tmp; + if(tmp >= 5000)RgCanPerid = 5000; + +// UnInfCan_1.ArrData.Arr[0][3] = UnInfCan_1.ArrData.ArrRX[0][0]; +// UnInfCan_1.ArrData.Arr[0][2] = UnInfCan_1.ArrData.ArrRX[0][1]; +// UnInfCan_1.ArrData.Arr[0][1] = UnInfCan_1.ArrData.ArrRX[0][2]; 20200225注释不更新诊断数据 +// UnInfCan_1.ArrData.Arr[0][0] = UnInfCan_1.ArrData.ArrRX[0][3]; +// UnInfCan_1.ArrData.Arr[0][7] = UnInfCan_1.ArrData.ArrRX[0][4]; +// UnInfCan_1.ArrData.Arr[0][6] = UnInfCan_1.ArrData.ArrRX[0][5]; +// UnInfCan_1.ArrData.Arr[0][5] = (ubyte)(RgCanPerid>>8); +// UnInfCan_1.ArrData.Arr[0][4] = (ubyte)(RgCanPerid); +// CanTransmit(); 20200730不发送干扰数据运行 + } + + if(CAN_ubNewData(DF_SwRxPwm)) + { + CAN_vGetMsgObj(DF_SwRxPwm, &StrCanRx); + + UnInfCan_1.ArrData.ArrRX[1][2] = StrCanRx.ulDATAL.ubDB[0]; + UnInfCan_1.ArrData.ArrRX[1][3] = StrCanRx.ulDATAL.ubDB[1]; + UnInfCan_1.ArrData.ArrRX[1][0] = StrCanRx.ulDATAL.ubDB[2]; + UnInfCan_1.ArrData.ArrRX[1][1] = StrCanRx.ulDATAL.ubDB[3]; + UnInfCan_1.ArrData.ArrRX[1][6] = StrCanRx.ulDATAH.ubDB[0]; + UnInfCan_1.ArrData.ArrRX[1][7] = StrCanRx.ulDATAH.ubDB[1]; + UnInfCan_1.ArrData.ArrRX[1][4] = StrCanRx.ulDATAH.ubDB[2]; + UnInfCan_1.ArrData.ArrRX[1][5] = StrCanRx.ulDATAH.ubDB[3]; + + CAN_vReleaseObj(DF_SwRxPwm); + //接收的数据保存到PWM数据结构中20181227 + PwmH[0 ] = (ubyte)UnInfCan_1.BitData.Pwm_01; + PwmH[1 ] = (ubyte)UnInfCan_1.BitData.Pwm_02; + PwmH[2 ] = (ubyte)UnInfCan_1.BitData.Pwm_03; + PwmH[3 ] = (ubyte)UnInfCan_1.BitData.Pwm_04; + PwmH[4 ] = (ubyte)UnInfCan_1.BitData.Pwm_05; + PwmH[5 ] = (ubyte)UnInfCan_1.BitData.Pwm_06; + PwmH[6 ] = (ubyte)UnInfCan_1.BitData.Pwm_07; + PwmH[7 ] = (ubyte)UnInfCan_1.BitData.Pwm_08; + PwmH[8 ] = (ubyte)UnInfCan_1.BitData.Pwm_09; + PwmH[9 ] = (ubyte)UnInfCan_1.BitData.Pwm_10; + PwmH[10] = (ubyte)UnInfCan_1.BitData.Pwm_11; + PwmH[11] = (ubyte)UnInfCan_1.BitData.Pwm_12; + PwmH[12] = (ubyte)UnInfCan_1.BitData.Pwm_13; + PwmH[13] = (ubyte)UnInfCan_1.BitData.Pwm_14; + PwmH[14] = (ubyte)UnInfCan_1.BitData.Pwm_15; + PwmH[15] = (ubyte)UnInfCan_1.BitData.Pwm_16; + + } + + //接收一帧,调用一次点灯程序。 + LedDr(); + + + +//100ms发送一帧 + if(!FlgCan_1) + { + FlgCan_1 = 1; + GetTemp();//1s采集一次温度 + current_temp = (float)((int)UnSwSample_1.bit_data.temperature[0]); + current_temp = current_temp/10.0f;// + tempStateMachine(&temp_state, current_temp); + CanTX(); + } +} + + + + + diff --git a/User.c.bak b/User.c.bak new file mode 100644 index 0000000..22b39dd --- /dev/null +++ b/User.c.bak @@ -0,0 +1,330 @@ +#include "MAIN.H" +//can信息 +UnInfCan UnInfCan_1 = {0}; +UnSwSample UnSwSample_1 = {0}; +UnSwOut UnSwOut_1 = {0}; + +//CAN发送周期 +uword CntCan_1 = 0; +bit FlgCan_1 = 0; +//第一次采集到有效数据指示 +bit FlgOneTime = 0; + +uword RgCanPerid = 1000; + +//PWM 20181227 +ubyte PwmH[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; +//----------------------------------------------------------------------- +//RTC定时器 +//----------------------------------------------------------------------- +void RTCProcess(void) +{ +//************************************************************************ +//////CAN发送周期 + if(FlgCan_1){CntCan_1++;if(CntCan_1 >= RgCanPerid){FlgCan_1=0; CntCan_1=0;}}else{CntCan_1=0;} + +//************************************************************************ +} + +//输出PWM 20181227 +/* +ubyte *pStt, 状态机变量 +bit Cmd, 状态机输入,1,根据PwmH的值来决定输出,0,输出0 +bit Out, 状态机输出 +ubyte *pCnt, 定时计数器 +ubyte *pPwmH 状态机参数,PWM的高电平时间 +*/ +bit funcPwmOut(ubyte *pStt,bit Cmd,ubyte *pCnt,ubyte *pPwmH) +{ +ubyte PwmL = 0; +bit Out = 0; +//------------------------------------------------------------------------------------------------ + if((*pPwmH) > dfPwmH)(*pPwmH) = dfPwmH; //限制最大值 + PwmL = dfPwmH - (*pPwmH);//计算PWM低电平 + + if((1 == Cmd) ) + { + if(0 == (*pPwmH)) //高电平为0,表示PWM无效,由Cmd来控制,Cmd为1输出1,Cmd为0,输出0 + { + Out = 1; + (*pStt) = 0; + } + else + { + switch((*pStt)) + { + case 0: + (*pCnt) = 0; + (*pStt) = 1; + Out = 1; + break; + case 1: + if((*pCnt) >= (*pPwmH)) + { + (*pCnt) = 0; + (*pStt) = 2; + Out = 0; + } + else + { + (*pCnt)++; + (*pStt) = 1; + Out = 1; + } + break; + case 2: + if((*pCnt) >= PwmL) + { + (*pCnt) = 0; + (*pStt) = 1; + Out = 1; + } + else + { + (*pCnt)++; + (*pStt) = 2; + Out = 0; + } + break; + //----------------------------------------------------- + default:; + }//switch + }//else + }//if + else + { + Out = 0; + (*pStt) = 0; + } + return Out; +} + + +//根据接收的CAN缓冲区数据驱动相应LED指示灯。 +void LedDr(void) +{ +static ubyte RgSTT[16] = {0}; +static ubyte CntTime[16] = {0}; +//------------------------------------------------------------------------------------------------ + + dfOut_01 = funcPwmOut(&RgSTT[0 ],dfCmd_01,&CntTime[0 ],&PwmH[0 ]); + dfOut_02 = funcPwmOut(&RgSTT[1 ],dfCmd_02,&CntTime[1 ],&PwmH[1 ]); + dfOut_03 = funcPwmOut(&RgSTT[2 ],dfCmd_03,&CntTime[2 ],&PwmH[2 ]); + dfOut_04 = funcPwmOut(&RgSTT[3 ],dfCmd_04,&CntTime[3 ],&PwmH[3 ]); + dfOut_05 = funcPwmOut(&RgSTT[4 ],dfCmd_05,&CntTime[4 ],&PwmH[4 ]); + dfOut_06 = funcPwmOut(&RgSTT[5 ],dfCmd_06,&CntTime[5 ],&PwmH[5 ]); + dfOut_07 = funcPwmOut(&RgSTT[6 ],dfCmd_07,&CntTime[6 ],&PwmH[6 ]); + dfOut_08 = funcPwmOut(&RgSTT[7 ],dfCmd_08,&CntTime[7 ],&PwmH[7 ]); + dfOut_09 = funcPwmOut(&RgSTT[8 ],dfCmd_09,&CntTime[8 ],&PwmH[8 ]); + dfOut_10 = funcPwmOut(&RgSTT[9 ],dfCmd_10,&CntTime[9 ],&PwmH[9 ]); + dfOut_11 = funcPwmOut(&RgSTT[10],dfCmd_11,&CntTime[10],&PwmH[10]); + dfOut_12 = funcPwmOut(&RgSTT[11],dfCmd_12,&CntTime[11],&PwmH[11]); + dfOut_13 = funcPwmOut(&RgSTT[12],dfCmd_13,&CntTime[12],&PwmH[12]); + dfOut_14 = funcPwmOut(&RgSTT[13],dfCmd_14,&CntTime[13],&PwmH[13]); + dfOut_15 = funcPwmOut(&RgSTT[14],dfCmd_15,&CntTime[14],&PwmH[14]); + dfOut_16 = funcPwmOut(&RgSTT[15],dfCmd_16,&CntTime[15],&PwmH[15]); + +} + + +//can错误处理 +void CanErrorProcess(void) +{ + ubyte ubNSRL; + ubyte ubNSRH; + ubyte ubResetLEC = 0x3F; +//------------------------------------------- + EA = 0; + + CAN_pushAMRegs(); // push the CAN Access Mediator Registers + SFR_PAGE(_su0, SST0); // switch to page 0 + + CAN_vWriteCANAddress(CAN_NSR0); + CAN_vReadEN(); + ubNSRL = CAN_DATA0; + ubNSRH = CAN_DATA1; + if (ubNSRL & 0x20) // if ALERT + { + CAN_vInit(); + } + if (ubNSRL & 0x07) // if LEC + { + ubResetLEC = 0x38; + } + //// Reset LEC, TXOK, RXOK, ALERT, EWRN, BOFF, LLE, LOE (if set) + CAN_vWriteCANAddress(CAN_NSR0); // Addressing CAN_NSR0 + CAN_DATA0 = ~(ubNSRL & ubResetLEC); // load CAN_NSR0 status register[7-0] + CAN_DATA1 = ~(ubNSRH); // load CAN_NSR0 status register[15-8] + CAN_vWriteEN(D0_VALID+D1_VALID); // Data0 and Data1 are Valid for + + SFR_PAGE(_su0, RST0); // restore the old SCU page + CAN_popAMRegs(); // restore the CAN Access Mediator Registers + + EA = 1; +} + + +////效验算法 +//void Password(void) +//{ +// ubyte i; +////--------------------------------- +// for(i=0;i<5;i++) +// { +// UnInfCan_1.ArrData.Arr[0][4] ^= UnInfCan_1.ArrData.Arr[0][3];//CAN 第0个字节 +// UnInfCan_1.ArrData.Arr[0][4] ^= UnInfCan_1.ArrData.Arr[0][2];//CAN 第1个字节 +// UnInfCan_1.ArrData.Arr[0][4] ^= UnInfCan_1.ArrData.Arr[0][1];//CAN 第2个字节 +// UnInfCan_1.ArrData.Arr[0][4] ^= UnInfCan_1.ArrData.Arr[0][0];//CAN 第3个字节 +// UnInfCan_1.ArrData.Arr[0][4] ^= UnInfCan_1.ArrData.Arr[0][7];//CAN 第4个字节 +// UnInfCan_1.ArrData.Arr[0][4] ^= UnInfCan_1.ArrData.Arr[0][6];//CAN 第5个字节 +// UnInfCan_1.ArrData.Arr[0][4] ^= UnInfCan_1.ArrData.Arr[0][5];//CAN 第6个字节 +// } +//} + + +void CanTransmit(void) +{ +// ulong i; +//----------------- -------- + CAN_waitTransmit(DF_SwTx);//发送前等待上一帧发送完毕,这样不会丢帧 +// Password(); + + CAN_vLoadData(DF_SwTx, (ulong *)(&UnInfCan_1.ArrData.Arr[0][0])); // 装载数据 + CAN_vTransmit(DF_SwTx); +} + + +//CAN发送一帧 +void CanTX(void) +{ +//----------------------------------- + if(1 == SwOut09)UnInfCan_1.ArrData.Arr[0][3] |= (~0x01);else UnInfCan_1.ArrData.Arr[0][3] &= 0x01; //KGF1 //20200303修改为与接收到的数据一致,反馈与接收到时数据为一致 + if(1 == SwOut10)UnInfCan_1.ArrData.Arr[0][3] |= (~0x02);else UnInfCan_1.ArrData.Arr[0][3] &= 0x02; //KGF2 + if(1 == SwOut04)UnInfCan_1.ArrData.Arr[0][3] |= (~0x04);else UnInfCan_1.ArrData.Arr[0][3] &= 0x04; //KGF3 + if(1 == SwOut03)UnInfCan_1.ArrData.Arr[0][3] |= (~0x08);else UnInfCan_1.ArrData.Arr[0][3] &= 0x08; //KGF4 + if(1 == SwOut06)UnInfCan_1.ArrData.Arr[0][3] |= (~0x10);else UnInfCan_1.ArrData.Arr[0][3] &= 0x10; //KGF5 + if(1 == SwOut05)UnInfCan_1.ArrData.Arr[0][3] |= (~0x20);else UnInfCan_1.ArrData.Arr[0][3] &= 0x20; //KGF6 + if(1 == SwOut15)UnInfCan_1.ArrData.Arr[0][3] |= (~0x40);else UnInfCan_1.ArrData.Arr[0][3] &= 0x40; //KGF7 + if(1 == SwOut16)UnInfCan_1.ArrData.Arr[0][3] |= (~0x80);else UnInfCan_1.ArrData.Arr[0][3] &= 0x80; //KGF8 + if(1 == SwOut13)UnInfCan_1.ArrData.Arr[0][2] |= (~0x01);else UnInfCan_1.ArrData.Arr[0][2] &= 0x01; //KGF9 + if(1 == SwOut14)UnInfCan_1.ArrData.Arr[0][2] |= (~0x02);else UnInfCan_1.ArrData.Arr[0][2] &= 0x02; //KGF10 + if(1 == SwOut08)UnInfCan_1.ArrData.Arr[0][2] |= (~0x04);else UnInfCan_1.ArrData.Arr[0][2] &= 0x04; //KGF11 + if(1 == SwOut07)UnInfCan_1.ArrData.Arr[0][2] |= (~0x08);else UnInfCan_1.ArrData.Arr[0][2] &= 0x08; //KGF12 + if(1 == SwOut02)UnInfCan_1.ArrData.Arr[0][2] |= (~0x10);else UnInfCan_1.ArrData.Arr[0][2] &= 0x10; //KGF13 + if(1 == SwOut01)UnInfCan_1.ArrData.Arr[0][2] |= (~0x20);else UnInfCan_1.ArrData.Arr[0][2] &= 0x20; //KGF14 + if(1 == SwOut11)UnInfCan_1.ArrData.Arr[0][2] |= (~0x40);else UnInfCan_1.ArrData.Arr[0][2] &= 0x40; //KGF15 + if(1 == SwOut12)UnInfCan_1.ArrData.Arr[0][2] |= (~0x80);else UnInfCan_1.ArrData.Arr[0][2] &= 0x80; //KGF16 + + if(1 == SwIn01 )UnInfCan_1.ArrData.Arr[0][1] &= (~0x01);else UnInfCan_1.ArrData.Arr[0][1] |= 0x01; //Dia01 20200225修改为0数据变为1,1数据变为0,这样大CPU方便处理 + if(1 == SwIn02 )UnInfCan_1.ArrData.Arr[0][1] &= (~0x02);else UnInfCan_1.ArrData.Arr[0][1] |= 0x02; //Dia02 + if(1 == SwIn03 )UnInfCan_1.ArrData.Arr[0][1] &= (~0x04);else UnInfCan_1.ArrData.Arr[0][1] |= 0x04; //Dia03 + if(1 == SwIn04 )UnInfCan_1.ArrData.Arr[0][1] &= (~0x08);else UnInfCan_1.ArrData.Arr[0][1] |= 0x08; //Dia04 + if(1 == SwIn05 )UnInfCan_1.ArrData.Arr[0][1] &= (~0x10);else UnInfCan_1.ArrData.Arr[0][1] |= 0x10; //Dia05 + if(1 == SwIn06 )UnInfCan_1.ArrData.Arr[0][1] &= (~0x20);else UnInfCan_1.ArrData.Arr[0][1] |= 0x20; //Dia06 + if(1 == SwIn07 )UnInfCan_1.ArrData.Arr[0][1] &= (~0x40);else UnInfCan_1.ArrData.Arr[0][1] |= 0x40; //Dia07 + if(1 == SwIn08 )UnInfCan_1.ArrData.Arr[0][1] &= (~0x80);else UnInfCan_1.ArrData.Arr[0][1] |= 0x80; //Dia08 + + UnInfCan_1.ArrData.Arr[0][0] = 0; + UnInfCan_1.ArrData.Arr[0][7] = 0; + UnInfCan_1.ArrData.Arr[0][6] = 0; + UnInfCan_1.ArrData.Arr[0][5] = (ubyte)(RgCanPerid>>8); + UnInfCan_1.ArrData.Arr[0][4] = (ubyte)(RgCanPerid); + + CanTransmit(); +} + +//CAN发送接收 +void CanRXTX(void) +{ + stCAN_SWObj StrCanRx = {0}; + uword tmp = 0; + ubyte i = 0,j = 0; +//------------------------------------ + if(CAN_ubNewData(DF_SwRx)) + { + CAN_vGetMsgObj(DF_SwRx, &StrCanRx); + + UnInfCan_1.ArrData.ArrRX[0][3] = StrCanRx.ulDATAL.ubDB[0]; + UnInfCan_1.ArrData.ArrRX[0][2] = StrCanRx.ulDATAL.ubDB[1]; + UnInfCan_1.ArrData.ArrRX[0][1] = StrCanRx.ulDATAL.ubDB[2]; + UnInfCan_1.ArrData.ArrRX[0][0] = StrCanRx.ulDATAL.ubDB[3]; + UnInfCan_1.ArrData.ArrRX[0][7] = StrCanRx.ulDATAH.ubDB[0]; + UnInfCan_1.ArrData.ArrRX[0][6] = StrCanRx.ulDATAH.ubDB[1]; + UnInfCan_1.ArrData.ArrRX[0][5] = StrCanRx.ulDATAH.ubDB[2]; + UnInfCan_1.ArrData.ArrRX[0][4] = StrCanRx.ulDATAH.ubDB[3]; + + CAN_vReleaseObj(DF_SwRx); + + //CAN发送周期 50-5000ms + tmp = (uword)UnInfCan_1.ArrData.ArrRX[0][6]; + tmp = (tmp << 8); + tmp |= ((uword)UnInfCan_1.ArrData.ArrRX[0][7]); + if(tmp >= 50)RgCanPerid = tmp; + if(tmp >= 5000)RgCanPerid = 5000; + +// UnInfCan_1.ArrData.Arr[0][3] = UnInfCan_1.ArrData.ArrRX[0][0]; +// UnInfCan_1.ArrData.Arr[0][2] = UnInfCan_1.ArrData.ArrRX[0][1]; +// UnInfCan_1.ArrData.Arr[0][1] = UnInfCan_1.ArrData.ArrRX[0][2]; 20200225注释不更新诊断数据 +// UnInfCan_1.ArrData.Arr[0][0] = UnInfCan_1.ArrData.ArrRX[0][3]; +// UnInfCan_1.ArrData.Arr[0][7] = UnInfCan_1.ArrData.ArrRX[0][4]; +// UnInfCan_1.ArrData.Arr[0][6] = UnInfCan_1.ArrData.ArrRX[0][5]; +// UnInfCan_1.ArrData.Arr[0][5] = (ubyte)(RgCanPerid>>8); +// UnInfCan_1.ArrData.Arr[0][4] = (ubyte)(RgCanPerid); +// CanTransmit(); 20200730不发送干扰数据运行 + } + + if(CAN_ubNewData(DF_SwRxPwm)) + { + CAN_vGetMsgObj(DF_SwRxPwm, &StrCanRx); + + UnInfCan_1.ArrData.ArrRX[1][2] = StrCanRx.ulDATAL.ubDB[0]; + UnInfCan_1.ArrData.ArrRX[1][3] = StrCanRx.ulDATAL.ubDB[1]; + UnInfCan_1.ArrData.ArrRX[1][0] = StrCanRx.ulDATAL.ubDB[2]; + UnInfCan_1.ArrData.ArrRX[1][1] = StrCanRx.ulDATAL.ubDB[3]; + UnInfCan_1.ArrData.ArrRX[1][6] = StrCanRx.ulDATAH.ubDB[0]; + UnInfCan_1.ArrData.ArrRX[1][7] = StrCanRx.ulDATAH.ubDB[1]; + UnInfCan_1.ArrData.ArrRX[1][4] = StrCanRx.ulDATAH.ubDB[2]; + UnInfCan_1.ArrData.ArrRX[1][5] = StrCanRx.ulDATAH.ubDB[3]; + + CAN_vReleaseObj(DF_SwRxPwm); + //接收的数据保存到PWM数据结构中20181227 + PwmH[0 ] = (ubyte)UnInfCan_1.BitData.Pwm_01; + PwmH[1 ] = (ubyte)UnInfCan_1.BitData.Pwm_02; + PwmH[2 ] = (ubyte)UnInfCan_1.BitData.Pwm_03; + PwmH[3 ] = (ubyte)UnInfCan_1.BitData.Pwm_04; + PwmH[4 ] = (ubyte)UnInfCan_1.BitData.Pwm_05; + PwmH[5 ] = (ubyte)UnInfCan_1.BitData.Pwm_06; + PwmH[6 ] = (ubyte)UnInfCan_1.BitData.Pwm_07; + PwmH[7 ] = (ubyte)UnInfCan_1.BitData.Pwm_08; + PwmH[8 ] = (ubyte)UnInfCan_1.BitData.Pwm_09; + PwmH[9 ] = (ubyte)UnInfCan_1.BitData.Pwm_10; + PwmH[10] = (ubyte)UnInfCan_1.BitData.Pwm_11; + PwmH[11] = (ubyte)UnInfCan_1.BitData.Pwm_12; + PwmH[12] = (ubyte)UnInfCan_1.BitData.Pwm_13; + PwmH[13] = (ubyte)UnInfCan_1.BitData.Pwm_14; + PwmH[14] = (ubyte)UnInfCan_1.BitData.Pwm_15; + PwmH[15] = (ubyte)UnInfCan_1.BitData.Pwm_16; + + +// UnInfCan_1.ArrData.Arr[0][3] = UnInfCan_1.ArrData.ArrRX[1][0]; +// UnInfCan_1.ArrData.Arr[0][2] = UnInfCan_1.ArrData.ArrRX[1][1]; +// UnInfCan_1.ArrData.Arr[0][1] = UnInfCan_1.ArrData.ArrRX[1][2]; 20200225注释不更新诊断数据 +// UnInfCan_1.ArrData.Arr[0][0] = UnInfCan_1.ArrData.ArrRX[1][3]; +// UnInfCan_1.ArrData.Arr[0][7] = UnInfCan_1.ArrData.ArrRX[1][4]; +// UnInfCan_1.ArrData.Arr[0][6] = UnInfCan_1.ArrData.ArrRX[1][5]; +// UnInfCan_1.ArrData.Arr[0][5] = UnInfCan_1.ArrData.ArrRX[1][6]; +// UnInfCan_1.ArrData.Arr[0][4] = UnInfCan_1.ArrData.ArrRX[1][7]; +// CanTransmit(); + + } + //接收一帧,调用一次点灯程序。 + LedDr(); + +//100ms发送一帧 + if(!FlgCan_1) + { + FlgCan_1 = 1; + CanTX(); + } + +} diff --git a/WDT.C b/WDT.C new file mode 100644 index 0000000..2508eb8 --- /dev/null +++ b/WDT.C @@ -0,0 +1,206 @@ +//**************************************************************************** +// @Module Watch Dog Timer +// @Filename WDT.C +// @Project CL2.0.dav +//---------------------------------------------------------------------------- +// @Controller Infineon XC886CLM-8FF +// +// @Compiler Keil +// +// @Codegenerator 1.3 +// +// @Description: This file contains functions that use the WDT module. +// +//---------------------------------------------------------------------------- +// @Date 2025/1/18 20:45:32 +// +//**************************************************************************** + +// USER CODE BEGIN (WDT_General,1) + +// USER CODE END + + + +//**************************************************************************** +// @Project Includes +//**************************************************************************** + +#include "MAIN.H" + +// USER CODE BEGIN (WDT_General,2) + +// USER CODE END + + +//**************************************************************************** +// @Macros +//**************************************************************************** + +// USER CODE BEGIN (WDT_General,3) + +// USER CODE END + + +//**************************************************************************** +// @Defines +//**************************************************************************** + +// USER CODE BEGIN (WDT_General,4) + +// USER CODE END + + +//**************************************************************************** +// @Typedefs +//**************************************************************************** + +// USER CODE BEGIN (WDT_General,5) + +// USER CODE END + + +//**************************************************************************** +// @Imported Global Variables +//**************************************************************************** + +// USER CODE BEGIN (WDT_General,6) + +// USER CODE END + + +//**************************************************************************** +// @Global Variables +//**************************************************************************** + +// USER CODE BEGIN (WDT_General,7) + +// USER CODE END + + +//**************************************************************************** +// @External Prototypes +//**************************************************************************** + +// USER CODE BEGIN (WDT_General,8) + +// USER CODE END + + +//**************************************************************************** +// @Prototypes Of Local Functions +//**************************************************************************** + +// USER CODE BEGIN (WDT_General,9) + +// USER CODE END + + +//**************************************************************************** +// @Function void WDT_vInit(void) +// +//---------------------------------------------------------------------------- +// @Description This is the initialization function of the 'Watch Dog +// Timer' function library. It is assumed that the SFRs used +// by this library are in their reset state. +// +// The watchdog timer is used. +// The following SFR fields will be initialized: +// WDTREL - WDT reload value +// WDTIN - WDT input frequency selection +// Then the watchdog timer will be refreshed. +// Note: The user has to take care that RMAP bit in SYSCON0 is +// to be set while using the registers of Watch dog timer. +// Registers are WDTCON,WDTWINB,WDTREL,WDTH,WDTL +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2025/1/18 +// +//**************************************************************************** + +// USER CODE BEGIN (WDT_Init,1) + +// USER CODE END + +void WDT_vInit(void) +{ + // USER CODE BEGIN (WDT_Init,2) + + // USER CODE END + + /// the watchdog timer is used and it is enabled in INIT function,user has + /// to take care of WDT refresh + /// the RMAP bit of SYSCON0 is set + /// the input frequency is fSYS/128 + /// the watchdog timer reload value is 0xDB + /// the watchdog timeout period is 50 ms + + SFR_PAGE(_su1, noSST); // switch to page1 without saving + + MAIN_vUnlockProtecReg(); // open access to protected register + SFR_PAGE(_su0, noSST); // switch to page0 with out saving + + SYSCON0 |= 0x01; // set RMAP + WDTREL = 0xDB; //Watch dog timer reload register + WDTCON |= 0x04; // set WDTEN + WDTCON |= 0x03; // set WDTRS,set WDTIN + SYSCON0 &= ~(ubyte)0x01; // clear RMAP + SFR_PAGE(_su1, noSST); // switch to page1 without saving + + MAIN_vlockProtecReg(); // close access to protected register + SFR_PAGE(_su0, noSST); // switch to page0 with out saving + + // USER CODE BEGIN (WDT_Init,3) + + // USER CODE END + + + +} // End of function WDT_vInit + + +//**************************************************************************** +// @Function void WDT_vDisable(void) +// +//---------------------------------------------------------------------------- +// @Description This function disables the WDT. +// pls refer to the Note on WDT_vInit function Description +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2025/1/18 +// +//**************************************************************************** + +void WDT_vDisable(void) +{ + SFR_PAGE(_su1, noSST); // switch to page1 without saving + + MAIN_vUnlockProtecReg(); // open access to protected register + SFR_PAGE(_su0, noSST); // switch to page0 with out saving + + SET_RMAP(); + WDTCON &= ~(ubyte)0x04; // clear WDTEN + RESET_RMAP(); + SFR_PAGE(_su1, noSST); // switch to page1 without saving + + MAIN_vlockProtecReg(); // close access to protected register + SFR_PAGE(_su0, noSST); // switch to page0 with out saving +} // End of function WDT_vDisable + + +// USER CODE BEGIN (WDT_General,10) + +// USER CODE END + diff --git a/WDT.H b/WDT.H new file mode 100644 index 0000000..8baf9f5 --- /dev/null +++ b/WDT.H @@ -0,0 +1,130 @@ +//**************************************************************************** +// @Module Watch Dog Timer +// @Filename WDT.H +// @Project CL2.0.dav +//---------------------------------------------------------------------------- +// @Controller Infineon XC886CLM-8FF +// +// @Compiler Keil +// +// @Codegenerator 1.3 +// +// @Description: This file contains all function prototypes and macros for +// the WDT module. +// +//---------------------------------------------------------------------------- +// @Date 2025/1/18 20:45:32 +// +//**************************************************************************** + +// USER CODE BEGIN (WDT_Header,1) + +// USER CODE END + + + +#ifndef _WDT_H_ +#define _WDT_H_ + +//**************************************************************************** +// @Project Includes +//**************************************************************************** + +// USER CODE BEGIN (WDT_Header,2) + +// USER CODE END + + +//**************************************************************************** +// @Macros +//**************************************************************************** + +// USER CODE BEGIN (WDT_Header,3) + +// USER CODE END + + +//**************************************************************************** +// @Defines +//**************************************************************************** + +// USER CODE BEGIN (WDT_Header,4) + +// USER CODE END + + +//**************************************************************************** +// @Typedefs +//**************************************************************************** + +// USER CODE BEGIN (WDT_Header,5) + +// USER CODE END + + +//**************************************************************************** +// @Imported Global Variables +//**************************************************************************** + +// USER CODE BEGIN (WDT_Header,6) + +// USER CODE END + + +//**************************************************************************** +// @Global Variables +//**************************************************************************** + +// USER CODE BEGIN (WDT_Header,7) + +// USER CODE END + + +//**************************************************************************** +// @Prototypes Of Global Functions +//**************************************************************************** + +void WDT_vInit(void); +void WDT_vDisable(void); + +// USER CODE BEGIN (WDT_Header,8) + +// USER CODE END + + +//**************************************************************************** +// @Macro WDT_vRefresh() +// +//---------------------------------------------------------------------------- +// @Description This macro refreshes the watchdog timer to the reload +// value. The interrupts are disabled during execution of the +// instructions that set bit WDTRS. +// Note: The user has to take care that this macro is called +// before expiry of the watchdog timer. +// pls refer to the Note on WDT_vInit function Description +// +//---------------------------------------------------------------------------- +// @Returnvalue None +// +//---------------------------------------------------------------------------- +// @Parameters None +// +//---------------------------------------------------------------------------- +// @Date 2025/1/18 +// +//**************************************************************************** + +#define WDT_vRefresh() { EA = 0; SET_RMAP(); WDTCON |= 0x02; \ + RESET_RMAP(); EA = 1; } + + +//**************************************************************************** +// @Interrupt Vectors +//**************************************************************************** + + +// USER CODE BEGIN (WDT_Header,9) + +// USER CODE END + +#endif // ifndef _WDT_H_ diff --git a/XC88x_FLADDR.H b/XC88x_FLADDR.H new file mode 100644 index 0000000..8bd905e --- /dev/null +++ b/XC88x_FLADDR.H @@ -0,0 +1,876 @@ +//*************************************************************************** +//* BootROM entries for XC88x-AA and AB Step * +//* Updated : 2006-03-14 * +//* Copyright: (c) 2006 Infineon Technologies AG * +//*************************************************************************** + +#ifndef __XC88x_FLADDR_H__ +#define __XC88x_FLADDR_H__ + +// User Configuration // +#define XC88xAA 1 // Must be set to '1/0' (for AA step) +#define XC88xAB 0 // Must be set to '1/0' (set to '1' for AB step) +#define XC88xAC 0 // Must be set to '1/0' (Set to '1' for AC step) + +#define USE_BANK 3 // Register Bank used during Program / Erase + // Default = 3 +#define WORDLINE_BUFFER_ADDRESS 0x80 // Starting address of the Buffer in the IRAM + // This Buffer will be used to store data + // before it is being programmed to flash +#define USE_64BYTE_BUFFER 0 // If PFlash will be programmed, set this to '1' + // Programming PFLash will need 64Byte WordLine Buffer + // Else, default buffer size is set to 32byte. +#define USE_PFLERASE 1 // Set to '1' if PFlErase() routine is to be used. + // Set to '0' if not used, to save some code space. +#define USE_DLFERASE 1 // Set to '1' if DFlErase() routine is to be used. + // Set to '0' if not used, to save some code space. + +// End of user configuration + + +//+----------------------------------------------+ +//| ROM entries taken from manual | +//| and AppNote aboute programming the FLASH | +//| used in XC88x_FLHANDLER.ASM | +//+----------------------------------------------+ + +//==================================================================================== +#if (XC88xAA || XC88xAB || XC88xAC) // Use the FSM to program / erase flash +#define FLASH_ERASE_BROM_ENTRY 0xDFF9 // Erase Flash Bank +#define FLASH_PROGRAM_BROM_ENTRY 0xDFF6 // Program Flash Bank. +#define FLASH_ERASE_ABORT_BROM_ENTRY 0xDFF3 // Abort the on going erase process +#define FLASH_READ_STATUS_BROM_ENTRY 0xDFF0 // Read Flash Status +#endif +#if (XC88xAA) +#define FLASH_PROTECT_BROM_ENTRY 0xDB06 +#endif +#if (XC88xAB || XC88xAC) +#define FLASH_PROTECT_BROM_ENTRY 0xDFD8 +#endif +//==================================================================================== + +//+-----------------------------------------+ +//| General definitions of used sources | +//+-----------------------------------------+ +// used buffer address in IRAM for Wordline erase/program +#if (XC88xAA || XC88xAB || XC88xAC) +#define MAGIC_MEMORY 0x36 // reserve magic memory from D:0x36 .. D:0x3E +#if (USE_64BYTE_BUFFER == 1) +#define BYTES_PER_WORDLINE 64 // +#else +#define BYTES_PER_WORDLINE 32 // +#endif +#define RESERVED_BYTES 0x08 +#define PFLASH0 0 // PFlash 0 +#define PFLASH1 1 // PFlash 1 +#define PFLASH2 2 // PFlash 2 +#define DFLASH0 3 // DFlash 0 +#define DFLASH1 4 // DFlash 1 + +#endif +//+------------------------------------------------+ +//| End of general definitions of used sources | +//+------------------------------------------------+ + + + +//************************************************************************************************ +//* Definitions of Bank-, Sector- and Wordlineaddresses +//* +//************************************************************************************************ +// Sectors of PFlash0 for erasing -- transferred in PFlErase() first parameter + +// Sector.07/Sector.06/Sector.05/Sector.04/Sector.03/Sector.02/ Sector.01/ Sector.00 / +// ---------/---------/---------/---------/---------/Pfl0Sec02/ Pfl0Sec01/ Pfl0Sec00 / +// ---------/---------/---------/---------/---------/-256B-4WL/-256B--4WL/-7.5k-120WL/ +// ---------/---------/---------/---------/---------/-0x1F00--/--0x1E00--/--0x0000----/ +#define PFL0_SEC0 0x0001 +#define PFL0_SEC1 0x0002 +#define PFL0_SEC2 0x0004 + +// Sectors of PFlash1 for erasing -- transferred in PFlErase() Second parameter + +// Sector.07/Sector.06/Sector.05/Sector.04/Sector.03/Sector.02/ Sector.01/ Sector.00 / +// ---------/---------/---------/---------/---------/Pfl1Sec02/ Pfl1Sec01/ Pfl1Sec00 / +// ---------/---------/---------/---------/---------/-256B-4WL/-256B--4WL/-7.5k-120WL/ +// ---------/---------/---------/---------/---------/-0x3F00--/--0x3E00--/--0x2000----/ +#define PFL1_SEC0 0x0001 +#define PFL1_SEC1 0x0002 +#define PFL1_SEC2 0x0004 + +// Sectors of PFlash2 for erasing -- transferred in PFlErase() Third parameter + +// Sector.07/Sector.06/Sector.05/Sector.04/Sector.03/Sector.02/ Sector.01/ Sector.00 / +// ---------/---------/---------/---------/---------/Pfl2Sec02/ Pfl2Sec01/ Pfl2Sec00 / +// ---------/---------/---------/---------/---------/-256B-4WL/-256B--4WL/-7.5k-120WL/ +// ---------/---------/---------/---------/---------/-0x5F00--/--0x5E00--/--0x4000----/ +#define PFL2_SEC0 0x0001 +#define PFL2_SEC1 0x0002 +#define PFL2_SEC2 0x0004 + +// Sectors of DFlash 0 for erasing -- transfered in DFlErase() First parameter +// DFlash 0 address is also mirrorred to 0x7xxx + +// Sector.15/Sector.14/Sector.13/Sector.12/Sector.11/Sector.10/Sector.09/Sector.08/ +// ---------/---------/---------/---------/---------/---------/Dfl0Sec09/Dfl0Sec08/ +// ---------/---------/---------/---------/---------/---------/-128-4WL-/-128-4WL-/ +// ---------/---------/---------/---------/---------/---------/--0xAF80-/--0xAF00-/ + +// Sector.07/Sector.06/Sector.05/Sector.04/Sector.03/Sector.02/Sector.01/Sector.00/ +// Dfl0Sec07/Dfl0Sec06/Dfl0Sec05/Dfl0Sec04/Dfl0Sec03/Dfl0Sec02/Dfl0Sec01/Dfl0Sec00/ +// -128-4WL-/-128-4WL-/-256-8WL-/-256-8WL-/-512-16WL/-512-16WL/-1k--32WL/-1k--32WL/ +// --0xAE80-/--0xAE00-/--0xAD00-/--0xAC00-/-0xAA00--/-0xA800--/--0xA400-/--0xA000-/ + +#define DFL0_SEC0 0x0001 +#define DFL0_SEC1 0x0002 +#define DFL0_SEC2 0x0004 +#define DFL0_SEC3 0x0008 +#define DFL0_SEC4 0x0010 +#define DFL0_SEC5 0x0020 +#define DFL0_SEC6 0x0040 +#define DFL0_SEC7 0x0080 +#define DFL0_SEC8 0x0100 +#define DFL0_SEC9 0x0200 +#define DFL0_SECALL 0x3FF + +// Sectors of DFlash 1 for erasing -- transfered in DFlErase() Second parameter +// DFlash 1 address is also mirrorred to 0x6xxx + +// Sector.15/Sector.14/Sector.13/Sector.12/Sector.11/Sector.10/Sector.09/Sector.08/ +// ---------/---------/---------/---------/---------/---------/Dfl1Sec09/Dfl1Sec08/ +// ---------/---------/---------/---------/---------/---------/-128-4WL-/-128-4WL-/ +// ---------/---------/---------/---------/---------/---------/--0xAF80-/--0xAF00-/ + +// Sector.07/Sector.06/Sector.05/Sector.04/Sector.03/Sector.02/Sector.01/Sector.00/ +// Dfl1Sec07/Dfl1Sec06/Dfl1Sec05/Dfl1Sec04/Dfl1Sec03/Dfl1Sec02/Dfl1Sec01/Dfl1Sec00/ +// -128-4WL-/-128-4WL-/-256-8WL-/-256-8WL-/-512-16WL/-512-16WL/-1k--32WL/-1k--32WL/ +// --0xAE80-/--0xAE00-/--0xAD00-/--0xAC00-/-0xAA00--/-0xA800--/--0xA400-/--0xA000-/ + +#define DFL1_SEC0 0x0001 +#define DFL1_SEC1 0x0002 +#define DFL1_SEC2 0x0004 +#define DFL1_SEC3 0x0008 +#define DFL1_SEC4 0x0010 +#define DFL1_SEC5 0x0020 +#define DFL1_SEC6 0x0040 +#define DFL1_SEC7 0x0080 +#define DFL1_SEC8 0x0100 +#define DFL1_SEC9 0x0200 +#define DFL1_SECALL 0x3FF + +//################################################################################### +// WordLine startaddresses for Sectors in PFlas 0, each WL with 64bytes + +// Sector 0 -- 7.5 kbytes -- 120 Wordlines +#define PFL0_SEC0_WL00 0x0000 +#define PFL0_SEC0_WL01 0x0040 +#define PFL0_SEC0_WL02 0x0080 +#define PFL0_SEC0_WL03 0x00C0 +#define PFL0_SEC0_WL04 0x0100 +#define PFL0_SEC0_WL05 0x0140 +#define PFL0_SEC0_WL06 0x0180 +#define PFL0_SEC0_WL07 0x01C0 +#define PFL0_SEC0_WL08 0x0200 +#define PFL0_SEC0_WL09 0x0240 +#define PFL0_SEC0_WL10 0x0280 +#define PFL0_SEC0_WL11 0x02C0 +#define PFL0_SEC0_WL12 0x0300 +#define PFL0_SEC0_WL13 0x0340 +#define PFL0_SEC0_WL14 0x0380 +#define PFL0_SEC0_WL15 0x03C0 +#define PFL0_SEC0_WL16 0x0400 +#define PFL0_SEC0_WL17 0x0440 +#define PFL0_SEC0_WL18 0x0480 +#define PFL0_SEC0_WL19 0x04C0 +#define PFL0_SEC0_WL20 0x0500 +#define PFL0_SEC0_WL21 0x0540 +#define PFL0_SEC0_WL22 0x0580 +#define PFL0_SEC0_WL23 0x05C0 +#define PFL0_SEC0_WL24 0x0600 +#define PFL0_SEC0_WL25 0x0640 +#define PFL0_SEC0_WL26 0x0680 +#define PFL0_SEC0_WL27 0x06C0 +#define PFL0_SEC0_WL28 0x0700 +#define PFL0_SEC0_WL29 0x0740 +#define PFL0_SEC0_WL30 0x0780 +#define PFL0_SEC0_WL31 0x07C0 +#define PFL0_SEC0_WL32 0x0800 +#define PFL0_SEC0_WL33 0x0840 +#define PFL0_SEC0_WL34 0x0880 +#define PFL0_SEC0_WL35 0x08C0 +#define PFL0_SEC0_WL36 0x0900 +#define PFL0_SEC0_WL37 0x0940 +#define PFL0_SEC0_WL38 0x0980 +#define PFL0_SEC0_WL39 0x09C0 +#define PFL0_SEC0_WL40 0x0A00 +#define PFL0_SEC0_WL41 0x0A40 +#define PFL0_SEC0_WL42 0x0A80 +#define PFL0_SEC0_WL43 0x0AC0 +#define PFL0_SEC0_WL44 0x0B00 +#define PFL0_SEC0_WL45 0x0B40 +#define PFL0_SEC0_WL46 0x0B80 +#define PFL0_SEC0_WL47 0x0BC0 +#define PFL0_SEC0_WL48 0x0C00 +#define PFL0_SEC0_WL49 0x0C40 +#define PFL0_SEC0_WL50 0x0C80 +#define PFL0_SEC0_WL51 0x0CC0 +#define PFL0_SEC0_WL52 0x0D00 +#define PFL0_SEC0_WL53 0x0D40 +#define PFL0_SEC0_WL54 0x0D80 +#define PFL0_SEC0_WL55 0x0DC0 +#define PFL0_SEC0_WL56 0x0E00 +#define PFL0_SEC0_WL57 0x0E40 +#define PFL0_SEC0_WL58 0x0E80 +#define PFL0_SEC0_WL59 0x0EC0 +#define PFL0_SEC0_WL60 0x0F00 +#define PFL0_SEC0_WL61 0x0F40 +#define PFL0_SEC0_WL62 0x0F80 +#define PFL0_SEC0_WL63 0x0FC0 +#define PFL0_SEC0_WL64 0x1000 +#define PFL0_SEC0_WL65 0x1040 +#define PFL0_SEC0_WL66 0x1080 +#define PFL0_SEC0_WL67 0x10C0 +#define PFL0_SEC0_WL68 0x1100 +#define PFL0_SEC0_WL69 0x1140 +#define PFL0_SEC0_WL70 0x1180 +#define PFL0_SEC0_WL71 0x11C0 +#define PFL0_SEC0_WL72 0x1200 +#define PFL0_SEC0_WL73 0x1240 +#define PFL0_SEC0_WL74 0x1280 +#define PFL0_SEC0_WL75 0x12C0 +#define PFL0_SEC0_WL76 0x1300 +#define PFL0_SEC0_WL77 0x1340 +#define PFL0_SEC0_WL78 0x1380 +#define PFL0_SEC0_WL79 0x13C0 +#define PFL0_SEC0_WL80 0x1400 +#define PFL0_SEC0_WL81 0x1440 +#define PFL0_SEC0_WL82 0x1480 +#define PFL0_SEC0_WL83 0x14C0 +#define PFL0_SEC0_WL84 0x1500 +#define PFL0_SEC0_WL85 0x1540 +#define PFL0_SEC0_WL86 0x1580 +#define PFL0_SEC0_WL87 0x15C0 +#define PFL0_SEC0_WL88 0x1600 +#define PFL0_SEC0_WL89 0x1640 +#define PFL0_SEC0_WL90 0x1680 +#define PFL0_SEC0_WL91 0x16C0 +#define PFL0_SEC0_WL92 0x1700 +#define PFL0_SEC0_WL93 0x1740 +#define PFL0_SEC0_WL94 0x1780 +#define PFL0_SEC0_WL95 0x17C0 +#define PFL0_SEC0_WL96 0x1800 +#define PFL0_SEC0_WL97 0x1840 +#define PFL0_SEC0_WL98 0x1880 +#define PFL0_SEC0_WL99 0x18C0 +#define PFL0_SEC0_WL100 0x1900 +#define PFL0_SEC0_WL101 0x1940 +#define PFL0_SEC0_WL102 0x1980 +#define PFL0_SEC0_WL103 0x19C0 +#define PFL0_SEC0_WL104 0x1A00 +#define PFL0_SEC0_WL105 0x1A40 +#define PFL0_SEC0_WL106 0x1A80 +#define PFL0_SEC0_WL107 0x1AC0 +#define PFL0_SEC0_WL108 0x1B00 +#define PFL0_SEC0_WL109 0x1B40 +#define PFL0_SEC0_WL110 0x1B80 +#define PFL0_SEC0_WL111 0x1BC0 +#define PFL0_SEC0_WL112 0x1C00 +#define PFL0_SEC0_WL113 0x1C40 +#define PFL0_SEC0_WL114 0x1C80 +#define PFL0_SEC0_WL115 0x1CC0 +#define PFL0_SEC0_WL116 0x1D00 +#define PFL0_SEC0_WL117 0x1D40 +#define PFL0_SEC0_WL118 0x1D80 +#define PFL0_SEC0_WL119 0x1DC0 + +// Sector 1 -- 256 bytes -- 4 Wordlines +#define PFL0_SEC1_WL120 0x1E00 +#define PFL0_SEC1_WL121 0x1E40 +#define PFL0_SEC1_WL122 0x1E80 +#define PFL0_SEC1_WL123 0x1EC0 + +// Sector 2 -- 256 bytes -- 4 Wordlines +#define PFL0_SEC2_WL124 0x1F00 +#define PFL0_SEC2_WL125 0x1F40 +#define PFL0_SEC2_WL126 0x1F80 +#define PFL0_SEC2_WL127 0x1FC0 + +//################################################################################### +// WordLine startaddresses for Sectors in PFlash 1, each _WL with 64bytes + +// Sector 0 -- 7.5 kbytes -- 120 Wordlines +#define PFL1_SEC0_WL00 0x2000 +#define PFL1_SEC0_WL01 0x2040 +#define PFL1_SEC0_WL02 0x2080 +#define PFL1_SEC0_WL03 0x20C0 +#define PFL1_SEC0_WL04 0x2100 +#define PFL1_SEC0_WL05 0x2140 +#define PFL1_SEC0_WL06 0x2180 +#define PFL1_SEC0_WL07 0x21C0 +#define PFL1_SEC0_WL08 0x2200 +#define PFL1_SEC0_WL09 0x2240 +#define PFL1_SEC0_WL10 0x2280 +#define PFL1_SEC0_WL11 0x22C0 +#define PFL1_SEC0_WL12 0x2300 +#define PFL1_SEC0_WL13 0x2340 +#define PFL1_SEC0_WL14 0x2380 +#define PFL1_SEC0_WL15 0x23C0 +#define PFL1_SEC0_WL16 0x2400 +#define PFL1_SEC0_WL17 0x2440 +#define PFL1_SEC0_WL18 0x2480 +#define PFL1_SEC0_WL19 0x24C0 +#define PFL1_SEC0_WL20 0x2500 +#define PFL1_SEC0_WL21 0x2540 +#define PFL1_SEC0_WL22 0x2580 +#define PFL1_SEC0_WL23 0x25C0 +#define PFL1_SEC0_WL24 0x2600 +#define PFL1_SEC0_WL25 0x2640 +#define PFL1_SEC0_WL26 0x2680 +#define PFL1_SEC0_WL27 0x26C0 +#define PFL1_SEC0_WL28 0x2700 +#define PFL1_SEC0_WL29 0x2740 +#define PFL1_SEC0_WL30 0x2780 +#define PFL1_SEC0_WL31 0x27C0 +#define PFL1_SEC0_WL32 0x2800 +#define PFL1_SEC0_WL33 0x2840 +#define PFL1_SEC0_WL34 0x2880 +#define PFL1_SEC0_WL35 0x28C0 +#define PFL1_SEC0_WL36 0x2900 +#define PFL1_SEC0_WL37 0x2940 +#define PFL1_SEC0_WL38 0x2980 +#define PFL1_SEC0_WL39 0x29C0 +#define PFL1_SEC0_WL40 0x2A00 +#define PFL1_SEC0_WL41 0x2A40 +#define PFL1_SEC0_WL42 0x2A80 +#define PFL1_SEC0_WL43 0x2AC0 +#define PFL1_SEC0_WL44 0x2B00 +#define PFL1_SEC0_WL45 0x2B40 +#define PFL1_SEC0_WL46 0x2B80 +#define PFL1_SEC0_WL47 0x2BC0 +#define PFL1_SEC0_WL48 0x2C00 +#define PFL1_SEC0_WL49 0x2C40 +#define PFL1_SEC0_WL50 0x2C80 +#define PFL1_SEC0_WL51 0x2CC0 +#define PFL1_SEC0_WL52 0x2D00 +#define PFL1_SEC0_WL53 0x2D40 +#define PFL1_SEC0_WL54 0x2D80 +#define PFL1_SEC0_WL55 0x2DC0 +#define PFL1_SEC0_WL56 0x2E00 +#define PFL1_SEC0_WL57 0x2E40 +#define PFL1_SEC0_WL58 0x2E80 +#define PFL1_SEC0_WL59 0x2EC0 +#define PFL1_SEC0_WL60 0x2F00 +#define PFL1_SEC0_WL61 0x2F40 +#define PFL1_SEC0_WL62 0x2F80 +#define PFL1_SEC0_WL63 0x2FC0 +#define PFL1_SEC0_WL64 0x3000 +#define PFL1_SEC0_WL65 0x3040 +#define PFL1_SEC0_WL66 0x3080 +#define PFL1_SEC0_WL67 0x30C0 +#define PFL1_SEC0_WL68 0x3100 +#define PFL1_SEC0_WL69 0x3140 +#define PFL1_SEC0_WL70 0x3180 +#define PFL1_SEC0_WL71 0x31C0 +#define PFL1_SEC0_WL72 0x3200 +#define PFL1_SEC0_WL73 0x3240 +#define PFL1_SEC0_WL74 0x3280 +#define PFL1_SEC0_WL75 0x32C0 +#define PFL1_SEC0_WL76 0x3300 +#define PFL1_SEC0_WL77 0x3340 +#define PFL1_SEC0_WL78 0x3380 +#define PFL1_SEC0_WL79 0x33C0 +#define PFL1_SEC0_WL80 0x3400 +#define PFL1_SEC0_WL81 0x3440 +#define PFL1_SEC0_WL82 0x3480 +#define PFL1_SEC0_WL83 0x34C0 +#define PFL1_SEC0_WL84 0x3500 +#define PFL1_SEC0_WL85 0x3540 +#define PFL1_SEC0_WL86 0x3580 +#define PFL1_SEC0_WL87 0x35C0 +#define PFL1_SEC0_WL88 0x3600 +#define PFL1_SEC0_WL89 0x3640 +#define PFL1_SEC0_WL90 0x3680 +#define PFL1_SEC0_WL91 0x36C0 +#define PFL1_SEC0_WL92 0x3700 +#define PFL1_SEC0_WL93 0x3740 +#define PFL1_SEC0_WL94 0x3780 +#define PFL1_SEC0_WL95 0x37C0 +#define PFL1_SEC0_WL96 0x3800 +#define PFL1_SEC0_WL97 0x3840 +#define PFL1_SEC0_WL98 0x3880 +#define PFL1_SEC0_WL99 0x38C0 +#define PFL1_SEC0_WL100 0x3900 +#define PFL1_SEC0_WL101 0x3940 +#define PFL1_SEC0_WL102 0x3980 +#define PFL1_SEC0_WL103 0x39C0 +#define PFL1_SEC0_WL104 0x3A00 +#define PFL1_SEC0_WL105 0x3A40 +#define PFL1_SEC0_WL106 0x3A80 +#define PFL1_SEC0_WL107 0x3AC0 +#define PFL1_SEC0_WL108 0x3B00 +#define PFL1_SEC0_WL109 0x3B40 +#define PFL1_SEC0_WL110 0x3B80 +#define PFL1_SEC0_WL111 0x3BC0 +#define PFL1_SEC0_WL112 0x3C00 +#define PFL1_SEC0_WL113 0x3C40 +#define PFL1_SEC0_WL114 0x3C80 +#define PFL1_SEC0_WL115 0x3CC0 +#define PFL1_SEC0_WL116 0x3D00 +#define PFL1_SEC0_WL117 0x3D40 +#define PFL1_SEC0_WL118 0x3D80 +#define PFL1_SEC0_WL119 0x3DC0 + +// Sector 1 -- 256 bytes -- 4 Wordlines +#define PFL1_SEC1_WL120 0x3E00 +#define PFL1_SEC1_WL121 0x3E40 +#define PFL1_SEC1_WL122 0x3E80 +#define PFL1_SEC1_WL123 0x3EC0 + +// Sector 2 -- 256 bytes -- 4 Wordlines +#define PFL1_SEC2_WL124 0x3F00 +#define PFL1_SEC2_WL125 0x3F40 +#define PFL1_SEC2_WL126 0x3F80 +#define PFL1_SEC2_WL127 0x3FC0 + +//################################################################################### +// WordLine startaddresses for Sectors in PFlash 2, each WL with 64bytes + +// Sector 0 -- 7.5 kbytes -- 120 Wordlines +#define PFL2_SEC0_WL00 0x4000 +#define PFL2_SEC0_WL01 0x4040 +#define PFL2_SEC0_WL02 0x4080 +#define PFL2_SEC0_WL03 0x40C0 +#define PFL2_SEC0_WL04 0x4100 +#define PFL2_SEC0_WL05 0x4140 +#define PFL2_SEC0_WL06 0x4180 +#define PFL2_SEC0_WL07 0x41C0 +#define PFL2_SEC0_WL08 0x4200 +#define PFL2_SEC0_WL09 0x4240 +#define PFL2_SEC0_WL10 0x4280 +#define PFL2_SEC0_WL11 0x42C0 +#define PFL2_SEC0_WL12 0x4300 +#define PFL2_SEC0_WL13 0x4340 +#define PFL2_SEC0_WL14 0x4380 +#define PFL2_SEC0_WL15 0x43C0 +#define PFL2_SEC0_WL16 0x4400 +#define PFL2_SEC0_WL17 0x4440 +#define PFL2_SEC0_WL18 0x4480 +#define PFL2_SEC0_WL19 0x44C0 +#define PFL2_SEC0_WL20 0x4500 +#define PFL2_SEC0_WL21 0x4540 +#define PFL2_SEC0_WL22 0x4580 +#define PFL2_SEC0_WL23 0x45C0 +#define PFL2_SEC0_WL24 0x4600 +#define PFL2_SEC0_WL25 0x4640 +#define PFL2_SEC0_WL26 0x4680 +#define PFL2_SEC0_WL27 0x46C0 +#define PFL2_SEC0_WL28 0x4700 +#define PFL2_SEC0_WL29 0x4740 +#define PFL2_SEC0_WL30 0x4780 +#define PFL2_SEC0_WL31 0x47C0 +#define PFL2_SEC0_WL32 0x4800 +#define PFL2_SEC0_WL33 0x4840 +#define PFL2_SEC0_WL34 0x4880 +#define PFL2_SEC0_WL35 0x48C0 +#define PFL2_SEC0_WL36 0x4900 +#define PFL2_SEC0_WL37 0x4940 +#define PFL2_SEC0_WL38 0x4980 +#define PFL2_SEC0_WL39 0x49C0 +#define PFL2_SEC0_WL40 0x4A00 +#define PFL2_SEC0_WL41 0x4A40 +#define PFL2_SEC0_WL42 0x4A80 +#define PFL2_SEC0_WL43 0x4AC0 +#define PFL2_SEC0_WL44 0x4B00 +#define PFL2_SEC0_WL45 0x4B40 +#define PFL2_SEC0_WL46 0x4B80 +#define PFL2_SEC0_WL47 0x4BC0 +#define PFL2_SEC0_WL48 0x4C00 +#define PFL2_SEC0_WL49 0x4C40 +#define PFL2_SEC0_WL50 0x4C80 +#define PFL2_SEC0_WL51 0x4CC0 +#define PFL2_SEC0_WL52 0x4D00 +#define PFL2_SEC0_WL53 0x4D40 +#define PFL2_SEC0_WL54 0x4D80 +#define PFL2_SEC0_WL55 0x4DC0 +#define PFL2_SEC0_WL56 0x4E00 +#define PFL2_SEC0_WL57 0x4E40 +#define PFL2_SEC0_WL58 0x4E80 +#define PFL2_SEC0_WL59 0x4EC0 +#define PFL2_SEC0_WL60 0x4F00 +#define PFL2_SEC0_WL61 0x4F40 +#define PFL2_SEC0_WL62 0x4F80 +#define PFL2_SEC0_WL63 0x4FC0 +#define PFL2_SEC0_WL64 0x5000 +#define PFL2_SEC0_WL65 0x5040 +#define PFL2_SEC0_WL66 0x5080 +#define PFL2_SEC0_WL67 0x50C0 +#define PFL2_SEC0_WL68 0x5100 +#define PFL2_SEC0_WL69 0x5140 +#define PFL2_SEC0_WL70 0x5180 +#define PFL2_SEC0_WL71 0x51C0 +#define PFL2_SEC0_WL72 0x5200 +#define PFL2_SEC0_WL73 0x5240 +#define PFL2_SEC0_WL74 0x5280 +#define PFL2_SEC0_WL75 0x52C0 +#define PFL2_SEC0_WL76 0x5300 +#define PFL2_SEC0_WL77 0x5340 +#define PFL2_SEC0_WL78 0x5380 +#define PFL2_SEC0_WL79 0x53C0 +#define PFL2_SEC0_WL80 0x5400 +#define PFL2_SEC0_WL81 0x5440 +#define PFL2_SEC0_WL82 0x5480 +#define PFL2_SEC0_WL83 0x54C0 +#define PFL2_SEC0_WL84 0x5500 +#define PFL2_SEC0_WL85 0x5540 +#define PFL2_SEC0_WL86 0x5580 +#define PFL2_SEC0_WL87 0x55C0 +#define PFL2_SEC0_WL88 0x5600 +#define PFL2_SEC0_WL89 0x5640 +#define PFL2_SEC0_WL90 0x5680 +#define PFL2_SEC0_WL91 0x56C0 +#define PFL2_SEC0_WL92 0x5700 +#define PFL2_SEC0_WL93 0x5740 +#define PFL2_SEC0_WL94 0x5780 +#define PFL2_SEC0_WL95 0x57C0 +#define PFL2_SEC0_WL96 0x5800 +#define PFL2_SEC0_WL97 0x5840 +#define PFL2_SEC0_WL98 0x5880 +#define PFL2_SEC0_WL99 0x58C0 +#define PFL2_SEC0_WL100 0x5900 +#define PFL2_SEC0_WL101 0x5940 +#define PFL2_SEC0_WL102 0x5980 +#define PFL2_SEC0_WL103 0x59C0 +#define PFL2_SEC0_WL104 0x5A00 +#define PFL2_SEC0_WL105 0x5A40 +#define PFL2_SEC0_WL106 0x5A80 +#define PFL2_SEC0_WL107 0x5AC0 +#define PFL2_SEC0_WL108 0x5B00 +#define PFL2_SEC0_WL109 0x5B40 +#define PFL2_SEC0_WL110 0x5B80 +#define PFL2_SEC0_WL111 0x5BC0 +#define PFL2_SEC0_WL112 0x5C00 +#define PFL2_SEC0_WL113 0x5C40 +#define PFL2_SEC0_WL114 0x5C80 +#define PFL2_SEC0_WL115 0x5CC0 +#define PFL2_SEC0_WL116 0x5D00 +#define PFL2_SEC0_WL117 0x5D40 +#define PFL2_SEC0_WL118 0x5D80 +#define PFL2_SEC0_WL119 0x5DC0 + +// Sector 1 -- 256 bytes -- 4 Wordlines +#define PFL2_SEC1_WL120 0x5E00 +#define PFL2_SEC1_WL121 0x5E40 +#define PFL2_SEC1_WL122 0x5E80 +#define PFL2_SEC1_WL123 0x5EC0 + +// Sector 2 -- 256 bytes -- 4 Wordlines +#define PFL2_SEC2_WL124 0x5F00 +#define PFL2_SEC2_WL125 0x5F40 +#define PFL2_SEC2_WL126 0x5F80 +#define PFL2_SEC2_WL127 0x5FC0 + +//################################################################################### +// WordLine startaddresses for sectors in DFlash 0, each WL with 32bytes +// DFlash 0 address is also mirrorred to 0x7xxx + +// Sector 0 -- 1024 bytes -- 32 Wordlines +#define DFL0_SEC0_WL00 0xA000 +#define DFL0_SEC0_WL01 0xA020 +#define DFL0_SEC0_WL02 0xA040 +#define DFL0_SEC0_WL03 0xA060 +#define DFL0_SEC0_WL04 0xA080 +#define DFL0_SEC0_WL05 0xA0A0 +#define DFL0_SEC0_WL06 0xA0C0 +#define DFL0_SEC0_WL07 0xA0E0 +#define DFL0_SEC0_WL08 0xA100 +#define DFL0_SEC0_WL09 0xA120 +#define DFL0_SEC0_WL10 0xA140 +#define DFL0_SEC0_WL11 0xA160 +#define DFL0_SEC0_WL12 0xA180 +#define DFL0_SEC0_WL13 0xA1A0 +#define DFL0_SEC0_WL14 0xA1C0 +#define DFL0_SEC0_WL15 0xA1E0 +#define DFL0_SEC0_WL16 0xA200 +#define DFL0_SEC0_WL17 0xA220 +#define DFL0_SEC0_WL18 0xA240 +#define DFL0_SEC0_WL19 0xA260 +#define DFL0_SEC0_WL20 0xA280 +#define DFL0_SEC0_WL21 0xA2A0 +#define DFL0_SEC0_WL22 0xA2C0 +#define DFL0_SEC0_WL23 0xA2E0 +#define DFL0_SEC0_WL24 0xA300 +#define DFL0_SEC0_WL25 0xA320 +#define DFL0_SEC0_WL26 0xA340 +#define DFL0_SEC0_WL27 0xA360 +#define DFL0_SEC0_WL28 0xA380 +#define DFL0_SEC0_WL29 0xA3A0 +#define DFL0_SEC0_WL30 0xA3C0 +#define DFL0_SEC0_WL31 0xA3E0 + +// Sector 1 -- 1024 bytes -- 32 Wordlines +#define DFL0_SEC1_WL32 0xA400 +#define DFL0_SEC1_WL33 0xA420 +#define DFL0_SEC1_WL34 0xA440 +#define DFL0_SEC1_WL35 0xA460 +#define DFL0_SEC1_WL36 0xA480 +#define DFL0_SEC1_WL37 0xA4A0 +#define DFL0_SEC1_WL38 0xA4C0 +#define DFL0_SEC1_WL39 0xA4E0 +#define DFL0_SEC1_WL40 0xA500 +#define DFL0_SEC1_WL41 0xA520 +#define DFL0_SEC1_WL42 0xA540 +#define DFL0_SEC1_WL43 0xA560 +#define DFL0_SEC1_WL44 0xA580 +#define DFL0_SEC1_WL45 0xA5A0 +#define DFL0_SEC1_WL46 0xA5C0 +#define DFL0_SEC1_WL47 0xA5E0 +#define DFL0_SEC1_WL48 0xA600 +#define DFL0_SEC1_WL49 0xA620 +#define DFL0_SEC1_WL50 0xA640 +#define DFL0_SEC1_WL51 0xA660 +#define DFL0_SEC1_WL52 0xA680 +#define DFL0_SEC1_WL53 0xA6A0 +#define DFL0_SEC1_WL54 0xA6C0 +#define DFL0_SEC1_WL55 0xA6E0 +#define DFL0_SEC1_WL56 0xA700 +#define DFL0_SEC1_WL57 0xA720 +#define DFL0_SEC1_WL58 0xA740 +#define DFL0_SEC1_WL59 0xA760 +#define DFL0_SEC1_WL60 0xA780 +#define DFL0_SEC1_WL61 0xA7A0 +#define DFL0_SEC1_WL62 0xA7C0 +#define DFL0_SEC1_WL63 0xA7E0 + +// Sector 2 -- 512 bytes -- 16 Wordlines +#define DFL0_SEC2_WL64 0xA800 +#define DFL0_SEC2_WL65 0xA820 +#define DFL0_SEC2_WL66 0xA840 +#define DFL0_SEC2_WL67 0xA860 +#define DFL0_SEC2_WL68 0xA880 +#define DFL0_SEC2_WL69 0xA8A0 +#define DFL0_SEC2_WL70 0xA8C0 +#define DFL0_SEC2_WL71 0xA8E0 +#define DFL0_SEC2_WL72 0xA900 +#define DFL0_SEC2_WL73 0xA920 +#define DFL0_SEC2_WL74 0xA940 +#define DFL0_SEC2_WL75 0xA960 +#define DFL0_SEC2_WL76 0xA980 +#define DFL0_SEC2_WL77 0xA9A0 +#define DFL0_SEC2_WL78 0xA9C0 +#define DFL0_SEC2_WL79 0xA9E0 + +// Sector 3 -- 512 bytes -- 16 Wordlines +#define DFL0_SEC3_WL80 0xAA00 +#define DFL0_SEC3_WL81 0xAA20 +#define DFL0_SEC3_WL82 0xAA40 +#define DFL0_SEC3_WL83 0xAA60 +#define DFL0_SEC3_WL84 0xAA80 +#define DFL0_SEC3_WL85 0xAAA0 +#define DFL0_SEC3_WL86 0xAAC0 +#define DFL0_SEC3_WL87 0xAAE0 +#define DFL0_SEC3_WL88 0xAB00 +#define DFL0_SEC3_WL89 0xAB20 +#define DFL0_SEC3_WL90 0xAB40 +#define DFL0_SEC3_WL91 0xAB60 +#define DFL0_SEC3_WL92 0xAB80 +#define DFL0_SEC3_WL93 0xABA0 +#define DFL0_SEC3_WL94 0xABC0 +#define DFL0_SEC3_WL95 0xABE0 + +// Sector 4 -- 256 bytes -- 8 Wordlines +#define DFL0_SEC4_WL96 0xAC00 +#define DFL0_SEC4_WL97 0xAC20 +#define DFL0_SEC4_WL98 0xAC40 +#define DFL0_SEC4_WL99 0xAC60 +#define DFL0_SEC4_WL100 0xAC80 +#define DFL0_SEC4_WL101 0xACA0 +#define DFL0_SEC4_WL102 0xACC0 +#define DFL0_SEC4_WL103 0xACE0 + +// Sector 5 -- 256 bytes -- 8 Wordlines +#define DFL0_SEC5_WL104 0xAD00 +#define DFL0_SEC5_WL105 0xAD20 +#define DFL0_SEC5_WL106 0xAD40 +#define DFL0_SEC5_WL107 0xAD60 +#define DFL0_SEC5_WL108 0xAD80 +#define DFL0_SEC5_WL109 0xADA0 +#define DFL0_SEC5_WL110 0xADC0 +#define DFL0_SEC5_WL111 0xADE0 + +// Sector 6 -- 128 bytes -- 4 Wordlines +#define DFL0_SEC6_WL112 0xAE00 +#define DFL0_SEC6_WL113 0xAE20 +#define DFL0_SEC6_WL114 0xAE40 +#define DFL0_SEC6_WL115 0xAE60 + +// Sector 7 -- 128 bytes -- 4 Wordlines +#define DFL0_SEC7_WL116 0xAE80 +#define DFL0_SEC7_WL117 0xAEA0 +#define DFL0_SEC7_WL118 0xAEC0 +#define DFL0_SEC7_WL119 0xAEE0 + +// Sector 8 -- 128 bytes -- 4 Wordlines +#define DFL0_SEC8_WL120 0xAF00 +#define DFL0_SEC8_WL121 0xAF20 +#define DFL0_SEC8_WL122 0xAF40 +#define DFL0_SEC8_WL123 0xAF60 + +// Sector 9 -- 128 bytes -- 4 Wordlines +#define DFL0_SEC9_WL124 0xAF80 +#define DFL0_SEC9_WL125 0xAFA0 +#define DFL0_SEC9_WL126 0xAFC0 +#define DFL0_SEC9_WL127 0xAFE0 + +//################################################################################### +// WordLine startaddresses for sectors in DFlash 1, each WL with 32bytes +// DFlash 0 address is also mirrorred to 0x6xxx + +// Sector 0 -- 1024 bytes -- 32 Wordlines +#define DFL1_SEC0_WL00 0xA000 +#define DFL1_SEC0_WL01 0xA020 +#define DFL1_SEC0_WL02 0xA040 +#define DFL1_SEC0_WL03 0xA060 +#define DFL1_SEC0_WL04 0xA080 +#define DFL1_SEC0_WL05 0xA0A0 +#define DFL1_SEC0_WL06 0xA0C0 +#define DFL1_SEC0_WL07 0xA0E0 +#define DFL1_SEC0_WL08 0xA100 +#define DFL1_SEC0_WL09 0xA120 +#define DFL1_SEC0_WL10 0xA140 +#define DFL1_SEC0_WL11 0xA160 +#define DFL1_SEC0_WL12 0xA180 +#define DFL1_SEC0_WL13 0xA1A0 +#define DFL1_SEC0_WL14 0xA1C0 +#define DFL1_SEC0_WL15 0xA1E0 +#define DFL1_SEC0_WL16 0xA200 +#define DFL1_SEC0_WL17 0xA220 +#define DFL1_SEC0_WL18 0xA240 +#define DFL1_SEC0_WL19 0xA260 +#define DFL1_SEC0_WL20 0xA280 +#define DFL1_SEC0_WL21 0xA2A0 +#define DFL1_SEC0_WL22 0xA2C0 +#define DFL1_SEC0_WL23 0xA2E0 +#define DFL1_SEC0_WL24 0xA300 +#define DFL1_SEC0_WL25 0xA320 +#define DFL1_SEC0_WL26 0xA340 +#define DFL1_SEC0_WL27 0xA360 +#define DFL1_SEC0_WL28 0xA380 +#define DFL1_SEC0_WL29 0xA3A0 +#define DFL1_SEC0_WL30 0xA3C0 +#define DFL1_SEC0_WL31 0xA3E0 + +// Sector 1 -- 1024 bytes -- 32 Wordlines +#define DFL1_SEC1_WL32 0xA400 +#define DFL1_SEC1_WL33 0xA420 +#define DFL1_SEC1_WL34 0xA440 +#define DFL1_SEC1_WL35 0xA460 +#define DFL1_SEC1_WL36 0xA480 +#define DFL1_SEC1_WL37 0xA4A0 +#define DFL1_SEC1_WL38 0xA4C0 +#define DFL1_SEC1_WL39 0xA4E0 +#define DFL1_SEC1_WL40 0xA500 +#define DFL1_SEC1_WL41 0xA520 +#define DFL1_SEC1_WL42 0xA540 +#define DFL1_SEC1_WL43 0xA560 +#define DFL1_SEC1_WL44 0xA580 +#define DFL1_SEC1_WL45 0xA5A0 +#define DFL1_SEC1_WL46 0xA5C0 +#define DFL1_SEC1_WL47 0xA5E0 +#define DFL1_SEC1_WL48 0xA600 +#define DFL1_SEC1_WL49 0xA620 +#define DFL1_SEC1_WL50 0xA640 +#define DFL1_SEC1_WL51 0xA660 +#define DFL1_SEC1_WL52 0xA680 +#define DFL1_SEC1_WL53 0xA6A0 +#define DFL1_SEC1_WL54 0xA6C0 +#define DFL1_SEC1_WL55 0xA6E0 +#define DFL1_SEC1_WL56 0xA700 +#define DFL1_SEC1_WL57 0xA720 +#define DFL1_SEC1_WL58 0xA740 +#define DFL1_SEC1_WL59 0xA760 +#define DFL1_SEC1_WL60 0xA780 +#define DFL1_SEC1_WL61 0xA7A0 +#define DFL1_SEC1_WL62 0xA7C0 +#define DFL1_SEC1_WL63 0xA7E0 + +// Sector 2 -- 512 bytes -- 16 Wordlines +#define DFL1_SEC2_WL64 0xA800 +#define DFL1_SEC2_WL65 0xA820 +#define DFL1_SEC2_WL66 0xA840 +#define DFL1_SEC2_WL67 0xA860 +#define DFL1_SEC2_WL68 0xA880 +#define DFL1_SEC2_WL69 0xA8A0 +#define DFL1_SEC2_WL70 0xA8C0 +#define DFL1_SEC2_WL71 0xA8E0 +#define DFL1_SEC2_WL72 0xA900 +#define DFL1_SEC2_WL73 0xA920 +#define DFL1_SEC2_WL74 0xA940 +#define DFL1_SEC2_WL75 0xA960 +#define DFL1_SEC2_WL76 0xA980 +#define DFL1_SEC2_WL77 0xA9A0 +#define DFL1_SEC2_WL78 0xA9C0 +#define DFL1_SEC2_WL79 0xA9E0 + +// Sector 3 -- 512 bytes -- 16 Wordlines +#define DFL1_SEC3_WL80 0xAA00 +#define DFL1_SEC3_WL81 0xAA20 +#define DFL1_SEC3_WL82 0xAA40 +#define DFL1_SEC3_WL83 0xAA60 +#define DFL1_SEC3_WL84 0xAA80 +#define DFL1_SEC3_WL85 0xAAA0 +#define DFL1_SEC3_WL86 0xAAC0 +#define DFL1_SEC3_WL87 0xAAE0 +#define DFL1_SEC3_WL88 0xAB00 +#define DFL1_SEC3_WL89 0xAB20 +#define DFL1_SEC3_WL90 0xAB40 +#define DFL1_SEC3_WL91 0xAB60 +#define DFL1_SEC3_WL92 0xAB80 +#define DFL1_SEC3_WL93 0xABA0 +#define DFL1_SEC3_WL94 0xABC0 +#define DFL1_SEC3_WL95 0xABE0 + +// Sector 4 -- 256 bytes -- 8 Wordlines +#define DFL1_SEC4_WL96 0xAC00 +#define DFL1_SEC4_WL97 0xAC20 +#define DFL1_SEC4_WL98 0xAC40 +#define DFL1_SEC4_WL99 0xAC60 +#define DFL1_SEC4_WL100 0xAC80 +#define DFL1_SEC4_WL101 0xACA0 +#define DFL1_SEC4_WL102 0xACC0 +#define DFL1_SEC4_WL103 0xACE0 + +// Sector 5 -- 256 bytes -- 8 Wordlines +#define DFL1_SEC5_WL104 0xAD00 +#define DFL1_SEC5_WL105 0xAD20 +#define DFL1_SEC5_WL106 0xAD40 +#define DFL1_SEC5_WL107 0xAD60 +#define DFL1_SEC5_WL108 0xAD80 +#define DFL1_SEC5_WL109 0xADA0 +#define DFL1_SEC5_WL110 0xADC0 +#define DFL1_SEC5_WL111 0xADE0 + +// Sector 6 -- 128 bytes -- 4 Wordlines +#define DFL1_SEC6_WL112 0xAE00 +#define DFL1_SEC6_WL113 0xAE20 +#define DFL1_SEC6_WL114 0xAE40 +#define DFL1_SEC6_WL115 0xAE60 + +// Sector 7 -- 128 bytes -- 4 Wordlines +#define DFL1_SEC7_WL116 0xAE80 +#define DFL1_SEC7_WL117 0xAEA0 +#define DFL1_SEC7_WL118 0xAEC0 +#define DFL1_SEC7_WL119 0xAEE0 + +// Sector 8 -- 128 bytes -- 4 Wordlines +#define DFL1_SEC8_WL120 0xAF00 +#define DFL1_SEC8_WL121 0xAF20 +#define DFL1_SEC8_WL122 0xAF40 +#define DFL1_SEC8_WL123 0xAF60 + +// Sector 9 -- 128 bytes -- 4 Wordlines +#define DFL1_SEC9_WL124 0xAF80 +#define DFL1_SEC9_WL125 0xAFA0 +#define DFL1_SEC9_WL126 0xAFC0 +#define DFL1_SEC9_WL127 0xAFE0 + +#endif // #ifndef __XC88x_FLADDR_H__ diff --git a/XC88x_FLHANDLER.ASM b/XC88x_FLHANDLER.ASM new file mode 100644 index 0000000..6c49a6b --- /dev/null +++ b/XC88x_FLHANDLER.ASM @@ -0,0 +1,166 @@ +;************************************************************************************ +;* FILE : XC88x_FLHANDLER.ASM * +;* DESCRIPTION : Flash handler routine for XC88x AA and AB * +;* COPYRIGHT : (c) 2006 Infineon Technologies AG * +;* UPDATED : 14/03/2006 * +;************************************************************************************ +$ NOMOD51 +$ DEBUG +#include "XC88x_FLADDR.H" + +FLASH_ERASE CODE FLASH_ERASE_BROM_ENTRY +FLASH_PROG CODE FLASH_PROGRAM_BROM_ENTRY +FLASH_ERASE_ABORT CODE FLASH_ERASE_ABORT_BROM_ENTRY +FLASH_READ_STATUS CODE FLASH_READ_STATUS_BROM_ENTRY +FLASH_PROTECT CODE FLASH_PROTECT_BROM_ENTRY + +DSEG AT MAGIC_MEMORY +DS RESERVED_BYTES ; Reserved for FLASH Handler in Boot ROM + + + + +;------------------------------------------------------------------------------------------ +; Function Name : bit DFlErase (unsigned int DFlash0Sector, unsigned int DFlash1Sector) +; Description : Erase DFlash Sectors (Bank3 and Bank4) +; Input Parameter : DFlash0Sector => Bit0 = Erase Sector0 +; Bit1 = Erase Sector1 +; Bit2 = Erase Sector2 +; Bit3 = Erase Sector3 +; Bit4 = Erase Sector4 +; Bit5 = Erase Sector5 +; Bit6 = Erase Sector6 +; Bit7 = Erase Sector7 +; Bit8 = Erase Sector8 +; Bit9 = Erase Sector9 +; DFlash1Sector => Bit0 = Erase Sector0 +; Bit1 = Erase Sector1 +; Bit2 = Erase Sector2 +; Bit3 = Erase Sector3 +; Bit4 = Erase Sector4 +; Bit5 = Erase Sector5 +; Bit6 = Erase Sector6 +; Bit7 = Erase Sector7 +; Bit8 = Erase Sector8 +; Bit9 = Erase Sector9 +; +; e.g: DFlash0Sector = 0x202 +; DFlash1Sector = 0x380 +; ==> Will erase Bank3 Sector 1 +; erase Bank3 Sector 9 +; erase Bank4 Sector 7 +; erase Bank4 Sector 8 +; erase Bank4 Sector 9 +; Return Value : Bit => 1 = Successfull +; 0 = Fail +; Required Stack Size = 12 +;------------------------------------------------------------------------------------------ +#if USE_DLFERASE +?PR?_DFlErase?XC88x_FLHANDLER SEGMENT CODE +RSEG ?PR?_DFlErase?XC88x_FLHANDLER +PUBLIC _DFlErase +_DFlErase: + USING USE_BANK + MOV AR1,R6 ; BANK3 + MOV AR0,R7 ; BANK3 + + MOV AR4,R4 ; BANK4 + MOV AR3,R5 ; BANK4 + + CLR A + MOV AR5, A ; BANK0 + MOV AR6, A ; BANK1 + MOV AR7, A ; BANK2 + + PUSH PSW + PUSH ACC + PUSH B +#if (USE_BANK == 0) + ANL PSW, #0xE7 ; Set to Bank0 +#elseif (USE_BANK == 1) + SETB PSW.3 + CLR PSW.4 +#elif (USE_BANK == 2) + CLR PSW.3 + SETB PSW.4 +#elif (USE_BANK == 3) + ORL PSW, #0x18 +#endif + + LCALL FLASH_ERASE + JC _derase_fail + POP B + POP ACC + POP PSW + SETB C + RET +_derase_fail: + POP B + POP ACC + POP PSW + CLR C +RET +#endif + +;------------------------------------------------------------------------------------------ +; Function Name: bit FlProg(unsigned char idata *WlBuf) +; Description: Program the 32byte data in the WlBuf to the EEPROM +; When calling this function, user should already programmed +; the DPTR with the EEPROM address (aligned to 32byte boundary) +; Input Parameter: *WlBuf ==> The pointer to the starting location of the buffer +; in the IDATA memory. +; Return Value: Bit => 1 = Successfull +; 0 = Fail +; Required Stack Size = 12 +;------------------------------------------------------------------------------------------ +?PR?_FlProg?XC88x_FLHANDLER SEGMENT CODE +RSEG ?PR?_FlProg?XC88x_FLHANDLER +PUBLIC _FlProg +_FlProg: +using USE_BANK + MOV AR0,R7 ; move C51 parameter registers to AR0 + ; this is the pointer to the WLBuf + +; MOV A,#0x6F +; MOV DPH,A +; MOV A,#0x0 ; the DPL will = DPL+0x20 after one successful program +; MOV DPL,A + + PUSH PSW + PUSH ACC + PUSH B +#if (USE_BANK == 0) + ANL PSW, #0xE7 ; Set to Bank0 +#elif (USE_BANK == 1) + SETB PSW.3 + CLR PSW.4 +#elif (USE_BANK == 2) + CLR PSW.3 + SETB PSW.4 +#elif (USE_BANK == 3) + ORL PSW, #0x18 +#endif + + LCALL FLASH_PROG ; LCALL FLASH_PROG + JC _prog_fail + POP B + POP ACC + POP PSW + SETB C + RET +_prog_fail: + POP B + POP ACC + POP PSW + CLR C +RET + + + + + + + +END + +;;#endif ;;#if (XC88xAA) diff --git a/XC8Memory.c b/XC8Memory.c new file mode 100644 index 0000000..deab615 --- /dev/null +++ b/XC8Memory.c @@ -0,0 +1,134 @@ +//**************************************************************************** +// File Name XC8Memory.c +//---------------------------------------------------------------------------- +// Derivatives Infineon XC88x AA and AB +// +// Description Sets of function to handle the memory in the XC88x AA. +// In particular, the Flash handling is taken care of here. +// +//---------------------------------------------------------------------------- +// Date 14.03.2006 10:48:38 +// Copyright (c) 2006 Infineon Technologies +//**************************************************************************** + +#include "XC8Memory.h" + +/* +// ************************************************************************** +// Function Name: void LoadXD2WLBuf (unsigned char xdata *address) +// Description: Load 32byte of data from the XDATA to the WLBuf +// WLBuf is a buffer that is located in the IDATA-space +// Input Parameter: *address ==> pointer to the address +// in the XDATA memory +// Output Parameter: none + +// NOTE: Execution time and code can saved, +// if you have the possibility to write directly in +// the buffer +// ************************************************************************** +void LoadXD2WLBuf(unsigned char xdata *address) +{ +// Loads Wordline Buffer with 32bytes from given address in XDATA +unsigned char i; + for (i=0; i pointer to the address +// in the CODE memory +// Output Parameter: none + +// NOTE: Execution time and code can saved, +// if you have the possibility to write directly in +// the buffer +// *********************************************************************** +void LoadConst2WLBuf(unsigned char code *address) +{ +// Loads Wordline Buffer with 32bytes from given address in CODE +unsigned char i; + for (i=0; i pointer to the location in the FLASH. +// The address must be aligned to a 32byte boundary +// Output Parameter: 1 = Success +// 0 = Fail +// Note: used Stack Size = 12 +// ************************************************************************************** +bit ProgWL(unsigned char code *AdrBnkXSecYWLZ) +{ +unsigned int i; + i = AdrBnkXSecYWLZ; + MEM_DPH = i>>8; + MEM_DPL = i; + return (FlProg(&WLBuf[0])); +} + +// ************************************************************************************* +// Function Name: void LoadConst2XD (unsigned char xdata *dstaddress, +// unsigned char code *srcaddress, unsigned int length) +// Description: Copy the data from the CODE memory to XDATA memory +// Input Parameter: *srcaddress ==> pointer to the location in the FLASH/EEPROM. +// lenght ==> The number of byte to be copied +// Output Parameter: *dstaddress ==> pointer to the location in the XDATA memory. +// The data will be copied to this location + +// NOTE: Execution time and code can saved, +// if you have the possibility to write directly in +// the buffer +// ************************************************************************************* +void LoadConst2XD(unsigned char xdata *dstaddress, unsigned char code *srcaddress, unsigned char length) +{ +// Loads number of constants to XDATA at given addresses +unsigned char i; + for (i=0; i pointer to the location in the XDATA memory. +// No byte alignment is necessary +// lenght ==> The number of byte to be copied +// Output Parameter: *dstaddress ==> pointer to the location in the XDATA memory. +// The data will be copied to this location +// +// NOTE: Execution time and code can saved, +// if you have the possibility to write directly in +// the buffer +// ************************************************************************************* +void LoadXD2XD(unsigned char xdata *dstaddress, unsigned char xdata *srcaddress, unsigned int length) +{ +// Copies number of bytes in XDATA to XDATA at given addresses +unsigned int i; + for (i=0; i pointer to the location in the CODE memory. +// No byte alignment is necessary +// Return Value: Data Byte +// ************************************************************************************* +unsigned char ReadConst(unsigned char code *address) +{ + return (*address); +} + +*/ \ No newline at end of file diff --git a/XC8Memory.h b/XC8Memory.h new file mode 100644 index 0000000..0b13e87 --- /dev/null +++ b/XC8Memory.h @@ -0,0 +1,72 @@ +//**************************************************************************** +// File Name XC8Memory.h +//---------------------------------------------------------------------------- +// Derivatives Infineon XC88x AA and AB +// +// Description Sets of function to handle the memory in the XC88x AA. +// In particular, the Flash handling is taken care of here. +// +//---------------------------------------------------------------------------- +// Date 14.03.2006 10:48:38 +// Copyright (c) 2006 Infineon Technologies +//**************************************************************************** + +// Header for XC8Memory.c +// Memory handling of XC88x AA derivatives + +#ifndef _XC8MEMORY_H_ +#define _XC8MEMORY_H_ + +#include "XC88x_FLADDR.H" + + +//+------------------------------------------------+ +//| Global variables needed +//+------------------------------------------------+ +// Buffer for the 32byte data before being written to eEPROM +extern unsigned char idata WLBuf[BYTES_PER_WORDLINE]; + +// Function to program the WLBuf to Flash Memory +bit ProgWL(unsigned char code *AdrBnkXSecYWLZ); +// Function to load the data from XDATA memory to WLBuf +void LoadXD2WLBuf(unsigned char xdata *address); +// Function to load the data from CODE memory to WLBuf +// This is used to copy data from one Flash location to another. +void LoadConst2WLBuf(unsigned char code *address); +// Function to load the data from CODE memory to XDATA memory +void LoadConst2XD(unsigned char xdata *dstaddress, unsigned char code *srcaddress, unsigned char length); +// Function to read a byte from CODE memory +unsigned char ReadConst(unsigned char code *address); + +// All of the description of the functions below is done in XC88x_FLHANDER.ASM +// Erase Flash Sectors +// Required Stack Size = 12 +extern bit PFlErase (unsigned char Bank0Sector, unsigned char Bank1Sector, unsigned char Bank2Sector); +extern bit DFlErase (unsigned int DFlash0Sector, unsigned int DFlash1Sector); + +// Program Flash +// Required Stack Size = 12 +extern bit FlProg(unsigned char idata *SrcBuf); + +// Check if Flash is ready to read +// Bank = Bank Number to be checked +// Required Stack Size = 6 +extern bit FlReady(unsigned char Bank); + +// Abort the existing erase process +// Required Stack Size = 6 +extern bit FlEraseAbort(void); + +// Program / Remove Password. +// Detail is available in FLHANDLER.asm +extern bit FlProtect(unsigned char Password); + +extern unsigned char _FlReadByte(void); +extern void FlExecute(unsigned char AddrH, unsigned char AddrL); + +sfr MEM_DPH = 0x83; +sfr MEM_DPL = 0x82; +sfr MEM_NMICON = 0xBB; +sfr MEM_NMISR = 0xBC; + +#endif // _XC8MEMORY_H_ diff --git a/boot.H b/boot.H new file mode 100644 index 0000000..b11c0cf --- /dev/null +++ b/boot.H @@ -0,0 +1,79 @@ +#ifndef _BOOT_H_ +#define _BOOT_H_ +#include "XC88x_FLADDR.H" + +#define ArrXram ((ubyte volatile xdata *)0xf000) +#define DF_XramLenth 0x600 +#define ArrBootCode ((ubyte volatile code *)0x7000) +#define DF_BootCodeLenth 0x600 + + + +#define ACKNOWLEDGE 0x55 +#define BLOCK_ERROR 0xFF +#define TIMEOUT_ERROR 0xF0 +#define PROTECTION_ERROR 0xFD + +#define RX_MSGOBJ 5 +#define TX_MSGOBJ 9 // Define the Message Object for Transmit (No FIFO// is supported for Transmit) + + +//---外部要使用变量声明--------------------------------------------------------------------- +void BootMain(void); +void CAN_waitTransmit(ubyte RgMsgobj); + + + +//+------------------------------------------------+ +//| Global variables needed +//+------------------------------------------------+ +// Buffer for the 32byte data before being written to eEPROM +extern unsigned char idata WLBuf[BYTES_PER_WORDLINE]; + +// Function to program the WLBuf to Flash Memory +bit ProgWL(unsigned char code *AdrBnkXSecYWLZ); +// Function to load the data from XDATA memory to WLBuf +void LoadXD2WLBuf(unsigned char xdata *address); +// Function to load the data from CODE memory to WLBuf +// This is used to copy data from one Flash location to another. +void LoadConst2WLBuf(unsigned char code *address); +// Function to load the data from CODE memory to XDATA memory +void LoadConst2XD(unsigned char xdata *dstaddress, unsigned char code *srcaddress, unsigned char length); +// Function to read a byte from CODE memory +unsigned char ReadConst(unsigned char code *address); + +// All of the description of the functions below is done in XC88x_FLHANDER.ASM +// Erase Flash Sectors +// Required Stack Size = 12 +extern bit PFlErase (unsigned char Bank0Sector, unsigned char Bank1Sector, unsigned char Bank2Sector); +extern bit DFlErase (unsigned int DFlash0Sector, unsigned int DFlash1Sector); + +// Program Flash +// Required Stack Size = 12 +extern bit FlProg(unsigned char idata *SrcBuf); + +// Check if Flash is ready to read +// Bank = Bank Number to be checked +// Required Stack Size = 6 +extern bit FlReady(unsigned char Bank); + +// Abort the existing erase process +// Required Stack Size = 6 +extern bit FlEraseAbort(void); + +// Program / Remove Password. +// Detail is available in FLHANDLER.asm +extern bit FlProtect(unsigned char Password); + +extern unsigned char _FlReadByte(void); +extern void FlExecute(unsigned char AddrH, unsigned char AddrL); + +sfr MEM_DPH = 0x83; +sfr MEM_DPL = 0x82; +sfr MEM_NMICON = 0xBB; +sfr MEM_NMISR = 0xBC; + + + + +#endif \ No newline at end of file diff --git a/boot.c b/boot.c new file mode 100644 index 0000000..a292d16 --- /dev/null +++ b/boot.c @@ -0,0 +1,128 @@ +#include "MAIN.H" + ubyte idata WLBuf[32] _at_ 0x80; +// This function will generate a Watchdog Reset +// The reset will be generated in about 21 us +void CAN_setWDTReset(void) +{ + SFR_PAGE(_su1, noSST); // switch to page1 without saving + MAIN_vUnlockProtecReg(); // open access to protected register + + SET_RMAP(); + WDTCON |= 0x04; // set WDTEN + WDTREL = 0xFF; //Watch dog timer reload register + WDTCON |= 0x03; // set WDTRS,set WDTIN + RESET_RMAP(); + + MAIN_vlockProtecReg(); // close access to protected register + SFR_PAGE(_su0, noSST); // switch to page0 with out saving + + while(1); +} + + +void CAN_waitTransmit(ubyte RgMsgobj) +{ + ulong i; + for(i=0;(i<6000)&&(!CAN_ubRequestMsgObj(RgMsgobj));i++)WDT_vRefresh(); +} + + +// CAN Acknowledge Frame consist of 2 data bytes. +// The first data byte is the Acknowledge Code +// The second data byte is the valid data depending on the Acknowledge Code +// TX_MSGOBJ is set to one Message object only. +void CAN_sendAck(ubyte Ack0,ubyte Ack1) +{ + ubyte Arrtmp[8] = {0}; +//-------------------------------------------- + Arrtmp[3] = Ack0; + Arrtmp[2] = Ack1; + + CAN_vLoadData(TX_MSGOBJ, (ulong *)(Arrtmp)); // Add this Line + CAN_vTransmit(TX_MSGOBJ); + CAN_waitTransmit(TX_MSGOBJ); +} + + + + +// Flash_Wait does not take care of the timeout. +// In case programming / erasing fail, it will automatically reset the chip. +// (to be implemented) +void Flash_Wait(void) +{ + ubyte ubCount0, ubCount1, ubCount2; + + SYSCON0 = SYSCON0 & 0xFE; + SCU_PAGE = 0; // Mandatory + for (ubCount2=0; ubCount2 < 50; ubCount2++) + { + for (ubCount1=0; ubCount1 < 255; ubCount1++) + { + for (ubCount0=0; ubCount0 < 255; ubCount0++) + { + if (NMISR & 0x4) + { + NMISR &= ~0x04; + return; + } + } + } + } + CAN_setWDTReset(); +} + + + +void BootMain(void) +{ + stCAN_SWObj StrBootRx; + ubyte ulCANData[8]; + ubyte i; + +//------------------------------------ + if(CAN_ubNewData(RX_MSGOBJ)) + { + CAN_vGetMsgObj(RX_MSGOBJ, &StrBootRx); + ulCANData[3] = StrBootRx.ulDATAL.ubDB[0]; + ulCANData[2] = StrBootRx.ulDATAL.ubDB[1]; + ulCANData[1] = StrBootRx.ulDATAL.ubDB[2]; + ulCANData[0] = StrBootRx.ulDATAL.ubDB[3]; + ulCANData[7] = StrBootRx.ulDATAH.ubDB[0]; + ulCANData[6] = StrBootRx.ulDATAH.ubDB[1]; + ulCANData[5] = StrBootRx.ulDATAH.ubDB[2]; + ulCANData[4] = StrBootRx.ulDATAH.ubDB[3]; + CAN_vReleaseObj(RX_MSGOBJ); + + EA = 0; + TR2 = 0; + WDT_vDisable();//清除WDT,否则在boot程序中会产生复位 +//------------------------------------------------------------ + if((ulCANData[0] == 0xaa) && (ulCANData[1] == 0xaa))//重启 + { + CAN_sendAck(ACKNOWLEDGE, 0x01); + CAN_setWDTReset(); + } +//------------------------------------------------------------ + else if((ulCANData[0] == 0x33) && (ulCANData[1] == 0x33))//编程11 + { + SCU_PAGE = 0; + NMISR = 0; + DFlErase(0x0, 0x0300);//擦除bank1 sector 8,9 + Flash_Wait(); // In case fail, the chip will generate WDT Reset + + for(i=0;i<32;i++) + { + WLBuf[i] = 0; + } + WLBuf[0] = 0x11;//编程标识,0x6F00 + DPH = 0x6F; + DPL = 0; + FlProg(&WLBuf[0]); + Flash_Wait(); // In case fail, the chip will generate WDT Reset + CAN_sendAck(ACKNOWLEDGE, 0x04); + } +//------------------------------------------------------------ + else ; + } +} \ No newline at end of file diff --git a/temperature.C b/temperature.C new file mode 100644 index 0000000..46903d6 --- /dev/null +++ b/temperature.C @@ -0,0 +1,522 @@ +#include "temperature.H" +#include +#include + +UnSwSample UnSwSample_1 = {0}; +#define Measure_Period 11000 + +unsigned char romid[MAXNUM][8]; +int RomNum; + +/** + * @brief 计算多个字节序列的校验和 + * @param serial:字节数组指针 + * @param length:字节数组的长度 + * @retval 校验和(CRC) +*/ +#define POLYNOMIAL 0x131 //100110001 +ubyte MY_OW_CRC8(ubyte *serial, ubyte length) +{ + ubyte result = 0x00; + ubyte pDataBuf; + ubyte i; + + while(length--) { + pDataBuf = *serial++; + for(i=0; i<8; i++) { + if((result^(pDataBuf))&0x01) { + result ^= 0x18; + result >>= 1; + result |= 0x80; + } + else { + result >>= 1; + } + pDataBuf >>= 1; + } + } + + return result; +} + + +//非精确延时2*X us,固定误差10us +//@12.000MHz 12T模式 +void Delay_us(uword x) +{ + for (; x > 0; x--) + { + _nop_(); + _nop_(); + } +} + +//////////////////////////////////////////////////////////////////// +// 主机发送 复位脉冲( 大于 480 us 低电平) ,并检查 存在 脉冲 +unsigned char OW_ResetPresence(void) +{ + unsigned char presence; int count=0; + + SFR_PAGE(_pp0, noSST); // switch to page 0 + P3_DIR = P3_DIR | 0x20; // load direction register P3.5切换为输出 + + DQ = 0; // 主机拉低 DQ 总线 + Delay_us(240); // 拉低 DQ 总线 持续 480us + DQ = 1; // 主机释放总线,由上拉电阻拉高 + + SFR_PAGE(_pp0, noSST); // switch to page 0 + P3_DIR = P3_DIR & 0xDF;// load direction register + + Delay_us(40); // 等待 80us 后检查 presence + presence = DQ; // 检查存在 脉冲 + while( presence && (count< 17) ) + { + Delay_us(5); + presence = DQ; + count++; + } + Delay_us(200); // 时序末尾 等待 + return (presence ? FALSE : TRUE); +} // presence =0 时, M6 01 存在 , presence =1 时, M601 不存在 + +//////////////////////////////////////////////////////////////////// +//// READ_BIT – 从 M601 读取 一位数 +unsigned char read_bit(void) +{ + unsigned char res; + + SFR_PAGE(_pp0, noSST); // switch to page 0 + P3_DIR = P3_DIR | 0x20; // load direction register 切换为输出状态 + + DQ = 0; // 主机拉低 DQ 总线 + Delay_us(1); // 拉低 DQ 总线 持续 3us + DQ = 1; // 主机释放 DQ 总线,由上拉电阻拉高 + SFR_PAGE(_pp0, noSST); // switch to page 0 + P3_DIR = P3_DIR & 0xDF;// load direction register + + Delay_us(3); // 等待 10us 确保总线上数据稳定 + + res = DQ; + Delay_us(27); // 时序末尾 等待 + return(res); // 返回读取 数值 +} + +//////////////////////////////////////////////////////////////////// +//// WRITE_BIT – 主机 写一位数据 到 M601 +void write_bit(char bitval) +{ + SFR_PAGE(_pp0, noSST); // switch to page 0 + P3_DIR = P3_DIR | 0x20; // load direction register 切换为输出状态 + + DQ = 0; // 主机拉低 DQ 总线 + Delay_us(2); // 拉低 DQ 总线 持续 5us + if(bitval == 1) DQ =1; // 如果 写 1,此时拉高 DQ 总线 + Delay_us(25); // 如果 写 0,则持续拉低 DQ 总线 60 us + DQ = 1; // 释放 DQ 总线 + Delay_us(5); // (写 0)恢复 时间 10us +} + +///////////////////////////////////////////////////////////////////// +//// READ_BYTE - 从 M601 读取 一字节 数据 +unsigned char OW_ReadByte(void) +{ + unsigned char i, j; + unsigned char value = 0; + for (i = 0;i < 8;i++) { + j = read_bit(); + value = (value) | (j<> i; + temp &= 0x01; // 低位 先行 + write_bit(temp); + } +} + + +/** + * @brief 读芯片寄存器的暂存器组 + * @param scr:字节数组指针, 长度为 @sizeof(M601_SCRATCHPAD_READ) + * @retval 读状态 +*/ +BOOL M601_ReadScratchpad_SkipRom(ubyte *scr) +{ + int i; + +// /*size < sizeof(M601_SCRATCHPAD_READ)*/ + if(OW_ResetPresence() == FALSE) + return FALSE; + + OW_WriteByte(SKIP_ROM); + OW_WriteByte(READ_SCRATCHPAD); + + for(i=0; i < sizeof(M601_SCRATCHPAD_READ); i++) + { + *scr++ = OW_ReadByte(); + } + + return TRUE; +} + +/** + * @brief 写芯片寄存器的暂存器组 + * @param scr:字节数组指针, 长度为 @sizeof(M601_SCRATCHPAD_WRITE) + * @retval 写状态 +**/ +BOOL M601_WriteScratchpad_SkipRom(ubyte *scr) +{ + int i; + + if(OW_ResetPresence() == FALSE) + return FALSE; + + OW_WriteByte(SKIP_ROM); + OW_WriteByte(WRITE_SCRATCHPAD); + + for(i=0; i < sizeof(M601_SCRATCHPAD_WRITE); i++) + { + OW_WriteByte(*scr++); + } + + return TRUE; +} + + + +/** + * @brief 设置周期测量频率和重复性 + * @param mps 要设置的周期测量频率(每秒测量次数),可能为下列其一 + * @arg CFG_MPS_Single :每执行ConvertTemp一次,启动一次温度测量 + * @arg CFG_MPS_Half :每执行ConvertTemp一次,启动每秒0.5次重复测量 + * @arg CFG_MPS_1 :每执行ConvertTemp一次,启动每秒1次重复测量 + * @arg CFG_MPS_2 :每执行ConvertTemp一次,启动每秒2次重复测量 + * @arg CFG_MPS_4 :每执行ConvertTemp一次,启动每秒4次重复测量 + * @arg CFG_MPS_10 :每执行ConvertTemp一次,启动每秒10次重复测量 + * @param repeatability:要设置的重复性值,可能为下列其一 + * @arg CFG_Repeatbility_Low :设置低重复性 + * @arg CFG_Repeatbility_Medium :设置中重复性 + * @arg CFG_Repeatbility_High :设置高重复性 + * @retval 无 +*/ +BOOL SetConfig(ubyte mps, ubyte repeatability) +{ + ubyte scrb[sizeof(M601_SCRATCHPAD_READ)]; + M601_SCRATCHPAD_READ *scr = (M601_SCRATCHPAD_READ *) scrb; + + /*读9个字节。第7字节是系统配置寄存器,第8字节是系统状态寄存器。最后字节是前8个的校验和--CRC。*/ + if(M601_ReadScratchpad_SkipRom(scrb) == FALSE) + { + return FALSE; /*读暂存器组水平*/ + } + + /*计算接收的前8个字节的校验和,并与接收的第9个CRC字节比较。*/ + if(scrb[8] != MY_OW_CRC8(scrb, 8)) + { + return FALSE; /*CRC验证未通过*/ + } + + scr->Cfg &= ~CFG_Repeatbility_Mask; + scr->Cfg |= repeatability; + scr->Cfg &= ~CFG_MPS_Mask; + scr->Cfg |= mps; + + M601_WriteScratchpad_SkipRom(scrb+4); + + return TRUE; +} + +/** + * @brief 把16位二进制补码表示的温度输出转换为以摄氏度为单位的温度读数 + * @param out:有符号的16位二进制温度输出 + * @retval 以摄氏度为单位的浮点温度 +*/ +float M601_OutputtoTemp(int out) +{ + + + + return ((float)(out/256.0) + 40.0); +} + +/** + * @brief 启动温度测量 + * @param 无 + * @retval 单总线发送状态 +*/ +BOOL ConvertTemp(void) +{ + if(OW_ResetPresence() == FALSE) + return FALSE; + + OW_WriteByte(SKIP_ROM); + OW_WriteByte(CONVERT_T); + + return TRUE; +} + +/** + * @brief 等待转换结束后读测量结果。和@ConvertTemp联合使用 + * @param iTemp:返回的16位温度测量结果 + * @retval 读状态 +*/ +BOOL ReadTempWaiting(uword *iTemp) +{ + ubyte scrb[sizeof(M601_SCRATCHPAD_READ)]; + M601_SCRATCHPAD_READ *scr = (M601_SCRATCHPAD_READ *) scrb; + + /*读9个字节。前两个是温度转换结果,最后字节是前8个的校验和--CRC。*/ + if(M601_ReadScratchpad_SkipRom(scrb) == FALSE) + { + UnSwSample_1.bit_data.temperature[1] = 1; + return FALSE; /*读寄存器失败*/ + } + + /*计算接收的前8个字节的校验和,并与接收的第9个CRC字节比较。*/ + UnSwSample_1.bit_data.temperature[1] = scrb[8]; + if(scrb[8] != MY_OW_CRC8(scrb, 8)) + { + + return FALSE; /*CRC验证未通过*/ + } +// UnSwSample_1.bit_data.temperature[1] = *iTemp; + /*将温度测量结果的两个字节合成为16位字。*/ + *iTemp = ((uword)(scr->T_msb) << 8) | scr->T_lsb; + + return TRUE; +} + + + + +/**----------------------------------------------------------------------- + * @brief 主机从芯片读取两个bit(读取顺序:低位->高位) + * @param 无 + * @retval 读取到的两个bit数据 +-------------------------------------------------------------------------*/ +unsigned char OW_Read2Bits(void) +{ + unsigned char i, dq, owdata; + owdata = 0; + + for (i = 0; i < 2; i++) + { + dq = read_bit(); + owdata = (owdata) | (dq << i); + } + return owdata; +} + + +// 搜索算法 +/** + * @brief 搜索总线上接入的所有芯片的ROM ID + * @param 存有ROM ID的二维数组 + * @retval 搜索到的M601的个数 +*/ +int Search_ROM(unsigned char(*romID)[8]) +{ + unsigned char k, l = 0, ConflictBit, m, n; + unsigned char BUFFER[MAXNUM]={0}; + unsigned char ss[64]; + unsigned char s = 0; + int num = 0; + do + { + if (OW_ResetPresence() == 0)//检查总线上从机是否存在 + { + return 0; + } + OW_WriteByte(0xF0);//搜索 ROM 序列号指令 + for (m = 0; m < 8; m++) + { + for (n = 0; n < 8; n++) + { + k = OW_Read2Bits(); //主机从 DQ 总线上读两位数据 + k = k & 0x03; + s = s >> 1; + + if (k == 0x02) + { //此时读到总线上当前数据位为 0 + write_bit(0); //主机写 0, 使总线上数据位为 0 的设备响应 + ss[(m * 8 + n)] = 0; + } + else if (k == 0x01) + { //此时读到总线上当前数据位为 1 + s = s | 0x80; + write_bit(1); //主机写 1, 使总线上数据位为 1 的设备响应 + ss[(m * 8 + n)] = 1; + } + else if (k == 0x00) + {//如果读到 00, 则此位数据有冲突,需选择 + ConflictBit = m * 8 + n + 1; + if (ConflictBit > BUFFER[l]) + { //凡遇到新的差异位,选择 0 + write_bit(0); + ss[(m * 8 + n)] = 0; + BUFFER[++l] = ConflictBit; + } + else if (ConflictBit < BUFFER[l]) + {//凡上次遍历时最后一个走 0 的差异位之前的差异位仍按上次遍历的老路走 + s = s | ((ss[(m * 8 + n)] & 0x01) << 7); + write_bit(ss[(m * 8 + n)]); + } + else if (ConflictBit == BUFFER[l]) + { //凡上次遍历时最后一个走 0 的差异位本次应走 1 + s = s | 0x80; + write_bit(1); + ss[(m * 8 + n)] = 1; + l = l - 1; + } + } + else + { //如果读到 11,说明总线上不存在设备 + return num; //搜索完成 + } + } + romID[num][m] = s; + s = 0; + } + num = num + 1; + } while (BUFFER[l] != 0 && (num < MAXNUM)); + return num; //返回搜索到的 M601 个数 +} + +/** + * @brief 读芯片寄存器的暂存器组 + * @param scr:字节数组指针, 长度为 @sizeof(M601_SCRATCHPAD_READ) + * @param j :search到的芯片的序号,如总线上只有一颗芯片,j赋值0 + * @retval 读状态 +*/ +BOOL M601_ReadScratchpad(unsigned char* scr, unsigned char j) +{ + unsigned char i, k; + + /*size < sizeof(M601_SCRATCHPAD_READ)*/ + if (OW_ResetPresence() == FALSE) + { + return FALSE; + } + +//#ifdef SingleIC +// OW_WriteByte(SKIP_ROM); + +//#else + OW_WriteByte(MATCH_ROM); + for (k = 0; k < 8; k++) + { + OW_WriteByte(romid[j][k]); + } +//#endif + OW_WriteByte(READ_SCRATCHPAD); + + for (i = 0; i < sizeof(M601_SCRATCHPAD_READ); i++) + { + *scr++ = OW_ReadByte(); + } + return TRUE; +} + + +/** + * @brief 等待转换结束后读测量结果。和@ConvertTemp联合使用 + * @param iTemp:返回的16位温度测量结果 + * @param j :search到的芯片的序号,如总线上只有一颗芯片,j赋值0 + * @retval 读状态 +*/ +//BOOL ReadTempWaiting(unsigned short* iTemp, unsigned char j) +//{ +// unsigned char scrb[sizeof(M601_SCRATCHPAD_READ)]; +// M601_SCRATCHPAD_READ* scr = (M601_SCRATCHPAD_READ*)scrb; + +// /*读9个字节。前两个是温度转换结果,最后字节是前8个的校验和--CRC。*/ +// if (M601_ReadScratchpad(scrb, j) == 0) +// { +// return FALSE; /*读寄存器失败*/ +// } + +// /*计算接收的前8个字节的校验和,并与接收的第9个CRC字节比较。*/ +// if (scrb[8] != MY_OW_CRC8(scrb, 8)) +// { +// return FALSE; /*CRC验证未通过*/ +// } + +// /*将温度测量结果的两个字节合成为16位字。*/ +// *iTemp = (unsigned short)scr->T_msb << 8 | scr->T_lsb; + +// return TRUE; +//} + + + +/** + * @brief 启动温度测量并读温 + * @param 无 + * @retval 状态 +*/ + +BOOL GetTemp(void) +{ + static uword intTemp = 0;//定义为静态变量,否则会出现值自己变化 + float fTemp; + int signedInt_f_tem = 0; +//--------------------------------------- +// intTemp = 0; + if(ConvertTemp() == FALSE) return FALSE; + Delay_us(6500); + ReadTempWaiting(&intTemp); + + signedInt_f_tem = (int)intTemp; + + fTemp = ( (float)(signedInt_f_tem)/256.0 ) + 40.0; + + +// fTemp = M601_OutputtoTemp(signedInt_f_tem); +// 将浮点数转换为有符号整型 + signedInt_f_tem = (int)(fTemp*10); +// 温度 有符号整型转成无符号整形 + UnSwSample_1.bit_data.temperature[0] = signedInt_f_tem; + return TRUE; +} +/** + * @brief 测温读温 + * @param 无 + * @retval 状态 +*/ +//BOOL GetTemp(void) +//{ +// float fTemp; +// static unsigned int iTemp[MAXNUM]; +// int i; +// int signedInt_f_tem = 0; +////---------------------------------------------------- +//// memset(romid, 0, sizeof(romid));//清零 +// +// /*总线上所有芯片一起测温*/ +// if(ConvertTemp() == FALSE) return FALSE; +// Delay_us(6500); + +// +// for (i = 0; i < RomNum; i++) //遍历所有芯片 +// { +// iTemp[i] = 0; +// /*读温*/ +// ReadTempWaiting(&iTemp[i], i); + +// fTemp = M601_OutputtoTemp((int)iTemp[i]); //温度输出的浮点数 + +// // 将浮点数转换为有符号整型 +// signedInt_f_tem = (int)(fTemp*10); +// // 温度 有符号整型转成无符号整形 +// UnSwSample_1.bit_data.temperature[i] = (unsigned int)signedInt_f_tem; +// } +// return TRUE; +//} diff --git a/temperature.h b/temperature.h new file mode 100644 index 0000000..6722106 --- /dev/null +++ b/temperature.h @@ -0,0 +1,164 @@ +#ifndef _TEMPERATURE_H_ +#define _TEMPERATURE_H_ + +#include "MAIN.H" + + +#define DQ P3_5 + +///*Bit definition of config register*/ +#define CFG_CLKSTRETCH_Mask 0x20 +#define CFG_MPS_Mask 0x1C +#define CFG_Repeatbility_Mask 0x03 + +#define CFG_ClkStreatch_Disable (0x00 << 5) +#define CFG_ClkStreatch_Enable (0x01 << 5) + +#define CFG_MPS_Single 0x00 +#define CFG_MPS_Half 0x04 +#define CFG_MPS_1 0x08 +#define CFG_MPS_2 0x0C +#define CFG_MPS_4 0x10 +#define CFG_MPS_10 0x14 + +#define CFG_Repeatbility_Low 0x00 +#define CFG_Repeatbility_Medium 0x01 +#define CFG_Repeatbility_High 0x02 + + +#define MAXNUM 5 /*总线级联最大芯片数量*/ + +typedef enum { + FALSE = 0, + TRUE = !FALSE +} BOOL; + + +typedef struct +{ + char Tha_set_lsb; + char Tla_set_lsb; + ubyte Cfg; /*系统配置寄存器, RW*/ +} M601_SCRATCHPAD_WRITE; + + +/* M601/01 ow Commands-------------------------------------------------------*/ +typedef enum +{ + //ROM command + SKIP_ROM = 0xcc, + READ_ROM = 0x33, + MATCH_ROM = 0x55, + SEARCH_ROM = 0xf0, + ALARM_SEARCH = 0xec, + //Function command + CONVERT_T = 0x44, + READ_SCRATCHPAD = 0xbe, + WRITE_SCRATCHPAD = 0x4e, +} M601_OW_CMD; + + + + +/****************** Scratchpad/SRAM ******************/ +/*SRAM scratchpad*/ +typedef struct +{ + ubyte T_lsb; /*The LSB of 温度结果, RO*/ + ubyte T_msb; /*The MSB of 温度结果, RO*/ + ubyte C1_lsb; /*The LSB of 电容通道C1, RO*/ + ubyte C1_msb; /*The MSB of 电容通道C1, Ro*/ + ubyte Tha_set_lsb; + ubyte Tla_set_lsb; + ubyte Cfg; /*系统配置寄存器, RW*/ + ubyte Status; /*系统状态寄存器, RO*/ + ubyte crc_scr; /*CRC for byte0-7, RO*/ +} M601_SCRATCHPAD_READ; + + + + + +//20250116 增加温度采集字节 +typedef struct _StrSwSample +{ + unsigned int emergency_stop_switch : 1; // 通道1,急停开关 + unsigned int High_voltage_switch : 1; // 通道2,高压开关 + unsigned int CH03 : 1; // 通道3 + unsigned int CH04 : 1; // 通道4 + unsigned int CH05 : 1; // 通道5 + unsigned int CH06 : 1; // 通道6 + unsigned int CH07 : 1; // 通道7 + unsigned int CH08 : 1; // 通道8 + unsigned int CH09 : 1; // 通道9 + unsigned int CH10 : 1; // 通道10 + unsigned int CH11 : 1; // 通道11 + unsigned int CH12 : 1; // 通道12 + unsigned int CH13 : 1; // 通道13 + unsigned int CH14 : 1; // 通道14 + unsigned int CH15 : 1; // 通道15 + unsigned int CH16 : 1; // 通道16 + unsigned int CH17 : 1; // 通道17 + unsigned int CH18 : 1; // 通道18 + unsigned int CH19 : 1; // 通道19 + unsigned int CH20 : 1; // 通道20 + unsigned int CH21 : 1; // 通道21 + unsigned int CH22 : 1; // 通道22 + unsigned int CH23 : 1; // 通道23 + unsigned int CH24 : 1; // 通道24 + unsigned int CH25 : 1; // 通道25 + unsigned int CH26 : 1; // 通道26 + unsigned int CH27 : 1; // 通道27 + unsigned int CH28 : 1; // 通道28 + unsigned int CH29 : 1; // 通道29 + unsigned int CH30 : 1; // 通道30 + unsigned int CH31 : 1; // 通道31 + unsigned int CH32 : 1; // 通道32 + +// unsigned int CH33 : 1; // 通道33 +// unsigned int CH34 : 1; // 通道34 +// unsigned int CH35 : 1; // 通道35 +// unsigned int CH36 : 1; // 通道36 +// unsigned int CH37 : 1; // 通道37 +// unsigned int CH38 : 1; // 通道38 +// unsigned int CH39 : 1; // 通道39 +// unsigned int CH40 : 1; // 通道40 +// unsigned int CH41 : 1; // 通道41 +// unsigned int CH42 : 1; // 通道42 +// unsigned int CH43 : 1; // 通道43 +// unsigned int CH44 : 1; // 通道44 +// unsigned int reserve : 4; + + unsigned int temperature[2]; // 温度 + +} StrSwSample; + +typedef union _UnSwSample +{ + StrSwSample bit_data; // 使用定义的结构体变量名 + unsigned char arr[sizeof(StrSwSample)]; // 通过结构体类型确定大小 +} UnSwSample; + + + + +extern UnSwSample UnSwSample_1 ; + + + +BOOL GetTemp(void); +BOOL SetConfig(ubyte mps, ubyte repeatability); + + +int Search_ROM(unsigned char(*romID)[8]); +extern unsigned char romid[MAXNUM][8]; +extern int RomNum; + + + + + + + + +#endif // _TEMPERATURE_H_ diff --git a/user.H b/user.H new file mode 100644 index 0000000..d43f070 --- /dev/null +++ b/user.H @@ -0,0 +1,177 @@ +#ifndef _user_H_ +#define _user_H_ + +#define DF_SwTx 6 +#define DF_SwRx 7 +#define DF_RXTIME 11 +#define DF_SwTxKGF1 8 +#define DF_SwTxKGF2 10 +#define DF_SwTxTemp 12 + +#define DF_SwRxPwm 8 + + +#define dfCmd_01 UnInfCan_1.BitData.D21 //KGF1 +#define dfCmd_02 UnInfCan_1.BitData.D22 //KGF2 +#define dfCmd_03 UnInfCan_1.BitData.D23 //KGF3 +#define dfCmd_04 UnInfCan_1.BitData.D24 //KGF4 +#define dfCmd_05 UnInfCan_1.BitData.D25 //KGF5 +#define dfCmd_06 UnInfCan_1.BitData.D26 //KGF6 +#define dfCmd_07 UnInfCan_1.BitData.D27 //KGF7 +#define dfCmd_08 UnInfCan_1.BitData.D28 //KGF8 +#define dfCmd_09 UnInfCan_1.BitData.D29 //KGF9 +#define dfCmd_10 UnInfCan_1.BitData.D30 //KGF10 +#define dfCmd_11 UnInfCan_1.BitData.D31 //KGF11 +#define dfCmd_12 UnInfCan_1.BitData.D32 //KGF12 +#define dfCmd_13 UnInfCan_1.BitData.D33 //KGF13 +#define dfCmd_14 UnInfCan_1.BitData.D34 //KGF14 +#define dfCmd_15 UnInfCan_1.BitData.D35 //KGF15 +#define dfCmd_16 UnInfCan_1.BitData.D36 //KGF16 + +#define dfOut_01 SwOut09 //KGF1 +#define dfOut_02 SwOut10 //KGF2 +#define dfOut_03 SwOut04 //KGF3 +#define dfOut_04 SwOut03 //KGF4 +#define dfOut_05 SwOut06 //KGF5 +#define dfOut_06 SwOut05 //KGF6 +#define dfOut_07 SwOut15 //KGF7 +#define dfOut_08 SwOut16 //KGF8 +#define dfOut_09 SwOut13 //KGF9 +#define dfOut_10 SwOut14 //KGF10 +#define dfOut_11 SwOut08 //KGF11 +#define dfOut_12 SwOut07 //KGF12 +#define dfOut_13 SwOut02 //KGF13 +#define dfOut_14 SwOut01 //KGF14 +#define dfOut_15 SwOut11 //KGF15 +#define dfOut_16 SwOut12 //KGF16 + +#define dfPwmH 10 //PWM的高电平时间,10,10ms左右,具体需要测试20181227 + + +#define WAKE_UP_PIN P1_5 //高压开关引脚 +#define KGF_PIN P0_0 //唤醒引脚 +#define CAN_PIN P1_6 //唤醒引脚 +#define STOP_PIN P3_6 //急停开关引脚 + + +#define ON 0 //按下 +#define OFF 1 //松开 + +#define FAULT 0 +#define NORMAL 1 + + +#define HERTER_CMD(A) dfOut_05 = A;dfOut_06 = A;dfOut_07 = A;dfOut_08 = A +#define PC_CMD(A) dfOut_09 = A;dfOut_10 = A + +// 状态定义(新增初始检测状态) +typedef enum { + STATE_INIT_CHECK, // 初始检测状态(判断是否<0°C) + STATE_HEATING, // 加热状态 + STATE_COOLING, // 停止加热状态 + STATE_INIT_HEATING +} SystemState; + + + +// 控制参数配置(符合网页1推荐参数设置) +#define TEMP_HYSTERESIS 0.5f // 回差防止震荡[1,3](@ref) +#define INIT_THRESHOLD 0.0f // 初始状态阈值 0 +#define HEATING_STOP 10.0f // 停止加热温度 10 +#define COOLING_RESTART 5.0f // 重启加热温度 5 + + + + + + +// 定义电源状态枚举 +typedef enum { + POWER_STANDBY, + POWER_WORKING, + POWER_EMERGENCY, + POWER_PRE_CHARGE, + POWER_NEUTRAL, + POWER_SLEEP +} PowerState; + + + +// 输出到开关阀模块 +typedef struct _StrInfCanKGFOutput +{ + //----------主机发送命令字0x11000002 -------------------------------------------- + unsigned int KGF01 : 1; // 通道1 + unsigned int KGF02 : 1; // 通道2 + unsigned int KGF03 : 1; // 通道3 + unsigned int KGF04 : 1; // 通道4 + unsigned int KGF05 : 1; // 通道5 + unsigned int KGF06 : 1; // 通道6 + unsigned int KGF07 : 1; // 通道7 + unsigned int KGF08 : 1; // 通道8 + unsigned int KGF09 : 1; // 通道9 + unsigned int KGF10 : 1; // 通道10 + unsigned int KGF11 : 1; // 通道11 + unsigned int KGF12 : 1; // 通道12 + unsigned int KGF13 : 1; // 通道13 + unsigned int KGF14 : 1; // 通道14 + unsigned int KGF15 : 1; // 通道15 + unsigned int KGF16 : 1; // 通道16 + + unsigned int can_rx2 : 8; // 保留 + unsigned int can_rx3 : 8; // 保留 + unsigned int can_rx4 : 8; // 保留 + unsigned int can_rx5 : 8; // 保留 + unsigned int can_period_h : 8; // 发送周期高位 + unsigned int can_period_l : 8; // 发送周期低位 + + //----------发送0x11000003 --------------------------------------------------- + unsigned int pwm_01 : 4; // PWM通道1 + unsigned int pwm_02 : 4; // PWM通道2 + unsigned int pwm_03 : 4; // PWM通道3 + unsigned int pwm_04 : 4; // PWM通道4 + unsigned int pwm_05 : 4; // PWM通道5 + unsigned int pwm_06 : 4; // PWM通道6 + unsigned int pwm_07 : 4; // PWM通道7 + unsigned int pwm_08 : 4; // PWM通道8 + unsigned int pwm_09 : 4; // PWM通道9 + unsigned int pwm_10 : 4; // PWM通道10 + unsigned int pwm_11 : 4; // PWM通道11 + unsigned int pwm_12 : 4; // PWM通道12 + unsigned int pwm_13 : 4; // PWM通道13 + unsigned int pwm_14 : 4; // PWM通道14 + unsigned int pwm_15 : 4; // PWM通道15 + unsigned int pwm_16 : 4; // PWM通道16 +} StrInfCanKGFOutput; + +typedef union _UnInfCanKGFOutput +{ + StrInfCanKGFOutput bit_data; // 使用定义的结构体变量名 + ubyte arr[sizeof(StrInfCanKGFOutput)]; // 通过结构体类型确定大小 +} UnInfCanKGFOutput; + + + + + + +//---外部要使用变量声明--------------------------------------------------------------------- +extern UnSwOut UnSwOut_1; +extern UnInfCan UnInfCan_1; +extern uword CntCan_1; +extern bit FlgCan_1; + +extern ubyte RestartDataFlg1; +extern ubyte RestartDataFlg2; +extern uword RestartDataKGF; + +extern UnInfCanKGFOutput un_inf_can_kgf_output1;//kgf输出 + +void CanRXTX(void); +void SwSample(void); +void LedDr(void); +void RTCProcess(void); +void CanErrorProcess(void); +void CanTransmit(void); +void canSendTo(ubyte index, ubyte *buff); +#endif \ No newline at end of file diff --git a/user.H.bak b/user.H.bak new file mode 100644 index 0000000..6a13b4d --- /dev/null +++ b/user.H.bak @@ -0,0 +1,57 @@ +#ifndef _user_H_ +#define _user_H_ + +#define DF_SwTx 6 +#define DF_SwRx 7 + +#define dfCmd01 UnInfCan_1.BitData.D21 //KGF1 +#define dfCmd02 UnInfCan_1.BitData.D22 //KGF2 +#define dfCmd03 UnInfCan_1.BitData.D23 //KGF3 +#define dfCmd04 UnInfCan_1.BitData.D24 //KGF4 +#define dfCmd05 UnInfCan_1.BitData.D25 //KGF5 +#define dfCmd06 UnInfCan_1.BitData.D26 //KGF6 +#define dfCmd07 UnInfCan_1.BitData.D27 //KGF7 +#define dfCmd08 UnInfCan_1.BitData.D28 //KGF8 +#define dfCmd09 UnInfCan_1.BitData.D29 //KGF9 +#define dfCmd10 UnInfCan_1.BitData.D30 //KGF10 +#define dfCmd11 UnInfCan_1.BitData.D31 //KGF11 +#define dfCmd12 UnInfCan_1.BitData.D32 //KGF12 +#define dfCmd13 UnInfCan_1.BitData.D33 //KGF13 +#define dfCmd14 UnInfCan_1.BitData.D34 //KGF14 +#define dfCmd15 UnInfCan_1.BitData.D35 //KGF15 +#define dfCmd16 UnInfCan_1.BitData.D36 //KGF16 + +#define dfOut01 SwOut09 //KGF1 +#define dfOut02 SwOut10 //KGF2 +#define dfOut03 SwOut04 //KGF3 +#define dfOut04 SwOut03 //KGF4 +#define dfOut05 SwOut06 //KGF5 +#define dfOut06 SwOut05 //KGF6 +#define dfOut07 SwOut15 //KGF7 +#define dfOut08 SwOut16 //KGF8 +#define dfOut09 SwOut13 //KGF9 +#define dfOut10 SwOut14 //KGF10 +#define dfOut11 SwOut08 //KGF11 +#define dfOut12 SwOut07 //KGF12 +#define dfOut13 SwOut02 //KGF13 +#define dfOut14 SwOut01 //KGF14 +#define dfOut15 SwOut11 //KGF15 +#define dfOut16 SwOut12 //KGF16 + + + + +//---外部要使用变量声明--------------------------------------------------------------------- +extern UnSwOut UnSwOut_1; +extern UnInfCan UnInfCan_1; +extern uword CntCan_1; +extern bit FlgCan_1; + +void CanRXTX(void); +void SwSample(void); +void LedDr(void); +void RTCProcess(void); +void CanErrorProcess(void); +void CanTransmit(void); + +#endif \ No newline at end of file