This commit is contained in:
sunbeam 2024-05-26 08:08:32 +08:00
commit 0239737b59
140 changed files with 39437 additions and 0 deletions

2
CAN_Bootloader/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/dist
/.build

BIN
CAN_Bootloader/MSW.dll Normal file

Binary file not shown.

BIN
CAN_Bootloader/USB2XXX.dll Normal file

Binary file not shown.

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<project ver="10" name="CAN_Bootloader" libEmbed="true" icon="..." ui="win" output="CAN_Bootloader.exe" CompanyName="单位名称" FileDescription="CAN_Bootloader" LegalCopyright="Copyright (C) 作者 2022" ProductName="CAN_Bootloader" InternalName="CAN_Bootloader" FileVersion="0.0.0.03" ProductVersion="0.0.0.03" publishDir="/dist/" dstrip="false" local="false" ignored="false">
<file name="main.aardio" path="main.aardio" comment="main.aardio"/>
<folder name="资源文件" path="res" embed="true" local="false" ignored="false"/>
<folder name="窗体文件" path="dlg" comment="目录" embed="true" local="false" ignored="false">
<file name="诊断子窗口.aardio" path="dlg\诊断子窗口.aardio" comment="dlg\诊断子窗口.aardio"/>
</folder>
<folder name="user" path="user" embed="true" comment="目录" local="false" ignored="false">
<file name="CanThread.aardio" path="user\CanThread.aardio" comment="user\CanThread.aardio"/>
<file name="Diag10code.aardio" path="user\Diag10code.aardio" comment="user\Diag10code.aardio"/>
<file name="Diag11code.aardio" path="user\Diag11code.aardio" comment="user\Diag11code.aardio"/>
<file name="Diag22code.aardio" path="user\Diag22code.aardio" comment="user\Diag22code.aardio"/>
<file name="Diag27code.aardio" path="user\Diag27code.aardio" comment="user\Diag27code.aardio"/>
<file name="Diag28code.aardio" path="user\Diag28code.aardio" comment="user\Diag28code.aardio"/>
<file name="Diag2Ecode.aardio" path="user\Diag2Ecode.aardio" comment="user\Diag2Ecode.aardio"/>
<file name="Diag31code.aardio" path="user\Diag31code.aardio" comment="user\Diag31code.aardio"/>
<file name="Diag34code.aardio" path="user\Diag34code.aardio" comment="user\Diag34code.aardio"/>
<file name="Diag36code.aardio" path="user\Diag36code.aardio" comment="user\Diag36code.aardio"/>
<file name="Diag37code.aardio" path="user\Diag37code.aardio" comment="user\Diag37code.aardio"/>
<file name="Diag7Fcode.aardio" path="user\Diag7Fcode.aardio" comment="user\Diag7Fcode.aardio"/>
<file name="Diag85code.aardio" path="user\Diag85code.aardio" comment="user\Diag85code.aardio"/>
<file name="DiagBootcode.aardio" path="user\DiagBootcode.aardio" comment="user\DiagBootcode.aardio"/>
<file name="GeelySecurety.aardio" path="user\GeelySecurety.aardio" comment="user\GeelySecurety.aardio"/>
<file name="S19Decode.aardio" path="user\S19Decode.aardio" comment="user\S19Decode.aardio"/>
<file name="securety.aardio" path="user\securety.aardio" comment="user\securety.aardio"/>
</folder>
</project>

View File

@ -0,0 +1,87 @@
import win.ui;
/*DSG{{*/
var winform = win.form(text="诊断读取";right=679;bottom=499;border="thin";max=false;mode="popup")
winform.add(
btnDID_F010={cls="button";text="F010";left=178;top=162;right=305;bottom=193;z=11};
btnDID_F010w={cls="button";text="写F010";left=336;top=296;right=463;bottom=327;z=16};
btnDID_F101={cls="button";text="F101";left=178;top=203;right=305;bottom=234;z=10};
btnDID_F101w={cls="button";text="写F101";left=338;top=335;right=458;bottom=366;z=15};
btnDID_F159={cls="button";text="F159";left=36;top=162;right=163;bottom=193;z=5};
btnDID_F15A={cls="button";text="F15A";left=36;top=203;right=163;bottom=234;z=6};
btnDID_F180={cls="button";text="F180";left=178;top=40;right=305;bottom=71;z=7};
btnDID_F187={cls="button";text="零部件编号";left=36;top=40;right=163;bottom=71;z=2};
btnDID_F18A={cls="button";text="供应商名称";left=36;top=80;right=163;bottom=111;z=3};
btnDID_F18C={cls="button";text="F18C";left=178;top=80;right=305;bottom=111;z=8};
btnDID_F190={cls="button";text="F190 VIN";left=178;top=121;right=305;bottom=152;z=9};
btnDID_F197={cls="button";text="ECU 系统名称";left=36;top=121;right=163;bottom=152;z=4};
btn_1003={cls="button";text="扩展会话";left=22;top=296;right=126;bottom=323;z=14};
btn_2701={cls="button";text="解锁";left=158;top=296;right=262;bottom=323;z=13};
groupbox={cls="groupbox";text="DID";left=16;top=12;right=328;bottom=260;edge=1;z=1};
groupbox2={cls="groupbox";text="DTC";left=343;top=12;right=655;bottom=260;edge=1;z=12}
)
/*}}*/
winform.btnDID_F180.oncommand = function(id,event){
DiagReadDID(0xF180);
}
winform.btnDID_F18A.oncommand = function(id,event){
DiagReadDID(0xF18A);
}
winform.btnDID_F197.oncommand = function(id,event){
DiagReadDID(0xF197);
}
winform.btnDID_F159.oncommand = function(id,event){
DiagReadDID(0xF159);
}
winform.btnDID_F15A.oncommand = function(id,event){
DiagReadDID(0xF15A);
}
winform.btnDID_F18C.oncommand = function(id,event){
DiagReadDID(0xF18C);
}
winform.btnDID_F190.oncommand = function(id,event){
DiagReadDID(0xF190);
}
winform.btnDID_F010.oncommand = function(id,event){
DiagReadDID(0xF010);
}
winform.btnDID_F101.oncommand = function(id,event){
DiagReadDID(0xF101);
}
winform.onClose = function(hwnd,message,wParam,lParam){
winform.show(false);
return 0;
}
winform.btn_2701.oncommand = function(id,event){
::PostThreadMessage(thrdId,114,0x01,0)//自定义消息
}
winform.btn_1003.oncommand = function(id,event){
::PostThreadMessage(thrdId,111,0x00,0x03)//自定义消息
}
winform.btnDID_F187.oncommand = function(id,event){
DiagReadDID(0xF187);
}
winform.btnDID_F010w.oncommand = function(id,event){
::PostThreadMessage(thrdId,115,0xF010,0x00)//自定义消息
}
winform.btnDID_F101w.oncommand = function(id,event){
::PostThreadMessage(thrdId,115,0xF101,0x00)//自定义消息
}
winform.show();
win.loopMessage();
return winform;

View File

@ -0,0 +1,20 @@
//config 配置文件
import fsys.config;
config = fsys.config("/config/");
//config = fsys.config( io.appData("/软件作者/应用程序名/") );
//不需要序列化的配置名字前请添加下划线
namespace config {
__appName = "应用程序名";
__appVersion = "1.0.0.01";
__appDescription = "这是一个测试程序";
__website = "http://www.aardio.com/";
}
/**intellisense(config)
__appName = 应用程序名
__appVersion = 应用程序内部版本号
__appDescription = 程序说明
__website = 官方网站
? = 配置文件名,\n读写配置并序列化为一个表对象,\n表的成员值可以是支持序列化的普通变量,支持table对象\n配置文件在首次使用时自动加载,退出程序时自动保存\n!fsys_table.
end intellisense**/

View File

