![Infineon 82C900 Скачать руководство пользователя страница 32](http://html1.mh-extra.com/html/infineon/82c900/82c900_application-note_2055171032.webp)
AP29002
Standalone TwinCAN Controller
Using special features of the 82C900
Application Note
31
V 1.0, 2004-02
Now message object 0 is configured as receive object for the normal gateway mode
without FIFO-Buffering. The gateway capability is configured in the Message Object n
FIFO/Gateway Control Register MSGFGCR.
// message object 0
// receiving object from CAN node A, normal gateway mode,
// received messages are directly transmitted on
// destinaton side(CAN node B)
SSC_SendByte(MSG_OBJ_BASE(0)+MSGCTRn,0x7F);
// set MSGVAL to '01' => reset
SSC_SendByte(MSG_OBJ_BASE(0)+MSGCTRn,0xFD);
// set INTPND to '01' => reset
SSC_SendByte(MSG_OBJ_BASE(0)+1,0x7F);
// set RMTPND to '01' => reset
SSC_SendByte(MSG_OBJ_BASE(0)+1,0xDF);
// set TRXQ to '01' => reset
SSC_SendByte(MSG_OBJ_BASE(0)+1,0xFD);
// set NEWDAT to '01' => reset
SSC_SendByte(MSG_OBJ_BASE(0)+MSGCFGn,0x10);
// select Node A, set DIR=0(receive), 1 data byte (DLC=1)
SSC_SendByte(MSG_OBJ_BASE(0)+1,0xF7);
// set MSGLST to '01' => reset
SSC_SendByte(MSG_OBJ_BASE(0)+2,0x04);
// identifier of receive object (0) is 0x0001
SSC_SendByte(MSG_OBJ_BASE(0)+MSGFGCRn,0x00);
// FSIZE = 0 => No FIFO
SSC_SendByte(MSG_OBJ_BASE(0)+M1,0x0D);
// GDFS='1',SRREN='0',IDC="1", DLCC='1', FD='0',SDT='0'
SSC_SendByte(MSG_OBJ_BASE(0)+M2,0x01);
// CANPTR = 1 => MSOBJ 1 is destination
SSC_SendByte(MSG_OBJ_BASE(0)+M3,0x04);
// MMC ='100' => normal gateway
SSC_SendByte(MSG_OBJ_BASE(0)+MSGCTRn,0xBF);
// set MSGVAL, message object is valid