| 전자부품 데이터시트 검색엔진 |
|
AN1278 데이터시트(PDF) 27 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN1278 데이터시트(HTML) 27 Page - STMicroelectronics |
|
27 / 44 page ![]() 27/44 LIN (LOCAL INTERCONNECT NETWORK) SOLUTIONS application updating it with the latest data and the LIN communication sending its content on request of the master. The corresponding code for the “ DataRequest_Notification” function is: 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 normal communication 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 on a corresponding interrupt request. The first pin is the Laniards pin. As a result any bus activity will wake the application up. The second is an application pin that should be also able to wake up the application. 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. extern uByte slave_data[]; uByte * DataRequest_Notification(@tiny t_header *header) { if(header->identifier == ID_Table[1].id){ return(slave_data); } } extern uByte master_data[]; void DataReceived_Notification(@tiny t_header *header, @tiny t_response *re- sponse) { if(header->identifier == ID_Table[0].id){ master_data[0]=response->data[0]; master_data[1]=response->data[1]; } else if(header->identifier == ID_Table[2].id){ PORTS_WakeUp_On(); _asm("halt\n"); } } |
|
링크 URL |
| ALLDATASHEET 가 귀하에 도움이 되셨나요? [ DONATE ] |
Alldatasheet는? | 광고문의 | 운영자에게 연락하기 | 개인정보취급방침 | 링크 투 데이터시트 | 링크교환 | 제조사별 검색 All Rights Reserved©Alldatasheet.com |
| 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 |