| поискавой системы для электроныых деталей |
|
AN1105 датащи(PDF) 17 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN1105 датащи(HTML) 17 Page - STMicroelectronics |
|
17 / 100 page ![]() 17/100 ST7 pCAN PERIPHERAL DRIVER – The CAN_Switch_Off and CAN_Sleep functions are used to switch the cell to Standby mode. The first function kills any pending jobs and erases all data in the reception buffers, even if the data is unread. The second function is executed the same way as long as no work is in progress, the transmission FIFO is empty and all reception buffers have already been read. These two functions also define the way the cell will be woken-up: either by bus or by soft- ware (by enabling or disabling the corresponding interrupt). They can help you to manage status changes by controlling the transition between Bus Off and Bus Active states (See Sec- tion 2.1.3.1 "Controlling Status Changes"). – CAN_Switch_On resets the cell and returns to RUN mode. It can also place the cell in a state waiting for a dominant pulse to be woken-up. – CAN_Get_Status returns the current status of the peripheral (run, standby, error passive...) – CAN_Get_TEC returns the current content of the transmission error counter. – CAN_Get_REC returns the current content of the reception error counter. 2.1.3.1 Controlling Status Changes Your application can be notified by the driver when the error state of the cell changes. (See “Compilation Options” on page 25). If you don’t want the microcontroller to directly resynchro- nize after leaving bus-off state for example, you can call the CAN_Switch_Off function from in- side of the CAN_Bus_Off_Notification function (See “Can_custom.c File” on page 26), then perform any operations you want before calling the CAN_Switch_On function to restart the pe- ripheral. 2.1.3.2 Waking-up from HALT Mode If you want to switch the ST7 to HALT mode and have it woken-up by the CAN, the correct in- terrupt routine must be enabled. Before switching to HALT mode, call the CAN_Sleep or CAN_Switch_Off function with the BUS_WAKEUP parameter that is used to enable the CAN interrupt on the bus dominant state while in Standby state. Then, enter the CAN_Dominant_Bit_Reception_Notification function to customize the waking up of the microcontroller. Note: See ST72511 datasheet p.37 for more information about HALT mode. 2.1.4 Interrupts (ITs) Once the interrupt routine is entered, the first thing you want to know is “What triggered the event?” Priority is then given to reception if more than one IT has occurred simultaneously, un- less the DEBUG compilation option was set. In this case, the Error ITs are processed first. – In the event of a Transmission IT, the driver tries to send the following message in the queue, if it’s not empty. The driver then notifies the application of the event before leaving the rou- tine. |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю 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 |