This application note describes CAN protocol driver software routines written in ‘C’ for the members of the Siemens 16-bit microcontroller family C166 which are equipped with an on-chip CAN module (e.g. C167CR, C164CI).1 Introduction31.1 Abstract..31.2 CAN Driver Routines Overview .31.3 Files included in the CAN Driver ApNote41.4 Global Variables used by the Driver Routines41.5 Notes concerning this ApNote 52 Routine #1: Initialization Procedure for the CAN Module73 Routine #2: Configuring a Message Object of the CAN Module104 Routine #3: Load the data bytes of a Message Object..135 Routine #4: Read the data bytes of a Message Object (1..14) 156 Routine #5: Read out Message Object 15 (Basic CAN Message Object) 177 Routine #6: Send a Message Object .208 Routine #7: Check a Message Object (1..14) for new data ..229 Routine #8: Check Message Object 15 for new data or new remote frame2410 Routine #9: Check for a Bus Off Situation in the CAN Module2511 Hints concerning the CAN Library CAN16X1.LIB2612 Hints concerning the Example Programs..2613 Hints concerning the Interrupt Service Routine CISR16X1.C ..3014 Hints concerning the Header File CREG_16X.H..3315 Hints concerning the CANalyzer Configuration Files (*.CFG) .33
猜您喜欢
评论