EasyManua.ls Logo

Infineon C166 Series - Page 54

Infineon C166 Series
69 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
AP29000
Connecting C166 and C500 Microcontroller to CAN
Ways of handling the SAE 81C90/91 and the CAN Module on the C167CR / C515C
Application Note 53 V 1.0, 2004-02
If the programmer wishes the data bytes to be in a defined state, he can set all data
bytes of the message object to zero now:
C167CR / C515C:
DB0_Mn = 0x00; /* set data bytes to 0 */
DB1_Mn = 0x00; /* (Addr. EFn7h - EFnEh (C167CR) */
DB2_Mn = 0x00; /* (Addr. F7n7h - F7nEh (C515C) */
DB3_Mn = 0x00;
DB4_Mn = 0x00;
DB5_Mn = 0x00;
DB6_Mn = 0x00;
DB7_Mn = 0x00;
Finally, all message objects that will not be used have to be declared as not valid:
C167CR:
MCR_Mn = 0x5555; /* reset all functions incl. MSGVAL */
C515C:
MCR0_Mn = 0x55; /* reset all functions incl. MSGVAL */
MCR1_Mn = 0x55;
Clearing bits INIT and CCE ends the initialization. Setting the bits IE (Interrupt
Enable), SIE (Status Change Interrupt Enable), and EIE (Error Interrupt Enable) at
the same time enables all interrupts of the CAN module to the CPU.
C167CR:
CSR = 0x000E; /* End initialization */
/* 0 0 0 0 0 0 0 0 <STATUS CONTROL> 0 0 0 0 1 1 1 0 */
/* - - - R T LEC 0 C - - E S I I */
/* X X C I I E N */
/* O O E E E I */
/* K K T */
C515C:
CR = 0x0E; /* End initialization */
/* 0 0 0 0 1 1 1 0 */
/* T C - - E S I I */
/* E C I I E N */
/* S E E E I */
/* T T */

Table of Contents

Related product manuals