Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

AN1278 Datasheet(PDF) 30 Page - STMicroelectronics

Part # AN1278
Description  Many mechanical components in the automotive sector have been replaced
PDF  44 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN1278 Datasheet(HTML) 30 Page - STMicroelectronics

Back Button AN1278 Datasheet HTML 26Page - STMicroelectronics AN1278 Datasheet HTML 27Page - STMicroelectronics AN1278 Datasheet HTML 28Page - STMicroelectronics AN1278 Datasheet HTML 29Page - STMicroelectronics AN1278 Datasheet HTML 30Page - STMicroelectronics AN1278 Datasheet HTML 31Page - STMicroelectronics AN1278 Datasheet HTML 32Page - STMicroelectronics AN1278 Datasheet HTML 33Page - STMicroelectronics AN1278 Datasheet HTML 34Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 30 / 44 page
background image
30/44
LIN (LOCAL INTERCONNECT NETWORK) SOLUTIONS
4.2.1.3 Master data request (
DataRequest_Notification)
The application handles one data request from the master corresponding to the identifier 0x20
(
ID_Table[1]). The application has to return a pointer to an array containing the data to be
sent. In this example we declare an array “
slave_data[]”. This array will be shared between the
application updating it with the last data and the LIN communication sending its contents on
request of the master. The corresponding code for the “
DataRequest_Notification” function is:
4.2.1.4 Data reception (
DataReceived_Notification)
The application handles 2 “data” frames from the master corresponding to the identifier 0x03
and 0x80. The first frame is part of the “normal” communication. The second frame is a sleep
command frame that can be sent by the master at any time to interrupt the normal communi-
cation and set all nodes into low power mode.
On reception of the first frame the application saves the received data into the variable
“
master_data[]“.
On reception of the sleep command frame the application sets the ST7 in Halt mode. Before
setting the ST7 in Halt mode the wake-up sources should be acitivated. An application func-
tion, “PORTS_WakeUp_On()“, is called. Two pins are configured as interrupt and will wake
the ST7 up upon a corresponding interrupt request. The first pin is connected to the LIN_RX
pin (the SCI RX pin has no interrupt capability). As a result any bus activity will wake the ap-
plication up. The second is an application pin that should be also able to wake up the applica-
tion.
The corresponding code for the “
DataReceived_Notification” function is:
Any activity on the bus will wake up the ST7 out of Halt mode. As soon as the ST7 is ready to
execute the next instruction any incoming frame can be received.
The application can also be woken up by a sensor connected to one pin of the ST7 and then
should also wake up the whole LIN network. To do this, a wake-up frame has to be sent, which
is done by the “
LIN_SendWakeUpSignal()” function. This function is therefore inserted in the
application wake-up interrupt routine:
The last point to be configured is the timeout handling and the setting of the corresponding
timer, which is timer A. The application software is not using timer A for other purposes. As de-
extern uByte slave_data[];
uByte * DataRequest_Notification(@tiny t_header *header)
{
if(header->identifier == ID_Table[1].id){
return(slave_data);
}
}



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


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
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