Motore di ricerca datesheet componenti elettronici
  Italian  ▼
ALLDATASHEETIT.COM

X  

AN2628 Scheda tecnica(PDF) 7 Page - STMicroelectronics

Il numero della parte AN2628
Spiegazioni elettronici  Programming ST10F27x CAN interrupt drivers
PDF  27 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Produttore elettronici  STMICROELECTRONICS [STMicroelectronics]
Homepage  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN2628 Scheda tecnica(HTML) 7 Page - STMicroelectronics

Back Button AN2628 Datasheet HTML 3Page - STMicroelectronics AN2628 Datasheet HTML 4Page - STMicroelectronics AN2628 Datasheet HTML 5Page - STMicroelectronics AN2628 Datasheet HTML 6Page - STMicroelectronics AN2628 Datasheet HTML 7Page - STMicroelectronics AN2628 Datasheet HTML 8Page - STMicroelectronics AN2628 Datasheet HTML 9Page - STMicroelectronics AN2628 Datasheet HTML 10Page - STMicroelectronics AN2628 Datasheet HTML 11Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 7 / 27 page
background image
AN2628
Handling interrupts
7/27
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 10 and Section 4: Programming
through polling on page 13.
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 27


Scheda tecnica Scarica

Go To PDF Page


Link URL



Lei ha avuto il aiuto da alldatasheet?  [ DONATE ] 

Di alldatasheet   |   Richest di pubblicita   |   contatti   |   Privacy Policy   |   Collegamento alla scheda tecnica    |   scambio Link   |   Ricerca produttore
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