| Electronic Components Datasheet Search |
|
AN1105 Datasheet(PDF) 16 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN1105 Datasheet(HTML) 16 Page - STMicroelectronics |
|
16 / 100 page ![]() 16/100 ST7 pCAN PERIPHERAL DRIVER functions defined in can_custom.c on certain events. The user only has to enter these func- tions according to his needs before compiling the software. 2.1.3 Principle of Use During compilation, the values of the hardware control registers are calculated by the preproc- essor according to the compilation options selected in can_custom.h. If the software filtering feature is enabled, the values of accepted identifiers have to be entered by the user as a list in can_custom.h (See “Filtering” on page 29) The functions in can.c are compiled or not, according to the selected #define directives. (The unwanted ones are simply left as comments). Figure 10. Driver Customization System During the first initialization (performed using the CAN_First_Init function), the peripheral’s registers are written with the values defined at compilation time, the transmission FIFO is ini- tialized and the cell starts (a wake up by bus can be chosen). Then: – The CAN_Transmit_Request function initiates a transmission which begins with an in-queu- ing of the message to be sent. Then, hardware buffer no.1 (the static transmission buffer) is filled according to hardware requirements. (See Section 1.6.2 "Cell Behaviour"). #define INIT_BRPR 0x11 ... #define STATUS_CHANGE_NOTIFICATION ... //#define DEBUG #ifdef STATUS_CHANGE_NOTIFICATION void CAN_Bus_Passive_Notification(void) { //To implement if defined } #endif ... ... #ifdef DEBUG void CAN_Overrun_Notification(void) { //To implement if defined } #endif CAN_CUSTOM.H FILE CAN_CUSTOM.C FILE Compiled Not Compiled BRPR Register 0x11 Compilation Compilation ST7 Registers |
|
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 |