AN1105 STMicroelectronics, AN1105 Datasheet - Page 32

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
ST7 pCAN PERIPHERAL DRIVER
Note 2: For safe programming, you should systematically verify whether the buffer is not currently being
(For specific information concerning the buffer data type, see
iables").
Remember that one of the received messages may switch off the cell. Once a message is re-
c e i v e d , w e h a v e t o c h e c k t o s e e i f i t i s t h i s o n e . T h i s i s d o n e u s i n g t h e
CAN_Data_Reception_Notification function.
CAN_Data_Reception_Notification Function
The CAN_Data_Reception_Notification function is the following prototype in can_custom.c.
The routine is called once the data in a data frame has been saved in the buffer passed in the
CAN_Request_Buffer function. Before calling the CAN_Switch_on function, refresh the
watchdog (See
the following code:
void CAN_Data_Reception_Notification(u16 message_ident)
{
if (message_ident==0x6000)//checks the id of message
}
So, if the first data byte of the message whose identifier is 0x600 contains 0xFF, the cell will
switch off and wait for a bus Wake-Up command (a dominant bit).
CAN_Remote_Reception_Notification Function
When a remote frame is received, we must send a message with a 0x500 ID. Let’s do it inside
this routine which is called each time a remote frame is received.
The message does not exist yet. As for the buffer, we have to create a variable message , by
adding the following code in the file:
////////////////////////////////////////
//VARIABLES/////////////////////////////
////////////////////////////////////////
CAN_Buffer message_to_send_on_request= /
{0x5000,DLC5,{0x00,0x01,0x02,0x03,0x04},CFALSE,CFALSE};
32/100
example! You can implement a buffer for each message type, a FIFO of standardized buffers etc.
read/written, and whether the buffer is really free before further processing.
{
if (reception_buffer.CAN_msg_data[0]==0xFF)//Checks the content of data
}
“Functions” on page
{
CAN_Switch_Off(BUS_WAKEUP);
}
21, CAN_Switch_Off for further explanation). Let’s add
Section 2.1.5.1 "Data-type Var-

Related parts for AN1105