| поискавой системы для электроныых деталей |
|
UM0459 датащи(PDF) 17 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0459 датащи(HTML) 17 Page - STMicroelectronics |
|
17 / 29 page ![]() UM0459 Controller area network (CAN) routines 17/29 2.2.11 CAN_SetRxMsgObj function Table 15. CAN_SetRxMsgObj function description Function name CAN_SetRxMsgObj Input parameter 1 CAN: pointer to a CAN_TypeDef structure Prototype ErrorStatus CAN_SetRxMsgObj(CAN_TypeDef* CAN, u16 msgobj, u16 idType, u32 idLow, u32 idHigh, bool singleOrFifoLast); Behavior description Configures the message object as RX. This message receives all message objects with id between idLow and idHigh values and whose id type corresponds to the idType passed as a parameter. This function performs the following operations: – Searches for a free message interface from IF0 and IF1. – Sets the WR/RD, Mask, Arb, Control, DataA and DataB bits in the Command Mask register. – Writes the ID mask value generated by idLow and idHigh in the Mask1 and Mask2 registers, – Sets M_XTD (to filter according to IDE) and MDIR to filter remote frames. – Writes the ID arbitration value generated by idLow and idHigh in the Arb1 and Arb2 registers, set the MsgVal bit, and also Xtd bit in the Arb2 register if extended ID is used. – Sets the RxIE and UMask bits in the Message Control register, and also the EoB bit if the parameter singleOrFifoLast is TRUE. Clears the DataA1, DataA2, DataB1, DataB2 registers. – Writes the value 1+msgobj to the Command Request register to copy the selected registers into the message RAM. Input parameter 2 msgobj: message object number, from 0 to 31. Input parameter 3 idType: the identifier type of the frames that is transmitted using this message object. The value is one of the following: CAN_STD_ID (standard ID, 11-bit) CAN_EXT_ID (extended ID, 29-bit) Input parameter 4 idLow: the lower part of the identifier range used for acceptance filtering. It can have values from 0 to 0x7FF for standard IDs, and values from 0 to 0x1FFFFFFF for extended IDs. Input parameter 4 idHigh: the higher part of the identifier range used for acceptance filtering. It can have values from 0 to 0x7FF for standard IDs, and values from 0 to 0x1FFFFFFF for extended IDs. idHigh must be above idLow. For convenience, use one of the following values to set the maximum ID: CAN_LAST_STD_ID or CAN_LAST_EXT_ID Input parameter 5 singleOrFifoLast: End-of-buffer indicator, it can have the following values: – TRUE for a single receive object or a FIFO receive object that is the last one in the FIFO – FALSE for a FIFO receive object that is not the last one Output parameter None Return value An ErrorStatus enumeration value: – SUCCESS: Interface to handle the message – ERROR: No interface to handle the message |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю 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 |