Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

AN2341 Datasheet(PDF) 6 Page - STMicroelectronics

Part # AN2341
Description  Programming ST10F27x/F25x CAN interrupt drivers
PDF  26 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN2341 Datasheet(HTML) 6 Page - STMicroelectronics

Back Button AN2341 Datasheet HTML 2Page - STMicroelectronics AN2341 Datasheet HTML 3Page - STMicroelectronics AN2341 Datasheet HTML 4Page - STMicroelectronics AN2341 Datasheet HTML 5Page - STMicroelectronics AN2341 Datasheet HTML 6Page - STMicroelectronics AN2341 Datasheet HTML 7Page - STMicroelectronics AN2341 Datasheet HTML 8Page - STMicroelectronics AN2341 Datasheet HTML 9Page - STMicroelectronics AN2341 Datasheet HTML 10Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 6 / 26 page
background image
Handling interrupts
AN2341
6/26
2
Handling interrupts
CAN interrupt-source priority decreases with increasing IntId code (except for Status
Change Interrupt). The IntId code is taken into account when identifying the interrupt
source. For example, if bits SIE and TXIE have been set, the successful transmission of a
message can cause two independent interrupt requests. While a status interrupt (highest
priority) is serviced, a message-specific interrupt remains pending (bit IntPnd of the
corresponding object is only cleared by writing a 0 value in the Message Object through
interface registers).
There are two ways to handle interrupts: One method relies on the hardwired priority of the
message object, the other method uses polling. These methods are described in
Section 3:
Programming through CAN hardware features on page 9 and Section 4: Programming
through polling on page 12.
Although these two methods identify the interrupt source in different ways, they handle lower
level events in the same way. These lower level events are described in the following
sections.
2.1
Message-specific interrupts
When a message object causes an interrupt, the message object can be identified in two
ways:
●
From the IntId bit value
●
By reading interrupt pending registers
The direction of bit DIR must be considered in the decoding phase:
Message objects with the message direction = ‘receive’ (bit DIR is reset)
These can be caused by:
●
Successful transmission of a remote frame (TXIE must have been set)
●
Successful reception of a data frame (RXIE must have been set)
The bit ‘NewDat’ can be used to differentiate between the two interrupt causes:
●
NewDat = 1: Reception of a data frame
●
NewDat = 0: Successful transmission of a remote frame
Message objects with message direction = ‘transmit’ (bit DIR is set)
These can be caused by:
●
Reception of a remote frame with same identifier (RXIE must have been set)
●
Successful transmission of a data frame following a CPU request or remote request
(TXIE must have been set)
Changing the message configuration
To change the message configuration during normal operation, set MsgVal to ‘not valid’ (bit
MsgVal = 0). When the new configuration is set into the message object registers, bit
MsgVal can be reset.
Example - software decoding of message-specific interrupts



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


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