Commit 803b3871 authored by 崔立宝's avatar 崔立宝

TCanInit时间超标问题修改+取消0x18FFOA17外发(EF01报文矩阵里没有)

parent 98586541
OPEN source 0 0 49 100 OPEN source 0 0 56 100
Source < attributes TOOLTIP on,TOOLTIP_FORMAT signed,TOOLTIP_MODE details,FREEZE off,MARKS off Source < attributes TOOLTIP on,TOOLTIP_FORMAT signed,TOOLTIP_MODE details,FREEZE off,MARKS off
OPEN assembly 60 0 40 31 OPEN assembly 60 0 40 31
Assembly < attributes ADR on,CODE off,ABSADR on,SYMB off,FORMAT Auto,FREEZE off,TOPPC 0xF780DB Assembly < attributes ADR on,CODE off,ABSADR on,SYMB off,FORMAT Auto,FREEZE off,TOPPC 0xFFFF
OPEN procedure 0 39 60 17 OPEN procedure 0 39 60 17
Procedure < attributes VALUES on,TYPES off Procedure < attributes VALUES on,TYPES off
OPEN register 60 31 40 25 OPEN register 60 31 40 25
...@@ -10,7 +10,7 @@ OPEN memory 60 56 40 22 ...@@ -10,7 +10,7 @@ OPEN memory 60 56 40 22
Memory < attributes FORMAT hex,COMPLEMENT None,WORD 1,ASC on,ADR on,MODE automatic,UPDATERATE 10,SHOW_ADDRESSSPACE 0,ADDRESS 0x80 Memory < attributes FORMAT hex,COMPLEMENT None,WORD 1,ASC on,ADR on,MODE automatic,UPDATERATE 10,SHOW_ADDRESSSPACE 0,ADDRESS 0x80
OPEN data 0 56 60 22 OPEN data 0 56 60 22
Data:1 < attributes SCOPE global,COMPLEMENT None,FORMAT Symb,MODE automatic,SORT NotSort,UPDATERATE 10,NAMEWIDTH 16 Data:1 < attributes SCOPE global,COMPLEMENT None,FORMAT Symb,MODE automatic,SORT NotSort,UPDATERATE 10,NAMEWIDTH 16
OPEN data 50 1 70 98 OPEN data 30 0 70 98
Data:2 < attributes SCOPE local,COMPLEMENT None,FORMAT Symb,MODE periodical,SORT NotSort,UPDATERATE 1,NAMEWIDTH 16 Data:2 < attributes SCOPE local,COMPLEMENT None,FORMAT Symb,MODE periodical,SORT NotSort,UPDATERATE 1,NAMEWIDTH 16
OPEN command 60 78 40 22 OPEN command 60 78 40 22
Command < attributes CACHESIZE 1000 Command < attributes CACHESIZE 1000
......
/****************************************************************************** /******************************************************************************
?? ?? ????CLOCK.c 文 件 名:CLOCK.c
????????????????????????? 功能描述:时钟系统初始化库文件
?? ??????? 作 者:张暄
?? ????V1.0 版 本:V1.0
?? ???2016.11.2 日 期:2016.11.2
******************************************************************************/ ******************************************************************************/
#include "CRG.h" #include "CRG.h"
...@@ -23,24 +23,24 @@ extern void Data_Mileage_Rolling_Counter_Update_ISR(void); ...@@ -23,24 +23,24 @@ extern void Data_Mileage_Rolling_Counter_Update_ISR(void);
extern void Data_Fuel_Consumption_Count_ISR(void); extern void Data_Fuel_Consumption_Count_ISR(void);
/****************************************************************************** /******************************************************************************
????????WDT_Init 函数名:WDT_Init
?? ????????????? 功 能:看门狗初始化
?? ?????? 参 数:无
????????? 返回值:无
******************************************************************************/ ******************************************************************************/
void WDT_Init(void) void WDT_Init(void)
{ {
//???????? //配置看门狗
wdt_reset(); wdt_reset();
COPCTL = WDT_PERIOD; //??????????????? COPCTL = WDT_PERIOD; //配置看门狗定时周期
// PLLCTL_PCE = 1; //???????Pseudo Stop??????????? // PLLCTL_PCE = 1; //看门狗在Pseudo Stop模式下持续运行
} }
/****************************************************************************** /******************************************************************************
????????Clock_Init 函数名:Clock_Init
?? ????????????? 功 能:时钟系统初始化
?? ?????? 参 数:无
????????? 返回值:无
******************************************************************************/ ******************************************************************************/
void Clock_Init(void) void Clock_Init(void)
{ {
...@@ -53,10 +53,10 @@ void Clock_Init(void) ...@@ -53,10 +53,10 @@ void Clock_Init(void)
uint8_t Result; ; uint8_t Result; ;
//???OSCCLK???????? //使用OSCCLK作为系统时钟
CLKSEL = 0x00; CLKSEL = 0x00;
//??????????????? //计算时钟配置寄存器值
Result = 0; Result = 0;
REFDIVVal = 0; REFDIVVal = 0;
while ((REFDIVVal < 64) && (Result == 0)) while ((REFDIVVal < 64) && (Result == 0))
...@@ -88,7 +88,7 @@ void Clock_Init(void) ...@@ -88,7 +88,7 @@ void Clock_Init(void)
if (POSTDIVVal == 0) if (POSTDIVVal == 0)
{ {
/*======================================================== /*========================================================
??POSTDIV?0?,fPLL????fVCO 当POSTDIV为0时,fPLL等于fVCO
fPLL fVCO fPLL fVCO
fPLL = fVCO fBUS = ------ = ------ fPLL = fVCO fBUS = ------ = ------
2 2 2 2
...@@ -101,7 +101,7 @@ void Clock_Init(void) ...@@ -101,7 +101,7 @@ void Clock_Init(void)
else else
{ {
/*======================================================== /*========================================================
??POSTDIV???0? 当POSTDIV不为0时
fVCO fPLL fVCO fVCO fPLL fVCO
fPLL = ------------- fBUS = ------ = ------------- fPLL = ------------- fBUS = ------ = -------------
2 x POSTDIV 2 4 x POSTDIV 2 x POSTDIV 2 4 x POSTDIV
...@@ -123,9 +123,9 @@ void Clock_Init(void) ...@@ -123,9 +123,9 @@ void Clock_Init(void)
REFDIVVal++; REFDIVVal++;
} }
while (Result == 0); //????????????BUSCLK,????????? while (Result == 0); //无法生成所需的BUSCLK,在这里停机
//?????????????? //设置时钟配置寄存器
PLLCTL_SCME = 0; PLLCTL_SCME = 0;
PLLCTL_CME = 1; PLLCTL_CME = 1;
...@@ -147,7 +147,7 @@ void Clock_Init(void) ...@@ -147,7 +147,7 @@ void Clock_Init(void)
POSTDIV = POSTDIVVal; POSTDIV = POSTDIVVal;
while (!CRGFLG_LOCK); //??? fVCO ?????? while (!CRGFLG_LOCK); //等待 fVCO 输出稳定
while (!FSTAT_CCIF); /* wait for FTM reset to complete */ while (!FSTAT_CCIF); /* wait for FTM reset to complete */
...@@ -157,33 +157,33 @@ void Clock_Init(void) ...@@ -157,33 +157,33 @@ void Clock_Init(void)
//FPROT = 0x9C; // Protect 0x7F_C000 to 0x7F_FFFF (pages FD and FF) //FPROT = 0x9C; // Protect 0x7F_C000 to 0x7F_FFFF (pages FD and FF)
DFPROT = 0xFF; /* Disable any protection set on DFlash */ DFPROT = 0xFF; /* Disable any protection set on DFlash */
CLKSEL_PLLSEL = 1; //???PLLCLK???????? CLKSEL_PLLSEL = 1; //选择PLLCLK作为系统时钟
#if CRG_USE_PSEUDO_STOP_MODE #if CRG_USE_PSEUDO_STOP_MODE
CLKSEL_PSTP = 1; //Oscillator??Stop???????????(Pseudo Stop) CLKSEL_PSTP = 1; //Oscillator在Stop模式下持续运行(Pseudo Stop)
#else #else
CLKSEL_PSTP = 0; //Oscillator??Stop??????????(Full Stop) CLKSEL_PSTP = 0; //Oscillator在Stop模式下停止运行(Full Stop)
#endif #endif
CRG_STOP_MODE = 0; //??????????,????????? CRG_STOP_MODE = 0; //系统正常运行,不在停机模式
} }
/****************************************************************************** /******************************************************************************
????????Enter_Stop_Mode 函数名:Enter_Stop_Mode
?? ???????????? 功 能:进入停机模式
?? ?????? 参 数:无
????????? 返回值:无
******************************************************************************/ ******************************************************************************/
void Enter_Stop_Mode(void) void Enter_Stop_Mode(void)
{ {
CRG_STOP_MODE = 1; //????????? CRG_STOP_MODE = 1; //进入停机模式
asm ANDCC #0x7F; asm ANDCC #0x7F;
asm STOP; asm STOP;
} }
/****************************************************************************** /******************************************************************************
????????RTI_Init 函数名:RTI_Init
?? ????????RTI 功 能:初始化RTI
?? ?????? 参 数:无
????????? 返回值:无
******************************************************************************/ ******************************************************************************/
void RTI_Init(void) void RTI_Init(void)
{ {
...@@ -199,25 +199,25 @@ void RTI_Init(void) ...@@ -199,25 +199,25 @@ void RTI_Init(void)
RealTimeClock.LeapYear = Determine_Leap_Year(RealTimeClock.Year); RealTimeClock.LeapYear = Determine_Leap_Year(RealTimeClock.Year);
PLLCTL_PRE = 1; //1 RTI continues running during Pseudo Stop Mode. PLLCTL_PRE = 1; //1 RTI continues running during Pseudo Stop Mode.
//Real Time ?????????? //Real Time 时钟频率设置
RTICTL = 0xDF; //Real Time = 8M / 800000 = 10HZ (100MS) RTICTL = 0xDF; //Real Time = 8M / 800000 = 10HZ (100MS)
CRGINT_RTIE = 1; //??Real Time ?? CRGINT_RTIE = 1; //开Real Time 中断
} }
/****************************************************************************** /******************************************************************************
????????RTI_Timing_Service 函数名:RTI_Timing_Service
?? ???RTI????????? 功 能:RTI实时计时服务
?? ?????? 参 数:无
????????? 返回值:无
******************************************************************************* *******************************************************************************
? ?????????????100ms????????? 注 意:该服务函数必须每100ms被调用一次
******************************************************************************/ ******************************************************************************/
void RTI_Timing_Service(void) void RTI_Timing_Service(void)
{ {
uint16_t Counter; uint16_t Counter;
uint16_t SecInc; uint16_t SecInc;
if (RealTimeClock.Year != RealTimeClock.BackupYear) //?????????? if (RealTimeClock.Year != RealTimeClock.BackupYear) //曾经修改过年
{ {
RealTimeClock.LeapYear = Determine_Leap_Year(RealTimeClock.Year); RealTimeClock.LeapYear = Determine_Leap_Year(RealTimeClock.Year);
RealTimeClock.BackupYear = RealTimeClock.Year; RealTimeClock.BackupYear = RealTimeClock.Year;
...@@ -309,10 +309,10 @@ void RTI_Timing_Service(void) ...@@ -309,10 +309,10 @@ void RTI_Timing_Service(void)
} }
/****************************************************************************** /******************************************************************************
????????Determine_Leap_Year 函数名:Determine_Leap_Year
?? ????????? 功 能:闰年检测
?? ????Year???? 参 数:Year:年
???????1 - ?????? 0 -???????? 返回值:1 - 是闰年 0 -不是闰年
******************************************************************************/ ******************************************************************************/
uint8_t Determine_Leap_Year(uint16_t Year) uint8_t Determine_Leap_Year(uint16_t Year)
{ {
...@@ -333,12 +333,12 @@ extern uint8_t DiagnosticReceived; ...@@ -333,12 +333,12 @@ extern uint8_t DiagnosticReceived;
#pragma CODE_SEG __NEAR_SEG NON_BANKED #pragma CODE_SEG __NEAR_SEG NON_BANKED
/****************************************************************************** /******************************************************************************
????????RTI_ISR 函数名:RTI_ISR
?? ???RTI??????? 功 能:RTI中断服务函数
RTI?100ms???????,??????????????????1 RTI每100ms发生中断后,其滚动计数器会自动加1
RTI??????????????????????? RTI中断还可以将处理器从睡眠中唤醒
?? ?????? 参 数:无
????????? 2017??5??27??16:47:20 返回值:无 2017年5月27日16:47:20
******************************************************************************/ ******************************************************************************/
void interrupt RTI_ISR(void) void interrupt RTI_ISR(void)
...@@ -363,6 +363,6 @@ void interrupt RTI_ISR(void) ...@@ -363,6 +363,6 @@ void interrupt RTI_ISR(void)
DiagnosticReceived--; DiagnosticReceived--;
Data_Mileage_Rolling_Counter_Update_ISR(); Data_Mileage_Rolling_Counter_Update_ISR();
CRGFLG_RTIF = 1; //???1??0??? CRGFLG_RTIF = 1; //通过写1清0中断标
} }
#pragma CODE_SEG DEFAULT #pragma CODE_SEG DEFAULT
...@@ -2347,14 +2347,14 @@ static const CANMsgAttrStruct CANMsgAttrTable[] = ...@@ -2347,14 +2347,14 @@ static const CANMsgAttrStruct CANMsgAttrTable[] =
{ BCM_PEPS_MSG1, CANMsg08FF00DD.Msg, 8, 8, CAN_MSG_Rx, CAN_MSG_CYCLE, 2000, 0, &CANMsg08FF00DDStatus, CANMsg08FF00DDInit, CANMsg08FF00DDTimeout, CANMsg08FF00DDMask,}, { BCM_PEPS_MSG1, CANMsg08FF00DD.Msg, 8, 8, CAN_MSG_Rx, CAN_MSG_CYCLE, 2000, 0, &CANMsg08FF00DDStatus, CANMsg08FF00DDInit, CANMsg08FF00DDTimeout, CANMsg08FF00DDMask,},
//网络管理报文必须放在这个位置,与诊断的28服务关联 //网络管理报文必须放在这个位置,与诊断的28服务关联
{ NWM_ICM, CANMsg18FEF717.Msg, 8, 8, CAN_MSG_Tx, CAN_MSG_CYCLE, 1000, 0, &CANMsg18FEF717Status, CANMsg18FEF717Init, CANMsg18FEF717Timeout, CANMsg18FEF717Mask,}, { NWM_ICM, CANMsg18FEF717.Msg, 8, 8, CAN_MSG_Tx, CAN_MSG_CYCLE, 1000, 1, &CANMsg18FEF717Status, CANMsg18FEF717Init, CANMsg18FEF717Timeout, CANMsg18FEF717Mask,},
{ TCO1, CANMsg18FE6CEE.Msg, 8, 8, CAN_MSG_Tx, CAN_MSG_CYCLE, 50, 3, &CANMsg18FE6CEEStatus, CANMsg18FE6CEEInit, CANMsg18FE6CEETimeout, CANMsg18FE6CEEMask,}, { TCO1, CANMsg18FE6CEE.Msg, 8, 8, CAN_MSG_Tx, CAN_MSG_CYCLE, 50, 3, &CANMsg18FE6CEEStatus, CANMsg18FE6CEEInit, CANMsg18FE6CEETimeout, CANMsg18FE6CEEMask,},
{ VDHR, CANMsg18FEC117.Msg, 8, 8, CAN_MSG_Tx, CAN_MSG_CYCLE, 1000, 11, &CANMsg18FEC117Status, CANMsg18FEC117Init, CANMsg18FEC117Timeout, CANMsg18FEC117Mask,}, { VDHR, CANMsg18FEC117.Msg, 8, 8, CAN_MSG_Tx, CAN_MSG_CYCLE, 1000, 11, &CANMsg18FEC117Status, CANMsg18FEC117Init, CANMsg18FEC117Timeout, CANMsg18FEC117Mask,},
{ AIR1, CANMsg18FEAE17.Msg, 8, 8, CAN_MSG_Tx, CAN_MSG_CYCLE, 1000, 13, &CANMsg18FEAE17Status, CANMsg18FEAE17Init, CANMsg18FEAE17Timeout, CANMsg18FEAE17Mask,}, { AIR1, CANMsg18FEAE17.Msg, 8, 8, CAN_MSG_Tx, CAN_MSG_CYCLE, 1000, 13, &CANMsg18FEAE17Status, CANMsg18FEAE17Init, CANMsg18FEAE17Timeout, CANMsg18FEAE17Mask,},
{ ETCS, CANMsg18FEC317.Msg, 8, 8, CAN_MSG_Tx, CAN_MSG_CYCLE, 100, 7, &CANMsg18FEC317Status, CANMsg18FEC317Init, CANMsg18FEC317Timeout, CANMsg18FEC317Mask,}, { ETCS, CANMsg18FEC317.Msg, 8, 8, CAN_MSG_Tx, CAN_MSG_CYCLE, 100, 7, &CANMsg18FEC317Status, CANMsg18FEC317Init, CANMsg18FEC317Timeout, CANMsg18FEC317Mask,},
{ ICM_1, CANMsg18FE8E17.Msg, 8, 8, CAN_MSG_Tx, CAN_MSG_CYCLE, 1000, 17, &CANMsg18FE8E17Status, CANMsg18FE8E17Init, CANMsg18FE8E17Timeout, CANMsg18FE8E17Mask,}, { ICM_1, CANMsg18FE8E17.Msg, 8, 8, CAN_MSG_Tx, CAN_MSG_CYCLE, 1000, 17, &CANMsg18FE8E17Status, CANMsg18FE8E17Init, CANMsg18FE8E17Timeout, CANMsg18FE8E17Mask,},
{ ICM_2, CANMsg18FEF117.Msg, 8, 8, CAN_MSG_Tx, CAN_MSG_CYCLE, 100, 3, &CANMsg18FEF117Status, CANMsg18FEF117Init, CANMsg18FEF117Timeout, CANMsg18FEF117Mask,}, { ICM_2, CANMsg18FEF117.Msg, 8, 8, CAN_MSG_Tx, CAN_MSG_CYCLE, 100, 3, &CANMsg18FEF117Status, CANMsg18FEF117Init, CANMsg18FEF117Timeout, CANMsg18FEF117Mask,},
{ ICM_3, CANMsg18FF0A17.Msg, 8, 8, CAN_MSG_Tx, CAN_MSG_CYCLE, 100, 11, &CANMsg18FF0A17Status, CANMsg18FF0A17Init, CANMsg18FF0A17Timeout, CANMsg18FF0A17Mask,}, //{ ICM_3, CANMsg18FF0A17.Msg, 8, 8, CAN_MSG_Tx, CAN_MSG_CYCLE, 100, 11, &CANMsg18FF0A17Status, CANMsg18FF0A17Init, CANMsg18FF0A17Timeout, CANMsg18FF0A17Mask,},
{ ICM_4, CANMsg18FEFC17.Msg, 8, 8, CAN_MSG_Tx, CAN_MSG_CYCLE, 1000, 9, &CANMsg18FEFC17Status, CANMsg18FEFC17Init, CANMsg18FEFC17Timeout, CANMsg18FEFC17Mask,}, { ICM_4, CANMsg18FEFC17.Msg, 8, 8, CAN_MSG_Tx, CAN_MSG_CYCLE, 1000, 9, &CANMsg18FEFC17Status, CANMsg18FEFC17Init, CANMsg18FEFC17Timeout, CANMsg18FEFC17Mask,},
{ NWM_TBOX, CANMsg18EFCD27.Msg, 8, 8, CAN_MSG_Rx, CAN_MSG_CYCLE, 10000, 0, &CANMsg18EFCD27Status, CANMsg18EFCD27Init, CANMsg18EFCD27Timeout, CANMsg18EFCD27Mask,}, { NWM_TBOX, CANMsg18EFCD27.Msg, 8, 8, CAN_MSG_Rx, CAN_MSG_CYCLE, 10000, 0, &CANMsg18EFCD27Status, CANMsg18EFCD27Init, CANMsg18EFCD27Timeout, CANMsg18EFCD27Mask,},
...@@ -2397,7 +2397,7 @@ static const CANMsgAttrStruct CANMsgAttrTable[] = ...@@ -2397,7 +2397,7 @@ static const CANMsgAttrStruct CANMsgAttrTable[] =
{ EMS_51C, CANMsg18FEC600.Msg, 8, 8, CAN_MSG_Rx, CAN_MSG_CYCLE, 5000, 0, &CANMsg18FEC600Status, CANMsg18FEC600Init, CANMsg18FEC600Timeout, CANMsg18FEC600Mask,}, { EMS_51C, CANMsg18FEC600.Msg, 8, 8, CAN_MSG_Rx, CAN_MSG_CYCLE, 5000, 0, &CANMsg18FEC600Status, CANMsg18FEC600Init, CANMsg18FEC600Timeout, CANMsg18FEC600Mask,},
/*==========================================================================================================================================================================*/ /*==========================================================================================================================================================================*/
}; };
#define CAN_TX_MSG_NUM 9 #define CAN_TX_MSG_NUM 8
#define CAN_RX_MSG_NUM 42 #define CAN_RX_MSG_NUM 42
#endif #endif
/****************************************************************************** /******************************************************************************
?? ?? ????Communication_Over_CAN.h 文 件 名:Communication_Over_CAN.h
??????????????CAN????????????????????? 功能描述:基于CAN总线的信号收发函数库头文件
?? ??????? 作 者:张暄
?? ????V1.3 版 本:V1.3
?? ???2017.5.31 日 期:2017.5.31
******************************************************************************/ ******************************************************************************/
#ifndef _COMMUNICATION_OVER_CAN_ #ifndef _COMMUNICATION_OVER_CAN_
...@@ -15,35 +15,35 @@ ...@@ -15,35 +15,35 @@
#include "CAN_Communication_Matrix.h" #include "CAN_Communication_Matrix.h"
/****************************************************************************** /******************************************************************************
CAN?????????? CAN通信参数配置
******************************************************************************/ ******************************************************************************/
#define CoCAN_RX_MSG_FIFO_MAX_DEPTH 16 //????FIFO??? #define CoCAN_RX_MSG_FIFO_MAX_DEPTH 16 //接收FIFO深度
#define CoCAN_MSG_NUM_CHECK 0 //???????????(Debug??) #define CoCAN_MSG_NUM_CHECK 0 //报文数量检查(Debug用)
#define CoCAN_TOTAL_MSG_NUM (sizeof(CANMsgAttrTable) / sizeof(CANMsgAttrStruct)) #define CoCAN_TOTAL_MSG_NUM (sizeof(CANMsgAttrTable) / sizeof(CANMsgAttrStruct))
/****************************************************************************** /******************************************************************************
CAN??????????? CAN通信收发使能状态
******************************************************************************/ ******************************************************************************/
#define CoCAN_DISABLE 0 #define CoCAN_DISABLE 0
#define COCAN_PSEUDO_DISABLE 1 #define COCAN_PSEUDO_DISABLE 1
#define CoCAN_ENABLE 2 #define CoCAN_ENABLE 2
/****************************************************************************** /******************************************************************************
CAN????????????? CAN报文发送请求状态
******************************************************************************/ ******************************************************************************/
#define CoCAN_TX_IDLE 0 #define CoCAN_TX_IDLE 0
#define CoCAN_TX_REQ 1 #define CoCAN_TX_REQ 1
#define CoCAN_TX_ON 2 #define CoCAN_TX_ON 2
/****************************************************************************** /******************************************************************************
CAN????????????? CAN报文发送请求状态
******************************************************************************/ ******************************************************************************/
#define CoCAN_MODE_NORMAL 0 #define CoCAN_MODE_NORMAL 0
#define CoCAN_MODE_INIT 1 #define CoCAN_MODE_INIT 1
/****************************************************************************** /******************************************************************************
CAN???????FIFO?? CAN报文发送FIFO结构
******************************************************************************/ ******************************************************************************/
typedef struct typedef struct
{ {
...@@ -54,7 +54,7 @@ typedef struct ...@@ -54,7 +54,7 @@ typedef struct
} CoCANTxMsgFIFOStruct; } CoCANTxMsgFIFOStruct;
/****************************************************************************** /******************************************************************************
CAN???????FIFO?? CAN报文接收FIFO结构
******************************************************************************/ ******************************************************************************/
typedef struct typedef struct
{ {
...@@ -66,61 +66,61 @@ typedef struct ...@@ -66,61 +66,61 @@ typedef struct
typedef struct typedef struct
{ {
CoCANMsgStruct Msg[CoCAN_RX_MSG_FIFO_MAX_DEPTH]; CoCANMsgStruct Msg[CoCAN_RX_MSG_FIFO_MAX_DEPTH];
uint8_t Iptr; //???????? uint8_t Iptr; //进队列位置
uint8_t Optr; //???????? uint8_t Optr; //出队列位置
uint8_t Depth; uint8_t Depth;
} CoCANRxMsgFIFOStruct; } CoCANRxMsgFIFOStruct;
/****************************************************************************** /******************************************************************************
CAN????????????? CAN报文快速查找表结构
******************************************************************************/ ******************************************************************************/
/*** ????????????? ***/ /*** 发送报文查找表结构 ***/
typedef struct typedef struct
{ {
uint32_t Identifier; //????ID uint32_t Identifier; //报文ID
uint16_t Offset; //????????????? uint16_t Offset; //报文发送时间偏移
uint16_t Cycle; //??????????? uint16_t Cycle; //报文发送周期
uint8_t Rsvd; //???? uint8_t Rsvd; //保留
uint8_t Index; //??????????????????????????,0xFF?????????????? uint8_t Index; //发送报文对应在周期性报文表中的序号,0xFF表示非周期性报文
uint8_t TxReq; //???????? uint8_t TxReq; //发送请求
uint8_t DLC; //??????? uint8_t DLC; //报文长度
volatile uint8_t *pMsg; //???????? volatile uint8_t *pMsg; //报文寄存器
const uint8_t *pInit; //????????? const uint8_t *pInit; //报文初始化值
volatile uint8_t *pStatus; //??????? volatile uint8_t *pStatus; //状态寄存器
} CoCANTxMsgIDLookupStruct; } CoCANTxMsgIDLookupStruct;
/*** ????????????? ***/ /*** 接收报文查找表结构 ***/
typedef struct typedef struct
{ {
uint32_t Identifier; //????ID uint32_t Identifier; //报文ID
uint16_t Cycle; //??????????,????????? uint16_t Cycle; //报文超时周期,用于掉线判断
uint8_t Rsvd; //???? uint8_t Rsvd; //保留
uint8_t Index; //??????????????????????????,0xFF?????????????? uint8_t Index; //接收报文对应在周期性报文表中的序号,0xFF表示非周期性报文
uint8_t DLCMax; //???????? uint8_t DLCMax; //报文最大长度
uint8_t DLCMin; //?????????? uint8_t DLCMin; //报文最小长度
volatile uint8_t *pMsg; //???????? volatile uint8_t *pMsg; //报文寄存器
const uint8_t *pInit; //????????? const uint8_t *pInit; //报文初始化值
const uint8_t *pTimeOut; //???????? const uint8_t *pTimeOut; //报文掉线值
const uint8_t *pMask; //????????(????????????????????????) const uint8_t *pMask; //报文屏蔽位(决定某一位在掉线时是否更新为掉线值)
volatile uint8_t *pStatus; //??????? volatile uint8_t *pStatus; //状态寄存器
} CoCANRxMsgIDLookupStruct; } CoCANRxMsgIDLookupStruct;
/****************************************************************************** /******************************************************************************
CAN?????????????? CAN周期性报文管理结构
******************************************************************************/ ******************************************************************************/
typedef struct typedef struct
{ {
uint8_t TxNum; //???????????????? uint8_t TxNum; //周期性发送报文数量
uint8_t TxIndex[CAN_TX_MSG_NUM]; //????????????????????????? uint8_t TxIndex[CAN_TX_MSG_NUM]; //报文对应在发送报文查找表中的序号
uint16_t TxTimer[CAN_TX_MSG_NUM]; //??????????? uint16_t TxTimer[CAN_TX_MSG_NUM]; //发送报文定时器
uint8_t RxNum; //???????????????? uint8_t RxNum; //周期性发送报文数量
uint8_t RxIndex[CAN_RX_MSG_NUM]; //??????????????????????? uint8_t RxIndex[CAN_RX_MSG_NUM]; //报文对应在发送报文查找表中的序号
uint16_t RxTimer[CAN_RX_MSG_NUM]; //???????????,????????? uint16_t RxTimer[CAN_RX_MSG_NUM]; //接收报文定时器,用于掉线判断
} CoCANCycleMsgStruct; } CoCANCycleMsgStruct;
/****************************************************************************** /******************************************************************************
CAN??????? CAN通信控制结构
******************************************************************************/ ******************************************************************************/
typedef struct typedef struct
{ {
...@@ -132,9 +132,9 @@ typedef struct ...@@ -132,9 +132,9 @@ typedef struct
}CoCANCtrlStruct; }CoCANCtrlStruct;
extern CoCANCtrlStruct CoCANCtrl; extern CoCANCtrlStruct CoCANCtrl;
/****************************************************************************** /******************************************************************************
???????? 函数声明
******************************************************************************/ ******************************************************************************/
void CoCAN_L_Data_Indication(uint32_t Identifier, uint8_t DLC, uint8_t *Data); //????????????????? void CoCAN_L_Data_Indication(uint32_t Identifier, uint8_t DLC, uint8_t *Data); //必须由下一层函数引用
#define CoCAN_L_Data_Request(Identifier, DLC, Data) MSCAN0_L_Data_Request(Identifier, DLC, Data, 2) #define CoCAN_L_Data_Request(Identifier, DLC, Data) MSCAN0_L_Data_Request(Identifier, DLC, Data, 2)
...@@ -147,7 +147,7 @@ void CoCAN_Tx_Enable(uint8_t En); ...@@ -147,7 +147,7 @@ void CoCAN_Tx_Enable(uint8_t En);
uint8_t CoCAN_Search_Tx_Msg(uint32_t Identifier); uint8_t CoCAN_Search_Tx_Msg(uint32_t Identifier);
uint8_t CoCAN_Search_Rx_Msg(uint32_t Identifier); uint8_t CoCAN_Search_Rx_Msg(uint32_t Identifier);
void CoCAN_Signal_Update_Service(void); //?????1ms????????? void CoCAN_Signal_Update_Service(void); //必须每1ms被调用一次
void CoCAN_Transmit_Message(uint32_t Identifier); void CoCAN_Transmit_Message(uint32_t Identifier);
void CoCAN_Modify_Tx_Msg_Cycle(uint32_t Identifier, uint16_t Cycle); void CoCAN_Modify_Tx_Msg_Cycle(uint32_t Identifier, uint16_t Cycle);
......
...@@ -69,7 +69,7 @@ void Power_Management_Init(void) ...@@ -69,7 +69,7 @@ void Power_Management_Init(void)
g_Power_St = IGN_Default; //20200301 g_Power_St = IGN_Default; //20200301
for (i=0; i<16; i++) for (i=0; i<16; i++)
{ {
NVMConfig3300.Data[i]=NVMDefault3300.Data[i]; NVMConfig3300.Data[i] = NVMDefault3300.Data[i];
} }
} }
......
This diff is collapsed.
...@@ -11,7 +11,7 @@ Layout=C_layout.hwl ...@@ -11,7 +11,7 @@ Layout=C_layout.hwl
LoadDialogOptions=AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main" LoadDialogOptions=AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main"
CPU=HC12 CPU=HC12
AEFWarningDialog=FALSE AEFWarningDialog=FALSE
MainFrame=2,3,-32000,-32000,-1,-1,2158,69,3544,905 MainFrame=2,3,-1,-1,-1,-1,2158,69,3544,905
TOOLBAR=57600 57601 32795 0 57635 57634 57637 0 57671 57669 0 32777 32776 32782 32780 32781 32778 0 32806 TOOLBAR=57600 57601 32795 0 57635 57634 57637 0 57671 57669 0 32777 32776 32782 32780 32781 32778 0 32806
Configuration=TBDML.hwc Configuration=TBDML.hwc
Statusbar=1 Statusbar=1
...@@ -69,7 +69,7 @@ ISRDISABLEDSTEP=1 ...@@ -69,7 +69,7 @@ ISRDISABLEDSTEP=1
[TBDML] [TBDML]
COMSETTINGS=SETCOMM DRIVER NOPROTOCOL NOPERIODICAL COMSETTINGS=SETCOMM DRIVER NOPROTOCOL NOPERIODICAL
NV_PARAMETER_FILE= NV_PARAMETER_FILE=C:\Program Files (x86)\Freescale\CWS12v5.1\prog\FPP\mcu01C9.fpp
NV_SAVE_WSP=0 NV_SAVE_WSP=0
NV_AUTO_ID=1 NV_AUTO_ID=1
...@@ -77,12 +77,12 @@ NV_AUTO_ID=1 ...@@ -77,12 +77,12 @@ NV_AUTO_ID=1
[Recent HI-WAVE FindProcedure Search] [Recent HI-WAVE FindProcedure Search]
Search0=Power_On_System_Init Search0=MSCAN0_L_Data_Request
Search1=Power_Management_Init Search1=Power_On_System_Init
Search2=API_ISR Search2=Power_Management_Init
Search3=Sys_Status_Update_Service Search3=API_ISR
Search4=MSCAN0_TX_ISR Search4=Sys_Status_Update_Service
Search5=MSCAN0_L_Data_Request Search5=MSCAN0_TX_ISR
Search6=Power_Wake_Up_Init Search6=Power_Wake_Up_Init
Search7=IGN_OFF_State_Keep Search7=IGN_OFF_State_Keep
Search8=Power_Sleep_Init Search8=Power_Sleep_Init
...@@ -110,11 +110,11 @@ Search15=GUI_ADAS_Display ...@@ -110,11 +110,11 @@ Search15=GUI_ADAS_Display
[Recent Applications File List] [Recent Applications File List]
File0=H:\EF01\������\bin\WuZhengProject7.0.abs File0=H:\EF01\\原程序\bin\WuZhengProject7.0.abs
File1=H:\EF01\��\�½��ļ���\W3_EF01_BootApp_BV1.2_SV00.10_HV1.07_FV0.08.s19 File1=H:\EF01\\新建文件夹\W3_EF01_BootApp_BV1.2_SV00.10_HV1.07_FV0.08.s19
File2=I:\GIT\DEV\WZ-EF01\s19\W3_EF01_20231206_BV1.01(500k)_SVa00.09_HV1.07_FV0.08-12V_ALL.s19 File2=I:\GIT\DEV\WZ-EF01\s19\W3_EF01_20231206_BV1.01(500k)_SVa00.09_HV1.07_FV0.08-12V_ALL.s19
File3=H:\EF01��\03-����Դ��\wuzheng_a901-master����\bin\WuZhengProject7.0.abs File3=H:\EF01\源\03-程序源码\wuzheng_a901-master\原程序\bin\WuZhengProject7.0.abs
LoadFlags0=AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main" LoadFlags0=AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main"
LoadFlags1=AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main" LoadFlags1=AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main"
LoadFlags2=AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main" LoadFlags2=AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main"
LoadFlags3=AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main" LoadFlags3=AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main"
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -12,3 +12,8 @@ Data:2 < ADDXPR ONLY_ADD_IF_NEW "DataESpeedActual" ...@@ -12,3 +12,8 @@ Data:2 < ADDXPR ONLY_ADD_IF_NEW "DataESpeedActual"
Data:2 < ADDXPR ONLY_ADD_IF_NEW "DataESPeedDamping.Speed" Data:2 < ADDXPR ONLY_ADD_IF_NEW "DataESPeedDamping.Speed"
Data:2 < ADDXPR ONLY_ADD_IF_NEW "NVMConfig3300" Data:2 < ADDXPR ONLY_ADD_IF_NEW "NVMConfig3300"
Data:2 < ADDXPR ONLY_ADD_IF_NEW "FuelResistanceV" Data:2 < ADDXPR ONLY_ADD_IF_NEW "FuelResistanceV"
Data:2 < ADDXPR ONLY_ADD_IF_NEW "CANNetTxOFF"
Data:2 < ADDXPR ONLY_ADD_IF_NEW "CoCANCycleMsg"
Data:2 < ADDXPR ONLY_ADD_IF_NEW "CoCANCtrl.Timer"
Data:2 < ADDXPR ONLY_ADD_IF_NEW "CoCANTxMsgTable"
Data:2 < ADDXPR ONLY_ADD_IF_NEW "CANMsg18FEF717Status"
1、WZ_EF01_BootApp_BV1.2_SV00.10_HV1.07_FV0.08_20240311.s19,完整版,适用于新生产的无程序仪表 1、WZ_EF01_BootApp_BV1.30_SV00.10_HV1.07_FV0.08_20240313.s19,完整版,适用于新生产的无程序仪表
2、WZ_EF01_UpdateApp_BV1.2_SV00.10_HV1.07_FV0.08_20240311.s19,APP版,适用于烧过完整版程序仪表,需配合诊断工具使用 2、WZ_EF01_UpdateApp_BV1.30_SV00.10_HV1.07_FV0.08_20240313.s19,APP版,适用于烧过完整版程序仪表,需配合诊断工具使用
#new Option #new Option
#Thu Mar 07 10:34:08 CST 2024 #Wed Mar 13 19:17:49 CST 2024
IsSort=true IsSort=true
MergeFlashIsCompression=false MergeFlashIsCompression=false
ChangeAppFilePath= ChangeAppFilePath=
...@@ -7,7 +7,7 @@ MergeCanXLSPath= ...@@ -7,7 +7,7 @@ MergeCanXLSPath=
RH850_D1M1AGPIOJSONpath= RH850_D1M1AGPIOJSONpath=
DBFFilePath= DBFFilePath=
MergeCrcTtpe=1 MergeCrcTtpe=1
MergeBootFilePath=I\:\\GIT\\DEV\\WZ-EF01\\utility\\Boot_Release\\EF01_Boot_V1.2_20240227.s19 MergeBootFilePath=I\:\\GIT\\DEV\\WZ-EF01\\utility\\Boot_Release\\WuZheng_EF01_3820010-EF01_Boot_BV1.30_20240308.s19
IsMergeChangeAddress=false IsMergeChangeAddress=false
MergeFlashOutPutFilePath= MergeFlashOutPutFilePath=
GPIOOutPutPath= GPIOOutPutPath=
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment