![Infineon 82C900 Скачать руководство пользователя страница 17](http://html1.mh-extra.com/html/infineon/82c900/82c900_application-note_2055171017.webp)
AP29002
Standalone TwinCAN Controller
Using special features of the 82C900
Application Note
16
V 1.0, 2004-02
Now the transmit message object is set up by setting the corresponding register in the
82C900. It works similar to the receive object, only the data direction and identifier are
different and no interrupt node is needed.
//set up CAN message object 1 (TX), node A
SSC_SendByte(MSG_OBJ_BASE(1)+MSGCTRn,0x7F);
// set MSGVAL to '01' => reset
SSC_SendByte(MSG_OBJ_BASE(1)+MSGCTRn,0xFD);
// set INTPND to '01' => reset
SSC_SendByte(MSG_OBJ_BASE(1)+1,0x7F);
// set RMTPND to '01' => reset
SSC_SendByte(MSG_OBJ_BASE(1)+1,0xDF);
// set TRXQ to '01' => reset
SSC_SendByte(MSG_OBJ_BASE(1)+MSGCFGn,0x18);
// clear NODE in MSGCFGn, set DIR=1 (transmit),
// 1 data byte (DLC=1)
SSC_SendByte(MSG_OBJ_BASE(1)+2,0x08);
//
identifier
to
0x0002
SSC_SendByte(MSG_OBJ_BASE(1)+1,0xF7);
// set CPUUPD to '01' => reset
SSC_SendByte(MSG_OBJ_BASE(1)+1,0xFE);
// set NEWDAT to '10' => set
SSC_SendByte(MSG_OBJ_BASE(1)+MSGCTRn,0xBF);
// set MSGVAL to '10' => set
while
(1){};
}