Electronic Components Datasheet Search |
|
AN2341 Datasheet(PDF) 10 Page - STMicroelectronics |
|
AN2341 Datasheet(HTML) 10 Page - STMicroelectronics |
10 / 26 page Programming through CAN hardware features AN2341 10/26 if (status & TxOK) {......} // transmit interrupt if (status & RxOK) {......} // receive interrupt if (status & 0x07) {......} // erroneous transfer interrupt } if (CANxCR & EIE) // if EIE is set (error interrupts) { if (status & EWRN) {......} // error counter warning if (status & BOFF) // bus-off situation CANxCR = (CANxCR & 0xfe); // recover from BOff (clear INIT) {......} // remaining part of the BOff procedure } break; case 1: // Message 1 Interrupt CANxIF1CM = 0x7F; // Transfer entire message into inference CANxIF1CR = intid; // register and clear IntPnd and NewDat CANx_WAIT_FOR_IF1; if (CANxIF1A2 & IF_DIR) // direction = transmit { if (CANxIF1MC & IF_NEWDAT) // remote received provided that UMask = 1 // and RmtEn = 0 {.....} // procedure to handle answer to remote else {.....} // procedure to handle transmit interrupts } else // direction = receive { if (CANxIF1MC & IF_NEWDAT) // NewDat is set {.....} // procedure to handle data receive interrupt else {.....} // a remote frame was successfully transmitted } break; block to be repeated (from ‘case 1:’ to ‘case 32:’) case n: // Message n Interrupt CANxIF1CM = 0x7F; // Transfer entire message into inference CANxIF1CR = intid; // register and clear IntPnd and NewDat |
Similar Part No. - AN2341 |
|
Similar Description - AN2341 |
|
|
Link URL |
Privacy Policy |
ALLDATASHEET.COM |
Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Datasheet Upload | Contact us | Privacy Policy | Link Exchange | Manufacturer List 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 |