#include \"DSP28_Device.h\"
#define TXCOUNT 10000 // Transmission will take place (TXCOUNT) times..
long i;
long loopcount = 0;
void InitECan(void);
main()
{
/* Create a shadow register structure for the CAN control registers. This is
needed, since, only 32-bit access is allowed to these registers. 16-bit access
to these registers could potentially corrupt the register contents. This is
especially true while writing to a bit (or group of bits) among bits 16 - 31 */
// while(1) // Uncomment this line for infinite transmissions
for(i=0; i < TXCOUNT; i++) // Uncomment this line for finite transmissions
{
ECanaShadow.CANTRS.all = 0;
ECanaShadow.CANTRS.bit.TRS5 = 1; // Set TRS for mailbox under test
ECanaRegs.CANTRS.all = ECanaShadow.CANTRS.all;
while(ECanaRegs.CANTA.bit.TA5 == 0 ) {} // Wait for TA5 bit to be set..
//***问题就出在这里,TA5无法置1所以CAN通信怎么也不通*****************
**********************************************************
**********************************************************