Do you have a question about the NUCLEO-L152RE and is the answer not in the manual?
Questions and answers
Summary of Contents for Silica NUCLEO-L152RE
Page 1
By: www.emcu.it see here __________________________________________________________________ How to use NUCLEO-L152RE and Mbed What is Mbed • Update the FW on NUCLEO -L152 RE • SW examples • Export your programs to KEIL, IAR, etc • A minimum debug using pc. printf • How to use ST Link Utility •...
Page 2
By: www.emcu.it see here __________________________________________________________________ What is Mbed The mbed development platform is the fastest way to create products based on ARM microcontrollers. The project is being developed by ARM, its Partners and the contributions of the global mbed Developer Community. In practice Mbed is online compiler tool. This means that to use it, it is necessary to have a Internet connection.
Page 3
By: www.emcu.it see here __________________________________________________________________ Update the FW on NUCLEO-L152RE First install the ST-Link driver (stlinknucleodriversigned.zip) • Next go here and download the FW update (stlinkv2m4upgrade.zip). • ST-Link driver Installation 1. Extract (stlinknucleodriversigned.zip) and run either dpinst_amd64.exe (for 64bit PC) or dpinst_x86.exe (for standard 32bit PC) depending on whether you are on a 64bit machine.
Page 4
By: www.emcu.it see here __________________________________________________________________ In case of problems do this: Execute the: Update the USB driver for ST-LINK-v2 __________________________________________________________________ Clik HERE to go on top...
Page 5
By: www.emcu.it see here __________________________________________________________________ SW examples To use the NUCLEO-L152RE Mbed examples you must before register on mbed and: add the platform to your compiler, chose ST NUCLEO L152RE, see below. Now we need to use the example: Nucleo_read_button for do this, select it, see below.
Page 6
By: www.emcu.it see here __________________________________________________________________ From the new window that appears, select: Import this program see below. From the new window that appears, set a name for the project and select IMPORT, see below. After importing the project, click on the Compile icon, see below. __________________________________________________________________ Clik HERE...
Page 7
By: www.emcu.it see here __________________________________________________________________ You must see: Success! See below. Save the bin file in a directory. __________________________________________________________________ Clik HERE to go on top...
Page 8
By: www.emcu.it see here __________________________________________________________________ Now for programming NUCLEO-L152RE use ST-LINK-Utility. At the end of the programming you must see the green LED blinking. __________________________________________________________________ Clik HERE to go on top...
Page 9
By: www.emcu.it see here __________________________________________________________________ Export your programs to KEIL, IAR, etc First: select the program that you need to export.. Second: click on it with the right mouse button and from the window that appears select Export Program, see below. From the new window that appears, select the name of the toolchain and click on EXPORT button.
Page 10
(text, variable, etc) via USB port to the PC. The PC see the NUCLEO-L152RE as a Virtual COM Port. To check if the Virtual COM Port is installed correctly on Windows 7, follow the instructions below.
Page 11
By: www.emcu.it see here __________________________________________________________________ From the window that appears, select Hardware. You must see something like below. My Virtual COM Port is COM29. __________________________________________________________________ Clik HERE to go on top...
Page 12
By: www.emcu.it see here __________________________________________________________________ To check if the Virtual COM Port is installed correctly on Windows XP , follow the instructions below. START → Impostazioni → Pannello di Controllo From Pannello di Controllo select Sistema, see below. From the new window that appears, select Gestione Periferiche and a new window appear.
Page 13
By: www.emcu.it see here __________________________________________________________________ At this point you must see the STLink Virtual Com Port, in my case is COM19. __________________________________________________________________ Clik HERE to go on top...
Page 14
By: www.emcu.it see here __________________________________________________________________ Now use the example Nucleo_printf and programing your Nucleo-L152RE. Below there is the content of main.cpp #include "mbed.h" //------------------------------------ // Hyperterminal configuration // 9600 bauds, 8-bit data, no parity //------------------------------------ Serial pc(SERIAL_TX, SERIAL_RX); DigitalOut myled(LED1); int main() { int i = 1;...
Page 15
By: www.emcu.it see here __________________________________________________________________ On Windows XP use HyperTerminal and configure it how to show below. __________________________________________________________________ Clik HERE to go on top...
Page 16
By: www.emcu.it see here __________________________________________________________________ On your PC, you must see something like below, on Windows 7 (Tera Term). __________________________________________________________________ Clik HERE to go on top...
Page 17
By: www.emcu.it see here __________________________________________________________________ On your PC, you must see something like below, on Windows XP (Hyper Terminal). And on the NUCLEO-L152RE you must see the green led that flashing. __________________________________________________________________ Clik HERE to go on top...
Page 18
By: www.emcu.it see here __________________________________________________________________ How to use ST-Link-Utility The STM32 ST-Link Utility software facilitates fast in-system programming of the STM32 microcontroller families in both development and production environments via the ST-Link tool. The reference page is: http://www.st.com/internet/evalboard/product/251168.jsp This tool is compatible with ST-LINK and ST-LINKv2. To update the firmware on ST-Link select the menù...
Page 19
By: www.emcu.it see here __________________________________________________________________ How to update KEIL v.5.10.0.2 for support STM32L152RE using the Device Family Pack On the KEIL v.5.10.0.2 is not present the STM32L152RE. To add the support to the STM32L152RE it is necessary to download and install the here Device Family Pack that is .
Page 20
By: www.emcu.it see here __________________________________________________________________ Update the USB driver for ST-LINK-v2 NOTE: Do this update only if the: Update the FW on NUCLEO- L152RE fails. Update the usb driver for ST-LINK-v2, chose it from the list below. STSW-LINK003 ST-LINK/V2 USB driver for Windows 7, Vista and XP STSW-LINK006 ST-LINK/V2 USB driver for Windows 8 Unzip the file and run it, with the privilege of ADMINISTRATOR, the file is:...
Page 21
By: www.emcu.it see here __________________________________________________________________ Now re-run the st-link_v2_usbdriver.exe and follow the steps below (1...3). Fig.2 __________________________________________________________________ Clik HERE to go on top...
Page 22
By: www.emcu.it see here __________________________________________________________________ If the USB drive is not already installed on your PC, follow the steps below (1...3). __________________________________________________________________ Clik HERE to go on top...
Page 23
From this link you find my doc, examples, etc, regarding NUCLEO boards. • From this link you find the Mbed NUCLEO-L152RE doc, example, etc. Mbed home page • General sw • Library , provides the C/C++ software platform and libraries to build your •...
Need help?
Do you have a question about the NUCLEO-L152RE and is the answer not in the manual?
Questions and answers