| 전자부품 데이터시트 검색엔진 |
|
UM0459 데이터시트(PDF) 22 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0459 데이터시트(HTML) 22 Page - STMicroelectronics |
|
22 / 29 page ![]() Controller area network (CAN) routines UM0459 22/29 2.2.17 CAN_BasicSendMessage function Example: This example illustrates how to send frames. { /*Send consecutive data frames using message object 0*/ for (i = 0; i < 10; i++) { CAN_SendMessage(CAN1, CanMsgTable[i]); CAN_WaitEndOfTx(); } } Table 21. CAN_BasicSendMessage function description Function name CAN_BasicSendMessage Prototype ErrorStatus CAN_BasicSendMessage(CAN_TypeDef* CAN, canmsg* pCanMsg); Behavior description Starts transmission of a message in BASIC mode. This function performs the following operations: – Tests if the IF0 is free. – Writes the Arbitration, Message Control, DataA and DataB registers of message interface 0, with the message contents. – Writes the 1+msgobj value to the Command Request register to start the transmission This mode does not use the message RAM. Input parameter 1 CAN: pointer to a CAN1 or CAN2 CAN_TypeDef structure. Input parameter 2 pCanMsg: pointer to the canmsg structure that contains the data to transmit: ID type, ID value, data length, data values. Output parameter None Return value An ErrorStatus enumeration value: – SUCCESS: Transmission started OK – ERROR: No transmission Required preconditions The CAN must have been switched into BASIC mode. Called functions None |
|
|
링크 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 |