Вы находитесь на странице: 1из 5

Instructions for downloading and installing the software for STM32

1. Download the Embedded_Software.zip file provide at the below link.


http://download.snu.edu.in/eed308
2. Unzip the downloaded file.
3. From the unzipped downloaded folder
a. Install the .exe file MDK522.EXE by double clicking on it.
i. It will ask for check always trust ST Microelectronics , do check the same.
b. Install file Keil.STM32L4xx_DFP.1.3.0.pack.
c. Install file Keil.STM32L3xx_DFP.1.3.0.pack.
4. In the above unzipped folder there a zip folder naming en.stsw-link009.zip.
a. Unzip the folder.
b. From the unzipped above folder install dpinst_amd64.exe or dpinst_x86.exe based on
your operating system (OS) 64-bit or 32-bit respectively.
c. To know your operating system type right click on my computer then click on
properties. Check at system type it will show its OS type.
5. Now connect the 32-bit ST micro controller (STM32L476RG or STM32F303RE) given to you at
USB port of your Laptop using USB to Mini cable(Type B cable).
6. Once you connected go to the drive where you installed all the software’s in step.3.
a. Example C:\Keil_v5\ARM\STLink. (C:Drive  Keil_V5  ARM  STLink)
b. Once you goto above folder then click on ST-LinkUpgrade.exe you will see as shown in
in Fig.

c. Click on Device connect then it will ask for Upgrade for the firmware to  Click on Yes.
d. Then it will pop as firmware upgraded successfully.
7. Then open keil µvision5 from windows tab or from desktop.
8. Once you open Keil software one will see the window as below shown.
9. Now copy the given example folder named as Blink_LED_L476RG or Blink_LED_L303RE to
documents folder  Boards ST  Copy Here. based on the micro controller you connected to
your laptop.
10. Now from the main menu of Keil window goto Project Open project It will ask you to chose
project  goto the folder you copied above example. Then select the file Blink_LED.project.
Example: C:\Users\Naveenkumar Marati\Documents\Boards\ST\ Blink_LED.project.
11. Once you opened project the respective file with all its required header and other files will show
in left side Tab called Project (This called current project tab).
12. Now in the left side Tab open main.cpp. This is the workspace where one can write their own
code. It will show in center of the keil window.
13. Once you wrote your code here, goto Project  Options for Target  click on it. Or click on the
Icon as shown below in Fig.

14. Then it will pop window as shown below.


15. In the above shown window click on Device Select STMicroelectronics  STM32LSeries or
STM32F3 Series (Based on your microcontroller connected)  Then from that Select
STM32L476RG or STM32F303RE respectively.
16. Then in the same window menubar goto Debug and Check the button called Use(If it is
unchecked). Beside that there is a pop-up button as shown in Fig. and Select ST-Link Debugger.

17. Beside the pop-up tab in above Fig. There is a button called Settings click on it. It will pop a
window as shown in.

In the above Window as shown select Port as SW if it is JTAG.


18. In the above window select Trace button and Set core Clock as 80MHZ or 72MHZ for
STM32L476RG or STM32F303RE respectively.
19. Now goto Flash Download button and click on it. It will show as shown in Fig. And select the
Flash STM32L4xx 1MB Flash or STM32F3xx 512kb Flash based on your microcontroller
STM32L476RG or STM32F303RE respectively. Then click OK.

Note: If you are unable to find the Flash Download (STM32L4xx 1MB Flash or STM32F3xx 512kb
Flash).

For STM32L476RG

a. Goto the drive in which you installed Keil software and follow the path shown.
b. Keil_v5 ARM PACKKeil STM32L4xx_DFP 1.3.0Flash (Example:
C:\Keil_v5\ARM\PACK\Keil\STM32L4xx_DFP\1.3.0\Flash). Copy the entire files from this
folder and paste in the folder path is given below.
c. C:\Keil_v5\ARM\Flash (Keil_v5 ARMFlash).
d. After you copied the files to above location right click on folder STM32L4xx goto properties
and uncheck read-only.

For STM32F303RE

a. Goto the drive in which you installed Keil software and follow the path shown
b. Keil_v5 ARM PACKKeil STM32F3xx_DFP 1.3.0Flash (Example:
C:\Keil_v5\ARM\PACK\Keil\STM32F3xx_DFP\1.3.0\Flash). Copy the entire files from this
folder and paste in the folder path is given below.
c. C:\Keil_v5\ARM\Flash (Keil_v5 ARMFlash).
d. After you copied the files to above location right click on folder STM32F3xx goto properties
and uncheck read-only.

Once you completed this process repeat point 19.

20. Then Build the program by click on the icon as shown or with keyboard F7.
21. Once your program built without error. Then download or Load the program on to
microcontroller by selecting icon as shown in Fig. or input from keyboard as F8.

22. Then click on icon as shown in Fig. or input from the keyboard Ctrl+F5.

23. Run the project.


24. Observe on the microcontroller with loaded input and output session.