@ -0,0 +1,411 @@
/*
*使用说明:
*1.创建CAN设备对象 CANHw = usb2canfd.USB2CANHW();
*2.加载DLL CANHw.LoadDll();
*3.扫描设备 hwnum = CANHw.FlashHw();
*4.获取可用设备 allhw = CANHw.GetAvailableHW();
*5.打开设备(初始化) CANHw.OpenDevice(设备序号,通道)
*6.通过SendMsg和GetMsg发送和获取报文
*/
namespace usb2canfd{
//参考 http://www.toomoss.com/help/index.htm
//初始化CAN的数据类型定义
class CANFD_INIT_CONFIG{
ctor( /*输入构造函数所需要的参数*/ ){
};
type=me;
/*对象的所有成员必须用分号分隔*/
BYTE Mode; //0-正常模式1-自发自收模式
BYTE ISOCRCEnable;//0-禁止ISO CRC,1-使能ISO CRC
BYTE RetrySend;//0-禁止重发1-无限制重发
BYTE ResEnable;//0-不接入内部120欧终端电阻1-接入内部120欧终端电阻
//波特率参数可以用TCANLINPro软件里面的波特率计算工具计算
//仲裁段波特率参数,波特率=40M/NBT_BRP*(1+NBT_SEG1+NBT_SEG2)
BYTE NBT_BRP;
BYTE NBT_SEG1;
BYTE NBT_SEG2;
BYTE NBT_SJW;
//数据段波特率参数,波特率=40M/DBT_BRP*(1+DBT_SEG1+DBT_SEG2)
BYTE DBT_BRP;
BYTE DBT_SEG1;
BYTE DBT_SEG2;
BYTE DBT_SJW;
BYTE __Res0[8];
}
//初始化CAN的数据类型定义
class CAN_INIT_CONFIG{
ctor( /*输入构造函数所需要的参数*/ ){
};
type=me;
/*对象的所有成员必须用分号分隔*/
//CAN波特率 = 100MHz/(CAN_BRP)/(CAN_SJW+CAN_BS1+CAN_BS2)
INT CAN_BRP; //取值范围1~1024
BYTE CAN_SJW; //取值范围1~4
BYTE CAN_BS1; //取值范围1~16
BYTE CAN_BS2; //取值范围1~8
BYTE CAN_Mode; //CAN工作模式0-正常模式1-环回模式2-静默模式3-静默环回模式bit7为1则接入适配器内部终端电阻否则不接入
BYTE CAN_ABOM; //自动离线管理0-禁止1-使能
BYTE CAN_NART; //报文重发管理0-使能报文重传1-禁止报文重传
BYTE CAN_RFLM; //FIFO锁定管理0-新报文覆盖旧报文1-丢弃新报文
BYTE CAN_TXFP; //发送优先级管理0-标识符决定1-发送请求顺序决定
}
//CANfd信息帧的数据类型定义
class CANFD_MSG{
ctor( /*输入构造函数所需要的参数*/ ){
};
type=me;
/*对象的所有成员必须用分号分隔*/
INT ID; //报文ID。 //| (1<<31);//扩展帧
BYTE DLC; //数据字节长度,可设置为-0,1,2,3,4,5,6,7,8,12,16,20,24,32,48,64
BYTE Flags; //bit[0]-BRS,bit[1]-ESI,bit[2]-FDF,bit[6..5]-Channel,bit[7]-RXD
BYTE __Res0; //保留
BYTE __Res1; //保留
INT TimeStamp; //帧接收或者发送时的时间戳单位为10us
BYTE Data[64]; //报文的数据。
}
//CAN信息帧的数据类型定义
class CAN_MSG{
ctor( /*输入构造函数所需要的参数*/ ){
};
type=me;
/*对象的所有成员必须用分号分隔*/
INT ID; //报文ID。
INT TimeStamp; //接收到信息帧时的时间标识从CAN 控制器初始化开始计时。
BYTE RemoteFlag; //是否是远程帧
BYTE ExternFlag; //是否是扩展帧
BYTE DataLen; //数据长度(<=8)即Data 的长度。
BYTE Data[8]; //报文的数据。
BYTE __Res;
}
class CAN_UDS_ADDR{
ctor( /*输入构造函数所需要的参数*/ ){
};
type=me;
/*对象的所有成员必须用分号分隔*/
INT ReqID; //请求报文ID。
INT ResID; //应答报文ID。
BYTE Flag; //bit[0]-帧类型(0-标准帧1-扩展帧),
//bit[1]-FDF(0-普通CAN帧1-CANFD帧),
//bit[2]-BRS(0-CANFD帧不加速1-CANFD帧加速)
BYTE AddrFormats; //0-normal, 1-extended ,2-mixed
BYTE AddrExt; //当AddrFormats不为normal时该数据放到CAN数据域第1字节
BYTE MaxDLC; //每帧最大数据字节数一般设置为8
}
class DEVICE_INFO{
ctor( /*输入构造函数所需要的参数*/ ){
};
type=me;
/*对象的所有成员必须用分号分隔*/
BYTE FirmwareName[32]; //固件名称字符串
BYTE BuildDate[32]; //固件编译时间字符串
INT HardwareVersion; //硬件版本号
INT FirmwareVersion; //固件版本号
INT SerialNumber[3]; //适配器序列号
INT Functions; //适配器当前具备的功能
}
//调用函数
class USB2CANHW{
ctor( /*输入构造函数所需要的参数*/ ){
};
type=me;
/*对象的所有成员必须用分号分隔*/
//初始化全局变量
DllHandle = null;
//加载DLL
LoadDll = function(){
try{
DllHandle = ..raw.loadDll("\USB2XXX.dll")
}
catch(err)
{
import win;
DllHandle = null;
win.msgboxTimeout("加载USB2LIN的DLL失败请检查USB2XXX.dll和libusb-1.0.dll文件","错误",3000,);
}
if(DllHandle == null)return 1;
return 0;
}
//刷新硬件
FlashHw = function(){
if(DllHandle = null){
//DLL为空返回
AvailableHW = {}
return 0;
}
var arr_temp = {int value[] = { length = 10/*可以使用变量*/ } }//类似动态数组
HwNum = DllHandle.USB_ScanDevice(arr_temp)
AvailableHW = {}
for(i=1;HwNum;1){
var devtemp = {};
devtemp.devnum = i;
devtemp.channel = 1;
devtemp.hLINHW = arr_temp.value[i];
devtemp.name = "dev-" + i + ":" + tostring(arr_temp.value[i],16);
..table.push(AvailableHW,devtemp);
}
return HwNum; //返回有效硬件数
}
//获取设备信息
GetDevInfo = function(index){
if(index > HwNum)
{ //如果序号大于最大硬件数
return 0;
}
DllHandle.USB_OpenDevice(AvailableHW[index].hLINHW);
var DeviceInfo = ..usb2canfd.DEVICE_INFO();
var funcstr = ..raw.buffer(100);
var ret = DllHandle.DEV_GetDeviceInfo(AvailableHW[index].hLINHW,DeviceInfo,funcstr);
return ret,DeviceInfo,funcstr;
}
//获取有效硬件
GetAvailableHW = function(){
return AvailableHW;
}
//打开设备,包括初始化通道
OpenDevice = function(index,channel,canfd){
if(index > HwNum)
{ //如果序号大于最大硬件数
return 0;
}
import console;
var ret = DllHandle.USB_OpenDevice(AvailableHW[index].hLINHW)
//canfd = true;
if(canfd == true){
var canconfig = ..usb2canfd.CANFD_INIT_CONFIG();
canconfig.Mode = 0; //0-正常模式1-自发自收模式
canconfig.ISOCRCEnable = 0;//0-禁止ISO CRC,1-使能ISO CRC
canconfig.RetrySend = 0;//0-禁止重发1-无限制重发
canconfig.ResEnable = 1;//0-不接入内部120欧终端电阻1-接入内部120欧终端电阻
//波特率参数可以用TCANLINPro软件里面的波特率计算工具计算
//仲裁段波特率参数,波特率=40M/NBT_BRP*(1+NBT_SEG1+NBT_SEG2)
canconfig.NBT_BRP = 1; //参数来自官方上位机默认500K
canconfig.NBT_SEG1 = 59;
canconfig.NBT_SEG2 = 20;
canconfig.NBT_SJW = 2;
//数据段波特率参数,波特率=40M/DBT_BRP*(1+DBT_SEG1+DBT_SEG2)
canconfig.DBT_BRP = 2; //参数来自官方上位机默认500K
canconfig.DBT_SEG1 = 29;
canconfig.DBT_SEG2 = 10;
canconfig.DBT_SJW = 2;
ret = DllHandle.CANFD_Init(AvailableHW[index].hLINHW,channel,canconfig);
}
else {
var canconfig = ..usb2canfd.CAN_INIT_CONFIG();
canconfig.CAN_Mode = 0x80;//0-正常模式 1-环回模式 0x80终端电阻
canconfig.CAN_ABOM = 0;//禁止自动离线
canconfig.CAN_NART = 1;//禁止报文重传
canconfig.CAN_RFLM = 0;//FIFO满之后覆盖旧报文
canconfig.CAN_TXFP = 1;//发送请求决定发送顺序
//配置波特率,波特率 = 42M/(BRP*(SJW+BS1+BS2))
canconfig.CAN_BRP = 4;
canconfig.CAN_BS1 = 15;
canconfig.CAN_BS2 = 5;
canconfig.CAN_SJW = 2;
ret = DllHandle.CAN_Init(AvailableHW[index].hLINHW,channel,canconfig);
//console.log("init ret = " + ret);
}
canfd_connected = canfd;
if(ret == 0){//调用成功
Hwconnected = AvailableHW[index].hLINHW;
Chconntected = channel;
}
else {
Hwconnected = null
Chconntected = null;
}
return ret;
}
//关闭设备
CloseDevice = function(){
if(Hwconnected == null){
return;
}
try{
DllHandle.USB_CloseDevice(Hwconnected);
Hwconnected = null;
}
}
//是否连接
isConnected = function(){
if(Hwconnected == null){
return false;
}
else {
return true;
}
}
//发送报文
SendMsg = function(id,data){
if(Hwconnected == null){//未连接
return 0;
}
if(#data == 0 || #data>8){//长度不对
return 0;
}
//console.log("发送报文")
var ret = 0;
if(canfd_connected == true){
var msg = ..usb2canfd.CANFD_MSG();
msg.Flags = 0;
if(id <= 0x7ff){
msg.ID = id; //| (1<<31);//扩展帧
}
else {
msg.ID = id | (1<<31);//扩展帧
}
msg.DLC = #data;
msg.Data = data;
//console.dumpJson(msg);
//console.log("Hwconnected = " + Hwconnected);
//console.log("Chconntected = " + Chconntected);
ret = DllHandle.CANFD_SendMsg(Hwconnected,Chconntected,msg,1);
}
else {
var msg = ..usb2canfd.CAN_MSG();
//msg.Flags = 0;
if(id <= 0x7ff){
msg.ID = id; //| (1<<31);//扩展帧
}
else {
msg.ID = id | (1<<31);//扩展帧
}
msg.ExternFlag = 0;
msg.RemoteFlag = 0;
msg.DataLen = #data;
msg.Data = data;
//console.log("发送报文")
ret = DllHandle.CAN_SendMsg(Hwconnected,Chconntected,msg,1);
//console.log("ret = " + ret);
}
return ret;
}
//从设备缓冲区获取报文
GetMsg = function(){
var ret = 0;
var retdata = {};
if(canfd_connected == true){
//CANFD
do{
var msgbuf = ..usb2canfd.CANFD_MSG();
ret = DllHandle.CANFD_GetMsg(Hwconnected,CANIndex,msgbuf,1);
if(ret == 1){
var data = {};
for(i=1;msgbuf.DLC;1){
data[i] = msgbuf.Data[i];
}
var msg = {"id"=msgbuf.ID;"data"=data;};//
..table.push(retdata,msg);
}
}while(ret > 0)
}
else {
//CAN
do{
var msgbuf = ..usb2canfd.CAN_MSG();
ret = DllHandle.CAN_GetMsgWithSize(Hwconnected,CANIndex,msgbuf,1);
if(ret == 1){
var data = {};
for(i=1;msgbuf.DataLen;1){
data[i] = msgbuf.Data[i];
}
var msg = {"id"=msgbuf.ID;"data"=data;};//
..table.push(retdata,msg);
}
}while(ret > 0)
}
return retdata;
}
GetDiag = function(data){
if(#data<2){
return 0,1;
}
var UDSAddr = ..usb2canfd.CAN_UDS_ADDR()
UDSAddr.Flag = 1;//使用扩展帧
UDSAddr.AddrFormats = 0;
UDSAddr.ReqID = 0x18dadff1;
UDSAddr.ResID = 0x18daf1df;
UDSAddr.MaxDLC = 8;
var req_data = ..raw.buffer(#data);
for(i=1;#data;1){
req_data[i] = data[i];
}
ret = DllHandle.CAN_UDS_Request(Hwconnected,CANIndex,UDSAddr,req_data,#data);
var res_data = ..raw.buffer(4096);
//sleep(10);
var ret = DllHandle.CAN_UDS_Response(Hwconnected,CANIndex,UDSAddr,res_data,1000);
return ret,2,res_data;
}
}
}
/**intellisense()
usb2canfd = 图莫斯CANFD驱动
usb2canfd.USB2CANHW = USB2CAN库
usb2canfd.USB2CANHW() = 创建设备对象\n!usb2canfdUSB2CANHW.
!usb2canfdUSB2CANHW.LoadDll() = 加载DLL
!usb2canfdUSB2CANHW.FlashHw() = 刷新硬件
!usb2canfdUSB2CANHW.GetDevInfo() = 获取设备信息
!usb2canfdUSB2CANHW.GetAvailableHW() = 获取有效设备需要先FlashHw()刷新
!usb2canfdUSB2CANHW.OpenDevice() = 打开设备
!usb2canfdUSB2CANHW.CloseDevice() = 关闭设备
!usb2canfdUSB2CANHW.isConnected() = 是否已连接
!usb2canfdUSB2CANHW.SendMsg() = 发送报文
!usb2canfdUSB2CANHW.GetMsg() = 接收报文
end intellisense**/

Binary file not shown.

252
CAN_Bootloader/main.aardio Normal file
View File

@ -0,0 +1,252 @@
import win.ui;
/*DSG{{*/
mainForm = win.form(text="CAN_Bootloader";right=599;bottom=465;border="dialog frame";max=false)
mainForm.add(
btnConnect={cls="button";text="连接";left=204;top=64;right=289;bottom=90;z=4};
btnDiag={cls="button";text="诊断";left=149;top=350;right=248;bottom=375;z=25};
btnFlash={cls="button";text="开始刷写";left=37;top=315;right=136;bottom=343;z=9};
btnFresh={cls="button";text="刷新";left=204;top=28;right=288;bottom=54;z=2};
btnOpen={cls="button";text="打开文件";left=37;top=282;right=136;bottom=310;z=8};
btnOpenFlashdrv={cls="button";text="打开FlashDriver";left=149;top=282;right=248;bottom=310;z=24};
btnReadF186={cls="button";text="读取当前会话";left=37;top=349;right=136;bottom=377;z=13};
btnReadF198={cls="button";text="读取F198";left=37;top=415;right=136;bottom=443;z=19};
btnReadF199={cls="button";text="读取F199";left=149;top=415;right=248;bottom=443;z=20};
btnReadHw={cls="button";text="读取硬件版本号";left=149;top=381;right=248;bottom=409;z=12};
btnReadSw={cls="button";text="读取软件版本号";left=37;top=382;right=136;bottom=410;z=10};
btnTest={cls="button";text="停止";left=149;top=316;right=248;bottom=344;z=11};
cbbChannel={cls="combobox";left=58;top=64;right=191;bottom=90;edge=1;items={};mode="dropdown";z=3};
cbbDev={cls="combobox";left=58;top=27;right=191;bottom=53;edge=1;items={};mode="dropdown";z=1};
checkbox={cls="checkbox";text="CANFD设备";left=151;top=101;right=248;bottom=120;checked=1;z=21};
edFile={cls="richedit";left=8;top=131;right=288;bottom=187;border=1;disabled=1;edge=1;multiline=1;wrap=1;z=14};
edFile2={cls="richedit";left=8;top=213;right=288;bottom=269;border=1;disabled=1;edge=1;multiline=1;wrap=1;z=22};
edit={cls="edit";left=294;top=19;right=596;bottom=401;autovscroll=false;edge=1;multiline=1;vscroll=1;z=5};
progress={cls="progress";left=296;top=436;right=596;bottom=464;edge=1;max=100;min=0;z=15};
static={cls="static";text="设备";left=1;top=28;right=61;bottom=52;align="center";center=1;transparent=1;z=6};
static2={cls="static";text="通道";left=1;top=66;right=61;bottom=90;align="center";center=1;transparent=1;z=7};
static3={cls="static";text="刷写进度";left=296;top=409;right=349;bottom=429;transparent=1;z=16};
static4={cls="static";text="烧录APP";left=13;top=108;right=85;bottom=132;center=1;transparent=1;z=17};
static5={cls="static";text="V0.1_20220518";left=451;top=1;right=595;bottom=17;align="right";center=1;transparent=1;z=18};
static6={cls="static";text="FlashDriver";left=13;top=195;right=101;bottom=218;transparent=1;z=23}
)
/*}}*/
import win;
import usb2canfd;
import win.timer;
var boot_count = 0;//boot时间计数器
var bootstate = false;//boot状态标志
var starttime = time.now();
timer_bootcount = win.timer(mainForm,100);
timer_bootcount.onTimer = function(){//boot时间定时器100ms间隔
boot_count++;
}
Display = function(str){//显示日志
var nowtime = time();
nowtime.format="%H:%M:%S";
mainForm.edit.print(tostring(nowtime) + " " + str);
}
//遍历目录
import console;
/*
import fsys.fileInfo;
info = fsys.fileInfo("C:\Users\fcb19\Desktop\dll\libusb-1.0.dll");
console.log(info.writeTime);
execute("pause")
raw.loadDll("C:\Users\fcb19\Desktop\dll\libusb-1.0.dll");
*/
CANHw = usb2canfd.USB2CANHW();//尝试加载CAN dll
var ret = CANHw.LoadDll();
if(ret == 0){
Display("DLL加载成功");
}
else {
Display("DLL加载失败");
}
//初始化界面
mainForm.cbbChannel.add("通道1");
mainForm.cbbChannel.add("通道2");
mainForm.cbbChannel.selIndex = 1
//刷新按键
mainForm.btnFresh.oncommand = function(id,event){
mainForm.cbbDev.clear();//清空下拉框,防止反复刷新叠加
var hwnum = CANHw.FlashHw();//获取硬件数量
if(hwnum == 0){
mainForm.cbbDev.text = "未找到硬件"
}
else {
var allhw = CANHw.GetAvailableHW();
for(i=1;#allhw;1){
mainForm.cbbDev.add(allhw[i].name);
}
}
mainForm.cbbDev.selIndex = 1
::PostThreadMessage(thrdId,100,0,0)//自定义消息
}
mainForm.btnConnect.oncommand = function(id,event){
var canfd_check = mainForm.checkbox.checked?0x80:0x00;
::PostThreadMessage(thrdId,101,mainForm.cbbDev.selIndex,(mainForm.cbbChannel.selIndex - 1)|canfd_check)//自定义消息
/*
var ret = CANHw.OpenDevice(mainForm.cbbDev.selIndex,mainForm.cbbChannel.selIndex - 1);//通道为0和1
if(ret == 0){
Display("连接成功");
}
else {
Display("连接失败");
}
*/
}
//CAN通讯线程
import thread.command;
var listener = thread.command();
var flag_connected=0;
listener.$Display = function(str){
Display(str);
}
listener.$ShowPath = function(str){
mainForm.edFile.text = str;
}
listener.$ShowFlashDrvPath = function(str){
mainForm.edFile2.text = str;
}
listener.$SetProgress = function(pos){
if(pos >= 0 && pos <= 100){
mainForm.progress.pos = pos;
}
}
listener.$Connected = function(){
mainForm.btnConnect.disabled = true;
mainForm.btnFresh.disabled = true;
mainForm.cbbDev.disabled = true;
mainForm.cbbChannel.disabled = true;
flag_connected = 1;
}
listener.$SendEnd = function(isSuccess){
//timer_bootcount.disable();
var usetime = time.now().diffsecond(starttime);
bootstate = false;
if(isSuccess == true){
Display("刷写成功,用时 " + usetime + " S")
}
}
//线程函数
var CanThread = function(){
//线程函数内部要添加自已的import语句
import win;
import console;
//console.log("线程开始运行")
loadcodex("\user\CanThread.aardio");//加载线程程序
//在子线程启动消息循环
win.loopMessage(FuncLoopMsg)
}
DiagReadDID = function(did){
::PostThreadMessage(thrdId,110,did,0)//自定义消息
}
var Diag10Req = function(num){
::PostThreadMessage(thrdId,111,num,0)//自定义消息
}
var DiagBootReq = function(){
::PostThreadMessage(thrdId,102,0,0)//自定义消息
}
var DiagStopReq = function(){
::PostThreadMessage(thrdId,103,0,0)//自定义消息
}
mainForm.btnReadSw.oncommand = function(id,event){
DiagReadDID(0xF195);
}
mainForm.btnReadHw.oncommand = function(id,event){
DiagReadDID(0xF193);
}
mainForm.btnReadF186.oncommand = function(id,event){
DiagReadDID(0xF186);
}
mainForm.btnTest.oncommand = function(id,event){
DiagStopReq();
}
mainForm.btnFlash.oncommand = function(id,event){
if(io.exist(mainForm.edFile.text) == null){
Display("请打开烧写文件");
return;
}
if(io.exist(mainForm.edFile2.text) == null){
Display("请打开flashdriver文件");
return;
}
if(flag_connected == 0){
Display("请连接设备");
return;
}
if(bootstate == true){
return ;
}
bootstate = true;
mainForm.edit.text = "";
Display("开始刷写流程");
starttime = time.now();
//timer_bootcount.enable();
boot_count = 0;
DiagBootReq();
}
mainForm.btnOpen.oncommand = function(id,event){
::PostThreadMessage(thrdId,104,1,0)//自定义消息-打开文件
}
//程序关闭
mainForm.onClose = function(hwnd,message,wParam,lParam){
if(thrdId != null){
::PostThreadMessage(thrdId,105,0,0)//自定义消息
thread.waitClose(thrdHandle);
}
//PLinHw.isConnected()///待完善
//console.print("线程已关闭")
//console.pause()
}
mainForm.btnReadF198.oncommand = function(id,event){
DiagReadDID(0x1701);
}
mainForm.btnReadF199.oncommand = function(id,event){
DiagReadDID(0x1702);
}
mainForm.btnOpenFlashdrv.oncommand = function(id,event){
::PostThreadMessage(thrdId,104,0,0)//自定义消息-打开flashdriver
}
var frmChild = win.loadForm("\dlg\诊断子窗口.aardio");
frmChild.show(false);
mainForm.btnDiag.oncommand = function(id,event){
frmChild.show();
}
thrdHandle,thrdId = thread.create( CanThread )
mainForm.show();
return win.loopMessage();

BIN
CAN_Bootloader/res/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@ -0,0 +1,283 @@
import usb2canfd;
import thread.command;
import win.timer;
//初始化CAN句柄对象
CANHw = usb2canfd.USB2CANHW();
CANHw.LoadDll();
DiagReqID = 0x751;//0x18dadff1;
DiagRespID = 0x759;//0x18daf1df;
DiagGloableID = 0x7DF;//0x18DB33F1;
stopflag = 0;
write2Etest = function(did){
select(did) {
case 0xF010 {
var data = {1,2,3,4, 0,0,0,0, 0,0,0,0, 0,0,0,0,};
FuncReq2E(did,data);
}
case 0xF101 {
var data = {1,2,3,4, 0,0,0,0, };
FuncReq2E(did,data);
}
}
}
//注册一个消息钩子函数
FuncLoopMsg = function(msg){
select(msg.message) {
case 100 {//刷新硬件
FuncFreshHw();
}
case 101 {//连接硬件
//console.log("msg.wParam = " + msg.wParam);
//console.log("msg.lParam = " + msg.lParam);
FuncConnect(msg.wParam,msg.lParam);
}
case 102 {//开始boot
FuncStartBoot();
}
case 103 {//停止boot
FuncStopBoot();
}
case 104 {//打开s19文件
if(msg.wParam == 0){
FuncDisplay("打开FlashDriver");
var ret = FuncOpenS19File(msg.wParam);
if(ret != null){
thread.command.$ShowFlashDrvPath(ret);
}
}
else {
FuncDisplay("打开烧写文件");
var ret = FuncOpenS19File(msg.wParam);
if(ret != null){
thread.command.$ShowPath(ret);
}
}
}
case 105 {//停止boot
thread.stop(0);
}
case 110 {//readDID
FuncReadDID(msg.wParam);
}
case 111 {
FuncReq10(msg.wParam,msg.lParam);
}
case 112 {
FuncReq28(msg.wParam);
}
case 113 {
FuncReq85(msg.wParam);
}
case 114 {
FuncReq27(msg.wParam);
}
case 115 {
write2Etest(msg.wParam)
}
else {
}
}
}
FuncFreshHw = function(){
var hwnum = CANHw.FlashHw();
if(hwnum == 0){
//mainForm.cbbDev.text = "未找到硬件"
}
else {
FuncDisplay("找到硬件")
}
}
FuncConnect = function(dev,chn){
var canfd = (chn&0x80)==0x80?true:false;
var ret = CANHw.OpenDevice(dev,chn&0x7f,canfd);
if(ret == 0){
FuncDisplay("连接成功");
thread.command.$Connected();
}
else {
FuncDisplay("连接失败");
}
}
FuncDisplay = function(str){
thread.command.$Display(str);//"线程" +
}
loadcodex("\user\Diag10code.aardio");
loadcodex("\user\Diag11code.aardio");
loadcodex("\user\Diag22code.aardio");
loadcodex("\user\Diag27code.aardio");
loadcodex("\user\Diag2Ecode.aardio");
loadcodex("\user\Diag28code.aardio");
loadcodex("\user\Diag31code.aardio");
loadcodex("\user\Diag34code.aardio");
loadcodex("\user\Diag36code.aardio");
loadcodex("\user\Diag37code.aardio");
loadcodex("\user\Diag7Fcode.aardio");
loadcodex("\user\Diag85code.aardio");
loadcodex("\user\DiagBootcode.aardio");
loadcodex("\user\S19Decode.aardio");
RespState = 0;
FuncDiagPro = function(diagmsg){
select(diagmsg.sid) {
case 0x50 {
FuncDiag10Pro(table.slice(diagmsg.data,1,diagmsg.len))
}
case 0x62 {
FuncDiag22Pro(table.slice(diagmsg.data,1,diagmsg.len))
}
case 0x67 {
FuncDiag27Pro(table.slice(diagmsg.data,1,diagmsg.len))
}
case 0x74 {
FuncDiag34Pro(table.slice(diagmsg.data,1,diagmsg.len))
}
case 0x71 {
FuncDiag31Pro(table.slice(diagmsg.data,1,diagmsg.len))
}
case 0x76 {
FuncDiag36Pro(table.slice(diagmsg.data,1,diagmsg.len))
}
case 0x68 {
FuncDiag28Pro(table.slice(diagmsg.data,1,diagmsg.len))
}
case 0xC5 {
FuncDiag85Pro(table.slice(diagmsg.data,1,diagmsg.len))
}
case 0x7F {
FuncDiag7FPro(table.slice(diagmsg.data,1,diagmsg.len))
}
case 0x6E {
FuncDiag2EPro(table.slice(diagmsg.data,1,diagmsg.len))
}
else {
}
}
RespState = diagmsg.sid;
}
FuncStartBoot = function(){
FuncInitBootState();
boottimer.enable();
FuncDisplay("开始刷写");
stopflag = 0;
}
var PackNext = 0x21;
var Packdata = {};
var PackID = 0;
var FuncSendPackage = function(){
while(#Packdata > 0)
{
sleep(0.3);
var data = {PackNext,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC};
var max = #Packdata > 7 ? 7 : #Packdata;
for(i=1;max;1){
data[i+1] = table.remove(Packdata);
}
CANHw.SendMsg(PackID,data);
PackNext += 1;
if(PackNext > 0x2f){
PackNext = 0x20;
}
}
}
FuncPushPackage = function(ID,data){
PackNext = 0x21;
Packdata = data;
PackID = ID;
}
boottimer = win.timer(,10);
boottimer.onTimer = function(){
if(CANHw.isConnected() == false){
boottimer.disable();
return;
}
FuncBootSeq();
}
timer1 = win.timer(,1);
diagresp = {}
timer1.onTimer = function(){
if(CANHw.isConnected() == false){
return;
}
ret = CANHw.GetMsg();
for(i=1;#ret;1){
//console.log("id = " + tostring(ret[i].id))
if(ret[i].id & 0x7FFFFFFF == DiagRespID){
if(ret[i].data[1] == 0x10){//首帧
var data = {0x30,0x00,0x14,0x00,0,0,0,0};
CANHw.SendMsg(DiagReqID,data);
diagresp["sid"] = ret[i].data[3];
diagresp["len"] = ret[i].data[2]-1;
diagresp["data"] = {};
diagresp["next"] = 0x21;
table.append(diagresp["data"],table.slice(ret[i].data,4));
}
elseif(ret[i].data[1] <= 0x07){//单帧
//console.dumpJson()
diagresp["sid"] = ret[i].data[2];
diagresp["len"] = ret[i].data[1]-1;
diagresp["data"] = table.slice(ret[i].data,3);
FuncDiagPro(diagresp);
}
elseif(ret[i].data[1] >= 0x21 && ret[i].data[1] <= 0x2f){
if(ret[i].data[1] == diagresp["next"]){//多帧
diagresp["next"] += 1;
if(diagresp["next"] >= 0x2F){
diagresp["next"] = 0x20;
}
table.append(diagresp["data"],table.slice(ret[i].data,2));
if(#diagresp["data"] >= diagresp["len"]){
FuncDiagPro(diagresp);
}
}
}
elseif(ret[i].data[1] == 0x30){//
FuncSendPackage();
}
}
else {
//console.varDump(ret[i].id);
//显示报文
}
}
}
timer1.enable();
FuncDisplay("正在运行");

View File

@ -0,0 +1,33 @@
//发送
FuncReq10 = function(Addr,num){
if(num >= 1 && num <= 3){
var data = {0x02,0x10,num,0,0,0,0,0};
if(Addr == true){
CANHw.SendMsg(DiagGloableID,data);
}
else {
CANHw.SendMsg(DiagReqID,data);
}
}
}
//接收
FuncDiag10Pro = function(data){
//console.dumpJson(data);
select(data[1]) {
case 1 {
FuncDisplay("进入默认会话成功")
}
case 2 {
FuncDisplay("进入编程会话成功")
}
case 3 {
FuncDisplay("进入扩展会话成功")
}
else {
}
}
}

View File

@ -0,0 +1,9 @@
//发送
FuncReq11 = function(num){
var txdata = {0x2,0x11,num,0x00,0x00,0x00,0x00,0x00};
CANHw.SendMsg(DiagReqID,txdata);
}
//接收
FuncDiag11Pro = function(data){
FuncDisplay("复位成功")
}

View File

@ -0,0 +1,134 @@
var diag22state = 0;
//发送
FuncReadDID = function(did){
if(CANHw.isConnected() == false){
return;
}
var data = {0x03,0x22,did>>8,did&0xff,0,0,0,0};
var ret = CANHw.SendMsg(DiagReqID,data);
diag22state = 1;
//console.log("did = " + tostring(did,16));
//console.log("ret = " + ret);
//FuncDisplay("did = " + tostring(did,16));
}
//接收
FuncDiag22Pro = function(data){
//console.log("诊断22服务")
if(#data < 3){
return;
}
var did = (data[1]<<8) + data[2];
select(did) {
case 0xF186 {
FuncDisplay("当前会话: " + data[3]);
}
case 0xF193 {
FuncDisplay("硬件版本号");
FuncDisplay(string.pack(table.slice(data,3)));
}
case 0xF195 {
FuncDisplay("软件版本号");
FuncDisplay(string.pack(table.slice(data,3)));
}
case 0xF198 {
FuncDisplay("repair_shopcode");
FuncDisplay(string.pack(table.slice(data,3)));
}
case 0xF199 {
FuncDisplay("installation_date");
FuncDisplay(string.format("%x%X%x%x",data[3],data[4],data[5],data[6]));
}
case 0xF187 {
FuncDisplay("车辆备用零部件编号");
FuncDisplay(string.pack(table.slice(data,3)));
}
case 0xF18A {
FuncDisplay("系统供应商公司名称代码");
FuncDisplay(string.pack(table.slice(data,3)));
}
case 0xF197 {
FuncDisplay("ECU 系统名称");
FuncDisplay(string.pack(table.slice(data,3)));
}
case 0x1701 {
var 水平 = (data[3]<<8) + (data[4]);
var 靠背 = (data[5]<<8) + (data[6]);
FuncDisplay("水平当前位置: " ++ (水平-0x8000) );
FuncDisplay("靠背当前位置" ++ (靠背 - 0x8000) );
}
case 0x1702 {
if(#data < 10){
FuncDisplay("DID-0x1702长度错误")
return;
}
var 水平1 = (data[3]<<8) + (data[4]);
var 水平2 = (data[5]<<8) + (data[6]);
var 靠背1 = (data[7]<<8) + (data[8]);
var 靠背2 = (data[9]<<8) + (data[10]);
FuncDisplay("水平1: " + (水平1-0x8000) + "水平2: " + (水平2-0x8000));
FuncDisplay("靠背1: " + (靠背1-0x8000) + "靠背2: " + (靠背2-0x8000));
FuncDisplay("水平1: " + (水平1) + "水平2: " + (水平2));
FuncDisplay("靠背1: " + (靠背1) + "靠背2: " + (靠背2));
}
case 0x1706 {
var 水平 = data[3]&0x01;
var 靠背 = (data[3]>>1)&0x01;
FuncDisplay("座椅水平方向电机学习状态: " + 水平);
FuncDisplay("座椅靠背方向电机学习状态" + 靠背);
}
case 0x1707 {
var 电流 = (data[3]<<8) + data[4];
FuncDisplay("电流: " + tostring(电流));
}
case 0x1708 {
FuncDisplay("输入状态: ");
var 座椅向前 = data[3]&0x01;
var 座椅向后 = (data[3]>>1)&0x01;
var 靠背向前 = (data[3]>>2)&0x01;
var 靠背向后 = (data[3]>>3)&0x01;
var 快进按键 = (data[3]>>4)&0x01;
var 快出按键 = (data[3]>>5)&0x01;
var 锁扣状态 = (data[3]>>6)&0x01;
var 坐人状态 = (data[3]>>7)&0x01;
FuncDisplay("座椅向前: " + 座椅向前);
FuncDisplay("座椅向后: " + 座椅向后);
FuncDisplay("靠背向前: " + 靠背向前);
FuncDisplay("靠背向后: " + 靠背向后);
FuncDisplay("快进按键: " + 快进按键);
FuncDisplay("快出按键: " + 快出按键);
FuncDisplay("锁扣状态: " + 锁扣状态);
FuncDisplay("坐人状态: " + 坐人状态);
}
case 0x1709 {
FuncDisplay("输出状态: ");
var 座椅向前 = data[3]&0x01;
var 座椅向后 = (data[3]>>1)&0x01;
var 靠背向前 = (data[3]>>2)&0x01;
var 靠背向后 = (data[3]>>3)&0x01;
var 快进按键 = (data[3]>>4)&0x01;
var 快出按键 = (data[3]>>5)&0x01;
FuncDisplay("座椅向前: " + 座椅向前);
FuncDisplay("座椅向后: " + 座椅向后);
FuncDisplay("靠背向前: " + 靠背向前);
FuncDisplay("靠背向后: " + 靠背向后);
FuncDisplay("快进输出: " + 快进按键);
FuncDisplay("快出输出: " + 快进按键);
}
case 0x170B {
var 系统供电电压 = data[3]/10;
FuncDisplay("系统供电电压: " + tostring(系统供电电压) + " V");
}
else {
FuncDisplay("未知DID - " + tostring(did,16));
}
}
}

View File

@ -0,0 +1,78 @@
var SecuretySeed = {0,0,0,0,};
var SecuretyKey = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
var lockstate = 0;
//发送
FuncReq27 = function(num,key){
if(num >= 1 && num <= 0x1C){
if(key == null){
var data = {0x02,0x27,num,0,0,0,0,0};
CANHw.SendMsg(DiagReqID,data);
}
else {
if(#key > 4){
var data = {0x10,0X12,0x27,num,key[1],key[2],key[3],key[4]};
CANHw.SendMsg(DiagReqID,data);
FuncPushPackage(DiagReqID,table.slice(key,5));
}
else {
var data = {0x06,0x27,num,key[1],key[2],key[3],key[4],0x00};
CANHw.SendMsg(DiagReqID,data);
}
}
}
else {
FuncDisplay("27长度错误");
}
}
//loadcodex("\user\securety.aardio");
loadcodex("\user\GeelySecurety.aardio");
//接收
FuncDiag27Pro = function(data){
//console.dumpJson(data);
select(data[1]) {
case 1,3,5,7,9,11,0x11 {
var str = "收到种子";
for(i=1;4;1){
SecuretySeed[i] = data[i+1];
str += " " + tostring(SecuretySeed[i],16);
lockstate = 1;
}
FuncDisplay(str)
SecuretyKey = securetyKeyCalc(SecuretySeed,data[1]);
if(#SecuretyKey >= 4){
FuncReq27(data[1]+1,SecuretyKey);
var str = "计算密钥-";
for(i=1;4;1){
str += " " + tostring(SecuretyKey[i],16);
}
FuncDisplay(str);
}
else {
FuncDisplay("计算失败");
}
}
case 2,4,6,8,10,12,0x12 {
FuncDisplay("解锁成功");
lockstate = 2;
}
else {
FuncDisplay("27服务未知子服务");
}
}
}
FuncDiag27GetState = function(){
if(lockstate == 2){
return 0;
}
else {
return 1;
}
}

View File

@ -0,0 +1,27 @@
//发送
FuncReq28 = function(num1,num2){
var txdata = {0x03,0x28,num1,num2,0,0,0,0};
var ret = CANHw.SendMsg(DiagGloableID,txdata);
}
//接收
FuncDiag28Pro = function(data){
//console.dumpJson(data);
select(data[1]) {
case 0 {
FuncDisplay("使能接收发送")
}
case 1 {
FuncDisplay("使能接收,禁止发送")
}
case 2 {
FuncDisplay("禁止接收,使能发送")
}
case 3 {
FuncDisplay("禁止接收发送")
}
else {
}
}
}

View File

@ -0,0 +1,43 @@
var diag22state = 0;
//发送
FuncDIDWriteStr = function(did,str){
var data = {}
for(i=1;string.len(str);1){
data[i] = string.unpack(str,i);
}
FuncReq2E(did,data)
return data;
}
//FuncDIDWriteStr(0xf198,"0123456789abcdef1234");
FuncReq2E = function(did,data){
if(CANHw.isConnected() == false){
return;
}
if(#data > 4){
//多帧
var txdata = {0x10,3+#data,0x2E,did>>8,did&0xff,data[1],data[2],data[3]};
CANHw.SendMsg(DiagReqID,txdata);
//等待发送
FuncPushPackage(DiagReqID,table.slice(data,3));
}
else {
var txdata = {3+#data,0x2E,did>>8,did&0xff,0,0,0,0};
for(i=1;#data;1){
txdata[4+i] = data[i];
}
CANHw.SendMsg(DiagReqID,txdata);
}
}
//接收
FuncDiag2EPro = function(data){
var did = (data[1]<<8) + data[2];
FuncDisplay("写入" + tostring(did,16) + "成功");
}

View File

@ -0,0 +1,62 @@
FuncReq31EraseFlash = function(addr,len){
FuncDisplay("开始擦除数据")
var data = {0xff,0x00,0x44,addr>>24,addr>>16,addr>>8,addr,len>>24,len>>16,len>>8,len};
FuncReq31(data);
}
FuncReq31CheckLogicBlock = function(crc){//(addr,len)
//var data = {0x02,0x02,0x44,addr>>24,addr>>16,addr>>8,addr,len>>24,len>>16,len>>8,len};
var data = {0x02,0x02,crc>>24,crc>>16,crc>>8,crc};
FuncReq31(data);
}
FuncReq31CheckPD = function(){//Programming Dependencies
var data = {0xFF,0x01};
FuncReq31(data);
}
FuncReq31CheckFlash = function(){
var data = {0x02,0x02};
FuncReq31(data);
}
//发送
FuncReq31 = function(data){
if(#data > 5){//多帧
var txdata = {0x10,2+#data,0x31,0x01,data[1],data[2],data[3],data[4]};
CANHw.SendMsg(DiagReqID,txdata);
FuncPushPackage(DiagReqID,table.slice(data,5));
}
else {
var txdata = {2+#data,0x31,0x01,0, 0,0,0,0};
for(i=1;#data;1){
txdata[3+i] = data[i];
}
CANHw.SendMsg(DiagReqID,txdata);
}
}
//接收
FuncDiag31Pro = function(data){
//console.dumpJson(data);
var rid = (data[2]<<8) + data[3];
select(rid) {
case 0xFF00 {
FuncDisplay("擦除成功")
}
case 0x0202 {
FuncDisplay("校验成功")
}
case 0xFF01 {
FuncDisplay("检查标志成功")
}
case 0xF518 {
FuncDisplay("数字签名错误")
}
else {
}
}
}

View File

@ -0,0 +1,29 @@
//发送
FuncReq34 = function(addr,len){
var data = {0x44,addr>>24,addr>>16,addr>>8,addr,len>>24,len>>16,len>>8,len};
var txdata = {0x10,2+#data,0x34,0x00,data[1],data[2],data[3],data[4]};
CANHw.SendMsg(DiagReqID,txdata);
FuncPushPackage(DiagReqID,table.slice(data,5));
}
var maxlen = 0;
//接收
FuncDiag34Pro = function(data){
//console.dumpJson(data);
FuncDisplay("请求下载成功")
maxlen = (data[2]<<8) + data[3];
FuncDisplay("最大长度:" + maxlen);
}
FuncGetSengLen = function(){
if(maxlen>2){
return maxlen-2;
}
else {
return 0;
}
}

View File

@ -0,0 +1,65 @@
//
var blocknum=1;
var flag_sendend = false;
var flag_sending = false;
var alldata = {};
FuncStartSendBlock = function(data){
blocknum = 0x01;
flag_sendend = false;
flag_sending = true;
alldata = data;
}
FuncStopSendBlock = function(data){
blocknum = 0x01;
flag_sendend = false;
flag_sending = false;
}
FuncGetSendStatus = function(){
return flag_sendend;
}
FuncSendNextBlock = function(){
var len = FuncGetSengLen();
if(#alldata>len){
FuncReq36(blocknum,table.slice(alldata,1,len));
alldata = table.slice(alldata,len+1,)
}
else {
FuncReq36(blocknum,alldata);
alldata = {};
flag_sendend = true;
}
blocknum += 1;
}
//发送
FuncReq36 = function(num,data){
len = #data+2;
if(len > 7){
var txdata = {0x10+(len>>8),len&0xff,0x36,num&0xff,data[1],data[2],data[3],data[4]};
CANHw.SendMsg(DiagReqID,txdata);
FuncPushPackage(DiagReqID,table.slice(data,5));
}
else {
var txdata = {len,0x36,num&0xff,0, 0,0,0,0};
for(i=1;#data;1){
txdata[i+3] = data[i];
}
CANHw.SendMsg(DiagReqID,txdata);
}
}
//接收
FuncDiag36Pro = function(data){
//console.dumpJson(data);
/*
if(data[1] == blocknum){
blocknum += 1;
if(flag_sending == true){
FuncSendNextBlock();
}
}
*/
}

View File

@ -0,0 +1,9 @@
//发送
FuncReq37 = function(){
var txdata = {0x1,0x37,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA};
CANHw.SendMsg(DiagReqID,txdata);
}
//接收
FuncDiag37Pro = function(data){
}

View File

@ -0,0 +1,46 @@
var errSID=0,errNRC=0;
FuncGetNrc = function(){
return errSID,errNRC;
}
FuncClrNrc = function(){
//return errSID,errNRC;
errSID = 0;
errNRC = 0;
}
var TableToStr = function(data){
if(data == null){
return " ";
}
if(#data == 0){
return " ";
}
var str = "data:"
for(i=1;#data;1){
str += " "
str += tostring(data[i],16);
}
return str;
}
//接收
FuncDiag7FPro = function(data){
//console.dumpJson(data);
errSID = data[1];
errNRC = data[2];
select(errNRC) {
case 0x78 {
if(errSID != 0x36){
FuncDisplay("服务正忙")
}
}
else {
FuncDisplay("SID:" + tostring(errSID,16))
FuncDisplay("错误 - NRC:" + tostring(errNRC,16))
FuncDisplay(TableToStr(data));
}
}
}

View File

@ -0,0 +1,27 @@
//发送
FuncReq85 = function(num){
if(num >= 1 && num <= 3){
var data = {0x02,0x85,num,0,0,0,0,0};
CANHw.SendMsg(DiagGloableID,data);
}
}
//接收
FuncDiag85Pro = function(data){
//console.dumpJson(data);
select(data[1]) {
case 0x01 {
FuncDisplay("DTC开启")
}
case 0x02 {
FuncDisplay("DTC禁能")
}
case 3 {
FuncDisplay("DTC - 01")
}
else {
FuncDisplay("DTC - TDB")
}
}
}

View File

@ -0,0 +1,450 @@
var bootstate = 0;
var bootcount = 0;
var sendstate = 0;
FuncWait = function(sid){
if(RespState == (sid + 0x40)){//正响应
//bootcount = 0;
return 0;
}
errsid,errnrc = FuncGetNrc();
FuncClrNrc();
if(errsid == sid){
if(errnrc == 0x78){//等待
bootcount = 0;
return 0xff;
}
else {
FuncDisplay("刷写错误 步骤" + bootstate);
boottimer.disable();
thread.command.$SendEnd(false);
return 1; //负响应
}
}
if(stopflag == 1){
FuncDisplay("停止");
boottimer.disable();
thread.command.$SendEnd(false);
return 2;//停止命令
}
bootcount += 1;
if(bootcount >= 400){
FuncDisplay("步骤" + bootstate + "超时 " + tostring(sid,16));
thread.command.$SendEnd(false);
boottimer.disable();
return 3;//超时
}
}
FuncStopBoot = function(){
stopflag = 1;
}
FuncClearState = function(){
RespState = 0;
bootcount = 0;
sendstate = 1;
}
FuncInitBootState = function(){
bootstate = 0;
RespState = 0;
bootcount = 0;
sendstate = 0;
}
BCD_Conv = function(num){
if(num > 99){
return 0;
}
var ret = 0;
ret += math.floor(num/10) * 16;
ret += num%10;
return ret;
}
var sendblockstate = 0;
var alldata = {};
var blocknum = 1;
var alldata_blocknum = 0;
var block_sended = 0;
var sendFlashDriverState = 0;
FuncSendBlockInit = function(id){
var len = 0;
alldata = FuncGetAllData(id);
blocknum = 1;
if(alldata == null){
FuncDisplay("错误:空数据");
alldata_blocknum = 0;
sendblockstate = 0xff;
return 1;
}
for(i=1;#alldata;1){
len += math.ceil(#alldata[i]["data"] / 0x200)
}
alldata_blocknum = len;
block_sended = 0;
sendblockstate = 0;
return 0;
}
nextstate = function(val){
if(val == 0){
bootstate += 1;
sendstate = 0;
block_sended += 1;
}
}
var FuncSendBlockApp_sendflag = 0
FuncSendBlockApp = function(){
select(sendblockstate) {
case 0{
if(FuncSendBlockApp_sendflag == 0){
FuncReq34(alldata[blocknum]["address"],#alldata[blocknum]["data"]);
FuncSendBlockApp_sendflag = 1;
RespState = 0;
bootcount = 0;
}
else {
if(FuncWait(0x34) == 0){
FuncSendBlockApp_sendflag = 0;
sendblockstate += 1;
}
}
}
case 1 {
FuncStartSendBlock(alldata[blocknum]["data"]);//初始化
FuncSendBlockApp_sendflag = 0;
sendblockstate += 1;
}
case 2 {
if(FuncSendBlockApp_sendflag == 0){
FuncSendNextBlock();
FuncSendBlockApp_sendflag = 1;
block_sended += 1;
RespState = 0;
bootcount = 0;
}
else {
if(FuncWait(0x36) == 0){
FuncSendBlockApp_sendflag = 0;
if(FuncGetSendStatus() == true){//所有块发送完成
sendblockstate += 1;
}
}
}
}
case 3 {
if(FuncSendBlockApp_sendflag == 0){
FuncReq37();
FuncSendBlockApp_sendflag = 1;
RespState = 0;
bootcount = 0;
}
else {
if(FuncWait(0x37) == 0){
FuncSendBlockApp_sendflag = 0;
sendblockstate += 1;
}
}
}
else {
if(blocknum < #alldata){
blocknum += 1;
sendblockstate = 0;
}
else {
//所有数据发送完成
return 0;
}
}
}
return 1;
}
FuncSendBlockFlashDriver = function(){
select(sendFlashDriverState) {
case 0 {
}
case 1 {
}
case 2 {
}
case 3 {
}
else {
}
}
}
var delaycount = 0;
//boot总流程
var boottime = 0;
FuncBootSeq = function(){
boottime++;
select(bootstate) {
case 0 {
boottime = 1;
if(sendstate == 0){
//FuncSendBlockInit(0);
FuncReadDID(0xF186);
FuncClearState();
}
else {
var ret = FuncWait(0x22);
nextstate(ret);
}
}
case 1 {
if(sendstate == 0){
FuncReadDID(0xF195);//读取软件版本
FuncClearState();
}
else {
var ret = FuncWait(0x22);
nextstate(0);
}
}
case 2 {
if(sendstate == 0){
FuncReadDID(0xF193);//读取硬件版本
FuncClearState();
}
else {
var ret = FuncWait(0x22);
nextstate(0);
}
}
case 3 {
if(sendstate == 0){
FuncReq10(true,0x03);//进入扩展会话
FuncClearState();
}
else {
//var ret = FuncWait(0x10);
nextstate(0);
}
}
case 4 {
if(sendstate == 0){
FuncReq85(0x02);//关闭DTC
FuncClearState();
}
else {
//var ret = FuncWait(0x85);
nextstate(0);
}
}
case 5 {
if(sendstate == 0){
FuncReq28(0x01,0x01);//禁止发送
FuncClearState();
}
else {
//var ret = FuncWait(0x28);
nextstate(0);
}
}
case 6 {
if(sendstate == 0){
FuncReq10(false,0x02);//进入编程会话
FuncClearState();
}
else {
var ret = FuncWait(0x10);
nextstate(ret);
}
}
case 7 {
if(sendstate == 0){
FuncReq27(0x11);//解密
FuncClearState();
}
else {
var ret = FuncWait(0x27);
nextstate(ret);
}
}
case 8 {
if(sendstate == 0){
//FuncReq27(02);//发送key
FuncClearState();
FuncDisplay("等待解锁");
}
else {
//var ret = FuncWait(0x27);
var ret = FuncDiag27GetState();
nextstate(ret);
}
}
case 9 {
if(sendstate == 0){
FuncClearState();
FuncDIDWriteStr(0xf198,"Daming ");//写入repair_shopcode
}
else {
var ret = FuncWait(0x2E);
nextstate(ret);
}
}
case 10 {
if(sendstate == 0){//写入installation_date
var year1 = BCD_Conv(time.now().year/100);
var year2 = BCD_Conv(time.now().year%100);
var month = BCD_Conv(time.now().month);
var day = BCD_Conv(time.now().day);
FuncReq2E(0XF199,{year1,year2,month,day})
FuncClearState();
//console.log("写入installation_date")
}
else {
var ret = FuncWait(0x2E);
nextstate(ret);
}
}
case 11 {
if(sendstate == 0){//发送数据
FuncSendBlockInit(0);
FuncDisplay("开始发送FlashDrv数据");
FuncClearState();
}
else {
var ret = FuncSendBlockApp();
nextstate(ret);
}
}
case 12 {
if(sendstate == 0){//CheckLogicBlock
var crc = FuncGetFlashCRC(0);
FuncReq31CheckLogicBlock(crc);
FuncClearState();
}
else {
var ret = FuncWait(0x31);
nextstate(ret);
}
}
case 13 {
if(sendstate == 0){//CheckLogicBlock
FuncReq31EraseFlash(0xA000,0x10000);
FuncClearState();
}
else {
var ret = FuncWait(0x31);
nextstate(ret);
}
}
case 14 {
if(sendstate == 0){//发送数据
FuncSendBlockInit(1);
FuncDisplay("开始发送App数据");
FuncClearState();
}
else {
var ret = FuncSendBlockApp();
nextstate(ret);
}
}
case 15 {
if(sendstate == 0){//CheckLogicBlock
var crc = FuncGetFlashCRC(1);
FuncReq31CheckLogicBlock(crc);
FuncClearState();
}
else {
var ret = FuncWait(0x31);
nextstate(ret);
}
}
case 16 {
if(sendstate == 0){////Programming Dependencies
FuncReq31CheckPD();
FuncClearState();
}
else {
var ret = FuncWait(0x31);
nextstate(ret);
}
}
case 17 {
if(sendstate == 0){//复位
FuncClearState();
FuncReq11(0x03);
}
else {
var ret = FuncWait(0x11);
nextstate(ret);
}
}
case 18 {
if(sendstate == 0){//等待复位完成
delaycount = 0;
FuncClearState();
}
else {
delaycount += 1;
if(delaycount > 100){
nextstate(0);//延时1S
}
}
}
case 19 {
if(sendstate == 0){
FuncReq10(true,0x03);//进入扩展会话
FuncClearState();
}
else {
var ret = FuncWait(0x10);
nextstate(ret);
}
}
case 20 {
if(sendstate == 0){
FuncReq28(0x00,0x01);//开启发送
FuncClearState();
}
else {
var ret = FuncWait(0x28);
nextstate(ret);
}
}
case 21 {
if(sendstate == 0){
FuncReq85(0x01);//开启DTC
FuncClearState();
}
else {
var ret = FuncWait(0x85);
nextstate(ret);
}
}
case 22 {
if(sendstate == 0){
FuncReq10(true,0x01);//进入默认会话
FuncClearState();
}
else {
var ret = FuncWait(0x10);
nextstate(ret);
}
}
else {
thread.command.$SendEnd(true);
//FuncDisplay("刷写完成,用时 " + boottime/100 + " S")
boottimer.disable();
}
}
if(alldata_blocknum != 0){
thread.command.$SetProgress(block_sended/alldata_blocknum * 100);
}
}

View File

@ -0,0 +1,106 @@
xorArray = {0xAA,0x50,0x43,0x52}
securetyKeyCalc = function(pucSeed,ucSecurityLevel){
//SeedSec_t cal,key,seed;
var seed = {0,0,0,0};
var key = {0,0,0,0};
var cal = {0,0,0,0};
seed[1]=pucSeed[4];
seed[2]=pucSeed[3];
seed[3]=pucSeed[2];
seed[4]=pucSeed[1];
select(ucSecurityLevel) {
case 0x01 {
/*
cal[1] = seed[1]^xorArray[1];
cal[2] = seed[2]^xorArray[2];
cal[3] = seed[3]^xorArray[3];
cal[4] = seed[4]^xorArray[4];
key[4] = ((cal[1]&0x0F)<<4)|( cal[1]&0xF0);
key[3] = ((cal[3]&0x0F)<<4)|((cal[4]&0xF0)>>4);
key[2] = (cal[3]&0xF0)|((cal[2]&0xF0)>>4);
key[1] = ((cal[4]&0x0F)<<4)|( cal[2]&0x0F);
*/
var dll = raw.loadDll("/MSW.dll",,"cdecl" );
//
if(dll != null){
FuncDisplay("加载密钥dll成功");
var retlen = raw.buffer(4,0);
var seedraw = raw.buffer(4,0);
var iVariant = raw.buffer(20,0);
var keyraw = raw.buffer(4,0);
seedraw[1] = pucSeed[1];
seedraw[2] = pucSeed[2];
seedraw[3] = pucSeed[3];
seedraw[4] = pucSeed[4];
var ret = 0;
ret = dll.GenerateKeyEx(seedraw,4,0x01,iVariant,keyraw,4,retlen);
FuncDisplay("ret = " ++ ret );
key[1] = keyraw[1];
key[2] = keyraw[2];
key[3] = keyraw[3];
key[4] = keyraw[4];
return key;
}
else {
FuncDisplay("加载密钥dll失败");
}
}
case 0x03 {
/*
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);
*/
cal[1] = ((seed[1]&0xF8)>>3)^xorArray[1];
cal[2] = ((seed[2]&0xF8)>>3)^xorArray[2];
cal[3] = ((seed[3]&0xF8)>>3)^xorArray[3];
cal[4] = ((seed[4]&0xF8)>>3)^xorArray[4];
key[1] = ((cal[4]&0x07)<<5)|(( cal[1]&0xF8)>>3);
key[2] = ((cal[0]&0x07)<<5)|(cal[3]&0x1F);
key[3] = (cal[2]&0xF8)|((cal[4]&0xE0)>>5);
key[4] = (cal[3]&0xF8)|( cal[2]&0x07);
}
case 0x11 {
/*
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];
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);
*/
cal[1] = seed[1]^xorArray[1];
cal[2] = seed[2]^xorArray[2];
cal[3] = seed[3]^xorArray[3];
cal[4] = seed[4]^xorArray[4];
key[4] = ((cal[2]&0x03)<<6)|(( cal[1]&0xFC)>>2);
key[3] = ((cal[1]&0x03)<<6)|(cal[4]&0x3F);
key[2] = (cal[4]&0xFC)|((cal[3]&0xC0)>>6);
key[1] = (cal[3]&0xFC)|(cal[2]&0x03);
}
else {
}
}
var pucKey = {0,0,0,0};
pucKey[1]=key[4];
pucKey[2]=key[3];
pucKey[3]=key[2];
pucKey[4]=key[1];
return pucKey;
}

View File

@ -0,0 +1,170 @@
var Crc32Tble =
{
0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,
0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,
0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,
0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,
0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,
0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,
0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,
0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,
0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,
0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,
0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,
0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,
0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,
0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,
0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,
0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,
0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,
0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,
0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,
0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,
0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,
0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,
0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
};
var fileinfo = "";
var FlashData = {};
var AllData = {}
FuncGetAllData = function(id){
if(id > #AllData){
return null;
}
return AllData[id];
}
FuncGetFileInfo = function(){
return fileinfo;
}
FuncCRC32Calc = function(Data){
var usCRC = 0xFFFFFFFF;
for(i=1;#Data;1){
var temp = (usCRC ^ Data[i]) & 0xFF;
usCRC = ((usCRC >> 8)&0xffffff) ^ Crc32Tble[temp+1];
}
usCRC ^= 0xFFFFFFFF;
return usCRC;
}
FuncGetFlashCRC = function(id){
var Data = AllData[id];
var crc = FuncCRC32Calc(Data[1].data);
return crc;
}
FuncOpenS19File = function(id,path){
import fsys.dlg;
if(path == null){
path = fsys.dlg.open('S19文件|*.sx;*.s19;*.srec|所有文件|*.*||',,,winform);
}
if(io.exist( path )){
//winform.editPath.text = path;
var readbuf = string.load(path);
readbuf = string.split(readbuf,'\r\n');
//console.dumpJson(readbuf);
var block = null;
FlashData = {};
for(i=1;#readbuf;1){
if(#readbuf[i] == 0){
continue;
}
var str = readbuf[i];
var data = "";
var addr = 0;
var len = 0;
select(string.slice(str,1,2)) {
case "S0"{
//S0为文件信息
var fileinfobuf = string.slice(str,9,-3);//取出文件信息
fileinfo = "file info:"+string.unhex(fileinfobuf,"")//解码
fileinfo = string.replace(fileinfo,"\z"," ");//替换空字符
FuncDisplay(fileinfo)//显示
continue;
}
case "S1"{
len = tonumber(string.slice(str,3,4),16)
addr = tonumber(string.slice(str,5,8),16)
data = string.slice(str,9,-3)
}
case "S2"{
len = tonumber(string.slice(str,3,4),16)
addr = tonumber(string.slice(str,5,10),16)
data = string.slice(str,11,-3)
}
case "S3"{
len = tonumber(string.slice(str,3,4),16)
addr = tonumber(string.slice(str,5,12),16)
data = string.slice(str,13,-3)
}
else {
continue;
}
}
if(block == null){
//空表,第一次进入
block = {};
block["address"] = addr;
block["data"] = {};
}
else {
//非空表
if(addr == (block["address"]+#block["data"])){
//连续,无动作
}
else {
//不同块,新建块
FlashData[#FlashData+1]={"address" = block["address"];"data" = block["data"];}
block["address"] = addr;
block["data"] = {};
}
}
data = string.unhex(data,"")
for(i=1;#data;1){
var bytedata = string.unpack(data,i)
table.push(block["data"],bytedata)
}
}
if(block != null){
table.push(FlashData,block)
}
/*
for(i=1;#FlashData;1){
var crc = FuncCRC32Calc(FlashData[i].data);
var str = string.format("block %d:addr=0x%X,len=0x%X,crc=0x%X",i,FlashData[i]["address"],#FlashData[i].data,crc);
FuncDisplay(str);
}
*/
AllData[id] = FlashData;
}
//blocknum = 1;
return path;
}

View File

@ -0,0 +1,268 @@
var g_aes128_cbc_mask =
{
{0x53, 0x57, 0x53, 0x45, 0x4D, 0x33, 0x31, 0x20, 0x20, 0x20, 0x20, 0x20} , //level1
{0x53, 0x57, 0x53, 0x45, 0x4D, 0x33, 0x33, 0x20, 0x20, 0x20, 0x20, 0x20} , //level3
{0x53, 0x57, 0x53, 0x45, 0x4D, 0x33, 0x35, 0x20, 0x20, 0x20, 0x20, 0x20} , //level5
{0x53, 0x57, 0x53, 0x45, 0x4D, 0x33, 0x37, 0x20, 0x20, 0x20, 0x20, 0x20} , //level7
{0x53, 0x57, 0x53, 0x45, 0x4D, 0x33, 0x39, 0x20, 0x20, 0x20, 0x20, 0x20} , //level9
{0x53, 0x57, 0x53, 0x45, 0x4D, 0x33, 0x42, 0x20, 0x20, 0x20, 0x20, 0x20} , //levelb
};
var g_aes128_cbc_encrcon =
{
0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a,
0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39,
0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a,
0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8,
0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef,
0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc,
0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b,
0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3,
0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94,
0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20,
0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35,
0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f,
0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04,
0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63,
0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd,
0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb
};
var g_aes12_cbc_sbox =
{
/*0 1 2 3 4 5 6 7 8 9 A B C D E F
*/
0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76,
0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0,
0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15,
0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75,
0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84,
0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf,
0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8,
0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2,
0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73,
0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb,
0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79,
0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08,
0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a,
0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e,
0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf,
0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16
};
var g_dll_Key_str = "56 44 4B 66 62 45 66 61 44 48 33 39 52 61 52 68";
var g_dll_Key = string.map(g_dll_Key_str,"\x\x",lambda(v) tonumber(v,16));
aes128_cbc_make_iv = function(seed,mask){
var ret = {};
for(i=1;4;1){
ret[i] = (seed[i] + 0x55)&0xff;
}
for(i=1;16-4;1){
ret[i+4] = mask[i];
}
return ret;
}
aes128_cbc_pcks7 = function(input,ouputsize){
var l_offset = 0;
var output = {};
if(#input <= ouputsize){
l_offset = ouputsize - #input;
}
for(i=1;#input;1){
output[i] = input[i];
}
for(i=1;l_offset;1){
output[i+#input] = l_offset;
}
return output;
}
aes128_cbc_encrypt_ext = function(iv,plain,key){
var l_out = {};
for(i=1;16;1){
plain[i]=plain[i] ^ iv[i];
}
g_aes128_cbc_enckey_expansion(key);
l_out = g_aes128_cbc_cipher(plain);
return l_out;
}
g_aes12_cbc_roundkey = {};
g_aes128_cbc_enckey_expansion = function(key){
var temp = {0,0,0,0};
for(i=1;16;1){
g_aes12_cbc_roundkey[i] = key[i];
}
for(i=5;(4*11);1){
for(j=1;4;1){
temp[j] = g_aes12_cbc_roundkey[(i-2) * 4 + j]
}
//showtab(temp,string.format("i=%d,temp=",i ));
if((i-1)&0x03 == 0){
var k = temp[1];
temp[1] = temp[2];
temp[2] = temp[3];
temp[3] = temp[4];
temp[4] = k;
//showtab(temp,string.format("i=%d,temp=",i ));
temp[1]=g_aes12_cbc_sbox[temp[1]+1];
temp[2]=g_aes12_cbc_sbox[temp[2]+1];
temp[3]=g_aes12_cbc_sbox[temp[3]+1];
temp[4]=g_aes12_cbc_sbox[temp[4]+1];
temp[1] = temp[1] ^ g_aes128_cbc_encrcon[((i-1)>>2) + 1];
}
g_aes12_cbc_roundkey[(i-1)*4+1] = g_aes12_cbc_roundkey[(i-5)*4+1] ^ temp[1];
g_aes12_cbc_roundkey[(i-1)*4+2] = g_aes12_cbc_roundkey[(i-5)*4+2] ^ temp[2];
g_aes12_cbc_roundkey[(i-1)*4+3] = g_aes12_cbc_roundkey[(i-5)*4+3] ^ temp[3];
g_aes12_cbc_roundkey[(i-1)*4+4] = g_aes12_cbc_roundkey[(i-5)*4+4] ^ temp[4];
}
//showtab(g_aes12_cbc_roundkey,"g_aes12_cbc_roundkey");
}
g_aes12_cbc_state = {{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}};
g_aes128_cbc_cipher = function(input){
var output = {};
for(i=1;4;1){
for(j=1;4;1){
g_aes12_cbc_state[j][i] = input[(i-1)*4 + j]
}
}
g_aes128_cbc_encadd_roundkey(0);
for(i=1;9;1){
g_aes128_cbc_enc_subbytes();
g_aes128_cbc_shift_rows();
g_aes128_cbc_mix_columns();
g_aes128_cbc_encadd_roundkey(i);
}
g_aes128_cbc_enc_subbytes();
g_aes128_cbc_shift_rows();
g_aes128_cbc_encadd_roundkey(10);
for(i=1;4;1){
for(j=1;4;1){
output[(i-1)*4+j]=g_aes12_cbc_state[j][i];
}
}
return output;
}
g_aes128_cbc_encadd_roundkey = function(round){
for(i=1;4;1){
for(j=1;4;1){
g_aes12_cbc_state[j][i] ^= g_aes12_cbc_roundkey[round * 16 + (i-1) * 4 + j];
}
}
}
g_aes128_cbc_enc_subbytes = function(){
for(i=1;4;1){
for(j=1;4;1){
//console.log("g_aes12_cbc_state[i][j] + 1 = " + (g_aes12_cbc_state[i][j] + 1))
g_aes12_cbc_state[i][j] = g_aes12_cbc_sbox[g_aes12_cbc_state[i][j] + 1];
}
}
}
g_aes128_cbc_shift_rows = function(){
var temp=0;
/* Rotate first row 1 columns to left
*/
temp=g_aes12_cbc_state[2][1];
g_aes12_cbc_state[2][1]=g_aes12_cbc_state[2][2];
g_aes12_cbc_state[2][2]=g_aes12_cbc_state[2][3];
g_aes12_cbc_state[2][3]=g_aes12_cbc_state[2][4];
g_aes12_cbc_state[2][4]=temp;
/* Rotate second row 2 columns to left
*/
temp=g_aes12_cbc_state[3][1];
g_aes12_cbc_state[3][1]=g_aes12_cbc_state[3][3];
g_aes12_cbc_state[3][3]=temp;
temp=g_aes12_cbc_state[3][2];
g_aes12_cbc_state[3][2]=g_aes12_cbc_state[3][4];
g_aes12_cbc_state[3][4]=temp;
/* Rotate third row 3 columns to left
*/
temp=g_aes12_cbc_state[4][1];
g_aes12_cbc_state[4][1]=g_aes12_cbc_state[4][4];
g_aes12_cbc_state[4][4]=g_aes12_cbc_state[4][3];
g_aes12_cbc_state[4][3]=g_aes12_cbc_state[4][2];
g_aes12_cbc_state[4][2]=temp;
}
g_aes128_cbc_mix_columns = function(){
var Tmp,Tm,t;
for(i=1;4;1)
{
t=g_aes12_cbc_state[1][i];
//console.dumpJson(g_aes12_cbc_state)
Tmp = g_aes12_cbc_state[1][i] ^ g_aes12_cbc_state[2][i] ^ g_aes12_cbc_state[3][i] ^ g_aes12_cbc_state[4][i] ;
Tm = g_aes12_cbc_state[1][i] ^ g_aes12_cbc_state[2][i] ;
Tm = AES128_CBC_XTIME(Tm);
g_aes12_cbc_state[1][i] ^= Tm ^ Tmp ;
Tm = g_aes12_cbc_state[2][i] ^ g_aes12_cbc_state[3][i] ;
Tm = AES128_CBC_XTIME(Tm);
g_aes12_cbc_state[2][i] ^= Tm ^ Tmp ;
Tm = g_aes12_cbc_state[3][i] ^ g_aes12_cbc_state[4][i] ;
Tm = AES128_CBC_XTIME(Tm);
g_aes12_cbc_state[3][i] ^= Tm ^ Tmp ;
Tm = g_aes12_cbc_state[4][i] ^ t ;
Tm = AES128_CBC_XTIME(Tm);
g_aes12_cbc_state[4][i] ^= Tm ^ Tmp ;
}
}
AES128_CBC_XTIME = function(x){
var ret = 0;
ret = (x<<1) ^ (((x>>7) & 1) * 0x1b);
return (ret&0xff);
}
showtab = function(tab,name){
var str = name + " = ";
for(k,v in tab){
str = string.format("[%d] = %x",k,v );
}
//console.log(str);
}
g_aes128_seed = {};
g_aes128_cbc_iv = {};
GenerateKeyEx = function(seed,level){
var l_id = 0;
if(level >= 0x01 && level <= 0x0C){
l_id = math.floor((level - 1)/2) + 1 ;
}
g_aes128_seed = {};
g_aes128_cbc_iv = {};
for(i=1;4;1){
g_aes128_seed[i] = seed[i];
}
g_aes128_cbc_iv = aes128_cbc_make_iv(g_aes128_seed,g_aes128_cbc_mask[l_id]);
var l_text = aes128_cbc_pcks7(g_aes128_seed,16);
var l_res = aes128_cbc_encrypt_ext(g_aes128_cbc_iv,l_text,g_dll_Key)
return l_res;
//console.log("l_id = " + l_id)
}

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输入的地址超出范围库的返回值有可能不报错镜像区不报错保留区跑飞

1128
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

4713
ECU_APP/ECU_APP.mtpj Normal file

File diff suppressed because it is too large Load Diff

2211
ECU_APP/ECU_APP.rcpe Normal file

File diff suppressed because it is too large Load Diff

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

File diff suppressed because it is too large Load Diff

38
ECU_APP/OutPut/FlsDrv.s19 Normal file
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,327 @@
QualityReport
2024年5月24日 16:27:02
------ Start build(ECU_APP, DefaultBuild) ------
E:\Program Files (x86)\renesas\CS+\CC\CC-RL\V1.11.00\Bin\ccrl.exe rscan_driver\r_rl78_can_irq.c r_main.c r_cg_timer_user.c CanNw\CanNw.c CanNw\CanNwConfig.c diagnose\Dcm_DID_Cfg.c diagnose\extern.c user\appTask.c user\can_user.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
r_main.c(134):W0523076:Function declarations should have prototype
r_cg_timer_user.c(141):W0520167:Argument of type "uint16_t __near *" is incompatible with parameter of type "unsigned int *__near"
diagnose\Dcm_DID_Cfg.c(177):W0520144:A value of type "long" cannot be used to initialize an entity of type "uint8 __far *__near"
diagnose\Dcm_DID_Cfg.c(177):W0520152:Conversion of nonzero integer to pointer
diagnose\Dcm_DID_Cfg.c(307):W0520174:Expression has no effect
diagnose\Dcm_DID_Cfg.c(333):W0520144:A value of type "long" cannot be used to initialize an entity of type "uint8 __far *__near"
diagnose\Dcm_DID_Cfg.c(333):W0520152:Conversion of nonzero integer to pointer
diagnose\Dcm_DID_Cfg.c(365):W0520174:Expression has no effect
diagnose\extern.c(107):W0520940:Missing return statement at end of non-void function "GetVoltage"
diagnose\extern.c(135):W0520940:Missing return statement at end of non-void function "GetMotorLockStatus"
diagnose\extern.c(181):W0520111:Statement is unreachable
diagnose\extern.c(322):W0520111:Statement is unreachable
diagnose\extern.c(326):W0520111:Statement is unreachable
diagnose\extern.c(330):W0520111:Statement is unreachable
diagnose\extern.c(334):W0520111:Statement is unreachable
diagnose\extern.c(505):W0520940:Missing return statement at end of non-void function "GetCanBusOffErr"
diagnose\extern.c(523):W0520940:Missing return statement at end of non-void function "GetBcmCommFault"
diagnose\extern.c(540):W0520940:Missing return statement at end of non-void function "GetAcpCommFault"
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: 00000bf3 Byte(s)
ROMDATA SECTION: 00000710 Byte(s)
PROGRAM SECTION: 00004dc0 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:21)(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
-Input=DefaultBuild\CRC.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=7833E8
-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\HS550\code\ECU_APP\DefaultBuild\ECU_APP.abs: 5789700906a6715421241d8a08276687e0482ea7
F:\FCB_project\temp\HS550\code\ECU_APP\DefaultBuild\ECU_APP.mot: 162274c4583b3ea04130ac657ab7c6beadd2e2fa
F:\FCB_project\temp\HS550\code\ECU_APP\output\ECU_APP.S19: 43c9abe10405f05bf4af040bc8df41b109d4ba66
--- System Information ---
*OS Version
Microsoft Windows 10 专业版 (-, 10.0.19045, 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
264 MB
*Number of GDI Objects
2087
*Number of USER Objects
1151
*Opened Files
5 editors, 5 files, 36 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\HS550\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"
#include "PINdef.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,730 @@
/* @处根据实际情况填写相关信息,将@字符以及这条提示语句去掉 */
/******************************************************************************
| 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++;
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] = 0x61;
#if NOW_BOARD == LEFT_BOARD
data[1] = 0x0A;
#else
data[1] = 0x0B;
#endif
data[2] = '1';
data[3] = '2';
data[4] = '3';
data[5] = 0x00;
data[6] = '0';
data[7] = '0';
data[8] = '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] = 23;
data[2] = 7;
data[3] = 24;
data[4] = 0;
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

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

@ -0,0 +1,127 @@
/******************************************************************************
| File Name : Dcm_App.c
| Description: <EFBFBD><EFBFBD>Ϸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*****************************************************************************/
/******************************************************************************
* 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 encypt(uint32 seed)
{
uint8 i,data[8];
uint32 seed_temp;
seed_temp = seed;//(uint32)(data[0])<<24 | (uint32)(data[1])<<16 | (uint32)(data[2])<<8 | (uint32)(data[3]);
if(seed_temp != 0)
{
for(i=0;i<35;i++)
{
if(seed_temp & 0x80000000)
{
if(seed_temp & 0x00000002)
{
seed_temp = ((seed_temp << 1)&0xFFFFFFFF);
seed_temp = (seed_temp^0xDFAF30B5)&0xFFFFFFFF;
}
else
{
seed_temp = (seed_temp << 1)&0xFFFFFFFF;
seed_temp = seed_temp^0x6F21EAAE;
}
}
else
seed_temp = (seed_temp << 1)&0xFFFFFFFF;
}
}
// data[0] = seed_temp>>24;
// data[1] = seed_temp>>16;
// data[2] = seed_temp>>8;
// data[3] = seed_temp;
// TransmitCAN_Message(0x701,8,data);
return seed_temp;
}
uint32 SecurityLevel_1(uint32 Seed)
{
return encypt(Seed);
}
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

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

@ -0,0 +1,596 @@
#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
'0' , //AC_SW_VERSION_02
'1' , //AC_SW_VERSION_03
' ', //AC_SW_VERSION_04
' ', //AC_SW_VERSION_05
' ' , //AC_SW_VERSION_06
' ' , //AC_SW_VERSION_07
' ' , //AC_SW_VERSION_08
' ' , //AC_SW_VERSION_09
' ' , //AC_SW_VERSION_10
' ' , //AC_SW_VERSION_11
' ' , //AC_SW_VERSION_12
' ' , //AC_SW_VERSION_13
' ' , //AC_SW_VERSION_14
' ' , //AC_SW_VERSION_15
};
__far const unsigned char SUP_ECU_SW_VERSION[]={
23 , //年
26 , //周
0 , //次
11 , //版本
0 , //次要信息
0 , //MCU版本
23 , //年
7 , //月
24 , //日
' ' , //
' ' , //
' ' , //
' ' , //
' ' , //
' ' , //
' ' , //
};
#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<6;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: 2024-05-23
***********************************************************************************************************************/
/***********************************************************************************************************************
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: 2024-05-23
***********************************************************************************************************************/
#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: 2024-05-23
***********************************************************************************************************************/
/***********************************************************************************************************************
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
***********************************************************************************************************************/
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: 2024-05-23
***********************************************************************************************************************/
/***********************************************************************************************************************
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 */

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