Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

AN1105 Datasheet(PDF) 36 Page - STMicroelectronics

Part # AN1105
Description  ST7 pCAN PERIPHERAL DRIVER
PDF  100 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN1105 Datasheet(HTML) 36 Page - STMicroelectronics

Back Button AN1105 Datasheet HTML 32Page - STMicroelectronics AN1105 Datasheet HTML 33Page - STMicroelectronics AN1105 Datasheet HTML 34Page - STMicroelectronics AN1105 Datasheet HTML 35Page - STMicroelectronics AN1105 Datasheet HTML 36Page - STMicroelectronics AN1105 Datasheet HTML 37Page - STMicroelectronics AN1105 Datasheet HTML 38Page - STMicroelectronics AN1105 Datasheet HTML 39Page - STMicroelectronics AN1105 Datasheet HTML 40Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 36 / 100 page
background image
36/100
ST7 pCAN PERIPHERAL DRIVER
ADC_Init();
//Initializes the ADC
if ((CAN_First_Init())==CAN_INIT_FAILURE) //Initializes the CAN peripheral
{
return;
}
TIMA_Init();//Initializes the timer
_asm(“RIM”);// EnableInterrupts;
/*
-------------------
*/
/*----------------------------
LOOP
--------------------------*/
while (1) /*
-------------------
*/
{
}
}
Finished! Now compile the entire code and run the software. Once the
while {1} loop is en-
tered, the microcontroller will run non-stop until it is shut down, reacting to every event, saving
data in our buffer, sending data periodically and answering remote requests.
If you own a CAN bus simulation tool, you can monitor messages being received and sent by
the ST7.
The next section of this application note will explain in detail the driver architecture and all soft-
ware functions (including internal functions).
2.2.5 IMPORTANT: Reentrant Functions
If the memory model you chose for compiling your application does not use the physical stack
but simulates it in RAM, you CANNOT allow functions to be reentrant.
The COSMIC compiler will generate an error if it finds some code that could be reentrant. For
example, this may occur if you use a subroutine inside both an initialization function and an in-
terrupt routine.
This is, of course, not a real error, but the compiler does not know this and prevents you from
going further.
To fix this problem with the COSMIC compiler, use the following trick:
– Change the name of the function in your code, in the call that makes the error appear.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100


Datasheet Download

Go To PDF Page


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


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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