| Motore di ricerca datesheet componenti elettronici |
|
AN2628 Scheda tecnica(PDF) 7 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2628 Scheda tecnica(HTML) 7 Page - STMicroelectronics |
|
7 / 27 page ![]() 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 |
|
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 |
| 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 |