| Electronic Components Datasheet Search |
|
AN1105 Datasheet(PDF) 82 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN1105 Datasheet(HTML) 82 Page - STMicroelectronics |
|
82 / 100 page ![]() 82/100 ST7 pCAN PERIPHERAL DRIVER { CAN_Clean_Error clean_status; CAN_It_Dis(); //Resets the CANICR register ClrBit(CANCSR,RUN); while (ValBit(CANCSR,RUN)) { static u16 counter=0xFFF; //Implement here a time out (171990 CPU cycles, ~21,4ms with 8MHz fcpu) counter=counter-1; if (counter==0) { return CAN_SLEEP_FATAL; } } clean_status=CAN_Clean(); if (clean_status==CAN_CLEAN_FAILURE) { return CAN_SLEEP_FATAL; } if (wucause==BUS_WAKEUP) //We are then in the case when the uC has to be waken up by the bus { Clr_SCIF_Bit(); //clears the CANISR TXIF flag, before reenabling ITs SetBit(CANICR,SCIE); //sets the CANICR TXIE flag, before reenabling ITs } else if(wucause==SOFT_WAKEUP) { Clr_SCIF_Bit(); //clears the CANISR TXIF flag, before reenabling ITs } status_counter=0; return CAN_SLEEP_SUCCESS; } /*-------------------------------------------------------------------------- ROUTINE NAME : CAN_Sleep INPUT/OUTPUT : way the chip can be waken up : BUS_WAKEUP or SOFT_WAKEUP/Error status |
|
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 |
| 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 |