Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

UM0459 Datasheet(PDF) 16 Page - STMicroelectronics

Part # UM0459
Description  ST10F27xZx CAN library
PDF  29 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

UM0459 Datasheet(HTML) 16 Page - STMicroelectronics

Back Button UM0459 Datasheet HTML 12Page - STMicroelectronics UM0459 Datasheet HTML 13Page - STMicroelectronics UM0459 Datasheet HTML 14Page - STMicroelectronics UM0459 Datasheet HTML 15Page - STMicroelectronics UM0459 Datasheet HTML 16Page - STMicroelectronics UM0459 Datasheet HTML 17Page - STMicroelectronics UM0459 Datasheet HTML 18Page - STMicroelectronics UM0459 Datasheet HTML 19Page - STMicroelectronics UM0459 Datasheet HTML 20Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 16 / 29 page
background image
Controller area network (CAN) routines
UM0459
16/29
2.2.10
CAN_SetTxMsgObj function
Note:
When defining which message object number to use for TX or RX, you must take into
account the priority levels when processing the objects. The lowest number (0) has the
highest priority and the highest number (31) has the lowest priority, whatever the type of the
object. Also, for optimum performance, it is recommended not to have “holes” in the object
list.
Example:
This example illustrates how to define transmit message object 0 of CAN1 with standard
identifiers and, how to disable the answer to remote frames with matching ID.
{
CAN_SetTxMsgObj(CAN1, 0, CAN_STD_ID, DISABLE);
}
Table 14.
CAN_SetTxMsgObj function description
Function name
CAN_SetTxMsgObj
Prototype
ErrorStatus CAN_SetTxMsgObj(CAN_TypeDef* CAN, u16 msgobj,
u16 idType, FunctionalSate RemotEn)
Behavior description
Configures the message object to transmit a message object with
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.
– Sets the masks to 7FF for standard ID and 0x1FFFFFFF for extended
ID.
– Sets the Mdir and MXtd
– If remote functionality is enabled, then the US_MASK is not set in the
message control register in order not to handle the remote frames
received
– Enables the message object interrupt.
– Clears the data registers
– Writes 1+msgobj into the command request register to start the
transfer to the message RAM.
Input parameter 1
CAN: pointer to a CAN1 or CAN2 CAN_TypeDef structure.
Input parameter 2
msgobj: message object number, from 0 to 31.
Input parameter 3
idType: the identifier type of the frames that will be 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
RemoteEN: if enabled, the message object answers remote frames with
matching ID. The value is one of the following:
ENABLE: To enable the remote functionality
DISBALE: To disable the remote functionality
Output parameter
None
Return value
An ErrorStatus enumeration value:
– SUCCESS: Interface to handle the message
– ERROR: No interface to handle the message
Required preconditions
None
Called functions
CAN_GetFreeIF()



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


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