This commit is contained in:
sunbeam 2023-08-21 16:48:00 +08:00
commit 29b0d84cf1
113 changed files with 52287 additions and 0 deletions

1
ECU_APP/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/DefaultBuild

22
ECU_APP/.vscode/c_cpp_properties.json vendored Normal file
View File

@ -0,0 +1,22 @@
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE",
"__near="
],
"windowsSdkVersion": "10.0.18362.0",
"compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "windows-msvc-x64"
}
],
"version": 4
}

13
ECU_APP/.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,13 @@
{
"files.associations": {
"apptask.h": "c",
"adc.h": "c",
"r_cg_adc.h": "c",
"motorctrl.h": "c",
"r_cg_macrodriver.h": "c",
"extern.h": "c",
"r_cg_intc.h": "c",
"dcm_extern.h": "c",
"cannw.h": "c"
}
}

716
ECU_APP/CanNw/CanNw.c Normal file
View File

@ -0,0 +1,716 @@
#include "CanNw.h"
CAN_NW_STATE euNwState;
unsigned char ucNwSendPduType; //网络管理控制发送选择 0关闭发送 1发送APP报文 2发送网络管理APP报文
unsigned int uiNwTimCnt;
unsigned int uiNwToutCnt;
unsigned int uiNwRMSCnt;
unsigned int uiNwBsSlpCnt;
unsigned int uiSetNwPduCycVal;
unsigned int uiNwPduCycCnt;
unsigned int uiNwLocWkpOffCnt;
unsigned char ucActiveWakeupBit;
unsigned char ucRemoteWakupFlg;
unsigned char ucNwPowerUpFlg;
unsigned char ucNwNetIdelCheck;
unsigned char ucNwNetIdelFlg;
unsigned char ucPreLocWkpStu;
unsigned char ucNetActiveFlg;
unsigned char ImmediateNM_count;
unsigned int DiagCnt;
unsigned char RepeatMessageReq;
unsigned char DiagMsgRcvFlag;
unsigned char RSSDiagReq;
unsigned char CanNwWakeupSourceCheck(unsigned char LocalSource,unsigned char *RemoteSource);
unsigned char CanNwNetIdelCheck(unsigned char *IdelFlg);
void CanNwInit(void)
{
euNwState = CAN_NW_RESERVED;
uiNwTimCnt = 0u;
uiNwToutCnt = 0u;
uiNwRMSCnt = REPEAT_MESSAGE_TIMER_THR;
uiNwBsSlpCnt = 0u;
uiSetNwPduCycVal = REPEAT_NW_CYCLE_TIMER_THR;
ucActiveWakeupBit = PASSIVE_WAKEUP;
ucRemoteWakupFlg = 0u;
ucNwPowerUpFlg = 0u;
ucNwSendPduType = SEND_DISABLE;
uiNwPduCycCnt = 0;
ucNwNetIdelCheck = 0;
ucNwNetIdelFlg = 0;
ucPreLocWkpStu = PASSIVE_WAKEUP;
uiNwLocWkpOffCnt = NM_TIMEOUT_TIMER_THR;
ucNetActiveFlg = 0;//网络管理使能
Can_Nw_Init();
}
/*
void CanNwHandle(void)
10ms
*/
void CanNwHandle(void)
{
static unsigned char FlgTemp = 0,FlgTemp1 = 0;
//if((euNwState == CAN_NW_RESERVED)||(euNwState == CAN_NW_GOTO_SLEEP))
if(euNwState == CAN_NW_RESERVED)
{
if((ucRemoteWakupFlg == 1)||(I_IGN_SIGN == IGN_ON))
{
FlgTemp1 = 0;
if(FlgTemp == 0)
{
FlgTemp = 1;
C0CTRH &= ~0x0300; // 设置正常模式
}
}
else
{
FlgTemp = 0;
if(FlgTemp1 == 0)
{
C0CTRH |= 0x0300; // 设置监听模式
FlgTemp1 = 1;
}
}
}
if(DiagMsgRcvFlag == 1)
{
DiagCnt = 5000;
DiagMsgRcvFlag = 0;
if(euNwState==CAN_NW_READY_SLEEP)RSSDiagReq=1;
}
ucActiveWakeupBit = CanNwWakeupSourceCheck(ucIgnStus,&ucRemoteWakupFlg);
ucNwNetIdelFlg = CanNwNetIdelCheck(&ucNwNetIdelCheck);
//CAN_2F6.Msg_Bit.NWM_STATE = euNwState;
switch(euNwState)
{
case CAN_NW_RESERVED:
{
if((ucActiveWakeupBit == LOCAL_ACTIVE_WAKEUP)||(ucActiveWakeupBit == REMOTE_ACTIVE_WAKEUP))
{
uiNwLocWkpOffCnt = NM_TIMEOUT_TIMER_THR;
euNwState = CAN_NW_RMS_SLEEP; //睡眠模式到重复消息模式
//设置100ms周期发送NW_PDU
uiNwRMSCnt = REPEAT_MESSAGE_TIMER_THR; //设置1S超时后进入正常模式定时器
uiNwTimCnt = 0;
ucNwSendPduType = SEND_NWAPP_PDU;
uiNwPduCycCnt = 0;
if(ucActiveWakeupBit == LOCAL_ACTIVE_WAKEUP) //本地唤醒进入立即发送网络管理报文模式
{
ImmediateNM_count = 0;
uiSetNwPduCycVal = IMMEDIATENM_CYCLE_TIMER_THR;
}
else
{
ImmediateNM_count = 5;
uiSetNwPduCycVal = REPEAT_NW_CYCLE_TIMER_THR;
}
}
else
{
euNwState = CAN_NW_RESERVED;
if(ucNwNetIdelFlg == 1)
{
if(uiNwTimCnt > 5000) //5sec goto sleep
{
ucNwSendPduType = SEND_DISABLE;
SleepDetect();
}
}
}
}
break;
case CAN_NW_RMS_SLEEP:
{
if(ImmediateNM_count >= 4 )uiSetNwPduCycVal = NM_NORMAL_CYCLE_TIMER_THR;
if((ucActiveWakeupBit == LOCAL_ACTIVE_WAKEUP)||(ucNetActiveFlg == NW_NET_ACTIVE))
{
uiNwLocWkpOffCnt = NM_TIMEOUT_TIMER_THR;
if(ucActiveWakeupBit == LOCAL_ACTIVE_WAKEUP)
{
if(uiNwRMSCnt == NM_TIMEOUT) //1S超时进入正常模式
{
euNwState = CAN_NW_NOS_REPEAT_MESSAGE; //重复状态模式进入正常模式
uiNwRMSCnt = REPEAT_MESSAGE_TIMER_THR; //设置1S超时后进入正常模式定时器
uiNwTimCnt = 0; //网络管理定时器重置为“0”
uiSetNwPduCycVal = NM_NORMAL_CYCLE_TIMER_THR; //设置200ms周期发送NW_PDU
ucNwSendPduType = SEND_NWAPP_PDU;
}
}
else /*if(ucActiveWakeupBit == REMOTE_ACTIVE_WAKEUP)*/
{
if(uiNwRMSCnt == NM_TIMEOUT) //1S超时进入正常模式
{
euNwState = CAN_NW_NOS_REPEAT_MESSAGE; //重复状态模式进入正常模式
uiNwRMSCnt = REPEAT_MESSAGE_TIMER_THR; //设置1S超时后进入正常模式定时器
uiNwTimCnt = 0; //网络管理定时器重置为“0”
uiSetNwPduCycVal = NM_NORMAL_CYCLE_TIMER_THR; //设置200ms周期发送NW_PDU
ucNwSendPduType = SEND_NWAPP_PDU;
}
}
}
else
{
//if(uiNwTimCnt > REPEAT_MESSAGE_TIMER_THR) //唤醒信号超时1S后
//if(uiNwLocWkpOffCnt == NM_TIMEOUT)
if(uiNwRMSCnt == NM_TIMEOUT)
{
euNwState = CAN_NW_READY_SLEEP; //重复状态进入准备睡眠模式
uiNwTimCnt = 500-uiNwPduCycCnt;
ucNwSendPduType = SEND_APP_PDU;
}
}
}
break;
case CAN_NW_RMS_PREPARE_SLEEP:
{
if(ImmediateNM_count >= 4 )uiSetNwPduCycVal = NM_NORMAL_CYCLE_TIMER_THR;
if(ucActiveWakeupBit == LOCAL_ACTIVE_WAKEUP)
{
uiNwLocWkpOffCnt = NM_TIMEOUT_TIMER_THR;
if(ucActiveWakeupBit == LOCAL_ACTIVE_WAKEUP)
{
if(uiNwRMSCnt == NM_TIMEOUT) //1S超时进入正常模式
{
euNwState = CAN_NW_NOS_REPEAT_MESSAGE; //重复状态模式进入正常模式
uiNwRMSCnt = REPEAT_MESSAGE_TIMER_THR; //设置1S超时后进入正常模式定时器
uiNwTimCnt = 0; //网络管理定时器重置为“0”
uiSetNwPduCycVal = NM_NORMAL_CYCLE_TIMER_THR; //设置200ms周期发送NW_PDU
ucNwSendPduType = SEND_NWAPP_PDU;
}
}
else /*if(ucActiveWakeupBit == REMOTE_ACTIVE_WAKEUP)*/
{
if(uiNwRMSCnt == NM_TIMEOUT) //1S超时进入正常模式
{
euNwState = CAN_NW_NOS_REPEAT_MESSAGE; //重复状态模式进入正常模式
uiNwRMSCnt = REPEAT_MESSAGE_TIMER_THR; //设置1S超时后进入正常模式定时器
uiNwTimCnt = 0; //网络管理定时器重置为“0”
uiSetNwPduCycVal = NM_NORMAL_CYCLE_TIMER_THR; //设置200ms周期发送NW_PDU
ucNwSendPduType = SEND_NWAPP_PDU;
}
}
}
else
{
//if(uiNwTimCnt > REPEAT_MESSAGE_TIMER_THR) //唤醒信号超时1S后
/*
if(uiNwLocWkpOffCnt == NM_TIMEOUT)
{
euNwState = CAN_NW_READY_SLEEP; //重复状态进入准备睡眠模式
uiNwTimCnt = 500-uiNwPduCycCnt;;
ucNwSendPduType = SEND_APP_PDU;
}
*/
//SW030BT03
if(uiNwRMSCnt == NM_TIMEOUT)
{
euNwState = CAN_NW_READY_SLEEP; //重复状态进入准备睡眠模式
uiNwTimCnt = 500-uiNwPduCycCnt;
ucNwSendPduType = SEND_APP_PDU;
}
}
}
break;
case CAN_NW_RMS_NORMAL_OPERATION:
{
if(ImmediateNM_count >= 4 )uiSetNwPduCycVal = NM_NORMAL_CYCLE_TIMER_THR;
if(ucActiveWakeupBit == LOCAL_ACTIVE_WAKEUP)
{
uiNwLocWkpOffCnt = NM_TIMEOUT_TIMER_THR;
if(ucActiveWakeupBit == LOCAL_ACTIVE_WAKEUP)
{
if(uiNwRMSCnt == NM_TIMEOUT) //1S超时进入正常模式
{
euNwState = CAN_NW_NOS_REPEAT_MESSAGE; //重复状态模式进入正常模式
uiNwRMSCnt = REPEAT_MESSAGE_TIMER_THR; //设置1S超时后进入正常模式定时器
uiNwTimCnt = 0; //网络管理定时器重置为“0”
uiSetNwPduCycVal = NM_NORMAL_CYCLE_TIMER_THR; //设置200ms周期发送NW_PDU
ucNwSendPduType = SEND_NWAPP_PDU;
}
}
else /*if(ucActiveWakeupBit == REMOTE_ACTIVE_WAKEUP)*/
{
if(uiNwRMSCnt == NM_TIMEOUT) //1S超时进入正常模式
{
euNwState = CAN_NW_NOS_REPEAT_MESSAGE; //重复状态模式进入正常模式
uiNwRMSCnt = REPEAT_MESSAGE_TIMER_THR; //设置1S超时后进入正常模式定时器
uiNwTimCnt = 0; //网络管理定时器重置为“0”
uiSetNwPduCycVal = NM_NORMAL_CYCLE_TIMER_THR; //设置200ms周期发送NW_PDU
ucNwSendPduType = SEND_NWAPP_PDU;
}
}
}
else
{
//if(uiNwTimCnt > REPEAT_MESSAGE_TIMER_THR) //唤醒信号超时1S后
/*
if(uiNwLocWkpOffCnt == NM_TIMEOUT)
{
euNwState = CAN_NW_READY_SLEEP; //重复状态进入准备睡眠模式
uiNwTimCnt = 500-uiNwPduCycCnt;;
ucNwSendPduType = SEND_APP_PDU;
}
*/
//SW030BT03
if(uiNwRMSCnt == NM_TIMEOUT)
{
euNwState = CAN_NW_READY_SLEEP; //重复状态进入准备睡眠模式
uiNwTimCnt = 500-uiNwPduCycCnt;
ucNwSendPduType = SEND_APP_PDU;
}
}
}
break;
case CAN_NW_RMS_READY_SLEEP:
{
if(ImmediateNM_count >= 4 )uiSetNwPduCycVal = NM_NORMAL_CYCLE_TIMER_THR;
if(ucActiveWakeupBit == LOCAL_ACTIVE_WAKEUP)
{
uiNwLocWkpOffCnt = NM_TIMEOUT_TIMER_THR;
if(ucActiveWakeupBit == LOCAL_ACTIVE_WAKEUP)
{
if(uiNwRMSCnt == NM_TIMEOUT) //1S超时进入正常模式
{
euNwState = CAN_NW_NOS_REPEAT_MESSAGE; //重复状态模式进入正常模式
uiNwRMSCnt = REPEAT_MESSAGE_TIMER_THR; //设置1S超时后进入正常模式定时器
uiNwTimCnt = 0; //网络管理定时器重置为“0”
uiSetNwPduCycVal = NM_NORMAL_CYCLE_TIMER_THR; //设置200ms周期发送NW_PDU
ucNwSendPduType = SEND_NWAPP_PDU;
}
}
else /*if(ucActiveWakeupBit == REMOTE_ACTIVE_WAKEUP)*/
{
if(uiNwRMSCnt == NM_TIMEOUT) //1S超时进入正常模式
{
euNwState = CAN_NW_NOS_REPEAT_MESSAGE; //重复状态模式进入正常模式
uiNwRMSCnt = REPEAT_MESSAGE_TIMER_THR; //设置1S超时后进入正常模式定时器
uiNwTimCnt = 0; //网络管理定时器重置为“0”
uiSetNwPduCycVal = NM_NORMAL_CYCLE_TIMER_THR; //设置200ms周期发送NW_PDU
ucNwSendPduType = SEND_NWAPP_PDU;
}
}
}
else
{
//if(uiNwTimCnt > REPEAT_MESSAGE_TIMER_THR) //唤醒信号超时1S后
/*
if(uiNwLocWkpOffCnt == NM_TIMEOUT)
{
euNwState = CAN_NW_READY_SLEEP; //重复状态进入准备睡眠模式
uiNwTimCnt = 0;
ucNwSendPduType = SEND_APP_PDU;
}
*/
//SW030BT03
if(uiNwRMSCnt == NM_TIMEOUT)
{
euNwState = CAN_NW_READY_SLEEP; //重复状态进入准备睡眠模式
uiNwTimCnt = 500-uiNwPduCycCnt;
ucNwSendPduType = SEND_APP_PDU;
}
}
}
break;
case CAN_NW_NOS_REPEAT_MESSAGE:
{
//if((ucActiveWakeupBit == LOCAL_ACTIVE_WAKEUP)||(ucActiveWakeupBit == REMOTE_ACTIVE_WAKEUP))
if(RepeatMessageReq == 1)
{
RepeatMessageReq = 0;
euNwState = CAN_NW_RMS_NORMAL_OPERATION;
uiNwLocWkpOffCnt = NM_TIMEOUT_TIMER_THR;
uiNwRMSCnt = REPEAT_MESSAGE_TIMER_THR;
uiNwTimCnt = 0;
ucNwSendPduType = SEND_NWAPP_PDU;
uiSetNwPduCycVal = NM_NORMAL_CYCLE_TIMER_THR;
ImmediateNM_count = 5;
uiNwPduCycCnt = 0;
}
if((ucActiveWakeupBit == LOCAL_ACTIVE_WAKEUP)||(ucNetActiveFlg == NW_NET_ACTIVE))
{
uiNwLocWkpOffCnt = NM_TIMEOUT_TIMER_THR;
if(ucActiveWakeupBit == LOCAL_ACTIVE_WAKEUP)
{
uiNwRMSCnt = REPEAT_MESSAGE_TIMER_THR; //设置1S超时后进入正常模式定时器
ucNwSendPduType = SEND_NWAPP_PDU;
}
else /*if(ucActiveWakeupBit == REMOTE_ACTIVE_WAKEUP)*/
{
uiNwRMSCnt = REPEAT_MESSAGE_TIMER_THR; //设置1S超时后进入正常模式定时器
ucNwSendPduType = SEND_NWAPP_PDU;
}
}
else
{
//if((uiNwTimCnt > REPEAT_MESSAGE_TIMER_THR)||(uiNwRMSCnt == NM_TIMEOUT))
//if((uiNwLocWkpOffCnt == NM_TIMEOUT)&&(uiNwRMSCnt == NM_TIMEOUT)&&(DiagCnt==NM_TIMEOUT))
if(DiagCnt==NM_TIMEOUT)
{
euNwState = CAN_NW_READY_SLEEP;
uiNwTimCnt = 500-uiNwPduCycCnt;;
ucNwSendPduType = SEND_APP_PDU;
}
}
}
break;
case CAN_NW_NOS_READY_SLEEP:
{
if(RepeatMessageReq == 1)
{
RepeatMessageReq = 0;
euNwState = CAN_NW_RMS_NORMAL_OPERATION;
uiNwLocWkpOffCnt = NM_TIMEOUT_TIMER_THR;
uiNwRMSCnt = REPEAT_MESSAGE_TIMER_THR;
uiNwTimCnt = 0;
ucNwSendPduType = SEND_NWAPP_PDU;
uiSetNwPduCycVal = NM_NORMAL_CYCLE_TIMER_THR;
ImmediateNM_count = 5;
uiNwPduCycCnt = 0;
}
//if((ucActiveWakeupBit == LOCAL_ACTIVE_WAKEUP)||(ucActiveWakeupBit == REMOTE_ACTIVE_WAKEUP))
if(ucActiveWakeupBit == LOCAL_ACTIVE_WAKEUP)
{
uiNwLocWkpOffCnt = NM_TIMEOUT_TIMER_THR;
if(ucActiveWakeupBit == LOCAL_ACTIVE_WAKEUP)
{
uiNwRMSCnt = REPEAT_MESSAGE_TIMER_THR; //设置1S超时后进入正常模式定时器
ucNwSendPduType = SEND_NWAPP_PDU;
}
else /*if(ucActiveWakeupBit == REMOTE_ACTIVE_WAKEUP)*/
{
uiNwRMSCnt = REPEAT_MESSAGE_TIMER_THR; //设置1S超时后进入正常模式定时器
ucNwSendPduType = SEND_NWAPP_PDU;
}
}
else
{
//if((uiNwTimCnt > REPEAT_MESSAGE_TIMER_THR)||(uiNwRMSCnt == NM_TIMEOUT))
//if((uiNwLocWkpOffCnt == NM_TIMEOUT)&&(uiNwRMSCnt == NM_TIMEOUT)&&(DiagCnt==NM_TIMEOUT))
if(DiagCnt==NM_TIMEOUT)
{
euNwState = CAN_NW_READY_SLEEP;
uiNwTimCnt = 500-uiNwPduCycCnt;;
ucNwSendPduType = SEND_APP_PDU;
}
}
}
break;
case CAN_NW_READY_SLEEP:
{
if(ucActiveWakeupBit == LOCAL_ACTIVE_WAKEUP)
{
uiNwLocWkpOffCnt = NM_TIMEOUT_TIMER_THR;
euNwState = CAN_NW_NOS_READY_SLEEP;
uiNwRMSCnt = REPEAT_MESSAGE_TIMER_THR; //设置1S超时后进入正常模式定时器
uiNwTimCnt = 0;
uiSetNwPduCycVal = NM_NORMAL_CYCLE_TIMER_THR;
ucNwSendPduType = SEND_NWAPP_PDU;
}
else if(ucActiveWakeupBit == REMOTE_ACTIVE_WAKEUP)
{
/*Wait In CAN_NW_NOS_READY_SLEEP */
ucNwSendPduType = SEND_APP_PDU;
if(RepeatMessageReq == 1)
{
RepeatMessageReq = 0;
euNwState = CAN_NW_RMS_READY_SLEEP;
uiNwLocWkpOffCnt = NM_TIMEOUT_TIMER_THR;
uiNwRMSCnt = REPEAT_MESSAGE_TIMER_THR;
uiNwTimCnt = 0;
ucNwSendPduType = SEND_NWAPP_PDU;
uiSetNwPduCycVal = NM_NORMAL_CYCLE_TIMER_THR;
ImmediateNM_count = 5;
uiNwPduCycCnt = 0;
}
}
else
{
if(RSSDiagReq == 1)
{
RSSDiagReq = 0;
uiNwLocWkpOffCnt = NM_TIMEOUT_TIMER_THR;
euNwState = CAN_NW_NOS_READY_SLEEP;
uiNwRMSCnt = REPEAT_MESSAGE_TIMER_THR; //设置1S超时后进入正常模式定时器
uiNwTimCnt = 0;
uiSetNwPduCycVal = NM_NORMAL_CYCLE_TIMER_THR;
ucNwSendPduType = SEND_NWAPP_PDU;
}
if(uiNwTimCnt > NM_TIMEOUT_TIMER_THR)
{
euNwState = CAN_NW_GOTO_SLEEP;
uiNwTimCnt = 0;
ucNwSendPduType = SEND_DISABLE;
}
if(RepeatMessageReq == 1)
{
RepeatMessageReq = 0;
euNwState = CAN_NW_RMS_READY_SLEEP;
uiNwLocWkpOffCnt = NM_TIMEOUT_TIMER_THR;
uiNwRMSCnt = REPEAT_MESSAGE_TIMER_THR;
uiNwTimCnt = 0;
ucNwSendPduType = SEND_NWAPP_PDU;
uiSetNwPduCycVal = NM_NORMAL_CYCLE_TIMER_THR;
ImmediateNM_count = 5;
uiNwPduCycCnt = 0;
}
}
}
break;
case CAN_NW_GOTO_SLEEP:
{
if((ucActiveWakeupBit == LOCAL_ACTIVE_WAKEUP)||(ucActiveWakeupBit == REMOTE_ACTIVE_WAKEUP))
{
uiNwLocWkpOffCnt = NM_TIMEOUT_TIMER_THR;
euNwState = CAN_NW_RMS_PREPARE_SLEEP;
uiNwRMSCnt = REPEAT_MESSAGE_TIMER_THR; //设置1S超时后进入正常模式定时器
uiSetNwPduCycVal = REPEAT_NW_CYCLE_TIMER_THR; //设置100ms周期发送NW_PDU
uiNwTimCnt = 0;
ucNwSendPduType = SEND_NWAPP_PDU;
uiNwPduCycCnt = 0;
if(ucActiveWakeupBit == LOCAL_ACTIVE_WAKEUP) //本地唤醒进入立即发送网络管理报文模式
{
ImmediateNM_count = 0;
uiSetNwPduCycVal = IMMEDIATENM_CYCLE_TIMER_THR;
}
else
{
ImmediateNM_count = 5;
uiSetNwPduCycVal = REPEAT_NW_CYCLE_TIMER_THR;
}
}
else
{
if(uiNwTimCnt > WAIT_BUS_SLEEP_TIMER_THR)
{
//满足进入睡眠条件后 执行睡眠程序,注意唤醒后状态机必须切换到 "euNwState = CAN_NW_RESERVED"
if(ucNwNetIdelFlg == 1)
{
uiNwTimCnt = 0;
ucNwSendPduType = SEND_DISABLE;
FlgTemp = 0;
FlgTemp1 = 0;
C0CTRH |= 0x0300; // 设置监听模式
SleepDetect();
}
else
{
//waiting can bus idel
uiNwTimCnt = WAIT_BUS_SLEEP_TIMER_THR;
ucNwSendPduType = SEND_DISABLE;
}
}
}
}
break;
default:
{
euNwState = CAN_NW_GOTO_SLEEP;
uiNwTimCnt = 0;
}
break;
}
TxCanNwMsg_6B7.Msg_Part.RCP3_Address=0x36;
/*
if(euNwState == CAN_NW_RMS_SLEEP || euNwState == CAN_NW_RMS_PREPARE_SLEEP)
TxCanNwMsg_6B7.Msg_Part.RCP3_RMR=1;
else
TxCanNwMsg_6B7.Msg_Part.RCP3_RMR=0;
*/ //20190707一直是0
TxCanNwMsg_6B7.Msg_Part.RCP3_RMR=0;
if(ucActiveWakeupBit == LOCAL_ACTIVE_WAKEUP)
{
TxCanNwMsg_6B7.Msg_Part.RCP3_AWB = 1;
}
else
{
TxCanNwMsg_6B7.Msg_Part.RCP3_AWB = 0;
}
if((euNwState == CAN_NW_NOS_REPEAT_MESSAGE)||(euNwState == CAN_NW_NOS_READY_SLEEP))
{
TxCanNwMsg_6B7.Msg_Part.RCP3_NMSts = 1;
}
else
{
TxCanNwMsg_6B7.Msg_Part.RCP3_NMSts = 0;
}
if(ucActiveWakeupBit == LOCAL_ACTIVE_WAKEUP)
{
TxCanNwMsg_6B7.Msg_Part.RCP3_Stayawake_reasons_2=0;
}
else
{
TxCanNwMsg_6B7.Msg_Part.RCP3_Stayawake_reasons_2=0;
}
if(ucActiveWakeupBit == REMOTE_ACTIVE_WAKEUP)
{
TxCanNwMsg_6B7.Msg_Part.RCP3_Wakeup_reasons=2;
}
else if(ucActiveWakeupBit == LOCAL_ACTIVE_WAKEUP)
{
TxCanNwMsg_6B7.Msg_Part.RCP3_Wakeup_reasons=1;
}
else
{
TxCanNwMsg_6B7.Msg_Part.RCP3_Wakeup_reasons=0;
}
TxCanNwMsg_6B7.Msg_Part.RCP3_Stayawake_reasons_1=0;
TxCanNwMsg_6B7.Msg_Part.RCP3_Stayawake_reasons_4=0;
TxCanNwMsg_6B7.Msg_Part.RCP3_Stayawake_reasons_5=0;
TxCanNwMsg_6B7.Msg_Part.RCP3_Stayawake_reasons_6=0;
TxCanNwMsg_6B7.Msg_Part.RCP3_Stayawake_reasons_7=0;
TxCanNwMsg_6B7.Msg_Part.RCP3_Stayawake_reasons_8=0;
Copy_Array_to_Array(TxCanNwPdu_436.DB,TxCanNwMsg_6B7.Msg_Byte,8);
}
unsigned char CanNwWakeupSourceCheck(unsigned char LocalSource,unsigned char *RemoteSource)
{
static unsigned char ucRemWkpTemp = 0u;
unsigned char ucRtnTemp;
ucRtnTemp = PASSIVE_WAKEUP;
if(ucNwPowerUpFlg == 0u) //上电初始化后进入循环后网络管理定时器清"0"
{
ucNwPowerUpFlg = 1u;
uiNwTimCnt = 0u;
ucRemWkpTemp = 0;
}
else
{
if(uiNwTimCnt > (NM_NORMAL_CYCLE_TIMER_THR+REPEAT_NW_CYCLE_TIMER_THR)||(*RemoteSource == 1)) //300ms检测一次远程标志位
{
if(*RemoteSource == 1)
{
*RemoteSource = 0;
uiNwTimCnt = 0;
ucRemWkpTemp = 1;
}
else
{
ucRemWkpTemp = 0;
}
}
}
if(LocalSource == IGN_ON)
{
ucPreLocWkpStu = LOCAL_ACTIVE_WAKEUP;
ucRtnTemp = LOCAL_ACTIVE_WAKEUP;
}
else if(ucRemWkpTemp == 1)
{
if(ucPreLocWkpStu == LOCAL_ACTIVE_WAKEUP)
{
ucRtnTemp = PASSIVE_WAKEUP;
}
else
{
ucRtnTemp = REMOTE_ACTIVE_WAKEUP;
}
}
else
{
ucPreLocWkpStu = PASSIVE_WAKEUP;
ucRtnTemp = PASSIVE_WAKEUP;
}
return ucRtnTemp;
}
unsigned char CanNwNetIdelCheck(unsigned char *IdelFlg)
{
static unsigned int suiIdelTimCnt = 0;
static unsigned char sucIdelCheckCnt = 0;
if(++suiIdelTimCnt > 30)
{
if(*IdelFlg == 0)
{
if(++sucIdelCheckCnt > 3)
{
sucIdelCheckCnt = 3;
return 1;
}
else
{
suiIdelTimCnt = 0;
}
}
else
{
*IdelFlg = 0;
suiIdelTimCnt = 0;
sucIdelCheckCnt = 0;
}
if(suiIdelTimCnt > 40)
{
suiIdelTimCnt = 40;
}
}
return 0;
}

94
ECU_APP/CanNw/CanNw.h Normal file
View File

@ -0,0 +1,94 @@
#ifndef __CANNW_H
#define __CANNW_H
#include "CanNwConfig.h"
#include "appTask.h"
/***************************************************************/
/*
Autosar网络管理
2018\06\20
*/
/***************************************************************/
/*
RMS = Repeat Message State
NOS = Normal Operation State
*/
typedef enum
{
CAN_NW_RESERVED, //0 缺省
CAN_NW_RMS_SLEEP, //1 睡眠模式到重复消息模式
CAN_NW_RMS_PREPARE_SLEEP, //2 准备进入睡眠模式到重复消息模式
CAN_NW_RMS_NORMAL_OPERATION, //3 正常操作模式到重复消息模式
CAN_NW_RMS_READY_SLEEP, //4 准备睡眠模式到重复消息模式
CAN_NW_NOS_REPEAT_MESSAGE, //5 重复消息模式到正常操作状态
CAN_NW_NOS_READY_SLEEP, //6 准备睡眠模式到正常操作状态
CAN_NW_GOTO_SLEEP, //7 网络超时2.5S后进入睡眠模式
CAN_NW_READY_SLEEP
}CAN_NW_STATE;
/*
10MS
*/
#define NM_TIMEOUT_TIMER_THR 2000U
#define REPEAT_MESSAGE_TIMER_THR 1600U
#define WAIT_BUS_SLEEP_TIMER_THR 2000U
#define REPEAT_NW_CYCLE_TIMER_THR 500U
#define NM_NORMAL_CYCLE_TIMER_THR 500U
#define IMMEDIATENM_CYCLE_TIMER_THR 20U
#define NM_TIMEOUT 0U
#define T_NM_ImmediateCycleTime 20U
#define PASSIVE_WAKEUP 0U
#define LOCAL_ACTIVE_WAKEUP 1U
#define REMOTE_ACTIVE_WAKEUP 2U
#define SEND_DISABLE 0
#define SEND_APP_PDU 1
#define SEND_NWAPP_PDU 2
extern unsigned char ucNwSendPduType;
extern CAN_NW_STATE euNwState;
extern unsigned int uiNwTimCnt;
extern unsigned int uiNwToutCnt;
extern unsigned int uiNwRMSCnt;
extern unsigned int uiNwBsSlpCnt;
extern unsigned int uiSetNwPduCycVal;
extern unsigned int uiNwPduCycCnt;
extern unsigned char ucActiveWakeupBit;
extern unsigned char ucNwPowerUpFlg;
extern unsigned char ucRemoteWakupFlg;
extern unsigned char ucNwNetIdelCheck;
extern unsigned char ucNwNetIdelFlg;
extern unsigned char ucPreLocWkpStu;
extern unsigned int uiNwLocWkpOffCnt;
extern unsigned char ImmediateNM_count;
extern unsigned char RepeatMessageReq;
extern unsigned char DiagMsgRcvFlag;
extern unsigned int DiagCnt;
#define NW_NET_INACTIVE 0
#define NW_NET_ACTIVE 1
extern unsigned char ucNetActiveFlg; //0 自清洁功能关闭1自清洁功能开启
void CanNwInit(void);
void CanNwHandle(void);
#endif

View File

@ -0,0 +1,78 @@
#include "CanNw.h"
unsigned char ucPduNumber;
can_frame_t TxCanNwPdu_436;
Can_NwMsg_Type TxCanNwMsg_6B7;
Can_NwMsg_Type RxCanNwMsg_688;
Can_NwMsg_Type RxCanNwMsg_6B1;
Can_NwMsg_Type RxCanNwMsg_6B2;
Can_NwMsg_Type RxCanNwMsg_6B3;
void Can_Nw_TXMsg_Init(void);
void Can_Nw_RXMsg_Init(void);
void Can_Nw_TXMsg_Init(void)
{
Can_init_id(&TxCanNwPdu_436,0x436);
TxCanNwMsg_6B7.Msg_Part.RCP3_Address=0x36;
TxCanNwMsg_6B7.Msg_Part.RCP3_RMR=0;
TxCanNwMsg_6B7.Msg_Part.RCP3_AWB=0;
TxCanNwMsg_6B7.Msg_Part.RCP3_NMSts=0;
TxCanNwMsg_6B7.Msg_Part.RCP3_Wakeup_reasons=0;
TxCanNwMsg_6B7.Msg_Part.RCP3_Stayawake_reasons_1=0;
TxCanNwMsg_6B7.Msg_Part.RCP3_Stayawake_reasons_2=0;
TxCanNwMsg_6B7.Msg_Part.RCP3_Stayawake_reasons_2=0;
TxCanNwMsg_6B7.Msg_Part.RCP3_Stayawake_reasons_4=0;
TxCanNwMsg_6B7.Msg_Part.RCP3_Stayawake_reasons_5=0;
TxCanNwMsg_6B7.Msg_Part.RCP3_Stayawake_reasons_6=0;
TxCanNwMsg_6B7.Msg_Part.RCP3_Stayawake_reasons_7=0;
TxCanNwMsg_6B7.Msg_Part.RCP3_Stayawake_reasons_8=0;
Copy_Array_to_Array(TxCanNwPdu_436.DB,TxCanNwMsg_6B7.Msg_Byte,8);
}
void Can_Nw_RXMsg_Init(void)
{
RxCanNwMsg_688.Msg_Part.RCP3_Address=0x00;
RxCanNwMsg_688.Msg_Part.RCP3_RMR=0;
RxCanNwMsg_688.Msg_Part.RCP3_AWB=0;
RxCanNwMsg_688.Msg_Part.RCP3_NMSts=0;
RxCanNwMsg_688.Msg_Part.RCP3_Wakeup_reasons=0;
RxCanNwMsg_688.Msg_Part.RCP3_Stayawake_reasons_1=0;
RxCanNwMsg_688.Msg_Part.RCP3_Stayawake_reasons_2=0;
RxCanNwMsg_688.Msg_Part.RCP3_Stayawake_reasons_2=0;
RxCanNwMsg_688.Msg_Part.RCP3_Stayawake_reasons_4=0;
RxCanNwMsg_688.Msg_Part.RCP3_Stayawake_reasons_5=0;
RxCanNwMsg_688.Msg_Part.RCP3_Stayawake_reasons_6=0;
RxCanNwMsg_688.Msg_Part.RCP3_Stayawake_reasons_7=0;
RxCanNwMsg_688.Msg_Part.RCP3_Stayawake_reasons_8=0;
}
void Can_Nw_Init(void)
{
ucPduNumber = CAN_ALLPDU_NUMBER;
Can_Nw_TXMsg_Init();
Can_Nw_RXMsg_Init();
}

View File

@ -0,0 +1,57 @@
#ifndef __CANNWCONFIG_H
#define __CANNWCONFIG_H
#include "r_rl78_can_drv.h"
#define CAN_NWPDU_NUMBER 4U
#define CAN_ALLPDU_NUMBER 12U
extern unsigned char ucPduNumber;
typedef union{
unsigned int Msg_Word[4];
unsigned char Msg_Byte[8];
struct{
unsigned char RCP3_Address:8;
unsigned char RCP3_RMR:1;
unsigned char :3;
unsigned char RCP3_AWB:1;
unsigned char :3;
unsigned char RCP3_Wakeup_reasons:8;
unsigned char RCP3_NMSts :1;
//unsigned char ACP_GatewayRequest :1;
unsigned char :7;
unsigned char RCP3_Stayawake_reasons_1 :1;//32-Reserved
unsigned char RCP3_Stayawake_reasons_2 :1;//33-KL15
unsigned char RCP3_Stayawake_reasons_3 :1;//34-Reserved
unsigned char RCP3_Stayawake_reasons_4 :1;//35-Reserved
unsigned char RCP3_Stayawake_reasons_5 :1;//36-Reserved
unsigned char RCP3_Stayawake_reasons_6 :1;//37-Reserved
unsigned char RCP3_Stayawake_reasons_7 :1;//38-Diagnosis service is in progres
unsigned char RCP3_Stayawake_reasons_8 :1;//39-Reserved
unsigned char :8;
unsigned char :8;
unsigned char :8;
}Msg_Part;
}Can_NwMsg_Type;
extern can_frame_t TxCanNwPdu_436;
extern Can_NwMsg_Type TxCanNwMsg_6B7;
extern Can_NwMsg_Type RxCanNwMsg_688;
extern Can_NwMsg_Type RxCanNwMsg_6B1;
extern Can_NwMsg_Type RxCanNwMsg_6B2;
extern Can_NwMsg_Type RxCanNwMsg_6B3;
extern void Can_Nw_Init(void);
#endif

View File

@ -0,0 +1,126 @@
/*******************************************************************************
* Library : Flash Data Library T04 (PicoFDL)
*
* File Name : $Source: pfdl.h $
* Lib. Version : $RL78_FDL_LIB_VERSION_T04_CCRL: V1.05 $
* Mod. Revision : $Revision: 1.3 $
* Mod. Date : $Date: 2014/12/12 00:50:07JST $
* Device(s) : RL78
* Description : C language API definition of the Flash Data Library
*******************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only
* intended for use with Renesas products. No other uses are authorized. This
* software is owned by Renesas Electronics Corporation and is protected under
* all applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software
* and to discontinue the availability of this software. By using this software,
* you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2014 Renesas Electronics Corporation. All rights reserved.
*******************************************************************************/
#ifndef __PFDL_H_INCLUDED
#define __PFDL_H_INCLUDED
/*================================================================================================*/
/* include files list */
/*================================================================================================*/
#include "pfdl_types.h"
/* ---------------------------------------------------------------------------------------------------------------*/
/* Block type: standard function */
/* ---------------------------------------------------------------------------------------------------------------*/
/* Purpose: Unconditional activation of the Data Flash Library. */
/* Based on the descriptor data: */
/* - the flash firmware will be initialized for data-flash access only */
/* - the internal timing and low-voltage capability will be configured according to the descriptor */
/* After successful initialization the data flash clock is ON and the PFDL is ready to use. */
/* */
/* CAUTION: */
/* Due to the code size minimization no plausibility checks are done by the PicoFDL. */
/* Neither configuration, frequency range nor data flash size will be checked by the library. */
/* */
/* Input: address of the PFDL descriptor variable (RAM only) */
/* Output: - */
/* Return: PFDL status */
/* ---------------------------------------------------------------------------------------------------------------*/
extern pfdl_status_t __far PFDL_Open(__near pfdl_descriptor_t* descriptor_pstr);
/* ---------------------------------------------------------------------------------------------------------------*/
/* Block type: standard function */
/* ---------------------------------------------------------------------------------------------------------------*/
/* Purpose: Disable data flash access unconditionally. */
/* If any command is just executed, PFDL_Close will stop it immediately. */
/* After return the data flash clock is switched OFF. */
/* Input: - */
/* Output: - */
/* Return: - */
/* ---------------------------------------------------------------------------------------------------------------*/
extern void __far PFDL_Close(void);
/* ---------------------------------------------------------------------------------------------------------------*/
/* Block type: standard function */
/* ---------------------------------------------------------------------------------------------------------------*/
/* Purpose: Initiating execution of the PFDL request related to the data flash. */
/* The corresponding request variable has to be parametrized before. */
/* */
/* request_pstr->index_u16 : byte-index or block-number within PFDL-pool */
/* request_pstr->data_pu08 : start address of the RAM data that should be read/written */
/* request_pstr->bytecount_u16 : number of bytes has to be read/written */
/* request_pstr->command_enu : command code */
/* */
/* CAUTION: */
/* Due to the code size minimization no plausibility checks are done by the PFDL. */
/* */
/* Input: &request_pstr - pointer to PFDL request variable */
/* Output: - */
/* Return: status of the request */
/* ---------------------------------------------------------------------------------------------------------------*/
extern pfdl_status_t __far PFDL_Execute(__near pfdl_request_t* request_pstr);
/* ---------------------------------------------------------------------------------------------------------------*/
/* Block type: standard function */
/* ---------------------------------------------------------------------------------------------------------------*/
/* Purpose: Continuation of command execution and status update of requests being under execution. */
/* Input: - */
/* Output: - */
/* Return: PFDL status = */
/* PFDL_IDLE - no request is processed by PFDL, PFDL is ready to receive new requests */
/* PFDL_OK - processed request/command finished without problems */
/* PFDL_BUSY - request/command is still being processed */
/* other - flash or firmware related errors */
/* ---------------------------------------------------------------------------------------------------------------*/
extern pfdl_status_t __far PFDL_Handler(void);
/* ---------------------------------------------------------------------------------------------------------------*/
/* Block type: standard function */
/* ---------------------------------------------------------------------------------------------------------------*/
/* Purpose: Returns the start address of the library version string */
/* */
/* Input: - */
/* Output: - */
/* Return: starting address of the zero-terminated version string */
/* ---------------------------------------------------------------------------------------------------------------*/
extern __far pfdl_u08* __far PFDL_GetVersionString(void);
#endif

View File

@ -0,0 +1,209 @@
;*******************************************************************************
; Library : Flash Data Library T04 (PicoFDL)
;
; File Name : $Source: pfdl.inc $
; Lib. Version : $RL78_FDL_LIB_VERSION_T04_CCRL: V1.05 $
; Mod. Revision : $Revision: 1.9 $
; Mod. Date : $Date: 2014/12/12 00:50:08JST $
; Device(s) : RL78
; Description : Assembler language API definition of the Flash Data Library
;******************************************************************************
; DISCLAIMER
; This software is supplied by Renesas Electronics Corporation and is only
; intended for use with Renesas products. No other uses are authorized. This
; software is owned by Renesas Electronics Corporation and is protected under
; all applicable laws, including copyright laws.
; THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
; THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
; LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
; AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
; TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
; ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
; FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
; ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
; BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
; Renesas reserves the right, without notice, to make changes to this software
; and to discontinue the availability of this software. By using this software,
; you agree to the additional terms and conditions found by accessing the
; following link:
; http://www.renesas.com/disclaimer
;
; Copyright (C) 2014 Renesas Electronics Corporation. All rights reserved.
;*******************************************************************************
$IFDEF __PFDL_INC_INCLUDED
$ELSE
__PFDL_INC_INCLUDED .SET 1
;*******************************************************************************
; BEGIN OF CUSTOMIZABLE DECLARATION AREA
;*******************************************************************************
; Base number prefix/suffix mode selection for Assembler
; Numbers definition within the prefix mode: 0x05
; Numbers definition within the suffix mode: 05H
;
; Suffix mode will be activated in case the symbol __PFDL_INC_BASE_NUMBER_SUFFIX
; is defined. The definition of this symbol can be done by
; - un-commenting the line below or
; - using the assembler command line option -D__PFDL_INC_BASE_NUMBER_SUFFIX or
; - by setting the define within the IDE
;__PFDL_INC_BASE_NUMBER_SUFFIX .SET 1
;*******************************************************************************
; END OF CUSTOMIZABLE DECLARATION AREA
;*******************************************************************************
;*******************************************************************************
; BEGIN OF UNTOUCHABLE DECLARATION AREA
;*******************************************************************************
;==============================================================================================
; constant definitions
;==============================================================================================
; PFDL command code definitions
; -----------------------------------------------------
$IFNDEF __PFDL_INC_BASE_NUMBER_SUFFIX
PFDL_CMD_READ_BYTES .EQU 0x00
PFDL_CMD_IVERIFY_BYTES .EQU 0x06
PFDL_CMD_BLANKCHECK_BYTES .EQU 0x08
PFDL_CMD_WRITE_BYTES .EQU 0x04
PFDL_CMD_ERASE_BLOCK .EQU 0x03
; status code definitions returned by the PFDL functions
; operation related status code
PFDL_OK .EQU 0x000
PFDL_IDLE .EQU 0x030
PFDL_BUSY .EQU 0x0FF
; flash access related status code
PFDL_ERR_PROTECTION .EQU 0x010
PFDL_ERR_ERASE .EQU 0x01A
PFDL_ERR_MARGIN .EQU 0x01B
PFDL_ERR_WRITE .EQU 0x01C
PFDL_ERR_PARAMETER .EQU 0x005
$ELSE
PFDL_CMD_READ_BYTES .EQU 00H
PFDL_CMD_IVERIFY_BYTES .EQU 06H
PFDL_CMD_BLANKCHECK_BYTES .EQU 08H
PFDL_CMD_WRITE_BYTES .EQU 04H
PFDL_CMD_ERASE_BLOCK .EQU 03H
; status code definitions returned by the PFDL functions
; operation related status code
PFDL_OK .EQU 000H
PFDL_IDLE .EQU 030H
PFDL_BUSY .EQU 0FFH
; flash access related status code
PFDL_ERR_PROTECTION .EQU 010H
PFDL_ERR_ERASE .EQU 01AH
PFDL_ERR_MARGIN .EQU 01BH
PFDL_ERR_WRITE .EQU 01CH
PFDL_ERR_PARAMETER .EQU 005H
$ENDIF
; ---------------------------------------------------------------------------------------------------------------
; Block type: standard function
; ---------------------------------------------------------------------------------------------------------------
; Purpose: Unconditional activation of the Data Flash Library.
; Based on the descriptor data:
; - the flash firmware will be initialized for data-flash access only
; - the internal timing and low-voltage capability will be configured according to the descriptor
; After successful initialization the flash clock is ON and the PFDL is ready to use.
;
; CAUTION:
; Due to the code size minimization no plausibility checks are done by the PicoFDL.
; Neither configuration, frequency range nor data flash size will be checked by the library.
;
; Input: AX = address of the PFDL descriptor variable
; Output: -
; Destroyed: X, HL, C
; Return: A = PFDL status
; ---------------------------------------------------------------------------------------------------------------
.EXTERN PFDL_Open
; ---------------------------------------------------------------------------------------------------------------
; Block type: standard function
; ---------------------------------------------------------------------------------------------------------------
; Purpose: Disable data flash access unconditionally.
; If any command is just executed, PFDL_Close will stop it immediately.
; After return the flash clock is switched OFF.
; Input: -
; Output: -
; Destroyed: C
; Return: -
; ---------------------------------------------------------------------------------------------------------------
.EXTERN PFDL_Close
; ---------------------------------------------------------------------------------------------------------------
; Block type: standard function
; ---------------------------------------------------------------------------------------------------------------
; Purpose: Initiating execution of the PFDL request related to the data flash.
; The corresponding request variable has to be parametrized before.
;
; request_pstr->index_u16 : byte-index or block-number within PFDL-pool
; request_pstr->data_pu08 : start address of the RAM data that should be read/written
; request_pstr->bytecount_u16 : number of bytes has to be read/written
; request_pstr->command_enu : command code
;
; CAUTION:
; Due to the code size minimization no plausibility checks are done by the PFDL.
;
; Input: AX = pointer to PFDL request variable
; Output: -
; Destroyed: X, BC, DE, HL
; Return: A = status of the request
; ---------------------------------------------------------------------------------------------------------------
.EXTERN PFDL_Execute
; ---------------------------------------------------------------------------------------------------------------
; Block type: standard function
; ---------------------------------------------------------------------------------------------------------------
; Purpose: Continuation of command execution and status update of requests being under execution.
; Input: -
; Output: -
; Destroyed: C
; Return: A = PFDL status
; ---------------------------------------------------------------------------------------------------------------
.EXTERN PFDL_Handler
; ---------------------------------------------------------------------------------------------------------------
; Block type: standard function
; ---------------------------------------------------------------------------------------------------------------
; Purpose: Returns the start address of the library version string
;
; Input: -
; Output: -
; Destroyed: -
; Return: A = HIGH-byte of starting address of the zero-terminated version string
; DE = LOW-word of that address
; ---------------------------------------------------------------------------------------------------------------
.EXTERN PFDL_GetVersionString
;*******************************************************************************
; END OF UNTOUCHABLE DECLARATION AREA
;*******************************************************************************
$ENDIF

View File

@ -0,0 +1,134 @@
/*******************************************************************************
* Library : Flash Data Library T04 (PicoFDL)
*
* File Name : $Source: pfdl_types.h $
* Lib. Version : $RL78_FDL_LIB_VERSION_T04_CCRL: V1.05 $
* Mod. Revision : $Revision: 1.3 $
* Mod. Date : $Date: 2014/12/12 00:50:07JST $
* Device(s) : RL78
* Description : Type definitions used by the library
*******************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only
* intended for use with Renesas products. No other uses are authorized. This
* software is owned by Renesas Electronics Corporation and is protected under
* all applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software
* and to discontinue the availability of this software. By using this software,
* you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2014 Renesas Electronics Corporation. All rights reserved.
*******************************************************************************/
#ifndef __PFDL_TYPES_H_INCLUDED
#define __PFDL_TYPES_H_INCLUDED
/*==============================================================================================*/
/* unsigned type definitions */
/*==============================================================================================*/
typedef unsigned char pfdl_u08;
typedef unsigned int pfdl_u16;
typedef unsigned long int pfdl_u32;
/*==============================================================================================*/
/* global constant definitions */
/*==============================================================================================*/
/*==============================================================================================*/
/* global type definitions */
/*==============================================================================================*/
/* PFDL command code set */
typedef enum
{ /* ---------------------------------------------- */
PFDL_CMD_READ_BYTES = (0x00), /* 0x00, reads data from flash memory */
PFDL_CMD_IVERIFY_BYTES = (0x06), /* 0x06, verifies data if flash content is stable */
PFDL_CMD_BLANKCHECK_BYTES = (0x08), /* 0x08, checks if flash content is blank */
PFDL_CMD_WRITE_BYTES = (0x04), /* 0x04, writes data into flash memory */
PFDL_CMD_ERASE_BLOCK = (0x03) /* 0x03, erases one flash block */
} pfdl_command_t; /* ---------------------------------------------- */
/* PFDL error code set */
typedef enum
{
/* operation related status */ /* ---------------------------------------------- */
PFDL_IDLE = (0x30), /* 0x30, PFDL ready to receive requests */
PFDL_OK = (0x00), /* 0x00, command finished without problems */
PFDL_BUSY = (0xFF), /* 0xFF, command is being processed */
/* flash related status */ /* ---------------------------------------------- */
PFDL_ERR_PROTECTION = (0x10), /* 0x10, protection error (access right conflict) */
PFDL_ERR_ERASE = (0x1A), /* 0x1A, erase error */
PFDL_ERR_MARGIN = (0x1B), /* 0x1B, blankcheck or verify margin violated */
PFDL_ERR_WRITE = (0x1C), /* 0x1C, write error */
PFDL_ERR_PARAMETER = (0x05) /* 0x05, parameter error */
} pfdl_status_t; /* ---------------------------------------------- */
/* PFDL request type (base type for any PFDL access) */
typedef struct
{ /* ---------------------------------------------- */
pfdl_u16 index_u16; /* 2, W, virt. byte/block index inside PFDL-pool */
__near pfdl_u08* data_pu08; /* 2, W, pointer to the 1'st byte of data buffer */
pfdl_u16 bytecount_u16; /* 2, W, number of bytes to be transfered */
pfdl_command_t command_enu; /* 1, W, command code */
} pfdl_request_t; /*------------------------------------------------*/
/* 7 bytes in total */
/*------------------------------------------------*/
/* PFDL descriptor type */
typedef struct
{ /* ---------------------------------------------- */
pfdl_u08 fx_MHz_u08; /* 1, system frequency expressed in MHz */
pfdl_u08 wide_voltage_mode_u08; /* 1, programming voltage mode ( full/wide ) */
} pfdl_descriptor_t; /*------------------------------------------------*/
/* 2 bytes in total */
/*==============================================================================================*/
/* type definition plausibility check */
/*==============================================================================================*/
/* The following checks are implemented in order to check the correct size of the FDL type */
/* definitions at compile time. In case of a compilation error in the following lines, please */
/* check your compiler options for enumeration types and structures and contact your local */
/* support, if necessary. */
#define R_PFDLT04_ASSERT_CONCAT_(a, b) a##b
#define R_PFDLT04_ASSERT_CONCAT(a, b) R_PFDLT04_ASSERT_CONCAT_(a, b)
#define R_PFDLT04_STATIC_ASSERT(e) enum { R_PFDLT04_ASSERT_CONCAT(R_PFDLT04_ASSERT_LINE_, __LINE__) = 1/(!!(e)) }
/* assertion if unsigned data type size is not correct, please evaluate compiler settings for integer types */
R_PFDLT04_STATIC_ASSERT(sizeof(pfdl_u08)==1);
R_PFDLT04_STATIC_ASSERT(sizeof(pfdl_u16)==2);
R_PFDLT04_STATIC_ASSERT(sizeof(pfdl_u32)==4);
/* assertion if unsigned data type size is not correct, please evaluate compiler settings for enumeration types */
R_PFDLT04_STATIC_ASSERT(sizeof(pfdl_command_t)==1);
R_PFDLT04_STATIC_ASSERT(sizeof(pfdl_status_t)==1);
/* assertion if structure type size is not correct, please evaluate compiler settings for structure types */
R_PFDLT04_STATIC_ASSERT(sizeof(pfdl_request_t)>=7); /* sizeof(pfdl_request_t) == 7 for packed structures */
R_PFDLT04_STATIC_ASSERT(sizeof(pfdl_request_t)<=8); /* sizeof(pfdl_request_t) == 8 for unpacked structures */
R_PFDLT04_STATIC_ASSERT(sizeof(pfdl_descriptor_t)==2);
#endif

Binary file not shown.

144
ECU_APP/DataFlash/pfdl.h Normal file
View File

@ -0,0 +1,144 @@
/*******************************************************************************
* Library : Flash Data Library T04 (PicoFDL)
*
* File Name : $Source: pfdl.h $
* Lib. Version : $RL78_FDL_LIB_VERSION_T04_REN: V1.05 $
* Mod. Revision : $Revision: 1.8 $
* Mod. Date : $Date: 2013/06/10 22:04:41JST $
* Device(s) : RL78
* Description : C language API definition of the Flash Data Library
*******************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only
* intended for use with Renesas products. No other uses are authorized. This
* software is owned by Renesas Electronics Corporation and is protected under
* all applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software
* and to discontinue the availability of this software. By using this software,
* you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2011-2013 Renesas Electronics Corporation. All rights reserved.
*******************************************************************************/
#ifndef __PFDL_H_INCLUDED
#define __PFDL_H_INCLUDED
/*================================================================================================*/
/* include files list */
/*================================================================================================*/
#include "pfdl_types.h"
#define FLASH_START_ADDRESS (0xF1000) /* Start address of data flash */
#define TARGET_BLOCK (0) /* Block number of target(0 ~ 3) */
#define BLOCK_SIZE (0x400) /* Block size */
//#define WRITE_SIZE (1) /* Size of data to be written at once */
#define MAX_VALUE (0xFF) /* Maximum value of writing */
#define MAX_ADDRESS ((TARGET_BLOCK + 1) * BLOCK_SIZE - 1) /* Maximum address of writing */
#define PFDL_NG (1) /* Failure to Data Flash */
#define FDL_FRQ (32) /* Setting frequency (MHz) */
#define FDL_VOL (0x00) /* Voltage mode */
uint8_t WriteDataflash(uint8_t* buffer,uint32_t Addr,uint16_t lenth);
uint8_t WriteDataflash1(uint8_t* buffer,uint32_t Addr,uint16_t lenth);
void ReadFlashData(uint8_t* buffer,uint32_t Addr,uint16_t lenth);
/* ---------------------------------------------------------------------------------------------------------------*/
/* Block type: standard function */
/* ---------------------------------------------------------------------------------------------------------------*/
/* Purpose: Unconditional activation of the Data Flash Library. */
/* Based on the descriptor data: */
/* - the flash firmware will be initialized for data-flash access only */
/* - the internal timing and low-voltage capability will be configured according to the descriptor */
/* After successful initialization the data flash clock is ON and the PFDL is ready to use. */
/* */
/* CAUTION: */
/* Due to the code size minimization no plausibility checks are done by the PicoFDL. */
/* Neither configuration, frequency range nor data flash size will be checked by the library. */
/* */
/* Input: address of the PFDL descriptor variable (RAM only) */
/* Output: - */
/* Return: PFDL status */
/* ---------------------------------------------------------------------------------------------------------------*/
extern pfdl_status_t __far PFDL_Open(__near pfdl_descriptor_t* descriptor_pstr);
/* ---------------------------------------------------------------------------------------------------------------*/
/* Block type: standard function */
/* ---------------------------------------------------------------------------------------------------------------*/
/* Purpose: Disable data flash access unconditionally. */
/* If any command is just executed, PFDL_Close will stop it immediately. */
/* After return the data flash clock is switched OFF. */
/* Input: - */
/* Output: - */
/* Return: - */
/* ---------------------------------------------------------------------------------------------------------------*/
extern void __far PFDL_Close(void);
/* ---------------------------------------------------------------------------------------------------------------*/
/* Block type: standard function */
/* ---------------------------------------------------------------------------------------------------------------*/
/* Purpose: Initiating execution of the PFDL request related to the data flash. */
/* The corresponding request variable has to be parametrized before. */
/* */
/* request_pstr->index_u16 : byte-index or block-number within PFDL-pool */
/* request_pstr->data_pu08 : start address of the RAM data that should be read/written */
/* request_pstr->bytecount_u16 : number of bytes has to be read/written */
/* request_pstr->command_enu : command code */
/* */
/* CAUTION: */
/* Due to the code size minimization no plausibility checks are done by the PFDL. */
/* */
/* Input: &request_pstr - pointer to PFDL request variable */
/* Output: - */
/* Return: status of the request */
/* ---------------------------------------------------------------------------------------------------------------*/
extern pfdl_status_t __far PFDL_Execute(__near pfdl_request_t* request_pstr);
/* ---------------------------------------------------------------------------------------------------------------*/
/* Block type: standard function */
/* ---------------------------------------------------------------------------------------------------------------*/
/* Purpose: Continuation of command execution and status update of requests being under execution. */
/* Input: - */
/* Output: - */
/* Return: PFDL status = */
/* PFDL_IDLE - no request is processed by PFDL, PFDL is ready to receive new requests */
/* PFDL_OK - processed request/command finished without problems */
/* PFDL_BUSY - request/command is still being processed */
/* other - flash or firmware related errors */
/* ---------------------------------------------------------------------------------------------------------------*/
extern pfdl_status_t __far PFDL_Handler(void);
/* ---------------------------------------------------------------------------------------------------------------*/
/* Block type: standard function */
/* ---------------------------------------------------------------------------------------------------------------*/
/* Purpose: Returns the start address of the library version string */
/* */
/* Input: - */
/* Output: - */
/* Return: starting address of the zero-terminated version string */
/* ---------------------------------------------------------------------------------------------------------------*/
extern __far pfdl_u08* __far PFDL_GetVersionString(void);
#endif

BIN
ECU_APP/DataFlash/pfdl.lib Normal file

Binary file not shown.

View File

@ -0,0 +1,146 @@
/*******************************************************************************
* Library : Flash Data Library T04 (PicoFDL)
*
* File Name : $Source: pfdl_types.h $
* Lib. Version : $RL78_FDL_LIB_VERSION_T04_REN: V1.05 $
* Mod. Revision : $Revision: 1.8 $
* Mod. Date : $Date: 2013/06/10 22:28:01JST $
* Device(s) : RL78
* Description : Type definitions used by the library
*******************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only
* intended for use with Renesas products. No other uses are authorized. This
* software is owned by Renesas Electronics Corporation and is protected under
* all applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software
* and to discontinue the availability of this software. By using this software,
* you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2011-2013 Renesas Electronics Corporation. All rights reserved.
*******************************************************************************/
#ifndef __PFDL_TYPES_H_INCLUDED
#define __PFDL_TYPES_H_INCLUDED
#ifndef __TYPEDEF__
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef signed short int16_t;
typedef unsigned short uint16_t;
typedef signed long int32_t;
typedef unsigned long uint32_t;
typedef unsigned short MD_STATUS;
#define __TYPEDEF__
#endif
/*==============================================================================================*/
/* unsigned type definitions */
/*==============================================================================================*/
typedef unsigned char pfdl_u08;
typedef unsigned int pfdl_u16;
typedef unsigned long int pfdl_u32;
/*==============================================================================================*/
/* global constant definitions */
/*==============================================================================================*/
/*==============================================================================================*/
/* global type definitions */
/*==============================================================================================*/
/* PFDL command code set */
typedef enum
{ /* ---------------------------------------------- */
PFDL_CMD_READ_BYTES = (0x00), /* 0x00, reads data from flash memory */
PFDL_CMD_IVERIFY_BYTES = (0x06), /* 0x06, verifies data if flash content is stable */
PFDL_CMD_BLANKCHECK_BYTES = (0x08), /* 0x08, checks if flash content is blank */
PFDL_CMD_WRITE_BYTES = (0x04), /* 0x04, writes data into flash memory */
PFDL_CMD_ERASE_BLOCK = (0x03) /* 0x03, erases one flash block */
} pfdl_command_t; /* ---------------------------------------------- */
/* PFDL error code set */
typedef enum
{
/* operation related status */ /* ---------------------------------------------- */
PFDL_IDLE = (0x30), /* 0x30, PFDL ready to receive requests */
PFDL_OK = (0x00), /* 0x00, command finished without problems */
PFDL_BUSY = (0xFF), /* 0xFF, command is being processed */
/* flash related status */ /* ---------------------------------------------- */
PFDL_ERR_PROTECTION = (0x10), /* 0x10, protection error (access right conflict) */
PFDL_ERR_ERASE = (0x1A), /* 0x1A, erase error */
PFDL_ERR_MARGIN = (0x1B), /* 0x1B, blankcheck or verify margin violated */
PFDL_ERR_WRITE = (0x1C), /* 0x1C, write error */
PFDL_ERR_PARAMETER = (0x05) /* 0x05, parameter error */
} pfdl_status_t; /* ---------------------------------------------- */
/* PFDL request type (base type for any PFDL access) */
typedef struct
{ /* ---------------------------------------------- */
pfdl_u16 index_u16; /* 2, W, virt. byte/block index inside PFDL-pool */
__near pfdl_u08* data_pu08; /* 2, W, pointer to the 1'st byte of data buffer */
pfdl_u16 bytecount_u16; /* 2, W, number of bytes to be transfered */
pfdl_command_t command_enu; /* 1, W, command code */
} pfdl_request_t; /*------------------------------------------------*/
/* 7 bytes in total */
/*------------------------------------------------*/
/* PFDL descriptor type */
typedef struct
{ /* ---------------------------------------------- */
pfdl_u08 fx_MHz_u08; /* 1, system frequency expressed in MHz */
pfdl_u08 wide_voltage_mode_u08; /* 1, programming voltage mode ( full/wide ) */
} pfdl_descriptor_t; /*------------------------------------------------*/
/* 2 bytes in total */
/*==============================================================================================*/
/* type definition plausibility check */
/*==============================================================================================*/
/* The following checks are implemented in order to check the correct size of the FDL type */
/* definitions at compile time. In case of a compilation error in the following lines, please */
/* check your compiler options for enumeration types and structures and contact your local */
/* support, if necessary. */
#define R_PFDLT04_ASSERT_CONCAT_(a, b) a##b
#define R_PFDLT04_ASSERT_CONCAT(a, b) R_PFDLT04_ASSERT_CONCAT_(a, b)
#define R_PFDLT04_STATIC_ASSERT(e) enum { R_PFDLT04_ASSERT_CONCAT(R_PFDLT04_ASSERT_LINE_, __LINE__) = 1/(!!(e)) }
/* assertion if unsigned data type size is not correct, please evaluate compiler settings for integer types */
R_PFDLT04_STATIC_ASSERT(sizeof(pfdl_u08)==1);
R_PFDLT04_STATIC_ASSERT(sizeof(pfdl_u16)==2);
R_PFDLT04_STATIC_ASSERT(sizeof(pfdl_u32)==4);
/* assertion if unsigned data type size is not correct, please evaluate compiler settings for enumeration types */
R_PFDLT04_STATIC_ASSERT(sizeof(pfdl_command_t)==1);
R_PFDLT04_STATIC_ASSERT(sizeof(pfdl_status_t)==1);
/* assertion if structure type size is not correct, please evaluate compiler settings for structure types */
R_PFDLT04_STATIC_ASSERT(sizeof(pfdl_request_t)>=7); /* sizeof(pfdl_request_t) == 7 for packed structures */
R_PFDLT04_STATIC_ASSERT(sizeof(pfdl_request_t)<=8); /* sizeof(pfdl_request_t) == 8 for unpacked structures */
R_PFDLT04_STATIC_ASSERT(sizeof(pfdl_descriptor_t)==2);
#endif

303
ECU_APP/DataFlash/r_pfdl.c Normal file
View File

@ -0,0 +1,303 @@
#include "r_cg_macrodriver.h"
#include "pfdl.h"
#include "pfdl_types.h"
/***********************************************************************************************************************
* Function Name: WriteDataflash
* Description :
* Arguments : buffer: to be writed data; Addr:Target absolute address,must be check for different mcu;lenth:to be writed number,<=1024
* Return Value : PFDL_OK -
Success
PFDL_IDLE -
Idling statement
PFDL_ERR_MARGIN -
Blank check error
other//if(Addr>=FLASH_START_ADDRESS&&Addr<FLASH_END_ADDRESS){
***********************************************************************************************************************/
uint8_t WriteDataflash(uint8_t* buffer,uint32_t Addr,uint16_t lenth)
{
static unsigned char Wr_Status;
pfdl_status_t ret;
pfdl_descriptor_t descriptor;
pfdl_request_t requester;
if(Addr>=0x000F1000 && Addr<0x000F2000)
{
if(Wr_Status == 0)
{
/* ---- Setting for PFDL_Open ---- */
descriptor.fx_MHz_u08 = FDL_FRQ;
descriptor.wide_voltage_mode_u08 = FDL_VOL;
PFDL_Open(&descriptor);
/* ---- Setting for blank check ---- */
requester.command_enu = PFDL_CMD_BLANKCHECK_BYTES;
requester.index_u16 = (unsigned int)(Addr - 0x0F1000);//g_write_address;0x0F1000 according to MCU
requester.bytecount_u16 = lenth;
ret = PFDL_Execute(&requester); /* Blank check */
Wr_Status = 1;
}
if(Wr_Status == 1)
{
/* ---- Waiting for command finish ---- */
while(ret == PFDL_BUSY)
{
ret = PFDL_Handler(); /* Status check process */
}
if(ret != PFDL_BUSY)
{
/* **** When blank check error **** */
if(ret == PFDL_ERR_MARGIN)
{
/* ---- Setting for erase ---- */
requester.command_enu = PFDL_CMD_ERASE_BLOCK;
requester.index_u16 = (unsigned int)(Addr - 0x0F1000)/0x400;//TARGET_BLOCK;
ret = PFDL_Execute(&requester); /* Erase block data */
Wr_Status = 2;
/* Erase data of target block */
}
/* **** When other than blank check error **** */
else
{
/* Do nothing */
}
/******When blank no check error***/
if(ret == PFDL_OK)
{
/* ---- Setting for write ---- */
requester.command_enu = PFDL_CMD_WRITE_BYTES;
requester.index_u16 = (unsigned int)(Addr - 0x0F1000);//g_write_address;;
requester.bytecount_u16 = lenth;
requester.data_pu08 = buffer;//&g_write_value;
ret = PFDL_Execute(&requester); /* Execute write */
Wr_Status = 3;
}
}
}
if(Wr_Status == 2)
{
/* ---- Waiting for command finish ---- */
while(ret == PFDL_BUSY)
{
ret = PFDL_Handler(); /* Status check process */
}
if(ret != PFDL_BUSY)
{
if(ret == PFDL_OK)
{
/* ---- Setting for write ---- */
requester.command_enu = PFDL_CMD_WRITE_BYTES;
requester.index_u16 = (unsigned int)(Addr - 0x0F1000);//g_write_address;;
requester.bytecount_u16 = lenth;
requester.data_pu08 = buffer;//&g_write_value;
ret = PFDL_Execute(&requester); /* Execute write */
Wr_Status = 3;
}
/* **** When blank check or data erase is failure **** */
else
{
ret = PFDL_NG;
//PFDL_Close(); /* Close FDL */
//Wr_Status = 0;
return ret;
}
}
}
if(Wr_Status == 3)
{
/* ---- Waiting for command finish ---- */
while(ret == PFDL_BUSY)
{
ret = PFDL_Handler(); /* Status check process */
}
if(ret != PFDL_BUSY)
{
/* ==== When write data is success ==== */
if(ret == PFDL_OK)
{
/* ---- Setting for verify ---- */
requester.command_enu = PFDL_CMD_IVERIFY_BYTES;
requester.index_u16 = (unsigned int)(Addr- 0x0F1000);//g_write_address;;
requester.bytecount_u16 = lenth;
ret = PFDL_Execute(&requester); /* Execute internal verify */
Wr_Status = 4;
}
/* ==== When writing data is failure ==== */
else
{
ret = PFDL_NG;
//PFDL_Close(); /* Close FDL */
//Wr_Status = 0;
return ret;
}
}
}
if(Wr_Status == 4)
{
/* ---- Waiting for command finish ---- */
while(ret == PFDL_BUSY)
{
ret = PFDL_Handler(); /* Status check process */
}
if(ret != PFDL_BUSY)
{
PFDL_Close(); /* Close FDL */
Wr_Status = 0;
return 0x11;//write data flash finished
}
}
}
else
{
ret = PFDL_NG;
Wr_Status = 0;
return ret;
}
}
uint8_t WriteDataflash1(uint8_t* buffer,uint32_t Addr,uint16_t lenth)
{
pfdl_status_t ret;
pfdl_descriptor_t descriptor;
pfdl_request_t requester;
if(Addr>=0x000F1000&&Addr<0x000F2000){
/* ---- Setting for PFDL_Open ---- */
descriptor.fx_MHz_u08 = FDL_FRQ;
descriptor.wide_voltage_mode_u08 = FDL_VOL;
PFDL_Open(&descriptor);
/* ---- Setting for blank check ---- */
requester.command_enu = PFDL_CMD_BLANKCHECK_BYTES;
requester.index_u16 = (unsigned int)(Addr - 0x0F1000);//g_write_address;0x0F1000 according to MCU
requester.bytecount_u16 = lenth;
ret = PFDL_Execute(&requester); /* Blank check */
/* ---- Waiting for command finish ---- */
while(ret == PFDL_BUSY)
{
ret = PFDL_Handler(); /* Status check process */
}
/* **** When blank check error **** */
if(ret == PFDL_ERR_MARGIN)
{
/* ---- Setting for erase ---- */
requester.command_enu = PFDL_CMD_ERASE_BLOCK;
requester.index_u16 = (unsigned int)(Addr - 0x0F1000)/0x400;//TARGET_BLOCK;
ret = PFDL_Execute(&requester); /* Erase block data */
/* ---- Waiting for command finish ---- */
while(ret == PFDL_BUSY)
{
ret = PFDL_Handler(); /* Status check process */
} /* Erase data of target block */
}
/* **** When other than blank check error **** */
else
{
/* Do nothing */
}
if(ret == PFDL_OK)
{
/* ---- Setting for write ---- */
requester.command_enu = PFDL_CMD_WRITE_BYTES;
requester.index_u16 = (unsigned int)(Addr - 0x0F1000);//g_write_address;;
requester.bytecount_u16 = lenth;
requester.data_pu08 = buffer;//&g_write_value;
ret = PFDL_Execute(&requester); /* Execute write */
/* ---- Waiting for command finish ---- */
while(ret == PFDL_BUSY)
{
ret = PFDL_Handler(); /* Status check process */
} /* Write data process */
/* ==== When write data is success ==== */
if(ret == PFDL_OK)
{
/* ---- Setting for verify ---- */
requester.command_enu = PFDL_CMD_IVERIFY_BYTES;
requester.index_u16 = (unsigned int)(Addr- 0x0F1000);//g_write_address;;
requester.bytecount_u16 = lenth;
ret = PFDL_Execute(&requester); /* Execute internal verify */
/* ---- Waiting for command finish ---- */
while(ret == PFDL_BUSY)
{
ret = PFDL_Handler();/* Status check process */
}
}
/* ==== When writing data is failure ==== */
else
{
ret = PFDL_NG;
}
}
/* **** When blank check or data erase is failure **** */
else
{
ret = PFDL_NG;
}
PFDL_Close(); /* Close FDL */
return ret;
}
else{
ret = PFDL_NG;
return ret;
}
}
/***********************************************************************************************************************
* Function Name: ReadFlashData
* Description :
* Arguments : buffer: to be read data;
Addr:Target absolute address,must be check for different mcu; Both codeflash & dataflash can be used
lenth:to be read number
* Return Value : None
***********************************************************************************************************************/
void ReadFlashData(uint8_t* buffer,uint32_t Addr,uint16_t lenth)
{
uint8_t temp;
volatile uint32_t w_count;
volatile uint8_t * snnumber;
/**** Only dataflash needed start*****/
if(0 == DFLEN)
{
DFLEN = 1U; //允许存取数据闪存
for (w_count = 0U; w_count < 15U; w_count++)//3U
{
NOP(); //延时,给硬件反应的时间
}
}
/**** Only dataflash needed end******/
snnumber = Addr;
for(temp = 0; temp < lenth; temp ++)
{
*buffer = *snnumber;
buffer ++;
snnumber ++;
}
//memcpy(buffer,snnumber,lenth);
}
/* End user code. Do not edit comment generated here */

View File

@ -0,0 +1,10 @@
内振32MHz
擦除 64Bytes和1024Bytes个00H时间一样为5.7mS
写入 1024Bytes个00H 需要46.8mS,写入时间和数据长度成线性关系
T04库的使用注意事项
1传参DMA对应的RAM地址都不要放到高速RAM区否则程序跑飞
2由于连续写入多个字节的时间较长建议不要采用提供函数中的死等的办法可以在主循环中查PFDL_Handler()
3读出可以直接用CPU指令不需要库
4输入的地址超出范围库的返回值有可能不报错镜像区不报错保留区跑飞

1074
ECU_APP/ECU_APP.dm01.mtud Normal file

File diff suppressed because one or more lines are too long

934
ECU_APP/ECU_APP.fcb19.mtud Normal file

File diff suppressed because one or more lines are too long

4812
ECU_APP/ECU_APP.mtpj Normal file

File diff suppressed because it is too large Load Diff

2325
ECU_APP/ECU_APP.rcpe Normal file

File diff suppressed because it is too large Load Diff

8272
ECU_APP/OutPut/ECU-BOOT.hex Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,38 @@
S01100000000486578766965772056312E3009
S32500005A010102214E34FC0F009BFC0F00ADFC0F002CFD0F0071109008D70071189008D70050
S32500005A21C7C5C3C1712090088EFDC1410F36B4FA32B4FB34800A11ABB9A7A7A5A51743DFC1
S32500005A41F5C09EFDC0C2C4C6D700C7C5C3C1713090088EFDC1410F36B4FB3234FC34800B21
S32500005A61EED3FF00C7C5C3C1721516348008F6B9A5A53544C00835DFF68EFDC1629EFD3138
S32500005A8182A13DF1114E0261E8710091089F0308114E0061E8E19F010830800814BF040888
S32500005AA1118C0199410E114FE8FFDC1411F9E9FF6142DC0C5200FCF8FF0E71009008EF0258
S32500005AC15205C09EFDC062C2C4C6D7FFC35204EF0DC35200EF08C35202EF03C35206FE275F
S32500005AE10061F8EC800A0F511FC2D700C151FF500FEF1AC151475007EF13C151475007EFEE
S32500005B010CC151475047EF05C151F750075F90086148C0D7C7C5C18EFC758EFD74CEFC0FD3
S32500005B2169740B61CBFCC4080F624CFFDD4771489008717890088F9008315539510F9EFCF0
S32500005B41AF920861CB5203EF065206EF025208A80016410E11AFE6FF47DC1817312D9F02D9
S32500005B6108609F0108F50008F50308300004BF0608EF655205659EFC649EFDC062C4C6C2F9
S32500005B81D7A800168C00708C01BF04088C025C03DFE18C05D1DFDC8C06D1DDD74C41DED3F6
S32500005BA170F1312DBF0608B1B1C5148C02708C03BF000805358C049F02081C003516157064
S32500005BC1C4DCB0410E66113FDFFF67113FE0FF60113FE1FFDE9D520413FCF8FF0E624CFFD3
S32500005BE1DF938F910831031071409008604C0361F871709008EE7DFFFCC4080FEFDF0000E7
S32500005C010000000000000000B10AB50AB90AED0A910A0000C7C5C18EFC758EFD74CEFC0F8A
S32500005C2169F80B61CB308008BF04085210FCF8FF0ED2DF14635F80089F8008635C0161E8A0
S32500005C41710080085211EF1271589008659EFC649EFDC062C4C6C2D75213FCF8FF0E624C28
S32500005C61FFDF0C8F910831031571409008EFDD8F90083155D7510F9EFCAF920861CBFCC4FA
S32500005C81080FEFDA0000000000000000910BC40B00000000C1201414C80A0F8A2198008AFB
S32500005CA12298018A2398023024FAB808CEFC0FAEF8143624FA510F61FA9803D1DF3030D4AC
S32500005CC1F9B804C8060FCEFC0F36D4F961FACEFC0F30E0F9B810C8120F36E0F961FACEFC2D
S32500005CE10F300AFAB80CC80E0F360AFA61FAA814148803705110BA041016D7C1CEFC0F3665
S32500005D01DAF961FAC4C5300020BA04C6D7C1200814AA0E12316CAA0C1631AE0360980117F8
S32500005D215C036168DD058801819801AA0A12316CAA0831AE03609803F198008801708800B3
S32500005D416148DD45150414001615041200148B9EFCA91661FA3091FAB804C8060FCEFC0F83
S32500005D61C0C188036108318E3691FA61FA9802D1DF0DA80814300030BA04880081EFBAA839
S32500005D8108148802705130BA04100AD7C12012148A085C0361E8EEB000AA10B804B806AAF9
S32500005DA10AB800AA08B802B808A800B80AAA0E16440000AA0C1261F8440001DC250400FF08
S32500005DC1BA0C1761C8B1BA0EC80C40A804040001BA10A802040001BA08A80061D8A1BA0AF7
S32500005DE1EF191731ED1613312E0716625C03DD0317A11666980CF6BA0EBA0C15041400167A
S32500005E0115041200148B9EFCA91661FA309BFAB80EC8100FCEFC0F369BFAAEF804060061D6
S32500005E21FA9800D1DF1AA81214300040BA04AA0E6168AA0C61F8616861E8EE5CFF1014D71D
S32500005E41A81214C0C15140EF03300540BA04EFEDFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF6A
S32500005E61FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF3B
S705FFFFFFFFFE

View File

@ -0,0 +1,314 @@
QualityReport
2023年7月8日 11:05:15
------ Start build(ECU_APP, DefaultBuild) ------
E:\Program Files (x86)\renesas\CS+\CC\CC-RL\V1.11.00\Bin\ccrl.exe user\appTask.c -cpu=S3 -obj_path=DefaultBuild "-dev=E:\Program Files (x86)\renesas\CS+\CC\Device\RL78\Devicefile\DR5F10BBG.DVF" -g -g_line -I diagnose\DTC -I diagnose\CanTrcv -I sys -I . -I rscan_driver -I diagnose -I DataFlash -I CanNw -I diagnose\CanTp -I diagnose\CanIf -I user -D DEBUG1 -c -msg_lang=english
user\appTask.c(40):W0520172:External/internal linkage conflict with previous declaration
user\appTask.c(178):W0523082:Pointer to the object of even alignment holds the odd address
user\appTask.c(182):W0520513:A value of type "MotorStateEE_Type __near *" cannot be assigned to an entity of type "uint8_t *"
user\appTask.c(220):W0520513:A value of type "MotorStateEE_Type __near *" cannot be assigned to an entity of type "uint8_t *"
user\appTask.c(463):W0523077:Called function should have prototype
user\appTask.c(517):W0523077:Called function should have prototype
E:\Program Files (x86)\renesas\CS+\CC\CC-RL\V1.11.00\Bin\rlink.exe -subcommand=DefaultBuild\ECU_APP.clnk
W0561017:The evaluation period of CC-RL V1 has expired. Please consider purchasing the product.
RAMDATA SECTION: 00000c81 Byte(s)
ROMDATA SECTION: 00000681 Byte(s)
PROGRAM SECTION: 00004e70 Byte(s)
W0561017:The evaluation period of CC-RL V1 has expired. Please consider purchasing the product.
W0561017:The evaluation period of CC-RL V1 has expired. Please consider purchasing the product.
Renesas Optimizing Linker Completed
------ Build ended(Error:0, Warning:9)(ECU_APP, DefaultBuild) ------
--- CommandFile 1 ---
DefaultBuild\ECU_APP.clnk :
-Input=DefaultBuild\cstart.obj
-Input=DefaultBuild\stkinit.obj
-Input=DefaultBuild\r_pfdl.obj
-Input=DefaultBuild\RL78_RCAN.obj
-Input=DefaultBuild\r_rl78_can_drv.obj
-Input=DefaultBuild\r_rl78_can_irq.obj
-Input=DefaultBuild\r_systeminit.obj
-Input=DefaultBuild\r_main.obj
-Input=DefaultBuild\r_cg_wdt_user.obj
-Input=DefaultBuild\r_cg_wdt.obj
-Input=DefaultBuild\r_cg_timer_user.obj
-Input=DefaultBuild\r_cg_timer.obj
-Input=DefaultBuild\r_cg_port_user.obj
-Input=DefaultBuild\r_cg_port.obj
-Input=DefaultBuild\r_cg_cgc_user.obj
-Input=DefaultBuild\r_cg_cgc.obj
-Input=DefaultBuild\r_cg_adc_user.obj
-Input=DefaultBuild\r_cg_adc.obj
-Input=DefaultBuild\VectorTable.obj
-Input=DefaultBuild\CanNw.obj
-Input=DefaultBuild\CanNwConfig.obj
-Input=DefaultBuild\Dcm_App.obj
-Input=DefaultBuild\Dcm_App_Cfg.obj
-Input=DefaultBuild\Dcm_Cfg.obj
-Input=DefaultBuild\Dcm_DID.obj
-Input=DefaultBuild\Dcm_DID_Cfg.obj
-Input=DefaultBuild\Dcm_Key.obj
-Input=DefaultBuild\extern.obj
-Input=DefaultBuild\CanIf.obj
-Input=DefaultBuild\CanIf_Cfg.obj
-Input=DefaultBuild\CanTp_Cfg.obj
-Input=DefaultBuild\CanTrcv.obj
-Input=DefaultBuild\CanTrcv_Cfg.obj
-Input=DefaultBuild\DCM_DTC.obj
-Input=DefaultBuild\Dcm.obj
-Input=DefaultBuild\CanTp.obj
-Input=DefaultBuild\appTask.obj
-Input=DefaultBuild\can_user.obj
-Input=DefaultBuild\hwCtrl.obj
-LIBrary=DataFlash\pfdl.lib
-SECURITY_ID=00000000000000000000
-DEVICE=E:\Program Files (x86)\renesas\CS+\CC\Device\RL78\Devicefile\DR5F10BBG.DVF
-DEBug
-NOCOmpress
-NOOPtimize
-OUtput=DefaultBuild\ECU_APP.abs
-LIBrary=E:\Program Files (x86)\renesas\CS+\CC\CC-RL\V1.11.00\lib\rl78em4s.lib
-LIBrary=E:\Program Files (x86)\renesas\CS+\CC\CC-RL\V1.11.00\lib\malloc_n.lib
-LIBrary=E:\Program Files (x86)\renesas\CS+\CC\CC-RL\V1.11.00\lib\rl78em4r.lib
-OCDBG=04
-USER_OPT_BYTE=E933E8
-LISt=DefaultBuild\ECU_APP.map
-SHow=Reference,Xreference,Total_size,STRUCT
-STARt=VectorRemapingAddr_n,.const,.text,.RLIB,.SLIB,PFDL_COD,.textf,.constf,.data,.sdata/0A000,DID_TBL_f/19C00,KAM_SEG_n/FE500,.dataR,.bss/FE510,.sdataR,.sbss/FFE20
-ROm=.data=.dataR
-ROm=.sdata=.sdataR
-Message
-Total_size
-NOLOgo
-end
-Input=DefaultBuild\ECU_APP.abs
-DEVICE=E:\Program Files (x86)\renesas\CS+\CC\Device\RL78\Devicefile\DR5F10BBG.DVF
-OUtput=DefaultBuild\ECU_APP.mot
-FOrm=Stype
-REcord=S3
-BYte_count=10
-Message
-end
-Input=DefaultBuild\ECU_APP.abs
-DEVICE=E:\Program Files (x86)\renesas\CS+\CC\Device\RL78\Devicefile\DR5F10BBG.DVF
-OUtput=output\ECU_APP.S19= A000-19FFF
-FOrm=Stype
-REcord=S3
-SPace=FF
-BYte_count=10
-Message
-exit
--- SHA1 hash value of output files ---
F:\FCB_project\temp\QJTYKG\CODE\ECU_APP\DefaultBuild\ECU_APP.abs: 3393fdfcf53e024b805b9329f40fd209069e05f2
F:\FCB_project\temp\QJTYKG\CODE\ECU_APP\DefaultBuild\ECU_APP.mot: b8037c39ccdf9b91f8854348bb4d3f04e62a4226
F:\FCB_project\temp\QJTYKG\CODE\ECU_APP\output\ECU_APP.S19: eec21cf453c16081b6888d759df9b8609d969337
--- System Information ---
*OS Version
Microsoft Windows 10 专业版 (-, 10.0.19044, WOW64)
*Language
中文(中国)
*.NET Framework Version
Microsoft .NET Framework 4 [.NET 4.6 or later] (4.0.30319.42000)
--- Application Information ---
*Product Name
CS+ for CC
*Package Version
V8.07.00 [01 Dec 2021]
*Version
V9.07.00.06 [15 Nov 2021]
*Assembly Version
3.12.10.1
*Sales Area
Japan
*Product License
*Execution Place
E:\Program Files (x86)\renesas\CS+\CC
*Memory Usage
*Private Working Set
232 MB
*Number of GDI Objects
2059
*Number of USER Objects
926
*Opened Files
1 editors, 1 files, 14 KB
--- Build Tool Plug-in Information ---
RH850 Build tool CC-RH Plug-in
*Version
V8.02.00.00 [25 Mar 2019]
*Assembly Version
1.1.10.12
*DLL File Name
BuildToolCCRH.dll
RL78 Build tool CC-RL Plug-in
*Version
V8.05.00.00 [08 Oct 2020]
*Assembly Version
1.0.0.0
*DLL File Name
BuildToolCCRL.dll
RX Build tool CC-RX Plug-in
*Version
V8.02.00.00 [25 Mar 2019]
*Assembly Version
3.12.10.1
*DLL File Name
BuildToolCCRX.dll
RH850 Build tool GHS CCRH850 Plug-in
*Version
V1.05.00.00 [08 Oct 2020]
*Assembly Version
1.0.0.0
*DLL File Name
BuildToolGHSCCRH850.dll
--- Debug Tool Plug-in Information ---
Debugger Collection Plug-in
*Version
V8.07.00.05 [01 Dec 2021]
*Assembly Version
2.12.10.1
*DLL File Name
DebugToolCollection.dll
--- Other Plug-in Information ---
Code Generator Plug-in
*Version
V4.08.05.01 [14 Aug 2020]
*Assembly Version
3.0.0.0
*DLL File Name
CodePart.dll
Code Generator/PinView Plug-in
*Version
V2.10.07.02 [08 Nov 2021]
*Assembly Version
1.0.0.0
*DLL File Name
CodePart2.dll
Debug Console Plug-in
*Version
V7.00.00.01 [06 Apr 2018]
*Assembly Version
7.0.0.0
*DLL File Name
DebugConsole.dll
Quick and Effective tool solution - QE
*Version
V9.06.00.04 [25 May 2021]
*Assembly Version
1.15.10.16
*DLL File Name
InCarTools.dll
Pin Configurator Plug-in
*Version
V1.54.01.01 [31 Jul 2014]
*Assembly Version
1.6.10.23
*DLL File Name
PinConfig.dll
Program Analyzer Plug-in
*Version
V4.12.00.01 [14 Apr 2021]
*Assembly Version
3.12.11.9
*DLL File Name
ProgramAnalyzer.dll
IronPython Console Plug-in
*Version
V1.43.00.02 [29 Oct 2021]
*Assembly Version
1.6.10.23
*DLL File Name
PythonConsole.dll
Editor plug-in DLL
*Version
V1.17.00.01 [15 Oct 2020]
*Assembly Version
1.1.0.0
*DLL File Name
SEditor.dll
Stack Usage Tracer
*Version
V1.05.00.02 [30 Jul 2014]
*Assembly Version
1.30.11.15
*DLL File Name
Stk.dll
Update Manager Plug-in
*Version
V2.03.00.02 [29 Oct 2018]
*Assembly Version
1.13.6.20
*DLL File Name
Update.dll
Debug Tool Common Interface
*Version
V8.07.00.05 [01 Dec 2021]
*Assembly Version
3.12.10.1
*DLL File Name
CommonDebuggerInterface.dll
Device Information Common Interface
*Version
V9.07.00.01 [14 Oct 2021]
*Assembly Version
3.0.0.0
*DLL File Name
DeviceInformation.dll
--- Main Project Information ---
F:\FCB_project\temp\QJTYKG\CODE\ECU_APP\ECU_APP.mtpj
Microcontroller Information
*R5F10BBG
*File Name: Version
RL78_Productlist.xml: V8.070000
R5F10BBG_common.xml: V1.13.00.XX.02
DR5F10BBG.DVF: V1.11
f13_bbx.ti: V1.01
-: -
Build Tool Information
*CC-RL
* Version of plug-in(*.dll)
V8.07.00.03 [11 Nov 2021]
* The Version of the Compiler Package
V1.11.00
* The version of SMS Assembler
V1.00.00.01 [29 May 2020]
Debug Tool Information
*RL78 E1(Serial)
Debugger Library V8.07.00.05 [01 Dec 2021]
Other Tool Information
*None
*None
*Pin Configurator
*Program Analyzer
*Version
V4.12.00.01 [14 Apr 2021]
*Code Generator
Other Information
*RL78/F13 Code Library
*Version
V2.03.07.02 [08 Nov 2021]
*Description
Code library for RL78/F13 code generation plugin.

228
ECU_APP/cstart.asm Normal file
View File

@ -0,0 +1,228 @@
; Copyright (C) 2014 Renesas Electronics Corporation
; RENESAS ELECTRONICS CONFIDENTIAL AND PROPRIETARY.
; This program must be used solely for the purpose for which
; it was furnished by Renesas Electronics Corporation. No part of this
; program may be reproduced or disclosed to others, in any
; form, without the prior written permission of Renesas Electronics
; Corporation.
; NOTE : THIS IS A TYPICAL EXAMPLE.
$IFNDEF __RENESAS_VERSION__
__RENESAS_VERSION__ .EQU 0x01000000
$ENDIF
.public _start
.public _exit
;-----------------------------------------------------------------------------
; RAM section
;-----------------------------------------------------------------------------
.SECTION .dataR, DATA
.SECTION .sdataR, DATA
; .SECTION .datafR, DATAF
; .SECTION .textfR, TEXTF
$IF (__RENESAS_VERSION__ < 0x01010000) ; for CC-RL V1.00
;-----------------------------------------------------------------------------
; stack area
;-----------------------------------------------------------------------------
; !!! [CAUTION] !!!
; Set up stack size suitable for a project.
.SECTION .stack_bss, BSS
_stackend:
.DS 0x200
_stacktop:
$ENDIF
;-----------------------------------------------------------------------------
; RESET vector
;-----------------------------------------------------------------------------
_start .VECTOR 0
;-----------------------------------------------------------------------------
; startup
;-----------------------------------------------------------------------------
.SECTION .text, TEXT
_start:
;--------------------------------------------------
; setting register bank
;--------------------------------------------------
; SEL RB0
;--------------------------------------------------
; setting mirror area
;--------------------------------------------------
; ONEB !PMC ; mirror area = 10000-1FFFFH
;--------------------------------------------------
; setting the stack pointer
;--------------------------------------------------
$IF (__RENESAS_VERSION__ >= 0x01010000)
MOVW SP,#LOWW(__STACK_ADDR_START)
$ELSE ; for CC-RL V1.00
MOVW SP,#LOWW(_stacktop)
$ENDIF
;--------------------------------------------------
; initializing stack area
;--------------------------------------------------
;$IF (__RENESAS_VERSION__ >= 0x01010000)
; MOVW AX,#LOWW(__STACK_ADDR_END)
;$ELSE ; for CC-RL V1.00
; MOVW AX,#LOWW(_stackend)
;$ENDIF
; CALL !!_stkinit
;--------------------------------------------------
; hardware initialization
;--------------------------------------------------
CALL !!_hdwinit
;--------------------------------------------------
; initializing BSS
;--------------------------------------------------
; clear external variables which doesn't have initial value (near)
MOVW HL,#LOWW(STARTOF(.bss))
MOVW AX,#LOWW(STARTOF(.bss) + SIZEOF(.bss))
BR $.L2_BSS
.L1_BSS:
MOV [HL+0],#0
INCW HL
.L2_BSS:
CMPW AX,HL
BNZ $.L1_BSS
; clear saddr variables which doesn't have initial value
MOVW HL,#LOWW(STARTOF(.sbss))
MOVW AX,#LOWW(STARTOF(.sbss) + SIZEOF(.sbss))
BR $.L2_SBSS
.L1_SBSS:
MOV [HL+0],#0
INCW HL
.L2_SBSS:
CMPW AX,HL
BNZ $.L1_SBSS
; clear external variables which doesn't have initial value (far)
; MOV ES,#HIGHW(STARTOF(.bssf))
; MOVW HL,#LOWW(STARTOF(.bssf))
; MOVW AX,#LOWW(STARTOF(.bssf) + SIZEOF(.bssf))
; BR $.L2_BSSF
;.L1_BSSF:
; MOV ES:[HL+0],#0
; INCW HL
;.L2_BSSF:
; CMPW AX,HL
; BNZ $.L1_BSSF
;--------------------------------------------------
; ROM data copy
;--------------------------------------------------
; copy external variables having initial value (near)
MOV ES,#HIGHW(STARTOF(.data))
MOVW BC,#LOWW(SIZEOF(.data))
BR $.L2_DATA
.L1_DATA:
DECW BC
MOV A,ES:LOWW(STARTOF(.data))[BC]
MOV LOWW(STARTOF(.dataR))[BC],A
.L2_DATA:
CLRW AX
CMPW AX,BC
BNZ $.L1_DATA
; copy saddr variables having initial value
MOV ES,#HIGHW(STARTOF(.sdata))
MOVW BC,#LOWW(SIZEOF(.sdata))
BR $.L2_SDATA
.L1_SDATA:
DECW BC
MOV A,ES:LOWW(STARTOF(.sdata))[BC]
MOV LOWW(STARTOF(.sdataR))[BC],A
.L2_SDATA:
CLRW AX
CMPW AX,BC
BNZ $.L1_SDATA
; copy external variables having initial value (far)
; MOVW BC,#LOWW(SIZEOF(.dataf))
; BR $.L2_DATAF
;.L1_DATAF:
; DECW BC
; MOV ES,#HIGHW(STARTOF(.dataf))
; MOV A,ES:LOWW(STARTOF(.dataf))[BC]
; MOV ES,#HIGHW(STARTOF(.datafR))
; MOV ES:LOWW(STARTOF(.datafR))[BC],A
;.L2_DATAF:
; CLRW AX
; CMPW AX,BC
; BNZ $.L1_DATAF
; copy .text to RAM
; MOV C,#HIGHW(STARTOF(.textf))
; MOVW HL,#LOWW(STARTOF(.textf))
; MOVW DE,#LOWW(STARTOF(.textfR))
; BR $.L2_TEXT
;.L1_TEXT:
; MOV A,C
; MOV ES,A
; MOV A,ES:[HL]
; MOV [DE],A
; INCW DE
; INCW HL
; CLRW AX
; CMPW AX,HL
; SKNZ
; INC C
;.L2_TEXT:
; MOVW AX,HL
; CMPW AX,#LOWW(STARTOF(.text) + SIZEOF(.text))
; BNZ $.L1_TEXT
;--------------------------------------------------
; call main function
;--------------------------------------------------
CALL !!_main ; main();
;--------------------------------------------------
; call exit function
;--------------------------------------------------
CLRW AX ; exit(0)
_exit:
BR $_exit
;-----------------------------------------------------------------------------
; section
;-----------------------------------------------------------------------------
$IF (__RENESAS_VERSION__ >= 0x01010000)
.SECTION .RLIB, TEXTF
.L_section_RLIB:
.SECTION .SLIB, TEXTF
.L_section_SLIB:
$ENDIF
.SECTION .textf, TEXTF
.L_section_textf:
.SECTION .const, CONST
.L_section_const:
.SECTION .constf, CONSTF
.L_section_constf:
.SECTION .data, DATA
.L_section_data:
;.SECTION .dataf, DATAF
;.L_section_dataf:
.SECTION .sdata, SDATA
.L_section_sdata:
.SECTION .bss, BSS
.L_section_bss:
;.SECTION .bssf, BSSF
;.L_section_bssf:
.SECTION .sbss, SBSS
.L_section_sbss:
.SECTION User_Data, CONSTF
.ORG 0x19ff0
.DB4 0xAA5555AA

30
ECU_APP/diagnose/CanIf.h Normal file
View File

@ -0,0 +1,30 @@
#if !defined(CANIF_H)
#define CANIF_H
/***°üº¬Í·Îļþ***/
#include "ComTypes.h"
#include "CanTrcv.h"
#include "CanIf_Cfg.h"
//#include "canhl.h"
/***API½Ó¿Ú***/
extern void ReInitCanIf_Parameter(void);
extern void CanIf_MainFunction(void);
extern void InitCanIf_Parameter(void);
extern void DeInitCanIf_Parameter(void);
extern ComStd_ReturnType SetCanIf_BusoffEvent(CanIf_ControllerErrorType LeCanIf_u_BusoffEvent);
extern ComStd_ReturnType SetCanIf_WakeUpEvent(CanIf_WakeUpSourceType LeCanIf_e_WakeUpSource);
extern ComStd_ReturnType ClrCanIf_WakeUpEvent(CanIf_WakeUpSourceType LeCanIf_e_WakeUpSource);
extern ComStd_ReturnType GetCanIf_WakeUpEvent(CanIf_WakeUpSourceType *LeCanIf_e_WakeUpSource);
extern ComStd_ReturnType SetCanIf_ControllerMode(CanIf_ControllerModeType LeCanIf_e_ControllerMode);
extern ComStd_ReturnType GetCanIf_ControllerMode(CanIf_ControllerModeType *LeCanIf_e_ControllerModePtr);
extern ComStd_ReturnType GetCanIf_TransceiverMode(CanTrcv_WorkModeType *LeCanIf_e_WorkModePtr);
extern ComStd_ReturnType SetCanIf_TransceiverMode(CanTrcv_WorkModeType LeCanIf_e_WorkMode);
extern void RxIndicationCanIf_Messages(CanIf_HwHandleType Hrh, CanIf_CanIdType LeCanIf_e_CanId, CanIf_CanDlcType LeCanIf_e_CanDlc, CanIf_CanDataType* LeCanIf_e_CanSduPtr);
extern ComStd_ReturnType TransmitCanIf_Buffer(CanIf_CanIdType LeCanIf_t_TxCanID,CanIf_CanDlcType LeCanIf_t_TxCanDlc,CanIf_CanDataType *LeCanIf_t_TxCanDataPtr);
extern void ConfirmCanIf_TxOK(ComUint8 LeCanIf_e_Hrh,CanIf_CanIdType LeCanIf_t_TxCanID);
extern ComStd_ReturnType ResetCanIf_Controller(ComUint8 LeCanIf_u_Channel);
#endif

View File

@ -0,0 +1,592 @@
/**------------------历史版本信息-------------------------------------------------------
** :
** V1.0
** :
** :
**-------------------------------------------------------------------------------------*/
#include "CanIf.h"
//#include "CanNM.h"
/***************************************************************************************/
static CanIf_ControllerModeType TeCanIf_e_ControllerMode;
static CanTrcv_WorkModeType TeCanTrcv_e_WorkMode;
static ComUint8 SeCanIf_u_IsInit;
static ComUint8 SeCanIf_u_WakeEvent;
static ComUint32 SeCanIf_u_TxQueueCounter;
static CanIf_TxQueueType TsCanIf_h_TxQueue[CANIF_CFG_MAX_TX_HANDLE];
extern unsigned char TransmitCAN_Message(unsigned int ID,unsigned char Dlc,unsigned char *Data);
/****************************************************************************************
@ : void ClearCanIf_Queue(void)
@ : void
@ : void
@ :
@ : 2015/04/08
@ : V1.0
@ :
*****************************************************************************************/
void ClearCanIf_Queue(void)
{
ComUint8 LeCanIf_u_Index;
SeCanIf_u_TxQueueCounter = 0;
for(LeCanIf_u_Index = 0; LeCanIf_u_Index < CANIF_CFG_MAX_TX_HANDLE; LeCanIf_u_Index++)
{
TsCanIf_h_TxQueue[LeCanIf_u_Index].eCanIf_CanId = 0x00;
TsCanIf_h_TxQueue[LeCanIf_u_Index].eCanIf_CanDlc = 0x00;
TsCanIf_h_TxQueue[LeCanIf_u_Index].eQueued = 0x00;
TsCanIf_h_TxQueue[LeCanIf_u_Index].eCanIf_Txdata[0] = 0x00;
TsCanIf_h_TxQueue[LeCanIf_u_Index].eCanIf_Txdata[1] = 0x00;
TsCanIf_h_TxQueue[LeCanIf_u_Index].eCanIf_Txdata[2] = 0x00;
TsCanIf_h_TxQueue[LeCanIf_u_Index].eCanIf_Txdata[3] = 0x00;
TsCanIf_h_TxQueue[LeCanIf_u_Index].eCanIf_Txdata[4] = 0x00;
TsCanIf_h_TxQueue[LeCanIf_u_Index].eCanIf_Txdata[5] = 0x00;
TsCanIf_h_TxQueue[LeCanIf_u_Index].eCanIf_Txdata[6] = 0x00;
TsCanIf_h_TxQueue[LeCanIf_u_Index].eCanIf_Txdata[7] = 0x00;
}
}
/****************************************************************************************
@ : void DeInitCanIf_Parameter(void)
@ : void
@ : void
@ :
@ : 2015/03/14
@ : V1.0
@ :
*****************************************************************************************/
void DeInitCanIf_Parameter(void)
{
SeCanIf_u_IsInit = COM_FALSE;
}
/****************************************************************************************
@ : void ReInitCanIf_Parameter(void)
@ : void
@ : void
@ :
@ : 2015/05/7
@ : V1.0
@ :
*****************************************************************************************/
void ReInitCanIf_Parameter(void)
{
SeCanIf_u_IsInit = COM_TRUE;
}
/****************************************************************************************
@ : void InitCanIf_Parameter(void)
@ : void
@ : void
@ :
@ : 2015/03/14
@ : V1.0
@ : called by main
*****************************************************************************************/
void InitCanIf_Parameter(void)
{
TeCanIf_e_ControllerMode = CANIF_CS_STOP;
TeCanTrcv_e_WorkMode = CANTRCV_STANDBY;
ClearCanIf_Queue();
SeCanIf_u_IsInit = COM_TRUE;
}
/****************************************************************************************
@ : ComStd_ReturnType SetCanIf_BusoffEvent(void)
@ : void
@ : ComStd_ReturnType
@ :
@ : 2015/03/14
@ : V1.0
@ : called by can module to indicator busoff event has happened
*****************************************************************************************/
#if 0
ComStd_ReturnType SetCanIf_BusoffEvent(CanIf_ControllerErrorType LeCanIf_u_BusoffEvent)
{
(void)LeCanIf_u_BusoffEvent;
SetCanSM_BusoffEvent(LeCanIf_u_BusoffEvent);
return COM_E_OK;
}
#endif
/****************************************************************************************
@ : ComStd_ReturnType ResetCanIf_Controller(ComUint8 LeCanIf_u_Channel)
@ : LeCanIf_u_Channel
@ : ComStd_ReturnType
@ :
@ : 2015/04/13
@ : V1.0
@ : called by can module to indicator busoff event has happened
*****************************************************************************************/
ComStd_ReturnType ResetCanIf_Controller(ComUint8 LeCanIf_u_Channel)
{
(void)LeCanIf_u_Channel;
#if 0
ResetCan_Controller();
#endif
return COM_E_OK;
}
/****************************************************************************************
@ : ComStd_ReturnType SetCanIf_WakeUpEvent(CanIf_WakeUpSourceType LeCanIf_u_WakeUpSource)
@ : CanIf_WakeUpSourceType LeCanIf_e_WakeUpSource
@ : ComStd_ReturnType
@ :
@ : 2015/03/14
@ : V1.0
@ : called by can/cantrcv/ICU module to indicator wakeup event has happened
*****************************************************************************************/
ComStd_ReturnType SetCanIf_WakeUpEvent(CanIf_WakeUpSourceType LeCanIf_e_WakeUpSource)
{
SeCanIf_u_WakeEvent |= LeCanIf_e_WakeUpSource;
//SetCanNM_NmMode(NMStatus_WAITCHECK,NoActiveLoad);
return COM_E_OK;
}
ComStd_ReturnType ClrCanIf_WakeUpEvent(CanIf_WakeUpSourceType LeCanIf_e_WakeUpSource)
{
SeCanIf_u_WakeEvent &= ~LeCanIf_e_WakeUpSource;
return COM_E_OK;
}
ComStd_ReturnType GetCanIf_WakeUpEvent(CanIf_WakeUpSourceType *LeCanIf_e_WakeUpSource)
{
*LeCanIf_e_WakeUpSource = SeCanIf_u_WakeEvent;
return COM_E_OK;
}
/****************************************************************************************
@ : ComStd_ReturnType SetCanIf_ControllerMode(CanIf_ControllerModeType LeCanIf_e_RequestedMode)
@ : CanIf_ControllerModeType LeCanIf_e_RequestedMode
@ : ComStd_ReturnType
@ : Call by CanSM
@ : 2015/03/14
@ : V1.0
@ : CanIf Layer Set Controller RequestMode
*****************************************************************************************/
ComStd_ReturnType SetCanIf_ControllerMode(CanIf_ControllerModeType LeCanIf_e_RequestedMode)
{
#if 0
SetCan_ControllerMode(LeCanIf_e_RequestedMode);
TeCanIf_e_ControllerMode = LeCanIf_e_RequestedMode;
#endif
return COM_E_OK;
}
/****************************************************************************************
@ : ComStd_ReturnType GetCanIf_ControllerMode(CanIf_ControllerModeType *LeCanIf_e_ControllerModePtr)
@ : CanIf_ControllerModeType *LeCanIf_e_ControllerModePtr
@ : ComStd_ReturnType
@ :
@ : 2015/03/14
@ : V1.0
@ : Upper Layer Get Controller Mode
*****************************************************************************************/
ComStd_ReturnType GetCanIf_ControllerMode(CanIf_ControllerModeType *LeCanIf_e_ControllerModePtr)
{
*LeCanIf_e_ControllerModePtr = TeCanIf_e_ControllerMode;
return COM_E_OK;
}
/****************************************************************************************
@ : ComStd_ReturnType GetCanIf_TransceiverMode(CanTrcv_WorkModeType *LeCanIf_e_WorkModePtr)
@ : CanTrcv_WorkModeType *LeCanIf_e_WorkModePtr
@ : ComStd_ReturnType
@ :
@ : 2015/03/14
@ : V1.0
@ : Upper Layer Get Transceive Mode
*****************************************************************************************/
ComStd_ReturnType GetCanIf_TransceiverMode(CanTrcv_WorkModeType *LeCanIf_e_WorkModePtr)
{
*LeCanIf_e_WorkModePtr = TeCanTrcv_e_WorkMode;
return COM_E_OK;
}
/****************************************************************************************
@ : ComStd_ReturnType SetCanIf_TransceiverMode(CanTrcv_WorkModeType LeCanIf_e_WorkMode)
@ : CanTrcv_WorkModeType LeCanIf_e_WorkMode
@ : ComStd_ReturnType
@ :
@ : 2015/03/14
@ : V1.0
@ :
*****************************************************************************************/
ComStd_ReturnType SetCanIf_TransceiverMode(CanTrcv_WorkModeType LeCanIf_e_WorkMode)
{
SetCanTrcv_WorkMode(LeCanIf_e_WorkMode);
TeCanTrcv_e_WorkMode = LeCanIf_e_WorkMode;
return COM_E_OK;
}
/****************************************************************************************
@ : void RxIndicationCanIf_Messages(CanIf_HwHandleType LeCanIf_e_Hrh, CanIf_CanIdType LeCanIf_e_CanId, CanIf_CanDlcType LeCanIf_e_CanDlc, const CanIf_CanDataType* LeCanIf_e_CanSduPtr)
@ : CanIf_HwHandleType LeCanIf_e_Hrh, CanIf_CanIdType LeCanIf_e_CanId, CanIf_CanDlcType LeCanIf_e_CanDlc, const CanIf_CanDataType* LeCanIf_e_CanSduPtr
@ : void
@ :
@ : 2015/03/16
@ : V1.0
@ :
*****************************************************************************************/
void RxIndicationCanIf_Messages(CanIf_HwHandleType LeCanIf_e_Hrh, CanIf_CanIdType LeCanIf_e_CanId, CanIf_CanDlcType LeCanIf_e_CanDlc, CanIf_CanDataType* LeCanIf_e_CanSduPtr)
{
CanIf_PduIdType LeCanIf_e_RxPduId = 0;
uint16_t temp;
(void)LeCanIf_e_Hrh;
/* No Rx-Pdus or Ranges configured. Nothing to search. */
if (0 != CANIF_CFG_GENERIC(eMaxRxPDUHandle))
{
/* Checked for invalid RxPduId earlier */
for(LeCanIf_e_RxPduId = 0;LeCanIf_e_RxPduId < CANIF_CFG_GENERIC(eMaxRxPDUHandle);LeCanIf_e_RxPduId++)
{
temp = CANIF_CFG_GENERIC(eMaxRxPDUHandle);
temp = CANIF_CFG_CANRX_TABLE(LeCanIf_e_RxPduId,eRxCanId);
if( CANIF_CFG_CANRX_TABLE(LeCanIf_e_RxPduId,eRxCanId) == LeCanIf_e_CanId )
{
/* ID matches - Pdu identified */
/* DLC check - if configured DLC == 0 the following condition is always false and DLC check is deactivated */
CanIf_RxIndicationType rxIndicationFct;
if (LeCanIf_e_CanDlc != CANIF_CFG_CANRX_TABLE(LeCanIf_e_RxPduId, eRxCanDlc) )
{
/*DLC Error*/
rxIndicationFct = CANIF_CFG_CANRX_TABLE(LeCanIf_e_RxPduId,eCanIf_RxErrorFct);
if(COM_NULL_PTR != rxIndicationFct)
{
rxIndicationFct(LeCanIf_e_Hrh,LeCanIf_e_CanId,LeCanIf_e_CanDlc,LeCanIf_e_CanSduPtr);
}
else
{
/*Avoid Warning*/
}
}
else
{
rxIndicationFct = CANIF_CFG_CANRX_TABLE(LeCanIf_e_RxPduId,eCanIf_RxIndicationFct);
if(COM_NULL_PTR != rxIndicationFct)
{
rxIndicationFct(LeCanIf_e_Hrh,LeCanIf_e_CanId,LeCanIf_e_CanDlc,LeCanIf_e_CanSduPtr);
}
else
{
/*Avoid Warning*/
}
}
break;
}
else
{
/*Avoid Warning*/
}
}
}
else
{
/*Avoid Warning*/
}
}
/****************************************************************************************
@ : ComStd_ReturnType TransmitCanIf_Buffer(CanIf_CanIdType LeCanIf_t_TxCanID,CanIf_CanDlcType LeCanIf_t_TxCanDlc,CanIf_CanDataType *LeCanIf_t_TxCanDataPtr)
@ : CanIf_CanIdType LeCanIf_t_TxCanID,CanIf_CanDlcType LeCanIf_t_TxCanDlc,CanIf_CanDataType *LeCanIf_t_TxCanDataPtr
@ : ComStd_ReturnType
@ :
@ : 2015/03/14
@ : V1.0
@ :
*****************************************************************************************/
ComStd_ReturnType TransmitCanIf_Buffer(CanIf_CanIdType LeCanIf_t_TxCanID,CanIf_CanDlcType LeCanIf_t_TxCanDlc,CanIf_CanDataType *LeCanIf_t_TxCanDataPtr)
{
Can_ReturnType txResult = CAN_OK; /*or CAN_OK*/
#if 0
AC_DiagResp.RcvId = LeCanIf_t_TxCanID;
AC_DiagResp.RcvDLC = LeCanIf_t_TxCanDlc;
AC_DiagResp.Data[0] = *LeCanIf_t_TxCanDataPtr++;
AC_DiagResp.Data[1] = *LeCanIf_t_TxCanDataPtr++;
AC_DiagResp.Data[2] = *LeCanIf_t_TxCanDataPtr++;
AC_DiagResp.Data[3] = *LeCanIf_t_TxCanDataPtr++;
AC_DiagResp.Data[4] = *LeCanIf_t_TxCanDataPtr++;
AC_DiagResp.Data[5] = *LeCanIf_t_TxCanDataPtr++;
AC_DiagResp.Data[6] = *LeCanIf_t_TxCanDataPtr++;
AC_DiagResp.Data[7] = *LeCanIf_t_TxCanDataPtr;
#endif
CanIf_EnterCritical();
#if 0
txResult = CanSnd(CanBufDsc[9]);//TransmitCAN_Message(LeCanIf_t_TxCanID,LeCanIf_t_TxCanDlc,LeCanIf_t_TxCanDataPtr);
#endif
txResult = TransmitCAN_Message(LeCanIf_t_TxCanID,LeCanIf_t_TxCanDlc,LeCanIf_t_TxCanDataPtr);
CanIf_LeaveCritical();
/*发送失败*/
if(CAN_NOT_OK == txResult)
{
CanIf_uint8Type LeCanIf_e_TxPduId;
for(LeCanIf_e_TxPduId = 0;LeCanIf_e_TxPduId < CANIF_CFG_GENERIC(eMaxTxPDUHandle);LeCanIf_e_TxPduId++)
{
if( CANIF_CFG_CANTX_TABLE(LeCanIf_e_TxPduId,eTxCanId) == LeCanIf_t_TxCanID )
{
CanIf_uint8Type LeCanIf_e_TxDataCycle;
TsCanIf_h_TxQueue[CANIF_CFG_CANTX_TABLE(LeCanIf_e_TxPduId,eQueuedIndex)].eCanIf_CanId = LeCanIf_t_TxCanID;
TsCanIf_h_TxQueue[CANIF_CFG_CANTX_TABLE(LeCanIf_e_TxPduId,eQueuedIndex)].eCanIf_CanDlc = LeCanIf_t_TxCanDlc;
for(LeCanIf_e_TxDataCycle = 0;LeCanIf_e_TxDataCycle < LeCanIf_t_TxCanDlc;LeCanIf_e_TxDataCycle++)
{
TsCanIf_h_TxQueue[CANIF_CFG_CANTX_TABLE(LeCanIf_e_TxPduId,eQueuedIndex)].eCanIf_Txdata[LeCanIf_e_TxDataCycle] = LeCanIf_t_TxCanDataPtr[LeCanIf_e_TxDataCycle];
}
TsCanIf_h_TxQueue[CANIF_CFG_CANTX_TABLE(LeCanIf_e_TxPduId,eQueuedIndex)].eQueued = 1;
SeCanIf_u_TxQueueCounter |= ( 1 << (CANIF_CFG_CANTX_TABLE(LeCanIf_e_TxPduId,eQueuedIndex)) );
break;
}
else
{
}
}
}
else
{
/*Tx OK == do nothing */
}
return (ComStd_ReturnType)txResult;
}
/****************************************************************************************
@ : void TreatCanIf_TxQueue(void)
@ : void
@ : void
@ :
@ : 2015/04/08
@ : V1.0
@ :
*****************************************************************************************/
#if 0
void TreatCanIf_TxQueue(void)
{
if(0 != SeCanIf_u_TxQueueCounter)
{
Can_ReturnType txResult = CAN_NOT_OK;
CanIf_uint8Type LeCanIf_e_Index = 0;
for(LeCanIf_e_Index = 0;LeCanIf_e_Index < CANIF_CFG_MAX_TX_HANDLE;LeCanIf_e_Index++)
{
if(0 != TsCanIf_h_TxQueue[LeCanIf_e_Index].eQueued)
{
txResult = TransmitCAN_Message(TsCanIf_h_TxQueue[LeCanIf_e_Index].eCanIf_CanId,TsCanIf_h_TxQueue[LeCanIf_e_Index].eCanIf_CanDlc,TsCanIf_h_TxQueue[LeCanIf_e_Index].eCanIf_Txdata);
if(CAN_OK == txResult)
{
TsCanIf_h_TxQueue[LeCanIf_e_Index].eQueued = 0;
SeCanIf_u_TxQueueCounter &= ~( 1 << LeCanIf_e_Index );
}
else
{
}
break;
}
else
{
}
}
}
else
{
}
}
#endif
/****************************************************************************************
@ : void ConfirmCanIf_TxOK(CanIf_CanIdType LeCanIf_t_TxCanID)
@ : LeCanIf_t_TxCanID
@ : void
@ :
@ : 2015/04/08
@ : V1.0
@ :
*****************************************************************************************/
#if 0
void ConfirmCanIf_TxOK(ComUint8 LeCanIf_e_Hrh,CanIf_CanIdType LeCanIf_t_TxCanID)
{
CanIf_PduIdType LeCanIf_e_TxPduId = 0;
if(0 != CANIF_CFG_MAX_TX_HANDLE)
{
/* Checked for invalid RxPduId earlier */
for(LeCanIf_e_TxPduId = 0;LeCanIf_e_TxPduId < CANIF_CFG_GENERIC(eMaxTxPDUHandle);LeCanIf_e_TxPduId++)
{
if( CANIF_CFG_CANTX_TABLE(LeCanIf_e_TxPduId,eTxCanId) == LeCanIf_t_TxCanID )
{
CanIf_TxConfirmationType TxConfirmationFct;
TxConfirmationFct = CANIF_CFG_CANTX_TABLE(LeCanIf_e_TxPduId,eCanIf_TxConfirmationFct);
if(COM_NULL_PTR != TxConfirmationFct)
{
TxConfirmationFct(LeCanIf_e_Hrh,LeCanIf_t_TxCanID);
}
else
{
/*Avoid Warning*/
}
break;
}
else
{
/*Avoid Warning*/
}
}
}
else
{
}
CanIf_EnterCritical();
TreatCanIf_TxQueue();
CanIf_LeaveCritical();
}
#endif
/****************************************************************************************
@ : void CanIf_MainFunction(void)
@ : void
@ : void
@ : 10ms周期调用
@ : 2015/03/14
@ : V1.0
@ : CanIf层TASK
*****************************************************************************************/
void CanIf_MainFunction(void)
{
if( COM_FALSE != SeCanIf_u_IsInit )
{
if( (CANIF_CS_STOP == TeCanIf_e_ControllerMode) && (CANTRCV_STANDBY == TeCanTrcv_e_WorkMode) )
{
/*有总线唤醒事件,在此增加代码*/
}
else
{
}
}
else
{
/*Avoid Warning*/
}
}

View File

@ -0,0 +1,57 @@
#if !defined(CANIF_H)
#define CANIF_H
/***°üº¬Í·Îļþ***/
//#include "global.h"
#include "ComTypes.h"
#include "CanTrcv.h"
#include "CanIf_Cfg.h"
//#include "canhl.h"
typedef struct
{
uint32_t Arb; //!<Arb data
uint8_t Data[8]; //!<data
uint8_t Dlc; //!<data length
uint8_t eob; //!<end of buffer
uint8_t newdt; //!<new data
}CAN_DataT;
typedef enum
{
CAN_OK = 0,
CAN_NOT_OK = 1
} Can_ReturnType;
typedef enum
{
CAN_NORMAL = 0,
CAN_STOP = 1
} ControllerModeType;
typedef enum
{
busoff = 0,
error_passive = 1,
error_active=2
} ErrorStatusType;
/***API½Ó¿Ú***/
extern void ReInitCanIf_Parameter(void);
extern void CanIf_MainFunction(void);
extern void InitCanIf_Parameter(void);
extern void DeInitCanIf_Parameter(void);
extern ComStd_ReturnType SetCanIf_BusoffEvent(CanIf_ControllerErrorType LeCanIf_u_BusoffEvent);
extern ComStd_ReturnType SetCanIf_WakeUpEvent(CanIf_WakeUpSourceType LeCanIf_e_WakeUpSource);
extern ComStd_ReturnType ClrCanIf_WakeUpEvent(CanIf_WakeUpSourceType LeCanIf_e_WakeUpSource);
extern ComStd_ReturnType GetCanIf_WakeUpEvent(CanIf_WakeUpSourceType *LeCanIf_e_WakeUpSource);
extern ComStd_ReturnType SetCanIf_ControllerMode(CanIf_ControllerModeType LeCanIf_e_ControllerMode);
extern ComStd_ReturnType GetCanIf_ControllerMode(CanIf_ControllerModeType *LeCanIf_e_ControllerModePtr);
extern ComStd_ReturnType GetCanIf_TransceiverMode(CanTrcv_WorkModeType *LeCanIf_e_WorkModePtr);
extern ComStd_ReturnType SetCanIf_TransceiverMode(CanTrcv_WorkModeType LeCanIf_e_WorkMode);
extern void RxIndicationCanIf_Messages(CanIf_HwHandleType Hrh, CanIf_CanIdType LeCanIf_e_CanId, CanIf_CanDlcType LeCanIf_e_CanDlc, CanIf_CanDataType* LeCanIf_e_CanSduPtr);
extern ComStd_ReturnType TransmitCanIf_Buffer(CanIf_CanIdType LeCanIf_t_TxCanID,CanIf_CanDlcType LeCanIf_t_TxCanDlc,CanIf_CanDataType *LeCanIf_t_TxCanDataPtr);
extern void ConfirmCanIf_TxOK(ComUint8 LeCanIf_e_Hrh,CanIf_CanIdType LeCanIf_t_TxCanID);
extern ComStd_ReturnType ResetCanIf_Controller(ComUint8 LeCanIf_u_Channel);
#endif

View File

@ -0,0 +1,89 @@
/**------------------历史版本信息-------------------------------------------------------
** :
**
** :
** :
**-------------------------------------------------------------------------------------*/
#define DI __DI
#define EI __EI
#define HALT __halt
#define NOP __nop
#define STOP __stop
#define BRK __brk
#include "CanIf_Cfg.h"
#include "CanTp.h"
#include "CanSm.h"
/***************************************************************************************/
const CanIf_ConfigType SeCanIf_t_Config =
{
CANIF_CFG_MAX_RX_HANDLE, /* eMaxRxPDUHandle; Number of Rx PDUs */
CANIF_CFG_MAX_TX_HANDLE, /* eMaxTxPDUHandle; Number of Tx PDUs */
CANIF_CFG_MAX_CONTROLLER /* eMaxController; Number of Controllers */
};
/***************************************************************************************/
/* CanIf Rx Config
/*********************************************************/
const CanIf_CanRxConfigTabeType SeCanIf_t_CanRxConfigTabe[CANIF_CFG_MAX_RX_HANDLE] =
{
/*CAN ID*/ /*CAN DLC*/ /*ControllerID*/ /*RxIndication Fct*/
{CANTP_ADDR_PHY_REQ, 8, 0, (CanIf_RxIndicationType)&RxIndicationCanTP_AddrPhy_Message/*&RxIndicationCanTP_Message*/, (CanIf_RxErrorType)COM_NULL_PTR/*&RxErrorCanTP_Message*/ },
{CANTP_ADDR_FUNC_REQ, 8, 0, (CanIf_RxIndicationType)&RxIndicationCanTP_AddrFunc_Message/*&RxIndicationCanTP_Message*/, (CanIf_RxErrorType)COM_NULL_PTR/*&RxErrorCanTP_Message*/ },
};
/***************************************************************************************/
/* CanIf Tx Config
/***************************************************************************************/
const CanIf_CanTxConfigTabeType SeCanIf_t_CanTxConfigTabe[CANIF_CFG_MAX_TX_HANDLE] =
{
/*CAN ID*/ /*CAN DLC*/ /*ControllerID*/ /*eCanTxCycleOffset*/ /*eSignalFilterMode*/ /*eCanTxMode*/ /*eEventCnt*/ /*eEventCycle*/ /*eCanTxCycle*/ /*eCanIf_TxConfirmationFct*/ /*eCanIf_TxErrorFct*/ /*eQueuedIndex*/
{CANTP_RESP_CANID, 8, 0, 0, SIGNAL_FILTER_ALWAYS, TX_MODE_EVENT, 1, 100, 0, COM_NULL_PTR, COM_NULL_PTR, 3 }
};
/****************************************************************************************
@ : void DisableCanIf_Interrupt(void)
@ : void
@ : void
@ :
@ : 2015/04/11
@ : V1.0
@ :
*****************************************************************************************/
void DisableCanIf_Interrupt(void)
{
//SetMcu_InterruptDisable();
DI();
}
/****************************************************************************************
@ : void EnableCanIf_Interrupt(void)
@ : void
@ : void
@ :
@ : 2015/04/11
@ : V1.0
@ :
*****************************************************************************************/
void EnableCanIf_Interrupt(void)
{
//SetMcu_InterruptEnable();
EI();
}

View File

@ -0,0 +1,156 @@
#if !defined(CANIF_CFG_H)
#define CANIF_CFG_H
/***包含头文件***/
#include "ComTypes.h"
/*#include "Com.h"
#include "CanTP.h"
#include "CanNM.h"
#include "mcu.h"*/
/*----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------*/
#define CANIF_MAINFUCTION_CALL_CYCLE 10u /*ms*/
#define CAN_BUS_WAKE_MASK 0x01u
#define CAN_LOCAL_WAKE_MASK 0x02u
#define CANIF_CFG_MAX_RX_HANDLE (CanIf_PduIdType)2
#define CANIF_CFG_MAX_TX_HANDLE (CanIf_PduIdType)1
#define CANIF_CFG_MAX_CONTROLLER (CanIf_PduIdType)1
#define CANIF_CFG_NM_TX_HANDLE_INDEX (CANIF_CFG_MAX_TX_HANDLE - 2)
#define CANIF_CFG_DIAG_TX_HANDLE_INDEX (CANIF_CFG_MAX_TX_HANDLE - 1)
extern void DisableCanIf_Interrupt(void);
extern void EnableCanIf_Interrupt(void);
#define CanIf_EnterCritical() DisableCanIf_Interrupt()
#define CanIf_LeaveCritical() EnableCanIf_Interrupt()
/*----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------*/
/*****************************************************/
/***CanIf模块类据类型***/
typedef unsigned char CanIf_WakeUpSourceType; /*at most,support 8 wakeupsources*/
typedef unsigned char CanIf_PduIdType;
typedef unsigned char CanIf_HwHandleType;
typedef unsigned char CanIf_CanDlcType;
typedef unsigned char CanIf_CanDataType;
typedef unsigned int CanIf_CanIdType;
typedef unsigned char CanIf_uint8Type;
typedef unsigned int CanIf_CanTxCycleType;
typedef void (*CanIf_RxIndicationType)(CanIf_HwHandleType LeCanIf_e_Hrh, CanIf_CanIdType LeCanIf_e_CanId, CanIf_CanDlcType LeCanIf_e_CanDlc, CanIf_CanDataType* LeCanIf_e_CanSduPtr);
typedef void (*CanIf_RxErrorType)(CanIf_HwHandleType LeCanIf_e_Hrh, CanIf_CanIdType LeCanIf_e_CanId, CanIf_CanDlcType LeCanIf_e_CanDlc, CanIf_CanDataType* LeCanIf_e_CanSduPtr);
typedef void (*CanIf_TxConfirmationType)(CanIf_HwHandleType LeCanIf_e_Hrh, CanIf_CanIdType LeCanIf_e_CanId);
typedef void (*CanIf_TxErrorType)(CanIf_HwHandleType LeCanIf_e_Hrh, CanIf_CanIdType LeCanIf_e_CanId);
typedef enum
{
CANIF_ERROR_ACTIVE = 0,
CANIF_ERROR_PASSIVE,
CANIF_ERROR_BUSOFF
}CanIf_ControllerErrorType;
typedef enum
{
CANIF_CS_NORMAL = 0u,
CANIF_CS_STOP
}CanIf_ControllerModeType;
typedef enum
{
TX_MODE_NONE = 0u,
TX_MODE_PERIODIC,
TX_MODE_MIXED,
TX_MODE_EVENT
}CanIf_CanBoxTxModeType;
typedef enum
{
SIGNAL_FILTER_NONE = 0u,
SIGNAL_FILTER_ALWAYS
}CanIf_CanSignalFilterModeType;
typedef struct
{
CanIf_CanIdType eTxCanId; /* */
CanIf_CanDlcType eTxCanDlc; /* */
CanIf_HwHandleType eControllerID; /* Number of Controllers */
ComUint16 eCanTxCycleOffset;
CanIf_CanSignalFilterModeType eSignalFilterMode;
CanIf_CanBoxTxModeType eCanTxMode; /* Tx Mode */
CanIf_uint8Type eEventCnt;
CanIf_uint8Type eEventCycle;
CanIf_CanTxCycleType eCanTxCycle; /* Tx Cycle*/
CanIf_TxConfirmationType eCanIf_TxConfirmationFct; /* TxConfirmation Fct */
CanIf_TxErrorType eCanIf_TxErrorFct; /* TxError Fct */
CanIf_uint8Type eQueuedIndex;
}CanIf_CanTxConfigTabeType;
extern const CanIf_CanTxConfigTabeType SeCanIf_t_CanTxConfigTabe[CANIF_CFG_MAX_TX_HANDLE];
#define CANIF_CFG_CANTX_TABLE(index,field) (SeCanIf_t_CanTxConfigTabe[(index)].field)
typedef struct
{
CanIf_CanIdType eRxCanId; /* Number of Rx PDUs */
CanIf_CanDlcType eRxCanDlc; /* Number of Tx PDUs */
CanIf_HwHandleType eControllerID; /* Number of Controllers */
CanIf_RxIndicationType eCanIf_RxIndicationFct;/* Indication Fct */
CanIf_RxErrorType eCanIf_RxErrorFct;/* Indication Fct */
}CanIf_CanRxConfigTabeType;
extern const CanIf_CanRxConfigTabeType SeCanIf_t_CanRxConfigTabe[CANIF_CFG_MAX_RX_HANDLE];
#define CANIF_CFG_CANRX_TABLE(index,field) (SeCanIf_t_CanRxConfigTabe[(index)].field)
typedef struct
{
CanIf_CanIdType eCanIf_CanId;
CanIf_CanDlcType eCanIf_CanDlc;
CanIf_uint8Type eCanIf_Txdata[8];
CanIf_uint8Type eQueued;
}CanIf_TxQueueType;
typedef struct
{
CanIf_PduIdType eMaxRxPDUHandle; /* Number of Rx PDUs */
CanIf_PduIdType eMaxTxPDUHandle; /* Number of Tx PDUs */
CanIf_uint8Type eMaxController; /* Number of Controllers */
}CanIf_ConfigType;
extern const CanIf_ConfigType SeCanIf_t_Config;
#define CANIF_CFG_GENERIC(eMaxRxPDUHandle) (SeCanIf_t_Config.eMaxRxPDUHandle)
/*****************************************************/
#endif /* CANIF_CFG_H */

View File

@ -0,0 +1,157 @@
#if !defined(CANIF_CFG_H)
#define CANIF_CFG_H
/***包含头文件***/
#include "ComTypes.h"
//#include "global.h"
/*#include "Com.h"
#include "CanTP.h"
#include "CanNM.h"
#include "mcu.h"*/
/*----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------*/
#define CANIF_MAINFUCTION_CALL_CYCLE 10u /*ms*/
#define CAN_BUS_WAKE_MASK 0x01u
#define CAN_LOCAL_WAKE_MASK 0x02u
#define CANIF_CFG_MAX_RX_HANDLE (CanIf_PduIdType)2
#define CANIF_CFG_MAX_TX_HANDLE (CanIf_PduIdType)1
#define CANIF_CFG_MAX_CONTROLLER (CanIf_PduIdType)1
#define CANIF_CFG_NM_TX_HANDLE_INDEX (CANIF_CFG_MAX_TX_HANDLE - 2)
#define CANIF_CFG_DIAG_TX_HANDLE_INDEX (CANIF_CFG_MAX_TX_HANDLE - 1)
extern void DisableCanIf_Interrupt(void);
extern void EnableCanIf_Interrupt(void);
#define CanIf_EnterCritical() DisableCanIf_Interrupt()
#define CanIf_LeaveCritical() EnableCanIf_Interrupt()
/*----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------*/
/*****************************************************/
/***CanIf模块类据类型***/
typedef unsigned char CanIf_WakeUpSourceType; /*at most,support 8 wakeupsources*/
typedef unsigned char CanIf_PduIdType;
typedef unsigned char CanIf_HwHandleType;
typedef unsigned char CanIf_CanDlcType;
typedef unsigned char CanIf_CanDataType;
typedef unsigned int CanIf_CanIdType;
typedef unsigned char CanIf_uint8Type;
typedef unsigned int CanIf_CanTxCycleType;
typedef void (*CanIf_RxIndicationType)(CanIf_HwHandleType LeCanIf_e_Hrh, CanIf_CanIdType LeCanIf_e_CanId, CanIf_CanDlcType LeCanIf_e_CanDlc, CanIf_CanDataType* LeCanIf_e_CanSduPtr);
typedef void (*CanIf_RxErrorType)(CanIf_HwHandleType LeCanIf_e_Hrh, CanIf_CanIdType LeCanIf_e_CanId, CanIf_CanDlcType LeCanIf_e_CanDlc, CanIf_CanDataType* LeCanIf_e_CanSduPtr);
typedef void (*CanIf_TxConfirmationType)(CanIf_HwHandleType LeCanIf_e_Hrh, CanIf_CanIdType LeCanIf_e_CanId);
typedef void (*CanIf_TxErrorType)(CanIf_HwHandleType LeCanIf_e_Hrh, CanIf_CanIdType LeCanIf_e_CanId);
typedef enum
{
CANIF_ERROR_ACTIVE = 0,
CANIF_ERROR_PASSIVE,
CANIF_ERROR_BUSOFF
}CanIf_ControllerErrorType;
typedef enum
{
CANIF_CS_NORMAL = 0u,
CANIF_CS_STOP
}CanIf_ControllerModeType;
typedef enum
{
TX_MODE_NONE = 0u,
TX_MODE_PERIODIC,
TX_MODE_MIXED,
TX_MODE_EVENT
}CanIf_CanBoxTxModeType;
typedef enum
{
SIGNAL_FILTER_NONE = 0u,
SIGNAL_FILTER_ALWAYS
}CanIf_CanSignalFilterModeType;
typedef struct
{
CanIf_CanIdType eTxCanId; /* */
CanIf_CanDlcType eTxCanDlc; /* */
CanIf_HwHandleType eControllerID; /* Number of Controllers */
ComUint16 eCanTxCycleOffset;
CanIf_CanSignalFilterModeType eSignalFilterMode;
CanIf_CanBoxTxModeType eCanTxMode; /* Tx Mode */
CanIf_uint8Type eEventCnt;
CanIf_uint8Type eEventCycle;
CanIf_CanTxCycleType eCanTxCycle; /* Tx Cycle*/
CanIf_TxConfirmationType eCanIf_TxConfirmationFct; /* TxConfirmation Fct */
CanIf_TxErrorType eCanIf_TxErrorFct; /* TxError Fct */
CanIf_uint8Type eQueuedIndex;
}CanIf_CanTxConfigTabeType;
extern const CanIf_CanTxConfigTabeType SeCanIf_t_CanTxConfigTabe[CANIF_CFG_MAX_TX_HANDLE];
#define CANIF_CFG_CANTX_TABLE(index,field) (SeCanIf_t_CanTxConfigTabe[(index)].field)
typedef struct
{
CanIf_CanIdType eRxCanId; /* Number of Rx PDUs */
CanIf_CanDlcType eRxCanDlc; /* Number of Tx PDUs */
CanIf_HwHandleType eControllerID; /* Number of Controllers */
CanIf_RxIndicationType eCanIf_RxIndicationFct;/* Indication Fct */
CanIf_RxErrorType eCanIf_RxErrorFct;/* Indication Fct */
}CanIf_CanRxConfigTabeType;
extern const CanIf_CanRxConfigTabeType SeCanIf_t_CanRxConfigTabe[CANIF_CFG_MAX_RX_HANDLE];
#define CANIF_CFG_CANRX_TABLE(index,field) (SeCanIf_t_CanRxConfigTabe[(index)].field)
typedef struct
{
CanIf_CanIdType eCanIf_CanId;
CanIf_CanDlcType eCanIf_CanDlc;
CanIf_uint8Type eCanIf_Txdata[8];
CanIf_uint8Type eQueued;
}CanIf_TxQueueType;
typedef struct
{
CanIf_PduIdType eMaxRxPDUHandle; /* Number of Rx PDUs */
CanIf_PduIdType eMaxTxPDUHandle; /* Number of Tx PDUs */
CanIf_uint8Type eMaxController; /* Number of Controllers */
}CanIf_ConfigType;
extern const CanIf_ConfigType SeCanIf_t_Config;
#define CANIF_CFG_GENERIC(eMaxRxPDUHandle) (SeCanIf_t_Config.eMaxRxPDUHandle)
/*****************************************************/
#endif /* CANIF_CFG_H */

71
ECU_APP/diagnose/CanSM.h Normal file
View File

@ -0,0 +1,71 @@
#if !defined (CAN_SM_H)
#define CAN_SM_H
/***********************************************************/
#include "CanSM_Cfg.h"
#include "CanIf_Cfg.h"
#include "CanIf.h"
#include "CanTp.h"
#include "CanTrcv.h"
/***********************************************************/
typedef CanIf_ControllerErrorType CanSM_BusErrorStatusType;
typedef unsigned char CanSM_BattModeType;
typedef CanIf_ControllerModeType Can_ControllerModeType;
typedef CanIf_CanDlcType Can_CanDlcType;
typedef CanIf_CanDataType Can_CanDataType;
typedef CanIf_CanIdType Can_CanIdType;
typedef CanIf_HwHandleType Can_HwHandleType;
typedef CanIf_ControllerErrorType Can_ErrorStatusType;
typedef enum
{
COMM_NO_COMMUNICATION = 0u,
COMM_SILENT_COMMUNICATION,
COMM_FULL_COMMUNICATION
}CanSM_CommuniocationStatusType;
typedef enum
{
BUS_TRAFFIC_OFFLINE = 0u,
BUS_TRAFFIC_TXONLINE,
BUS_TRAFFIC_RXONLINE,
BUS_TRAFFIC_ONLINE
}CanSM_BusTrafficType;
typedef struct
{
CanSM_BorTimerType eCanSm_BorTimer;
CanSM_BusErrorStatusType eCanSM_BusErrorStatus;
CanSM_BattModeType eCanSM_NewBattMode;
CanSM_BattModeType eCanSM_OldBattMode;
CanSM_CommuniocationStatusType eCanSm_RequestedNewComMode;
CanSM_CommuniocationStatusType eCanSm_RequestedOldComMode;
CanSM_BusTrafficType eCanSM_ComTraffic;
CanSM_BusTrafficType eCanSM_NMTraffic;
ComUint8 eCanSM_IsInit;
}CanSM_LocalClusterDataType;
extern CanSM_LocalClusterDataType TsCanSM_h_LocalClusterData;
#define GET_CANSM_LOCAL_DATA(field) (TsCanSM_h_LocalClusterData.field)
#define SET_CANSM_LOCAL_DATA(field,data) (TsCanSM_h_LocalClusterData.field = data)
/***********************************************************/
extern void CanSM_MainFunction(void);
extern void InitCanSM_Parameter(void);
extern void DeInitCanSM_Parameter(void);
extern void ReInitCanSM_Parameter(void);
extern void GetCanSM_ControllerBusoffStatus(CanSM_BusErrorStatusType *LeCanSM_u_BusoffStatus);
extern void SetCanSM_BusoffEvent(CanSM_BusErrorStatusType LeCanSM_u_BusoffEvent);
extern void GetCanSM_ComTrafficStatus(CanSM_BusTrafficType *LeCanSM_e_DataPtr);
extern void GetCanSM_NMTrafficStatus(CanSM_BusTrafficType *LeCanSM_e_DataPtr);
/***********************************************************/
#endif

View File

@ -0,0 +1,40 @@
#if !defined (CAN_SM_CFG_H)
#define CAN_SM_CFG_H
#include "ComTypes.h"
//#include "canhl.h"
/*----------------------------------------------------------------------------------
Ä£¿éÅäÖÃÏʼ
-----------------------------------------------------------------------------------*/
#define CANSM_MAINFUCTION_CALL_CYCLE 1u /*ms*/
#define CANSM_BATT_POWERON_MODE 0
#define CANSM_CAN_INIT COM_STD_ON
#define CANSM_TRCV_INIT COM_STD_ON
#define CANSM_CANIF_INIT COM_STD_ON
#define CANSM_CANTP_INIT COM_STD_ON
#define CANSM_CANSM_INIT COM_STD_ON
extern void CanSM_EnterCritical(void);
extern void CanSM_LeaveCritical(void);
/*----------------------------------------------------------------------------------
Ä£¿éÅäÖÃÏî½áÊø
-----------------------------------------------------------------------------------*/
typedef unsigned int CanSM_BorTimerType;
typedef struct
{
CanSM_BorTimerType eCanSM_BorFastTimer;
}CanSM_ConfigType;
extern const CanSM_ConfigType TeCanSM_h_Config;
#define CANSM_CFG_GENERIC(field) (TeCanSM_h_Config.field)
#endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,108 @@
/*@处根据实际情况填写相关信息,将@字符以及这条提示语句去掉*/
/******************************************************************************
| File Name : @
| Description: @
******************************************************************************/
#ifndef CANTP_H
#define CANTP_H
/******************************************************************************
* Description: : Include File Section
******************************************************************************/
#include "CanSm.h"
#include "CanTp_Cfg.h"
/******************************************************************************
* Description: : Macro Description Section
******************************************************************************/
/******************************************************************************
* Description: : Structure Type Declaration Section
******************************************************************************/
typedef enum
{
CeCanTp_e_Empty = 0,
CeCanTp_e_Full = 1,
}TeCanTp_e_RxBufferSts;
typedef enum
{
CeCanTp_e_Physical=0,
CeCanTp_e_Functional,
}TeCanTp_e_AddrMethod;
typedef enum
{
CeCanTp_e_Idel = 0,
CeCanTp_e_SF_Get,
CeCanTp_e_MF_FFGet,
CeCanTp_e_MF_CFTakein,
CeCanTp_e_MF_Get,
CeCanTp_e_Answer,
}TeCanTp_e_TpSts;
typedef enum
{
CeCanTp_e_CntnsIdel = 0,
CeCanTp_e_CntnsSF_Get,
}TeCanTp_e_CntnsTpSts;
typedef enum
{
CeCanTp_e_TX_Idel = 0,
CeCanTp_e_TX_FCWaiting,
CeCanTp_e_TX_FCGet,
CeCanTp_e_TX_CFGaving,
}TeCanTp_e_MFTxSts;
typedef enum
{
CeCanTp_e_As = 0,
CeCanTp_e_Bs,
CeCanTp_e_Cs,
CeCanTp_e_Ar,
CeCanTp_e_Br,
CeCanTp_e_Cr,
}TeCanTp_e_MFTimerSwitch;
typedef enum
{
CeCanTp_e_Tx_Idle = 0,
CeCanTp_e_Tx_Busy,
}TeCanTp_e_TxSts;
typedef enum
{
CeCanTp_e_Tx_Succeed = 0,
CeCanTp_e_Tx_Wrong,
}TeCanTp_e_TxResult;
typedef enum
{
CeCanTp_e_S3_Start = 0,
CeCanTp_e_S3_Stop,
}TeCanTp_e_S3TimerSts;
/******************************************************************************
* Description: : Global Variable Declaration Section
******************************************************************************/
/******************************************************************************
* Description: : Global Function Prototype Declaration
******************************************************************************/
extern uint8 GetCanTp_u_S3Sts(void);/*读取S3*/
extern void MngCanTp_MainFunction(void);/*主调度函数*/
extern void InitCanTp_Parameter(void);/*初始化*/
extern TeCanTp_e_TxResult SetCanTp_TxBuffer(uint16 LeCanTp_p_DL, const uint8 LeCanTp_p_DataAddr[]);/*发送函数*/
extern TeCanTp_e_TxResult SetCanTp_Tx_78Neg(uint16 LeCanTp_p_DL , const uint8 LeCanTp_p_DataAddr[]);
extern void RxIndicationCanTP_AddrFunc_Message(CanIf_HwHandleType LeCanTp_e_Hrh, CanIf_CanIdType LeCanTp_e_CanId,CanIf_CanDlcType LeCanTp_e_CanDlc, const CanIf_CanDataType LeCanTp_e_CanSduPtr[]);/*接收函数*/
extern void RxIndicationCanTP_AddrPhy_Message(CanIf_HwHandleType LeCanTp_e_Hrh, CanIf_CanIdType LeCanTp_e_CanId,CanIf_CanDlcType LeCanTp_e_CanDlc,const CanIf_CanDataType LeCanTp_e_CanSduPtr[]);/*接收函数*/
extern TeCanTp_e_RxBufferSts GetCanTp_e_RxBufferSts(uint8* LeCanTp_p_AddrMethod , uint16* LeCanTp_p_DL , uint8** LeCanTp_p_DataAddr);/*上层读取接收到得报文*/
#endif

View File

@ -0,0 +1,38 @@
/******************************************************************************
*****************************************************************************/
/******************************************************************************
* Description: : Include File Section
******************************************************************************/
#include "CanTp_Cfg.h"
/******************************************************************************
* Description: : Global Variable Definition Section
******************************************************************************/
const unsigned char TP_DUMMY = 0xAA;
const CanIf_CanIdType CANTP_ADDR_PHY_REQ_const = CANTP_ADDR_PHY_REQ;
const CanIf_CanIdType CANTP_ADDR_FUNC_REQ_const = CANTP_ADDR_FUNC_REQ;
const CanIf_CanIdType CANTP_RESP_CANID_const = CANTP_RESP_CANID;
const uint8 CANTP_RX_STMIN = CANTP_RX_STMIN_DEFINE;
const uint16 CANTP_BS_TIMEOUT = CANTP_BS_TIMEOUT_DEFINE;
const uint16 CANTP_CR_TIMEOUT = CANTP_CR_TIMEOUT_DEFINE ;
const uint16 CANTP_APP_RESP_78NEG = CANTP_APP_RESP_78NEG_DEFINE;
/******************************************************************************
* Description: : Static Variable Definition Section
******************************************************************************/
/******************************************************************************
* Description: : Static Function Prototype Declaration
*****************************************************************************/
/******************************************************************************
* Description: : Write User Function Code
*****************************************************************************/

View File

@ -0,0 +1,81 @@
/*@处根据实际情况填写相关信息,将@字符以及这条提示语句去掉*/
/******************************************************************************
| File Name : @
| Description: @
******************************************************************************/
#ifndef CANTP_CFG_H
#define CANTP_CFG_H
/******************************************************************************
* Description: : Include File Section
******************************************************************************/
#include "DCM_Types.h"
//#include "CanIf.h"
#include "CanIf_cfg.h"
/******************************************************************************
* Description: : Macro Description Section
******************************************************************************/
/*@define类型定义*/
#define CANTP_TASK 1
#define CANTP_MFLEN_MAX 1200 /* 多帧最大长度 */
#define CANTP_ADDR_FUNC_REQ 0x7DF /* 诊断功能寻址 */
#define CANTP_ADDR_PHY_REQ 0x751//0x7C6 /* 诊断物理寻址 */
#define CANTP_RESP_CANID 0x759//0x7CE /* 诊断反馈 */
#define CANTP_ADDRFUNC_MF_FORBID DCM_FALSE
#define CANTP_RX_STMIN_DEFINE 0x0A /* STmin */
#define CANTP_AS_TIMEOUT_DEFINE 25u /* 25ms?*/
#define CANTP_BS_TIMEOUT_DEFINE 75u /* 75ms? */
#define CANTP_CS_TIMEOUT_DEFINE /*(N_Cs + N_As) < 0.9*N_Bs */
#define CANTP_AR_TIMEOUT_DEFINE 25u /* 25ms? */
#define CANTP_BR_TIMEOUT_DEFINE /* (N_Br + N_Ar) < 0.9*N_Cr */
#define CANTP_CR_TIMEOUT_DEFINE 150u /* 150ms */
#define CANTP_RESP_TIMEOUT_DEFINE 500u
#define CANTP_APP_RESP_TIMEOUT_DEFINE 500u /* APP响应时间 */
#define CANTP_APP_RESP_78NEG_DEFINE 5000u /* 78负相应 */
extern const CanIf_CanIdType CANTP_ADDR_PHY_REQ_const ;
extern const CanIf_CanIdType CANTP_ADDR_FUNC_REQ_const ;
extern const CanIf_CanIdType CANTP_RESP_CANID_const ;
extern const uint8 CANTP_RX_STMIN;
extern const uint16 CANTP_BS_TIMEOUT;
extern const uint16 CANTP_CR_TIMEOUT;
extern const uint16 CANTP_APP_RESP_78NEG;
extern const unsigned char TP_DUMMY;// 0xAA
/******************************************************************************
* Description: : Structure Type Declaration Section
******************************************************************************/
/*@结构类型typedef定义*/
/******************************************************************************
* Description: : Global Variable Declaration Section
******************************************************************************/
/*@全局变量声明extern*/
/******************************************************************************
* Description: : Global Function Prototype Declaration
******************************************************************************/
/*@接口函数声明extern*/
#endif

View File

@ -0,0 +1,270 @@
/**------------------历史版本信息-------------------------------------------------------
** :
**
** :
** : ,TJA1042T CAN收发器
**-------------------------------------------------------------------------------------*/
#include "CanTrcv.h"
/***************************************************************************************/
static CanTrcv_WorkModeType SeCanTrcv_e_WorkMode;
static CanTrcv_WakeReasonType SeCanTrcv_e_WakeReason;
static CanTrcv_WakeModeType SeCanTrcv_e_WakeMode;
static ComUint8 SeCanTrcv_u_IsInit;
/****************************************************************************************
@ : void DeInitCanTrcv_Parameter(void)
@ : void
@ : void
@ : CAN收发器模块所有参数
@ : 2015/03/13
@ : V1.0
@ :
*****************************************************************************************/
void DeInitCanTrcv_Parameter(void)
{
SeCanTrcv_u_IsInit = COM_FALSE;
}
/****************************************************************************************
@ : void ReInitCanTrcv_Parameter(void)
@ : void
@ : void
@ : CAN收发器模块所有参数
@ : 2015/05/7
@ : V1.0
@ :
*****************************************************************************************/
void ReInitCanTrcv_Parameter(void)
{
SeCanTrcv_u_IsInit = COM_TRUE;
}
/****************************************************************************************
@ : void InitCanTrcv_Parameter(void)
@ : void
@ : void
@ : CAN收发器模块所有参数
@ : 2015/03/13
@ : V1.0
@ :
*****************************************************************************************/
void InitCanTrcv_Parameter(void)
{
SeCanTrcv_e_WorkMode = CANTRCV_STANDBY;
SeCanTrcv_e_WakeReason = CANTRCV_WAKE_BY_NONE;
SeCanTrcv_e_WakeMode = CANTRCV_WAKE_VIA_BUS;
SeCanTrcv_u_IsInit = COM_TRUE;
}
/****************************************************************************************
@ : void GetCanTrcv_WorkMode(CanTrcv_WorkModeType *LeCanTrcv_e_WorkModePtr)
@ : CanTrcv_WorkModeType *LeCanTrcv_e_WorkModePtr
@ : void
@ : CAN发收器工作模式
@ : 2015/03/13
@ : V1.0
@ :
*****************************************************************************************/
void GetCanTrcv_WorkMode(CanTrcv_WorkModeType *LeCanTrcv_e_WorkModePtr)
{
*LeCanTrcv_e_WorkModePtr = SeCanTrcv_e_WorkMode;
}
/****************************************************************************************
@ : void SetCanTrcv_WorkMode(CanTrcv_WorkModeType LeCanTrcv_e_WorkMode)
@ : CanTrcv_WorkModeType LeCanTrcv_e_WorkMode
@ : void
@ : CAN发收器工作模式
@ : 2015/03/13
@ : V1.0
@ :
*****************************************************************************************/
void SetCanTrcv_WorkMode(CanTrcv_WorkModeType LeCanTrcv_e_WorkMode)
{
if( CANTRCV_NORMAL == LeCanTrcv_e_WorkMode)
{
SET_CANTRCV_NORMAL();
SeCanTrcv_e_WorkMode = LeCanTrcv_e_WorkMode;
}
else if( CANTRCV_STANDBY == LeCanTrcv_e_WorkMode)
{
SET_CANTRCV_STANDBY();
SeCanTrcv_e_WorkMode = LeCanTrcv_e_WorkMode;
}
else
{
/*Avoid Warning*/
}
}
/****************************************************************************************
@ : void GetCanTrcv_WakeReason(CanTrcv_WakeReasonType *LeCanTrcv_e_WakeReasonPtr)
@ : CanTrcv_WakeReasonType *LeCanTrcv_e_WakeReasonPtr
@ : void
@ : CAN发收器唤醒源
@ : 2015/03/13
@ : V1.0
@ :
*****************************************************************************************/
void GetCanTrcv_WakeReason(CanTrcv_WakeReasonType *LeCanTrcv_e_WakeReasonPtr)
{
*LeCanTrcv_e_WakeReasonPtr = SeCanTrcv_e_WakeReason;
}
/****************************************************************************************
@ : void ClearCanTrcv_WakeReason(void)
@ : void
@ : void
@ : CAN发收器唤醒源
@ : 2015/03/13
@ : V1.0
@ :
*****************************************************************************************/
void ClearCanTrcv_WakeReason(void)
{
SeCanTrcv_e_WakeReason = CANTRCV_WAKE_BY_NONE;
}
/****************************************************************************************
@ : void SetCanTrcv_WakeMode(CanTrcv_WakeModeType LeCanTrcv_e_WakeMode)
@ : CanTrcv_WakeModeType LeCanTrcv_e_WakeMode
@ : void
@ : CAN发收器唤醒模式
@ : 2015/03/13
@ : V1.0
@ :
*****************************************************************************************/
void SetCanTrcv_WakeMode(CanTrcv_WakeModeType LeCanTrcv_e_WakeMode)
{
(void)LeCanTrcv_e_WakeMode;
}
/****************************************************************************************
@ : void GetCanTrcv_WakeMode(CanTrcv_WakeModeType *LeCanTrcv_e_WakeModePtr)
@ : CanTrcv_WakeModeType *LeCanTrcv_e_WakeModePtr
@ : void
@ : CAN发收器唤醒模式
@ : 2015/03/13
@ : V1.0
@ :
*****************************************************************************************/
void GetCanTrcv_WakeMode(CanTrcv_WakeModeType *LeCanTrcv_e_WakeModePtr)
{
*LeCanTrcv_e_WakeModePtr = SeCanTrcv_e_WakeMode;
}
/****************************************************************************************
@ : void CanTrcv_MainFunction(void)
@ : void
@ : void
@ : CAN_TRCV_MAINFUCTION_CALL_CYCLE ms调用
@ : 2015/03/13
@ : V1.0
@ :
*****************************************************************************************/
void CanTrcv_MainFunction(void)
{
if( COM_FALSE != SeCanTrcv_u_IsInit )
{
}
else
{
/*Avoid Warning*/
}
}

View File

@ -0,0 +1,49 @@
#if !defined(CANTRCV_H)
#define CANTRCV_H
/***包含头文件***/
#include "CanTrcv_Cfg.h"
/***收发器模块类据类型***/
typedef enum
{
CANTRCV_UNINIT = 0u,
CANTRCV_NORMAL,
CANTRCV_STANDBY
}CanTrcv_WorkModeType;
typedef enum
{
CANTRCV_WAKE_BY_NONE = 0u,
CANTRCV_WAKE_BY_BUS,
CANTRCV_WAKE_BY_PIN,
CANTRCV_WAKE_BY_PIN_BUS
}CanTrcv_WakeReasonType;
typedef enum
{
CANTRCV_WAKE_VIA_NONE = 0u,
CANTRCV_WAKE_VIA_BUS,
CANTRCV_WAKE_VIA_PIN,
CANTRCV_WAKE_VIA_ALL
}CanTrcv_WakeModeType;
/***API接口***/
extern void ReInitCanTrcv_Parameter(void);
extern void CanTrcv_MainFunction(void);
extern void InitCanTrcv_Parameter(void);
extern void DeInitCanTrcv_Parameter(void);
extern void GetCanTrcv_WorkMode(CanTrcv_WorkModeType *LeCanTrcv_e_WorkModePtr);
extern void SetCanTrcv_WorkMode(CanTrcv_WorkModeType LeCanTrcv_e_WorkMode);
extern void GetCanTrcv_WakeReason(CanTrcv_WakeReasonType *LeCanTrcv_e_WakeReasonPtr);
extern void ClearCanTrcv_WakeReason(void);
extern void SetCanTrcv_WakeMode(CanTrcv_WakeModeType LeCanTrcv_e_WakeMode);
extern void GetCanTrcv_WakeMode(CanTrcv_WakeModeType *LeCanTrcv_e_WakeModePtr);
#endif

View File

@ -0,0 +1,58 @@
/**------------------历史版本信息-------------------------------------------------------
** :
**
** :
** :
**-------------------------------------------------------------------------------------*/
//#include "IO_cfg.h"
#include "CanTrcv_Cfg.h"
/****************************************************************************************
@ : void SetCanTrcvCfg_NormalMode(void)
@ : void
@ : void
@ :
@ : 2015/04/11
@ : V1.0
@ :
*****************************************************************************************/
void SetCanTrcvCfg_NormalMode(void)
{
// SetGpio_Channel_Level(O_CAN_STB/*CAN STB IO */,STD_LOW);
}
/****************************************************************************************
@ : void SetCanTrcvCfg_StandbyMode(void)
@ : void
@ : void
@ :
@ : 2015/04/11
@ : V1.0
@ :
*****************************************************************************************/
void SetCanTrcvCfg_StandbyMode(void)
{
// SetGpio_Channel_Level(O_CAN_STB/*CAN STB IO */,STD_HIGH);
}

View File

@ -0,0 +1,29 @@
#if !defined(CANTRCV_CFG_H)
#define CANTRCV_CFG_H
/**包含头文件**/
#include "ComTypes.h"
/*----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------*/
/***CanTrcv_MainFunction调度周期***/
#define CAN_TRCV_MAINFUCTION_CALL_CYCLE 5u /*ms*/
/***CAN 控制器模式控制宏函数***/
extern void SetCanTrcvCfg_StandbyMode(void);
extern void SetCanTrcvCfg_NormalMode(void);
#define SET_CANTRCV_STANDBY() SetCanTrcvCfg_StandbyMode()
#define SET_CANTRCV_NORMAL() SetCanTrcvCfg_NormalMode()
/*----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------*/
#endif

View File

@ -0,0 +1,41 @@
#if !defined(COM_TYPE_H)
#define COM_TYPE_H
typedef unsigned char ComUint8;
typedef unsigned short ComUint16;
typedef unsigned long ComUint32;
typedef unsigned char ComStd_ReturnType;
#define COM_E_OK 0U
#define COM_E_NOT_OK 1U
#define COM_E_PENDING 2U
#define COM_TRUE 1U
#define COM_FALSE 0U
#ifndef COM_NULL_PTR
#define COM_NULL_PTR 0L
#endif
#ifndef COM_STD_ON
#define COM_STD_ON 1U
#endif
#ifndef COM_STD_OFF
#define COM_STD_OFF 0U
#endif
#ifndef __TYPEDEF__
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef signed short int16_t;
typedef unsigned short uint16_t;
typedef signed long int32_t;
typedef unsigned long uint32_t;
typedef unsigned short MD_STATUS;
#define __TYPEDEF__
#endif
#endif

View File

@ -0,0 +1,89 @@
/******************************************************************************
| File Name : DCM_Types.h
| Description: Company standard definition
******************************************************************************/
#ifndef DCM_TYPES_H
#define DCM_TYPES_H
/******************************************************************************
* Description: : Include File Section
******************************************************************************/
/******************************************************************************
* Description: : Macro Description Section
******************************************************************************/
typedef signed char int8;
typedef signed int int16;
typedef signed long int32;
typedef unsigned char uint8;
typedef unsigned int uint16;
typedef unsigned long uint32;
typedef unsigned char bool1;
typedef union{
uint32 word;
uint8 byte[4];
}long2char_t;
#ifndef DCM_ON
# define DCM_ON 1U
#endif
#ifndef DCM_OFF
#define DCM_OFF 0U
#endif
#ifndef DCM_TRUE
# define DCM_TRUE 1U
#endif
#ifndef DCM_FALSE
# define DCM_FALSE 0U
#endif
#ifndef DCM_HIGH
# define DCM_HIGH 1U
#endif
#ifndef DCM_LOW
# define DCM_LOW 0U
#endif
#ifndef DCM_ACTIVE
# define DCM_ACTIVE 1U
#endif
#ifndef DCM_INACTIVE
# define DCM_INACTIVE 0U
#endif
#ifndef DCM_NULL
# define DCM_NULL 0U
#endif
/* NULL_PTR define with a void pointer to zero definition*/
#ifndef DCM_NULL_PTR
# define DCM_NULL_PTR ((void *)0)
#endif
/******************************************************************************
* Description: : Structure Type Declaration Section
******************************************************************************/
/******************************************************************************
* Description: : Global Variable Declaration Section
******************************************************************************/
/******************************************************************************
* Description: : Global Function Prototype Declaration
******************************************************************************/
#endif

View File

@ -0,0 +1,790 @@
/************************************************************
| : DCM_DTC.c
| DTC相关服务函数
|
|
|
***********************************************************/
//DCM_DTC.c
#include "Dcm_App_Cfg.h"
#include "Dcm_App.h"
#include "can_drv.h"
//#include "can_task.h"
//#include "eel.h"
//#include "r_fdl_types.h"
#include "Dcm_extern.h"
const TsDcm_h_DtcGroupType CaDcm_u_DtcTable[DCM_SUPDTC_COUNT]={
{ 0,0xF0,0x06,0x16},
{ 1,0xF0,0x06,0x17},
{ 2,0x91,0x81,0x14},
{ 3,0x91,0x81,0x12},
{ 4,0x91,0x81,0x71},
{ 5,0x91,0x83,0x12},
{ 6,0x91,0x83,0x14},
{ 7,0x91,0x83,0x71},
{ 8,0x91,0x84,0x12},
{ 9,0x91,0x84,0x14},
{10,0x91,0x84,0x71},
{11,0x91,0x86,0x11},
{12,0x91,0x86,0x14},
{13,0xC0,0x73,0x00},
};
DtcStutas_T DtcStutas[DCM_SUPDTC_COUNT]; // DTC 状态数组
static uint16 tDiagStart; //上电复位后网络诊断延迟时间
uint16 tDiagStartVolt; // 电源电压异常恢复后诊断延迟时间
/********************************************************/
void DtcStutasInit(void)
{
uint8 DtcIndex;
uint8 LastConfirmedDTC[28];
DF_Read(LastConfirmedDTC,GetIndexNumber(8),28);
for(DtcIndex=0;DtcIndex<DCM_SUPDTC_COUNT;DtcIndex++)
{
if(LastConfirmedDTC[DtcIndex*2] != 0xFF)
{
DtcStutas[DtcIndex].DtcStutas = LastConfirmedDTC[DtcIndex*2];
if(0!=(LastConfirmedDTC[DtcIndex*2] & ConfirmedDTC)){
LastConfirmedDTC[DtcIndex*2+1]++;
if(40<=LastConfirmedDTC[DtcIndex*2+1]){
LastConfirmedDTC[DtcIndex*2] = 0;
LastConfirmedDTC[DtcIndex*2+1] = 0xFF;
ClearDtcStutas(DtcIndex);
DtcStutas[DtcIndex].EepWrtEnable = 1;
}
else{
DtcStutas[DtcIndex].EepWrtEnable = 0;
}
}
else{
DtcStutas[DtcIndex].EepWrtEnable = 1;
}
}
else{
DtcStutas[DtcIndex].EepWrtEnable = 1;
}
}
DF_Write(LastConfirmedDTC,GetIndexNumber(8),28);
}
void DtcInit(void)
{
tDiagStart = 1500;
tDiagStartVolt = 500;
DtcStutasInit();
}
void DtcDiagConditionChk(void)
{
if(tDiagStart > 0)
tDiagStart --;
if(GetIgnVoltStatus() == 0)
{
if(tDiagStartVolt > 0)
tDiagStartVolt--;
}
else
tDiagStartVolt = 500;
}
static bool1 ChkDiagVolt(void)
{
return (tDiagStartVolt == 0);
}
static bool1 ChkNetDiagCondition(void)
{
return ((tDiagStart == 0)&&(tDiagStartVolt == 0));
}
static uint8 GetLastSnapshotRecordNum(uint8 DtcIndex)
{
uint8 temp,SnapshotRecordNum = 0;
uint32 DtcSnapshotRecord[32];
DF_Read(DtcSnapshotRecord,DtcIndex<<1,128);
for(temp=0;temp<=7;temp++)
{
if(DtcSnapshotRecord[(temp<<2)+3] != 0xFFFFFFFF)
SnapshotRecordNum |= 1<<temp;
}
switch(SnapshotRecordNum)
{
case 1:
case 0xF1:return 0;
case 3:
case 0xF3:return 1;
case 7:
case 0xF7:return 2;
case 15:return 3;
case 31:return 4;
case 63:return 5;
case 127:return 6;
case 255:return 7;
default:return 7;
}
}
#if 0
void GetSnapshotRecord(uint8 * Data)
{
uint16 Temp16;
(void *) Data;
Temp16 = GetModeFeedbackVoltage();
*Data++ = (uint8)(Temp16>>8);
*Data++ = (uint8)Temp16&0xFF;
Temp16 = GetRecFeedbackVoltage();
*Data++ = (uint8)(Temp16>>8);
*Data++ = (uint8)Temp16&0xFF;
Temp16 = EvaSensorFeedbackVoltage();
*Data++ = (uint8)(Temp16>>8);
*Data++ = (uint8)Temp16&0xFF;
Temp16 = GetPtcTmpSnsVolt();
*Data++ = (uint8)(Temp16>>8);
*Data++ = (uint8)Temp16&0xFF;
Temp16 = GetFanFeedBackVolt();
*Data++ = (uint8)(Temp16>>8);
*Data++ = (uint8)Temp16&0xFF;
Temp16 = GetCompSnsVolt();
*Data++ = (uint8)(Temp16>>8);
*Data++ = (uint8)Temp16&0xFF;
}
#endif
static void WriteDtcSnapshot(uint8 DtcIndex)
{
uint8 temp[2];
#if (defined (DTC_ONE_SNAPSHOT) && (DTC_ONE_SNAPSHOT == NO))
uint32 DtcSnapshotRecord[32];
#else
uint32 DtcSnapshotRecord[4];
#endif
DtcStutas[DtcIndex].DtcStutas |= (TestFailed | ConfirmedDTC);
if(DtcStutas[DtcIndex].EepWrtEnable)
{
DtcStutas[DtcIndex].EepWrtEnable = 0;
DF_Read(temp,GetIndexNumber(DtcIndex+8),2);
temp[0] = DtcStutas[DtcIndex].DtcStutas & ConfirmedDTC;
DF_Write(&temp,GetIndexNumber(DtcIndex+8),2);
}
}
void ClearDtcStutas(uint8 DtcIndex)
{
// DtcStutas[DtcIndex].EepWrtEnable = 1; //2017/7/4 15:19:34 spark del
// DtcStutas[DtcIndex].DtcStutas &= ~(TestNotCompletedThisOperationCycle | TestFailed); //2017/7/2 11:52:29 del
DtcStutas[DtcIndex].DtcStutas &= ~TestFailed; //2017/7/2 11:52:56 spark add
}
static void CanDTC_AcBusOffDetected(void)
{
// uint8 temp;
// uint32 DtcSnapshotRecord[32];
if(ChkNetDiagCondition() == 0) return;
if(0!=GetCanBusOffErr()) {
WriteDtcSnapshot(AC_BusOff);
DtcStutas[AC_BusOff].DtcStutas &= ~TestFailed;
}
#if 0
if((BusOffCnt < 10) && (BusOffCnt > 0))
DtcStutas[AC_BusOff].DtcStutas |= TestNotCompletedThisOperationCycle;
else if(BusOffCnt >= 10)
{
if(DtcStutas[AC_BusOff].EepWrtEnable)
{
WriteDtcSnapshot(AC_BusOff);
}
}
else if(BusOffCnt == 0)
{
ClearDtcStutas(AC_BusOff);
}
#endif
}
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
static void PowerVoltageChk(void)
{
static uint8 PowerOverVoltCnt,PowerUderVoltCnt;
if(GetVoltage(KL30_VOLTAGE) > 160)
{
if(PowerOverVoltCnt < 50) /* 50*40ms = 2s */
PowerOverVoltCnt++;
else
WriteDtcSnapshot(AC_OVER_VOLTAGE);
}
else
{
if(PowerOverVoltCnt > 0){
PowerOverVoltCnt--;
if(PowerOverVoltCnt>37){ /* 37*40ms = 1.48s */
PowerOverVoltCnt = 37;
}
}
else{
ClearDtcStutas(AC_OVER_VOLTAGE);
}
}
if(GetVoltage(KL30_VOLTAGE) < 90)
{
if(PowerUderVoltCnt < 50) /* 50*40ms = 2s */
PowerUderVoltCnt++;
else
WriteDtcSnapshot(AC_LOW_VOLTAGE);
}
else
{
if(PowerUderVoltCnt > 0){
PowerUderVoltCnt--;
if(PowerUderVoltCnt>37){ /* 37*40ms = 1.48s */
PowerUderVoltCnt = 37;
}
}
else
ClearDtcStutas(AC_LOW_VOLTAGE);
}
}
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
static void TempMotorFeedbackChk(void)
{
static uint8 TempOverVoltCnt,TempUderVoltCnt;
if(GetVoltage(TEMP_MOTOR) >= 49)
{
if(TempOverVoltCnt < 50) /* 50*40ms = 2s */
TempOverVoltCnt++;
else
WriteDtcSnapshot(AC_TEMP_MOTOR_SHORT_CUT_TO_VCC);
}
else
{
if(TempOverVoltCnt > 0){
TempOverVoltCnt--;
if(TempOverVoltCnt>37){ /* 37*40ms = 1.48s */
TempOverVoltCnt = 37;
}
}
else
ClearDtcStutas(AC_TEMP_MOTOR_SHORT_CUT_TO_VCC);
}
if(GetVoltage(TEMP_MOTOR) <= 1)
{
if(TempUderVoltCnt < 50) /* 50*40ms = 2s */
TempUderVoltCnt++;
else
WriteDtcSnapshot(AC_TEMP_MOTOR_SHORT_CUT_TO_GND);
}
else
{
if(TempUderVoltCnt > 0){
TempUderVoltCnt--;
if(TempUderVoltCnt>37){ /* 37*40ms = 1.48s */
TempUderVoltCnt = 37;
}
}
else
ClearDtcStutas(AC_TEMP_MOTOR_SHORT_CUT_TO_GND);
}
}
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
static void ModeMotorFeedbackChk(void)
{
static uint8 ModeOverVoltCnt,ModeUderVoltCnt;
if(GetVoltage(MODE_MOTOR) >= 49)
{
if(ModeOverVoltCnt < 50) /* 50*40ms = 2s */
ModeOverVoltCnt++;
else
WriteDtcSnapshot(AC_MODE_MOTOR_SHORT_CUT_TO_VCC);
}
else
{
if(ModeOverVoltCnt > 0){
ModeOverVoltCnt--;
if(ModeOverVoltCnt>37){ /* 37*40ms = 1.48s */
ModeOverVoltCnt = 37;
}
}
else
ClearDtcStutas(AC_MODE_MOTOR_SHORT_CUT_TO_VCC);
}
if(GetVoltage(MODE_MOTOR) <= 1)
{
if(ModeUderVoltCnt < 50) /* 50*40ms = 2s */
ModeUderVoltCnt++;
else
WriteDtcSnapshot(AC_MODE_MOTOR_SHORT_CUT_TO_GND);
}
else
{
if(ModeUderVoltCnt > 0){
ModeUderVoltCnt--;
if(ModeUderVoltCnt>37){ /* 37*40ms = 1.48s */
ModeUderVoltCnt = 37;
}
}
else
ClearDtcStutas(AC_MODE_MOTOR_SHORT_CUT_TO_GND);
}
}
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
static void RecMotorFeedbackChk(void)
{
static uint8 RecOverVoltCnt,RecUderVoltCnt;
if(GetVoltage(REC_MOTOR) >= 49)
{
if(RecOverVoltCnt < 50) /* 50*40ms = 2s */
RecOverVoltCnt++;
else
WriteDtcSnapshot(AC_REC_MOTOR_SHORT_CUT_TO_VCC);
}
else
{
if(RecOverVoltCnt > 0){
RecOverVoltCnt--;
if(RecOverVoltCnt>37){ /* 37*40ms = 1.48s */
RecOverVoltCnt = 37;
}
}
else
ClearDtcStutas(AC_REC_MOTOR_SHORT_CUT_TO_VCC);
}
if(GetVoltage(REC_MOTOR) <= 1)
{
if(RecUderVoltCnt < 50) /* 50*40ms = 2s */
RecUderVoltCnt++;
else
WriteDtcSnapshot(AC_REC_MOTOR_SHORT_CUT_TO_GND);
}
else
{
if(RecUderVoltCnt > 0){
RecUderVoltCnt--;
if(RecUderVoltCnt>37){ /* 37*40ms = 1.48s */
RecUderVoltCnt = 37;
}
}
else
ClearDtcStutas(AC_REC_MOTOR_SHORT_CUT_TO_GND);
}
}
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
static void EvaSensorChk(void)
{
static uint8 EvaOverVoltCnt,EvaUderVoltCnt;
if(GetVoltage(EVA_SENSOR) >= 49)
{
if(EvaOverVoltCnt < 50) /* 50*40ms = 2s */
EvaOverVoltCnt++;
else
WriteDtcSnapshot(AC_EVA_SENSOR_SHORT_CUT_TO_VCC);
}
else
{
if(EvaOverVoltCnt > 0){
EvaOverVoltCnt--;
if(EvaOverVoltCnt>37){ /* 37*40ms = 1.48s */
EvaOverVoltCnt = 37;
}
}
else
ClearDtcStutas(AC_EVA_SENSOR_SHORT_CUT_TO_VCC);
}
if(GetVoltage(EVA_SENSOR) <= 1)
{
if(EvaUderVoltCnt < 50) /* 50*40ms = 2s */
EvaUderVoltCnt++;
else
WriteDtcSnapshot(AC_EVA_SENSOR_SHORT_CUT_TO_GND);
}
else
{
if(EvaUderVoltCnt > 0){
EvaUderVoltCnt--;
if(EvaUderVoltCnt>37){ /* 37*40ms = 1.48s */
EvaUderVoltCnt = 37;
}
}
else
ClearDtcStutas(AC_EVA_SENSOR_SHORT_CUT_TO_GND);
}
}
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
static void MotorLockChk(void)
{
if(GetMotorLockStatus(TEMP_MOTOR) != 0)
{
WriteDtcSnapshot(AC_TEMP_MOTOR_LOCK);
}
else
{
ClearDtcStutas(AC_TEMP_MOTOR_LOCK);
}
if(GetMotorLockStatus(MODE_MOTOR) != 0)
{
WriteDtcSnapshot(AC_MODE_MOTOR_LOCK);
}
else
{
ClearDtcStutas(AC_MODE_MOTOR_LOCK);
}
if(GetMotorLockStatus(REC_MOTOR) != 0)
{
WriteDtcSnapshot(AC_REC_MOTOR_LOCK);
}
else
{
ClearDtcStutas(AC_REC_MOTOR_LOCK);
}
}
static void CanDTC_CycChk(void)
{
PowerVoltageChk();
TempMotorFeedbackChk();
ModeMotorFeedbackChk();
RecMotorFeedbackChk();
EvaSensorChk();
}
extern uint8 GetNormalMsgSts(void);
void CanDTC_Task(void)
{
static uint8 DtcTestCycleTim;
//if(ChkDiagVolt()==0) return;
CanDTC_AcBusOffDetected();
if(GetNormalMsgSts() & 0x02)
{
//CanDTC_CanCommunicationLostDetected(HMI_ControlCommand_ID);
//CanDTC_CanCommunicationLostDetected(VCU_DisplayInfo_ID);
//CanDTC_CanCommunicationLostDetected(COMP_Information_ID);
//CanDTC_CompErrChk();
//CanDTC_MotorRunTimeChk();
MotorLockChk();
if(DtcTestCycleTim < DTC_TEST_CYCLE_TIM)
{
DtcTestCycleTim++;
}
else{
DtcTestCycleTim = 0;
CanDTC_CycChk();
}
}
}
uint8 GetDtcStutas(uint8 DtcIndex)
{
return DtcStutas[DtcIndex].DtcStutas;
}
uint8 GetDtcSnapshotRecord(uint8 Index,uint8 * Buf,uint8 * Length ,uint8 DtcSnapshotRecordNum)
{
uint8 SnapshotRecordBuf[16];
DF_Read(SnapshotRecordBuf,Index,16);
if((DtcSnapshotRecordNum >= 1)&&(DtcSnapshotRecordNum <=6))
{
*Buf++ = DtcSnapshotRecordNum;
*Buf++ = 1;
*Buf++ = 0x0A;
*Buf++ = DtcSnapshotRecordNum - 1;
*Buf++ = SnapshotRecordBuf[(DtcSnapshotRecordNum - 1)<<1];
*Buf++ = SnapshotRecordBuf[((DtcSnapshotRecordNum - 1)<<1)+1];
*Length += 6;
}
else if(DtcSnapshotRecordNum == 0xFF)
{
for(DtcSnapshotRecordNum = 1;DtcSnapshotRecordNum<=6;DtcSnapshotRecordNum++)
{
*Buf++ = DtcSnapshotRecordNum;
*Buf++ = 1;
*Buf++ = 0x0A;
*Buf++ = DtcSnapshotRecordNum - 1;
*Buf++ = SnapshotRecordBuf[(DtcSnapshotRecordNum - 1)<<1];
*Buf++ = SnapshotRecordBuf[((DtcSnapshotRecordNum - 1)<<1)+1];
*Length += 6;
}
}
else
return DCM_NORESULT;
return 0;
}
// 19 01
uint8 MngDcm_ReportNumberOfDTCByStatusMask(void)
{
uint8 LaDcm_u_TempBuffer[6];
TeDcm_h_ResultType LeDcm_u_Result;
uint8 DtcCnt,Index;
VeDcm_h_RqustInfo.StateMask = VeDcm_P_DataAddress[2];
if(VeDcm_h_RqustInfo.StateMask & DTC_STATUS_AVAILABILITY_MASK)
{
LaDcm_u_TempBuffer[0] = VeDcm_h_RqustInfo.Sid + 0x40;
LaDcm_u_TempBuffer[1] = VeDcm_h_RqustInfo.Sub;
LaDcm_u_TempBuffer[2] = DTC_STATUS_AVAILABILITY_MASK;
for(Index=0;Index<DCM_SUPDTC_COUNT;Index++)
{
if(GetDtcStutas(Index) & VeDcm_h_RqustInfo.StateMask)
DtcCnt++;
}
LaDcm_u_TempBuffer[3] = ISO_14229_1_DTC_FORMAT;
LaDcm_u_TempBuffer[4] = 0;
LaDcm_u_TempBuffer[5] = DtcCnt;
SetCanTp_TxBuffer(6U,LaDcm_u_TempBuffer); /*调用接口发送响应数据*/
LeDcm_u_Result = CeDcm_e_ResultPosRsp;
}
else
{
/*设置NRC31*/
MngDcm_PrepareNegRsp(VeDcm_h_RqustInfo.Sid,CaDcm_u_NRCData[DCM_NRC31]); /*整理负响应数据*/
SetCanTp_TxBuffer(3U,VaDcm_u_NegRspTxBuffer); /*调用接口发送响应数据*/
LeDcm_u_Result = CeDcm_e_ResultNegRsp;
}
return LeDcm_u_Result;
}
// 19 02
uint8 MngDcm_ReportDTCByStatusMask(void)
{
uint8 LaDcm_u_TempBuffer[DCM_TXBUFFER_LENGTH];
TeDcm_h_ResultType LeDcm_u_Result;
uint8 DtcIndex;
uint8 DtcReporLength;
VeDcm_h_RqustInfo.StateMask = VeDcm_P_DataAddress[2];
if(VeDcm_h_RqustInfo.StateMask & DTC_STATUS_AVAILABILITY_MASK)
{
LaDcm_u_TempBuffer[0] = VeDcm_h_RqustInfo.Sid + 0x40;
LaDcm_u_TempBuffer[1] = VeDcm_h_RqustInfo.Sub;
LaDcm_u_TempBuffer[2] = DTC_STATUS_AVAILABILITY_MASK;
DtcReporLength = 3;
for(DtcIndex=0;DtcIndex<DCM_SUPDTC_COUNT;DtcIndex++)
{
if(GetDtcStutas(DtcIndex) & VeDcm_h_RqustInfo.StateMask)
{
LaDcm_u_TempBuffer[DtcReporLength++] = CaDcm_u_DtcTable[DtcIndex].DtcHigh;
LaDcm_u_TempBuffer[DtcReporLength++] = CaDcm_u_DtcTable[DtcIndex].DtcMiddle;
LaDcm_u_TempBuffer[DtcReporLength++] = CaDcm_u_DtcTable[DtcIndex].DtcLow;
LaDcm_u_TempBuffer[DtcReporLength++] = GetDtcStutas(DtcIndex);
}
}
SetCanTp_TxBuffer(DtcReporLength,LaDcm_u_TempBuffer); /*调用接口发送响应数据*/
LeDcm_u_Result = CeDcm_e_ResultPosRsp;
}
else
{
/*设置NRC31*/
MngDcm_PrepareNegRsp(VeDcm_h_RqustInfo.Sid,CaDcm_u_NRCData[DCM_NRC31]); /*整理负响应数据*/
SetCanTp_TxBuffer(3U,VaDcm_u_NegRspTxBuffer); /*调用接口发送响应数据*/
LeDcm_u_Result = CeDcm_e_ResultNegRsp;
}
return LeDcm_u_Result;
}
#if 0
// 19 04
uint8 MngDcm_ReportDTCSnapshotRecordByDTCNumber(void)
{
uint8 LaDcm_u_TempBuffer[DCM_TXBUFFER_LENGTH];
TeDcm_h_ResultType LeDcm_u_Result;
uint8 DtcIndex;
uint8 DtcSnapshotRecordNum;
uint8 DtcReporLength = 0;
DtcSnapshotRecordNum = VeDcm_P_DataAddress[5];
for(DtcIndex=0;DtcIndex<DCM_SUPDTC_COUNT;DtcIndex++)
{
if((CaDcm_u_DtcTable[DtcIndex].DtcHigh == VeDcm_P_DataAddress[2]) && (CaDcm_u_DtcTable[DtcIndex].DtcMiddle == VeDcm_P_DataAddress[3]) && (CaDcm_u_DtcTable[DtcIndex].DtcLow == VeDcm_P_DataAddress[4]))
{
LaDcm_u_TempBuffer[0] = VeDcm_h_RqustInfo.Sid + 0x40;
LaDcm_u_TempBuffer[1] = VeDcm_h_RqustInfo.Sub;
LaDcm_u_TempBuffer[2] = VeDcm_P_DataAddress[2];
LaDcm_u_TempBuffer[3] = VeDcm_P_DataAddress[3];
LaDcm_u_TempBuffer[4] = VeDcm_P_DataAddress[4];
LaDcm_u_TempBuffer[5] = GetDtcStutas(DtcIndex);
DtcReporLength = 6;
if(GetDtcSnapshotRecord(DtcIndex,LaDcm_u_TempBuffer+6,&DtcReporLength,DtcSnapshotRecordNum) != DCM_NORESULT)
{
SetCanTp_TxBuffer(DtcReporLength,LaDcm_u_TempBuffer); /*调用接口发送响应数据*/
LeDcm_u_Result = CeDcm_e_ResultPosRsp;
}
else
{
/*设置NRC31*/
MngDcm_PrepareNegRsp(VeDcm_h_RqustInfo.Sid,CaDcm_u_NRCData[DCM_NRC31]); /*整理负响应数据*/
SetCanTp_TxBuffer(3U,VaDcm_u_NegRspTxBuffer); /*调用接口发送响应数据*/
LeDcm_u_Result = CeDcm_e_ResultNegRsp;
}
break;
}
}
if((DtcIndex == DCM_SUPDTC_COUNT) && (DtcReporLength == 0))
{
/*设置NRC31*/
MngDcm_PrepareNegRsp(VeDcm_h_RqustInfo.Sid,CaDcm_u_NRCData[DCM_NRC31]); /*整理负响应数据*/
SetCanTp_TxBuffer(3U,VaDcm_u_NegRspTxBuffer); /*调用接口发送响应数据*/
LeDcm_u_Result = CeDcm_e_ResultNegRsp;
}
return LeDcm_u_Result;
}
// 19 06
uint8 MngDcm_ReportDTCExtendedDataRecordByDTCNumber(void)
{
uint8 LaDcm_u_TempBuffer[DCM_TXBUFFER_LENGTH];
TeDcm_h_ResultType LeDcm_u_Result;
uint8 DtcIndex;
uint8 DtcReporLength;
for(DtcIndex=0;DtcIndex<DCM_SUPDTC_COUNT;DtcIndex++)
{
if((CaDcm_u_DtcTable[DtcIndex].DtcHigh == VeDcm_P_DataAddress[2]) && (CaDcm_u_DtcTable[DtcIndex].DtcMiddle == VeDcm_P_DataAddress[3]) && (CaDcm_u_DtcTable[DtcIndex].DtcLow == VeDcm_P_DataAddress[4]))
{
LaDcm_u_TempBuffer[0] = VeDcm_h_RqustInfo.Sid + 0x40;
LaDcm_u_TempBuffer[1] = VeDcm_h_RqustInfo.Sub;
LaDcm_u_TempBuffer[2] = VeDcm_P_DataAddress[3];
LaDcm_u_TempBuffer[3] = VeDcm_P_DataAddress[4];
LaDcm_u_TempBuffer[4] = VeDcm_P_DataAddress[5];
LaDcm_u_TempBuffer[5] = GetDtcStutas(DtcIndex);
LaDcm_u_TempBuffer[6] = 1;
LaDcm_u_TempBuffer[7] = 0xFF;
LaDcm_u_TempBuffer[8] = 0xFF;
LaDcm_u_TempBuffer[9] = 0xFF;
LaDcm_u_TempBuffer[10] = 0xFF;
LaDcm_u_TempBuffer[11] = 2;
LaDcm_u_TempBuffer[12] = 0xFF;
LaDcm_u_TempBuffer[13] = 0xFF;
LaDcm_u_TempBuffer[14] = 0xFF;
LaDcm_u_TempBuffer[15] = 0xFF;
LaDcm_u_TempBuffer[16] = 3;
LaDcm_u_TempBuffer[17] = 0xFF;
LaDcm_u_TempBuffer[18] = 0xFF;
LaDcm_u_TempBuffer[19] = 0xFF;
LaDcm_u_TempBuffer[20] = 0xFF;
LaDcm_u_TempBuffer[21] = 4;
LaDcm_u_TempBuffer[22] = 0xFF;
LaDcm_u_TempBuffer[23] = 0xFF;
LaDcm_u_TempBuffer[24] = 0xFF;
LaDcm_u_TempBuffer[25] = 0xFF;
SetCanTp_TxBuffer(25,LaDcm_u_TempBuffer); /*调用接口发送响应数据*/
LeDcm_u_Result = CeDcm_e_ResultPosRsp;
break;
}
}
return LeDcm_u_Result;
}
#endif
//19 0A
uint8 MngDcm_ReportSupportedDTC(void)
{
uint8 LaDcm_u_TempBuffer[DCM_TXBUFFER_LENGTH];
TeDcm_h_ResultType LeDcm_u_Result;
uint8 DtcIndex;
uint8 DtcReporLength;
LaDcm_u_TempBuffer[0] = VeDcm_h_RqustInfo.Sid + 0x40;
LaDcm_u_TempBuffer[1] = VeDcm_h_RqustInfo.Sub;
LaDcm_u_TempBuffer[2] = DTC_STATUS_AVAILABILITY_MASK;
DtcReporLength = 3;
for(DtcIndex=0;DtcIndex<DCM_SUPDTC_COUNT;DtcIndex++)
{
LaDcm_u_TempBuffer[DtcReporLength++] = CaDcm_u_DtcTable[DtcIndex].DtcHigh;
LaDcm_u_TempBuffer[DtcReporLength++] = CaDcm_u_DtcTable[DtcIndex].DtcMiddle;
LaDcm_u_TempBuffer[DtcReporLength++] = CaDcm_u_DtcTable[DtcIndex].DtcLow;
LaDcm_u_TempBuffer[DtcReporLength++] = DTC_STATUS_AVAILABILITY_MASK;
}
SetCanTp_TxBuffer(DtcReporLength,LaDcm_u_TempBuffer); /*调用接口发送响应数据*/
LeDcm_u_Result = CeDcm_e_ResultPosRsp;
return LeDcm_u_Result;
}
bool1 MngDcm_CleanDtc(void)
{
uint8 DtcIndex;
uint8 temp[28]={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,0,};
uint8 t_we = 0;
for(DtcIndex=0;DtcIndex<DCM_SUPDTC_COUNT;DtcIndex++)
{
DtcStutas[DtcIndex].DtcStutas = 0;
}
if(0!=DF_Write(&temp,GetIndexNumber(8),28)){
t_we++;
}
if(0 == t_we)
return DCM_ACTIVE;
else
return DCM_FALSE;
}

View File

@ -0,0 +1,128 @@
//DCM_DTC.h
#ifndef DCM_DTC_H
#define DCM_DTC_H
#include "DCM_Types.h"
#define DCM_19SUPDTCEXTDATARECORD_COUNT (4U)
/* 19 06支持的DTCExtDataRecord 参数个数 */
#define DCM_SUPDTC_COUNT ( 14U )
/* 产品支持的DTC个数 */
#define DTC_TEST_CYCLE_TIM 40U // 40mS一个周期
#define ISO_15031_6_DTC_FORMAT 0U
#define ISO_14229_1_DTC_FORMAT 1U
#define DTC_STATUS_AVAILABILITY_MASK 0x09U
typedef uint8 (*ReportDTCExtDataFun)(uint8* LeDemDtcNum,uint8 LeDemParameter,uint8* LeDemDataRecord);
/*19 06 服务支持的 DTCExtDataRecordNumber 列表结构体*/
typedef struct
{
uint8 DTCExtDataRecordNumber; /*扩展数据number*/
ReportDTCExtDataFun Function; /*扩展数据number 对应函数的处理函数*/
}DTCExtDataRecordType;
typedef struct
{
uint8 DtcIndex;
uint8 DtcHigh; /*DTC 高字节*/
uint8 DtcMiddle; /*DTC 中间字节*/
uint8 DtcLow; /*DTC 低字节*/
}TsDcm_h_DtcGroupType;
typedef enum
{
TestFailed = 0x01,
TestFailedThisOperationCycle = 0x02,
PendingDTC = 0x04,
ConfirmedDTC = 0x08,
TestNotCompletedSinceLastClea = 0x10,
TestFailedSinceLastClear = 0x20,
TestNotCompletedThisOperationCycle = 0x40,
WarningIndicatorRequested =0x80,
}StatusOfDtc_T;
/******************************************************************************
* Description: : Global Variable Declaration Section
******************************************************************************/
extern const TsDcm_h_DtcGroupType CaDcm_u_DtcTable[DCM_SUPDTC_COUNT];
extern const DTCExtDataRecordType CaDcm_h_19DTCExtDataRecordTable[DCM_19SUPDTCEXTDATARECORD_COUNT];
typedef struct{
uint8 DtcStutas;
bool1 EepWrtEnable;
}DtcStutas_T;
extern DtcStutas_T DtcStutas[DCM_SUPDTC_COUNT];
#if 0
#define AC_BusOff 0
#define AC_CommunicationLostWithHMI 1
#define AC_CommunicationLostWithVCU 2
#define AC_CommunicationLostWithComp 3
#define AC_PTC_PressureSensorShortCircuit 4
#define AC_PTC_PressureSensorOpenCircuit 5
#define AC_BlowermotorShortCircuit 6
#define AC_BlowermotorOpenCircuit 7
#define AC_PressureSensorShortCircuit 8
#define AC_PressureSensorOpenCircuit 9
#define AC_CoolingPressureTooHight 10
#define AC_CoolingPressureTooLow 11
#define AC_COMP_InternalVoltageFault 12
#define AC_COMP_UnderVoltageFault 13
#define AC_COMP_OverVoltageFault 14
#define AC_COMP_OverCurrentFault 15
#define AC_COMP_TemperatureFault 16
#define AC_COMP_BusOff 17
#define AC_COMP_LossCommunicationWithAC 18
#define AC_EvaporatorTemperatureSensorOpenCircuit 19
#define AC_EvaporatorTemperatureSensorShortCircuit 20
#define AC_ServoMotorShortCircuit 21
#define AC_ServoMotorPositionFault 22
#define AC_LoopMotorShortCircuit 23
#define AC_LoopMotorPositionFault 24
#endif
#define AC_LOW_VOLTAGE 0
#define AC_OVER_VOLTAGE 1
#define AC_TEMP_MOTOR_SHORT_CUT_TO_VCC 2
#define AC_TEMP_MOTOR_SHORT_CUT_TO_GND 3
#define AC_TEMP_MOTOR_LOCK 4
#define AC_MODE_MOTOR_SHORT_CUT_TO_VCC 5
#define AC_MODE_MOTOR_SHORT_CUT_TO_GND 6
#define AC_MODE_MOTOR_LOCK 7
#define AC_REC_MOTOR_SHORT_CUT_TO_VCC 8
#define AC_REC_MOTOR_SHORT_CUT_TO_GND 9
#define AC_REC_MOTOR_LOCK 10
#define AC_EVA_SENSOR_SHORT_CUT_TO_VCC 11
#define AC_EVA_SENSOR_SHORT_CUT_TO_GND 12
#define AC_BusOff 13
extern uint8_t BusOffCnt ;
extern void CanDTC_Task(void);
extern uint8 MngDcm_ReportNumberOfDTCByStatusMask(void);
extern uint8 MngDcm_ReportDTCByStatusMask(void);
//extern uint8 MngDcm_ReportDTCSnapshotRecordByDTCNumber(void);
//extern uint8 MngDcm_ReportDTCExtendedDataRecordByDTCNumber(void);
extern uint8 MngDcm_ReportSupportedDTC(void);
extern bool1 MngDcm_CleanDtc(void);
extern void DtcInit(void);
extern void DtcStutasInit(void);
extern void DtcDiagConditionChk(void);
void ClearDtcStutas(uint8 DtcIndex);
#endif

214
ECU_APP/diagnose/Dcm.c Normal file
View File

@ -0,0 +1,214 @@
/******************************************************************************
| File Name : Dcm.c
| Description:
|------------------------------------------------------------------------------
| (c) This software is the proprietary of Wenzhou Changjiang AutoMobile (DAMING)
| All rights are reserved by DAMING.
|------------------------------------------------------------------------------
| Initials Name Company
| -------- -------------------- ----------------------------------------
| DAMING
|------------------------------------------------------------------------------
| R E V I S I O N H I S T O R Y
|------------------------------------------------------------------------------
| Date Version Author Description
| ---------- -------- ------ ----------------------------------------
| 2015-10-10 1.0.1 chenlianwen
*****************************************************************************/
/******************************************************************************
* Description: : Include File Section
******************************************************************************/
#include "Dcm.h"
#include "can_drv.h"
/******************************************************************************
* Description: : Global Variable Definition Section
******************************************************************************/
const uint16 PeriodicDidServeTxTmMax[5]={0xFFFF,1000,500,100,0xFFFF};
/******************************************************************************
* Description: : Static Variable Definition Section
******************************************************************************/
/******************************************************************************
* Description: : Static Function Prototype Declaration
*****************************************************************************/
static void MngDcm_ConditionStateControl(void);
/******************************************************************************
* Description: : Write User Function Code
*****************************************************************************/
/******************************************************************************
* : void MngDcm_MainFunction(void)
* : void
* : void
* :
* : 2015-10-10
* :
*****************************************************************************/
void MngDcm_MainFunction(void)
{
uint8 LeDcm_u_SidIndex;
uint8 LeDcm_u_CheckSessionResult;
uint8 LeDcm_u_CheckSecurityAccessResult;
uint8 LeDcm_u_CheckAddressResult;
uint8 LaDcm_u_TempBuffer[6];
uint8 LeDcm_u_CheckMinDLResult;
uint8 LeDcm_u_CollectInfoResult;
TeDcm_h_ResultType LeDcm_u_FinallyResult;
/*根据条件调整参数*/
MngDcm_ConditionStateControl();
/*获取TP层数据接口 DL SID 请求类型*/
LeDcm_u_CollectInfoResult = MngDcm_CollectRequstInfo();
if(DCM_CHECK_OK == LeDcm_u_CollectInfoResult)
{
MngDcm_ResetS3serverTime(); /*S3server 计时计数值重新装载*/
LeDcm_u_SidIndex = MngDcm_SIDCheckAvailable(VeDcm_h_RqustInfo.Sid); /*检查SID是否支持*/
if( DCM_NORESULT!=LeDcm_u_SidIndex)
{
LeDcm_u_CheckSessionResult = MngDcm_SIDCheckSession(LeDcm_u_SidIndex); /*检查模式是否支持*/
if(DCM_CHECK_OK == LeDcm_u_CheckSessionResult)
{
LeDcm_u_CheckSecurityAccessResult = MngDcm_SIDCheckSecurityAccess(LeDcm_u_SidIndex); /*检查安全权限是否满足*/
if(DCM_CHECK_OK == LeDcm_u_CheckSecurityAccessResult )
{
if(DCM_FUNCTIONAL_ADDRESS == VeDcm_h_RqustInfo.RequstSty)
{
LeDcm_u_CheckAddressResult = MngDcm_SIDFuncAddressAvailable(LeDcm_u_SidIndex); /*是否支持功能寻址*/
if(DCM_CHECK_NOK == LeDcm_u_CheckAddressResult) /*不支持*/
{
SetCanTp_TxBuffer(0U,LaDcm_u_TempBuffer); /*调用接口发送响应数据 0数据为不响应*/
LeDcm_u_FinallyResult = CeDcm_e_ResultNoRsp;
}
else
{
LeDcm_u_CheckMinDLResult = MngDcm_SIDCheckMinDL(LeDcm_u_SidIndex,VeDcm_h_RqustInfo.DL); /*是否满足最小DL*/
if( DCM_CHECK_OK == LeDcm_u_CheckMinDLResult)
{
LeDcm_u_FinallyResult = CaDcm_h_SidCheckInfoTable[LeDcm_u_SidIndex].SidFunction(); /*调用SID入口函数*/
}
else
{
//设置NRC13
MngDcm_PrepareNegRsp(VeDcm_h_RqustInfo.Sid,CaDcm_u_NRCData[DCM_NRC13]); /*整理负响应数据*/
SetCanTp_TxBuffer(3U,VaDcm_u_NegRspTxBuffer); /*调用接口发送响应数据*/
LeDcm_u_FinallyResult = CeDcm_e_ResultNegRsp;
}
}
}
else
{
LeDcm_u_CheckMinDLResult = MngDcm_SIDCheckMinDL(LeDcm_u_SidIndex,VeDcm_h_RqustInfo.DL); /*是否满足最小DL*/
if( DCM_CHECK_OK == LeDcm_u_CheckMinDLResult)
{
LeDcm_u_FinallyResult = CaDcm_h_SidCheckInfoTable[LeDcm_u_SidIndex].SidFunction(); /*调用SID入口函数*/
}
else
{
//设置NRC13
MngDcm_PrepareNegRsp(VeDcm_h_RqustInfo.Sid,CaDcm_u_NRCData[DCM_NRC13]); /*整理负响应数据*/
SetCanTp_TxBuffer(3U,VaDcm_u_NegRspTxBuffer); /*调用接口发送响应数据*/
LeDcm_u_FinallyResult = CeDcm_e_ResultNegRsp;
}
}
}
else
{
MngDcm_PrepareNegRsp(VeDcm_h_RqustInfo.Sid,CaDcm_u_NRCData[DCM_NRC33]); /*整理负响应数据*/
SetCanTp_TxBuffer(3U,VaDcm_u_NegRspTxBuffer); /*调用接口发送响应数据*/
LeDcm_u_FinallyResult = CeDcm_e_ResultNegRsp;
}
}
else
{
//设置NRC7F
MngDcm_PrepareNegRsp(VeDcm_h_RqustInfo.Sid,CaDcm_u_NRCData[DCM_NRC7F]); /*整理负响应数据*/
SetCanTp_TxBuffer(3U,VaDcm_u_NegRspTxBuffer); /*调用接口发送响应数据*/
LeDcm_u_FinallyResult = CeDcm_e_ResultNegRsp;
}
}
else
{
if(DCM_FUNCTIONAL_ADDRESS == VeDcm_h_RqustInfo.RequstSty)
{
SetCanTp_TxBuffer(0U,LaDcm_u_TempBuffer); /*调用接口发送响应数据 0数据为不响应*/
LeDcm_u_FinallyResult = CeDcm_e_ResultNoRsp;
}else
{//设置NRC11
MngDcm_PrepareNegRsp(VeDcm_h_RqustInfo.Sid,CaDcm_u_NRCData[DCM_NRC11]); /*整理负响应数据*/
SetCanTp_TxBuffer(3U,VaDcm_u_NegRspTxBuffer); /*调用接口发送响应数据*/
LeDcm_u_FinallyResult = CeDcm_e_ResultNegRsp;
}
}
}else
{
}
if(DCM_S3SEVERTIMER_CONTINUE == GetCanTp_u_S3Sts())
{
MngDcmS3ServerCountCutDown(); /*S3server 计时 和 密钥错误延时计时*/
}
MngDcmKeyErrorDelayCountCutDown(); /*27 服务密钥错误次数到达后延时*/
DtcDiagConditionChk();
if(GetDtcEnable())
CanDTC_Task();
}
/******************************************************************************
* : void MngDcm_ConditionStateControl(void)
* : void
* : void
* : (S3severtime等)
* : 2015-10-10
* :
*****************************************************************************/
void MngDcm_ConditionStateControl(void)
{
if(0U == MngDcm_GetS3serverTime())
{
MngDcm_ChangeToDefaltSession();
}
}

42
ECU_APP/diagnose/Dcm.h Normal file
View File

@ -0,0 +1,42 @@
/******************************************************************************
| File Name : Dcm.h
| Description:
******************************************************************************/
#ifndef DCM_H_
#define DCM_H_
/******************************************************************************
* Description: : Include File Section
******************************************************************************/
#include"Dcm_Cfg.h"
/******************************************************************************
* Description: : Macro Description Section
******************************************************************************/
/******************************************************************************
* Description: : Structure Type Declaration Section
******************************************************************************/
/******************************************************************************
* Description: : Global Variable Declaration Section
******************************************************************************/
//extern TsDcm_h_2APeriodicDidServe PeriodicDidServe[DCM_PERIODIC_DATA_COUNT];
//extern const TsDcm_h_DidCheckType CaDcm_h_2AReadDidCheckInfoTable[DCM_PERIODIC_DATA_COUNT];
/******************************************************************************
* Description: : Global Function Prototype Declaration
******************************************************************************/
extern void MngDcm_MainFunction(void);
#endif

2194
ECU_APP/diagnose/Dcm_App.c Normal file

File diff suppressed because it is too large Load Diff

233
ECU_APP/diagnose/Dcm_App.h Normal file
View File

@ -0,0 +1,233 @@
/******************************************************************************
| File Name : Dcm_App.h
| Description:
******************************************************************************/
#ifndef DCM_APP_H
#define DCM_APP_H
/******************************************************************************
* Description: : Include File Section
******************************************************************************/
#include "Dcm_App_Cfg.h"
/******************************************************************************
* Description: : Macro Description Section
******************************************************************************/
#define SetMcu_SoftReset() do{WDTE = 0;}while(1)
#define DCM_PHYSICAL_ADDRESS 0x01 /*宏定寻址方式*/
#define DCM_FUNCTIONAL_ADDRESS 0x02
#define DCM_DEFAULT_SESSION 0x01 /*默认模式*/
#define DCM_PROGRAMME_SESSION 0x02 /*编程模式*/
#define DCM_EXTEND_SESSION 0x04 /*扩展模式*/
#define DCM_DIAGNOSTIC_SESSION_DEFAULT DCM_DEFAULT_SESSION /*上电默认诊断会话模式*/
#define DCM_SECURITYACCESS_L2_UNLOCK 0x07 /*解锁状态*/
#define DCM_SECURITYACCESS_L1_UNLOCK 0x06 /*L1解锁状态*/
#define DCM_SECURITYACCESS_DEFAULT 0x04 /*默认安全状态状态*/
#define DCM_SECURITY_LEVEL_DEFAULT 0x07
#define DCM_SECURITYACCESS_LEVEL_L1 0x03
#define DCM_SECURITYACCESS_LEVEL_L2 0x01
#define DCM_19SUPMASK 0x09 /*19服务的有效掩码*/
#define DCM_15031_6_DTCFORMAT 0x00 /*DTC格式*/
#define DCM_DTCSET_ENABLE 1U /*DTC设置使能*/
#define DCM_DTCSET_DISENABLE 0U /*DTC设置关闭*/
#define DCM_MSGTXRX_ENABLE 1U /*报文收发状态 使能*/
#define DCM_MSGTXRX_DISENABLE 0U /*报文收发状态 关闭*/
#define DCM_SASERVERSTS_DEFAULT 0U /*27服务状态机 默认状态 初始状态*/
#define DCM_SASERVERSTS_REQUESTKEY (0x80)//1U /*27服务状态机 已请求种子*/
#define DCM_SASERVERSTS_UNLOCK 2U /*27服务状态机 已解锁*/
#define DCM_SASERVERSTS_ERROR 4U /*27服务状态机 密钥错误延时*/
#define DCM_S3SEVERTIMER_STOP 0U /*S3ServerTime 计时停止*/
#define DCM_S3SEVERTIMER_CONTINUE 1U /*S3ServerTime 计时继续*/
#define DCM_DTCDATA_MAXLENGTH 36 /*DTC列表最大数据量*/
#define DCM_TXBUFFER_LENGTH 105U /*发送buffer的长度*/
#define DCM_SASERVER_KEYLENGTH 4U /*密钥长度*/
#define DCM_SASERVER_KEYERRORCOUNT 3U /*允许密钥错误次数*/
#define DCM_RIDRESULT_SUCCESS 0x04 /*历程处理成功*/
#define DCM_RIDRESULT_FAILURE 0x05 /*历程处理失败*/
#define DCM_RIDRUNSTS_FINISH 0x01
#define DCM_RIDRUNSTS_IDLE 0x00
#define DCM_READDID_MAXNUMBER 5U /*22 一次性读取的DID 最大个数*/
#define DCM_WRITEDATA_MAXLENGTH 20U /*2E服务写入数据最大长度*/
#define DCM_SASERVERSTS_ERRORDELAY_COUNT 10000U /*密钥错误延时*/
#define DCM_SASERVERSTS_ERRORDELAY_COUNT_DEFAULT 10000U /*密钥错误延时 上电默认值*/
#define DCM_S3SEVERTIMEOUT 5000U /*S3ServerTime计时超时计数量标定*/
#define DCM_DATAFOMATLDENTIFER 0x00 /*34 服务参数 数据格式*/
#define DCM_ADDRESSANDLENGTHFOMATLDENTIFER 0x44 /*34 服务参数 地址和数据长度格式*/
#define DCM_DOWNLOAD_MINADDRESS 0x00000000 /*34 服务参数 最小地址*/
#define DCM_DOWNLOAD_MAXADDRESS 0xFFFFFFFF /*34 服务参数 最大地址*/
#define DCM_DOWNLOAD_MAXDATALENGTH 0xFFF /*34 服务参数 最长数据长度*/
#define DCM_LENGTHFOMATLDENTIFER 0x20 /*34 服务参数 正响应里的 数据长度格式*/
#define DCM_DOWNLOAD_RECEIVEDATALENGTH 0x0400 /*36 服务 接收数据缓存数组长度*/
/******************************************************************************
* Description: : Structure Type Declaration Section
******************************************************************************/
/*@结构类型typedef定义*/
/*34 36 37 数据下载相关服务处理状态*/
typedef enum
{
CeDcm_e_DownLoadRelax =0,
CeDcm_e_DownLoadRequested,
CeDcm_e_DownLoadDuringTransmit,
CeDcm_e_DownLoadTransmited
}TeDcm_e_DownLoadStsType;
/*例程控制状态*/
typedef enum
{
CeDcm_e_RidStart =0,
CeDcm_e_RidStop,
CeDcm_e_RidGetResult
}TeDcm_e_RidStsType;
typedef enum
{
Rid_Idle,
Rid_Finish
}RidRunSts_T;
/*TP数据分拣出的信息 完整信息*/
typedef struct
{
uint16 DL; /*有效字节长度*/
uint8 Sid; /*SID*/
uint8 RequstSty; /*请求方式*/
uint8 Sub; /*子服务*/
uint8 DtcGroup[3]; /*DTC组*/
uint8 StateMask; /*请求的 状态掩码*/
uint8 Key[DCM_SASERVER_KEYLENGTH]; /*密钥信息*/
uint8 CommType; /*通讯类型*/
uint8 Did[DCM_READDID_MAXNUMBER*2]; /*具体DID*/
uint8 DidCount; /*DID个数*/
uint16 Rid; /*RID*/
uint8 WriteData[DCM_WRITEDATA_MAXLENGTH]; /*写入的数据*/
}TsDcm_h_RquestInfo;
typedef enum{
DCM_RESET_NOTREADY,
DCM_RESET_READY
}DcmReset_T;
/******************************************************************************
* Description: : Global Variable Declaration Section
******************************************************************************/
/*调试暂用*/
extern uint8 TempTP[];
/*@全局变量声明extern*/
extern uint8* VeDcm_P_DataAddress; /*TP层数据地址*/
extern uint8 VeDcm_u_DL; /*TP层数据长度*/
extern uint8 VeDcm_u_RequstSty; /*TP层数据请求方式*/
extern uint8 VaDcm_u_NegRspTxBuffer[3];
extern TsDcm_h_RquestInfo VeDcm_h_RqustInfo;
extern uint16 VeDcm_w_S3ServerTime; /*S3ServerTime计数*/
extern uint8 VeDcm_u_S3ServerTimeSts;
extern uint8 VeDcm_u_DiagnosticSession; /*诊断会话模式*/
extern uint8 VeDcm_u_SecurityAccessState; /*安全权限状态*/
/******************************************************************************
* Description: : Global Function Prototype Declaration
******************************************************************************/
/*@接口函数声明extern*/
extern uint8 MngDcm_CollectRequstInfo(void);
extern TeDcm_h_ResultType MngDcm_DefaultSessionDeal(void);
extern TeDcm_h_ResultType MngDcm_ProgramSessionDeal(void);
extern TeDcm_h_ResultType MngDcm_ExtendedSessionDeal(void);
extern TeDcm_h_ResultType MngDcm_SoftResetDeal(void);
extern TeDcm_h_ResultType MngDcm_CleanDTC(uint32 Group);
extern TeDcm_h_ResultType MngDcm_DynamicaDefineNewDid(void);
extern TeDcm_h_ResultType MngDcm_ClearDynamicaDid(void);
extern TeDcm_h_ResultType MngDcm_RequestSeekDeal(uint8 SecurityLevel);
extern TeDcm_h_ResultType MngDcm_KeyCkeckDeal(uint8 dummy);
extern TeDcm_h_ResultType MngDcm_CtrlCommunication(uint8 CommunicationType);
extern TeDcm_h_ResultType MngDcm_DisenableCommunication(void);
extern TeDcm_h_ResultType MngDcm_RoutineFF02Start(void);
extern TeDcm_h_ResultType MngDcm_RoutineFF02Stop(void);
extern TeDcm_h_ResultType MngDcm_RoutineFF02Result(void);
extern TeDcm_h_ResultType MngDcm_RoutineF001Start(void) ;
extern TeDcm_h_ResultType MngDcm_RoutineF001Stop(void) ;
extern TeDcm_h_ResultType MngDcm_RoutineF001Result(void);
extern TeDcm_h_ResultType MngDcm_TesterPresentDeal(void);
extern TeDcm_h_ResultType MngDcm_DTCSettingEnable(void);
extern TeDcm_h_ResultType MngDcm_DTCSettingDisenable(void);
extern void MngDcm_ChangeToDefaltSession(void);
extern void MngDcmS3ServerCountCutDown(void);
extern void MngDcmKeyErrorDelayCountCutDown(void);
extern void MngDcm_PrepareNegRsp(uint8 Sid,uint8 Nrc);
extern void MngDcm_DataMoveDeal(uint8* TargetAddress,uint8 TargetPost,uint8* SourceAddress,uint8 SourcePost,uint8 DataLength);
extern TeDcm_h_ResultType MngDcm_RequestDownloadService(void);
extern TeDcm_h_ResultType MngDcm_TransmitDataService(void);
extern TeDcm_h_ResultType MngDcm_TransmitExitService(void);
extern void InitDcm_Parameter (void);
extern uint16 MngDcm_GetS3serverTime(void);
extern uint8 MngDcm_GetS3serverTimeSts(void);
extern uint8 MngDcm_GetDiagnosticSession(void);
extern uint8 MngDcm_GetSecurityAccessSts(void);
extern TeDcm_h_ResultType MngDcm_RoutineFF00Start(void);
extern TeDcm_h_ResultType MngDcm_RoutineFF01Start(void);
extern TeDcm_h_ResultType MngDcm_RoutineFF00Stop(void);
extern TeDcm_h_ResultType MngDcm_RoutineFF01Stop(void);
extern TeDcm_h_ResultType MngDcm_RoutineFF00Result(void);
extern TeDcm_h_ResultType MngDcm_RoutineFF01Result(void);
extern uint8 GetDtcEnable(void);
extern void CleanIoDid(void);
extern void MngDcm_ResetS3serverTime(void);
extern void resetS3Server(void);
#endif

View File

@ -0,0 +1,24 @@
/******************************************************************************
| File Name : Dcm_App.c
| Description: ÕïÏ·þÎñ¾ßÌå´¦Àí
*****************************************************************************/
/******************************************************************************
* Description: : Include File Section
******************************************************************************/
#include "Dcm_App_Cfg.h"
/******************************************************************************
* Description: : Global Variable Definition Section
******************************************************************************/
/******************************************************************************
* Description: : Static Variable Definition Section
******************************************************************************/

View File

@ -0,0 +1,38 @@
/******************************************************************************
| File Name : Dcm_App.h
| Description:
******************************************************************************/
#ifndef DCM_APP_CFG_H
#define DCM_APP_CFG_H
/******************************************************************************
* Description: : Include File Section
******************************************************************************/
#include "DCM_Types.h"
#include "Dcm_DID.h"
#include "CanTp.h"
#include "Dcm_Key.h"
#include "DCM_DTC.h"
/******************************************************************************
* Description: : Macro Description Section
******************************************************************************/
/******************************************************************************
* Description: : Structure Type Declaration Section
******************************************************************************/
/*½á¹¹ÀàÐÍtypedef¶¨Òå*/
/*ÏìÓ¦ÀàÐÍ*/
typedef enum
{
CeDcm_e_ResultNegRsp =0,
CeDcm_e_ResultPosRsp,
CeDcm_e_ResultNoRsp
}TeDcm_h_ResultType;
#endif

1938
ECU_APP/diagnose/Dcm_Cfg.c Normal file

File diff suppressed because it is too large Load Diff

212
ECU_APP/diagnose/Dcm_Cfg.h Normal file
View File

@ -0,0 +1,212 @@
/*@处根据实际情况填写相关信息,将@字符以及这条提示语句去掉*/
/******************************************************************************
| File Name : Dcm_Cfg.h
| Description:
******************************************************************************/
#ifndef DCM_CFG_H
#define DCM_CFG_H
/******************************************************************************
* Description: : Include File Section
******************************************************************************/
#include "Dcm_App.h"
/******************************************************************************
* Description: : Macro Description Section
******************************************************************************/
#define YES 1
#define NO 0
#define DID_RECORD ( NO )
#define SID_RECORD ( YES )
#define DAMING_CAN_BOOT ( NO )
#define DCM_SUPPORTSID_COUNT 12U /*支持的SID数目*/
#define DCM_10SUB_COUNT 3U /*10服务子服务个数*/
#define DCM_11SUB_COUNT 2U /*11服务子服务个数*/
#define DCM_19SUB_COUNT 3U /*19服务子服务个数*/
#define DCM_27SUB_COUNT 2U /*27服务子服务个数*/
#define DCM_28SUB_COUNT 3U /*28服务子服务个数*/
#define DCM_31RID_COUNT 1U /*31服务子服务个数*/
#define DCM_RIDFF02_SUB_COUNT 3U /*31 FF02 支持的子服务个数*/
#define DCM_RIDFF00_SUB_COUNT 3U /*31 FF00 支持的子服务个数*/
#define DCM_RIDFF01_SUB_COUNT 3U /*31 FF01 支持的子服务个数*/
#define DCM_RIDF001_SUB_COUNT 3U /* 31 F001 支持的子服务个数 */
#define DCM_3ESUB_COUNT 1U /*3E服务子服务个数*/
#define DCM_85SUB_COUNT 2U /*85服务子服务个数*/
#define DCM_2CSUB_COUNT 2U /*2C服务子服务个数*/
#define DCM_14DTCGROUP_COUNT 3U /*14服务支持的DTC组个数*/
#if (defined (DAMING_CAN_BOOT) && (DAMING_CAN_BOOT == YES))
#define DCM_READ_DIDSUP_COUNT 15U /*22 服务支持的DID 个数 */
#else
#define DCM_READ_DIDSUP_COUNT 24U /* 22 服务支持的DID 个数 */
#endif
#define DCM_IO_DIDSUP_COUNT 5U /*2F 服务支持的DID 个数*/
#define DCM_PERIODIC_DATA_COUNT 0U /*2A 服务支持DID个数 */
#define DCM_WRITE_DIDSUP_COUNT 7U /*2E 服务支持的DID 个数*/
#define DCM_ONEDID_MAXDATALENGTH 20U /*22 单个DID 数据最大长度*/
/******************************************************************************
* Description: : Structure Type Declaration Section
******************************************************************************/
#define ROUTINECTRL_DID_CheckProgrammingIntegrity 0x0202
#define ROUTINECTRL_DID_CheckProgrammingPreconditions 0x0203
#define ROUTINECTRL_DID_CheckProgrammingDependencies 0xFF01
#define ROUTINECTRL_DID_EraseMemory 0xFF00
typedef TeDcm_h_ResultType (*ServerDealfunc)(void);
/*SID 条件检查项*/
typedef struct
{
uint8 SupportSession; /*支持的会话模式*/
uint8 SupportSecurityAccess; /*支持的安全权限*/
uint8 SupportRequestAddress; /*支持的请求方式*/
uint8 MinDL; /*SID 对应的最小DL*/
uint8 SubCount; /*子服务个数 */
uint8 Sid; /*SID */
ServerDealfunc SidFunction;
}TsDcm_h_SidCheckInfoType;
typedef TeDcm_h_ResultType (*SubDealfunc)(void );
typedef TeDcm_h_ResultType (*SubDealfuncWithPara)(uint8 );
/*子服务信息列表结构体*/
typedef struct
{
uint8 Sub; /*子服务*/
uint8 DL; /*子服务 对应的正确DL*/
SubDealfunc SubFunction; /*子服务 对应函数的处理函数*/
}TsDcm_h_SubCheckType;
typedef struct
{
uint8 Sub; /*子服务*/
uint8 DL; /*子服务 对应的正确DL*/
SubDealfuncWithPara SubFunction; /*子服务 对应函数的处理函数*/
}TsDcm_h_WithParaSubCheckType;
/*子服务信息列表结构体*/
typedef struct
{
uint8 Sub; /*子服务*/
uint8 DL; /*子服务 对应的正确DL*/
SubDealfunc SubFunction; /*子服务 对应函数的处理函数*/
}TsDcm_h_DtcCheckType;
typedef uint8 (*DidDealfunc)(uint8* LeDcm_u_DataAddress,uint8* LeDcm_u_DataLength);
/* 22 2E 2A服务 DID 信息列表结构体*/
typedef struct
{
uint8 SupportSession; /*支持的会话模式*/
uint8 SupportSecurityAccess; /*支持的安全权限*/
uint8 DataLength; /*数据长度*/
uint16 Did; /*具体DID*/
DidDealfunc Function; /*DID 对应函数的处理函数*/
}TsDcm_h_DidCheckType;
typedef struct
{
uint8 Did;
uint8 TransmissionMode;
uint16 TmCount;
}TsDcm_h_2APeriodicDidServe;
typedef TeDcm_h_ResultType (*DtcDealfunc)(uint32 LeDcm_DtcGroup);
/*14 服务信息列表结构体*/
#if 0
typedef struct
{
uint32 Dtc; /* DTC组 */
DtcDealfunc CleanFunction; /* 子服务 对应函数的处理函数 */
}TsDcm_h_DtcCheckType;
#endif
typedef TeDcm_h_ResultType (*RidDealfunc)(void);
/*Rid 支持的子服务及处理函数信息的列表结构体*/
typedef struct
{
uint8 Sub; /*子服务*/
uint8 DL; /*服务 对应的正确DL*/
RidDealfunc Function; /*服务 对应函数的处理函数*/
}TsDcm_h_RidSubCheckType;
/* 31服务 RID 信息列表结构体*/
typedef struct
{
uint8 SupportSession; /*支持的会话模式*/
uint8 SupportSecurityAccess; /*支持的安全权限*/
uint16 Rid; /*Rid*/
const TsDcm_h_RidSubCheckType* RidSubTable; /*Rid 支持的子服务列表*/
}TsDcm_h_RidCheckType;
typedef struct
{
uint8 write;
uint8 data;
}TsDcm_h_IO_parameter_t;
/******************************************************************************
* Description: : Global Variable Declaration Section
******************************************************************************/
extern const TsDcm_h_SidCheckInfoType CaDcm_h_SidCheckInfoTable[DCM_SUPPORTSID_COUNT];
/******************************************************************************
* Description: : Global Function Prototype Declaration
******************************************************************************/
extern uint8 MngDcm_SIDCheckAvailable(uint8 LeDcm_u_Sid);
extern uint8 MngDcm_SIDCheckSession(uint8 LeDcm_u_SidIndex);
extern uint8 MngDcm_SIDCheckSecurityAccess(uint8 LeDcm_u_SidIndex);
extern uint8 MngDcm_SIDFuncAddressAvailable(uint8 LeDcm_u_SidIndex);
extern uint8 MngDcm_SIDCheckMinDL(uint8 LeDcm_u_SidIndex,uint16 LeDcm_u_DL);
extern TeDcm_h_ResultType MngDcm_SessionControlService(void);
extern TeDcm_h_ResultType MngDcm_ECUResetService(void);
extern TeDcm_h_ResultType MngDcm_CleanDTCService(void);
extern TeDcm_h_ResultType MngDcm_ReportDTCService(void);
extern TeDcm_h_ResultType MngDcm_ReadDidDataService(void);
extern TeDcm_h_ResultType MngDcm_SecurityAccessService(void);
extern TeDcm_h_ResultType MngDcm_CommunicationControlService(void);
extern TeDcm_h_ResultType MngDcm_WriteDidDataService(void);
extern TeDcm_h_ResultType MngDcm_RoutineControlService(void);
extern TeDcm_h_ResultType MngDcm_TesterPresentService(void);
extern TeDcm_h_ResultType MngDcm_DTCSettingControlService(void);
extern TeDcm_h_ResultType MngDcm_ReadMemoryDataService(void);
extern TeDcm_h_ResultType MngDcm_SecurityAccessService(void);
extern TeDcm_h_ResultType MngDcm_WriteMemoryDataService(void);
extern TeDcm_h_ResultType MngDcm_ReadDataByIdentifier(void);
extern TeDcm_h_ResultType MngDcm_ReadDTCInfoService(void);
extern TeDcm_h_ResultType MngDcm_DynamicaDefineIdentifier(void);
extern TeDcm_h_ResultType MngDcm_IOCtrlDIDService(void);
extern TeDcm_h_ResultType MngDcm_DynamicaDefineIdentifier(void);
#endif

1736
ECU_APP/diagnose/Dcm_DID.c Normal file

File diff suppressed because it is too large Load Diff

111
ECU_APP/diagnose/Dcm_DID.h Normal file
View File

@ -0,0 +1,111 @@
/******************************************************************************
| File Name : @ÎļþÃû
| Description: @ÎļþÃèÊö
******************************************************************************/
#ifndef _DCM_DID_H
#define _DCM_DID_H
/******************************************************************************
* Description: : Include File Section
******************************************************************************/
#include "Dcm_DID_Cfg.h"
/******************************************************************************
* Description: : Macro Description Section
******************************************************************************/
/******************************************************************************
* Description: : Structure Type Declaration Section
******************************************************************************/
/******************************************************************************
* Description: : Global Variable Declaration Section
******************************************************************************/
/******************************************************************************
* Description: : Global Function Prototype Declaration
******************************************************************************/
extern uint8 Dcm_DidServices_0x0200_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0x0201_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF110_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF110_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF112_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF112_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF197_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF180_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF181_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF183_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
//extern uint8 Dcm_DidServices_0xF184_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF186_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF187_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF189_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength) ;
extern uint8 Dcm_DidServices_0xF18A_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF18B_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF18C_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF190_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF190_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF191_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF192_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF193_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF194_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF195_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF197_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF197_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF198_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF198_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF199_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF199_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF19D_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF19D_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF1A2_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF1A2_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF1A4_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF1A5_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF1A5_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF1A6_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF1A6_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0x016B_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0x016C_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0x016D_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0x016E_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0x016F_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0x0620_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0x0621_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0x0622_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0x3A00(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0x3A01(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF200_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF201_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF202_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF203_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF204_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF205_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xF206_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0x6300_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0x6308_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0x630B_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0x630C_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0x630D_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0x630F_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0xFD00_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0x6300_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0x6308_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0x630B_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0x630C_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0x630E_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength);
//S51EV
extern uint8 Dcm_DidServices_0x1701_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0x1702_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0x1706_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0x1707_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0x1708_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0x1709_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
extern uint8 Dcm_DidServices_0x170B_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
#endif

View File

@ -0,0 +1,740 @@
/* @处根据实际情况填写相关信息,将@字符以及这条提示语句去掉 */
/******************************************************************************
| File Name : @
| Description: @
*****************************************************************************/
/******************************************************************************
* Description: : Include File Section
******************************************************************************/
/* @包含其他文件 */
#include "r_cg_macrodriver.h"
#include "Dcm_DID_Cfg.h"
//#include "R_TypeDefs.h"
//#include "r_fdl_types.h"
//#include "eel.h"
#include "r_cg_userdefine.h"
#include "Dcm_extern.h"
#include "hwCtrl.h"
#include "appTask.h"
unsigned char DF_Read(unsigned char* read_buf,unsigned char data_num,unsigned char len);
/******************************************************************************
* Description: : Global Variable Definition Section
******************************************************************************/
/*@ 定义全局变量 */
extern uint16 adResult[7];
uint8 TempTxBuffer[40];
/******************************************************************************
* Description: : Static Variable Definition Section
******************************************************************************/
uint8 CaDcm_u_NRCData[DCM_NRCCOUNT] = {0x11,0x12,0x13,0x14,0x22,0x24,0x31,0x33,0x35,0x36,0x37,0x7F,0x72,0x71,0x73,0x78,0x7E}; /*27 负响应码数组*/
uint8 wBuf[20] = {0,0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88,0x99,0xaa,0xbb,0xcc,0xdd,0xee,0xff,0};
/******************************************************************************
* Description: : Static Function Prototype Declaration
*****************************************************************************/
/*@静态函数声明*/
/******************************************************************************
* Description: : Write User Function Code
*****************************************************************************/
/*@函数头注释格式,所有函数头按照此格式注释*/
/******************************************************************************
* : @
* : @
* : @
* : @
* : @
* : @
*****************************************************************************/
uint8 GetRTE_Dcm_DidServices_0x0200_ReadData(uint8* data)
{
data[0] = *(__far uint8 *)DID_0200_ADDR;
if(data[0] != 0xFF) //R_FDL_OK
return DCM_CHECK_OK;
else
return DCM_CHECK_NOK;
}
/******************************************************************************
* : @
* : @
* : @
* : @
* : @
* : @
*****************************************************************************/
uint8 GetRTE_Dcm_DidServices_0x0201_ReadData(uint8* data)
{
data[0] = *(__far uint8 *)DID_0201_ADDR;
if(data[0] != 0xFF) //R_FDL_OK
return DCM_CHECK_OK;
else
return DCM_CHECK_NOK;
}
/******************************************************************************
* : @
* : @
* : @
* : @
* : @
* : @
*****************************************************************************/
uint8 GetRTE_Dcm_DidServices_0xF110_ReadData(uint8* data)
{
if( 0 == DF_Read(data,GetIndexNumber(INDEX_0xF110),8)) //R_FDL_OK
return DCM_CHECK_OK;
else
return DCM_CHECK_NOK;
}
/******************************************************************************
* : @
* : @
* : @
* : @
* : @
* : @
*****************************************************************************/
uint8 GetRTE_Dcm_DidServices_0xF112_ReadData(uint8* data)
{
if( 0 == DF_Read(data,GetIndexNumber(INDEX_0xF112),8)) //R_FDL_OK
return DCM_CHECK_OK;
else
return DCM_CHECK_NOK;
}
/******************************************************************************
* : @
* : @
* : @
* : @
* : @
* : @
*****************************************************************************/
uint8 GetRTE_Dcm_DidServices_0xF197_ReadData(uint8* data)
{
(void)data;
data[0] = 'T';
data[1] = 'O';
data[2] = 'N';
data[3] = 'G';
data[4] = 'Y';
data[5] = 'U';
data[6] = '-';
data[7] = 'S';
data[8] = 'C';
data[9] = 'M';
return DCM_CHECK_OK;
}
/******************************************************************************
* : @
* : @
* : @
* : @
* : @
* : @
*****************************************************************************/
uint8 GetRTE_Dcm_DidServices_0xF180_ReadData(uint8* data)
{
__far uint8 *p = DID_F180_ADDR;
(void)data;
data[0] = *p++;
data[1] = *p++;
data[2] = *p++;
data[3] = *p++;
data[4] = *p++;
data[5] = *p++;
data[6] = *p++;
data[7] = *p++;
data[8] = *p++;
data[9] = *p++;
data[10] = *p++;
data[11] = *p++;
data[12] = *p++;
data[13] = *p++;
data[14] = *p++;
data[15] = *p++;
return DCM_CHECK_OK;
}
/******************************************************************************
* : @
* : @
* : @
* : @
* : @
* : @
*****************************************************************************/
uint8 GetRTE_Dcm_DidServices_0xF181_ReadData(uint8* data)
{
(void)data;
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0xF183_ReadData(uint8* data)
{
(void)data;
return DCM_CHECK_OK;
}
#define DCM_DEFAULT_SESSION 0x01 /*默认模式*/
#define DCM_PROGRAMME_SESSION 0x02 /*编程模式*/
#define DCM_EXTEND_SESSION 0x04 /*扩展模式*/
extern uint8 MngDcm_GetDiagnosticSession(void);
uint8 GetRTE_Dcm_DidServices_0xF186_ReadData(uint8* data)
{
uint8 temp = 0xFF;
temp = MngDcm_GetDiagnosticSession(); /* 当前会话模式 */
if(temp == DCM_DEFAULT_SESSION){
*data = 0x01;
}
else if(temp == DCM_PROGRAMME_SESSION){
*data = 0x02;
}
else if(temp == DCM_EXTEND_SESSION){
*data = 0x03;
}
if( 0xFF != temp)
return DCM_CHECK_OK;
else
return DCM_CHECK_NOK;
}
uint8 GetRTE_Dcm_DidServices_0xF187_ReadData(uint8* data)
{
(void)data;//RF01-68013200
data[0] = 'R';
data[1] = 'F';
data[2] = '0';
data[3] = '1';
data[4] = '-';
data[5] = '6';
data[6] = '8';
data[7] = '0';
data[8] = '1';
data[9] = '3';
data[10] = '2';
data[11] = '0';
data[12] = '0';
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0xF189_ReadData(uint8* data)
{
(void)data;
data[0 ] = 'C';
data[1 ] = '4';
data[2 ] = '0';
data[3 ] = ' ';
data[4 ] = ' ';
data[5 ] = ' ';
data[6 ] = ' ';
data[7 ] = ' ';
data[8 ] = ' ';
data[9 ] = ' ';
data[10] = ' ';
data[11] = ' ';
data[12] = ' ';
data[13] = ' ';
data[14] = ' ';
data[15] = ' ';
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0xF18A_ReadData(uint8* data)
{
(void)data;
data[0] = 'C';
data[1] = 'L';
data[2] = '1';
data[3] = '7';
data[4] = '7';
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0xF18B_ReadData(uint8* data)
{
(void)data;
data[0] = 0x20;
GetManufacturingDate(&data[1]);
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0xF190_ReadData(uint8* data)
{
(void *)data;
if(0 == DF_Read(data,GetIndexNumber(INDEX_0xF190),17)) //R_FDL_OK
return DCM_CHECK_OK;
else
return DCM_CHECK_NOK;
}
uint8 GetRTE_Dcm_DidServices_0xF191_ReadData(uint8* data)
{
(void)data;
data[0] = '1';
data[1] = '.';
data[2] = '1';
data[3] = '.';
data[4] = '1';
data[5] = ' ';
data[6] = ' ';
data[7] = ' ';
data[8] = ' ';
data[9] = ' ';
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0xF192_ReadData(uint8* data)
{
(void)data;
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0xF193_ReadData(uint8* data)
{
__far uint8 *p = DID_F193_ADDR;
(void)data;
*data++ = *p++;
*data++ = *p++;
*data++ = *p++;
*data++ = *p++;
*data++ = *p++;
*data++ = *p++;
*data++ = *p++;
*data++ = *p++;
*data++ = *p++;
*data++ = *p++;
// GetHardwareVersion(data);
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0xF194_ReadData(uint8* data)
{
(void)data;
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0xF195_ReadData(uint8* data)
{
GetSoftwareVersion(data);
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0xF198_ReadData(uint8* data)
{
(void *)data;
if(0 == DF_Read(data,GetIndexNumber(INDEX_0xF198),16)) //R_FDL_OK
return DCM_CHECK_OK;
else
return DCM_CHECK_NOK;
}
uint8 GetRTE_Dcm_DidServices_0xF199_ReadData(uint8* data)
{
(void)data;
if(0 == DF_Read(data,GetIndexNumber(INDEX_0xF199),4)) //R_FDL_OK
return DCM_CHECK_OK;
else
return DCM_CHECK_NOK;
}
uint8 GetRTE_Dcm_DidServices_0xF19D_ReadData(uint8* data)
{
(void)data;
if(0 == DF_Read(data,GetIndexNumber(INDEX_0xF19D),4)) //R_FDL_OK
return DCM_CHECK_OK;
else
return DCM_CHECK_NOK;
}
uint8 GetRTE_Dcm_DidServices_0x6300_ReadData(uint8* data)
{
(void)data;
*data = GetIoParameter(IO_TEMP);
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0x6308_ReadData(uint8* data)
{
(void)data;
*data = GetIoParameter(IO_REC);
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0x630B_ReadData(uint8* data)
{
(void)data;
*data = GetIoParameter(IO_FAN);
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0x630C_ReadData(uint8* data)
{
(void)data;
*data = GetIoParameter(IO_MODE);
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0x630D_ReadData(uint8* data)
{
(void)data;
*data = GetIoParameter(IO_DEFROST);
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0x630F_ReadData(uint8* data)
{
(void)data;
*data = GetIoParameter(IO_AC);
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0xFD00_ReadData(uint8* data)
{
(void)data;
*data = GetIoParameter(IO_K30);
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0xF1A2_ReadData(uint8* data)
{
(void)data;
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0xF1A2_WriteData(uint8* data)
{
(void)data;
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0xF1A4_ReadData(uint8* data)
{
(void)data;
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0xF1A5_ReadData(uint8* data)
{
(void)data;
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0xF1A5_WriteData(uint8* data)
{
(void)data;
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0xF1A6_ReadData(uint8* data)
{
(void)data;
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0xF1A6_WriteData(uint8* data)
{
(void)data;
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0x061BReadData(uint8* data)
{
(void)data;
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0x061CReadData(uint8* data)
{
(void)data;
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0x061DReadData(uint8* data)
{
(void)data;
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0x061EReadData(uint8* data)
{
(void)data;
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0x061FReadData(uint8* data)
{
(void)data;
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0x0620ReadData(uint8* data)
{
(void)data;
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0x0621ReadData(uint8* data)
{
(void)data;
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0x0622ReadData(uint8* data)
{
(void)data;
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0x1701ReadData(uint8* data)
{
//getHallNum(data);
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0x1702ReadData(uint8* data)
{
//getHallSoftStop(data);
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0x1706ReadData(uint8* data)
{
//getMotorLearnState(data);
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0x1707ReadData(uint8* data)
{
//getMotorCurrent(data);
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0x1708ReadData(uint8* data)
{
//getInputStatus(data);
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0x1709ReadData(uint8* data)
{
//getOutputStatus(data);
return DCM_CHECK_OK;
}
uint8 GetRTE_Dcm_DidServices_0x170BReadData(uint8* data)
{
getIGNVoltage(data);
return DCM_CHECK_OK;
}
uint8 GetVehicel_u_SpeedVal(void)
{
uint8 LeVehicle_U_Speed = 1;
return LeVehicle_U_Speed;
}
/****************************************************************/
uint8 GetRTE_Dcm_DidServices_0xF110_WriteData(uint8* data)
{
uint8 temp;
for(temp = 0;temp < 8;temp++)
{
wBuf[temp] = data[temp];
}
temp = DF_Write(wBuf,GetIndexNumber(INDEX_0xF110),8);
if(temp == 0) //R_FDL_OK
return DCM_CHECK_OK;
else
return DCM_CHECK_NOK;
}
/****************************************************************/
uint8 GetRTE_Dcm_DidServices_0xF112_WriteData(uint8* data)
{
uint8 temp;
for(temp = 0;temp < 8;temp++)
{
wBuf[temp] = data[temp];
}
temp = DF_Write(wBuf,GetIndexNumber(INDEX_0xF112),8);
if(temp == 0) //R_FDL_OK
return DCM_CHECK_OK;
else
return DCM_CHECK_NOK;
}
uint8 GetRTE_Dcm_DidServices_0xF190_WriteData(uint8* data)
{
uint8 temp;
for(temp = 0;temp < 17;temp++)
{
wBuf[temp] = data[temp];
}
temp = DF_Write(wBuf,GetIndexNumber(INDEX_0xF190),17);
if(temp == 0) //R_FDL_OK
return DCM_CHECK_OK;
else
return DCM_CHECK_NOK;
}
uint8 GetRTE_Dcm_DidServices_0xF197_WriteData(uint8* data)
{
uint8 temp;
for(temp = 0;temp < 8;temp++)
{
wBuf[temp] = data[temp];
}
temp = DF_Write(wBuf,GetIndexNumber(INDEX_0xF197),8);
if(temp == 0) //R_FDL_OK
return DCM_CHECK_OK;
else
return DCM_CHECK_NOK;
}
uint8 GetRTE_Dcm_DidServices_0xF198_WriteData(uint8* data)
{
uint8 temp;
for(temp = 0;temp < 16;temp++)
{
wBuf[temp] = data[temp];
}
temp = DF_Write(wBuf,GetIndexNumber(INDEX_0xF198),16);
if(temp == 0) //R_FDL_OK
return DCM_CHECK_OK;
else
return DCM_CHECK_NOK;
}
uint8 GetRTE_Dcm_DidServices_0xF199_WriteData(uint8* data)
{
uint8 temp;
for(temp = 0;temp < 4;temp++)
{
wBuf[temp] = data[temp];
}
temp = DF_Write(wBuf,GetIndexNumber(INDEX_0xF199),4);
if(temp == 0) //R_FDL_OK
return DCM_CHECK_OK;
else
return DCM_CHECK_NOK;
}
uint8 GetRTE_Dcm_DidServices_0xF19D_WriteData(uint8* data)
{
uint8 temp;
for(temp = 0;temp < 4;temp++)
{
wBuf[temp] = data[temp];
}
temp = DF_Write(wBuf,GetIndexNumber(INDEX_0xF19D),4);
if(temp == 0) //R_FDL_OK
return DCM_CHECK_OK;
else
return DCM_CHECK_NOK;
}
/****************************************************************/
uint8 GetRTE_Dcm_DidServices_0x6300_WriteData(uint8* data)
{
uint8 temp;
temp = *(data+1);
WriteIoParameter(IO_TEMP,temp);
return DCM_CHECK_OK;
}
/****************************************************************/
uint8 GetRTE_Dcm_DidServices_0x6308_WriteData(uint8* data)
{
uint8 temp;
temp = *(data+1);
WriteIoParameter(IO_REC,temp);
return DCM_CHECK_OK;
}
/****************************************************************/
uint8 GetRTE_Dcm_DidServices_0x630B_WriteData(uint8* data)
{
uint8 temp;
temp = *(data+1);
WriteIoParameter(IO_FAN,temp);
return DCM_CHECK_OK;
}
/****************************************************************/
uint8 GetRTE_Dcm_DidServices_0x630C_WriteData(uint8* data)
{
uint8 temp;
temp = *(data+1);
WriteIoParameter(IO_MODE,temp);
return DCM_CHECK_OK;
}
/****************************************************************/
uint8 GetRTE_Dcm_DidServices_0x630E_WriteData(uint8* data)
{
uint8 temp;
temp = *(data+1);
WriteIoParameter(IO_REARDEF,temp);
return DCM_CHECK_OK;
}

View File

@ -0,0 +1,147 @@
/******************************************************************************
| File Name : @
| Description: @
******************************************************************************/
#ifndef _DCM_DID_CFG_H
#define _DCM_DID_CFG_H
/******************************************************************************
* Description: : Include File Section
******************************************************************************/
#include "DCM_Types.h"
//#include "eel.h"
/******************************************************************************
* Description: : Macro Description Section
******************************************************************************/
#define DCM_CHECK_NOK 0U /*宏定义条件检查返回结果*/
#define DCM_CHECK_OK 1U
#define DCM_NORESULT 0xFF /*未找到目标返回宏定义值*/
#define DCM_NRCCOUNT 17U
#define DCM_NRC11 0U
#define DCM_NRC12 1U
#define DCM_NRC13 2U
#define DCM_NRC14 3U
#define DCM_NRC22 4U
#define DCM_NRC24 5U
#define DCM_NRC31 6U
#define DCM_NRC33 7U
#define DCM_NRC35 8U
#define DCM_NRC36 9U
#define DCM_NRC37 10U
#define DCM_NRC7F 11U
#define DCM_NRC72 12U
#define DCM_NRC71 13U
#define DCM_NRC73 14U
#define DCM_NRC78 15U
#define DCM_NRC7E 16U
/******************************************************************************
* Description: : Structure Type Declaration Section
******************************************************************************/
/******************************************************************************
* Description: : Global Variable Declaration Section
******************************************************************************/
extern uint8 TempTxBuffer[40];
extern uint8 CaDcm_u_NRCData[DCM_NRCCOUNT];
/******************************************************************************
* Description: : Global Function Prototype Declaration
******************************************************************************/
extern uint8 GetRTE_Dcm_DidServices_0x0200_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0x0201_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF110_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF110_WriteData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF112_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF112_WriteData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF197_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF180_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF181_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF183_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF186_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF187_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF189_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF18A_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF18B_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF18C_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF190_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF190_WriteData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF191_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF192_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF193_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF194_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF195_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF197_WriteData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF198_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF198_WriteData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF199_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF199_WriteData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF19D_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF19D_WriteData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF1A2_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF1A2_WriteData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF1A4_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF1A5_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF1A5_WriteData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF1A6_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xF1A6_WriteData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0x061BReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0x061CReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0x061DReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0x061EReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0x061FReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0x0620ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0x0621ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0x0622ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0x6300_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0x6300_WriteData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0x6308_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0x6308_WriteData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0x630B_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0x630B_WriteData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0x630C_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0x630C_WriteData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0x630D_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0x630D_WriteData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0x630E_WriteData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0x630F_ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0xFD00_ReadData(uint8* data);
extern uint8 GetVehicel_u_SpeedVal(void);
//S51EV
extern uint8 GetRTE_Dcm_DidServices_0x1701ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0x1702ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0x1706ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0x1707ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0x1708ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0x1709ReadData(uint8* data);
extern uint8 GetRTE_Dcm_DidServices_0x170BReadData(uint8* data);
#if 0
extern uint16 EvaSensorFeedbackVoltage(void);
extern uint16 GetModeFeedbackVoltage(void);
extern uint16 GetRecFeedbackVoltage(void);
extern uint16 GetPtcTmpSnsVolt(void);
extern uint16 GetCompSnsVolt(void);
extern uint16 GetFanFeedBackVolt(void);
extern uint8 GetAC_OutputSignal(void) ;
extern uint8 GetBlowerOn_Signal(void);
extern uint8 GetRec_Moto_Status(void);
extern uint8 GetFan_Degree(void);
extern uint8 GetMode_Moto_Status(void);
extern uint8 GetRec_Moto_Drive_Status(void) ;
extern uint8 GetMode_Moto_Drive_Status(void);
extern uint16 GetBattyVoltage(void) ;
extern uint16 GetEvaTemperature(void);
#endif
#endif

112
ECU_APP/diagnose/Dcm_Key.c Normal file
View File

@ -0,0 +1,112 @@
/******************************************************************************
| File Name : Dcm_App.c
| Description: ÕïÏ·þÎñ¾ßÌå´¦Àí
*****************************************************************************/
/******************************************************************************
* Description: : Include File Section
******************************************************************************/
#include "Dcm_Key.h"
/******************************************************************************
* Description: : Global Variable Definition Section
******************************************************************************/
/******************************************************************************
* Description: : Static Variable Definition Section
******************************************************************************/
/******************************************************************************
* Description: : Write User Function Code
*****************************************************************************/
static const uint8 xorArray[4] = {0xAA,0x50,0x43,0x52};
uint32 GetSeed(void)
{
return (GetTimerCnt());
//return(0x0016CDB0); test
}
uint32 SecurityLevel_1(uint32 Seed)
{
SeedSec_t cal,key,seed;
seed.word = Seed;
cal.byte[0] = seed.byte[0]^xorArray[0];
cal.byte[1] = seed.byte[1]^xorArray[1];
cal.byte[2] = seed.byte[2]^xorArray[2];
cal.byte[3] = seed.byte[3]^xorArray[3];
#if 0
key.byte[0] = ((cal.byte[3]&0x0F)<<4)|( cal.byte[3]&0xF0);
key.byte[1] = ((cal.byte[1]&0x0F)<<4)|((cal.byte[0]&0xF0)>>4);
key.byte[2] = (cal.byte[1]&0xF0)|((cal.byte[2]&0xF0)>>4);
key.byte[3] = ((cal.byte[0]&0x0F)<<4)|( cal.byte[2]&0x0F);
#else
key.byte[3] = ((cal.byte[0]&0x0F)<<4)|( cal.byte[0]&0xF0);
key.byte[2] = ((cal.byte[2]&0x0F)<<4)|((cal.byte[3]&0xF0)>>4);
key.byte[1] = (cal.byte[2]&0xF0)|((cal.byte[1]&0xF0)>>4);
key.byte[0] = ((cal.byte[3]&0x0F)<<4)|( cal.byte[1]&0x0F);
#endif
return( key.word );
}
uint32 SecurityLevel_3(uint32 Seed)
{
SeedSec_t cal,key,seed;
seed.word = Seed;
cal.byte[0] = ((seed.byte[0]&0xF8)>>3)^xorArray[0];
cal.byte[1] = ((seed.byte[1]&0xF8)>>3)^xorArray[1];
cal.byte[2] = ((seed.byte[2]&0xF8)>>3)^xorArray[2];
cal.byte[3] = ((seed.byte[3]&0xF8)>>3)^xorArray[3];
key.byte[0] = ((cal.byte[3]&0x07)<<5)|(( cal.byte[0]&0xF8)>>3);
key.byte[1] = ((cal.byte[0]&0x07)<<5)|(cal.byte[2]&0x1F);
key.byte[2] = (cal.byte[1]&0xF8)|((cal.byte[3]&0xE0)>>5);
key.byte[3] = (cal.byte[2]&0xF8)|( cal.byte[1]&0x07);
return( key.word );
}
uint32 SecurityLevel_11(uint32 Seed)
{
SeedSec_t cal,key,seed,key_test;
seed.word = Seed;
cal.byte[0] = seed.byte[0]^xorArray[0];
cal.byte[1] = seed.byte[1]^xorArray[1];
cal.byte[2] = seed.byte[2]^xorArray[2];
cal.byte[3] = seed.byte[3]^xorArray[3];
#if 0
key.byte[0] = ((cal.byte[2]&0x03)<<6)|(( cal.byte[3]&0xFC)>>2);
key.byte[1] = ((cal.byte[3]&0x03)<<6)|(cal.byte[0]&0x3F);
key.byte[2] = (cal.byte[0]&0xFC)|((cal.byte[1]&0xC0)>>6);
key.byte[3] = (cal.byte[1]&0xFC)|( cal.byte[2]&0x03);
#else
key.byte[3] = ((cal.byte[1]&0x03)<<6)|(( cal.byte[0]&0xFC)>>2);
key.byte[2] = ((cal.byte[0]&0x03)<<6)|(cal.byte[3]&0x3F);
key.byte[1] = (cal.byte[3]&0xFC)|((cal.byte[2]&0xC0)>>6);
key.byte[0] = (cal.byte[2]&0xFC)|( cal.byte[1]&0x03);
#endif
return( key.word );
}
uint32 GENERIC_ALGORITHM(uint32 wSeed, uint8 SecurityLevel)
{
if(0x01==SecurityLevel){
return(SecurityLevel_1(wSeed));
}
else if(0x03==SecurityLevel){
return(SecurityLevel_3(wSeed));
}
else if(0x11==SecurityLevel){
return(SecurityLevel_11(wSeed));
}
}

View File

@ -0,0 +1,36 @@
/******************************************************************************
| File Name : @ÎļþÃû
| Description: @ÎļþÃèÊö
******************************************************************************/
#ifndef _DCM_KEY_H
#define _DCM_KEY_H
/******************************************************************************
* Description: : Include File Section
******************************************************************************/
#include "DCM_Types.h"
/******************************************************************************
* Description: : Macro Description Section
******************************************************************************/
typedef uint32 UWord32;
typedef union{
uint32 word;
uint8 byte[4];
}SeedSec_t;
/******************************************************************************
* Description: : Global Variable Declaration Section
******************************************************************************/
extern UWord32 seedToKey(UWord32 seed,UWord32 MASK);
extern uint32 GENERIC_ALGORITHM(uint32 wSeed, uint8 SecurityLevel);
extern uint32 GetSeed(void);
extern uint32 GetTimerCnt(void);
#endif

View File

@ -0,0 +1,247 @@
typedef struct
{
unsigned char write;
unsigned char data;
}IO_parameter_t;
#define IO_TEMP 0
#define IO_REC 1
#define IO_FAN 2
#define IO_MODE 3
#define IO_DEFROST 4
#define IO_REARDEF 5
#define IO_AC 6
#define IO_K30 7
#define KL30_VOLTAGE 0
#define TEMP_MOTOR 1
#define MODE_MOTOR 2
#define REC_MOTOR 3
#define EVA_SENSOR 4
#define INDEX_REPROGMA 0
#define INDEX_0xF190 1
#define INDEX_0xF198 2
#define INDEX_0xF199 3
#define INDEX_0xF19D 4
#define INDEX_0xF110 5
#define INDEX_0xF197 5
#define INDEX_0xF112 5
/************************************************************************************
// 输入参数 ch : /
// 0: KL30电压 /
// 1: 驾驶员侧温度调节电机反馈电压 /
// 2: 出风模式电机电机反馈电压 /
// 3: 循环风门调节电机反馈电压 /
// 4蒸发器温度传感器电压 /
// /
// 返回值: /
// 对应的电压*10即返回的电压值精度是0.1V的) /
// /
************************************************************************************/
unsigned char GetVoltage(unsigned char ch);
/************************************************************************************
// 输入参数 motor : /
// 1: 驾驶员侧温度调节电机 /
// 2: 出风模式电机电机 /
// 3: 循环风门调节电机 /
// /
// 返回值: /
// 0: 电机正常 1电机堵转 /
// /
************************************************************************************/
unsigned char GetMotorLockStatus(unsigned char motor);
/************************************************************************************
// 输入参数 p : /
// 0: TEMP 驾驶员侧温度风门位置 /
// 1: REC 内外循环模式 /
// 2: FAN 鼓风机档位 /
// 3: MODE 模式风门位置 /
// 4: DEFROST 除霜开关 /
// 5: REARDEF 后除霜控制 /
// 6: AC A/C制冷按键按键 /
// 7: K30 ECU Supplier voltage /
// /
// 返回值: /
// 0: 对应的data,具体见222F服务 /
************************************************************************************/
unsigned char GetIoParameter(unsigned char p);
/************************************************************************************
// 输入参数 p : /
// 0: TEMP 驾驶员侧温度风门位置 /
// 1: REC 内外循环模式 /
// 2: FAN 鼓风机档位 /
// 3: MODE 模式风门位置 /
// 4: DEFROST 无效 /
// 5: REARDEF 后除霜控制 /
// 6: AC 无效 /
// 7: K30 无效 /
// 返回值: /
// /
************************************************************************************/
void WriteIoParameter(unsigned char p,unsigned char data);
/************************************************************************************
// 输入参数 p : /
// /
// /
// 返回值: /
// 0: IGN电源正常 1IGN > 16V 或 IGN < 9V /
// /
************************************************************************************/
unsigned char GetIgnVoltStatus(void);
/************************************************************************************
// 输入参数 ID : CAN ID //
// 输入参数 Dlc : CAN 发送数据长度 //
// 输入参数 *Data : 指向 CAN 发送数据缓冲区的指针 //
// //
// 返回值: //
// 0 发送成功 非0 :发送失败 //
************************************************************************************/
unsigned char TransmitCAN_Message(unsigned int ID,unsigned char Dlc,unsigned char *Data);
/************************************************************************************
// 输入参数 write_buf : 指向 需要写入数据缓冲区的地址 //
// 输入参数 data_num : 数据代号 //
// 输入参数 len : 写入数据长度 //
// //
// 返回值: //
// 0 写入成功 非0 :写入失败 //
************************************************************************************/
unsigned char DF_Write(unsigned char* write_buf,unsigned char data_num,unsigned char len);
/************************************************************************************
// 输入参数 read_buf : 指向读取数据存入的缓冲区的地址 //
// 输入参数 data_num : 数据代号 //
// 输入参数 len : 读取数据长度 //
// //
// 返回值: //
// 0 读取成功 非0 :读取失败 //
************************************************************************************/
unsigned char DF_Read(unsigned char* read_buf,unsigned char data_num,unsigned char len);
/************************************************************************************
// //
// 返回值: //
// 当前32bit 的 1ms计数的值 //
***********************************************************************************/
unsigned long GetTimerCnt(void);
/************************************************************************************
// 获取data Flash数据存取索引号 //
// 输入参数 code : //
// 0 : 获取APP重编程请求标志索引号 //
// 1 : 获取2E服务0xF110的索引号 //
// 2 : 获取2E服务0xF190的索引号 //
// 3 : 获取2E服务0xF197的索引号 //
// 4 : 获取2E服务0xF198的索引号 //
// 5 : 获取2E服务0xF199的索引号 //
// 6 : 获取2E服务0xF19D的索引号 //
// 7 : 获取2E服务0xF112的索引号 //
// 8 : 获取19服务0xF00616的索引号 //
// 9 : 获取19服务0xF00617的索引号 //
// 10 : 获取19服务0x918112的索引号 //
// 11 : 获取19服务0x918114的索引号 //
// 12 : 获取19服务0x918171的索引号 //
// 13 : 获取19服务0x918312的索引号 //
// 14 : 获取19服务0x918314的索引号 //
// 15 : 获取19服务0x918371的索引号 //
// 16 : 获取19服务0x918412的索引号 //
// 17 : 获取19服务0x918414的索引号 //
// 18 : 获取19服务0x918471的索引号 //
// 19 : 获取19服务0x918611的索引号 //
// 20 : 获取19服务0x918614的索引号 //
// 21 : 获取19服务0xC07300的索引号
// //
// 返回值: //
// 数据索引号 //
// //
************************************************************************************/
unsigned char GetIndexNumber(unsigned char code);
/************************************************************************************
// 获取AC硬件版本 //
// 输入参数 hdv : //
// 指向读取数据存入的缓冲区的地址 //
// //
// 返回值: //
// //
// //
************************************************************************************/
void GetHardwareVersion(unsigned char* hdv);
/************************************************************************************
// 获取AC软件版本 //
// 输入参数 swv : //
// 指向读取数据存入的缓冲区的地址 //
// //
// 返回值: //
// //
// //
************************************************************************************/
void GetSoftwareVersion(unsigned char* swv);
/************************************************************************************
// 获取AC生产日期 //
// 输入参数 *date : //
// data[0] = YEAR //
// data[1] = MONTH //
// data[0] = DAY //
// //
// 返回值: //
// //
// //
************************************************************************************/
void GetManufacturingDate(unsigned char* date);
/************************************************************************************
// 获取Can总线出错状态 //
// 输入参数 //
// //
// 返回值: Can总线出错状态 //
// //
// //
************************************************************************************/
unsigned char GetCanBusOffErr(void);
/************************************************************************************
// 获取历史成功编程次数 //
// 输入参数 //
// //
// 返回值: 历史成功编程次数 //
// //
// //
************************************************************************************/
unsigned char GetProgrammingCounter(void);
/************************************************************************************
// 获取历史编程次数 //
// 输入参数 //
// //
// 返回值: 历史编程次数 //
// //
// //
************************************************************************************/
unsigned char GetProgrammingAttempCounter(void);
/************************************************************************************
// 清除DTC数据 //
// 输入参数 //
// //
// 返回值: 状态 //
// //
// //
************************************************************************************/
unsigned char Clear_DTC_Data(void);

View File

@ -0,0 +1,15 @@
/***********************************************************************************************************************
* File Name : app_to_dcm.h
* Version :
* Device(s) : R5F10BLG
* Tool-Chain : CA78K0R
* Description :
* Creation Date:
***********************************************************************************************************************/
#ifndef APP_TO_DCM_H
#define APP_TO_DCM_H
#define DMK_A01_03_VERSION (5)
#endif

232
ECU_APP/diagnose/can_drv.h Normal file
View File

@ -0,0 +1,232 @@
#ifndef CAN_DRV_H
#define CAN_DRV_H
/******************************************************************************
Macro definitions
******************************************************************************/
#define R_CAN_GRAMINIT_ON (0x8UL)
#define R_CAN_GSLPSTS_ON (0x4UL)
#define R_CAN_GRSTSTS_ON (0x1UL)
#define R_CAN_CSLPSTS_ON (0x4UL)
#define R_CAN_CHLTSTS_ON (0x2UL)
#define R_CAN_CRSTSTS_ON (0x1UL)
#define R_CAN_TMTRM_ON (0x8U)
#define R_CAN_TMTR_ON (0x1U)
#define R_CAN_AFLDAE_ON (0x100UL)
#define R_CAN_GSLPR_MASK (0x4UL)
#define R_CAN_GMDC_MASK (0x3UL)
#define R_CAN_CSLPR_MASK (0x4UL)
#define R_CAN_CHMDC_MASK (0x3UL)
/******************************************************************************
Exported global variables and functions (to be accessed by other files)
******************************************************************************/
//void R_CAN_Init( void );
//bool R_CAN_Send_TxBuf0(uint32_t can_id, uint8_t dlc, uint8_t msg[8]);
//bool R_CAN_Receive_RxBuf0(uint32_t * p_can_id, uint8_t * p_dlc, uint8_t msg[8]);
/***************************************************/
/*** Compressor CAN0 signals ****/
/***** RX *****/
typedef struct
{
unsigned int RcvId:11;
unsigned int RcvDLC:4;
unsigned int COMP_CompressorVoltage:16;
unsigned int COMP_CompressorCurrent:8;
unsigned int COMP_CompressorSpeed:16;
unsigned int COMP_CompressorState:2;
unsigned int COMP_InternalVoltageFault:1;
unsigned int COMP_UnderVoltageFault:1;
unsigned int COMP_OverVoltageFault:1;
unsigned int COMP_OverCurrentFault:1;
unsigned int COMP_TemperatureFault:1;
unsigned int COMP_BusOff:1;
unsigned int COMP_LossCommunicationWithAC:1;
}COMP_Information_t;
/***** TX *****/
typedef struct
{
unsigned int RcvId:11;
unsigned int RcvDLC:4;
unsigned int AC_CompressorControlCommand:1;
unsigned int AC_CompressorTargetSpeed:16;
}AC_COMP_Control_t;
/***************************************************/
/*** MAIN CAN signals ****/
/***** TX *****/
typedef struct
{
unsigned int RcvId:11;
unsigned int RcvDLC:4;
unsigned int AC_AcState:1;
unsigned int AC_PtcRelayDriveState:1;
unsigned int AC_DefrostState:2;
unsigned int AC_DemistState:2;
unsigned int AC_IntakeAirState:2;
unsigned int AC_BlowerLevelState:3;
unsigned int AC_PTCHighTemperatureSelfProtectionState:1;
}AC_CurrentStatus_t;
typedef struct
{
unsigned int RcvId:11;
unsigned int RcvDLC:4;
unsigned int AC_COMP_CompressorVoltage:16;
unsigned int AC_COMP_CompressorCurrent:8;
unsigned int AC_COMP_CompressorSpeed:16;
unsigned int AC_COMP_CompressorState:2;
}AC_COMP_Information_t;
typedef struct
{
unsigned int RcvId:11;
unsigned int RcvDLC:4;
unsigned int AC_SleepConditionsReady_Reserved:1;
unsigned int AC_Stayawake_reasons1_Reserved:1;
unsigned int AC_Stayawake_reasons2_Reserved:1;
unsigned int AC_Stayawake_reasons3_Reserved:1;
unsigned int AC_Stayawake_reasons4_Reserved:1;
unsigned int AC_Stayawake_reasons5_Reserved:1;
}AC_NM_t;
typedef struct
{
unsigned int RcvId:11;
unsigned int RcvDLC:4;
unsigned int AC_DiagEvaporatorTemperatureSensorShortCircuit:1;
unsigned int AC_DiagEvaporatorTemperatureSensorOpenCircuit :1;
unsigned int AC_DiagServoMotorShortCircuit :1;
unsigned int AC_DiagServoMotorPositionFault :1;
unsigned int AC_DiagLoopMotorShortCircuit :1;
unsigned int AC_DiagLoopMotorPositionFault :1;
unsigned int AC_DiagBlowermotorShortCircuit :1;
unsigned int AC_DiagBlowermotorOpenCircuit :1;
unsigned int AC_DiagPTC_PressureSensorShortCircuit :1;
unsigned int AC_DiagPTC_PressureSensorOpenCircuit :1;
unsigned int AC_DiagPressureSensorShortCircuit :1;
unsigned int AC_DiagPressureSensorOpenCircuit :1;
unsigned int AC_DiagCoolingPressureTooHight :1;
unsigned int AC_DiagCoolingPressureTooLow :1;
unsigned int AC_DiagCompressorFault :1;
unsigned int AC_DiagCommunicationLostWithVCU :1;
unsigned int AC_DiagCommunicationLostWithHMI :1;
unsigned int AC_DiagCommunicationLostWithComp :1;
unsigned int AC_DiagBusOff :1;
unsigned int AC_DiagCOMP_InternalVoltageFault :1;
unsigned int AC_DiagCOMP_UnderVoltageFault :1;
unsigned int AC_DiagCOMP_OverVoltageFault :1;
unsigned int AC_DiagCOMP_OverCurrentFault :1;
unsigned int AC_DiagCOMP_TemperatureFault :1;
unsigned int AC_DiagCOMP_BusOff :1;
unsigned int AC_DiagCOMP_LossCommunicationWithAC :1;
unsigned char AC_SoftwareVersion;
unsigned char AC_HardwareVersion;
}AC_Diagnosis_t;
typedef struct
{
unsigned int RcvId:11;
unsigned int RcvDLC:4;
unsigned char Data[8];
}AC_DiagResp_t;
/***** RX *****/
typedef struct
{
unsigned int RcvId:11;
unsigned int RcvDLC:4;
unsigned int VCU_AC_EnableCommand:1;
}VCU_DisplayInfo_t;
typedef struct
{
unsigned int RcvId:11;
unsigned int RcvDLC:4;
unsigned int HMI_AcKeyState:3;
unsigned int HMI_BlowerLevelKey:2;
unsigned int HMI_IntakeAirKey:1;
}HMI_ControlCommand_t;
typedef struct
{
unsigned int RcvId:11;
unsigned int RcvDLC:4;
unsigned char Data[8];
}TEST_AC_DiagReq_t;
typedef struct
{
unsigned int RcvId:11;
unsigned int RcvDLC:4;
unsigned char Data[8];
}TEST_Func_DiagReq_t;
typedef struct {
unsigned int lword[4];
}can_cre_type;
//#define CAN_RX_RULE_NUM 5
#define CAN_PAGE_RX_RULE_IDX_MASK 0xfU
#define CAN_RX_RULE_PAGE_IDX_BIT_POS 4U
/***************************************************/
/**********************CAN FRAME********************/
typedef struct
{
unsigned int ID;
unsigned int * addr;
}Can_Frame_Format;
#define COMP_Information_ID 0x300
#define AC_COMP_Control_ID 0x200
#define AC_CurrentStatus_ID 0x32B
#define AC_COMP_Information_ID 0x35B
#define AC_NM_ID 0x409
#define AC_Diagnosis_ID 0x609
#define AC_DiagResp_ID 0x75B//0x7CE
#define AC_DiagResp_PeriodicDid_ID 0x7AA
#define VCU_DisplayInfo_ID 0x310
#define HMI_ControlCommand_ID 0x348
#define TEST_AC_DiagReq_ID 0x74B//0x7C6
#define TEST_Func_DiagReq_ID 0x7DF
extern volatile COMP_Information_t COMP_Information ;
extern volatile AC_COMP_Control_t AC_COMP_Control ;
extern volatile AC_CurrentStatus_t AC_CurrentStatus ;
extern volatile AC_COMP_Information_t AC_COMP_Information ;
extern volatile AC_NM_t AC_NM ;
extern volatile AC_Diagnosis_t AC_Diagnosis ;
extern volatile AC_DiagResp_t AC_DiagResp ;
extern volatile AC_DiagResp_t AC_DiagResp_PeriodicDid;
extern volatile VCU_DisplayInfo_t VCU_DisplayInfo ;
extern volatile HMI_ControlCommand_t HMI_ControlCommand ;
extern volatile TEST_AC_DiagReq_t TEST_AC_DiagReq ;
extern volatile TEST_Func_DiagReq_t TEST_Func_DiagReq ;
extern const Can_Frame_Format CanBufDsc[];
#endif

593
ECU_APP/diagnose/extern.c Normal file
View File

@ -0,0 +1,593 @@
#include "extern.h"
#include "hwCtrl.h"
#include "PINdef.h"
#pragma section const DID_TBL
__far const unsigned char HD_VERSION[]={
'H' , //AC_HD_VERSION_00
'W' , //AC_HD_VERSION_01
'0' , //AC_HD_VERSION_02
'1' , //AC_HD_VERSION_03
'0' , //AC_HD_VERSION_04
'0' , //AC_HD_VERSION_05
' ' , //AC_HD_VERSION_06
' ' , //AC_HD_VERSION_07
' ' , //AC_HD_VERSION_08
' ' , //AC_HD_VERSION_09
' ' , //AC_HD_VERSION_10
' ' , //AC_HD_VERSION_11
' ' , //AC_HD_VERSION_12
' ' , //AC_HD_VERSION_13
' ' , //AC_HD_VERSION_14
' ' , //AC_HD_VERSION_15
};
__far const unsigned char SW_VERSION[]={
'0' , //AC_SW_VERSION_00
'1' , //AC_SW_VERSION_01
'.' , //AC_SW_VERSION_02
'0' , //AC_SW_VERSION_03
'1' , //AC_SW_VERSION_04
'.' , //AC_SW_VERSION_05
'0' , //AC_SW_VERSION_06
'1' , //AC_SW_VERSION_07
' ' , //AC_SW_VERSION_08
' ' , //AC_SW_VERSION_09
' ' , //AC_SW_VERSION_10
' ' , //AC_SW_VERSION_11
' ' , //AC_SW_VERSION_12
};
__far const unsigned char SUP_ECU_SW_VERSION[]={
'0' , //
'2' , //
'0' , //
'1' , //
' ' , //
' ' , //
' ' , //
' ' , //
' ' , //
' ' , //
' ' , //
' ' , //
' ' , //
' ' , //
' ' , //
' ' , //
};
#pragma section
IO_parameter_t io_parameter[8];
const unsigned char DID_0xF110_VehicleNetworkConfiguration[8]={0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20};
const unsigned char DID_0xF190_vehicleIdentificationNumber[17]={0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20};
const unsigned char DID_0xF197_SystemNameOrEngineType[8]={0x44,0x41,0x4D,0x49,0x4e,0x47,0x41,0x43};
const unsigned char DID_0xF198_RepairShopCodeOrTesterSerialNumber[16]={0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20};
const unsigned char DID_0xF199_ProgrammingOrConfigurationDate[4]={0x20,0x00,0x01,0x01};
const unsigned char DID_0xF19D_ECUInstallationDateDataIdentifier[4]={0x20,0x00,0x01,0x01};
const unsigned char DID_0xF112_VehicleName[8]={0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20};
can_frame_t TxCanMessageT;
//const unsigned char DID_0xF15A[]={};
/****************************************************************************************/
/* 输入参数 ch : */
/* 0: 压缩机温度 */
/* 1: 室外温度 */
/* 2: 室内温度 */
/* 返回值: */
/* 对应的电压*10即返回的电压值精度是0.1V的) */
/* */
unsigned char GetVoltage(unsigned char ch)
{
/* 这里可以做数组的方式返回,但尽量不要在这里计算,例如下 return Voltage[ch]; */
// switch(ch)
// {
// case EVA_SENSOR:
// return uiDuctAdVal;
// break;
// case OUTSIDE_SENSOR:
// return uiAmbAdVal;
// break;
// case INSIDE_SENSOR:
// return uiIncarAdVal;
// break;
// default:
// return 0;
// break;
// }
}
/************************************************************************************/
/* 输入参数 motor : */
/* 1: 驾驶员侧温度调节电机 */
/* 2: 出风模式电机电机 */
/* 3: 循环风门调节电机 */
/* */
/* 返回值: */
/* 0: 电机正常 1电机堵转 */
/* */
unsigned char GetMotorLockStatus(unsigned char motor)
{
// switch(motor)
// {
// case 1:
// return temprunErr;
// break;
// case 2:
// return moderunErr;
// break;
// case 3:
// return 0;
// break;
// default:
// return 0;
// break;
// }
}
/************************************************************************************/
/* 输入参数 p : */
/* 0: TEMP 驾驶员侧温度风门位置 */
/* 1: REC 内外循环模式 */
/* 2: FAN 鼓风机档位 */
/* 3: MODE 模式风门位置 */
/* 4: DEFROST 除霜开关 */
/* 5: REARDEF 后除霜控制 */
/* 6: AC A/C制冷按键按键 */
/* 7: K30 ECU Supplier voltage */
/* */
/* 返回值: */
/* 0: 对应的data,具体见222F服务 */
/************************************************************************************/
unsigned char GetIoParameter(unsigned char p)
{
switch(p)
{
case 0:
break;
case 1:
break;
case 2:
break;
case 3:
break;
case 4:
break;
case 5:
break;
case 6:
break;
case 7:
break;
default:
return 0;
break;
}
return (io_parameter[p].data);
}
/************************************************************************************/
/* 主函数查询 */
/*输入参数 p : */
/* 0: TEMP 驾驶员侧温度风门位置 */
/* 1: REC 内外循环模式 */
/* 2: FAN 鼓风机档位 */
/* 3: MODE 模式风门位置 */
/* 4: DEFROST 无效 */
/* 5: REARDEF 后除霜控制 */
/* 6: AC 无效 */
/* 7: K30 无效 */
/* 返回值: */
/* */
/************************************************************************************/
void WriteIoParameter(unsigned char p,unsigned char data)
{
io_parameter[p].write = 1; //此值为1代表着需要对对应用的参数写入data。APP完成写入操作后面把这个清零。
io_parameter[p].data = data;
}
/************************************************************************************/
/* 输入参数 p : */
/* */
/* */
/* 返回值: */
/* 0: IGN电源正常 1IGN > 16V 或 IGN < 9V */
/* */
/************************************************************************************/
unsigned char GetIgnVoltStatus(void)
{
// if(*Power_Protect.mark == 1)
// {
// return 0;
// }
// else
// {
// return 1;
// }
return 0;
}
unsigned char TransmitCAN_Message(unsigned int ID,unsigned char Dlc,unsigned char *Data)
{
Can_RtnType re_flag;
TxCanMessageT.IDL=ID;
TxCanMessageT.DLC=Dlc;
TxCanMessageT.IDE = 0; /* IDE 0:Standard 1:Extend */
TxCanMessageT.RTR = 0; /* RTR 0:Data 1:Remote */
TxCanMessageT.THDSE = 0; /* Transmit History Data Store Enable */
TxCanMessageT.IDH = 0; /* ID Data (high) */
TxCanMessageT.DLC = 8; /* DLC Data */
TxCanMessageT.LBL = 0; /* Label Data */
TxCanMessageT.TS = 0; /* Timestamp Data */
Copy_Array_to_Array(TxCanMessageT.DB,Data,Dlc);
re_flag=R_CAN_TrmByTRFIFO0_CH0(&TxCanMessageT);
if(re_flag == CAN_RTN_OK)
{
return 0;
}
else
{
return 1;
}
}
unsigned char DF_Write(unsigned char* write_buf,unsigned char data_num,unsigned char len)
{
unsigned char DID_Buf[0x50],i;
i=0;
switch(data_num)
{
case 1:
ReadFlashData(DID_Buf,0x000F1000+0x400,0x50);
for(i=0;i<len;i++)
{
DID_Buf[i+0]=*write_buf;
write_buf++;
}
if(WriteDataflash(DID_Buf,0x000F1000+0x400,0x50) == 0x11)
{
return 0;
}
break;
case 2:
ReadFlashData(DID_Buf,0x000F1000+0x400,0x50);
for(i=0;i<len;i++)
{
DID_Buf[i+0x40]=*write_buf;
write_buf++;
}
if(WriteDataflash(DID_Buf,0x000F1000+0x400,0x50) == 0x11)
{
return 0;
}
break;
case 3:
ReadFlashData(DID_Buf,0x000F1000+0x400,0x50);
for(i=0;i<len;i++)
{
DID_Buf[i+0x30]=*write_buf;
write_buf++;
}
if(WriteDataflash(DID_Buf,0x000F1000+0x400,0x50) == 0x11)
{
return 0;
}
break;
case 4:
ReadFlashData(DID_Buf,0x000F1000+0x400,0x50);
for(i=0;i<len;i++)
{
DID_Buf[i+0x38]=*write_buf;
write_buf++;
}
if(WriteDataflash(DID_Buf,0x000F1000+0x400,0x50) == 0x11)
{
return 0;
}
break;
default:
break;
}
return 0;
}
unsigned char DF_Read(unsigned char* read_buf,unsigned char data_num,unsigned char len)
{
switch(data_num)
{
case 1:
ReadFlashData(read_buf,0x000F1000+0x400,len);
return 0;
break;
case 2:
ReadFlashData(read_buf,0x000F1000+0x420,len);
return 0;
break;
case 3:
ReadFlashData(read_buf,0x000F1000+0x430,len);
return 0;
break;
case 4:
ReadFlashData(read_buf,0x000F1000+0x438,len);
return 0;
break;
default:
break;
}
return 0;
}
uint32 GetTimerCnt(void)
{
return Can_1ms_count_alive;
}
/************************************************************************************
// 获取data Flash数据存取索引号 //
// 输入参数 code : //
// 0 : 获取APP重编程请求标志索引号 //
// 1 : 获取2E服务0xF110的索引号 //
// 2 : 获取2E服务0xF190的索引号 //
// 3 : 获取2E服务0xF197的索引号 //
// 4 : 获取2E服务0xF198的索引号 //
// 5 : 获取2E服务0xF199的索引号 //
// 6 : 获取2E服务0xF19D的索引号 //
// 7 : 获取2E服务0xF112的索引号 //
// 8 : 获取19服务0xF00616的索引号
// 9 : 获取19服务0xF00617的索引号
// 10: 获取19服务0x918112的索引号
// 11: 获取19服务0x918114的索引号
// 12: 获取19服务0x918171的索引号
// 13: 获取19服务0x918312的索引号
// 14: 获取19服务0x918314的索引号
// 15: 获取19服务0x918371的索引号
// 16: 获取19服务0x918412的索引号
// 17: 获取19服务0x918414的索引号
// 18: 获取19服务0x918471的索引号
// 19: 获取19服务0x918611的索引号
// 20: 获取19服务0x918614的索引号
// 21: 获取19服务0xC07300的索引号
// 返回值: //
// 2E 服务数据索引号 //
// //
************************************************************************************/
const unsigned char DF_INDEX_TAB[]={
0U , //APP REProgrammer Request
1U , //BLOCK_0xF110,
2U , //BLOCK_0xF190,
3U , //BLOCK_0xF197,
4U , //BLOCK_0xF198,
5U , //BLOCK_0xF199,
6U , //BLOCK_0xF19D,
7U , //BLOCK_0xF112,
8U , //19服务0xF00616
9U , //19服务0xF00617
10U , //19服务0x918112
11U , //19服务0x918114
12U , //19服务0x918171
13U , //19服务0x918312
14U , //19服务0x918314
15U , //19服务0x918371
16U , //19服务0x918412
17U , //19服务0x918414
18U , //19服务0x918471
19U , //19服务0x918611
20U , //19服务0x918614
21U //19服务0xC07300
};
unsigned char GetIndexNumber(unsigned char code)
{
return(DF_INDEX_TAB[code]);
}
/************************************************************************************
// 获取AC硬件版本 //
// 输入参数 hdv : //
// 指向读取数据存入的缓冲区的地址 //
// //
// 返回值: //
// //
// //
************************************************************************************/
void GetHardwareVersion(unsigned char* hdv)
{
unsigned char cnt;
for(cnt=0;cnt<16;cnt++){
hdv[cnt] = HD_VERSION[cnt];
}
}
/************************************************************************************
// 获取AC软件版本 //
// 输入参数 swv : //
// 指向读取数据存入的缓冲区的地址 //
// //
// 返回值: //
// //
// //
************************************************************************************/
void GetSoftwareVersion(unsigned char* swv)
{
unsigned char cnt;
for(cnt=0;cnt<13;cnt++){
swv[cnt] = SW_VERSION[cnt];
}
}
/************************************************************************************
// 获取AC供应商软件版本 //
// 输入参数 swv : //
// 指向读取数据存入的缓冲区的地址 //
// //
// 返回值: //
// //
// //
************************************************************************************/
void GetSupplierSoftwareVersion(unsigned char* swv)
{
unsigned char cnt;
for(cnt=0;cnt<16;cnt++){
swv[cnt] = SUP_ECU_SW_VERSION[cnt];
}
}
/************************************************************************************
// 获取AC生产日期 //
// 输入参数 *date : //
// data[0] = YEAR //
// data[1] = MONTH //
// data[0] = DAY //
// //
// 返回值: //
// //
// //
************************************************************************************/
const unsigned char MANUFACTURING_DATE[]={
0x18, //Year
0x06, //Month
0x15, //Day
};
void GetManufacturingDate(unsigned char* date)
{
date[0] = MANUFACTURING_DATE[0];
date[1] = MANUFACTURING_DATE[1];
date[2] = MANUFACTURING_DATE[2];
}
/******************************/
//获取can总线出错状态
//返回值
/******************************/
unsigned char GetCanBusOffErr(void)
{
// if(BusOff_flag==0)
// return 0;
// else
// return 1;
}
/******************************/
//获取BCM节点丢失状态
//返回值
/******************************/
unsigned char GetBcmCommFault(void)
{
// if(uiBcmCommFaultCnt < 500)
// {
// return 0;
// }
// else
// {
// BCM_Recover=0;
// BCM=0;
// return 1;
// }
}
/******************************/
//获取ACP节点丢失状态
//返回值
/******************************/
unsigned char GetAcpCommFault(void)
{
// if(uiAcpCommFaultCnt < 500)
// {
// return 0;
// }
// else
// {
// ACP_Recover=0;
// ACP=0;
// return 1;
// }
}
/******************************/
//获取历史成功编程次数
//输入参数
//
//返回值:历史成功编程次数
/******************************/
unsigned char GetProgrammingCounter(void)
{
return 0;
}
/******************************/
//获取历史编程次数
//输入参数
//
//返回值:历史编程次数
/******************************/
unsigned char GetProgrammingAttempCounter(void)
{
return 0;
}
/******************************/
//清除DTC
//目前仅BusOff
//
//返回值0
/******************************/
unsigned char Clear_DTC_Data(void)
{
//Clear_DTC_Data_Command=1;
return 0;
}
//S51EV
void getInputState(unsigned char* data)
{
}
void getOutputState(unsigned char* data)
{
}
extern uint16_t SupplyVoltage;
void getSupplyVoltage(unsigned char* data)
{
data[0] = SupplyVoltage;
}

329
ECU_APP/diagnose/extern.h Normal file
View File

@ -0,0 +1,329 @@
#ifndef DCM_EXTERN_H
#define DCM_EXTERN_H
#include "appTask.h"
#define IO_TEMP 0
#define IO_REC 1
#define IO_FAN 2
#define IO_MODE 3
#define IO_DEFROST 4
#define IO_REARDEF 5
#define IO_AC 6
#define IO_K30 7
#define EVA_SENSOR 0
#define OUTSIDE_SENSOR 1
#define INSIDE_SENSOR 2
#define KL30_VOLTAGE 3
#define TEMP_MOTOR 4
#define MODE_MOTOR 5
#define REC_MOTOR 6
extern const unsigned char DID_0xF110_VehicleNetworkConfiguration[8];
extern const unsigned char DID_0xF190_vehicleIdentificationNumber[17];
extern const unsigned char DID_0xF197_SystemNameOrEngineType[8];
extern const unsigned char DID_0xF198_RepairShopCodeOrTesterSerialNumber[16];
extern const unsigned char DID_0xF199_ProgrammingOrConfigurationDate[4];
extern const unsigned char DID_0xF19D_ECUInstallationDateDataIdentifier[4];
extern const unsigned char DID_0xF112_VehicleName[8];
/*****************************************/
// BLG?4Kdataflash,1?block1k //
// 0x000F1000-0x000F13FF??????//
//0x000F1400-0x000F17FF,0x000F1800-0x000F1AFF,0x000F1C00-0x000FEFF DTC//
/*****************************************/
//#define AC_MANUFACTURING_YEAR (0x17)
//#define AC_MANUFACTURING_MONTH (0x06)
//#define AC_MANUFACTURING_DAY (0x11)
typedef struct
{
unsigned char write;
unsigned char data;
}IO_parameter_t;
extern IO_parameter_t io_parameter[8];
/************************/
// DCM 锟斤拷锟斤拷状态锟斤拷锟斤拷锟接匡拷
/************************/
//锟斤拷匣峄澳J?
//#define DCM_DEFAULT_SESSION 0x01 /*默锟斤拷模式*/
//#define DCM_PROGRAMME_SESSION 0x02 /*锟斤拷锟侥J?*/
//#define DCM_EXTEND_SESSION 0x04 /*锟斤拷展模式*/
extern uint8 MngDcm_GetDiagnosticSession(void);
//通锟脚匡拷锟斤拷状态锟斤拷锟斤拷
//0x00 锟斤拷止锟秸凤拷
//0x01 锟斤拷锟斤拷锟斤拷锟斤拷
//0x02 锟斤拷锟斤拷锟斤拷锟斤拷
//0x03 锟斤拷锟斤拷锟秸凤拷
extern uint8 GetNormalMsgSts(void);
extern uint8 GetNetworkMsgSts(void);
/************************************************************************************
// 锟斤拷锟斤拷锟斤拷锟? ch : /
// 0: KL30锟斤拷压 /
// 1: 锟斤拷驶员锟斤拷锟铰度碉拷锟节碉拷锟斤拷锟斤拷锟斤拷锟窖? /
// 2: 锟斤拷锟斤拷模式锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷压 /
// 3: 循锟斤拷锟斤拷锟脚碉拷锟节碉拷锟斤拷锟斤拷锟斤拷锟窖? /
// 4锟斤拷锟斤拷锟斤拷锟斤拷锟铰度达拷锟斤拷锟斤拷锟斤拷压 /
// /
// 锟斤拷锟斤拷值锟斤拷 /
// 锟斤拷应锟侥碉拷压*10锟斤拷锟斤拷锟斤拷锟截的碉拷压值锟斤拷锟斤拷锟斤拷0.1V锟侥o拷 /
// /
************************************************************************************/
extern unsigned char GetVoltage(unsigned char ch);
/************************************************************************************
// 锟斤拷锟斤拷锟斤拷锟? motor : /
// 1: 锟斤拷驶员锟斤拷锟铰度碉拷锟节碉拷锟? /
// 2: 锟斤拷锟斤拷模式锟斤拷锟斤拷锟斤拷 /
// 3: 循锟斤拷锟斤拷锟脚碉拷锟节碉拷锟? /
// /
// 锟斤拷锟斤拷值锟斤拷 /
// 0: 锟斤拷锟斤拷锟斤拷锟? 1锟斤拷锟斤拷锟斤拷锟阶? /
// /
************************************************************************************/
extern unsigned char GetMotorLockStatus(unsigned char motor);
/************************************************************************************
// 锟斤拷锟斤拷锟斤拷锟? p : /
// 0: TEMP 锟斤拷驶员锟斤拷锟铰度凤拷锟斤拷位锟斤拷 /
// 1: REC 锟斤拷锟斤拷循锟斤拷模式 /
// 2: FAN 锟侥凤拷锟斤拷锟轿? /
// 3: MODE 模式锟斤拷锟斤拷位锟斤拷 /
// 4: DEFROST 锟斤拷霜锟斤拷锟斤拷 /
// 5: REARDEF 锟斤拷锟剿?锟斤拷锟斤拷 /
// 6: AC A/C锟斤拷锟戒按锟斤拷锟斤拷锟斤拷 /
// 7: K30 ECU Supplier voltage /
// /
// 锟斤拷锟斤拷值锟斤拷 /
// 0: 锟斤拷应锟斤拷data,锟斤拷锟斤拷锟?22锟斤拷2F锟斤拷锟斤拷 /
************************************************************************************/
extern unsigned char GetIoParameter(unsigned char p);
/************************************************************************************
// 锟斤拷锟斤拷锟斤拷锟? p : /
// 0: TEMP 锟斤拷驶员锟斤拷锟铰度凤拷锟斤拷位锟斤拷 /
// 1: REC 锟斤拷锟斤拷循锟斤拷模式 /
// 2: FAN 锟侥凤拷锟斤拷锟轿? /
// 3: MODE 模式锟斤拷锟斤拷位锟斤拷 /
// 4: DEFROST 锟斤拷效 /
// 5: REARDEF 锟斤拷锟剿?锟斤拷锟斤拷 /
// 6: AC 锟斤拷效 /
// 7: K30 锟斤拷效 /
// 锟斤拷锟斤拷值锟斤拷 /
// /
************************************************************************************/
extern void WriteIoParameter(unsigned char p,unsigned char data);
/************************************************************************************
// 锟斤拷锟斤拷锟斤拷锟? p : /
// /
// /
// 锟斤拷锟斤拷值锟斤拷 /
// 0: IGN锟斤拷源锟斤拷锟斤拷 1锟斤拷IGN > 16V 锟斤拷 IGN < 9V /
// /
************************************************************************************/
extern unsigned char GetIgnVoltStatus(void);
/************************************************************************************
// 锟斤拷锟斤拷锟斤拷锟? ID : CAN ID //
// 锟斤拷锟斤拷锟斤拷锟? Dlc : CAN 锟斤拷锟斤拷锟斤拷锟捷筹拷锟斤拷 //
// 锟斤拷锟斤拷锟斤拷锟? *Data : 指锟斤拷 CAN 锟斤拷锟斤拷锟斤拷锟捷伙拷锟斤拷锟斤拷锟斤拷指锟斤拷 //
// //
// 锟斤拷锟斤拷值锟斤拷 //
// 0锟斤拷 锟斤拷锟酵成癸拷 锟斤拷0 锟斤拷锟斤拷锟斤拷失锟斤拷 //
************************************************************************************/
extern unsigned char TransmitCAN_Message(unsigned int ID,unsigned char Dlc,unsigned char *Data);
/************************************************************************************
// 锟斤拷锟斤拷锟斤拷锟? write_buf : 指锟斤拷 锟斤拷要写锟斤拷锟斤拷锟捷伙拷锟斤拷锟斤拷锟侥碉拷址 //
// 锟斤拷锟斤拷锟斤拷锟? data_num : 锟斤拷锟捷达拷锟斤拷 //
// 锟斤拷锟斤拷锟斤拷锟? len : 写锟斤拷锟斤拷锟捷筹拷锟斤拷 //
// //
// 锟斤拷锟斤拷值锟斤拷 //
// 0锟斤拷 写锟斤拷晒锟? 锟斤拷0 锟斤拷写锟斤拷失锟斤拷 //
************************************************************************************/
extern unsigned char DF_Write(unsigned char* write_buf,unsigned char data_num,unsigned char len);
/************************************************************************************
// 锟斤拷锟斤拷锟斤拷锟? read_buf : 指锟斤拷锟饺★拷锟斤拷荽锟斤拷锟侥伙拷锟斤拷锟斤拷锟侥碉拷址 //
// 锟斤拷锟斤拷锟斤拷锟? data_num : 锟斤拷锟捷达拷锟斤拷 //
// 锟斤拷锟斤拷锟斤拷锟? len : 锟斤拷取锟斤拷锟捷筹拷锟斤拷 //
// //
// 锟斤拷锟斤拷值锟斤拷 //
// 0锟斤拷 锟斤拷取锟缴癸拷 锟斤拷0 锟斤拷锟斤拷取失锟斤拷 //
************************************************************************************/
extern unsigned char DF_Read(unsigned char* read_buf,unsigned char data_num,unsigned char len);
/************************************************************************************
// //
// 锟斤拷锟斤拷值锟斤拷 //
// 锟斤拷前32bit 锟斤拷 1ms锟斤拷锟斤拷锟斤拷值 //
***********************************************************************************/
extern uint32 GetTimerCnt(void);
/************************************************************************************
// 锟斤拷取data Flash锟斤拷锟捷达拷取锟斤拷锟斤拷锟斤拷 //
// 锟斤拷锟斤拷锟斤拷锟? code : //
// 0 : 锟斤拷取APP锟截憋拷锟斤拷锟斤拷锟斤拷志锟斤拷锟斤拷锟斤拷 //
// 1 : 锟斤拷取2E锟斤拷锟斤拷0xF110锟斤拷锟斤拷锟斤拷锟斤拷 //
// 2 : 锟斤拷取2E锟斤拷锟斤拷0xF190锟斤拷锟斤拷锟斤拷锟斤拷 //
// 3 : 锟斤拷取2E锟斤拷锟斤拷0xF197锟斤拷锟斤拷锟斤拷锟斤拷 //
// 4 : 锟斤拷取2E锟斤拷锟斤拷0xF198锟斤拷锟斤拷锟斤拷锟斤拷 //
// 5 : 锟斤拷取2E锟斤拷锟斤拷0xF199锟斤拷锟斤拷锟斤拷锟斤拷 //
// 6 : 锟斤拷取2E锟斤拷锟斤拷0xF19D锟斤拷锟斤拷锟斤拷锟斤拷 //
// 7 : 锟斤拷取2E锟斤拷锟斤拷0xF112锟斤拷锟斤拷锟斤拷锟斤拷 //
// 8 : 锟斤拷取19锟斤拷锟斤拷0xF00616锟斤拷锟斤拷锟斤拷锟斤拷 //
// 9 : 锟斤拷取19锟斤拷锟斤拷0xF00617锟斤拷锟斤拷锟斤拷锟斤拷 //
// 10 : 锟斤拷取19锟斤拷锟斤拷0x918112锟斤拷锟斤拷锟斤拷锟斤拷 //
// 11 : 锟斤拷取19锟斤拷锟斤拷0x918114锟斤拷锟斤拷锟斤拷锟斤拷 //
// 12 : 锟斤拷取19锟斤拷锟斤拷0x918171锟斤拷锟斤拷锟斤拷锟斤拷 //
// 13 : 锟斤拷取19锟斤拷锟斤拷0x918312锟斤拷锟斤拷锟斤拷锟斤拷 //
// 14 : 锟斤拷取19锟斤拷锟斤拷0x918314锟斤拷锟斤拷锟斤拷锟斤拷 //
// 15 : 锟斤拷取19锟斤拷锟斤拷0x918371锟斤拷锟斤拷锟斤拷锟斤拷 //
// 16 : 锟斤拷取19锟斤拷锟斤拷0x918412锟斤拷锟斤拷锟斤拷锟斤拷 //
// 17 : 锟斤拷取19锟斤拷锟斤拷0x918414锟斤拷锟斤拷锟斤拷锟斤拷 //
// 18 : 锟斤拷取19锟斤拷锟斤拷0x918471锟斤拷锟斤拷锟斤拷锟斤拷 //
// 19 : 锟斤拷取19锟斤拷锟斤拷0x918611锟斤拷锟斤拷锟斤拷锟斤拷 //
// 20 : 锟斤拷取19锟斤拷锟斤拷0x918614锟斤拷锟斤拷锟斤拷锟斤拷 //
// 21 : 锟斤拷取19锟斤拷锟斤拷0xC07300锟斤拷锟斤拷锟斤拷锟斤拷
// //
// 锟斤拷锟斤拷值锟斤拷 //
// 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷 //
// //
************************************************************************************/
extern unsigned char GetIndexNumber(unsigned char code);
/************************************************************************************
// 锟斤拷取AC硬锟斤拷锟芥本 //
// 锟斤拷锟斤拷锟斤拷锟? hdv : //
// 指锟斤拷锟饺★拷锟斤拷荽锟斤拷锟侥伙拷锟斤拷锟斤拷锟侥碉拷址 //
// //
// 锟斤拷锟斤拷值锟斤拷 //
// //
// //
************************************************************************************/
extern void GetHardwareVersion(unsigned char* hdv);
/************************************************************************************
// 锟斤拷取AC锟斤拷锟斤拷锟芥本 //
// 锟斤拷锟斤拷锟斤拷锟? swv : //
// 指锟斤拷锟饺★拷锟斤拷荽锟斤拷锟侥伙拷锟斤拷锟斤拷锟侥碉拷址 //
// //
// 锟斤拷锟斤拷值锟斤拷 //
// //
// //
************************************************************************************/
extern void GetSoftwareVersion(unsigned char* swv);
/************************************************************************************
// 锟斤拷取AC锟斤拷应锟斤拷锟斤拷锟斤拷锟芥本 //
// 锟斤拷锟斤拷锟斤拷锟? swv : //
// 指锟斤拷锟饺★拷锟斤拷荽锟斤拷锟侥伙拷锟斤拷锟斤拷锟侥碉拷址 //
// //
// 锟斤拷锟斤拷值锟斤拷 //
// //
// //
************************************************************************************/
extern void GetSupplierSoftwareVersion(unsigned char* supswv);
/************************************************************************************
// 锟斤拷取AC锟斤拷锟斤拷锟斤拷锟斤拷 //
// 锟斤拷锟斤拷锟斤拷锟? *date : //
// data[0] = YEAR //
// data[1] = MONTH //
// data[0] = DAY //
// //
// 锟斤拷锟斤拷值锟斤拷 //
// //
// //
************************************************************************************/
extern void GetManufacturingDate(unsigned char* date);
/************************************************************************************
// 锟斤拷取Can锟斤拷锟竭筹拷锟斤拷状态 //
// 锟斤拷锟斤拷锟斤拷锟? 锟斤拷 //
// //
// 锟斤拷锟斤拷值锟斤拷 Can锟斤拷锟竭筹拷锟斤拷状态 //
// //
// //
************************************************************************************/
extern unsigned char GetCanBusOffErr(void);
/************************************************************************************
// 锟斤拷取锟斤拷史锟缴癸拷锟斤拷檀锟斤拷锟? //
// 锟斤拷锟斤拷锟斤拷锟? //
// //
// 锟斤拷锟斤拷值锟斤拷 锟斤拷史锟缴癸拷锟斤拷檀锟斤拷锟? //
// //
// //
************************************************************************************/
extern unsigned char GetProgrammingCounter(void);
/************************************************************************************
// 锟斤拷取锟斤拷史锟斤拷檀锟斤拷锟? //
// 锟斤拷锟斤拷锟斤拷锟? //
// //
// 锟斤拷锟斤拷值锟斤拷 锟斤拷史锟斤拷檀锟斤拷锟? //
// //
// //
************************************************************************************/
extern unsigned char GetProgrammingAttempCounter(void);
/************************************************************************************
// 锟斤拷锟紻TC锟斤拷锟斤拷 //
// 锟斤拷锟斤拷锟斤拷锟? //
// //
// 锟斤拷锟斤拷值锟斤拷 状态 //
// //
// //
************************************************************************************/
extern unsigned char Clear_DTC_Data(void);
/************************************************************************************
// 锟斤拷取BCM锟节点丢失状态 //
// 锟斤拷锟斤拷锟斤拷锟? 锟斤拷 //
// //
// 锟斤拷锟斤拷值锟斤拷 BCM锟节点丢失状态 //
// //
// //
************************************************************************************/
extern unsigned char GetBcmCommFault(void);
extern unsigned char GetAcpCommFault(void);
//S51EV
#endif

Binary file not shown.

431
ECU_APP/function.html Normal file
View File

@ -0,0 +1,431 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Function list</title>
</head>
<body>
<b>MCU name: RL78/F13(ROM:128KB)<br />Chip name: R5F10BBG</b>
<hr />
<table cellSpacing=0 cellPadding=2 width="90%" border=1 frame="box">
<tr><td bgColor=#90EE90><FONT face=Arial size=2><B>Module</B></FONT></td><td bgColor=#90EE90><FONT face=Arial size=2><B> File</B></FONT></td><td bgColor=#90EE90><FONT face=Arial size=2><B> Macro</B></FONT></td><td bgColor=#90EE90><FONT face=Arial size=2><B> Function</B></FONT></td><td bgColor=#90EE90><FONT face=Arial size=2><B> Default</B></FONT></td><td bgColor=#90EE90><FONT face=Arial size=2><B> Status</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2><B>Common</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_main.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_main.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void main(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> main</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_MAIN_UserInit(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_MAIN_UserInit</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_systeminit.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_systeminit.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_Systeminit(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_Systeminit</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void hdwinit(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> hdwinit</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_macrodriver.h</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_macrodriver.h</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_userdefine.h</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_userdefine.h</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2><B>Clock Generator</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_cgc.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_cgc.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_CGC_Create(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_CGC_Create</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> MD_STATUS R_CGC_Set_ClockMode(enum ClockMode mode)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_CGC_Set_ClockMode</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_CGC_ClockMonitor_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_CGC_ClockMonitor_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_CGC_ClockMonitor_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_CGC_ClockMonitor_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_CGC_StackPointer_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_CGC_StackPointer_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_CGC_StackPointer_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_CGC_StackPointer_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_CGC_RAMECC_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_CGC_RAMECC_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_CGC_RAMECC_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_CGC_RAMECC_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_cgc_user.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_cgc_user.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_CGC_Create_UserInit(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_CGC_Create_UserInit</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_CGC_Get_ResetSource(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_CGC_Get_ResetSource</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static void r_cgc_clockmonitor_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cgc_clockmonitor_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static void r_cgc_stackpointer_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cgc_stackpointer_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static void r_cgc_ram_ecc_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cgc_ram_ecc_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_cgc.h</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_cgc.h</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_pfdl.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_pfdl.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_FDL_Create(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_FDL_Create</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> pfdl_status_t R_FDL_Write(pfdl_u16 index, __near pfdl_u08* buffer, pfdl_u16 bytecount)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_FDL_Write</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> pfdl_status_t R_FDL_Read(pfdl_u16 index, __near pfdl_u08* buffer, pfdl_u16 bytecount)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_FDL_Read</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> pfdl_status_t R_FDL_Erase(pfdl_u16 blockno)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_FDL_Erase</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_FDL_Open(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_FDL_Open</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void PFDL_Close(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_FDL_Close</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> pfdl_status_t R_FDL_BlankCheck(pfdl_u16 index, pfdl_u16 bytecount)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_FDL_BlankCheck</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> pfdl_status_t R_FDL_IVerify(pfdl_u16 index, pfdl_u16 bytecount)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_FDL_IVerify</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_pfdl.h</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_pfdl.h</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2><B>Port</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_port.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_port.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_PORT_Create(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_PORT_Create</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_port_user.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_port_user.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_PORT_Create_UserInit(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_PORT_Create_UserInit</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_port.h</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_port.h</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2><B>Interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_intc.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_intc.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> INTP</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_INTC_Create(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_INTC_Create</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> INTP0</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_INTC0_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_INTC0_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_INTC0_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_INTC0_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> INTP1</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_INTC1_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_INTC1_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_INTC1_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_INTC1_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> INTP2</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_INTC2_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_INTC2_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_INTC2_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_INTC2_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> INTP3</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_INTC3_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_INTC3_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_INTC3_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_INTC3_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> INTP4</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_INTC4_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_INTC4_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_INTC4_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_INTC4_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> INTP5</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_INTC5_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_INTC5_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_INTC5_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_INTC5_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_intc_user.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_intc_user.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> INTP</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_INTC_Create_UserInit(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_INTC_Create_UserInit</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static void r_intc0_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_intc0_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static void r_intc1_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_intc1_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static void r_intc2_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_intc2_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static void r_intc3_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_intc3_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static void r_intc4_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_intc4_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static void r_intc5_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_intc5_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_intc.h</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_intc.h</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2><B>Serial</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_serial.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_serial.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> SAU0</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_SAU0_Create(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_SAU0_Create</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_SAU0_Set_PowerOff(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_SAU0_Set_PowerOff</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_SAU0_Set_SnoozeOn(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_SAU0_Set_SnoozeOn</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_SAU0_Set_SnoozeOff(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_SAU0_Set_SnoozeOff</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> UART0</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_UART0_Create(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_UART0_Create</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_UART0_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_UART0_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_UART0_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_UART0_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> MD_STATUS R_UART0_Send(uint8_t const * tx_buf, uint16_t tx_num)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_UART0_Send</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> MD_STATUS R_UART0_Receive(uint8_t const * rx_buf, uint16_t rx_num)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_UART0_Receive</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> CSI00</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_CSI00_Create(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_CSI00_Create</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_CSI00_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_CSI00_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_CSI00_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_CSI00_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> MD_STATUS R_CSI00_Send(uint8_t const * tx_buf, uint16_t tx_num)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_CSI00_Send</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> MD_STATUS R_CSI00_Receive(uint8_t const * rx_buf, uint16_t rx_num) </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_CSI00_Receive</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> MD_STATUS R_CSI00_Send_Receive(uint8_t const * tx_buf, uint16_t tx_num, uint8_t const * rx_buf) </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_CSI00_Send_Receive</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> CSI01</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_CSI01_Create(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_CSI01_Create</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_CSI01_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_CSI01_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_CSI01_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_CSI01_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> MD_STATUS R_CSI01_Send(uint8_t const * tx_buf, uint16_t tx_num)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_CSI01_Send</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> MD_STATUS R_CSI01_Receive(uint8_t const * rx_buf, uint16_t rx_num) </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_CSI01_Receive</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> MD_STATUS R_CSI01_Send_Receive(uint8_t const * tx_buf, uint16_t tx_num, uint8_t const * rx_buf) </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_CSI01_Send_Receive</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> IIC00</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_IIC00_Create(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_IIC00_Create</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_IIC00_Master_Send(uint8_t adr, uint8_t const * tx_buf, uint16_t txnum)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_IIC00_Master_Send</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_IIC00_Master_Receive(uint8_t adr, uint8_t const * rx_buf, uint16_t rx_num) </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_IIC00_Master_Receive</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_IIC00_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_IIC00_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_IIC00_StartCondition(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_IIC00_StartCondition</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_IIC00_StopCondition(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_IIC00_StopCondition</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> IIC01</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_IIC01_Create(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_IIC01_Create</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_IIC01_Master_Send(uint8_t adr, uint8_t const * tx_buf, uint16_t txnum)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_IIC01_Master_Send</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_IIC01_Master_Receive(uint8_t adr, uint8_t const * rx_buf, uint16_t rx_num) </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_IIC01_Master_Receive</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_IIC01_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_IIC01_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_IIC01_StartCondition(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_IIC01_StartCondition</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_IIC01_StopCondition(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_IIC01_StopCondition</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> SAU1</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_SAU1_Create(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_SAU1_Create</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_SAU1_Set_PowerOff(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_SAU1_Set_PowerOff</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> UART1</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_UART1_Create(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_UART1_Create</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_UART1_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_UART1_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_UART1_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_UART1_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> MD_STATUS R_UART1_Send(uint8_t const * tx_buf, uint16_t tx_num)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_UART1_Send</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> MD_STATUS R_UART1_Receive(uint8_t const * rx_buf, uint16_t rx_num)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_UART1_Receive</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> CSI10</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_CSI10_Create(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_CSI10_Create</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_CSI10_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_CSI10_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_CSI10_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_CSI10_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> MD_STATUS R_CSI10_Send(uint8_t const * tx_buf, uint16_t tx_num)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_CSI10_Send</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> MD_STATUS R_CSI10_Receive(uint8_t const * rx_buf, uint16_t rx_num) </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_CSI10_Receive</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> MD_STATUS R_CSI10_Send_Receive(uint8_t const * tx_buf, uint16_t tx_num, uint8_t const * rx_buf) </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_CSI10_Send_Receive</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> IIC10</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_IIC10_Create(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_IIC10_Create</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_IIC10_Master_Send(uint8_t adr, uint8_t const * tx_buf, uint16_t txnum)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_IIC10_Master_Send</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_IIC10_Master_Receive(uint8_t adr, uint8_t const * rx_buf, uint16_t rx_num) </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_IIC10_Master_Receive</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_IIC10_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_IIC10_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_IIC10_StartCondition(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_IIC10_StartCondition</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_IIC10_StopCondition(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_IIC10_StopCondition</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> IICA0</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_IICA0_Create(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_IICA0_Create</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> MD_STATUS R_IICA0_Master_Send(uint8_t adr, uint8_t * const tx_buf, uint16_t tx_num, uint8_t wait)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_IICA0_Master_Send</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> MD_STATUS R_IICA0_Master_Receive(uint8_t adr, uint8_t * const rx_buf, uint16_t rx_num, uint8_t wait)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_IICA0_Master_Receive</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_IICA0_Slave_Send(uint8_t * const tx_buf, uint16_t tx_num)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_IICA0_Slave_Send</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_IICA0_Slave_Receive(uint8_t * const rx_buf, uint16_t rx_num)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_IICA0_Slave_Receive</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_IICA0_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_IICA0_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_IICA0_StopCondition(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_IICA0_StopCondition</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_IICA0_Set_SnoozeOn(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_IICA0_Set_SnoozeOn</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_IICA0_Set_SnoozeOff(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_IICA0_Set_SnoozeOff</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_IICA0_Set_PowerOff(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_IICA0_Set_PowerOff</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_serial_user.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_serial_user.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> SAU0</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_SAU0_Create_UserInit(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_SAU0_Create_UserInit</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> UART0</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt void r_uart0_interrupt_receive(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_uart0_interrupt_receive</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt void r_uart0_interrupt_send(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_uart0_interrupt_send</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void r_uart0_callback_receiveend(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_uart0_callback_receiveend</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void r_uart0_callback_sendend(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_uart0_callback_sendend</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void r_uart0_callback_error(uint16_t err_type)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_uart0_callback_error</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void r_uart0_callback_softwareoverrun(uint16_t err_type)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_uart0_callback_softwareoverrun</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> CSI00</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt void r_csi00_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_csi00_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void r_csi00_callback_receiveend(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_csi00_callback_receiveend</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void r_csi00_callback_error(uint16_t err_type)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_csi00_callback_error</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void r_csi00_callback_sendend(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_csi00_callback_sendend</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> CSI01</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt void r_csi01_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_csi01_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void r_csi01_callback_receiveend(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_csi01_callback_receiveend</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void r_csi01_callback_error(uint16_t err_type)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_csi01_callback_error</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void r_csi01_callback_sendend(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_csi01_callback_sendend</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> IIC00</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt void r_iic00_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_iic00_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void r_iic00_callback_master_receiveend(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_iic00_callback_master_receiveend</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void r_iic00_callback_master_sendend(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_iic00_callback_master_sendend</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void r_iic00_callback_master_error(MD_STATUS flag)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_iic00_callback_master_error</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> IIC01</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt void r_iic01_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_iic01_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void r_iic01_callback_master_receiveend(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_iic01_callback_master_receiveend</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void r_iic01_callback_master_sendend(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_iic01_callback_master_sendend</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void r_iic01_callback_master_error(MD_STATUS flag)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_iic01_callback_master_error</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> SAU1</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_SAU1_Create_UserInit(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_SAU1_Create_UserInit</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> UART1</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt void r_uart1_interrupt_receive(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_uart1_interrupt_receive</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt void r_uart1_interrupt_send(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_uart1_interrupt_send</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void r_uart1_callback_receiveend(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_uart1_callback_receiveend</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void r_uart1_callback_sendend(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_uart1_callback_sendend</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void r_uart1_callback_error(uint16_t err_type)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_uart1_callback_error</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void r_uart1_callback_softwareoverrun(uint16_t err_type)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_uart1_callback_softwareoverrun</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> CSI10</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt void r_csi10_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_csi10_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void r_csi10_callback_receiveend(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_csi10_callback_receiveend</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void r_csi10_callback_error(uint16_t err_type)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_csi10_callback_error</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void r_csi10_callback_sendend(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_csi10_callback_sendend</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> IIC10</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt void r_iic10_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_iic10_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void r_iic10_callback_master_receiveend(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_iic10_callback_master_receiveend</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void r_iic10_callback_master_sendend(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_iic10_callback_master_sendend</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void r_iic10_callback_master_error(MD_STATUS flag)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_iic10_callback_master_error</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> IICA0</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_IICA0_Create_UserInit(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_IICA0_Create_UserInit</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static r_iica0_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_iica0_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> static void r_iica0_callback_master_sendend(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_iica0_callback_master_sendend</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> static void r_iica0_callback_master_receiveend(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_iica0_callback_master_receiveend</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> static void r_iica0_callback_slave_sendend(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_iica0_callback_slave_sendend</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> static void r_iica0_callback_slave_receiveend(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_iica0_callback_slave_receiveend</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> static void r_iica0_callback_master_error(MD_STATUS flag)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_iica0_callback_master_error</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> static void r_iica0_callback_slave_error(MD_STATUS flag)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_iica0_callback_slave_error</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> static void r_iica0_callback_getstopcondition(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_iica0_callback_getstopcondition</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_serial.h</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_serial.h</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2><B>A/D Converter</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_adc.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_adc.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_ADC_Create(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_ADC_Create</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_ADC_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_ADC_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_ADC_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_ADC_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_ADC_Set_OperationOn(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_ADC_Set_OperationOn</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_ADC_Set_OperationOff(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_ADC_Set_OperationOff</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_ADC_Get_Result(uint16_t * const buffer)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_ADC_Get_Result</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_ADC_Get_Result_8bit(uint8_t * const buffer)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_ADC_Get_Result_8bit</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> MD_STATUS R_ADC_Set_ADChannel(ad_channel_t channel)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_ADC_Set_ADChannel</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_ADC_Set_SnoozeOn(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_ADC_Set_SnoozeOn</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_ADC_Set_SnoozeOff(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_ADC_Set_SnoozeOff</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> MD_STATUS R_ADC_Set_TestChannel(test_channel_t channel)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_ADC_Set_TestChannel</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_ADC_Set_PowerOff(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_ADC_Set_PowerOff</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_adc_user.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_adc_user.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_ADC_Create_UserInit(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_ADC_Create_UserInit</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static void r_adc_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_adc_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_adc.h</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_adc.h</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2><B>Timer</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_timer.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_timer.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> TAU0</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Create(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Create</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Set_PowerOff(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Set_PowerOff</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Channel0</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel0_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel0_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel0_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel0_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel0_Get_PulseWidth(uint32_t * const width)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel0_Get_PulseWidth</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel0_Set_SoftwareTriggerOn(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel0_Set_SoftwareTriggerOn</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Channel1</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel1_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel1_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel1_Higher8bits_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel1_Higher8bits_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel1_Lower8bits_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel1_Lower8bits_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel1_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel1_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel1_Higher8bits_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel1_Higher8bits_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel1_Lower8bits_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel1_Lower8bits_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel1_Get_PulseWidth(uint32_t * const width)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel1_Get_PulseWidth</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Channel2</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel2_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel2_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel2_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel2_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel2_Get_PulseWidth(uint32_t * const width)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel2_Get_PulseWidth</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel2_Set_SoftwareTriggerOn(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel2_Set_SoftwareTriggerOn</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Channel3</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel3_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel3_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel3_Higher8bits_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel3_Higher8bits_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel3_Lower8bits_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel3_Lower8bits_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel3_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel3_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel3_Higher8bits_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel3_Higher8bits_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel3_Lower8bits_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel3_Lower8bits_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel3_Get_PulseWidth(uint32_t * const width)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel3_Get_PulseWidth</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Channel4</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel4_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel4_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel4_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel4_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel4_Get_PulseWidth(uint32_t * const width)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel4_Get_PulseWidth</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel4_Set_SoftwareTriggerOn(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel4_Set_SoftwareTriggerOn</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Channel5</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel5_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel5_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel5_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel5_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel5_Get_PulseWidth(uint32_t * const width)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel5_Get_PulseWidth</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Channel6</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel6_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel6_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel6_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel6_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel6_Get_PulseWidth(uint32_t * const width)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel6_Get_PulseWidth</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel6_Set_SoftwareTriggerOn(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel6_Set_SoftwareTriggerOn</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Channel7</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel7_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel7_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel7_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel7_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU0_Channel7_Get_PulseWidth(uint32_t * const width)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Channel7_Get_PulseWidth</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> TAU1</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU1_Create(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU1_Create</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU1_Set_PowerOff(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU1_Set_PowerOff</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Channel0</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU1_Channel0_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU1_Channel0_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU1_Channel0_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU1_Channel0_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU1_Channel0_Get_PulseWidth(uint32_t * const width)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU1_Channel0_Get_PulseWidth</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU1_Channel0_Set_SoftwareTriggerOn(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU1_Channel0_Set_SoftwareTriggerOn</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Channel1</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU1_Channel1_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU1_Channel1_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU1_Channel1_Higher8bits_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU1_Channel1_Higher8bits_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU1_Channel1_Lower8bits_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU1_Channel1_Lower8bits_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU1_Channel1_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU1_Channel1_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU1_Channel1_Higher8bits_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU1_Channel1_Higher8bits_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU1_Channel1_Lower8bits_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU1_Channel1_Lower8bits_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU1_Channel1_Get_PulseWidth(uint32_t * const width)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU1_Channel1_Get_PulseWidth</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Channel2</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU1_Channel2_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU1_Channel2_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU1_Channel2_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU1_Channel2_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU1_Channel2_Get_PulseWidth(uint32_t * const width)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU1_Channel2_Get_PulseWidth</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU1_Channel2_Set_SoftwareTriggerOn(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU1_Channel2_Set_SoftwareTriggerOn</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Channel3</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU1_Channel3_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU1_Channel3_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU1_Channel3_Higher8bits_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU1_Channel3_Higher8bits_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU1_Channel3_Lower8bits_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU1_Channel3_Lower8bits_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU1_Channel3_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU1_Channel3_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU1_Channel3_Higher8bits_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU1_Channel3_Higher8bits_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU1_Channel3_Lower8bits_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU1_Channel3_Lower8bits_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAU1_Channel3_Get_PulseWidth(uint32_t * const width)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU1_Channel3_Get_PulseWidth</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> TMRJ0</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RJ0_Create</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RJ0_Create</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RJ0_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RJ0_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RJ0_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RJ0_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RJ0_Get_PulseWidth</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RJ0_Get_PulseWidth</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RJ0_Set_PowerOff</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RJ0_Set_PowerOff</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> TMRD0</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD0_Create</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD0_Create</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD0_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD0_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD0_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD0_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD0_Get_PulseWidth</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD0_Get_PulseWidth</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD0_Set_PowerOff</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD0_Set_PowerOff</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD0_ForcedOutput_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD0_ForcedOutput_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD0_ForcedOutput_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD0_ForcedOutput_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> TMRD1</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD1_Create</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD1_Create</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD1_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD1_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD1_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD1_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD1_Get_PulseWidth</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD1_Get_PulseWidth</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD1_Set_PowerOff</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD1_Set_PowerOff</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD1_ForcedOutput_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD1_ForcedOutput_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD1_ForcedOutput_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD1_ForcedOutput_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_timer_user.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_timer_user.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> TAU0</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAUn_Create_UserInit(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU0_Create_UserInit</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Channel0</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static void r_tau0_channel0_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_tau0_channel0_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Channel1</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static void r_tau0_channel1_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_tau0_channel1_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static void r_tau0_channel1_higher8bits_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_tau0_channel1_higher8bits_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Channel2</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static void r_tau0_channel2_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_tau0_channel2_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Channel3</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static void r_tau0_channel3_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_tau0_channel3_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static void r_tau0_channel3_higher8bits_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_tau0_channel3_higher8bits_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Channel4</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static void r_tau0_channel4_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_tau0_channel4_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Channel5</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static void r_tau0_channel5_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_tau0_channel5_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Channel6</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static void r_tau0_channel6_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_tau0_channel6_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Channel7</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static void r_tau0_channel7_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_tau0_channel7_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> TAU1</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_TAUn_Create_UserInit(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TAU1_Create_UserInit</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Channel0</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static void r_tau1_channel0_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_tau1_channel0_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Channel1</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static void r_tau1_channel1_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_tau1_channel1_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static void r_tau1_channel1_higher8bits_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_tau1_channel1_higher8bits_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Channel2</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static void r_tau1_channel2_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_tau1_channel2_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Channel3</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static void r_tau1_channel3_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_tau1_channel3_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static void r_tau1_channel3_higher8bits_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_tau1_channel3_higher8bits_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> TMRJ0</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RJ0_Create_UserInit</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RJ0_Create_UserInit</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_tmr_rj0_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_tmr_rj0_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> TMRD0</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD0_Create_UserInit</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD0_Create_UserInit</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_tmr_rd0_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_tmr_rd0_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> TMRD1</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD1_Create_UserInit</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_TMR_RD1_Create_UserInit</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_tmr_rd1_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_tmr_rd1_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_timer.h</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_timer.h</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2><B>Watchdog Timer</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_wdt.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_wdt.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_WDT_Create(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_WDT_Create</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_WDT_Restart(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_WDT_Restart</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_wdt_user.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_wdt_user.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_WDT_Create_UserInit(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_WDT_Create_UserInit</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static void r_wdt_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_wdt_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_wdt.h</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_wdt.h</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2><B>Real-time Clock</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_rtc.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_rtc.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_RTC_Create(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_RTC_Create</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_RTC_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_RTC_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_RTC_Stop(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_RTC_Stop</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> MD_STATUS R_RTC_SetHourSystem(rtc_hour_system_t hour_system)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_RTC_Set_HourSystem</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> MD_STATUS R_RTC_Get_CounterValue(rtc_counter_value_t * const counter_read_val)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_RTC_Get_CounterValue</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> MD_STATUS R_RTC_Set_CounterValue(rtc_counter_value_t counter_write_val)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_RTC_Set_CounterValue</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_RTC_Set_AlarmOn(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_RTC_Set_AlarmOn</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_RTC_Set_AlarmOff(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_RTC_Set_AlarmOff</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_RTC_Set_AlarmValue(rtc_alarm_value_t alarm_val)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_RTC_Set_AlarmValue</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_RTC_Get_AlarmValue(rtc_alarm_value_t * const alarm_val)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_RTC_Get_AlarmValue</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> MD_STATUS R_RTC_Set_ConstPeriodInterruptOn(rtc_int_period_t period)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_RTC_Set_ConstPeriodInterruptOn</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_RTC_Set_ConstPeriodInterruptOff(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_RTC_Set_ConstPeriodInterruptOff</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_RTC_Set_RTC1HZOn(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_RTC_Set_RTC1HZOn</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_RTC_Set_RTC1HZOff(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_RTC_Set_RTC1HZOff</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_RTC_Set_PowerOff(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_RTC_Set_PowerOff</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_rtc_user.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_rtc_user.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_RTC_Create_UserInit(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_RTC_Create_UserInit</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static void r_rtc_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_rtc_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> static void r_rtc_callback_constperiod(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_rtc_callback_constperiod</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> static void r_rtc_callback_alarm(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_rtc_callback_alarm</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_rtc.h</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_rtc.h</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2><B>Data Transfer Controller</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_dtc.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_dtc.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_DTC_Create(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_DTC_Create</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_DTC_Set_PowerOff(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_DTC_Set_PowerOff</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_dtc_user.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_dtc_user.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_DTC_Create_UserInit(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_DTC_Create_UserInit</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_dtc.h</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_dtc.h</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2><B>Voltage Detector</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_lvd.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_lvd.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_LVD_Create(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_LVD_Create</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_LVD_InterruptMode_Start(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_LVD_InterruptMode_Start</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_lvd_user.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_lvd_user.c</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> void R_LVD_Create_UserInit(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> R_LVD_Create_UserInit</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> __interrupt static void r_lvd_interrupt(void)</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_lvd_interrupt</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFCC><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_lvd.h</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> r_cg_lvd.h</FONT></td><td bgColor=#CCFFCC><FONT face=Arial size=2> Unused</FONT></td></tr>
</table>
</body>
</html>

25
ECU_APP/hdwinit.asm Normal file
View File

@ -0,0 +1,25 @@
; Copyright (C) 2014 Renesas Electronics Corporation
; RENESAS ELECTRONICS CONFIDENTIAL AND PROPRIETARY.
; This program must be used solely for the purpose for which
; it was furnished by Renesas Electronics Corporation. No part of this
; program may be reproduced or disclosed to others, in any
; form, without the prior written permission of Renesas Electronics
; Corporation.
;---------------------------------------------------------------------
; _hdwinit
;
; void _hdwinit(void);
;
; input:
; NONE
; output:
; NONE
;---------------------------------------------------------------------
; NOTE : THIS IS A TYPICAL EXAMPLE.
.PUBLIC _hdwinit
.textf .CSEG TEXTF
_hdwinit:
RET

2505
ECU_APP/iodefine.h Normal file

File diff suppressed because it is too large Load Diff

203
ECU_APP/macro.html Normal file
View File

@ -0,0 +1,203 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Macro list</title>
</head>
<body>
<b>MCU name: RL78/F13(ROM:128KB)<br />Chip name: R5F10BBG</b>
<hr />
<table cellSpacing=0 cellPadding=2 width="90%" border=1 frame="box">
<tr><td bgColor=#99CCFF><FONT face=Arial size=2><B>Module</B></FONT></td><td bgColor=#99CCFF><FONT face=Arial size=2><B> Macro</B></FONT></td><td bgColor=#99CCFF><FONT face=Arial size=2><B> Sub</B></FONT></td><td bgColor=#99CCFF><FONT face=Arial size=2><B> Setting</B></FONT></td><td bgColor=#99CCFF><FONT face=Arial size=2><B> Status</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2><B>Clock Generator</B></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2><B> </B></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2><B> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> CGC</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR40 / RXD0/SI00/SDA00</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P16</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR40 / TXD0/SO00</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P15</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR40 / _SCK00/SCL00</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P17</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR40 / _SSI00</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P30</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR41 / SO01</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P120</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR41 / SI01</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P13</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR41 / _SCK01</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P14</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR41 / _SSI01</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P125</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR41 / SCL01</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P14</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR41 / SDA01</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P13</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR42 / RXD1</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P11</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR42 / TXD1</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P12</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR42 / SO10</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P12</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR42 / SI10</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P11</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR42 / _SCK10</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P10</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR42 / SCL10</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P10</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR42 / SDA10</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P11</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR44 / LTxD0</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P13</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR44 / LRxD0</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P14</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR46 / CTxD0</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P10</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR46 / CRxD0</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P11</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR50 / KR0</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> -</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR50 / KR1</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> -</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR50 / KR2</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> -</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR50 / KR3</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> -</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR50 / KR4</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> -</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR50 / KR5</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> -</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR52 / INTP2</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P30</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR53 / INTP3</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P17</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR70 / TRDCLK0/TRDIOA0</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P13</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR71 / TRDIOB0</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P125</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PIOR73 / TRDIOD0</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P120</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Operation mode setting</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> High speed main mode 4.0 (V) ¡Ü VDD ¡Ü 5.5 (V)</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Main system clock (fMAIN) setting</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> High-speed system clock (fMX)</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> fIH operation</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> fIH frequency</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> 32(MHz)</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> fMX operation</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> High-speed system clock setting</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> X1 oscillation (fX)</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> fMX frequency</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> 8(MHz)</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Stable time</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> 32768 (2^18/fX)(¦Ìs)</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> fPLL operation</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> fPLL frequency</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> 32(MHz)</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Lockup wait counter</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> 64 (2^9/fMAIN)(¦Ìs)</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PLL output for main system clock (fMP) setting</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> 32 (fPLL)(MHz)</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Internal low-speed oscillation clock (fIL) setting</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> 15(kHz)</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Low speed on-chip oscillator clock (fSL) setting</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> 15 (fIL)(kHz)</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> WDT operation clock (fWDT) setting</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> 15(kHz)</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> RTC operation clock</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> 65.57 (fMX/122)(kHz)</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Timer RD operation clock</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> 32000 (fCLK)(kHz)</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> CPU and peripheral clock (fCLK)</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> 32000 (fMP)(kHz)</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> On-chip debug operation setting</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Security ID setting</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Security ID</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> 0x00000000000000000000</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Output the function for confirming reset source</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> RESOUT pin setting</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P130 used as port pin</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Illegal memory access detection function setting</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> RAM guard function setting</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Port register guard function setting</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Interrupt register guard function setting</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Chip state control register guard function setting</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Detection of 1 bit error detection interrupt (INTRAM)</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> CPU stack pointer monitor function setting</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Clock monitor function setting</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Data flash access control setting</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Disables data flash access</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Setting of data flash library</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2><B>Port</B></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2><B> </B></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2><B> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> PORT</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P12</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Mode</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Out</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> N-ch</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> output value</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> 0</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P13</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Mode</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> In</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Pull-up</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Schmitt1 buffer</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P14</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Mode</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> In</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Pull-up</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Schmitt1 buffer</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P15</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Mode</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> In</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Pull-up</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P16</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Mode</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> In</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Pull-up</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Schmitt1 buffer</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P17</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Mode</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> In</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Pull-up</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Schmitt1 buffer</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P30</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Mode</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> In</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Pull-up</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Schmitt1 buffer</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P34</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Mode</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> In</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P40</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Mode</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Assistant function</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Pull-up</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P41</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Mode</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> In</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Pull-up</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P60</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Mode</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> In</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Pull-up</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Schmitt1 buffer</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P61</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Mode</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> In</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Pull-up</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Schmitt1 buffer</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P62</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Mode</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> In</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Pull-up</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Schmitt1 buffer</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P63</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Mode</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> In</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Pull-up</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Schmitt1 buffer</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P80</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Mode</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> In</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P81</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Mode</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> In</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P82</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Mode</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> In</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P83</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Mode</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> In</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P84</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Mode</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> In</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P85</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Mode</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> In</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P120</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Mode</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> In</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Pull-up</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> P125</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Mode</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> In</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Pull-up</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Schmitt1 buffer</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2><B>Interrupt</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2><B>Serial</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2><B>A/D Converter</B></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2><B> </B></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2><B> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> ADC</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> A/D convertor operation setting</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Comparator operation setting</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Operation</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Resolution setting</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> 10 bits</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> VREF(+) setting</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> VDD</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> VREF(-) setting</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> VSS</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Trigger mode setting</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Hardware trigger no wait mode</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Hardware trigger no wait mode</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> INTTM01</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Operation mode setting</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> One-shot select mode</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> ANI0 - ANI7 analog input selection</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> ANI0</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> ANI24 - ANI25 analog input selection</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> ANI26, ANI27, ANI28, ANI29, ANI30</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> A/D channel selection</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> ANI0</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Conversion time mode</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Normal 1 </FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Conversion time</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> 38 (1216/fCLK)(¦Ìs)</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Conversion result upper/lower bound value setting</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Generates an interrupt request (INTAD) when ADLL ¡Ü ADCRH ¡Ü ADUL</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Upper bound (ADUL) value</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> 255</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Lower bound (ADLL) value</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> 0</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Use A/D interrupt (INTAD)</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Priority</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Low</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2><B>Timer</B></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2><B> </B></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2><B> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> TAU0</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Channel0</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Channel 0</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Interval timer</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Interval value (16 bits)</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> 1000¦Ìs, (Actual value: 1000)</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Generates INTTM00 when counting is started</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> End of timer channel 0 count, generate an interrupt (INTTM00)</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Priority (INTTM00)</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Low</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Channel1</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Channel 1</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Interval timer</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Operation mode setting</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> 16 bits</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Interval value (16 bits)</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> 1000¦Ìs, (Actual value: 1000)</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Generates INTTM01 when counting is started</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> End of timer channel 1 count, generate an interrupt (INTTM01)</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Priority (INTTM01)</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Low</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> TAU1</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> TMRJ0</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> TMRD0</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> TMRD1</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2><B>Watchdog Timer</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2><B>Real-time Clock</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2><B>Data Transfer Controller</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Unused</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2><B>Voltage Detector</B></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2><B> </B></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2><B> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> LVD</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Low voltage detector operation setting</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Used</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Operation mode setting</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Reset mode</FONT></td></tr>
<tr><td bgColor=#CCFFFF><FONT face=Arial size=2></FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> </FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> Reset generation level (VLVD)</FONT></td><td bgColor=#CCFFFF><FONT face=Arial size=2> 4.32(V)</FONT></td></tr>
</table>
</body>
</html>

14
ECU_APP/mycode.hPreview Normal file

File diff suppressed because one or more lines are too long

138
ECU_APP/r_cg_adc.c Normal file
View File

@ -0,0 +1,138 @@
/***********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2012, 2021 Renesas Electronics Corporation. All rights reserved.
***********************************************************************************************************************/
/***********************************************************************************************************************
* File Name : r_cg_adc.c
* Version : CodeGenerator for RL78/F13 V2.03.07.02 [08 Nov 2021]
* Device(s) : R5F10BBG
* Tool-Chain : CCRL
* Description : This file implements device driver for ADC module.
* Creation Date: 2023-08-18
***********************************************************************************************************************/
/***********************************************************************************************************************
Includes
***********************************************************************************************************************/
#include "r_cg_macrodriver.h"
#include "r_cg_adc.h"
/* Start user code for include. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
#include "r_cg_userdefine.h"
/***********************************************************************************************************************
Pragma directive
***********************************************************************************************************************/
/* Start user code for pragma. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
Global variables and functions
***********************************************************************************************************************/
/* Start user code for global. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
* Function Name: R_ADC_Create
* Description : This function initializes the AD converter.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_ADC_Create(void)
{
ADCEN = 1U; /* supply AD clock */
ADM0 = _00_AD_ADM0_INITIALVALUE; /* disable AD conversion and clear ADM0 register */
ADMK = 1U; /* disable INTAD interrupt */
ADIF = 0U; /* clear INTAD interrupt flag */
/* Set INTAD low priority */
ADPR1 = 1U;
ADPR0 = 1U;
/* The reset status of ADPC is analog input, so it's unnecessary to set. */
/* Set ANI0 pin as analog input */
PM3 |= 0x08U;
ADM0 = _00_AD_CONVERSION_CLOCK_64 | _00_AD_TIME_MODE_NORMAL_1 | _00_AD_OPERMODE_SELECT;
ADM1 = _80_AD_TRIGGER_HARDWARE_NOWAIT | _20_AD_CONVMODE_ONESELECT | _00_AD_TRIGGER_INTTM01;
ADM2 = _00_AD_POSITIVE_VDD | _00_AD_NEGATIVE_VSS | _00_AD_AREA_MODE_1 | _00_AD_RESOLUTION_10BIT;
ADUL = _FF_AD_ADUL_VALUE;
ADLL = _00_AD_ADLL_VALUE;
ADS = _00_AD_INPUT_CHANNEL_0;
ADCE = 1U; /* enable AD comparator */
}
/***********************************************************************************************************************
* Function Name: R_ADC_Start
* Description : This function starts the AD converter.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_ADC_Start(void)
{
ADIF = 0U; /* clear INTAD interrupt flag */
ADMK = 0U; /* enable INTAD interrupt */
ADCS = 1U; /* enable AD conversion */
}
/***********************************************************************************************************************
* Function Name: R_ADC_Stop
* Description : This function stops the AD converter.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_ADC_Stop(void)
{
ADCS = 0U; /* disable AD conversion */
ADMK = 1U; /* disable INTAD interrupt */
ADIF = 0U; /* clear INTAD interrupt flag */
}
/***********************************************************************************************************************
* Function Name: R_ADC_Set_OperationOn
* Description : This function enables comparator operation.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_ADC_Set_OperationOn(void)
{
ADCE = 1U; /* enable AD comparator */
}
/***********************************************************************************************************************
* Function Name: R_ADC_Set_OperationOff
* Description : This function stops comparator operation.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_ADC_Set_OperationOff(void)
{
ADCE = 0U; /* disable AD comparator */
}
/***********************************************************************************************************************
* Function Name: R_ADC_Get_Result
* Description : This function returns the conversion result in the buffer.
* Arguments : buffer -
* the address where to write the conversion result
* Return Value : None
***********************************************************************************************************************/
void R_ADC_Get_Result(uint16_t * const buffer)
{
*buffer = (uint16_t)(ADCR >> 6U);
}
/* Start user code for adding. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */

182
ECU_APP/r_cg_adc.h Normal file
View File

@ -0,0 +1,182 @@
/***********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2012, 2021 Renesas Electronics Corporation. All rights reserved.
***********************************************************************************************************************/
/***********************************************************************************************************************
* File Name : r_cg_adc.h
* Version : CodeGenerator for RL78/F13 V2.03.07.02 [08 Nov 2021]
* Device(s) : R5F10BBG
* Tool-Chain : CCRL
* Description : This file implements device driver for ADC module.
* Creation Date: 2023-08-18
***********************************************************************************************************************/
#ifndef ADC_H
#define ADC_H
/***********************************************************************************************************************
Macro definitions (Register bit)
***********************************************************************************************************************/
/*
Peripheral enable register 0 (PER0)
*/
/* Control of AD converter input clock (ADCEN) */
#define _00_AD_CLOCK_STOP (0x00U) /* stop supply of input clock */
#define _20_AD_CLOCK_SUPPLY (0x20U) /* supply input clock */
/*
AD converter mode register 0 (ADM0)
*/
#define _00_AD_ADM0_INITIALVALUE (0x00U)
/* AD conversion operation control (ADCS) */
#define _80_AD_CONVERSION_ENABLE (0x80U) /* enable AD conversion operation control */
#define _00_AD_CONVERSION_DISABLE (0x00U) /* disable AD conversion operation control */
/* Specification of AD conversion operation mode (ADMD) */
#define _00_AD_OPERMODE_SELECT (0x00U) /* select operation mode */
#define _40_AD_OPERMODE_SCAN (0x40U) /* scan operation mode */
/* AD conversion clock selection (FR2 - FR0) */
#define _00_AD_CONVERSION_CLOCK_64 (0x00U) /* fCLK/64 */
#define _08_AD_CONVERSION_CLOCK_32 (0x08U) /* fCLK/32 */
#define _10_AD_CONVERSION_CLOCK_16 (0x10U) /* fCLK/16 */
#define _18_AD_CONVERSION_CLOCK_8 (0x18U) /* fCLK/8 */
#define _20_AD_CONVERSION_CLOCK_6 (0x20U) /* fCLK/6 */
#define _28_AD_CONVERSION_CLOCK_5 (0x28U) /* fCLK/5 */
#define _30_AD_CONVERSION_CLOCK_4 (0x30U) /* fCLK/4 */
#define _38_AD_CONVERSION_CLOCK_2 (0x38U) /* fCLK/2 */
/* Specification AD conversion time mode (LV1, LV0) */
#define _00_AD_TIME_MODE_NORMAL_1 (0x00U) /* normal 1 mode */
#define _02_AD_TIME_MODE_NORMAL_2 (0x02U) /* normal 2 mode */
/* AD comparator operation control (ADCE) */
#define _01_AD_COMPARATOR_ENABLE (0x01U) /* enable comparator operation control */
#define _00_AD_COMPARATOR_DISABLE (0x00U) /* disable comparator operation control */
/*
Analog input channel specification register (ADS)
*/
/* Specification of analog input channel (ADISS, ADS4 - ADS0) */
/* Select mode */
#define _00_AD_INPUT_CHANNEL_0 (0x00U) /* ANI0 */
#define _01_AD_INPUT_CHANNEL_1 (0x01U) /* ANI1 */
#define _02_AD_INPUT_CHANNEL_2 (0x02U) /* ANI2 */
#define _03_AD_INPUT_CHANNEL_3 (0x03U) /* ANI3 */
#define _04_AD_INPUT_CHANNEL_4 (0x04U) /* ANI4 */
#define _05_AD_INPUT_CHANNEL_5 (0x05U) /* ANI5 */
#define _06_AD_INPUT_CHANNEL_6 (0x06U) /* ANI6 */
#define _07_AD_INPUT_CHANNEL_7 (0x07U) /* ANI7 */
#define _18_AD_INPUT_CHANNEL_24 (0x18U) /* ANI24 */
#define _19_AD_INPUT_CHANNEL_25 (0x19U) /* ANI25 */
#define _80_AD_INPUT_TEMPERSENSOR_0 (0x80U) /* temperature sensor 0 output is used to be the input channel */
#define _81_AD_INPUT_INTERREFVOLT (0x81U) /* internal reference voltage output is used to be the input channel */
/* Scan mode */
#define _00_AD_INPUT_CHANNEL_0_3 (0x00U) /* ANI0 - ANI3 */
#define _01_AD_INPUT_CHANNEL_1_4 (0x01U) /* ANI1 - ANI4 */
#define _02_AD_INPUT_CHANNEL_2_5 (0x02U) /* ANI2 - ANI5 */
#define _03_AD_INPUT_CHANNEL_3_6 (0x03U) /* ANI3 - ANI6 */
#define _04_AD_INPUT_CHANNEL_4_7 (0x04U) /* ANI4 - ANI7 */
/*
AD converter mode register 1 (ADM1)
*/
/* AD trigger mode selection (ADTMD1, ADTMD0) */
#define _00_AD_TRIGGER_SOFTWARE (0x00U) /* software trigger mode */
#define _80_AD_TRIGGER_HARDWARE_NOWAIT (0x80U) /* hardware trigger mode (no wait) */
#define _C0_AD_TRIGGER_HARDWARE_WAIT (0xC0U) /* hardware trigger mode (wait) */
/* AD convertion mode selection (ADSCM) */
#define _00_AD_CONVMODE_CONSELECT (0x00U) /* continuous convertion mode */
#define _20_AD_CONVMODE_ONESELECT (0x20U) /* oneshot convertion mode */
/* Trigger signal selection (ADTRS1, ADTRS0) */
#define _00_AD_TRIGGER_INTTM01 (0x00U) /* INTTM01 */
#define _01_AD_TRIGGER_ELC (0x01U) /* ELC */
#define _01_AD_TRIGGER_TIMER (0x01U) /* INTTRD0,INTTRJ0 */
#define _02_AD_TRIGGER_INTRTC (0x02U) /* INTRTC */
/*
AD converter mode register 2 (ADM2)
*/
/* AD VREF(+) selection (ADREFP1, ADREFP0) */
#define _00_AD_POSITIVE_VDD (0x00U) /* use VDD as VREF(+) */
#define _40_AD_POSITIVE_AVREFP (0x40U) /* use AVREFP as VREF(+) */
#define _80_AD_POSITIVE_INTERVOLT (0x80U) /* use internal voltage as VREF(+) */
/* AD VREF(-) selection (ADREFM) */
#define _00_AD_NEGATIVE_VSS (0x00U) /* use VSS as VREF(-) */
#define _20_AD_NEGATIVE_AVREFM (0x20U) /* use AVREFM as VREF(-) */
/* AD conversion result upper/lower bound value selection (ADRCK) */
#define _00_AD_AREA_MODE_1 (0x00U) /* generates INTAD when ADLL <= ADCRH <= ADUL */
#define _08_AD_AREA_MODE_2_3 (0x08U) /* generates INTAD when ADUL < ADCRH or ADLL > ADCRH */
/* AD wakeup function selection (AWC) */
#define _00_AD_WAKEUP_OFF (0x00U) /* stop wakeup function */
#define _04_AD_WAKEUP_ON (0x04U) /* use wakeup function */
/* AD resolution selection (ADTYP) */
#define _00_AD_RESOLUTION_10BIT (0x00U) /* 10 bits */
#define _01_AD_RESOLUTION_8BIT (0x01U) /* 8 bits */
/*
AD test function register (ADTES)
*/
/* AD test mode signal (ADTES2 - ADTES0) */
#define _00_AD_NORMAL_INPUT (0x00U) /* normal mode */
#define _02_AD_TEST_AVREFM (0x02U) /* use AVREFM as test signal */
#define _03_AD_TEST_AVREFP (0x03U) /* use AVREFP as test signal */
/*
Format of A/D Converter Trigger Select Register 0 (ADTRGS0)(F13 only)
*/
/* Selection of the operation trigger of the A/D converter when the timer RD0 input capture B/compare match B
interrupt request is generated (ADTRGS00) */
#define _01_AD_TRIGGER_INTTRD0 (0x01U) /* A/D conversion is started when the interrupt request is generated */
/*
Format of A/D Converter Trigger Select Register 1 (ADTRGS1)(F13 only)
*/
/* Selection of the operation trigger of the A/D converter when the timer RJ0 interrupt request is generated (ADTRGS10) */
#define _01_AD_TRIGGER_INTTRJ0 (0x01U) /* A/D conversion is started when the interrupt request is generated */
/***********************************************************************************************************************
Macro definitions
***********************************************************************************************************************/
/* Upper bound (ADUL) value */
#define _FF_AD_ADUL_VALUE (0xFFU)
/* Upper bound (ADLL) value */
#define _00_AD_ADLL_VALUE (0x00U)
/***********************************************************************************************************************
Typedef definitions
***********************************************************************************************************************/
typedef enum
{
ADCHANNEL0, ADCHANNEL1, ADCHANNEL2, ADCHANNEL3, ADCHANNEL4, ADCHANNEL5, ADCHANNEL6,
ADCHANNEL7, ADCHANNEL24 = 24U, ADCHANNEL25, ADTEMPERSENSOR0 = 128U, ADINTERREFVOLT
} ad_channel_t;
typedef enum
{
ADNORMALINPUT,
ADAVREFM = 2U,
ADAVREFP
} test_channel_t;
/***********************************************************************************************************************
Global functions
***********************************************************************************************************************/
void R_ADC_Create(void);
void R_ADC_Start(void);
void R_ADC_Stop(void);
void R_ADC_Set_OperationOn(void);
void R_ADC_Set_OperationOff(void);
void R_ADC_Get_Result(uint16_t * const buffer);
/* Start user code for function. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
#endif

83
ECU_APP/r_cg_adc_user.c Normal file
View File

@ -0,0 +1,83 @@
/***********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2012, 2021 Renesas Electronics Corporation. All rights reserved.
***********************************************************************************************************************/
/***********************************************************************************************************************
* File Name : r_cg_adc_user.c
* Version : CodeGenerator for RL78/F13 V2.03.07.02 [08 Nov 2021]
* Device(s) : R5F10BBG
* Tool-Chain : CCRL
* Description : This file implements device driver for ADC module.
* Creation Date: 2023-08-18
***********************************************************************************************************************/
/***********************************************************************************************************************
Includes
***********************************************************************************************************************/
#include "r_cg_macrodriver.h"
#include "r_cg_adc.h"
/* Start user code for include. Do not edit comment generated here */
#include "hwCtrl.h"
/* End user code. Do not edit comment generated here */
#include "r_cg_userdefine.h"
/***********************************************************************************************************************
Pragma directive
***********************************************************************************************************************/
#pragma interrupt r_adc_interrupt(vect=INTAD)
/* Start user code for pragma. Do not edit comment generated here */
#if DEBUG
#pragma interrupt r_adc_interrupt(vect=INTAD)
#endif
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
Global variables and functions
***********************************************************************************************************************/
/* Start user code for global. Do not edit comment generated here */
extern uint16_t g_adval[12];
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
* Function Name: r_adc_interrupt
* Description : This function is INTAD interrupt service routine.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
static void __near r_adc_interrupt(void)
{
/* Start user code. Do not edit comment generated here */
ad_handle();
/*
uint8_t adch=0;
adch = ADS - 2;
R_ADC_Get_Result(&g_adval[adch]);
adch++;
if (adch > 9)
{
adch = 0;
}
ADS = adch + 2;
*/
/* End user code. Do not edit comment generated here */
}
/* Start user code for adding. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */

122
ECU_APP/r_cg_cgc.c Normal file
View File

@ -0,0 +1,122 @@
/***********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2012, 2021 Renesas Electronics Corporation. All rights reserved.
***********************************************************************************************************************/
/***********************************************************************************************************************
* File Name : r_cg_cgc.c
* Version : CodeGenerator for RL78/F13 V2.03.07.02 [08 Nov 2021]
* Device(s) : R5F10BBG
* Tool-Chain : CCRL
* Description : This file implements device driver for CGC module.
* Creation Date: 2023-08-18
***********************************************************************************************************************/
/***********************************************************************************************************************
Includes
***********************************************************************************************************************/
#include "r_cg_macrodriver.h"
#include "r_cg_cgc.h"
/* Start user code for include. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
#include "r_cg_userdefine.h"
/***********************************************************************************************************************
Pragma directive
***********************************************************************************************************************/
/* Start user code for pragma. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
Global variables and functions
***********************************************************************************************************************/
/* Start user code for global. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
* Function Name: R_CGC_Create
* Description : This function initializes the clock generator.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_CGC_Create(void)
{
volatile uint32_t w_count;
uint8_t temp_stab_set;
uint8_t temp_stab_wait;
/* Set fSL */
SELLOSC = 1U;
/* Set fMX */
CMC = _40_CGC_HISYS_OSC | _00_CGC_SYSOSC_UNDER10M;
OSTS = _07_CGC_OSCSTAB_SEL18;
MSTOP = 0U;
temp_stab_set = _FF_CGC_OSCSTAB_STA18;
do
{
temp_stab_wait = OSTC;
temp_stab_wait &= temp_stab_set;
}
while (temp_stab_wait != temp_stab_set);
/* Set fMAIN */
MCM0 = 1U;
while (MCS == 0U)
{
;
}
/* Set fPLL */
PLLCTL = _80_CGC_LOCKUP_WAIT_9 | _00_CGC_PLL_BELOW_32MHZ | _10_CGC_PLL_DIVISION_4 | _02_CGC_PLL_MULTIPLY_X16;
/* Change the waiting time according to the system */
for (w_count = 0U; w_count <= CGC_PLLWAITTIME; w_count++)
{
NOP();
}
PLLON = 1U;
while ((PLLSTS & 0x80U) == 0U)
{
;
}
MDIV = _00_CGC_FMP_DIV_DEFAULT;
/* Set fMP to PLL clock select mode */
SELPLL = 1U;
while ((PLLSTS & 0x88U) != 0x88U)
{
;
}
/* Set fCLK */
CSS = 0U;
/* Set fIH */
HIOSTOP = 0U;
/* Set RTC clock source */
RTCCL = _00_CGC_RTC_FMX;
RTCCL |= _42_CGC_RTC_DIV122;
/* Set Timer RD clock source to fCLK, fMP */
TRD_CKSEL = 0U;
}
/* Start user code for adding. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */

206
ECU_APP/r_cg_cgc.h Normal file
View File

@ -0,0 +1,206 @@
/***********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2012, 2021 Renesas Electronics Corporation. All rights reserved.
***********************************************************************************************************************/
/***********************************************************************************************************************
* File Name : r_cg_cgc.h
* Version : CodeGenerator for RL78/F13 V2.03.07.02 [08 Nov 2021]
* Device(s) : R5F10BBG
* Tool-Chain : CCRL
* Description : This file implements device driver for CGC module.
* Creation Date: 2023-08-18
***********************************************************************************************************************/
#ifndef CGC_H
#define CGC_H
/***********************************************************************************************************************
Macro definitions (Register bit)
***********************************************************************************************************************/
/*
Clock operation mode control register (CMC)
*/
/* High-speed system clock pin operation mode (EXCLK, OSCSEL) */
#define _C0_CGC_HISYS_PIN (0xC0U)
#define _00_CGC_HISYS_PORT (0x00U) /* X1, X2 as I/O port */
#define _40_CGC_HISYS_OSC (0x40U) /* X1, X2 as crystal/ceramic resonator connection */
#define _80_CGC_HISYS_PORT1 (0x80U) /* X1, X2 as I/O port */
#define _C0_CGC_HISYS_EXT (0xC0U) /* X1 as I/O port, X2 as external clock input */
/* Control of X1 high-speed system clock oscillation frequency (AMPH) */
#define _00_CGC_SYSOSC_DEFAULT (0x00U)
#define _00_CGC_SYSOSC_UNDER10M (0x00U) /* fX <= 10MHz */
#define _01_CGC_SYSOSC_OVER10M (0x01U) /* fX > 10MHz */
/*
Clock operation status control register (CSC)
*/
/* Control of high-speed system clock operation (MSTOP) */
#define _00_CGC_HISYS_OPER (0x00U) /* X1 oscillator/external clock operating */
#define _80_CGC_HISYS_STOP (0x80U) /* X1 oscillator/external clock stopped */
/* High-speed OCO operation (HIOSTOP) */
#define _00_CGC_HIO_OPER (0x00U) /* high-speed OCO operating */
#define _01_CGC_HIO_STOP (0x01U) /* high-speed OCO stopped */
/*
Oscillation stabilization time counter status register (OSTC)
*/
/* Oscillation stabilization time status (MOST18 - MOST8) */
#define _00_CGC_OSCSTAB_STA0 (0x00U) /* < 2^8/fX */
#define _80_CGC_OSCSTAB_STA8 (0x80U) /* 2^8/fX */
#define _C0_CGC_OSCSTAB_STA9 (0xC0U) /* 2^9/fX */
#define _E0_CGC_OSCSTAB_STA10 (0xE0U) /* 2^10/fX */
#define _F0_CGC_OSCSTAB_STA11 (0xF0U) /* 2^11/fX */
#define _F8_CGC_OSCSTAB_STA13 (0xF8U) /* 2^13/fX */
#define _FC_CGC_OSCSTAB_STA15 (0xFCU) /* 2^15/fX */
#define _FE_CGC_OSCSTAB_STA17 (0xFEU) /* 2^17/fX */
#define _FF_CGC_OSCSTAB_STA18 (0xFFU) /* 2^18/fX */
/*
Oscillation stabilization time select register (OSTS)
*/
/* Oscillation stabilization time selection (OSTS2 - OSTS0) */
#define _00_CGC_OSCSTAB_SEL8 (0x00U) /* 2^8/fX */
#define _01_CGC_OSCSTAB_SEL9 (0x01U) /* 2^9/fX */
#define _02_CGC_OSCSTAB_SEL10 (0x02U) /* 2^10/fX */
#define _03_CGC_OSCSTAB_SEL11 (0x03U) /* 2^11/fX */
#define _04_CGC_OSCSTAB_SEL13 (0x04U) /* 2^13/fX */
#define _05_CGC_OSCSTAB_SEL15 (0x05U) /* 2^15/fX */
#define _06_CGC_OSCSTAB_SEL17 (0x06U) /* 2^17/fX */
#define _07_CGC_OSCSTAB_SEL18 (0x07U) /* 2^18/fX */
/*
PLL control register (PLLCTL)
*/
/* Lockup wait counter setting value */
#define _00_CGC_LOCKUP_WAIT_7 (0x00U) /* 2^7/fMAIN */
#define _40_CGC_LOCKUP_WAIT_8 (0x40U) /* 2^8/fMAIN */
#define _80_CGC_LOCKUP_WAIT_9 (0x80U) /* 2^9/fMAIN */
/* PLL output clock selection (PLLDIV1) */
#define _00_CGC_PLL_BELOW_32MHZ (0x00U) /* when fMAIN <= 32 MHz */
#define _20_CGC_PLL_ABOVE_32MHZ (0x20U) /* when fMAIN > 32 MHz */
/* PLL output clock division selection (PLLDIV0) */
#define _00_CGC_PLL_DIVISION_2 (0x00U) /* divides the clock frequency by 2 */
#define _10_CGC_PLL_DIVISION_4 (0x10U) /* divides the clock frequency by 4 */
/* Clock mode selection (SELPLL) */
#define _00_CGC_NOSEL_PLL (0x00U) /* clock through mode */
#define _04_CGC_SEL_PLL (0x04U) /* PLL clock select mode */
/* PLL output clock (fPLLO) multiplier selection (PLLMUL) */
#define _00_CGC_PLL_MULTIPLY_X12 (0x00U) /* clock through mode */
#define _02_CGC_PLL_MULTIPLY_X16 (0x02U) /* PLL clock select mode */
/* Operating or stopping PLL function (PLLON) */
#define _00_CGC_PLL_STOP (0x00U) /* PLL operating stopped */
#define _01_CGC_PLL_ENABLE (0x01U) /* PLL operating */
/*
PLL status register (PLLSTS)
*/
/* PLL lock state */
#define _00_CGC_PLL_UNLOCKED (0x00U) /* Unlocked state */
#define _80_CGC_PLL_LOCKED (0x80U) /* Locked state */
/*
FMP clock selection division register (MDIV)
*/
/* Division of PLL clock (fMP) */
#define _00_CGC_FMP_DIV_DEFAULT (0x00U) /* fMP (default) */
#define _01_CGC_FMP_DIV_1 (0x01U) /* fMP/2^1 */
#define _02_CGC_FMP_DIV_2 (0x02U) /* fMP/2^2 */
#define _03_CGC_FMP_DIV_3 (0x03U) /* fMP/2^3 */
#define _04_CGC_FMP_DIV_4 (0x04U) /* fMP/2^4 */
#define _05_CGC_FMP_DIV_5 (0x05U) /* fMP/2^5 */
#define _06_CGC_FMP_DIV_6 (0x06U) /* fMP/2^6 */
/*
System clock control register (CKC)
*/
/* Status of Main system clock fMAIN (MCS) */
#define _00_CGC_MAINCLK_HIO (0x00U) /* high-speed OCO clock (fIH) */
#define _20_CGC_MAINCLK_HISYS (0x20U) /* high-speed system clock (fMX) */
/* Selection of Main system clock fMAIN (MCM0) */
#define _00_CGC_MAINCLK_SELHIO (0x00U) /* high-speed OCO clock (fIH) */
#define _10_CGC_MAINCLK_SELHISYS (0x10U) /* high-speed system clock (fMX) */
/*
Operation speed mode control register (OSMC)
*/
/* Setting in subsystem clock HALT mode (RTCLPC) */
#define _00_CGC_SUBINHALT_ON (0x00U) /* enables supply of subsystem clock to peripheral functions */
#define _80_CGC_SUBINHALT_OFF (0x80U) /* stops supply to peripheral functions other than RTC and interval timer */
/* RTC macro operation clock (WUTMMCK0) */
#define _00_CGC_RTC_CLK_OTHER (0x00U) /* Other than fIL */
#define _10_CGC_RTC_CLK_FIL (0x10U) /* use fIL clock */
/*
Illegal memory access detection control register (IAWCTL)
*/
/* Illegal memory access detection control (IAWEN) */
#define _00_CGC_ILLEGAL_ACCESS_OFF (0x00U) /* disables illegal memory access detection */
#define _80_CGC_ILLEGAL_ACCESS_ON (0x80U) /* enables illegal memory access detection */
/* RAM guard area (GRAM1, GRAM0) */
#define _00_CGC_RAM_GUARD_OFF (0x00U) /* invalid, it is possible to write RAM */
#define _10_CGC_RAM_GUARD_AREA0 (0x10U) /* 128 bytes from RAM bottom address */
#define _20_CGC_RAM_GUARD_AREA1 (0x20U) /* 256 bytes from RAM bottom address */
#define _30_CGC_RAM_GUARD_AREA2 (0x30U) /* 512 bytes from RAM bottom address */
/* PORT register guard (GPORT) */
#define _00_CGC_PORT_GUARD_OFF (0x00U) /* invalid, it is possible to write PORT register */
#define _04_CGC_PORT_GUARD_ON (0x04U) /* valid, it is impossible to write PORT register, but possible for read */
/* Interrupt register guard (GINT) */
#define _00_CGC_INT_GUARD_OFF (0x00U) /* invalid, it is possible to write interrupt register */
#define _02_CGC_INT_GUARD_ON (0x02U) /* valid, it is impossible to write , but possible for read */
/* CSC register guard (GCSC) */
#define _00_CGC_CSC_GUARD_OFF (0x00U) /* invalid, it is possible to write CSC register */
#define _01_CGC_CSC_GUARD_ON (0x01U) /* valid, it is impossible to write CSC register, but possible for read */
/*
RTC clock selection register (RTCCL)
*/
/* Operation clock source selection for RTC (RTCCL7) */
#define _00_CGC_RTC_FMX (0x00U) /* RTC uses External Main clock (fMX) */
#define _80_CGC_RTC_FIH (0x80U) /* RTC uses Internal high speed clock (fIH) */
/* Operation selection of RTC macro (RTCCL6,RTCCKS1 - RTCCKS0) */
#define _00_CGC_RTC_FSUB (0x00U) /* RTC uses sub clock */
#define _02_CGC_RTC_DIV128 (0x02U) /* RTC uses high-speed clock / 128 */
#define _03_CGC_RTC_DIV256 (0x03U) /* RTC uses high-speed clock / 256 */
#define _42_CGC_RTC_DIV122 (0x42U) /* RTC uses high-speed clock / 122 */
#define _43_CGC_RTC_DIV244 (0x43U) /* RTC uses high-speed clock / 244 */
/***********************************************************************************************************************
Macro definitions
***********************************************************************************************************************/
#define CGC_PLLWAITTIME (800U) /* change the waiting time according to the system */
/***********************************************************************************************************************
Typedef definitions
***********************************************************************************************************************/
typedef enum
{
HIOCLK,
SYSX1CLK,
SYSEXTCLK
} clock_mode_t;
/***********************************************************************************************************************
Global functions
***********************************************************************************************************************/
void R_CGC_Create(void);
void R_CGC_Get_ResetSource(void);
/* Start user code for function. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
#endif

64
ECU_APP/r_cg_cgc_user.c Normal file
View File

@ -0,0 +1,64 @@
/***********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2012, 2021 Renesas Electronics Corporation. All rights reserved.
***********************************************************************************************************************/
/***********************************************************************************************************************
* File Name : r_cg_cgc_user.c
* Version : CodeGenerator for RL78/F13 V2.03.07.02 [08 Nov 2021]
* Device(s) : R5F10BBG
* Tool-Chain : CCRL
* Description : This file implements device driver for CGC module.
* Creation Date: 2023-08-18
***********************************************************************************************************************/
/***********************************************************************************************************************
Includes
***********************************************************************************************************************/
#include "r_cg_macrodriver.h"
#include "r_cg_cgc.h"
/* Start user code for include. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
#include "r_cg_userdefine.h"
/***********************************************************************************************************************
Pragma directive
***********************************************************************************************************************/
/* Start user code for pragma. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
Global variables and functions
***********************************************************************************************************************/
/* Start user code for global. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
* Function Name: R_CGC_Get_ResetSource
* Description : This function process of Reset.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_CGC_Get_ResetSource(void)
{
uint8_t reset_flag = RESF;
/* Start user code. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
}
/* Start user code for adding. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */

83
ECU_APP/r_cg_intc.c Normal file
View File

@ -0,0 +1,83 @@
/***********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2012, 2021 Renesas Electronics Corporation. All rights reserved.
***********************************************************************************************************************/
/***********************************************************************************************************************
* File Name : r_cg_intc.c
* Version : CodeGenerator for RL78/F13 V2.03.07.02 [08 Nov 2021]
* Device(s) : R5F10BGG
* Tool-Chain : CCRL
* Description : This file implements device driver for INTC module.
* Creation Date: 2023-05-03
***********************************************************************************************************************/
/***********************************************************************************************************************
Includes
***********************************************************************************************************************/
#include "r_cg_macrodriver.h"
#include "r_cg_intc.h"
/* Start user code for include. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
#include "r_cg_userdefine.h"
/***********************************************************************************************************************
Pragma directive
***********************************************************************************************************************/
/* Start user code for pragma. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
Global variables and functions
***********************************************************************************************************************/
/* Start user code for global. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
* Function Name: R_INTC_Create
* Description : This function initializes INTP module.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_INTC_Create(void)
{
PMK0 = 1U; /* disable INTP0 operation */
PIF0 = 0U; /* clear INTP0 interrupt flag */
PMK1 = 1U; /* disable INTP1 operation */
PIF1 = 0U; /* clear INTP1 interrupt flag */
PMK2 = 1U; /* disable INTP2 operation */
PIF2 = 0U; /* clear INTP2 interrupt flag */
PMK3 = 1U; /* disable INTP3 operation */
PIF3 = 0U; /* clear INTP3 interrupt flag */
PMK4 = 1U; /* disable INTP4 operation */
PIF4 = 0U; /* clear INTP4 interrupt flag */
PMK5 = 1U; /* disable INTP5 operation */
PIF5 = 0U; /* clear INTP5 interrupt flag */
PMK6 = 1U; /* disable INTP6 operation */
PIF6 = 0U; /* clear INTP6 interrupt flag */
PMK7 = 1U; /* disable INTP7 operation */
PIF7 = 0U; /* clear INTP7 interrupt flag */
PMK8 = 1U; /* disable INTP8 operation */
PIF8 = 0U; /* clear INTP8 interrupt flag */
PMK9 = 1U; /* disable INTP9 operation */
PIF9 = 0U; /* clear INTP9 interrupt flag */
INTMSK = _00_INTP4_CONTROL_ENABLE | _02_INTP5_CONTROL_DISABLE | _04_INTP6_CONTROL_DISABLE |
_F8_INTP_INTMSK_INIT_VALUE;
}
/* Start user code for adding. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */

141
ECU_APP/r_cg_intc.h Normal file
View File

@ -0,0 +1,141 @@
/***********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2012, 2021 Renesas Electronics Corporation. All rights reserved.
***********************************************************************************************************************/
/***********************************************************************************************************************
* File Name : r_cg_intc.h
* Version : CodeGenerator for RL78/F13 V2.03.07.02 [08 Nov 2021]
* Device(s) : R5F10BGG
* Tool-Chain : CCRL
* Description : This file implements device driver for INTC module.
* Creation Date: 2023-05-03
***********************************************************************************************************************/
#ifndef INTC_H
#define INTC_H
/***********************************************************************************************************************
Macro definitions (Register bit)
***********************************************************************************************************************/
/*
External Interrupt Rising Edge Enable Register 0 (EGP0)
*/
/* INTPn pin valid edge selection (EGPn) */
#define _01_INTP0_EDGE_RISING_SEL (0x01U) /* rising edge selected for INTP0 pin */
#define _00_INTP0_EDGE_RISING_UNSEL (0x00U) /* rising edge not selected for INTP0 pin */
#define _02_INTP1_EDGE_RISING_SEL (0x02U) /* rising edge selected for INTP1 pin */
#define _00_INTP1_EDGE_RISING_UNSEL (0x00U) /* rising edge not selected for INTP1 pin*/
#define _04_INTP2_EDGE_RISING_SEL (0x04U) /* rising edge selected for INTP2 pin */
#define _00_INTP2_EDGE_RISING_UNSEL (0x00U) /* rising edge not selected for INTP2 pin */
#define _08_INTP3_EDGE_RISING_SEL (0x08U) /* rising edge selected for INTP3 pin */
#define _00_INTP3_EDGE_RISING_UNSEL (0x00U) /* rising edge not selected for INTP3 pin */
#define _10_INTP4_EDGE_RISING_SEL (0x10U) /* rising edge selected for INTP4 pin */
#define _00_INTP4_EDGE_RISING_UNSEL (0x00U) /* rising edge not selected for INTP4 pin */
#define _20_INTP5_EDGE_RISING_SEL (0x20U) /* rising edge selected for INTP5 pin */
#define _00_INTP5_EDGE_RISING_UNSEL (0x00U) /* rising edge not selected for INTP5 pin */
#define _40_INTP6_EDGE_RISING_SEL (0x40U) /* rising edge selected for INTP6 pin */
#define _00_INTP6_EDGE_RISING_UNSEL (0x00U) /* rising edge not selected for INTP6 pin */
#define _80_INTP7_EDGE_RISING_SEL (0x80U) /* rising edge selected for INTP7 pin */
#define _00_INTP7_EDGE_RISING_UNSEL (0x00U) /* rising edge not selected for INTP7 pin */
/*
External Interrupt Falling Edge Enable Register 0 (EGN0)
*/
/* INTPn pin valid edge selection (EGNn) */
#define _01_INTP0_EDGE_FALLING_SEL (0x01U) /* falling edge selected for INTP0 pin */
#define _00_INTP0_EDGE_FALLING_UNSEL (0x00U) /* falling edge not selected for INTP0 pin */
#define _02_INTP1_EDGE_FALLING_SEL (0x02U) /* falling edge selected for INTP1 pin */
#define _00_INTP1_EDGE_FALLING_UNSEL (0x00U) /* falling edge not selected for INTP1 pin */
#define _04_INTP2_EDGE_FALLING_SEL (0x04U) /* falling edge selected for INTP2 pin */
#define _00_INTP2_EDGE_FALLING_UNSEL (0x00U) /* falling edge not selected for INTP2 pin */
#define _08_INTP3_EDGE_FALLING_SEL (0x08U) /* falling edge selected for INTP3 pin */
#define _00_INTP3_EDGE_FALLING_UNSEL (0x00U) /* falling edge not selected for INTP3 pin */
#define _10_INTP4_EDGE_FALLING_SEL (0x10U) /* falling edge selected for INTP4 pin */
#define _00_INTP4_EDGE_FALLING_UNSEL (0x00U) /* falling edge not selected for INTP4 pin */
#define _20_INTP5_EDGE_FALLING_SEL (0x20U) /* falling edge selected for INTP5 pin */
#define _00_INTP5_EDGE_FALLING_UNSEL (0x00U) /* falling edge not selected for INTP5 pin */
#define _40_INTP6_EDGE_FALLING_SEL (0x40U) /* falling edge selected for INTP6 pin */
#define _00_INTP6_EDGE_FALLING_UNSEL (0x00U) /* falling edge not selected for INTP6 pin */
#define _80_INTP7_EDGE_FALLING_SEL (0x80U) /* falling edge selected for INTP7 pin */
#define _00_INTP7_EDGE_FALLING_UNSEL (0x00U) /* falling edge not selected for INTP7 pin */
/*
External Interrupt Rising Edge Enable Register 1 (EGP1)
*/
/* INTPn pin valid edge selection (EGPn) */
#define _01_INTP8_EDGE_RISING_SEL (0x01U) /* rising edge selected for INTP8 pin */
#define _00_INTP8_EDGE_RISING_UNSEL (0x00U) /* rising edge not selected for INTP8 pin */
#define _02_INTP9_EDGE_RISING_SEL (0x02U) /* rising edge selected for INTP9 pin */
#define _00_INTP9_EDGE_RISING_UNSEL (0x00U) /* rising edge not selected for INTP9 pin*/
/*
External Interrupt Falling Edge Enable Register 1 (EGN1)
*/
/* INTPn pin valid edge selection (EGNn) */
#define _01_INTP8_EDGE_FALLING_SEL (0x01U) /* falling edge selected for INTP8 pin */
#define _00_INTP8_EDGE_FALLING_UNSEL (0x00U) /* falling edge not selected for INTP8 pin */
#define _02_INTP9_EDGE_FALLING_SEL (0x02U) /* falling edge selected for INTP9 pin */
#define _00_INTP9_EDGE_FALLING_UNSEL (0x00U) /* falling edge not selected for INTP9 pin */
/*
Interrupt Mask Register (INTMSK)
*/
#define _F8_INTP_INTMSK_INIT_VALUE (0xF8U) /* set INTMSK initial value */
/* Setting masking for INTP4 interrupt source to the interrupt control circuit INTMSK0 */
#define _01_INTP4_CONTROL_DISABLE (0x01U) /* requests to the interrupt control circuit are disabled */
#define _00_INTP4_CONTROL_ENABLE (0x00U) /* requests to the interrupt control circuit, ELC, and DTC are enabled */
/* Setting masking for INTP5 interrupt source to the interrupt control circuit INTMSK1 */
#define _02_INTP5_CONTROL_DISABLE (0x02U) /* requests to the interrupt control circuit are disabled, and requests */
#define _00_INTP5_CONTROL_ENABLE (0x00U) /* requests to the interrupt control circuit, ELC, and DTC are enabled */
/* Setting masking for INTP6 interrupt source to the interrupt control circuit INTMSK1 */
#define _04_INTP6_CONTROL_DISABLE (0x04U) /* requests to the interrupt control circuit are disabled, and requests */
#define _00_INTP6_CONTROL_ENABLE (0x00U) /* requests to the interrupt control circuit, ELC, and DTC are enabled */
/*
Key Return Mode Register (KRM)
*/
/* Key interrupt mode control (KRM0) */
#define _00_KR0_SIGNAL_DETECT_OFF (0x00U) /* not detect KR0 signal */
#define _01_KR0_SIGNAL_DETECT_ON (0x01U) /* detect KR0 signal */
/* Key interrupt mode control (KRM1) */
#define _00_KR1_SIGNAL_DETECT_OFF (0x00U) /* not detect KR1 signal */
#define _02_KR1_SIGNAL_DETECT_ON (0x02U) /* detect KR1 signal */
/* Key interrupt mode control (KRM2) */
#define _00_KR2_SIGNAL_DETECT_OFF (0x00U) /* not detect KR2 signal */
#define _04_KR2_SIGNAL_DETECT_ON (0x04U) /* detect KR2 signal */
/* Key interrupt mode control (KRM3) */
#define _00_KR3_SIGNAL_DETECT_OFF (0x00U) /* not detect KR3 signal */
#define _08_KR3_SIGNAL_DETECT_ON (0x08U) /* detect KR3 signal */
/***********************************************************************************************************************
Macro definitions
***********************************************************************************************************************/
/***********************************************************************************************************************
Typedef definitions
***********************************************************************************************************************/
/***********************************************************************************************************************
Global functions
***********************************************************************************************************************/
void R_INTC_Create(void);
/* Start user code for function. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
#endif

51
ECU_APP/r_cg_intc_user.c Normal file
View File

@ -0,0 +1,51 @@
/***********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2012, 2021 Renesas Electronics Corporation. All rights reserved.
***********************************************************************************************************************/
/***********************************************************************************************************************
* File Name : r_cg_intc_user.c
* Version : CodeGenerator for RL78/F13 V2.03.07.02 [08 Nov 2021]
* Device(s) : R5F10BGG
* Tool-Chain : CCRL
* Description : This file implements device driver for INTC module.
* Creation Date: 2023-05-03
***********************************************************************************************************************/
/***********************************************************************************************************************
Includes
***********************************************************************************************************************/
#include "r_cg_macrodriver.h"
#include "r_cg_intc.h"
/* Start user code for include. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
#include "r_cg_userdefine.h"
/***********************************************************************************************************************
Pragma directive
***********************************************************************************************************************/
/* Start user code for pragma. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
Global variables and functions
***********************************************************************************************************************/
/* Start user code for global. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
/* Start user code for adding. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */

View File

@ -0,0 +1,89 @@
/***********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2012, 2021 Renesas Electronics Corporation. All rights reserved.
***********************************************************************************************************************/
/***********************************************************************************************************************
* File Name : r_cg_macrodriver.h
* Version : CodeGenerator for RL78/F13 V2.03.07.02 [08 Nov 2021]
* Device(s) : R5F10BBG
* Tool-Chain : CCRL
* Description : This file implements general head file.
* Creation Date: 2023-08-18
***********************************************************************************************************************/
#ifndef STATUS_H
#define STATUS_H
/***********************************************************************************************************************
Includes
***********************************************************************************************************************/
#include "iodefine.h"
/***********************************************************************************************************************
Macro definitions (Register bit)
***********************************************************************************************************************/
/***********************************************************************************************************************
Macro definitions
***********************************************************************************************************************/
#ifndef __TYPEDEF__
#define DI __DI
#define EI __EI
#define HALT __halt
#define NOP __nop
#define STOP __stop
#define BRK __brk
/* Status list definition */
#define MD_STATUSBASE 0x00U
#define MD_OK (MD_STATUSBASE + 0x00U) /* register setting OK */
#define MD_SPT (MD_STATUSBASE + 0x01U) /* IIC stop */
#define MD_NACK (MD_STATUSBASE + 0x02U) /* IIC no ACK */
#define MD_BUSY1 (MD_STATUSBASE + 0x03U) /* busy 1 */
#define MD_BUSY2 (MD_STATUSBASE + 0x04U) /* busy 2 */
#define MD_OVERRUN (MD_STATUSBASE + 0x05U) /* IIC OVERRUN occur */
/* Error list definition */
#define MD_ERRORBASE 0x80U
#define MD_ERROR (MD_ERRORBASE + 0x00U) /* error */
#define MD_ARGERROR (MD_ERRORBASE + 0x01U) /* error agrument input error */
#define MD_ERROR1 (MD_ERRORBASE + 0x02U) /* error 1 */
#define MD_ERROR2 (MD_ERRORBASE + 0x03U) /* error 2 */
#define MD_ERROR3 (MD_ERRORBASE + 0x04U) /* error 3 */
#define MD_ERROR4 (MD_ERRORBASE + 0x05U) /* error 4 */
#define MD_DATAEXISTS (MD_ERRORBASE + 0x06U) /* data to be transferred next exists in TXBn register */
#endif
/***********************************************************************************************************************
Typedef definitions
***********************************************************************************************************************/
#ifndef __TYPEDEF__
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef signed short int16_t;
typedef unsigned short uint16_t;
typedef signed long int32_t;
typedef unsigned long uint32_t;
typedef unsigned short MD_STATUS;
#define __TYPEDEF__
#endif
/***********************************************************************************************************************
Global functions
***********************************************************************************************************************/
#endif

74
ECU_APP/r_cg_port.c Normal file
View File

@ -0,0 +1,74 @@
/***********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2012, 2021 Renesas Electronics Corporation. All rights reserved.
***********************************************************************************************************************/
/***********************************************************************************************************************
* File Name : r_cg_port.c
* Version : CodeGenerator for RL78/F13 V2.03.07.02 [08 Nov 2021]
* Device(s) : R5F10BBG
* Tool-Chain : CCRL
* Description : This file implements device driver for PORT module.
* Creation Date: 2023-08-18
***********************************************************************************************************************/
/***********************************************************************************************************************
Includes
***********************************************************************************************************************/
#include "r_cg_macrodriver.h"
#include "r_cg_port.h"
/* Start user code for include. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
#include "r_cg_userdefine.h"
/***********************************************************************************************************************
Pragma directive
***********************************************************************************************************************/
/* Start user code for pragma. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
Global variables and functions
***********************************************************************************************************************/
/* Start user code for global. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
* Function Name: R_PORT_Create
* Description : This function initializes the Port I/O.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_PORT_Create(void)
{
P1 = _00_Pn2_OUTPUT_0;
PU4 = _00_PUn0_PULLUP_OFF;
PMC12 = _00_PMCn0_DI_ON | _00_PMCn5_DI_ON | _DE_PMC12_DEFAULT;
PSRSEL = _00_PSR120_NORMAL | _00_PSR30_NORMAL | _00_PSR12_NORMAL;
ADPC = _02_ADPC_DI_ON;
PM1 = _01_PMn0_NOT_USE | _02_PMn1_NOT_USE | _00_PMn2_MODE_OUTPUT | _08_PMn3_NOT_USE | _10_PMn4_NOT_USE |
_20_PMn5_NOT_USE | _40_PMn6_MODE_INPUT | _80_PMn7_MODE_INPUT;
PM3 = _01_PMn0_MODE_INPUT | _08_PMn3_NOT_USE | _10_PMn4_MODE_INPUT | _E6_PM3_DEFAULT;
PM4 = _01_PMn0_NOT_USE | _02_PMn1_MODE_INPUT | _FC_PM4_DEFAULT;
PM6 = _01_PMn0_MODE_INPUT | _02_PMn1_MODE_INPUT | _04_PMn2_MODE_INPUT | _08_PMn3_MODE_INPUT | _F0_PM6_DEFAULT;
PM8 = _01_PMn0_MODE_INPUT | _02_PMn1_MODE_INPUT | _04_PMn2_MODE_INPUT | _08_PMn3_MODE_INPUT | _10_PMn4_MODE_INPUT |
_20_PMn5_MODE_INPUT | _C0_PM8_DEFAULT;
PM12 = _01_PMn0_MODE_INPUT | _20_PMn5_MODE_INPUT | _DE_PM12_DEFAULT;
}
/* Start user code for adding. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */

249
ECU_APP/r_cg_port.h Normal file
View File

@ -0,0 +1,249 @@
/***********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2012, 2021 Renesas Electronics Corporation. All rights reserved.
***********************************************************************************************************************/
/***********************************************************************************************************************
* File Name : r_cg_port.h
* Version : CodeGenerator for RL78/F13 V2.03.07.02 [08 Nov 2021]
* Device(s) : R5F10BBG
* Tool-Chain : CCRL
* Description : This file implements device driver for PORT module.
* Creation Date: 2023-08-18
***********************************************************************************************************************/
#ifndef PORT_H
#define PORT_H
/***********************************************************************************************************************
Macro definitions (Register bit)
***********************************************************************************************************************/
/*
Port Mode Register (PMm)
*/
/* Pmn pin I/O mode selection (PMm7 - PMm0) */
#define _01_PMn0_NOT_USE (0x01U) /* not use Pn0 as digital I/O */
#define _01_PMn0_MODE_INPUT (0x01U) /* use Pn0 as input mode */
#define _00_PMn0_MODE_OUTPUT (0x00U) /* use Pn0 as output mode */
#define _02_PMn1_NOT_USE (0x02U) /* not use Pn1 as digital I/O */
#define _02_PMn1_MODE_INPUT (0x02U) /* use Pn1 as input mode */
#define _00_PMn1_MODE_OUTPUT (0x00U) /* use Pn1 as output mode */
#define _04_PMn2_NOT_USE (0x04U) /* not use Pn2 as digital I/O */
#define _04_PMn2_MODE_INPUT (0x04U) /* use Pn2 as input mode */
#define _00_PMn2_MODE_OUTPUT (0x00U) /* use Pn2 as output mode */
#define _08_PMn3_NOT_USE (0x08U) /* not use Pn3 as digital I/O */
#define _08_PMn3_MODE_INPUT (0x08U) /* use Pn3 as input mode */
#define _00_PMn3_MODE_OUTPUT (0x00U) /* use Pn3 as output mode */
#define _10_PMn4_NOT_USE (0x10U) /* not use Pn4 as digital I/O */
#define _10_PMn4_MODE_INPUT (0x10U) /* use Pn4 as input mode */
#define _00_PMn4_MODE_OUTPUT (0x00U) /* use Pn4 as output mode */
#define _20_PMn5_NOT_USE (0x20U) /* not use Pn5 as digital I/O */
#define _20_PMn5_MODE_INPUT (0x20U) /* use Pn5 as input mode */
#define _00_PMn5_MODE_OUTPUT (0x00U) /* use Pn5 as output mode */
#define _40_PMn6_NOT_USE (0x40U) /* not use Pn6 as digital I/O */
#define _40_PMn6_MODE_INPUT (0x40U) /* use Pn6 as input mode */
#define _00_PMn6_MODE_OUTPUT (0x00U) /* use Pn6 as output mode */
#define _80_PMn7_NOT_USE (0x80U) /* not use Pn7 as digital I/O */
#define _80_PMn7_MODE_INPUT (0x80U) /* use Pn7 as input mode */
#define _00_PMn7_MODE_OUTPUT (0x00U) /* use Pn7 as output mode */
/*
Port Register (Pm)
*/
/* Pmn pin data (Pm0 to Pm7) */
#define _00_Pn0_OUTPUT_0 (0x00U) /* Pn0 output 0 */
#define _01_Pn0_OUTPUT_1 (0x01U) /* Pn0 output 1 */
#define _00_Pn1_OUTPUT_0 (0x00U) /* Pn1 output 0 */
#define _02_Pn1_OUTPUT_1 (0x02U) /* Pn1 output 1 */
#define _00_Pn2_OUTPUT_0 (0x00U) /* Pn2 output 0 */
#define _04_Pn2_OUTPUT_1 (0x04U) /* Pn2 output 1 */
#define _00_Pn3_OUTPUT_0 (0x00U) /* Pn3 output 0 */
#define _08_Pn3_OUTPUT_1 (0x08U) /* Pn3 output 1 */
#define _00_Pn4_OUTPUT_0 (0x00U) /* Pn4 output 0 */
#define _10_Pn4_OUTPUT_1 (0x10U) /* Pn4 output 1 */
#define _00_Pn5_OUTPUT_0 (0x00U) /* Pn5 output 0 */
#define _20_Pn5_OUTPUT_1 (0x20U) /* Pn5 output 1 */
#define _00_Pn6_OUTPUT_0 (0x00U) /* Pn6 output 0 */
#define _40_Pn6_OUTPUT_1 (0x40U) /* Pn6 output 1 */
#define _00_Pn7_OUTPUT_0 (0x00U) /* Pn7 output 0 */
#define _80_Pn7_OUTPUT_1 (0x80U) /* Pn7 output 1 */
/*
Pull-up Resistor Option Register (PUm)
*/
/* Pmn pin on-chip pull-up resistor selection (PUmn) */
#define _00_PUn0_PULLUP_OFF (0x00U) /* Pn0 pull-up resistor not connected */
#define _01_PUn0_PULLUP_ON (0x01U) /* Pn0 pull-up resistor connected */
#define _00_PUn1_PULLUP_OFF (0x00U) /* Pn1 pull-up resistor not connected */
#define _02_PUn1_PULLUP_ON (0x02U) /* Pn1 pull-up resistor connected */
#define _00_PUn2_PULLUP_OFF (0x00U) /* Pn2 Pull-up resistor not connected */
#define _04_PUn2_PULLUP_ON (0x04U) /* Pn2 pull-up resistor connected */
#define _00_PUn3_PULLUP_OFF (0x00U) /* Pn3 pull-up resistor not connected */
#define _08_PUn3_PULLUP_ON (0x08U) /* Pn3 pull-up resistor connected */
#define _00_PUn4_PULLUP_OFF (0x00U) /* Pn4 pull-up resistor not connected */
#define _10_PUn4_PULLUP_ON (0x10U) /* Pn4 pull-up resistor connected */
#define _00_PUn5_PULLUP_OFF (0x00U) /* Pn5 pull-up resistor not connected */
#define _20_PUn5_PULLUP_ON (0x20U) /* Pn5 pull-up resistor connected */
#define _00_PUn6_PULLUP_OFF (0x00U) /* Pn6 pull-up resistor not connected */
#define _40_PUn6_PULLUP_ON (0x40U) /* Pn6 pull-up resistor connected */
#define _00_PUn7_PULLUP_OFF (0x00U) /* Pn7 pull-up resistor not connected */
#define _80_PUn7_PULLUP_ON (0x80U) /* Pn7 pull-up resistor connected */
/*
Port Input Mode Register (PIMm)
*/
/* Pmn pin input buffer selection (PIMmn) */
#define _00_PIMn0_TTL_OFF (0x00U) /* set Pn0 normal input buffer */
#define _01_PIMn0_TTL_ON (0x01U) /* set Pn0 TTL input buffer */
#define _00_PIMn1_TTL_OFF (0x00U) /* set Pn1 normal input buffer */
#define _02_PIMn1_TTL_ON (0x02U) /* set Pn1 TTL input buffer */
#define _00_PIMn2_TTL_OFF (0x00U) /* set Pn2 normal input buffer */
#define _04_PIMn2_TTL_ON (0x04U) /* set Pn2 TTL input buffer */
#define _00_PIMn3_TTL_OFF (0x00U) /* set Pn3 normal input buffer */
#define _08_PIMn3_TTL_ON (0x08U) /* set Pn3 TTL input buffer */
#define _00_PIMn4_TTL_OFF (0x00U) /* set Pn4 normal input buffer */
#define _10_PIMn4_TTL_ON (0x10U) /* set Pn4 TTL input buffer */
#define _00_PIMn5_TTL_OFF (0x00U) /* set Pn5 normal input buffer */
#define _20_PIMn5_TTL_ON (0x20U) /* set Pn5 TTL input buffer */
#define _00_PIMn6_TTL_OFF (0x00U) /* set Pn6 normal input buffer */
#define _40_PIMn6_TTL_ON (0x40U) /* set Pn6 TTL input buffer */
#define _00_PIMn7_TTL_OFF (0x00U) /* set Pn7 normal input buffer */
#define _80_PIMn7_TTL_ON (0x80U) /* set Pn7 TTL input buffer */
/*
Port Input Threshold Control Register (PITHLm)
*/
/* Pmn pin input threshold selection (PITHLmn) */
#define _00_PITHLn0_SCHMITT3_OFF (0x00U) /* set Pn0 schmitt 1 input (default) */
#define _01_PITHLn0_SCHMITT3_ON (0x01U) /* set Pn0 schmitt 3 input */
#define _00_PITHLn1_SCHMITT3_OFF (0x00U) /* set Pn1 schmitt 1 input (default) */
#define _02_PITHLn1_SCHMITT3_ON (0x02U) /* set Pn1 schmitt 3 input */
#define _00_PITHLn2_SCHMITT3_OFF (0x00U) /* set Pn2 schmitt 1 input (default) */
#define _04_PITHLn2_SCHMITT3_ON (0x04U) /* set Pn2 schmitt 3 input */
#define _00_PITHLn3_SCHMITT3_OFF (0x00U) /* set Pn3 schmitt 1 input (default) */
#define _08_PITHLn3_SCHMITT3_ON (0x08U) /* set Pn3 schmitt 3 input */
#define _00_PITHLn4_SCHMITT3_OFF (0x00U) /* set Pn4 schmitt 1 input (default) */
#define _10_PITHLn4_SCHMITT3_ON (0x10U) /* set Pn4 schmitt 3 input */
#define _00_PITHLn5_SCHMITT3_OFF (0x00U) /* set Pn5 schmitt 1 input (default) */
#define _20_PITHLn5_SCHMITT3_ON (0x20U) /* set Pn5 schmitt 3 input */
#define _00_PITHLn6_SCHMITT3_OFF (0x00U) /* set Pn6 schmitt 1 input (default) */
#define _40_PITHLn6_SCHMITT3_ON (0x40U) /* set Pn6 schmitt 3 input */
#define _00_PITHLn7_SCHMITT3_OFF (0x00U) /* set Pn7 schmitt 1 input (default) */
#define _80_PITHLn7_SCHMITT3_ON (0x80U) /* set Pn7 schmitt 3 input */
/*
Port Output Mode Register (POMm)
*/
/* Pmn pin output mode selection (POMmn) */
#define _00_POMn0_NCH_OFF (0x00U) /* set Pn0 output normal mode */
#define _01_POMn0_NCH_ON (0x01U) /* set Pn0 output N-ch open-drain mode */
#define _00_POMn1_NCH_OFF (0x00U) /* set Pn1 output normal mode */
#define _02_POMn1_NCH_ON (0x02U) /* set Pn1 output N-ch open-drain mode */
#define _00_POMn2_NCH_OFF (0x00U) /* set Pn2 output normal mode */
#define _04_POMn2_NCH_ON (0x04U) /* set Pn2 output N-ch open-drain mode */
#define _00_POMn3_NCH_OFF (0x00U) /* set Pn3 output normal mode */
#define _08_POMn3_NCH_ON (0x08U) /* set Pn3 output N-ch open-drain mode */
#define _00_POMn4_NCH_OFF (0x00U) /* set Pn4 output normal mode */
#define _10_POMn4_NCH_ON (0x10U) /* set Pn4 output N-ch open-drain mode */
#define _00_POMn5_NCH_OFF (0x00U) /* set Pn5 output normal mode */
#define _20_POMn5_NCH_ON (0x20U) /* set Pn5 output N-ch open-drain mode */
#define _00_POMn6_NCH_OFF (0x00U) /* set Pn6 output normal mode */
#define _40_POMn6_NCH_ON (0x40U) /* set Pn6 output N-ch open-drain mode */
#define _00_POMn7_NCH_OFF (0x00U) /* set Pn7 output normal mode */
#define _80_POMn7_NCH_ON (0x80U) /* set Pn7 output N-ch open-drain mode */
/*
Port Operation Mode Register (PMCm)
*/
/* Pmn pin digital input buffer selection (PMCmn) */
#define _01_PMCn0_NOT_USE (0x01U) /* not use Pn0 digital input */
#define _00_PMCn0_DI_ON (0x00U) /* enable Pn0 digital input */
#define _02_PMCn1_NOT_USE (0x02U) /* not use Pn1 digital input */
#define _00_PMCn1_DI_ON (0x00U) /* enable Pn1 digital input */
#define _04_PMCn2_NOT_USE (0x04U) /* not use Pn2 digital input */
#define _00_PMCn2_DI_ON (0x00U) /* enable Pn2 digital input */
#define _08_PMCn3_NOT_USE (0x08U) /* not use Pn3 digital input */
#define _00_PMCn3_DI_ON (0x00U) /* enable Pn3 digital input */
#define _10_PMCn4_NOT_USE (0x10U) /* not use Pn4 digital input */
#define _00_PMCn4_DI_ON (0x00U) /* enable Pn4 digital input */
#define _20_PMCn5_NOT_USE (0x20U) /* not use Pn5 digital input */
#define _00_PMCn5_DI_ON (0x00U) /* enable Pn5 digital input */
#define _40_PMCn6_NOT_USE (0x40U) /* not use Pn6 digital input */
#define _00_PMCn6_DI_ON (0x00U) /* enable Pn6 digital input */
#define _80_PMCn7_NOT_USE (0x80U) /* not use Pn7 digital input */
#define _00_PMCn7_DI_ON (0x00U) /* enable Pn7 digital input */
/*
Port output slew rate select register (PSRSEL)
*/
/* P140/PCLBUZ0 pin output mode selection (PSR140) */
#define _00_PSR140_NORMAL (0x00U) /* normal mode (5 V/5 ns) */
#define _20_PSR140_SLOW (0x20U) /* slow mode (25 V/5 ns (target) (TYP.)) */
/* P14/SCK01/SCL01/TO06/TRDIOC0 pin output mode selection (PSR14) */
#define _00_PSR14_NORMAL (0x00U) /* normal mode (5 V/5 ns) */
#define _10_PSR14_SLOW (0x10U) /* slow mode (25 V/5 ns (target) (TYP.)) */
/* P120/SO01/TO07/TRDIOD0 pin output mode selection (PSR120) */
#define _00_PSR120_NORMAL (0x00U) /* normal mode (5 V/5 ns) */
#define _08_PSR120_SLOW (0x08U) /* slow mode (25 V/5 ns (target) (TYP.)) */
/* P30/TO01/TRDIOD1/SNZOUT0 pin output mode selection (PSR30) */
#define _00_PSR30_NORMAL (0x00U) /* normal mode (5 V/5 ns) */
#define _04_PSR30_SLOW (0x04U) /* slow mode (25 V/5 ns (target) (TYP.)) */
/* P12/SO10/TO11/(TRDIOD0)/TXD1/SNZOUT3 pin output mode selection (PSR12) */
#define _00_PSR12_NORMAL (0x00U) /* normal mode (5 V/5 ns) */
#define _02_PSR12_SLOW (0x02U) /* slow mode (25 V/5 ns (target) (TYP.)) */
/* P10/SCK10/TO13/TRJO0/SCL10/LTXD1/CTXD0 pin output mode selection (PSR10) */
#define _00_PSR10_NORMAL (0x00U) /* normal mode (5 V/5 ns) */
#define _01_PSR10_SLOW (0x01U) /* slow mode (25 V/5 ns (target) (TYP.)) */
/*
AD port configuration register (ADPC)
*/
/* Analog input/digital input switching (ADPC4 - ADPC0) */
#define _00_ADPC_DI_OFF (0x00U) /* use P33, P34, P80 - P85 as analog input */
#define _08_ADPC_DI_ON (0x08U) /* use P85 as digital input */
#define _07_ADPC_DI_ON (0x07U) /* use P84 - P85 as digital input */
#define _06_ADPC_DI_ON (0x06U) /* use P83 - P85 as digital input */
#define _05_ADPC_DI_ON (0x05U) /* use P82 - P85 as digital input */
#define _04_ADPC_DI_ON (0x04U) /* use P81 - P85 as digital input */
#define _03_ADPC_DI_ON (0x03U) /* use P80 - P85 as digital input */
#define _02_ADPC_DI_ON (0x02U) /* use P34, P80 - P85 as digital input */
#define _01_ADPC_DI_ON (0x01U) /* use P33, P34, P85 as digital input */
/***********************************************************************************************************************
Macro definitions
***********************************************************************************************************************/
#define _E6_PM3_DEFAULT (0xE6U) /* PM3 default value */
#define _FC_PM4_DEFAULT (0xFCU) /* PM4 default value */
#define _F0_PM6_DEFAULT (0xF0U) /* PM6 default value */
#define _C0_PM8_DEFAULT (0xC0U) /* PM8 default value */
#define _DE_PM12_DEFAULT (0xDEU) /* PM12 default value */
#define _DE_PMC12_DEFAULT (0xDEU) /* PMC12 default value */
/***********************************************************************************************************************
Typedef definitions
***********************************************************************************************************************/
/***********************************************************************************************************************
Global functions
***********************************************************************************************************************/
void R_PORT_Create(void);
/* Start user code for function. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
#endif

51
ECU_APP/r_cg_port_user.c Normal file
View File

@ -0,0 +1,51 @@
/***********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2012, 2021 Renesas Electronics Corporation. All rights reserved.
***********************************************************************************************************************/
/***********************************************************************************************************************
* File Name : r_cg_port_user.c
* Version : CodeGenerator for RL78/F13 V2.03.07.02 [08 Nov 2021]
* Device(s) : R5F10BBG
* Tool-Chain : CCRL
* Description : This file implements device driver for PORT module.
* Creation Date: 2023-08-18
***********************************************************************************************************************/
/***********************************************************************************************************************
Includes
***********************************************************************************************************************/
#include "r_cg_macrodriver.h"
#include "r_cg_port.h"
/* Start user code for include. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
#include "r_cg_userdefine.h"
/***********************************************************************************************************************
Pragma directive
***********************************************************************************************************************/
/* Start user code for pragma. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
Global variables and functions
***********************************************************************************************************************/
/* Start user code for global. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
/* Start user code for adding. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */

223
ECU_APP/r_cg_serial.c Normal file
View File

@ -0,0 +1,223 @@
/***********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2012, 2021 Renesas Electronics Corporation. All rights reserved.
***********************************************************************************************************************/
/***********************************************************************************************************************
* File Name : r_cg_serial.c
* Version : CodeGenerator for RL78/F13 V2.03.07.02 [08 Nov 2021]
* Device(s) : R5F10BGG
* Tool-Chain : CCRL
* Description : This file implements device driver for Serial module.
* Creation Date: 2022/7/5
***********************************************************************************************************************/
/***********************************************************************************************************************
Includes
***********************************************************************************************************************/
#include "r_cg_macrodriver.h"
#include "r_cg_serial.h"
/* Start user code for include. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
#include "r_cg_userdefine.h"
/***********************************************************************************************************************
Pragma directive
***********************************************************************************************************************/
/* Start user code for pragma. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
Global variables and functions
***********************************************************************************************************************/
volatile uint8_t g_iica0_master_status_flag; /* iica0 master flag */
volatile uint8_t g_iica0_slave_status_flag; /* iica0 slave flag */
volatile uint8_t * gp_iica0_rx_address; /* iica0 receive buffer address */
volatile uint16_t g_iica0_rx_len; /* iica0 receive data length */
volatile uint16_t g_iica0_rx_cnt; /* iica0 receive data count */
volatile uint8_t * gp_iica0_tx_address; /* iica0 send buffer address */
volatile uint16_t g_iica0_tx_cnt; /* iica0 send data count */
/* Start user code for global. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
* Function Name: R_IICA0_Create
* Description : This function initializes the IICA0 module.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_IICA0_Create(void)
{
IICA0EN = 1U; /* supply IICA0 clock */
IICE0 = 0U; /* disable IICA0 operation */
IICAMK0 = 1U; /* disable INTIICA0 interrupt */
IICAIF0 = 0U; /* clear INTIICA0 interrupt flag */
/* Set INTIICA0 high priority */
IICAPR10 = 0U;
IICAPR00 = 0U;
/* Set SCLA0, SDAA0 pin */
P6 &= 0xF3U;
PM6 |= 0x0CU;
SMC0 = 1U;
IICWL0 = _15_IICA0_IICWL_VALUE;
IICWH0 = _14_IICA0_IICWH_VALUE;
DFC0 = 0U; /* digital filter off */
IICCTL01 |= _01_IICA_fCLK_HALF;
SVA0 = _38_IICA0_MASTERADDRESS;
STCEN0 = 1U;
IICRSV0 = 1U;
SPIE0 = 0U;
WTIM0 = 1U;
ACKE0 = 1U;
IICAMK0 = 0U;
IICE0 = 1U;
LREL0 = 1U;
/* Set SCLA0, SDAA0 pin */
PM6 &= 0xF3U;
}
/***********************************************************************************************************************
* Function Name: R_IICA0_Stop
* Description : This function stops IICA0 module operation.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_IICA0_Stop(void)
{
IICE0 = 0U; /* disable IICA0 operation */
}
/***********************************************************************************************************************
* Function Name: R_IICA0_StopCondition
* Description : This function sets IICA0 stop condition flag.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_IICA0_StopCondition(void)
{
SPT0 = 1U; /* set stop condition flag */
}
/***********************************************************************************************************************
* Function Name: R_IICA0_Master_Send
* Description : This function starts to send data as master mode.
* Arguments : adr -
* send address
* tx_buf -
* transfer buffer pointer
* tx_num -
* buffer size
* wait -
* wait for start condition
* Return Value : status -
* MD_OK or MD_ERROR1 or MD_ERROR2
***********************************************************************************************************************/
MD_STATUS R_IICA0_Master_Send(uint8_t adr, uint8_t * const tx_buf, uint16_t tx_num, uint8_t wait)
{
MD_STATUS status = MD_OK;
IICAMK0 = 1U; /* disable INTIICA0 interrupt */
if ((1U == IICBSY0) && (0U == MSTS0))
{
/* Check bus busy */
IICAMK0 = 0U; /* enable INTIICA0 interrupt */
status = MD_ERROR1;
}
else
{
STT0 = 1U; /* send IICA0 start condition */
IICAMK0 = 0U; /* enable INTIICA0 interrupt */
/* Wait */
while (wait--)
{
;
}
if (0U == STD0)
{
status = MD_ERROR2;
}
/* Set parameter */
g_iica0_tx_cnt = tx_num;
gp_iica0_tx_address = tx_buf;
g_iica0_master_status_flag = _00_IICA_MASTER_FLAG_CLEAR;
adr &= (uint8_t)~0x01U; /* set send mode */
IICA0 = adr; /* send address */
}
return (status);
}
/***********************************************************************************************************************
* Function Name: R_IICA0_Master_Receive
* Description : This function starts to receive IICA0 data as master mode.
* Arguments : adr -
* receive address
* rx_buf -
* receive buffer pointer
* rx_num -
* buffer size
* wait -
* wait for start condition
* Return Value : status -
* MD_OK or MD_ERROR1 or MD_ERROR2
***********************************************************************************************************************/
MD_STATUS R_IICA0_Master_Receive(uint8_t adr, uint8_t * const rx_buf, uint16_t rx_num, uint8_t wait)
{
MD_STATUS status = MD_OK;
IICAMK0 = 1U; /* disable INTIIA0 interrupt */
if ((1U == IICBSY0) && (0U == MSTS0))
{
/* Check bus busy */
IICAMK0 = 0U; /* enable INTIIA0 interrupt */
status = MD_ERROR1;
}
else
{
STT0 = 1U; /* set IICA0 start condition */
IICAMK0 = 0U; /* enable INTIIA0 interrupt */
/* Wait */
while (wait--)
{
;
}
if (0U == STD0)
{
status = MD_ERROR2;
}
/* Set parameter */
g_iica0_rx_len = rx_num;
g_iica0_rx_cnt = 0U;
gp_iica0_rx_address = rx_buf;
g_iica0_master_status_flag = _00_IICA_MASTER_FLAG_CLEAR;
adr |= 0x01U; /* set receive mode */
IICA0 = adr; /* receive address */
}
return (status);
}
/* Start user code for adding. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */

375
ECU_APP/r_cg_serial.h Normal file
View File

@ -0,0 +1,375 @@
/***********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2012, 2021 Renesas Electronics Corporation. All rights reserved.
***********************************************************************************************************************/
/***********************************************************************************************************************
* File Name : r_cg_serial.h
* Version : CodeGenerator for RL78/F13 V2.03.07.02 [08 Nov 2021]
* Device(s) : R5F10BGG
* Tool-Chain : CCRL
* Description : This file implements device driver for Serial module.
* Creation Date: 2022/7/5
***********************************************************************************************************************/
#ifndef SERIAL_H
#define SERIAL_H
/***********************************************************************************************************************
Macro definitions (Register bit)
***********************************************************************************************************************/
/*
Serial Clock Select Register m (SPSm)
*/
/* Section of operation clock (CKm0) (PRSm03 - PRSm00) */
#define _0000_SAU_CK00_FCLK_0 (0x0000U) /* ck00 - fCLK */
#define _0001_SAU_CK00_FCLK_1 (0x0001U) /* ck00 - fCLK/2^1 */
#define _0002_SAU_CK00_FCLK_2 (0x0002U) /* ck00 - fCLK/2^2 */
#define _0003_SAU_CK00_FCLK_3 (0x0003U) /* ck00 - fCLK/2^3 */
#define _0004_SAU_CK00_FCLK_4 (0x0004U) /* ck00 - fCLK/2^4 */
#define _0005_SAU_CK00_FCLK_5 (0x0005U) /* ck00 - fCLK/2^5 */
#define _0006_SAU_CK00_FCLK_6 (0x0006U) /* ck00 - fCLK/2^6 */
#define _0007_SAU_CK00_FCLK_7 (0x0007U) /* ck00 - fCLK/2^7 */
#define _0008_SAU_CK00_FCLK_8 (0x0008U) /* ck00 - fCLK/2^8 */
#define _0009_SAU_CK00_FCLK_9 (0x0009U) /* ck00 - fCLK/2^9 */
#define _000A_SAU_CK00_FCLK_10 (0x000AU) /* ck00 - fCLK/2^10 */
#define _000B_SAU_CK00_FCLK_11 (0x000BU) /* ck00 - fCLK/2^11 */
#define _000C_SAU_CK00_FCLK_12 (0x000CU) /* ck00 - fCLK/2^12 */
#define _000D_SAU_CK00_FCLK_13 (0x000DU) /* ck00 - fCLK/2^13 */
#define _000E_SAU_CK00_FCLK_14 (0x000EU) /* ck00 - fCLK/2^14 */
#define _000F_SAU_CK00_FCLK_15 (0x000FU) /* ck00 - fCLK/2^15 */
/* Section of operation clock (CKm1) (PRSm13 - PRSm10) */
#define _0000_SAU_CK01_FCLK_0 (0x0000U) /* ck01 - fCLK */
#define _0010_SAU_CK01_FCLK_1 (0x0010U) /* ck01 - fCLK/2^1 */
#define _0020_SAU_CK01_FCLK_2 (0x0020U) /* ck01 - fCLK/2^2 */
#define _0030_SAU_CK01_FCLK_3 (0x0030U) /* ck01 - fCLK/2^3 */
#define _0040_SAU_CK01_FCLK_4 (0x0040U) /* ck01 - fCLK/2^4 */
#define _0050_SAU_CK01_FCLK_5 (0x0050U) /* ck01 - fCLK/2^5 */
#define _0060_SAU_CK01_FCLK_6 (0x0060U) /* ck01 - fCLK/2^6 */
#define _0070_SAU_CK01_FCLK_7 (0x0070U) /* ck01 - fCLK/2^7 */
#define _0080_SAU_CK01_FCLK_8 (0x0080U) /* ck01 - fCLK/2^8 */
#define _0090_SAU_CK01_FCLK_9 (0x0090U) /* ck01 - fCLK/2^9 */
#define _00A0_SAU_CK01_FCLK_10 (0x00A0U) /* ck01 - fCLK/2^10 */
#define _00B0_SAU_CK01_FCLK_11 (0x00B0U) /* ck01 - fCLK/2^11 */
#define _00C0_SAU_CK01_FCLK_12 (0x00C0U) /* ck01 - fCLK/2^12 */
#define _00D0_SAU_CK01_FCLK_13 (0x00D0U) /* ck01 - fCLK/2^13 */
#define _00E0_SAU_CK01_FCLK_14 (0x00E0U) /* ck01 - fCLK/2^14 */
#define _00F0_SAU_CK01_FCLK_15 (0x00F0U) /* ck01 - fCLK/2^15 */
/*
Serial Mode Register mn (SMRmn)
*/
#define _0020_SAU_SMRMN_INITIALVALUE (0x0020U)
/* Selection of macro clock (MCK) of channel n (CKSmn) */
#define _0000_SAU_CLOCK_SELECT_CK00 (0x0000U) /* operation clock CK0 set by PRS register */
#define _8000_SAU_CLOCK_SELECT_CK01 (0x8000U) /* operation clock CK1 set by PRS register */
/* Selection of transfer clock (TCLK) of channel n (CCSmn) */
#define _0000_SAU_CLOCK_MODE_CKS (0x0000U) /* divided operation clock MCK specified by CKSmn bit */
#define _4000_SAU_CLOCK_MODE_TI0N (0x4000U) /* clock input from SCK pin (slave transfer in CSI mode) */
/* Selection of start trigger source (STSmn) */
#define _0000_SAU_TRIGGER_SOFTWARE (0x0000U) /* only software trigger is valid */
#define _0100_SAU_TRIGGER_RXD (0x0100U) /* valid edge of RXD pin */
/* Controls inversion of level of receive data of channel n in UART mode (SISmn0) */
#define _0000_SAU_EDGE_FALL (0x0000U) /* falling edge is detected as the start bit */
#define _0040_SAU_EDGE_RISING (0x0040U) /* rising edge is detected as the start bit */
/* Setting of operation mode of channel n (MDmn2, MDmn1) */
#define _0000_SAU_MODE_CSI (0x0000U) /* CSI mode */
#define _0002_SAU_MODE_UART (0x0002U) /* UART mode */
#define _0004_SAU_MODE_IIC (0x0004U) /* simplified IIC mode */
/* Selection of interrupt source of channel n (MDmn0) */
#define _0000_SAU_TRANSFER_END (0x0000U) /* transfer end interrupt */
#define _0001_SAU_BUFFER_EMPTY (0x0001U) /* buffer empty interrupt */
/*
Serial Communication Operation Setting Register mn (SCRmn)
*/
/* Setting of operation mode of channel n (TXEmn, RXEmn) */
#define _0000_SAU_NOT_COMMUNICATION (0x0000U) /* does not start communication */
#define _4000_SAU_RECEPTION (0x4000U) /* reception only */
#define _8000_SAU_TRANSMISSION (0x8000U) /* transmission only */
#define _C000_SAU_RECEPTION_TRANSMISSION (0xC000U) /* reception and transmission */
/* Selection of data and clock phase in CSI mode (DAPmn, CKPmn) */
#define _0000_SAU_TIMING_1 (0x0000U) /* type 1 */
#define _1000_SAU_TIMING_2 (0x1000U) /* type 2 */
#define _2000_SAU_TIMING_3 (0x2000U) /* type 3 */
#define _3000_SAU_TIMING_4 (0x3000U) /* type 4 */
/* Setting of parity bit in UART mode (PTCmn1 - PTCmn0) */
#define _0000_SAU_PARITY_NONE (0x0000U) /* none parity */
#define _0100_SAU_PARITY_ZERO (0x0100U) /* zero parity */
#define _0200_SAU_PARITY_EVEN (0x0200U) /* even parity */
#define _0300_SAU_PARITY_ODD (0x0300U) /* odd parity */
/* Selection of data transfer sequence in CSI and UART modes (DIRmn) */
#define _0000_SAU_MSB (0x0000U) /* MSB */
#define _0080_SAU_LSB (0x0080U) /* LSB */
/* Setting of stop bit in UART mode (SLCmn1, SLCmn0) */
#define _0000_SAU_STOP_NONE (0x0000U) /* none stop bit */
#define _0010_SAU_STOP_1 (0x0010U) /* 1 stop bit */
#define _0020_SAU_STOP_2 (0x0020U) /* 2 stop bits */
/* Setting of data length in CSI and UART modes (DLSmn3 - DLSmn0) (m = 0, 1) */
#define _0006_SAU_LENGTH_7 (0x0006U) /* 07-bit data length */
#define _0007_SAU_LENGTH_8 (0x0007U) /* 08-bit data length */
#define _0008_SAU_LENGTH_9 (0x0008U) /* 09-bit data length */
#define _0009_SAU_LENGTH_10 (0x0009U) /* 10-bit data length */
#define _000A_SAU_LENGTH_11 (0x000AU) /* 11-bit data length */
#define _000B_SAU_LENGTH_12 (0x000BU) /* 12-bit data length */
#define _000C_SAU_LENGTH_13 (0x000CU) /* 13-bit data length */
#define _000D_SAU_LENGTH_14 (0x000DU) /* 14-bit data length */
#define _000E_SAU_LENGTH_15 (0x000EU) /* 15-bit data length */
#define _000F_SAU_LENGTH_16 (0x000FU) /* 16-bit data length */
/*
Serial Output Level Register m (SOLm)
*/
/* Selects inversion of the level of the transmit data of channel n in UART mode */
#define _0000_SAU_CHANNEL0_NORMAL (0x0000U) /* normal bit level */
#define _0001_SAU_CHANNEL0_INVERTED (0x0001U) /* inverted bit level */
/*
Noise Filter Enable Register 0 (NFEN0)
*/
/* Use of noise filter */
#define _00_SAU_RXD1_FILTER_OFF (0x00U) /* noise filter off */
#define _04_SAU_RXD1_FILTER_ON (0x04U) /* noise filter on */
#define _00_SAU_RXD0_FILTER_OFF (0x00U) /* noise filter off */
#define _01_SAU_RXD0_FILTER_ON (0x01U) /* noise filter on */
/*
Format of Serial Status Register mn (SSRmn)
*/
/* Communication status indication flag of channel n (TSFmn) */
#define _0040_SAU_UNDER_EXECUTE (0x0040U) /* communication is under execution */
/* Buffer register status indication flag of channel n (BFFmn) */
#define _0020_SAU_VALID_STORED (0x0020U) /* valid data is stored in the SDRmn register */
/* Framing error detection flag of channel n (FEFmn) */
#define _0004_SAU_FRAM_ERROR (0x0004U) /* a framing error occurs during UART reception */
/* Parity error detection flag of channel n (PEFmn) */
#define _0002_SAU_PARITY_ERROR (0x0002U) /* a parity error occurs or ACK is not detected */
/* Overrun error detection flag of channel n (OVFmn) */
#define _0001_SAU_OVERRUN_ERROR (0x0001U) /* an overrun error occurs */
/*
Serial Channel Start Register m (SSm)
*/
/* Operation start trigger of channel 0 (SSm0) */
#define _0000_SAU_CH0_START_TRG_OFF (0x0000U) /* no trigger operation */
#define _0001_SAU_CH0_START_TRG_ON (0x0001U) /* sets SEm0 to 1 and enters the communication wait status */
/* Operation start trigger of channel 1 (SSm1) */
#define _0000_SAU_CH1_START_TRG_OFF (0x0000U) /* no trigger operation */
#define _0002_SAU_CH1_START_TRG_ON (0x0002U) /* sets SEm1 to 1 and enters the communication wait status */
/*
Serial Channel Stop Register m (STm)
*/
/* Operation stop trigger of channel 0 (STm0) */
#define _0000_SAU_CH0_STOP_TRG_OFF (0x0000U) /* no trigger operation */
#define _0001_SAU_CH0_STOP_TRG_ON (0x0001U) /* operation is stopped (stop trigger is generated) */
/* Operation stop trigger of channel 1 (STm1) */
#define _0000_SAU_CH1_STOP_TRG_OFF (0x0000U) /* no trigger operation */
#define _0002_SAU_CH1_STOP_TRG_ON (0x0002U) /* operation is stopped (stop trigger is generated) */
/*
Format of Serial Flag Clear Trigger Register mn (SIRmn)
*/
/* Clear trigger of overrun error flag of channel n (OVCTmn) */
#define _0001_SAU_SIRMN_OVCTMN (0x0001U)
/* Clear trigger of parity error flag of channel n (PECTmn) */
#define _0002_SAU_SIRMN_PECTMN (0x0002U)
/* Clear trigger of framing error of channel n (FECTMN) */
#define _0004_SAU_SIRMN_FECTMN (0x0004U)
/*
Serial Output Enable Register m (SOEm)
*/
/* Serial output enable/disable of channel 0 (SOEm0) */
#define _0001_SAU_CH0_OUTPUT_ENABLE (0x0001U) /* enables output by serial communication operation */
#define _0000_SAU_CH0_OUTPUT_DISABLE (0x0000U) /* stops output by serial communication operation */
/* Serial output enable/disable of channel 1 (SOEm1) */
#define _0002_SAU_CH1_OUTPUT_ENABLE (0x0002U) /* enables output by serial communication operation */
#define _0000_SAU_CH1_OUTPUT_DISABLE (0x0000U) /* stops output by serial communication operation */
/*
Serial Output Register m (SOm)
*/
/* Serial data output of channel 0 (SOm0) */
#define _0000_SAU_CH0_DATA_OUTPUT_0 (0x0000U) /* Serial data output value is "0" */
#define _0001_SAU_CH0_DATA_OUTPUT_1 (0x0001U) /* Serial data output value is "1" */
/* Serial data output of channel 1 (SOm1) */
#define _0000_SAU_CH1_DATA_OUTPUT_0 (0x0000U) /* Serial data output value is "0" */
#define _0002_SAU_CH1_DATA_OUTPUT_1 (0x0002U) /* Serial data output value is "1" */
/* Serial clock output of channel 0 (CKOm0) */
#define _0000_SAU_CH0_CLOCK_OUTPUT_0 (0x0000U) /* Serial clock output value is "0" */
#define _0100_SAU_CH0_CLOCK_OUTPUT_1 (0x0100U) /* Serial clock output value is "1" */
/* Serial clock output of channel 1 (CKOm1) */
#define _0000_SAU_CH1_CLOCK_OUTPUT_0 (0x0000U) /* Serial clock output value is "0" */
#define _0200_SAU_CH1_CLOCK_OUTPUT_1 (0x0200U) /* Serial clock output value is "1" */
/*
SAU Standby Control Register m (SSCm)
*/
/* SAU Standby Wakeup Control Bit (SWC) */
#define _0000_SAU_CH0_SNOOZE_OFF (0x0000U) /* disable start function from STOP state of chip */
#define _0001_SAU_CH0_SNOOZE_ON (0x0001U) /* enable start function from STOP state of chip */
/*
Serial slave select enable register m (SSEmn)
*/
/* SAU0 Channel 0 SSI00 input setting in CSI communication and slave mode (SSE00) */
#define _00_SAU_CH0_SSI00_UNUSED (0x00U) /* disables SSI00 pin input */
#define _01_SAU_CH0_SSI00_USED (0x01U) /* enables SSI00 pin input */
/* SAU0 Channel 1 SSI01 input setting in CSI communication and slave mode (SSE01) */
#define _00_SAU_CH1_SSI01_UNUSED (0x00U) /* disables SSI01 pin input */
#define _02_SAU_CH1_SSI01_USED (0x02U) /* enables SSI01 pin input */
/* SAU1 Channel 0 SSI10 input setting in CSI communication and slave mode (SSE10) */
#define _00_SAU_CH0_SSI10_UNUSED (0x00U) /* disables SSI10 pin input */
#define _01_SAU_CH0_SSI10_USED (0x01U) /* enables SSI10 pin input */
/* SAU1 Channel 1 SSI11 input setting in CSI communication and slave mode (SSE11) */
#define _00_SAU_CH1_SSI11_UNUSED (0x00U) /* disables SSI11 pin input */
#define _02_SAU_CH1_SSI11_USED (0x02U) /* enables SSI11 pin input */
/* SAU used flag */
#define _00_SAU_IIC_MASTER_FLAG_CLEAR (0x00U)
#define _01_SAU_IIC_SEND_FLAG (0x01U)
#define _02_SAU_IIC_RECEIVE_FLAG (0x02U)
#define _04_SAU_IIC_SENDED_ADDRESS_FLAG (0x04U)
/*
IICA Control Register (IICCTLn0)
*/
/* IIC operation enable (IICEn) */
#define _00_IICA_OPERATION_DISABLE (0x00U) /* stop operation */
#define _80_IICA_OPERATION_ENABLE (0x80U) /* enable operation */
/* Exit from communications (LRELn) */
#define _00_IICA_COMMUNICATION_NORMAL (0x00U) /* normal operation */
#define _40_IICA_COMMUNICATION_EXIT (0x40U) /* exit from current communication */
/* Wait cancellation (WRELn) */
#define _00_IICA_WAIT_NOTCANCEL (0x00U) /* do not cancel wait */
#define _20_IICA_WAIT_CANCEL (0x20U) /* cancel wait */
/* Generation of interrupt when stop condition (SPIEn) */
#define _00_IICA_STOPINT_DISABLE (0x00U) /* disable */
#define _10_IICA_STOPINT_ENABLE (0x10U) /* enable */
/* Wait and interrupt generation (WTIMn) */
#define _00_IICA_WAITINT_CLK8FALLING (0x00U) /* generated at the eighth clock's falling edge */
#define _08_IICA_WAITINT_CLK9FALLING (0x08U) /* generated at the ninth clock's falling edge */
/* Acknowledgement control (ACKEn) */
#define _00_IICA_ACK_DISABLE (0x00U) /* disable acknowledgement */
#define _04_IICA_ACK_ENABLE (0x04U) /* enable acknowledgement */
/* Start condition trigger (STTn) */
#define _00_IICA_START_NOTGENERATE (0x00U) /* do not generate start condition */
#define _02_IICA_START_GENERATE (0x02U) /* generate start condition */
/* Stop condition trigger (SPTn) */
#define _00_IICA_STOP_NOTGENERATE (0x00U) /* do not generate stop condition */
#define _01_IICA_STOP_GENERATE (0x01U) /* generate stop condition */
/*
IICA Status Register (IICSn)
*/
/* Master device status (MSTSn) */
#define _00_IICA_STATUS_NOTMASTER (0x00U) /* slave device status or communication standby status */
#define _80_IICA_STATUS_MASTER (0x80U) /* master device communication status */
/* Detection of arbitration loss (ALDn) */
#define _00_IICA_ARBITRATION_NO (0x00U) /* arbitration win or no arbitration */
#define _40_IICA_ARBITRATION_LOSS (0x40U) /* arbitration loss */
/* Detection of extension code reception (EXCn) */
#define _00_IICA_EXTCODE_NOT (0x00U) /* extension code not received */
#define _20_IICA_EXTCODE_RECEIVED (0x20U) /* extension code received */
/* Detection of matching addresses (COIn) */
#define _00_IICA_ADDRESS_NOTMATCH (0x00U) /* addresses do not match */
#define _10_IICA_ADDRESS_MATCH (0x10U) /* addresses match */
/* Detection of transmit/receive status (TRCn) */
#define _00_IICA_STATUS_RECEIVE (0x00U) /* receive status */
#define _08_IICA_STATUS_TRANSMIT (0x08U) /* transmit status */
/* Detection of acknowledge signal (ACKDn) */
#define _00_IICA_ACK_NOTDETECTED (0x00U) /* ACK signal was not detected */
#define _04_IICA_ACK_DETECTED (0x04U) /* ACK signal was detected */
/* Detection of start condition (STDn) */
#define _00_IICA_START_NOTDETECTED (0x00U) /* start condition not detected */
#define _02_IICA_START_DETECTED (0x02U) /* start condition detected */
/* Detection of stop condition (SPDn) */
#define _00_IICA_STOP_NOTDETECTED (0x00U) /* stop condition not detected */
#define _01_IICA_STOP_DETECTED (0x01U) /* stop condition detected */
/*
IICA Flag Register (IICFn)
*/
/* STT clear flag (STCFn) */
#define _00_IICA_STARTFLAG_GENERATE (0x00U) /* generate start condition */
#define _80_IICA_STARTFLAG_UNSUCCESSFUL (0x80U) /* start condition generation unsuccessful */
/* IIC bus status flag (IICBSYn) */
#define _00_IICA_BUS_RELEASE (0x00U) /* bus release status */
#define _40_IICA_BUS_COMMUNICATION (0x40U) /* bus communication status */
/* Initial start enable trigger (STCENn) */
#define _00_IICA_START_WITHSTOP (0x00U) /* generate start upon detecting stop condition */
#define _02_IICA_START_WITHOUTSTOP (0x02U) /* generate start without detecting stop condition */
/* Communication reservation function disable bit (IICRSVn) */
#define _00_IICA_RESERVATION_ENABLE (0x00U) /* enable communication reservation */
#define _01_IICA_RESERVATION_DISABLE (0x01U) /* disable communication reservation */
/*
IICA Control Register 1 (IICCTLn1)
*/
/* Control of address match wakeup (WUPn) */
#define _00_IICA_WAKEUP_STOP (0x00U) /* stop address match wakeup function in STOP mode */
#define _80_IICA_WAKEUP_ENABLE (0x80U) /* enable address match wakeup function in STOP mode */
/* Detection of SCL0 pin level (CLDn) */
#define _00_IICA_SCL_LOW (0x00U) /* detect clock line at low level */
#define _20_IICA_SCL_HIGH (0x20U) /* detect clock line at high level */
/* Detection of SDA0 pin level (DADn) */
#define _00_IICA_SDA_LOW (0x00U) /* detect data line at low level */
#define _10_IICA_SDA_HIGH (0x10U) /* detect data line at high level */
/* Operation mode switching (SMCn) */
#define _00_IICA_MODE_STANDARD (0x00U) /* operates in standard mode */
#define _08_IICA_MODE_HIGHSPEED (0x08U) /* operates in high-speed mode */
/* Digital filter operation control (DFCn) */
#define _00_IICA_FILTER_OFF (0x00U) /* digital filter off */
#define _04_IICA_FILTER_ON (0x04U) /* digital filter on */
/* Operation of clock dividing frequency permission (PRSn) */
#define _00_IICA_fCLK (0x00U) /* clock of dividing frequency operation (fCLK) */
#define _01_IICA_fCLK_HALF (0x01U) /* 2 clock of dividing frequency operation (fCLK/2) */
/* IICA used flag */
#define _80_IICA_ADDRESS_COMPLETE (0x80U)
#define _00_IICA_MASTER_FLAG_CLEAR (0x00U)
/***********************************************************************************************************************
Macro definitions
***********************************************************************************************************************/
#define _38_IICA0_MASTERADDRESS (0x38U)
#define _14_IICA0_IICWH_VALUE (0x14U)
#define _15_IICA0_IICWL_VALUE (0x15U)
/***********************************************************************************************************************
Typedef definitions
***********************************************************************************************************************/
/***********************************************************************************************************************
Global functions
***********************************************************************************************************************/
void R_IICA0_Create(void);
MD_STATUS R_IICA0_Master_Send(uint8_t adr, uint8_t * const tx_buf, uint16_t tx_num, uint8_t wait);
MD_STATUS R_IICA0_Master_Receive(uint8_t adr, uint8_t * const rx_buf, uint16_t rx_num, uint8_t wait);
void R_IICA0_Stop(void);
void R_IICA0_StopCondition(void);
static void r_iica0_callback_master_sendend(void);
static void r_iica0_callback_master_receiveend(void);
static void r_iica0_callback_master_error(MD_STATUS flag);
static void iica0_masterhandler(void);
static void iica0_slavehandler(void);
/* Start user code for function. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
#endif

222
ECU_APP/r_cg_serial_user.c Normal file
View File

@ -0,0 +1,222 @@
/***********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2012, 2021 Renesas Electronics Corporation. All rights reserved.
***********************************************************************************************************************/
/***********************************************************************************************************************
* File Name : r_cg_serial_user.c
* Version : CodeGenerator for RL78/F13 V2.03.07.02 [08 Nov 2021]
* Device(s) : R5F10BGG
* Tool-Chain : CCRL
* Description : This file implements device driver for Serial module.
* Creation Date: 2022/7/5
***********************************************************************************************************************/
/***********************************************************************************************************************
Includes
***********************************************************************************************************************/
#include "r_cg_macrodriver.h"
#include "r_cg_serial.h"
/* Start user code for include. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
#include "r_cg_userdefine.h"
/***********************************************************************************************************************
Pragma directive
***********************************************************************************************************************/
#pragma interrupt r_iica0_interrupt(vect=INTIICA0)
/* Start user code for pragma. Do not edit comment generated here */
#if DEBUG
#pragma interrupt r_iica0_interrupt(vect=INTIICA0)
#endif
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
Global variables and functions
***********************************************************************************************************************/
extern volatile uint8_t g_iica0_master_status_flag; /* iica0 master flag */
extern volatile uint8_t g_iica0_slave_status_flag; /* iica0 slave flag */
extern volatile uint8_t * gp_iica0_rx_address; /* iica0 receive buffer address */
extern volatile uint16_t g_iica0_rx_cnt; /* iica0 receive data length */
extern volatile uint16_t g_iica0_rx_len; /* iica0 receive data count */
extern volatile uint8_t * gp_iica0_tx_address; /* iica0 send buffer address */
extern volatile uint16_t g_iica0_tx_cnt; /* iica0 send data count */
/* Start user code for global. Do not edit comment generated here */
extern volatile uint8_t flag_IIC_SendEnd;
extern volatile uint8_t flag_IIC_ReceiveEnd;
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
* Function Name: r_iica0_interrupt
* Description : This function is INTIICA0 interrupt service routine.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
static void __near r_iica0_interrupt(void)
{
if ((IICS0 & _80_IICA_STATUS_MASTER) == 0x80U)
{
iica0_masterhandler();
}
}
/***********************************************************************************************************************
* Function Name: iica0_masterhandler
* Description : This function is IICA0 master handler.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
static void iica0_masterhandler(void)
{
/* Detection of stop condition handling */
if ((0U == IICBSY0) && (g_iica0_tx_cnt != 0U))
{
r_iica0_callback_master_error(MD_SPT);
}
else
{
/* Control for sended address */
if ((g_iica0_master_status_flag & _80_IICA_ADDRESS_COMPLETE) == 0U)
{
if (1U == ACKD0)
{
g_iica0_master_status_flag |= _80_IICA_ADDRESS_COMPLETE;
if (1U == TRC0)
{
WTIM0 = 1U;
if (g_iica0_tx_cnt > 0U)
{
IICA0 = *gp_iica0_tx_address;
gp_iica0_tx_address++;
g_iica0_tx_cnt--;
}
else
{
r_iica0_callback_master_sendend();
}
}
else
{
ACKE0 = 1U;
WTIM0 = 0U;
WREL0 = 1U;
}
}
else
{
r_iica0_callback_master_error(MD_NACK);
}
}
else
{
/* Master send control */
if (1U == TRC0)
{
if ((0U == ACKD0) && (g_iica0_tx_cnt != 0U))
{
r_iica0_callback_master_error(MD_NACK);
}
else
{
if (g_iica0_tx_cnt > 0U)
{
IICA0 = *gp_iica0_tx_address;
gp_iica0_tx_address++;
g_iica0_tx_cnt--;
}
else
{
r_iica0_callback_master_sendend();
}
}
}
/* Master receive control */
else
{
if (g_iica0_rx_cnt < g_iica0_rx_len)
{
*gp_iica0_rx_address = IICA0;
gp_iica0_rx_address++;
g_iica0_rx_cnt++;
if (g_iica0_rx_cnt == g_iica0_rx_len)
{
ACKE0 = 0U;
WTIM0 = 1U;
WREL0 = 1U;
}
else
{
WREL0 = 1U;
}
}
else
{
r_iica0_callback_master_receiveend();
}
}
}
}
}
/***********************************************************************************************************************
* Function Name: r_iica0_callback_master_error
* Description : This function is a callback function when IICA0 master error occurs.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
static void r_iica0_callback_master_error(MD_STATUS flag)
{
/* Start user code. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
}
/***********************************************************************************************************************
* Function Name: r_iica0_callback_master_receiveend
* Description : This function is a callback function when IICA0 finishes master reception.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
static void r_iica0_callback_master_receiveend(void)
{
SPT0 = 1U;
/* Start user code. Do not edit comment generated here */
flag_IIC_ReceiveEnd = 1;
/* End user code. Do not edit comment generated here */
}
/***********************************************************************************************************************
* Function Name: r_iica0_callback_master_sendend
* Description : This function is a callback function when IICA0 finishes master transmission.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
static void r_iica0_callback_master_sendend(void)
{
SPT0 = 1U;
/* Start user code. Do not edit comment generated here */
flag_IIC_SendEnd = 1;
/* End user code. Do not edit comment generated here */
}
/* Start user code for adding. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */

305
ECU_APP/r_cg_timer.c Normal file
View File

@ -0,0 +1,305 @@
/***********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2012, 2021 Renesas Electronics Corporation. All rights reserved.
***********************************************************************************************************************/
/***********************************************************************************************************************
* File Name : r_cg_timer.c
* Version : CodeGenerator for RL78/F13 V2.03.07.02 [08 Nov 2021]
* Device(s) : R5F10BBG
* Tool-Chain : CCRL
* Description : This file implements device driver for TAU module.
* Creation Date: 2023-08-18
***********************************************************************************************************************/
/***********************************************************************************************************************
Includes
***********************************************************************************************************************/
#include "r_cg_macrodriver.h"
#include "r_cg_timer.h"
/* Start user code for include. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
#include "r_cg_userdefine.h"
/***********************************************************************************************************************
Pragma directive
***********************************************************************************************************************/
/* Start user code for pragma. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
Global variables and functions
***********************************************************************************************************************/
/* Start user code for global. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
* Function Name: R_TAU0_Create
* Description : This function initializes the TAU0 module.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_TAU0_Create(void)
{
TAU0EN = 1U; /* supplies input clock */
TPS0 = _0000_TAU_CKM0_FCLK_0 | _0000_TAU_CKM1_FCLK_0 | _0000_TAU_CKM2_FCLK_0 | _0000_TAU_CKM3_FCLK_0;
/* Stop all channels */
TT0 = _0001_TAU_CH0_STOP_TRG_ON | _0002_TAU_CH1_STOP_TRG_ON | _0004_TAU_CH2_STOP_TRG_ON |
_0008_TAU_CH3_STOP_TRG_ON | _0010_TAU_CH4_STOP_TRG_ON | _0020_TAU_CH5_STOP_TRG_ON |
_0040_TAU_CH6_STOP_TRG_ON | _0080_TAU_CH7_STOP_TRG_ON | _0200_TAU_CH1_H8_STOP_TRG_ON |
_0800_TAU_CH3_H8_STOP_TRG_ON;
PWMDLY1 = _0000_TAU_PWM_DELAY_CLEAR; /* clear PWM output delay */
/* Mask channel 0 interrupt */
TMMK00 = 1U; /* disable INTTM00 interrupt */
TMIF00 = 0U; /* clear INTTM00 interrupt flag */
/* Mask channel 1 interrupt */
TMMK01 = 1U; /* disable INTTM01 interrupt */
TMIF01 = 0U; /* clear INTTM01 interrupt flag */
/* Mask channel 1 higher 8 bits interrupt */
TMMK01H = 1U; /* disable INTTM01H interrupt */
TMIF01H = 0U; /* clear INTTM01H interrupt flag */
/* Mask channel 2 interrupt */
TMMK02 = 1U; /* disable INTTM02 interrupt */
TMIF02 = 0U; /* clear INTTM02 interrupt flag */
/* Mask channel 3 interrupt */
TMMK03 = 1U; /* disable INTTM03 interrupt */
TMIF03 = 0U; /* clear INTTM03 interrupt flag */
/* Mask channel 3 higher 8 bits interrupt */
TMMK03H = 1U; /* disable INTTM03H interrupt */
TMIF03H = 0U; /* clear INTTM03H interrupt flag */
/* Mask channel 4 interrupt */
TMMK04 = 1U; /* disable INTTM04 interrupt */
TMIF04 = 0U; /* clear INTTM04 interrupt flag */
/* Mask channel 5 interrupt */
TMMK05 = 1U; /* disable INTTM05 interrupt */
TMIF05 = 0U; /* clear INTTM05 interrupt flag */
/* Mask channel 6 interrupt */
TMMK06 = 1U; /* disable INTTM06 interrupt */
TMIF06 = 0U; /* clear INTTM06 interrupt flag */
/* Mask channel 7 interrupt */
TMMK07 = 1U; /* disable INTTM07 interrupt */
TMIF07 = 0U; /* clear INTTM07 interrupt flag */
/* Set INTTM00 low priority */
TMPR100 = 1U;
TMPR000 = 1U;
/* Set INTTM01 low priority */
TMPR101 = 1U;
TMPR001 = 1U;
/* Channel 0 used as interval timer */
TMR00 = _0000_TAU_CLOCK_SELECT_CKM0 | _0000_TAU_CLOCK_MODE_CKS | _0000_TAU_COMBINATION_SLAVE |
_0000_TAU_TRIGGER_SOFTWARE | _0000_TAU_MODE_INTERVAL_TIMER | _0000_TAU_START_INT_UNUSED;
TDR00 = _7CFF_TAU_TDR00_VALUE;
TO0 &= ~_0001_TAU_CH0_OUTPUT_VALUE_1;
TOE0 &= ~_0001_TAU_CH0_OUTPUT_ENABLE;
/* Channel 1 used as interval timer */
TMR01 = _0000_TAU_CLOCK_SELECT_CKM0 | _0000_TAU_CLOCK_MODE_CKS | _0000_TAU_16BITS_MODE |
_0000_TAU_TRIGGER_SOFTWARE | _0000_TAU_MODE_INTERVAL_TIMER | _0000_TAU_START_INT_UNUSED;
TDR01 = _7CFF_TAU_TDR01_VALUE;
TOM0 &= ~_0002_TAU_CH1_OUTPUT_COMBIN;
TOL0 &= ~_0002_TAU_CH1_OUTPUT_LEVEL_L;
TO0 &= ~_0002_TAU_CH1_OUTPUT_VALUE_1;
TOE0 &= ~_0002_TAU_CH1_OUTPUT_ENABLE;
}
/***********************************************************************************************************************
* Function Name: R_TAU0_Channel0_Start
* Description : This function starts TAU0 channel 0 counter.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_TAU0_Channel0_Start(void)
{
TMIF00 = 0U; /* clear INTTM00 interrupt flag */
TMMK00 = 0U; /* enable INTTM00 interrupt */
TS0 |= _0001_TAU_CH0_START_TRG_ON;
}
/***********************************************************************************************************************
* Function Name: R_TAU0_Channel0_Stop
* Description : This function stops TAU0 channel 0 counter.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_TAU0_Channel0_Stop(void)
{
TT0 |= _0001_TAU_CH0_STOP_TRG_ON;
/* Mask channel 0 interrupt */
TMMK00 = 1U; /* disable INTTM00 interrupt */
TMIF00 = 0U; /* clear INTTM00 interrupt flag */
}
/***********************************************************************************************************************
* Function Name: R_TAU0_Channel1_Start
* Description : This function starts TAU0 channel 1 counter.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_TAU0_Channel1_Start(void)
{
TMIF01 = 0U; /* clear INTTM01 interrupt flag */
TMMK01 = 0U; /* enable INTTM01 interrupt */
TS0 |= _0002_TAU_CH1_START_TRG_ON;
}
/***********************************************************************************************************************
* Function Name: R_TAU0_Channel1_Stop
* Description : This function stops TAU0 channel 1 counter.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_TAU0_Channel1_Stop(void)
{
TT0 |= _0002_TAU_CH1_STOP_TRG_ON;
/* Mask channel 1 interrupt */
TMMK01 = 1U; /* disable INTTM01 interrupt */
TMIF01 = 0U; /* clear INTTM01 interrupt flag */
}
/***********************************************************************************************************************
* Function Name: R_TMR_RD0_Create
* Description : This function initializes the TMRD0 module.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_TMR_RD0_Create(void)
{
TRD0EN = 1U; /* enable input clock supply */
TRDSTR |= _04_TMRD_TRD0_COUNT_CONTINUES;
TRDSTR &= (uint8_t)~_01_TMRD_TRD0_COUNT_START; /* disable TMRD0 operation */
PWMDLY0 = _0000_TMRD_PWM_DELAY_CLEAR; /* clear PWM output delay */
TRDMK0 = 1U; /* disable TMRD0 interrupt */
TRDIF0 = 0U; /* clear TMRD0 interrupt flag */
TRDMR |= _00_TMRD_TRDGRC0_GENERAL | _00_TMRD_TRDGRD0_GENERAL;
TRDOER1 &= _F0_TMRD_CHANNEL0_OUTPUT_DEFAULT;
TRDOER1 |= _00_TMRD_TRDIOA0_OUTPUT_ENABLE | _00_TMRD_TRDIOC0_OUTPUT_ENABLE | _08_TMRD_TRDIOD0_OUTPUT_DISABLE;
TRDOCR |= _00_TMRD_TRDIOA0_INITIAL_OUTPUT_L | _00_TMRD_TRDIOC0_INITIAL_OUTPUT_L;
TRDCR0 |= _00_TMRD_INTERNAL_CLOCK_FIH | _40_TMRD_COUNTER_CLEAR_TRDGRB;
TRDIER0 = _00_TMRD_IMIA_DISABLE | _00_TMRD_IMIB_DISABLE | _00_TMRD_IMIC_DISABLE | _00_TMRD_OVIE_DISABLE;
TRDIORA0 = _01_TMRD_TRDGRA_COMPARE_OUTPUT_LOW;
TRDIORC0 = _01_TMRD_TRDGRC_COMPARE_OUTPUT_LOW | _08_TMRD_TRDGRC_GENERAL_BUFFER_REGISTER |
_80_TMRD_TRDGRD_GENERAL_BUFFER_REGISTER;
TRDGRA0 = _3E7F_TMRD_TRDGRA0_VALUE;
TRDGRB0 = _7CFF_TMRD_TRDGRB0_VALUE;
TRDGRC0 = _3E7F_TMRD_TRDGRC0_VALUE;
/* Set TRDIOA0 pin */
POM1 &= 0xF7U;
PM1 &= 0xF7U;
P1 &= 0xF7U;
/* Set TRDIOC0 pin */
POM1 &= 0xEFU;
PM1 &= 0xEFU;
P1 &= 0xEFU;
}
/***********************************************************************************************************************
* Function Name: R_TMR_RD0_Start
* Description : This function starts TMRD0 counter.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_TMR_RD0_Start(void)
{
volatile uint8_t trdsr_dummy;
trdsr_dummy = TRDSR0; /* read TRDSR0 before write 0 */
TRDSR0 = 0x00U; /* clear TRD0 each interrupt request */
TRDSTR &= (uint8_t)~_04_TMRD_TRD0_COUNT_CONTINUES;
TRDSTR |= _01_TMRD_TRD0_COUNT_START; /* start TMRD0 counter */
}
/***********************************************************************************************************************
* Function Name: R_TMR_RD0_Stop
* Description : This function stops TMRD0 counter.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_TMR_RD0_Stop(void)
{
volatile uint8_t trdsr_dummy;
TRDSTR |= _04_TMRD_TRD0_COUNT_CONTINUES;
TRDSTR &= (uint8_t)~_01_TMRD_TRD0_COUNT_START; /* stop TMRD0 counter */
trdsr_dummy = TRDSR0; /* read TRDSR0 before write 0 */
TRDSR0 = 0x00U; /* clear TRD0 each interrupt request */
}
/***********************************************************************************************************************
* Function Name: R_TMR_RD1_Create
* Description : This function initializes the TMRD1 module.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_TMR_RD1_Create(void)
{
TRD0EN = 1U; /* enable input clock supply */
TRDSTR |= _08_TMRD_TRD1_COUNT_CONTINUES;
TRDSTR &= (uint8_t)~_02_TMRD_TRD1_COUNT_START; /* disable TMRD1 operation */
PWMDLY0 = _0000_TMRD_PWM_DELAY_CLEAR; /* clear PWM output delay */
TRDMK1 = 1U; /* disable TMRD1 interrupt */
TRDIF1 = 0U; /* clear TMRD1 interrupt flag */
TRDMR |= _00_TMRD_TRDGRC1_GENERAL | _00_TMRD_TRDGRD1_GENERAL;
TRDOER1 &= _0F_TMRD_CHANNEL1_OUTPUT_DEFAULT;
TRDOER1 |= _00_TMRD_TRDIOA1_OUTPUT_ENABLE | _40_TMRD_TRDIOC1_OUTPUT_DISABLE | _80_TMRD_TRDIOD1_OUTPUT_DISABLE;
TRDOCR |= _00_TMRD_TRDIOA1_INITIAL_OUTPUT_L;
TRDCR1 |= _00_TMRD_INTERNAL_CLOCK_FIH | _40_TMRD_COUNTER_CLEAR_TRDGRB;
TRDIER1 = _00_TMRD_IMIA_DISABLE | _00_TMRD_IMIB_DISABLE | _00_TMRD_OVIE_DISABLE;
TRDIORA1 = _01_TMRD_TRDGRA_COMPARE_OUTPUT_LOW;
TRDIORC1 = _08_TMRD_TRDGRC_GENERAL_BUFFER_REGISTER | _80_TMRD_TRDGRD_GENERAL_BUFFER_REGISTER;
TRDGRA1 = _257F_TMRD_TRDGRA1_VALUE;
TRDGRB1 = _7CFF_TMRD_TRDGRB1_VALUE;
/* Set TRDIOA1 pin */
POM1 &= 0xDFU;
PM1 &= 0xDFU;
P1 &= 0xDFU;
}
/***********************************************************************************************************************
* Function Name: R_TMR_RD1_Start
* Description : This function starts TMRD1 counter.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_TMR_RD1_Start(void)
{
volatile uint8_t trdsr_dummy;
trdsr_dummy = TRDSR1; /* read TRDSR1 before write 0 */
TRDSR1 = 0x00U; /* clear TRD1 each interrupt request */
TRDSTR |= _08_TMRD_TRD1_COUNT_CONTINUES;
TRDSTR |= _02_TMRD_TRD1_COUNT_START; /* start TMRD1 counter */
}
/***********************************************************************************************************************
* Function Name: R_TMR_RD1_Stop
* Description : This function stops TMRD1 counter.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_TMR_RD1_Stop(void)
{
volatile uint8_t trdsr_dummy;
TRDSTR |= _08_TMRD_TRD1_COUNT_CONTINUES;
TRDSTR &= (uint8_t)~_02_TMRD_TRD1_COUNT_START; /* stop TMRD1 counter */
trdsr_dummy = TRDSR1; /* read TRDSR1 before write 0 */
TRDSR1 = 0x00U; /* clear TRD1 each interrupt request */
}
/* Start user code for adding. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */

1064
ECU_APP/r_cg_timer.h Normal file

File diff suppressed because it is too large Load Diff

197
ECU_APP/r_cg_timer_user.c Normal file
View File

@ -0,0 +1,197 @@
/***********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2012, 2021 Renesas Electronics Corporation. All rights reserved.
***********************************************************************************************************************/
/***********************************************************************************************************************
* File Name : r_cg_timer_user.c
* Version : CodeGenerator for RL78/F13 V2.03.07.02 [08 Nov 2021]
* Device(s) : R5F10BBG
* Tool-Chain : CCRL
* Description : This file implements device driver for TAU module.
* Creation Date: 2023-08-18
***********************************************************************************************************************/
/***********************************************************************************************************************
Includes
***********************************************************************************************************************/
#include "r_cg_macrodriver.h"
#include "r_cg_timer.h"
/* Start user code for include. Do not edit comment generated here */
#include "appTask.h"
#include "can_user.h"
#include "CanNw.h"
/* End user code. Do not edit comment generated here */
#include "r_cg_userdefine.h"
/***********************************************************************************************************************
Pragma directive
***********************************************************************************************************************/
#pragma interrupt r_tau0_channel0_interrupt(vect=INTTM00)
#pragma interrupt r_tau0_channel1_interrupt(vect=INTTM01)
/* Start user code for pragma. Do not edit comment generated here */
#if DEBUG
#pragma interrupt r_tau0_channel0_interrupt(vect = INTTM00)
#pragma interrupt r_tau0_channel1_interrupt(vect = INTTM01)
#endif
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
Global variables and functions
***********************************************************************************************************************/
/* Start user code for global. Do not edit comment generated here */
unsigned char Timer_Interrupt;
unsigned char iictimeout;
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
* Function Name: r_tau0_channel0_interrupt
* Description : This function is INTTM00 interrupt service routine.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
static void __near r_tau0_channel0_interrupt(void)
{
/* Start user code. Do not edit comment generated here */
Timer_Interrupt=1;
Timer_Pro();
/* End user code. Do not edit comment generated here */
}
/***********************************************************************************************************************
* Function Name: r_tau0_channel1_interrupt
* Description : This function is INTTM01 interrupt service routine.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
static void __near r_tau0_channel1_interrupt(void)
{
/* Start user code. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
}
/* Start user code for adding. Do not edit comment generated here */
void Count_Down_Timer_8Bit(unsigned char *Target_Timer)
{
if(*Target_Timer>0)
(*Target_Timer)--;
}
void Count_Down_Timer_16Bit(unsigned int *Target_Timer)
{
if(*Target_Timer>0)
(*Target_Timer)--;
}
void AutoLoad_CountUp_Timer_8Bit(unsigned char *Target_Timer,unsigned int Time_Limit,
unsigned char *Count,unsigned char Count_Limit)
{
if(*Target_Timer!=Time_Limit)
(*Target_Timer)++;
else
{
(*Target_Timer)=0;
if(*Count!=Count_Limit)
(*Count)++;
else
{
*Count=0;
}
}
}
void AutoLoad_CountUp_Timer_16Bit(unsigned int *Target_Timer,unsigned int Time_Limit,
unsigned char *Count,unsigned char Count_Limit)
{
if(*Target_Timer!=Time_Limit)
(*Target_Timer)++;
else
{
(*Target_Timer)=0;
if(*Count!=Count_Limit)
(*Count)++;
else
{
*Count=0;
}
}
}
void Timer_Pro(void)
{
static unsigned int Timer_1ms_tick_count;
Count_Down_Timer_16Bit(&air_req_timer);
Count_Down_Timer_8Bit(&iictimeout);
Count_Down_Timer_16Bit(&CAN_LostCount);
Count_Down_Timer_16Bit(&uiNwPduCycCnt);
Count_Down_Timer_16Bit(&DiagCnt);
uiNwTimCnt++;
uiNwToutCnt++; //ÍøÂç¹ÜÀí¶¨Ê±Æ÷
if(uiNwRMSCnt > 0)
uiNwRMSCnt--;
if(uiNwLocWkpOffCnt > 0)
{
uiNwLocWkpOffCnt--;
}
if(uiBusOffCnt > 0)
uiBusOffCnt--;
Timer_1ms_tick_count++;
if(Timer_1ms_tick_count%5==0)
{
Timer_5ms_flag=1;
}
if(Timer_1ms_tick_count%10==0)
{
Timer_10ms_flag=1;
}
if(Timer_1ms_tick_count%20==0)
{
Timer_20ms_flag=1;
}
if(Timer_1ms_tick_count%50==0)
{
Timer_50ms_flag=1;
}
if(Timer_1ms_tick_count%1000==0)
{
Timer_1000ms_flag = 1;
}
if(Timer_1ms_tick_count>=5000)
{
Timer_1ms_tick_count=0;
}
Can_1ms_count_alive++;
if(BusOff_Detect_delay_count>0)
{
BusOff_Detect_delay_count--;
}
if(Timer_Interrupt)
{
Timer_Interrupt=0;
Timer_1ms_flag=1;
}
}
/* End user code. Do not edit comment generated here */

76
ECU_APP/r_cg_userdefine.h Normal file
View File

@ -0,0 +1,76 @@
/***********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2012, 2021 Renesas Electronics Corporation. All rights reserved.
***********************************************************************************************************************/
/***********************************************************************************************************************
* File Name : r_cg_userdefine.h
* Version : CodeGenerator for RL78/F13 V2.03.07.02 [08 Nov 2021]
* Device(s) : R5F10BBG
* Tool-Chain : CCRL
* Description : This file includes user definition.
* Creation Date: 2023-08-18
***********************************************************************************************************************/
#ifndef _USER_DEF_H
#define _USER_DEF_H
/***********************************************************************************************************************
User definitions
***********************************************************************************************************************/
/* Start user code for function. Do not edit comment generated here */
typedef struct{
uint8_t RspData[8];
uint8_t AckReq;
uint8_t AckLenth;
uint8_t boot_enable;
uint8_t RunAir;
uint8_t RstSrc;
uint8_t KeyErrTimes;
uint8_t SeedReqTimes;
}KamData_t;
#define WDT_RST 0x10
#define RPRGRM_REQ_VALID 0xA5
#define RUN_IN_BOOT 0x00
#define RUN_IN_APP 0xA5
#define ACK_REQ 0xA5
#define GetAppValid() (*(__far uint32 *)0xA100)
#define GetAppEndValid() (*(__far uint32 *)0x19FF0)
#define DID_0200_ADDR 0x1A000
#define DID_0201_ADDR 0x1A008
#define DID_F180_ADDR 0x19C20
#define DID_F193_ADDR 0x19C00
#define DIAGNOSE_STD_V_H (0x03) /* 客户诊断标准版本号 */
#define DIAGNOSE_STD_V_L (0x02)
#define DIAGNOSE_PARAMETER_V_H (0x01) /* 诊断调查表版本号 */
#define DIAGNOSE_PARAMETER_V_L (0x08)
extern KamData_t KamData;
void hdwinit(void);
void CAN_Pin_init(void);
/* End user code. Do not edit comment generated here */
#endif

78
ECU_APP/r_cg_wdt.c Normal file
View File

@ -0,0 +1,78 @@
/***********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2012, 2021 Renesas Electronics Corporation. All rights reserved.
***********************************************************************************************************************/
/***********************************************************************************************************************
* File Name : r_cg_wdt.c
* Version : CodeGenerator for RL78/F13 V2.03.07.02 [08 Nov 2021]
* Device(s) : R5F10BBG
* Tool-Chain : CCRL
* Description : This file implements device driver for WDT module.
* Creation Date: 2023-07-07
***********************************************************************************************************************/
/***********************************************************************************************************************
Includes
***********************************************************************************************************************/
#include "r_cg_macrodriver.h"
#include "r_cg_wdt.h"
/* Start user code for include. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
#include "r_cg_userdefine.h"
/***********************************************************************************************************************
Pragma directive
***********************************************************************************************************************/
/* Start user code for pragma. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
Global variables and functions
***********************************************************************************************************************/
/* Start user code for global. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
* Function Name: R_WDT_Create
* Description : This function initializes the watchdogtimer.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_WDT_Create(void)
{
WDTIMK = 1U; /* disable INTWDTI interrupt */
WDTIIF = 0U; /* clear INTWDTI interrupt flag */
/* Set INTWDTI low priority */
WDTIPR1 = 1U;
WDTIPR0 = 1U;
WDTIMK = 0U; /* enable INTWDTI interrupt */
}
/***********************************************************************************************************************
* Function Name: R_WDT_Restart
* Description : This function restarts the watchdog timer.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_WDT_Restart(void)
{
WDTE = 0xACU; /* restart watchdog timer */
}
/* Start user code for adding. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */

52
ECU_APP/r_cg_wdt.h Normal file
View File

@ -0,0 +1,52 @@
/***********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2012, 2021 Renesas Electronics Corporation. All rights reserved.
***********************************************************************************************************************/
/***********************************************************************************************************************
* File Name : r_cg_wdt.h
* Version : CodeGenerator for RL78/F13 V2.03.07.02 [08 Nov 2021]
* Device(s) : R5F10BBG
* Tool-Chain : CCRL
* Description : This file implements device driver for WDT module.
* Creation Date: 2023-07-07
***********************************************************************************************************************/
#ifndef WDT_H
#define WDT_H
/***********************************************************************************************************************
Macro definitions (Register bit)
***********************************************************************************************************************/
/***********************************************************************************************************************
Macro definitions
***********************************************************************************************************************/
/***********************************************************************************************************************
Typedef definitions
***********************************************************************************************************************/
/***********************************************************************************************************************
Global functions
***********************************************************************************************************************/
void R_WDT_Create(void);
void R_WDT_Restart(void);
/* Start user code for function. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
#endif

64
ECU_APP/r_cg_wdt_user.c Normal file
View File

@ -0,0 +1,64 @@
/***********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2012, 2021 Renesas Electronics Corporation. All rights reserved.
***********************************************************************************************************************/
/***********************************************************************************************************************
* File Name : r_cg_wdt_user.c
* Version : CodeGenerator for RL78/F13 V2.03.07.02 [08 Nov 2021]
* Device(s) : R5F10BBG
* Tool-Chain : CCRL
* Description : This file implements device driver for WDT module.
* Creation Date: 2023-07-07
***********************************************************************************************************************/
/***********************************************************************************************************************
Includes
***********************************************************************************************************************/
#include "r_cg_macrodriver.h"
#include "r_cg_wdt.h"
/* Start user code for include. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
#include "r_cg_userdefine.h"
/***********************************************************************************************************************
Pragma directive
***********************************************************************************************************************/
#pragma interrupt r_wdt_interrupt(vect=INTWDTI)
/* Start user code for pragma. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
Global variables and functions
***********************************************************************************************************************/
/* Start user code for global. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
* Function Name: r_wdt_interrupt
* Description : This function is INTWDTI interrupt service routine.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
static void __near r_wdt_interrupt(void)
{
/* Start user code. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
}
/* Start user code for adding. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */

185
ECU_APP/r_main.c Normal file
View File

@ -0,0 +1,185 @@
/***********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2012, 2021 Renesas Electronics Corporation. All rights reserved.
***********************************************************************************************************************/
/***********************************************************************************************************************
* File Name : r_main.c
* Version : CodeGenerator for RL78/F13 V2.03.07.02 [08 Nov 2021]
* Device(s) : R5F10BBG
* Tool-Chain : CCRL
* Description : This file implements main function.
* Creation Date: 2023-08-18
***********************************************************************************************************************/
/***********************************************************************************************************************
Includes
***********************************************************************************************************************/
#include "r_cg_macrodriver.h"
#include "r_cg_cgc.h"
#include "r_cg_port.h"
#include "r_cg_adc.h"
#include "r_cg_timer.h"
/* Start user code for include. Do not edit comment generated here */
#include "r_rl78_can_drv.h"
#include "r_rl78_can_sfr.h"
#include "RL78_RCAN.h"
#include "appTask.h"
#include "can_user.h"
#include "extern.h"
#include "PINdef.h"
#include "hwCtrl.h"
/* End user code. Do not edit comment generated here */
#include "r_cg_userdefine.h"
/***********************************************************************************************************************
Pragma directive
***********************************************************************************************************************/
/* Start user code for pragma. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
Global variables and functions
***********************************************************************************************************************/
/* Start user code for global. Do not edit comment generated here */
#pragma section bss KAM_SEG
KamData_t KamData;
#pragma section
unsigned int delay_count;
/* End user code. Do not edit comment generated here */
void R_MAIN_UserInit(void);
/***********************************************************************************************************************
* Function Name: main
* Description : This function implements main function.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void main(void)
{
R_MAIN_UserInit();
/* Start user code. Do not edit comment generated here */
//ADCE = 1U; //ADM0????????¡§???1?????????A/D??????????????¡§?????????
/*
POWER_UP_DELAY_CNT=POWER_UP_DELAY_TIME; //????????????¨¦??¨¦?????????????¡§??????
POWER_UP_STATUS=1;
EEL_READ(); //????????¡ã???¨¦?????
R_TAU0_Channel0_Start();
R_TAU0_Channel2_Start();
TB9102_Enable=1;
TB9102_MODE=1;
RecFreSetOld=0xff; //????¡ì?????????????????????¡ì????
ModeSetOld=0xff;
TempSetOld=0xff;
Can_Msg_Change_1(); //can??????????¡ì????
*/
/*
R_TAU0_Channel0_Start();//timer
C0CTRH &= ~0x0300; // ?????????????¡§????
TransmitCAN_Message(0x7FB,8,KamData.RspData); //???????????????????
C0CTRH &= ~0x0300; // ?????????????¡§????
*/
if(KamData.AckReq == ACK_REQ)
{
//FlgTemp = 1;
C0CTRH &= ~0x0300; // ?????????????¡§????
TransmitCAN_Message(CANTP_RESP_CANID,8,KamData.RspData); //???????????????????
}
value_init();
while (1U)
{
R_WDT_Restart();
Apply_task();
}
/* End user code. Do not edit comment generated here */
}
/***********************************************************************************************************************
* Function Name: R_MAIN_UserInit
* Description : This function adds user code before implementing main function.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_MAIN_UserInit(void)
{
/* Start user code. Do not edit comment generated here */
//hdwinit();
DID_data_save_init(); //??????
InitDcm_Parameter();
InitCanTp_Parameter();
CAN_Pin_init();
CAN_TX_MESSAGE_INIT();
CanNwInit();//¨¦??????????????¨¦??????????????CanNwInit(); ???¨¦????¡§CanUserInit(); ???¨¦??????¡ì?????????????CAN???????????¡ã??????
R_TAU0_Channel0_Start();
CAN_STB = 0;
CanUserInit();
R_ADC_Set_OperationOn();
R_ADC_Start();
R_TAU0_Channel1_Start();
//C0CTRHH = 0x03; //????¡ì????¨¦????¡è????????????????¡§????
//C0CTRLL = 0x00;
EI();
/* End user code. Do not edit comment generated here */
}
/* Start user code for adding. Do not edit comment generated here */
void CAN_Pin_init(void)
{
PM1_bit.no0 = 0;
P1_bit.no0 = 1;
PM1_bit.no1 = 1;
}
void test()
{
}
/***********************************************************************************************************************
* Function Name: Vectors_Isr_DefaultHandler
* Description : This function is not used default interrupt service routine.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void __near Vectors_Isr_DefaultHandler (void)
{
/*disable interrupts*/
// __DI();
/* halt system or wait for watchdog reset*/
// while(1)
{
__nop();
}
}
/* End user code. Do not edit comment generated here */

91
ECU_APP/r_systeminit.c Normal file
View File

@ -0,0 +1,91 @@
/***********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2012, 2021 Renesas Electronics Corporation. All rights reserved.
***********************************************************************************************************************/
/***********************************************************************************************************************
* File Name : r_systeminit.c
* Version : CodeGenerator for RL78/F13 V2.03.07.02 [08 Nov 2021]
* Device(s) : R5F10BBG
* Tool-Chain : CCRL
* Description : This file implements system initializing function.
* Creation Date: 2023-08-18
***********************************************************************************************************************/
/***********************************************************************************************************************
Includes
***********************************************************************************************************************/
#include "r_cg_macrodriver.h"
#include "r_cg_cgc.h"
#include "r_cg_port.h"
#include "r_cg_adc.h"
#include "r_cg_timer.h"
/* Start user code for include. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
#include "r_cg_userdefine.h"
/***********************************************************************************************************************
Pragma directive
***********************************************************************************************************************/
/* Start user code for pragma. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
Global variables and functions
***********************************************************************************************************************/
/* Start user code for global. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
* Function Name: R_Systeminit
* Description : This function initializes every macro.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_Systeminit(void)
{
/* Set periperal I/O redirection */
PIOR4 = 0x00U;
PIOR5 = 0x00U;
PIOR7 = 0x00U;
R_CGC_Get_ResetSource();
R_CGC_Create();
R_PORT_Create();
R_ADC_Create();
R_TAU0_Create();
R_TMR_RD0_Create();
R_TMR_RD1_Create();
/* Set invalid memory access detection control */
IAWCTL = 0x00U;
}
/***********************************************************************************************************************
* Function Name: hdwinit
* Description : This function initializes hardware setting.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void hdwinit(void)
{
DI();
R_Systeminit();
}
/* Start user code for adding. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */

View File

@ -0,0 +1,60 @@
/*******************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only
* intended for use with Renesas products. No other uses are authorized. This
* software is owned by Renesas Electronics Corporation and is protected under
* all applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software
* and to discontinue the availability of this software. By using this software,
* you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2013 Renesas Electronics Corporation. All rights reserved.
*******************************************************************************/
/*******************************************************************************
* File Name : RL78_RCAN.c
* Version : 1.0
* Description : This is source file for CAN configuration.
******************************************************************************/
/*****************************************************************************
* History : DD.MM.YYYY Version Description
* : 03.29.2013 1.00 First Release
******************************************************************************/
#include "r_cg_macrodriver.h"
#include "r_rl78_can_drv.h"
#include "r_rl78_can_sfr.h"
#include "RL78_RCAN.h"
#if CAN_RX_RULE_NUM > 0
const uint16_t g_rxrule_table[CAN_RX_RULE_NUM][6] = {
/* IDL IDH IDL_MASK IDH_MASK Store data filter */
{ 0x0741U, 0x0000U, 0xFFFFU, 0xDFFFU, 0x8002U, 0x8001U },
{ 0x07DFU, 0x0000U, 0xFFFFU, 0xDFFFU, 0x8102U, 0x8002U },
{ 0x0403U, 0x0000U, 0xFFFFU, 0xDFFFU, 0x8202U, 0x8003U },
{ 0x026DU, 0x0000U, 0xFFFFU, 0xDFFFU, 0x8302U, 0x8004U },
{ 0x0400U, 0x0000U, 0x0000U, 0xD480U, 0x8402U, 0x8005U }, //NW PDU
};
#endif
const uint8_t g_rxfifo0_use_mode = CAN_USE;
const uint8_t g_rxfifo1_use_mode = CAN_USE;
const uint8_t g_trfifo_use_mode = CAN_USE_TX_MODE;

View File

@ -0,0 +1,111 @@
/*******************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only
* intended for use with Renesas products. No other uses are authorized. This
* software is owned by Renesas Electronics Corporation and is protected under
* all applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software
* and to discontinue the availability of this software. By using this software,
* you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2013 Renesas Electronics Corporation. All rights reserved.
*******************************************************************************/
/*******************************************************************************
* File Name : RL78_RCAN.h
* Version : 1.0
* Description : This is include file for CAN configuration.
******************************************************************************/
/*****************************************************************************
* History : DD.MM.YYYY Version Description
* : 03.29.2013 1.00 First Release
******************************************************************************/
#ifndef RL78_RCAN_H
#define RL78_RCAN_H
//#define demo1
#define CAN_ENABLE 1U
#define CAN_DISABLE 0U
/* ---- Global setting ---- */
#define CAN_CFG_TX_PRIORITY CAN_TX_ID_FIRST
#define CAN_CFG_DLC_CHECK CAN_ENABLE
#define CAN_CFG_DLC_REPLACE CAN_DISABLE
#define CAN_CFG_MIRROR CAN_DISABLE
#define CAN_CFG_CLOCK CAN_SOURCE_PCLOCK_2
#define CAN_CFG_TS_CLOCK CAN_TS_PCLOCK_2
#define CAN_CFG_TS_PR CAN_TS_16_DIV
#define CAN_CFG_IT_PR 0U
#define CAN_CFG_OVERFLOW_IE CAN_DISABLE
#define CAN_CFG_MSG_LOST_IE CAN_ENABLE
#define CAN_CFG_DLC_ERROR_IE CAN_ENABLE
/* ---- Rx rule ---- */
#define CAN_RX_RULE_NUM_CH0 (5U)
#define CAN_RX_RULE_NUM CAN_RX_RULE_NUM_CH0
/* ---- Rx buffer ---- */
#define CAN_CFG_RBNUM (4U)
/* ---- RxFIFO ---- */
#define CAN_CFG_RXFIFO0 \
CAN_CFG_RXFIFO(CAN_FIFO_DEPTH_0, CAN_ENABLE, \
CAN_FIFO_INT_EACH_MSG, CAN_FIFO_THRESHOLD_1_8)
#define CAN_CFG_RXFIFO1 \
CAN_CFG_RXFIFO(CAN_FIFO_DEPTH_8, CAN_ENABLE, \
CAN_FIFO_INT_EACH_MSG, CAN_FIFO_THRESHOLD_1_8)
/* ---- Register value ---- */
#define CAN_CFG_GLB_CFGL \
CAN_CFG_GCFGL(CAN_CFG_TX_PRIORITY, \
CAN_CFG_DLC_CHECK, CAN_CFG_DLC_REPLACE, \
CAN_CFG_MIRROR, CAN_CFG_CLOCK, \
CAN_CFG_TS_CLOCK, CAN_CFG_TS_PR)
#define CAN_CFG_GLB_CFGH \
CAN_CFG_GCFGH(CAN_CFG_IT_PR)
#define CAN_CFG_GLB_ERR_INT \
CAN_CFG_GCTRL(CAN_CFG_OVERFLOW_IE, \
CAN_CFG_MSG_LOST_IE, CAN_CFG_DLC_ERROR_IE)
#define CAN_CFG_RN0 (CAN_RX_RULE_NUM_CH0)
/* ---- Channel 0 setting ---- */
#define CAN_CFG_C0_FUNC_L \
CAN_CFG_FUNCL(CAN_ENABLE, CAN_ENABLE, CAN_ENABLE, CAN_ENABLE, \
CAN_ENABLE, CAN_ENABLE, CAN_ENABLE, CAN_ENABLE)
#define CAN_CFG_C0_FUNC_H \
CAN_CFG_FUNCH(CAN_ENABLE, CAN_BOFF_RECOVERY_START_ENTRY, CAN_ERRDISP_ALL_ERR)
#define CAN_CFG_C0_BAUDRATE_L \
CAN_CFG_BAUDRATEL(1U)
#define CAN_CFG_C0_BAUDRATE_H \
CAN_CFG_BAUDRATEH(CAN_TSEG1_11TQ, CAN_TSEG2_4TQ, CAN_SJW_2TQ)
#define CAN_CFG_C0_TRFIFO0_L \
CAN_CFG_TRFIFO_TXL(CAN_FIFO_DEPTH_8, CAN_ENABLE, \
CAN_FIFO_INT_EACH_MSG)
#define CAN_CFG_C0_TRFIFO0_H \
CAN_CFG_TRFIFO_TXH(CAN_TX_BUFFER_0, 0, 0)
#define CAN_CFG_C0_TXBUF_IE (0x000EU)
#endif

View File

@ -0,0 +1,58 @@
<?xml version="1.0"?>
<ClassCANParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ArgCheck>false</ArgCheck>
<Device>
<SeriesName>RL78/F14</SeriesName>
<DeviceName>R5F10PXX</DeviceName>
<MainClock>20</MainClock>
<PClock>16</PClock>
<ChNum>1</ChNum>
</Device>
<GlobalSetting>
<TxPriority>ID_FIRST</TxPriority>
<DLCCheck>true</DLCCheck>
<DLCReplace>false</DLCReplace>
<Mirror>false</Mirror>
<CANClock>PCLOCK_2</CANClock>
<MainClock>20</MainClock>
<PClock>16</PClock>
<IntervalEnable>false</IntervalEnable>
<IntervalPr>1</IntervalPr>
<TSClock>PCLOCK_2</TSClock>
<TSPr>TS_16_DIV</TSPr>
<DLCIE>true</DLCIE>
<MsgLostIE>true</MsgLostIE>
</GlobalSetting>
<RxBufNumber>2</RxBufNumber>
<RxFIFO Enable="true" StageNumber="DEPTH_4" RxIE="true" RxIntMode="EACH_MSG" Threshold="THRESHOLD_4_8" />
<RxFIFO Enable="false" StageNumber="DEPTH_8" RxIE="true" RxIntMode="THRESHOLD" Threshold="THRESHOLD_2_8" />
<ChUse>
<ChUse>true</ChUse>
</ChUse>
<ChInfo>
<ChInfo>
<Baudrate Baudrate="500" Prescaler="2" TSEG1="11" TSEG2="4" SJW="2" />
<TRFIFO Enable="true" TRFIFOMode="TX_MODE" StageNumber="DEPTH_4" TxBuf="0" TxIE="true" RxIE="true" TxRxIntMode="EACH_MSG" Threshold="THRESHOLD_2_8" IntervalEnable="false" IntervalClock="CAN_BIT_CLK" IntervalNum="1" />
<TxBuffer TxIEs="15" TxAbortIE="true" />
<RxRule>
<RuleList>
<RxRule IDE="STANDARD" RTR="DATA" ID="1" IDMask="2047" DLCCheck="8" MirrorEnable="false" RxLabel="1" StoredArea="1" />
<RxRule IDE="STANDARD" RTR="DATA" ID="2" IDMask="2047" DLCCheck="8" MirrorEnable="false" RxLabel="2" StoredArea="128" />
<RxRule IDE="STANDARD" RTR="DATA" ID="1383" IDMask="2047" DLCCheck="4" MirrorEnable="false" RxLabel="3" StoredArea="128" />
</RuleList>
</RxRule>
<ErrorInfo>
<ArbitrationLostIE>true</ArbitrationLostIE>
<DominantLockIE>true</DominantLockIE>
<OverloadFrameIE>true</OverloadFrameIE>
<BoffRecoveryIE>true</BoffRecoveryIE>
<BoffStartIE>true</BoffStartIE>
<PassiveIE>true</PassiveIE>
<WarningIE>true</WarningIE>
<PErrorIE>true</PErrorIE>
<BOffRecovery>ISO11898</BOffRecovery>
<ErrDisp>ALL_ERR</ErrDisp>
</ErrorInfo>
</ChInfo>
</ChInfo>
</ClassCANParameters>

View File

@ -0,0 +1,892 @@
/*******************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only
* intended for use with Renesas products. No other uses are authorized. This
* software is owned by Renesas Electronics Corporation and is protected under
* all applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software
* and to discontinue the availability of this software. By using this software,
* you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2013 Renesas Electronics Corporation. All rights reserved.
*******************************************************************************/
/*******************************************************************************
* File Name : r_rl78_can_drv.c
* Version : 1.0
* Description : This is source file for CAN driver code.
******************************************************************************/
/*****************************************************************************
* History : DD.MM.YYYY Version Description
* : 29.03.2013 1.00 First Release
******************************************************************************/
/*****************************************************************************
Includes <System Includes> , "Project Includes"
*****************************************************************************/
#include "r_cg_macrodriver.h"
#include "r_rl78_can_drv.h"
#include "r_rl78_can_sfr.h"
#include "RL78_RCAN.h"
/*****************************************************************************
Typedef definitions
*****************************************************************************/
/*****************************************************************************
Macro definitions
*****************************************************************************/
#define CAN_FIFO_PTR_INC 0xffUL
#define CAN_8_BITS_MASK 0x00FFU
/*****************************************************************************
Private variables and functions
*****************************************************************************/
/*****************************************************************************
Exported global variables and functions (to be accessed by other files)
*****************************************************************************/
/******************************************************************************
* Function Name: R_Can_Init
* Description : Initialize CAN controller after reset
* Arguments : none
* Return Value : CAN_RTN_OK -
* normal completion
* CAN_RTN_RAM_INIT -
* CAN RAM initializing
* CAN_RTN_MODE_WAIT -
* wait to change global mode or channel mode
******************************************************************************/
volatile can_rxrule_sfr_t *p_RxRuleSfr; //
Can_RtnType R_CAN_Init(void)
{
/* ==== CAN RAM initialization ==== */
if ((GSTS & CAN_RAM_INIT_BIT_ON) != 0U) /*GSTS&0x80, waiting CAN RAM initialization completed*/
{
return CAN_RTN_RAM_INIT; /* return 05U */
}
/* ==== global mode switch (stop->reset) ==== */
if ((GSTS & CAN_GLB_STP_STS_BIT_ON) != 0U) /*GSTS&0x04, judgment global in stop mode*/
{
/* exit global stop mode */
GCTRL &= (uint16_t) ~(CAN_GLB_STP_BIT_ON); /* not in global stop mode*/
if ((GSTS & CAN_GLB_STP_STS_BIT_ON) != 0U) /*if still in stop mode*/
{
return CAN_RTN_MODE_WAIT; /* return 04u*/
}
}
/* ==== channel mode switch ==== */
/* --- switch from channel stop mode ---- */
if ((C0STSL & CAN_STP_STS_BIT_ON) != 0U) /* C0STSL & 0x04; judgment in channel stop mode*/
{
/* exit channel stop mode */
C0CTRL &= (uint16_t) ~(CAN_STP_BIT_ON); /* C0STSL & 0xFB; not in stop mode*/
if ((C0STSL & CAN_STP_STS_BIT_ON) != 0U)
{
return CAN_RTN_MODE_WAIT; /* return 04u*/
}
}
/* ==== global function setting ==== */
GCFGL = CAN_CFG_GLB_CFGL; /*ID priority, DLC check is disable, DLC replacment is disable
Mirror function is disabled, clock obtained by frequency-dividing Fclk by 2*/
GCFGH = CAN_CFG_GLB_CFGH; /*0x0000*/
// fcl/2--32M/2--16M
/* ==== communication speed setting: 500K ==== 16M/2/(11+4+1)=500K*/
// C0CFGL = CAN_CFG_C0_BAUDRATE_L; /*0x0001 Prescaler:2 */
C0CFGL = 0x1; // 500K
// C0CFGL = 0x3; //250K
C0CFGH = CAN_CFG_C0_BAUDRATE_H; /*CAN_TSEG1_11TQ, CAN_TSEG2_4TQ, CAN_SJW_2TQ*/
// C0CFGH = 0x022B; //TSEG1:0B,TSEG2:02,sample point=(12+1)/(12+3+1)=81.25%
/* ==== Rx rule setting ==== */
#if CAN_RX_RULE_NUM > 0
{
// volatile can_rxrule_sfr_t * p_RxRuleSfr; //
uint16_t temp_rpage;
uint16_t rxrule_idx;
/* ---- Set Rx rule number per channel ---- */
GAFLCFG = CAN_CFG_RN0; /*CAN_CFG_RN0=0x04*/
/* ---- Save value of GRWCR register ---- */
temp_rpage = GRWCR;
/* ---- Select window 0 ---- */
GRWCR &= (uint16_t) ~(CAN_RAM_WINDOW_BIT_ON); /*Setting GRWCR=0; Select window 0*/
/* ---- Copy Rx rule one by one ---- */ ///////////////////////////////
p_RxRuleSfr = (volatile can_rxrule_sfr_t *)&GAFLIDL0; //__near
for (rxrule_idx = 0U; rxrule_idx < CAN_RX_RULE_NUM; rxrule_idx++)
{
/* Set a single Rx rule */
p_RxRuleSfr->IDL = g_rxrule_table[rxrule_idx][0];
p_RxRuleSfr->IDH = g_rxrule_table[rxrule_idx][1];
p_RxRuleSfr->ML = g_rxrule_table[rxrule_idx][2];
p_RxRuleSfr->MH = g_rxrule_table[rxrule_idx][3];
p_RxRuleSfr->PL = g_rxrule_table[rxrule_idx][4];
p_RxRuleSfr->PH = g_rxrule_table[rxrule_idx][5];
/* Next sfr */
p_RxRuleSfr++;
}
/* ---- restore value of GRWCR register ---- */
GRWCR = temp_rpage;
}
#endif /* CAN_RX_RULE_NUM > 0 */
/* ==== buffer setting ==== */
/* ---- Set Rx buffer number ---- */
RMNB = CAN_CFG_RBNUM;
/* ---- Set Rx FIFO buffer ---- */
RFCC0 = CAN_CFG_RXFIFO0;
RFCC1 = CAN_CFG_RXFIFO1;
/* ---- Set common (Tx/Rx) FIFO buffer ---- */
CFCCL0 = CAN_CFG_C0_TRFIFO0_L;
CFCCH0 = CAN_CFG_C0_TRFIFO0_H;
/* ---- Tx buffer transmission complete interrupt ---- */
TMIEC = CAN_CFG_C0_TXBUF_IE;
/* ==== global error interrupt setting ==== */
GCTRL = (GCTRL & (CAN_GLB_STP_BIT_ON | CAN_GLB_MODE_BITS_ON)) + CAN_CFG_GLB_ERR_INT;
/* ==== channel function setting ==== */
C0CTRL = (C0CTRL & (CAN_STP_BIT_ON | CAN_MODE_BITS_ON)) + CAN_CFG_C0_FUNC_L;
//C0CTRLL = 0x02;
C0CTRH = C0CTRH + CAN_CFG_C0_FUNC_H;
//C0CTRH |= 0x300;
enable_interrupt_request_mask();
return CAN_RTN_OK;
}
/******************************************************************************
* Function Name: R_CAN_GlobalStart
* Description : Start global operation
* Arguments : none
* Return Value : CAN_RTN_OK -
* normal completion
* CAN_RTN_MODE_WAIT -
* wait to change global mode
******************************************************************************/
Can_RtnType R_CAN_GlobalStart(void)
{
/* ==== switch to global operation mode from global reset mode ==== */
if ((GSTS & CAN_GLB_RST_STS_BIT_ON) != 0U) /*in global reset mode*/
{
GCTRL = ((GCTRL & (uint16_t)~CAN_GLB_MODE_BITS_ON) |
CAN_GLB_OPERATION_MODE);
if ((GSTS & CAN_GLB_RST_STS_BIT_ON) != 0U)
{
return CAN_RTN_MODE_WAIT;
}
}
/* ==== Global error ==== */
GERFLL = 0x0U; /*clear DLC error flag*/
/* ==== enable reception FIFO ==== */
if (g_rxfifo0_use_mode != CAN_NOUSE)
{
RFCC0 |= CAN_RFIFO_EN_BIT_ON;
}
if (g_rxfifo1_use_mode != CAN_NOUSE)
{
RFCC1 |= CAN_RFIFO_EN_BIT_ON;
}
/* ==== Tx/Rx FIFO setting ==== */
/* ---- enable Tx/Rx FIFO (Rx mode) ---- */
if (g_trfifo_use_mode == CAN_USE_RX_MODE)
{
CFCCL0 |= CAN_TRFIFO_EN_BIT_ON;
}
return CAN_RTN_OK;
}
/******************************************************************************
* Function Name: R_CAN_ChStart_CH0
* Description : Start channel operation (Channel 0)
* Arguments : none
* Return Value : CAN_RTN_OK -
* normal completion
* CAN_RTN_MODE_WAIT -
* wait to change channel mode
******************************************************************************/
Can_RtnType R_CAN_ChStart_CH0(void)
{
/* ---- switch to channel operation mode ---- */
if ((C0STSL & CAN_RST_STS_BIT_ON) != 0U)
{
C0CTRL = (C0CTRL & (uint16_t)~CAN_MODE_BITS_ON) | CAN_MODE_CH_COMM_MODE;
if ((C0STSL & CAN_RST_STS_BIT_ON) != 0U)
{
return CAN_RTN_MODE_WAIT;
}
}
/* ---- enable Tx/Rx FIFO (Tx mode) ---- */
if (g_trfifo_use_mode == CAN_USE_TX_MODE)
{
CFCCL0 |= CAN_TRFIFO_EN_BIT_ON;
}
return CAN_RTN_OK;
}
/******************************************************************************
* Function Name: R_CAN_TrmByTxBuf_CH0
* Description : Transmit a frame by Tx buffer (Channel 0)
* Arguments : txbuf_idx -
* Tx buffer index
* pFrame -
* pointer to frame to be transmitted
* Return Value : CAN_RTN_OK -
* normal completion
* CAN_RTN_STS_ERROR -
* failure to clear Tx buffer status
* CAN_RTN_ARG_ERROR -
* invalid argument specification
******************************************************************************/
Can_RtnType R_CAN_TrmByTxBuf_CH0(can_txbuf_t txbuf_idx,
const can_frame_t *pFrame)
{
#if defined(__CHECK__)
/* ---- Check Tx buffer index ---- */
if (txbuf_idx >= CAN_MAX_TXBUF_NUM)
{
return CAN_RTN_ARG_ERROR;
}
#endif
/* ---- Clear Tx buffer status ---- */
{
volatile uint8_t *p_TMSTSp; //__near
p_TMSTSp = CAN_ADDR_TMSTSp(txbuf_idx);
*p_TMSTSp = 0x0U;
if (*p_TMSTSp != 0x0U)
{
return CAN_RTN_STS_ERROR;
}
}
/* ---- Store message to tx buffer ---- */
{
volatile can_frame_sfr_t *p_TxMsgSfr; // __near
uint16_t temp_rpage;
/* ---- Save value of GRWCR register ---- */
temp_rpage = GRWCR;
/* ---- Select window 1 ---- */
GRWCR |= CAN_RAM_WINDOW_BIT_ON;
/* ---- Set frame data ---- */
p_TxMsgSfr = CAN_ADDR_TMIDLp(txbuf_idx);
p_TxMsgSfr->IDL = ((can_frame_sfr_t *)pFrame)->IDL;
p_TxMsgSfr->IDH = ((can_frame_sfr_t *)pFrame)->IDH;
p_TxMsgSfr->PTR = ((can_frame_sfr_t *)pFrame)->PTR;
p_TxMsgSfr->DF0 = ((can_frame_sfr_t *)pFrame)->DF0;
p_TxMsgSfr->DF1 = ((can_frame_sfr_t *)pFrame)->DF1;
p_TxMsgSfr->DF2 = ((can_frame_sfr_t *)pFrame)->DF2;
p_TxMsgSfr->DF3 = ((can_frame_sfr_t *)pFrame)->DF3;
/* ---- Restore value of GRWCR register ---- */
GRWCR = temp_rpage;
}
/* ---- Set transmission request ---- */
TMCp(txbuf_idx) = CAN_TXBUF_TRM_BIT_ON;
return CAN_RTN_OK;
}
/******************************************************************************
* Function Name: R_CAN_AbortTrm_CH0
* Description : Abort a CAN transmission (Channel 0)
* Arguments : txbuf_idx -
* Tx buffer index
* Return Value : CAN_RTN_OK -
* normal completion
* CAN_RTN_ARG_ERROR -
* invalid argument specification
******************************************************************************/
Can_RtnType R_CAN_AbortTrm_CH0(can_txbuf_t txbuf_idx)
{
#if defined(__CHECK__)
/* ---- Check Tx buffer index ---- */
if (txbuf_idx >= CAN_MAX_TXBUF_NUM)
{
return CAN_RTN_ARG_ERROR;
}
#endif
/* ---- Set transmission abort request ---- */
TMCp(txbuf_idx) |= CAN_TXBUF_ABT_BIT_ON;
return CAN_RTN_OK;
}
/******************************************************************************
* Function Name: R_CAN_CheckTxBufResult_CH0
* Description : Read the result of transmission from Tx buffer (Channel 0)
* Arguments : txbuf_idx -
* Tx buffer index
* Return Value : CAN_RTN_TRANSMITTING -
* Transmission is in progress
* or no transmit request is present.
* CAN_RTN_TX_ABORT_OVER -
* Transmit abort has been completed.
* CAN_RTN_TX_END -
* Transmission has been completed
* (without transmit abort request).
* CAN_RTN_TX_END_WITH_ABORT_REQ -
* Transmission has been completed
* (with transmit abort request).
* CAN_RTN_ARG_ERROR -
* invalid argument specification
******************************************************************************/
Can_RtnType R_CAN_CheckTxBufResult_CH0(can_txbuf_t txbuf_idx)
{
Can_RtnType rtn_value;
volatile uint8_t *p_TMSTSp; //__near
#if defined(__CHECK__)
/* ---- Check Tx buffer index ---- */
if (txbuf_idx >= CAN_MAX_TXBUF_NUM)
{
return CAN_RTN_ARG_ERROR;
}
#endif
p_TMSTSp = CAN_ADDR_TMSTSp(txbuf_idx);
rtn_value = (Can_RtnType)((*p_TMSTSp & CAN_TXBUF_RSLT_BITS_ON) >> CAN_TXBUF_RSLT_BITS_POS);
/* ---- Tx transmission completed/abort? ---- */
if (rtn_value != CAN_RTN_TRANSMITTING)
{
/* Clear Tx buffer status */
*p_TMSTSp = 0x0U;
}
return rtn_value;
}
/******************************************************************************
* Function Name: R_CAN_TrmByTRFIFO0_CH0
* Description : Transmit a frame by common (Tx/Rx) FIFO 0 (Channel 0)
* Arguments : ch_idx -
* channel index
* trfifo_idx -
* Tx/Rx FIFO index
* pFrame -
* pointer to frame to be transmitted
* Return Value : CAN_RTN_OK -
* Frame is successfully pushed into FIFO.
* CAN_RTN_FIFO_FULL -
* Specified FIFO is full.
* CAN_RTN_ARG_ERROR -
* invalid argument specification
******************************************************************************/
Can_RtnType R_CAN_TrmByTRFIFO0_CH0(const can_frame_t *pFrame)
{
#if defined(__CHECK__)
/* ---- Check Tx/Rx FIFO 0 mode ---- */
if (g_trfifo_use_mode != CAN_USE_TX_MODE)
{
return CAN_RTN_ARG_ERROR;
}
#endif
/* ---- Return if Tx/Rx FIFO is full ---- */
if ((CFSTS0 & CAN_TRFIFO_FULL_BIT_ON) != 0)
{
return CAN_RTN_FIFO_FULL;
}
/* ---- Send message into Tx/Rx FIFO if it is not full ---- */
{
uint16_t temp_rpage;
/* ---- save value of GRWCR register ---- */
temp_rpage = GRWCR;
/* ---- Select window 1 ---- */
GRWCR |= CAN_RAM_WINDOW_BIT_ON;
/* ---- Set frame data ---- */
CFIDL0 = ((can_frame_sfr_t *)pFrame)->IDL;
CFIDH0 = ((can_frame_sfr_t *)pFrame)->IDH;
CFPTR0 = ((can_frame_sfr_t *)pFrame)->PTR;
CFDF00 = ((can_frame_sfr_t *)pFrame)->DF0;
CFDF10 = ((can_frame_sfr_t *)pFrame)->DF1;
CFDF20 = ((can_frame_sfr_t *)pFrame)->DF2;
CFDF30 = ((can_frame_sfr_t *)pFrame)->DF3;
/* ---- restore value of GRWCR register ---- */
GRWCR = temp_rpage;
}
/* ---- Increment Tx/Rx FIFO buffer pointer ---- */
CFPCTR0 = CAN_FIFO_PTR_INC;
return CAN_RTN_OK;
}
/******************************************************************************
* Function Name: R_CAN_ReadRxBuffer
* Description : Read message from Rx buffer
* Arguments : p_rxbuf_idx -
* pointer to Rx buffer that receives frame
* pFrame -
* pointer to stored frame position
* Return Value : CAN_RTN_OK -
* A frame is successfully read out.
* CAN_RTN_BUFFER_EMPTY -
* No frame is read out.
* CAN_RTN_STS_ERROR -
* failure to clear Rx complete flag
* CAN_RTN_OVERWRITE -
* A frame is overwritten.
******************************************************************************/
Can_RtnType R_CAN_ReadRxBuffer(uint8_t *p_rxbuf_idx, can_frame_t *pFrame)
{
uint8_t buf_idx;
uint16_t temp_rbrcf;
uint16_t pattern;
/* ---- Judge if new messages are available ---- */
temp_rbrcf = RMND0;
if (temp_rbrcf == 0)
{
return CAN_RTN_BUFFER_EMPTY;
}
/* ---- Get Rx buffer that has new message ---- */
if (temp_rbrcf != 0)
{
pattern = 1;
for (buf_idx = 0U; buf_idx < 16U; ++buf_idx)
{
if ((temp_rbrcf & pattern) != 0)
{
*p_rxbuf_idx = buf_idx;
break;
}
pattern <<= 1;
}
}
/* ---- Clear Rx complete flag of corresponding Rx buffer ---- */
RMND0 &= (uint16_t)~pattern;
if ((RMND0 & pattern) != 0)
{
return CAN_RTN_STS_ERROR;
}
/* ---- Read out message from Rx buffer ---- */
{
volatile can_frame_sfr_t *p_RxBufSfr; // __near
uint16_t temp_rpage;
/* ---- Save value of GRWCR register ---- */
temp_rpage = GRWCR;
/* ---- Select window 1 ---- */
GRWCR |= CAN_RAM_WINDOW_BIT_ON;
/* ---- Read frame data ---- */
p_RxBufSfr = CAN_ADDR_RMIDLp(*p_rxbuf_idx);
((can_frame_sfr_t *)pFrame)->IDL = p_RxBufSfr->IDL;
((can_frame_sfr_t *)pFrame)->IDH = p_RxBufSfr->IDH;
((can_frame_sfr_t *)pFrame)->TS = p_RxBufSfr->TS;
((can_frame_sfr_t *)pFrame)->PTR = p_RxBufSfr->PTR;
((can_frame_sfr_t *)pFrame)->DF0 = p_RxBufSfr->DF0;
((can_frame_sfr_t *)pFrame)->DF1 = p_RxBufSfr->DF1;
((can_frame_sfr_t *)pFrame)->DF2 = p_RxBufSfr->DF2;
((can_frame_sfr_t *)pFrame)->DF3 = p_RxBufSfr->DF3;
/* ---- restore value of GRWCR register ---- */
GRWCR = temp_rpage;
}
/* ---- Judge if current message is overwritten ---- */
if ((RMND0 & pattern) != 0)
{
return CAN_RTN_OVERWRITE;
}
return CAN_RTN_OK;
}
/******************************************************************************
* Function Name: R_CAN_ReadRxFIFO
* Description : Read message from Rx FIFO
* Arguments : rxfifo_idx -
* Rx FIFO index
* pFrame -
* pointer to stored frame position
* Return Value : CAN_RTN_OK -
* A frame is successfully read out.
* CAN_RTN_OK_WITH_LOST -
* A frame is successfully read out (with message lost).
* CAN_RTN_BUFFER_EMPTY -
* No frame is read out.
* CAN_RTN_ARG_ERROR -
* invalid argument specification
******************************************************************************/
extern Can_RtnType R_CAN_ReadRxFIFO0(can_frame_t *);
extern Can_RtnType R_CAN_ReadRxFIFO1(can_frame_t *);
Can_RtnType R_CAN_ReadRxFIFO(can_rxfifo_t rxfifo_idx, can_frame_t *pFrame)
{
if (rxfifo_idx == 0)
{
return R_CAN_ReadRxFIFO0(pFrame);
}
else if (rxfifo_idx == 1)
{
return R_CAN_ReadRxFIFO1(pFrame);
#if defined(__CHECK__)
}
else
{
return CAN_RTN_ARG_ERROR;
#endif
}
return CAN_RTN_OK;
}
/******************************************************************************
* Function Name: R_CAN_ReadRxFIFO0
* Description : Read message from Rx FIFO 0
* Arguments : pFrame -
* pointer to stored frame position
* Return Value : CAN_RTN_OK -
* A frame is successfully read out.
* CAN_RTN_OK_WITH_LOST -
* A frame is successfully read out (with message lost).
* CAN_RTN_BUFFER_EMPTY -
* No frame is read out.
* CAN_RTN_ARG_ERROR -
* invalid argument specification
******************************************************************************/
Can_RtnType R_CAN_ReadRxFIFO0(can_frame_t *pFrame)
{
uint16_t temp_status;
Can_RtnType rtn_value;
#if defined(__CHECK__)
/* ---- Check Rx FIFO 0 mode ---- */
if ((g_rxfifo0_use_mode == CAN_NOUSE))
{
return CAN_RTN_ARG_ERROR;
}
#endif
/* ---- Check if any unread message is available in Rx FIFO ---- */
temp_status = RFSTS0;
if ((temp_status & CAN_RFIFO_EMPTY_BIT_ON) != 0)
{
return CAN_RTN_BUFFER_EMPTY;
}
/* ---- Set return value ---- */
rtn_value = CAN_RTN_OK;
/* ---- Check if Rx FIFO has message lost ---- */
if ((temp_status & CAN_RFIFO_MSGLST_BIT_ON) != 0)
{
/* ---- Clear message lost flag ---- */
RFSTS0 = CAN_CLR_WITHOUT_RX_INT;
/* ---- Set return value ---- */
rtn_value = CAN_RTN_OK_WITH_LOST;
}
RFSTS0 &= 0xFFF7; /*Clear RFIF receive FIFO interrupt request flag*/
/* ---- Read out message from Rx FIFO ---- */
{
uint16_t temp_rpage;
/* ---- Save value of GRWCR register ---- */
temp_rpage = GRWCR;
/* ---- Select window 1 ---- */
GRWCR |= CAN_RAM_WINDOW_BIT_ON;
/* ---- Read frame data ---- */
((can_frame_sfr_t *)pFrame)->IDL = RFIDL0;
((can_frame_sfr_t *)pFrame)->IDH = RFIDH0;
((can_frame_sfr_t *)pFrame)->TS = RFTS0;
((can_frame_sfr_t *)pFrame)->PTR = RFPTR0;
((can_frame_sfr_t *)pFrame)->DF0 = RFDF00;
((can_frame_sfr_t *)pFrame)->DF1 = RFDF10;
((can_frame_sfr_t *)pFrame)->DF2 = RFDF20;
((can_frame_sfr_t *)pFrame)->DF3 = RFDF30;
/* ---- Restore value of GRWCR register ---- */
GRWCR = temp_rpage;
}
/* ---- Increment Rx FIFO buffer pointer ---- */
RFPCTR0 = CAN_FIFO_PTR_INC;
return rtn_value;
}
/******************************************************************************
* Function Name: R_CAN_ReadRxFIFO1
* Description : Read message from Rx FIFO 1
* Arguments : pFrame -
* pointer to stored frame position
* Return Value : CAN_RTN_OK -
* A frame is successfully read out.
* CAN_RTN_OK_WITH_LOST -
* A frame is successfully read out (with message lost).
* CAN_RTN_BUFFER_EMPTY -
* No frame is read out.
* CAN_RTN_ARG_ERROR -
* invalid argument specification
******************************************************************************/
Can_RtnType R_CAN_ReadRxFIFO1(can_frame_t *pFrame)
{
uint16_t temp_status;
Can_RtnType rtn_value;
#if defined(__CHECK__)
/* ---- Check Rx FIFO 1 mode ---- */
if ((g_rxfifo1_use_mode == CAN_NOUSE))
{
return CAN_RTN_ARG_ERROR;
}
#endif
/* ---- Check if any unread message is available in Rx FIFO ---- */
temp_status = RFSTS1;
if ((temp_status & CAN_RFIFO_EMPTY_BIT_ON) != 0)
{
return CAN_RTN_BUFFER_EMPTY;
}
/* ---- Set return value ---- */
rtn_value = CAN_RTN_OK;
/* ---- Check if Rx FIFO has message lost ---- */
if ((temp_status & CAN_RFIFO_MSGLST_BIT_ON) != 0)
{
/* ---- Clear message lost flag ---- */
RFSTS1 = CAN_CLR_WITHOUT_RX_INT;
/* ---- Set return value ---- */
rtn_value = CAN_RTN_OK_WITH_LOST;
}
RFSTS1 &= ~CAN_CLR_WITHOUT_RX_INT;
/* ---- Read out message from Rx FIFO ---- */
{
uint16_t temp_rpage;
/* ---- Save value of GRWCR register ---- */
temp_rpage = GRWCR;
/* ---- Select window 1 ---- */
GRWCR |= CAN_RAM_WINDOW_BIT_ON;
/* ---- Read frame data ---- */
((can_frame_sfr_t *)pFrame)->IDL = RFIDL1;
((can_frame_sfr_t *)pFrame)->IDH = RFIDH1;
((can_frame_sfr_t *)pFrame)->TS = RFTS1;
((can_frame_sfr_t *)pFrame)->PTR = RFPTR1;
((can_frame_sfr_t *)pFrame)->DF0 = RFDF01;
((can_frame_sfr_t *)pFrame)->DF1 = RFDF11;
((can_frame_sfr_t *)pFrame)->DF2 = RFDF21;
((can_frame_sfr_t *)pFrame)->DF3 = RFDF31;
/* ---- Restore value of GRWCR register ---- */
GRWCR = temp_rpage;
}
/* ---- Increment Rx FIFO buffer pointer ---- */
RFPCTR1 = CAN_FIFO_PTR_INC;
return rtn_value;
}
/******************************************************************************
* Function Name: R_CAN_ReadTRFIFO
* Description : Read message from common (Tx/Rx) FIFO
* Arguments : ch_idx -
* channel index
* trfifo_idx -
* common (Tx/Rx) FIFO index
* pFrame -
* pointer to stored frame position
* Return Value : CAN_RTN_OK -
* A frame is successfully read out.
* CAN_RTN_OK_WITH_LOST -
* A frame is successfully read out (with message lost).
* CAN_RTN_BUFFER_EMPTY -
* No frame is read out.
* CAN_RTN_ARG_ERROR -
* invalid argument specification
******************************************************************************/
Can_RtnType R_CAN_ReadTRFIFO0_CH0(can_frame_t *pFrame)
{
uint16_t temp_status;
Can_RtnType rtn_value;
#if defined(__CHECK__)
/* ---- Check Tx/Rx FIFO 0 mode ---- */
if (g_trfifo_use_mode != CAN_USE_RX_MODE)
{
return CAN_RTN_ARG_ERROR;
}
#endif
/* ---- Check if any unread message is available in common (Tx/Rx) FIFO ---- */
temp_status = CFSTS0;
if ((temp_status & CAN_TRFIFO_EMPTY_BIT_ON) != 0)
{
return CAN_RTN_BUFFER_EMPTY;
}
/* ---- Set return value ---- */
rtn_value = CAN_RTN_OK;
/* ---- Check if common (Tx/Rx) FIFO has message lost ---- */
if ((temp_status & CAN_TRFIFO_MSGLST_BIT_ON) != 0)
{
/* ---- Clear message lost flag ---- */
CFSTS0 = CAN_CLR_WITHOUT_TX_RX_INT;
/* ---- Set return value ---- */
rtn_value = CAN_RTN_OK_WITH_LOST;
}
/* ---- Read out message from common (Tx/Rx) FIFO ---- */
{
uint16_t temp_rpage;
/* ---- Save value of GRWCR register ---- */
temp_rpage = GRWCR;
/* ---- Select window 1 ---- */
GRWCR |= CAN_RAM_WINDOW_BIT_ON;
/* ---- Read frame data ---- */
((can_frame_sfr_t *)pFrame)->IDL = CFIDL0;
((can_frame_sfr_t *)pFrame)->IDH = CFIDH0;
((can_frame_sfr_t *)pFrame)->TS = CFTS0;
((can_frame_sfr_t *)pFrame)->PTR = CFPTR0;
((can_frame_sfr_t *)pFrame)->DF0 = CFDF00;
((can_frame_sfr_t *)pFrame)->DF1 = CFDF10;
((can_frame_sfr_t *)pFrame)->DF2 = CFDF20;
((can_frame_sfr_t *)pFrame)->DF3 = CFDF30;
/* ---- Restore value of GRWCR register ---- */
GRWCR = temp_rpage;
}
/* ---- Increment common (Tx/Rx) FIFO buffer pointer ---- */
CFPCTR0 = CAN_FIFO_PTR_INC;
return rtn_value;
}
/******************************************************************************
* Function Name: R_CAN_ReadChStatus
* Description : Read channel status
* Arguments : none
* Return Value : channel status (<= 0xFF) -
* normal completion
******************************************************************************/
Can_RtnType R_CAN_ReadChStatus_CH0(void)
{
return (Can_RtnType)(C0STSL & CAN_8_BITS_MASK);
}
/******************************************************************************
* Function Name: R_CAN_ReadChStatus
* Description : Read channel status
* Arguments : none
* Return Value : channel status (<= 0xFF) -
* normal completion
******************************************************************************/
void enable_interrupt_request_mask()
{
CAN0CFRIF = 0U;
CAN0WUPIF = 0U;
CAN0ERRIF = 0U;
CANGERRIF = 0U;
CANGRFRIF = 0U;
CAN0TRMIF = 0U;
// CAN0CFRMK=0U;
// CAN0WUPMK=0U;
CAN0ERRMK = 0U;
CANGERRMK = 0U;
CANGRFRMK = 0U;
CAN0TRMMK = 0U;
}
void CanUserInit(void)
{
Can_RtnType retval;
CAN0EN = 0;
NOP();
/* supply CAN clock */
CAN0EN = 1;
/* CAN Initialize */
retval = CAN_RTN_RAM_INIT; // CAN_RTN_RAM_INIT=5U
while (retval != CAN_RTN_OK)
{
retval = R_CAN_Init();
}
/* Set global operating mode */
retval = CAN_RTN_MODE_WAIT;
while (retval == CAN_RTN_MODE_WAIT)
{
retval = R_CAN_GlobalStart();
}
/* CH0 -> Channel communication mode */
retval = CAN_RTN_MODE_WAIT;
while (retval == CAN_RTN_MODE_WAIT)
{
retval = R_CAN_ChStart(CAN_CH0);
}
}

Some files were not shown because too many files have changed in this diff Show More