поискавой системы для электроныых деталей
  Russian  ▼
ALLDATASHEETRU.COM

X  

AN1105 датащи(PDF) 32 Page - STMicroelectronics

номер детали AN1105
подробное описание детали  ST7 pCAN PERIPHERAL DRIVER
PDF  100 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
производитель  STMICROELECTRONICS [STMicroelectronics]
домашняя страница  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN1105 датащи(HTML) 32 Page - STMicroelectronics

Back Button AN1105 Datasheet HTML 28Page - STMicroelectronics AN1105 Datasheet HTML 29Page - STMicroelectronics AN1105 Datasheet HTML 30Page - STMicroelectronics AN1105 Datasheet HTML 31Page - STMicroelectronics AN1105 Datasheet HTML 32Page - STMicroelectronics AN1105 Datasheet HTML 33Page - STMicroelectronics AN1105 Datasheet HTML 34Page - STMicroelectronics AN1105 Datasheet HTML 35Page - STMicroelectronics AN1105 Datasheet HTML 36Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 32 / 100 page
background image
32/100
ST7 pCAN PERIPHERAL DRIVER
example! You can implement a buffer for each message type, a FIFO of standardized buffers etc.
Note 2: For safe programming, you should systematically verify whether the buffer is not currently being
read/written, and whether the buffer is really free before further processing.
(For specific information concerning the buffer data type, see Section 2.1.5.1 "Data-type Var-
iables").
Remember that one of the received messages may switch off the cell. Once a message is re-
c e i v ed, w e hav e t o c hec k to s ee i f i t i s thi s one . T h i s i s don e us i ng the
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 “Functions” on page 21, CAN_Switch_Off for further explanation). Let’s add
the following code:
void CAN_Data_Reception_Notification(u16 message_ident)
{
if (message_ident==0x6000)//checks the id of message
{
if (reception_buffer.CAN_msg_data[0]==0xFF)//Checks the content of data
{
CAN_Switch_Off(BUS_WAKEUP);
}
}
}
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};



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100


датащи скачать

Go To PDF Page


ссылки URL



Вашему бизинису помогли Аллдатащит?  [ DONATE ] 

Что такое Аллдатащит   |   реклама   |   контакт   |   Конфиденциальность   |   Ссылка на техническое описание    |   обмен ссыками   |   поиск по производителю
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com