首页资源分类嵌入式开发STM > 如何使用NUCLEO-F401RE

如何使用NUCLEO-F401RE

已有 453308个资源

下载专区

上传者其他资源

嵌入式开发热门资源

本周本月全部

文档信息举报收藏

标    签: NUCLEOF401RE

分    享:

文档简介

介绍如何使用ST的NUCLEO-F401RE开发板 英文文档

文档预览

By: www.emcu.it see here __________________________________________________________________ How to use NUCLEO-F401RE and Mbed What is Mbed Update the USB driver for ST-LINK-v2 Update the FW on NUCLEO-F401RE SW examples Export your programs to KEIL, IAR, etc A minimum debug using pc.printf LINK s __________________________________________________________________ Clik HERE to go on top 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 for use it is necessary have a Internet connection. More info are here. First you must register on Mbed. Next follow the getting started example. The online compiler is in the first page after you are login on Mbed, see below. __________________________________________________________________ Clik HERE to go on top 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-F401RE 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: st-link_v2_usbdriver.exe If the USB drive is already installed on your PC, first remove it (Fig.1) and next re-install it (Fig.2), see below. Fig.1 – remove the previous installation __________________________________________________________________ Clik HERE to go on top 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 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 By: www.emcu.it see here __________________________________________________________________ Update the FW on NUCLEO-F401RE Go here and download the FW update. http://mbed.org/teams//ST/wiki/Nucleo-Firmware Extract and run either dpinst_amd64.exe or dpinst_x86.exe depending on whether you are on a 64bit or 32bit machine. Follow the prompts. To verify the operation, you may check using the Nucleo firmware installer. In practice download the fw update for ST-LINK-v2 and run it (also with ADMINISTRATOR privilege), see below. In case of problems do this: Execute the: Update the USB driver for ST-LINK-v2 Execute again: Update the FW on NUCLEO-F401RE __________________________________________________________________ Clik HERE to go on top By: www.emcu.it see here __________________________________________________________________ SW examples From this link you find my doc, examples, etc, regarding NUCLEO boards. From this link you find the Mbed NUCLEO-F401RE doc, example, etc. For use the NUCLEO-F401RE Mbed examples you must before register on mbed and after add the platform to your compiler, to do do this click on the: Add to your mbed Compiler (see below). Now we need to use the example: Nucleo_blink_color_led for do this, select it, see below and from the new windows that appears select: Import this program see below. __________________________________________________________________ Clik HERE to go on top By: www.emcu.it see here __________________________________________________________________ After importing the project click on the Compile icon, see belos. and save the bin file in a directory. Now for programming NUCLEO-F401RE use ST-LINK-Utility. At the end of the programming you must see the green LED that blinking. __________________________________________________________________ Clik HERE to go on top By: www.emcu.it see here __________________________________________________________________ Export your programs to KEIL, IAR, etc First: select the program that you need export.. Second: click on it with the right mouse button and from the window that appear select Export Program, see below. From the new window that appear select the name of the toolchain and click on EXPORT button. __________________________________________________________________ Clik HERE to go on top By: www.emcu.it see here __________________________________________________________________ A minimum debug using pc.printf Up to now is not present a serious debug tool in Mbed, the only possibility that you have is to use the pc.printf or printf that send a message (text, variable, etc) via USB port to the PC. The PC see the NUCLEO-F401RE as a Virtual COM Port. If you select: START -> Device and Printer You must see something like below. Now select the STM32 STLink and click on it using the right button of the mouse. From the window that appear select Properties, see below. __________________________________________________________________ Clik HERE to go on top By: www.emcu.it see here __________________________________________________________________ From the window that appear select Hardware. You must see something like below. My Virtual COM Port is COM29. __________________________________________________________________ Clik HERE to go on top By: www.emcu.it see here __________________________________________________________________ Now use the example Nucleo_printf and programing your Nucleo-F401RE. Below there is the content of main.cpp #include "mbed.h" Serial pc(SERIAL_TX, SERIAL_RX); DigitalOut myled(LED1); int main() { int i = 1; pc.printf("Hello World !\n"); while(1) { wait(1); pc.printf("This program runs since %d seconds.\n", i++); myled = !myled; } } Configure your TeraTerm (on Windows7) using the following parameters: On your PC, you must see something like below. __________________________________________________________________ Clik HERE to go on top By: www.emcu.it see here __________________________________________________________________ And on the NUCLEO-F401RE you must see the green led that flashing. __________________________________________________________________ Clik HERE to go on top By: www.emcu.it see here __________________________________________________________________ LINKs • NUCLEO eva board • For who has Windows7 we suggest to install TeraTerm http://en.wikipedia.org/wiki/Tera_Term download it from this link:http://ttssh2.sourceforge.jp/index.html.en __________________________________________________________________ Clik HERE to go on top

Top_arrow
回到顶部
EEWORLD下载中心所有资源均来自网友分享,如有侵权,请发送举报邮件到客服邮箱bbs_service@eeworld.com.cn 或通过站内短信息或QQ:273568022联系管理员 高进,我们会尽快处理。