AN1105 STMicroelectronics, AN1105 Datasheet - Page 27

no-image

AN1105

Manufacturer Part Number
AN1105
Description
ST7 PCAN PERIPHERAL DRIVER
Manufacturer
STMicroelectronics
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
AN1105W-12-RR
Quantity:
13 804
Part Number:
AN1105W-22-RR
Manufacturer:
SANYO
Quantity:
8 570
Part Number:
AN1105W-TR
Manufacturer:
PANASONIC
Quantity:
27 995
Part Number:
AN1105W-TR
Manufacturer:
STANLEY
Quantity:
20 000
void CAN_Bus_Off_Notification(void)
These functions are called after a status change.
Option: #define STATUS_CHANGE_NOTIFICATION
void CAN_General_Reception_Error_Notification(void)
This function notifies the application of any hardware reception errors.
Option: #define DEBUG and #define GENERAL_RECEPTION_ERROR
void CAN_Reception_Status(CAN_Receive_Error status)
This function is called after a reception attempt and returns the status of the software
processing (See
Option: #define DEBUG
void CAN_Overrun_Notification(void)
This function notifies the application of any overruns.
Option: #define DEBUG
void CAN_Transmission_Error_Notification(CAN_Transmit_Error status)
This function notifies the application of any hardware transmission errors.
Option: #define DEBUG
2.2 HOW TO USE THE CAN DRIVER: A DEMO APPLICATION
In this section, we will describe step-by-step the configuration and programming of a simple
test application using the ST7 CAN driver.
2.2.1 Application
First of all, we must define how the application will look, i.e. which messages our cell will be
able to send, which ones it will accept to receive, and how it will behave when specific mes-
sages are received.
Let’s imagine the following:
– The cell has to run immediately after power-on, and does not have to send a dominant pulse.
– Every 15 ms the cell must send the contents of the ST7 A/D Converter data register. The
– Upon reception of a remote frame (see
– Upon reception of a given data item, the CAN cell must shut down. This ID of the message
– The cell is supposed to receive 3 other data messages coming from other nodes. Let’s im-
identifier (ID) of this message could be, for example, 0x402.
mission of a given message. The ID of the remote frame could be, for example, 0x500 (con-
sequently, the ID of the answer will also be 0x500).
could be 0x600, and the data item 0xFF, in its first data byte.
agine they are identified by 0x127, 0x311, 0x3A5.
“Enum -type variables” on page
Section 1.2 "CAN
20).
ST7 pCAN PERIPHERAL DRIVER
Frame") it must reply with the trans-
27/100

Related parts for AN1105