comparison libs/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/CAN/Networking/readme.txt @ 0:c59513fd84fb

Initial commit of STM32 test code.
author Daniel O'Connor <darius@dons.net.au>
date Mon, 03 Oct 2011 21:19:15 +1030
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:c59513fd84fb
1 /**
2 @page CAN_Networking CAN Networking example
3
4 @verbatim
5 ******************** (C) COPYRIGHT 2011 STMicroelectronics *******************
6 * @file CAN/Networking/readme.txt
7 * @author MCD Application Team
8 * @version V3.5.0
9 * @date 08-April-2011
10 * @brief Description of the CAN Networking example.
11 ******************************************************************************
12 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
13 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
14 * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
15 * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
16 * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
17 * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
18 ******************************************************************************
19 @endverbatim
20
21 @par Example Description
22
23 This example shows how to configure the CAN peripheral to send and receive
24 CAN frames in normal mode. The sent frames are used to control Leds by pressing
25 key push button.
26
27 The CAN serial communication link is a bus to which a number of units may be
28 connected. This number has no theoretical limit. Practically the total number
29 of units will be limited by delay times and/or electrical loads on the bus line.
30
31 This program behaves as follows:
32 - After reset LED1 is ON
33 - By Pressing on KEY Button : LED2 turns ON and all other Leds are OFF, on the N
34 eval boards connected to the bus.
35 - Press on KEY Button again to send CAN Frame to command LEDn+1 ON, all other Leds
36 are OFF on the N eval boards.
37
38 @note This example is tested with a bus of 3 units. The same program example is
39 loaded in all units to send and receive frames.
40 @note Any unit in the CAN bus may play the role of sender (by pressing KEY button)
41 or receiver.
42
43 The CAN is configured as follow:
44 - Bit Rate = 1 Mbit/s
45 - CAN Clock = external clock (HSE)
46 - ID Filter = All identifiers are allowed
47 - RTR = Data
48 - DLC = 1 byte
49 - Data: Led number that should be turned ON
50
51
52 User can select CAN1 or CAN2 cell using the private defines in main.c :
53
54 @code
55 #define __CAN1_USED__
56 /* #define __CAN2_USED__*/
57 @endcode
58
59 @note When using CAN2, please check that you device is Connectivity line.
60
61
62 @par Directory contents
63
64 - CAN/Networking/platform_config.h Hardware configuration header file
65 - CAN/Networking/stm32f10x_conf.h Library Configuration file
66 - CAN/Networking/stm32f10x_it.c Interrupt handlers
67 - CAN/Networking/stm32f10x_it.h Interrupt handlers header file
68 - CAN/Networking/main.c Main program
69 - CAN/Networking/system_stm32f10x.c STM32F10x system source file
70
71
72 @par Hardware and Software environment
73
74 - This example runs on STM32F10x Connectivity line, High-Density, Medium-Density,
75 XL-Density and Low-Density Devices.
76
77 - This example has been tested with STMicroelectronics STM3210C-EVAL (Connectivity line),
78 STM3210E-EVAL (High-Density and XL-Density) and STM3210B-EVAL (Medium-Density)
79 evaluation boards and can be easily tailored to any other supported device and
80 development board.
81 To select the STMicroelectronics evaluation board used to run the example,
82 uncomment the corresponding line in CAN/Networking/platform_config.h or stm32_eval.h file
83
84 - STM3210C-EVAL Set-up
85 - Use LED1, LED2, LED3 and LED4 connected respectively to PD.07, PD.13, PF.03
86 and PD.04 pins
87 - Use Key Push Button connected to PB9
88 - Connect a female/female CAN cable between at least 2 EVAL CAN connectors
89 (on STM3210E-EVAL (CN2)/ STM3210C-EVAL (CN3 or CN4) boards)
90 - Connector 1 DB9_PIN2 to Connector 2 DB9_PIN2 (CAN_L)
91 - Connector 1 DB9_PIN5 to Connector 2 DB9_PIN5 ( GND )
92 - Connector 1 DB9_PIN7 to Connector 2 DB9_PIN7 (CAN_H)
93 @note JP6 or JP5 must be fitted.
94
95 - STM3210E-EVAL Set-up
96 - Use LED1, LD2, LED3 and LED4 leds connected respectively to PF.06, PF0.7, PF.08
97 and PF.09 pins
98 - Use Key Push Button connected to PG8
99 - Connect a female/female CAN cable between at least 2 EVAL CAN connectors
100 (on STM3210B-EVAL (CN2)/ STM3210E-EVAL (CN4) boards)
101 - Connector 1 DB9_PIN2 to Connector 2 DB9_PIN2 (CAN_L)
102 - Connector 1 DB9_PIN5 to Connector 2 DB9_PIN5 ( GND )
103 - Connector 1 DB9_PIN7 to Connector 2 DB9_PIN7 (CAN_H)
104 @note JP6 must be fitted.
105
106 - STM3210B-EVAL Set-up
107 - Use LED1, LED2, LED3 and LED4 leds connected respectively to PC.06, PC.07, PC.08
108 and PC.09 pins
109 - Use Key Push Button connected to PB9
110 - Connect a female/female CAN cable between at least 2 EVAL CAN connectors
111 (on STM3210B-EVAL (CN2)/ STM3210E-EVAL (CN4) boards)
112 - Connector 1 DB9_PIN2 to Connector 2 DB9_PIN2 (CAN_L)
113 - Connector 1 DB9_PIN5 to Connector 2 DB9_PIN5 ( GND )
114 - Connector 1 DB9_PIN7 to Connector 2 DB9_PIN7 (CAN_H)
115 @note JP3 must be fitted.
116
117 @note Any unit in the CAN bus may play the role of sender (by pressing on the
118 key) or receiver.
119
120 @par How to use it ?
121
122 In order to make the program work, you must do the following :
123 - Copy all source files from this example folder to the template folder under
124 Project\STM32F10x_StdPeriph_Template
125 - Open your preferred toolchain
126 - Rebuild all files and load your image into target memory
127 - Run the example
128 - In the first time the all leds are OFF.
129 - By Pressing on Key Button : LED1 turn ON and all other Leds are OFF, on the N
130 eval-boards connected to the bus.
131 - Press on Key Button again to send CAN Frame to command LEDn+1 ON, all other Leds
132 are OFF on the N eval-boards.
133
134 @note
135 - Low-density Value line devices are STM32F100xx microcontrollers where the
136 Flash memory density ranges between 16 and 32 Kbytes.
137 - Low-density devices are STM32F101xx, STM32F102xx and STM32F103xx
138 microcontrollers where the Flash memory density ranges between 16 and 32 Kbytes.
139 - Medium-density Value line devices are STM32F100xx microcontrollers where
140 the Flash memory density ranges between 64 and 128 Kbytes.
141 - Medium-density devices are STM32F101xx, STM32F102xx and STM32F103xx
142 microcontrollers where the Flash memory density ranges between 64 and 128 Kbytes.
143 - High-density Value line devices are STM32F100xx microcontrollers where
144 the Flash memory density ranges between 256 and 512 Kbytes.
145 - High-density devices are STM32F101xx and STM32F103xx microcontrollers where
146 the Flash memory density ranges between 256 and 512 Kbytes.
147 - XL-density devices are STM32F101xx and STM32F103xx microcontrollers where
148 the Flash memory density ranges between 512 and 1024 Kbytes.
149 - Connectivity line devices are STM32F105xx and STM32F107xx microcontrollers.
150
151 * <h3><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h3>
152 */