Home

STM32F3 Hands

image

Contents

1. life augmented Presentation Title 13 08 2013 gt ETL Step 5b An ARM Company 36 36 e Click on Utilities Click the Settings button and select ST Link Debugger Device Target Output Listing User C C Asm Linker Debug Utities Configure Flash Menu Command Use Target Driver for Hash Programming Use Debug Driver 5T Link Debugger settings lv Update Target before Debugging Run Independent life augmented Presentation Title 13 08 2013 gt ETL Step 5b An ARM Company EE 37 Finally click on OK k Options for Target Dem Device Target Output Latro User C C Aam Unker Debug uites Load Application at Startup Run to main Watch Windows Performance Analyzer Memory Display life augmented Presentation Title 13 08 2013 gt EIE Click on the Build button or Menu Project Build Target Step 6 Compile File Edit View Project Flash Debug Peripherals O adad s s l n R SUGEH Elom FRI a Build Button The project should compile without errors Build Output compiling usb istr c compiling usb prop c compiling usb pwr c linking Program Size Code 157352 RO data 768 RW data 452 ZI data 1148 NDemoXDemo axf O Error s 2 Warning s Ky KEIL life augmented gt EIE Step 60 Download e Click on the Download Button c Flash Debug Peripherals File Edit View Proj
2. 7 er pa cs ES ES xS ES 4 Demo E Project 2 gj Ba Demo 0 e The program is downloaded to the device s flash memory Build Output Program Size Code l5792 RO data 768 RW data 452 ZI data 1148 Demo Demo axf O Error s 0 Warning s Load C stm32f3discovery fw STIM32F3 Discovery FW V1 1 0 Pro Cannot load driver C Keil ARM 5TLink 5ST LINEIII KEIL d11 Bos Load C XMstm32f3discovery fw STIM32F3 Discovery FW V1 1 0 Pro Erase Done Programming Done Verify OK y Presentation Title 13 08 2013 ife augmented Da Step Debug e Click on the Start Stop Debug Session button or Menu Start Stop Debug Session Debug Button be q e A e You should receive a warning message Click OK KEIL J ces The MDK ARM IDE Debugger saa erie ama KCN E ys ys a e G e EBES El O O s IBS a 2 E Registers 080036 200006 0080026 080040 080040 R14 LR R15 PC Privileged SS Privilege Es Stack MSP m States 12251 I 0 001225 Register Window S KEIL Tools by ARM E Project ES Registers Ly life augmented E Call Stack Locals Step 7 Disassembly 755 uint8 t i 0 T6 SysTick end of count event each l ms E gt 0x08003678 ED2D8B04A VPUSH 64 id8 dl2 T RCC GetClocksFreq gRCC Clocks li d Fr star
3. Set HSION bit RCC gt CR uint32 t 0x00000001 Reset SW 1 0 HPRE 3 0 PPRE 2 0 ADCPRE and MCOSEL 2 0 bits RCC gt CFGR amp uint32 t 0xF8FFB80C Configure the System clock freguency AHB APBx prescalers and Flash settings SetSysClock static void SetSysClock void _ IO uint32_t StartUpCounter 0 HSEStatus 0 SYSCLK HCLK PCLK configuration 1f defined AAA Ol At this stage the HSI is already enabled Enable Prefetch Buffer and set Flash Latency FLASH gt ACR FLASH ACR PRFTBE FLASH ACR LATENCY HCLK SYSCLK RCC gt CFGR uint32 t RCC CFGR HPRE DIVl PCLK HCLK RCC gt CFGR uint32 t RCC CFGR PPRE DIVl PLL configuration HSI 2 12 48 MHz RCC gt CFGR amp uint32 _t uint32 _t RCC CFGR PLLSRC RCC CFGR _ PLLXTPRE RCC CFGR PLLMULL RCC gt CFGR uint32 CTI BCC I CFGR PLLSRC HSI _Div2 RCC CFGR_ PLLXTPRE PREDIV1 n RCC CFGR PLLMULL12 e Example main Standard C main function entry Start of application program What happens each time the USER Button is pushed Goto Line 99 while 1 e Goto Line 112 LD3 LD10 Pattern e Goto Line 164 LD3 LD10 Gyro Goto Line 232 LD3 LD10 Compass Ly life augmented main c f brief Main program param None retval None int nain void SysTick end of count event each 10ms RCC GetClocksFreq RCC
4. Cortex MO Frequency performance e f y EJ v y Page v Tools v v S74 v Featured products gedSearch mu STM32 F3 series mixed signal MCUs Cortex M4 performance with a rich analog peripheral set STM32F3 Discovery quick start evaluation kit STM32 F3 MCU and 9 axis MEMS sensors ready for 3D motion sensing STM32 FO Entry level MCUs STM32 DNA at budget price High performance STM32 F4 series World s fastest Cortex M MCU STM32 Journal Our virtual magazine with plenty of useful tips around the STM32 PII Featured videos STM32 F3 series mixed signal and DSP ARM Cortex STM32 FO Series STM32 DNA at budget price Y STM32 F series World s J fastest Cortex M MCUs E Support resources Technically trained distributors e Distributors listed on CONTACTS page www st com contactus e ST Public Forums i Located on main ae ABOUT ST CT PRESS LOGIN 97 www st com page under TE Support tab ST e2e L3GD20 T Communities 3 axis gyroscope with unbeaten temperature stability Single mass architecture allows e Submit technical a AD questions to ST Online Bis Located on main a gt zu um rch Power Automotive ri ma www st com page under the dei nw o oupport tab Online Support Ly life augmented Process check At this point the ST Link V2 should be recognized by your system e LD1 and LD2 should be on ON indicating t
5. e STM32F3 Hands On Workshop Welcome Hands On e Ensure you picked up USB Flash Drive with STM32F3 Discovery Kit Contents USB Cable e STM32F3 Discovery Kit will be provided after software is loaded life augmented Keil uVision IDE Installation Systems Check e Everyone should have AWindows 6 Laptop XP Vista or Windows 7 USB Cable USB Flash Drive STM32F3 DISCOVERY kit provided during the software installation Ready to begin Note please do not attempt to plug in the STM32F3 Discovery Kit into your laptop until instructed to do so life augmented Step 1 File Installation Insert the USB Flash Drive into your Laptop Copy the folder ASTM32F3DISCOVERY_ Kit on the USB flash drive to your root cx folder e CASTM32F3DISCOVERY Kit Edit folder properties and remove Read only attribute for all sub folders e Open this directory and you will find the following Keil Vision v4 71 gt IDE tool installation application and license file e Docs gt STM32F3 Datasheets Programming Manual Reference Manuals Data Briefs and The STM32F3 Discovery Board Manuals e Library gt STM32F3Discovery Firmware Library folder e Utility gt STM32F3 Clock Utility and ST LINK Utility Application life augmented 2 EIE Step 2 Install Keil n Vision amm e For this workshop we will be using the evaluation version of the Microcontroller Development Kit from A
6. stm3213 discovery c S stm32f3 discovery I3gd20 c 5 stm32f3 discovery Ism303dll 61 53 STM32F30x StdPeriph Driver B 13 User E hw config c pec system stm32f30x c usb istr c E Project G Book E Func Da Temp gt RENE Ly life augmented ST Link Deprecated Version gt KEIL Step 5b An ARM Company Change the Options for Target Demo Select Project Options for Target Demo WA CAstm32f3discovery_fw STM32F3 Discovery_FW_V1 1 0 Project Demonstration MDK ARM D File Edit View Flash Debug Peripherals Tools SVCS Window Help G g New vision Project a New Multi Project Workspace I Open Project Close Project Export Select Device for Target Demo Remove Item Ly life augmented Presentation Title 13 08 2013 gt JKEIL Step 5b An ARM Company e 30 e Select Debug Click on the symbol KZ Options for Tar Device Target Output Listing User C C Asm Linker Debug Utes C Use Simulator Limit Speed to Real Time Load Application at Startup 7 Run ta main 4 Load Application at Startup v Run to main Initialization File Breakpoints Toolbox Watch Windows Performance Analyzer Memory Display Ly life augmented Presentation Title 13 08 2013 gt JKEIL Step 5b An ARM Company SS 31 Select ST Link KA Options for Targ Device Target Output Listing User C C Asm
7. e You code will stop anywhere within the program flow eae ce Click on the Debug button to exit from the debugger Debug Button Ey gt KEIL life augmented M An ARM Company e Double click to open the main c file Scroll down to line 117 Using MDK ARM What physical pin of the STM32F303 is LED3 connected to Enter a number from 10 to 500 and place in the Delay xxx statement Do the same thing with lines 121 125 129 133 137 141 and 145 e Compile Debug and Run e Validate Did it work Stop debug and exit the debugger Ly life augmented Lets make a change Toggle LD3 SIM EVAL LEDToggle LED3 Insert 50 ms delay Delav 5 Toggle LD5 STM EVAL LEDToggle LED5 Insert 50 ms delay Delav 5 Toggle LD7 STM EVAL LEDToggle LED7 Insert 50 ms delay Delav 5 Toggle LDS SIM EVAL LEDIoggle LEDS Insert 50 ms delay Delav 5 Toggle LD1O STM EVAL LEDToggle LED10 Insert 50 ms delay Delav 5 Toggle LD8 STM EVAL LEDToggle LED amp 8 Insert 50 ms delay Delay 5 Toggle LD6 STM EVAL LEDToggle LED6 Insert 50 ms delay Delay 5 Toggle LD4 SIM EVAL LEDIoggle LED4 Insert 50 ms delay Delav 5 gt KEIL Step 10 Let s take a look and make a change LEDS GPIO CLE RCC AHBPeriph GPIOE define LED3 PIN GPIO Pin 9 define LED3 GPIO POR
8. Clocks SysTick Config RCC Clocks HCLK Frequency 100 Initialize LEDs and User Button available on SIM32F3 Discovery board STM EVAL LEDInit LED3 TM EVAL LEDInit LED4 STM EVAL LEDInit LEDS SIM EVAL LEDInit LED6 TM EVAL LEDInit LED 7 STM EVAL LEDInit LED8 SIM EVAL LEDInit LED9 STH EVAL LEDInit LED10 stm32f30x It c e Contains Cortex M4 Processor Exception Handlers ISRs void NMI Handler void void HardFault Handler void void SVC Hanaler void void PendSV Handler void void SysTick Handler void Contains the STM32F30x Peripherals Interrupt Handlers default is empty Add the Interrupt Handler for the used peripheral s PPP for the available peripheral interrupt handler s name please refer to the startup file startup stm32f30x s e Goto Line 148 SysTick Handler e What is SysTick ISR being used for e Go to Line 166 EXTIO IROHandler e What is the ISR use What physical pin of the STM32F3 is the User Button connected to S M32F3 discovery c e Contains board specific function and definition e Defines Push button and LED GPIO definitions e Contains board specific functions e void STM EVAL LEDinit Led TypeDef Led void STM EVAL LEDOn Led TypeDef Led e void STM EVAL LEDOff Led TypeDef Led e void STM EVAL LEDToggle Led TypeDef Led e void STM EVAL PBlnit Button_ TypeDef Button ButtonMode_TypeDef Button Mode e uint32 t STM EVAL PBGetstate Button_ TypeDef B
9. Discovery FW VLIO Carpeta de archivos U DAPROJECTS sSTM32 Tamario 255 MB 267 96 345 bytes Tama o en disco 263 MB 276 209 564 bytes Contiene 3 703 archivos 486 carpetas Creado jueves 16 de mayo de 2013 04 30 51 p m E S lo lectura s lo para archivos de la carpeta 2 y life augmented Presentation Title 13 08 2013 gt KFIL Step 5 Open FW demo project with Keil uVision Using explorer go to the directory CAstm32f3discovery fw STM32F3 Discovery FW V1 0 0 Project Demonstration MDK ARM e Double click on the Demo uvproj file i El e iz x G Ja STM32F3 Discovery FW V110 Project ll Buscar 0 somo p Organizar Incluir en biblioteca Compartir con Grabar Mueva carpeta Hz i e Jg b de SimpleCV1 3 Nombre Fecha de modifica Tipo b Je SimulationInterfaceT oolkit b de StellarisWare 4 stm32f3discovery fw a STM32F3 Discovery FW V1 1 0 htmresc p de Libraries 4 Je Project 4 di Demonstration Binary Lo EWARM MDK ARM gt TASKING gt TrueSTUDIO Ly gt KEIL Tools by ARM fy Demo uvopt 07 09 201212 15 Archrva UVOPT Ej Demo uvproJ 07 09 2012 12 15 uVision4 Project m 4 Mi 2 life augmented File Edit View m Tools SVCS Window Help Er dr m USB F5 Device_Driver Ei usb core c 1 usb init c usb int c usb regs c m usb sil c B I STM32F3 Discovery o
10. Hard Fault Handler DCD MemManage Handler 7 MPU Fault Handler DCD BusFault_Handler 7 Bus Fault Handler DCD UsageFault Handler Usage Fault Handler 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 AK A N ww ow wwomqooo 5 5 J AG AAA Contains Reset handler e gt ss Default interrupt handlers THUMB called on system reset y Calls Systemlnit function O Y Reset Handler o Branches to main LDR RO SystemInit BLX RO LDR RO iar program start BX RO Ly life augmented system stm32f30x c Ant AMM Am nit y Y 152 153 154 155 156 a 157 Configuration Mode 24 180 Ball ters 26 Prefetch Buffer 271 Enable USB clock 272 Enable 125 clock 283 4 294 lt gt STM32F30x 3 o Ready 287 289 283 290 Ly life augmented define PLL SOURCE HSI define PLL SOURCE HSE define PLL SOURCE HSE BYPASS HSE bypassed with an external clock 8MHz coming from ST Link used to clock void SystemInit void COPYRIGHT 2012 STMicroelectronics program E erm ta pei 9 i HSI 8MHz used to clock the PLL and veg PLL is used as EXEUNTES clock source HSE 8MHz used to clock the PLL and the PLL is used as system clock source STM32F3 Clock Co ieuratio LICI the PLL and the PLL is used as system clock source S
11. Linker Debug Ltities Signum Systems JTAGjet Load Application at Startup Run ta main LINK J Trace Cortex Initialization File Ly life augmented Presentation Title 13 08 2013 An ARM Company e Click the Settings button E Options for Target Dem Device Tegai Output Using Uer C C Aem Linker Deg tie Bos bea t atap Run to maint Initialization File o 0 Z Edit Breakpoints mo Watch Windows Performance Analyzer Memory Display Ly life augmented Presentation Title 13 08 2013 gt JKEIL Step 5b 33 e Change Port to SW Cortex M Target Driver Setup Debug Trace Flash Download Debug Adapter Unit ST LINKv2 Serial Number N A HW Version v2 IEU f Automatic Detection ID CODE Port E Manual Configuration Device Name Max Clock 1MHz Add Delete Update IR len SWDIO x2BAU1477 ARM CoreSight SW DP Cancelar Aplicar life augmented Presentation Title 13 08 2013 gt JKEIL Step 5b An ARM Company e Click on Flash Download and then the Add button Cortex M Targ t Driver Setup lr RM EA GraseSectos v Verfy Donot Ease Reset and Run Cancelar Aplicar life augmented Presentation Title 13 08 2013 gt JKEIL Step 5b An ARM Company EE 35 e Select STM32F3xx Flash and then click on the Add button Aceptar Cancelar Aplicar
12. Standard OpenHCD USB Host Controller a standard OpenHCD USB Host Controller a standard OpenHCD USB Host Controller pee E A E e Re check device manager to ensure T STMicroelectronics STLink dongle V USB Mass Storage Device S T Microelectronics ST Link dongle M USB Root Hub is functioning normally Ly life augmented o1M32 F3 RESOURCES Documentation resources All documentation can be found at www st com stm32f3discovery under the Design support tab and STIMS2FSDISCOVERY STMicroelectronics Windows Internet Explorer provided by corporate Package abricas Tl Ol x Ca ame E a ns 7 mt iaai SE com Aimtermet ewv allboard A product 54044 jsp ew gt lt z Google E Dl Te 7 STMS2FSDISCOVERY STMicroelectronics 5 dh Page iG Tools Vuicroelectroni v gt HOM ARCHIF ii CONTACTE PRESS I OGTH ome Tools E Resources Evaluation Tools Product Evaluation Boards and Kits Eval Tools for Mics TMS2FS3DISCOVERY ES M wc Tic JSTM32F3 JISCOVE RY Discovery kit for STM32 F3 series with STM32F303 MCU device amp gt Quick view LU Bt Orderable products ONLINE SUPPORT _ Related information Description The S5TM32FSDISCOWERY helps you to discower the STM32 F3 series Cortex M4 mixed signals features and to develop your applications mudo easily It includes everything required for beginners and experienced users to get start
13. Technical Notes e Programming Manuals Reference Manual User Manuals Firmware y life augmented v X A F http www st com nternet mcu class 1734 jsp ve r 7 STM32 32 bit ARM Cortex MCUs STMic Microelectroni STM32 F1 Mainstream STM32 L1 Ultra Low Power STM32 F2 Hi Performance STM32 F4 Hi Performance amp DSP STM32 FO Entry level STM32 F3 Analog amp DSP STM32W Wireless gt I HOMF AROLIT ST CONTACTS PRESS LOGIN 4 STM32 32 bit ARM Cortex MCUs E dicono AMDO te The STM32 family of 32 bit Flash microcontrollers based on the ARM Cortex M processor is designed to offer new degrees of freedom to MCU users It offers 32 bit product range that combines high performance real time capabilities digital signal processing and low power low voltage operation while maintaining full integration and ease of development The unparalleled and large range of STM32 devices based on an industry standard core and accompanied by a vast choice of tools and software makes this family of products the ideal choice both for small projects and for entire platform decisions High performance MCUs with DSP and FPU 168 MHz 210 DMIPS Mixed signal MCUs with DSP and FPU 72 MHz 94 DMIPS High performance MCUS 120 MHz 150 DMIPS Core features Cortex M4 Mainstream MCUs 72 MHz 61 DMIPS P MCUs 32 MHz 33 OMIPS Wireless MCUs 24 MHz 30 DMIPS nr MCUs 48 MHz 38 DMIPS we
14. USB power CN4 MCU Program Jumper CN3 Application SWD connector Ly life augmented LEDs Push Buttons MEMs Extension Connector LEDS LD1 LD2 WE e LD1 Power indicator E e LD2 ST LINK Communication indicator Ade A LD3 thru LD10 PES thru PE15 a na D e Push Buttons pace deryn ee B1 USER Wake up PAO B2 RESET NRST T t Extension Connector y P1 and P2 U5 B1 B2 All GPIOs are available for prototype e Includes 5V 3V and GND pins MEMs Devices e U3 LSM303DLHC Ly U5 L3GD20 LD3 thru LD10 life augmented Jumpers User Manual Firmware Library e Jumpers e JP3 USART1 TX and RX not fitted reserved function e JP4 lbp for MCU current measurement fitted by default IPA Documentation e UM1570 STM32F3DISCOVERY Kit e Firmware Library e Contains STM32F3 Standard Firmware Library amp ARM DSP Library Contains example code e UM1562 e AN4157 Ly life augmented Step 3 Install ST Link Driver The STM32F3DISCOVERY board includes and ST LINK V2 embedded programming and debug tool e he driver for ST Link is contained in the Keil uVision toolchain and located in this directory e C Keil ARM STLink USBDriver e Double click on the file ST Link V2 USBbDriver exe to install e Click through the installation menu until the driver installation is complete Ca gt Computer gt OS C Keil ARM gt STLink USBDriver y g Search
15. crc c E stm32f30x dac c stm32f30x dbgmcu c A stma2f30x_dma c E stm32f30x exti c 4 stm32f30x flash c E stm32f30x gpio c stm32f30x i2c c 4 stm32f30x iwdg c 4 stm32f30x misc c 4 stm32f30x opamp c E stm32f30x pwr c A stm3Zf3 x rcc c E stm32f30x rtc c 4 stm32f30x spi c E stm32f30x syscfg c 4 stm32f30x tim c E stm32f30x usart c 4 stm32f30x wwdg c User Browse to gt main c line 161 Demo GyroConfig to investigate the Gryo config and the 12C config void Demo GyroConfig void L3GD20 InitTypeDef L36D20 Init5tructure L3GD20 FilterConfigTypeDef L36D20 Filter5tructure Configure Mems L3GD20 L3GD20 InitStructure Power Mode L3GD20 MODE ACTIVE L3GD20 Init5tructure 0utput DataRate L36D20 OUTPUT DATARATE 1 L3GD20 InitStructure xes Enable L3GD20 AXES ENABLE L3GD20 InitStructure Band Width L36D20 BANDWIDTH 4 L3GD20 InitStructure BlockData Update L36D20 BlockDataUpdate Continous L3GD20 InitStructure Endianness L3GD20 BLE LSB L36D20 InitStructure Full Scale L3GD20 FULLSCALE 500 L3GD20_Init L3GD20_InitStructure L3GD20 FilterStructure HighPassFilter Mode Selection L3GD20_ HPM NORMAL MODE RES L3GD20 FilterStructure HighPassFilter Cut0ff Frequency L3GD20 HPFCF 0 L3GD20 FilterConfig L3GD20 FilterStructure L3GD20 FilterCmd L3GD20 HIGHPASSFILTER ENABLE Ly life augmented
16. to install click Have Disk Show compatible hardware Model I STMicroelectronics STLink dongle A This driver is not digitally signed Tell me why driver sianina is important life augmented Step HA n ST Link Driver Trouble Shooting A warning message may appear 8 Select Install this driver software anyway tl Windows Security amp Windows can t verify the publisher of this driver software gt Don t install this driver software You should check your manufacturers website for updated driver software for your device gt Install this driver software anyway Only install driver software obtained from your manufacturers website or disc Unsigned software from other sources may harm your computer or steal information P See details Ly life augmented Step 4 ST Link Driver Trouble Shooting e You should receive a message Windows has successfully updated your driver software Windows has successfully updated your driver software Windows has finished installing the driver software for this device Device Manage Hle Action View Help A ssim Ss STMicroelectronics STLink dongle p ew Network adapters D MM Portable Devices p BD Processors p Sy Sound video and game controllers gt i System devices 4 a Universal Serial Bus controllers a Standard Enhanced PCI to USB Host Controller a Standard Enhanced PCI to USB Host Controller a
17. RM Some restrictions apply Program and debug up to 32 Kbytes of code No disassembly listing Some restriction on linkage usage Limited base address usage e Double click on the file mdk exe to begin installation Please click through the default options and accept the license agreement Ask for assistance If you have an Issue a SIKEIL Introducing the STM32F3Discovery Kit oTM32F303VCT6 mma e 72 MHz Cortex M4 Po wy PEY Ot y Md aS 4 com stm32f3discovery a 100 pin LQFP NU cych STM32F303VCT6 e 256 Kbytes Flash MB1035B PEO B A PBS 4 BOOTO m Ed yd 40 Kbytes SRAM 8 Kbytes of CCM SRAM Ly life augmented Embedded ST LINK V2 mm ST LINK V2 e S I LINK V2 programming and CN3 USBSTIINK USB USER debugging tool integrated on board the kit STM32F103C8T6 17313279 oO Til S cca Can be used two different ways CN4 e Program and debug the MCU on the board e Program an MCU on another application board Note JIAG versus SWD configuration com stm32f3discovery i f Bec ELEEEEELEELELEELEELELE GLEN GG rn 1111111111140 1114 PB8 VI nee a r gt sd a e Ar E ST 3 STM32F303VCT6 E MB1935B PEO r ap PATHE i A e Features USB ST LINK USB Micro Type B USB USER USB Micro Type B USB FS 2 0 ST LINK V2 MCU STM32F103 5V to 3V Regulator
18. T GPIOE define LED3 GPIO CLE RCC AHBPeriph GPIOE define LED4 PIN GPIO Pin 8 define LED4 GPIO PORT GPIOE define LED4 GPIO CLK RCC AHBPeriph GPIOE Ly life augmented IKEIL Step 11 How Large Is The STM32F3Discovery Demo Code e Select Project Options for Target Demo Flash Debug Peripherals Tools SVCS Window Help File Edit View New uVision Project New Multi Project Workspace Open Project Close Project Export Manage Select Device for Target Demo life a ted Presentation Title 13 08 2013 gt IKEIL Step 11 How Large Is The STM32F3Discovery Demo Code e Select Listing Then select Linker Listing Finally click on the OK button C Preprocessor Listing Demo i Presentation Title 13 08 2013 gt KEIL otep 411 How Large Is The STM32F3Discovery Demo Code e Click on gt Project gt Build to re link the project and generate the Demo map Edit the Demo map file How much STM32F3 FLASH is required How much STM32F3 SRAM is required m Presentation Title 13 08 2013 STM32F3 Discovery Demo Firmware Project Overview life augmented ProJect Files MDK ARM e startup stm32f30x s Ey MDK ARM e System initialization vector table reset and branch to main LLB startup stm32f30x s Unique for each 3 party tool chain 1 E3 STM32_USB FS Device Driver H 4 usb core c usb
19. USED o Organize y Include in library y Share with y Burn New folder B y E o X Favorites Name Date modified Type Size ST Link V2 USBdriver exe 10 17 2011 3 51PM Application 11 696 KB gt NEW VOLUME C TM FE ae Ly gt KEIL oe life augmented Step 4 Connect the Discovery Kit Enable ST Link Using the USB cable connect the mini B male connector into the STM32F3DISCOVERY USB port and connect the A male connector into your Laptop amp Device Manager File Action View Help e Wait for Windows to recognize the ee UT ST Link device and follow any step b P Network adapters required to install the driver pues P Gy Sound video and game controllers gt Me System devices Upon successful driver recognition I the ST Link device should be fully ER enumerated in Windows Device Standard OpenHCD USB Host Controller i a standard OpenHCD USB Host Controller Manager as show 8 Standard OpenHCD USB Host Controller g STMicroelectronics STLink dongle g USB Mass Storage Device Ly life augmented Step 4 ST Link Driver Trouble Shooting 1 Open Device Manager 2 Right click on the STM32 ST Link Driver icon 3 Select Update Driver Software File Action View Help A HTE gt EP Network adapters 4 j5 Other devices ly STM32 STLink b Mi Portable Devices b a Processors b Gy Sound video and game controllers gt id System devices A g Universal Serial Bus
20. controllers mer a Standard Enhanced PCT to USB Host Controller mer g Standard Enhanced PCT to USB Host Controller a standard OpenHCD USB Host Controller a a standard OpenHCD USB Host Controller he a standard OpenHCD USB Host Controller s a Standard OpenHCD USB Host Controller ie a USB Mass Storage Device Ly life augmented Step 4 ST Link Driver Trouble Shooting How do you want to search for driver software 4 Se ect B rowse my com puter for driver software gt Search automatically for updated driver software Windows will search your computer and the Internet for the latest driver software for your device unless you ve disabled this feature in your device installation settings gt Browse my computer for driver software Locate and install driver software manually Browse for driver software on your computer Search for driver software in this location ym Include subfolders o select Let He pick from a list of gt Let me pick from a list of device drivers on my computer device drivers of my computer ii 6 Click Next Ly life augmented Step 4 ST Link Driver Trouble Shooting e The STMicroelectronics ST Link dongle should listed Click Next Select the device driver you want to install for this hardware Select the manufacturer and model of your hardware device and then click Next If you E d have a disk that contains the driver you want
21. ed quickly A Based on the STM32F303wWCT6 it includes an ST LINK W2 embedded debug tool accelerometer gyroscope and e compass ST MEMS DATA BRIEF USB connection LEDs and pushbuttons A large number of free ready to run application firmware examples are available on www st com stmS32fsdiscowery to support quick evaluation and dewelopment Key Features STM32F303VCT6 microcontroller featuring 256 EB Flash 48 EB RAM in an LGFP100 package On board amp T LIMEK Wwz with selection mode switch to use the kit as a standalone ST LINK W2 with SM connector for programming and debugging Board power supply though USB bus or from an external 3 v or 5 Y supply voltage External application power supply 3 wv and 5 Y L3CGD 20 ST MEMs motion sensor 3 axis digital output gyroscope LSM303DLHC ST MEMs system in package featuring a 30 digital linear acceleration sensor and a 3D digital magnetic sensor Ten LEDs LD1 red for 3 3 Y power on LD red green for USB communication Eight user LEDS LD3 10 red Ll4 9 blue LOS 8 orange and LDS green Two pushbuttons user and reset USB USER with Mini E connector Extension header for all LOFP100 I Os for quick connection to prototyping board and easy probing Ly life augmented Documentation resources e Main website page for the STM32 family e Www st com stm32 e For STM32F3 e www st com stm32f3 You can find e Datasheets Applications Notes Errata
22. he board is powered and ST Link is functional e LD3 to LD10 will be flashing in a rotating pattern Board Test Press the USER Button Once to Select Gyro Function e LD6 amp LD9 Green will light when the Discovery board is rotated along the Roll access e LD4 amp LD10 Blue will light when the Discovery board is rotated along the Pitch access Press the USER Button a 274 time to Select the Digital Compass Function e LD3 thru LD10 will Flash randomly until the Discovery is rotated e Rotate the Discovery board around the Yaw axis until LD4 Blue lights LD4 will be pointing to magnetic North The STLINK USB connector will be pointing to the South Rotate the Discovery Board around the Pitch or Roll axis Ly life augmented Hands On Part I Edit Compile Download Debug and Run Step 4b Change the project folder attributes Right click on the STM32F3 Discovery FW V1 1 0 folder and select Properties Ko Je Equipo gt Discolocal C stm32f3discovery fw gt rganizar Incluir en biblioteca Compartir con Grabar Mueva carpeta q sk CE M Nombre Jo STM32F3 Discovery FW V1 1 0 al Bibliotecas Documentos i Imagenes a M sica ES Videos H Equipo l Disco local C ca Disco local D life augmented Presentation Title 13 08 2013 Step 4b Unselect the attribute Only lecture and then Accept Propiedades STM32F3 Discovery FW VLLO S M32F3
23. init c usb int c 1 usb mem c aa usb regs c usb_sil c STM32F3 Discovery f stm32f3 discovery c 2 stm32f3 discovery I3gd20 c stm32f3 discovery Ism3 3dlhc c STMS32F30x StdPeriph Driver User 2 hw config c main c stm32f3 x it c system stm32f3 x c b desc c STM32 USB FS Device Driver e Contains ST FS USB library functions ST 3F3 Discovery e Board specific functions STM32F30x StdPeriph Driver Contains peripheral library functions e User files e main c program entry point b endp c b istr c b prop c b pwr c 4 aA ub e system stm32f3xx c initial system configuration e sim32f0xx_it c ISR s Cwr e usb xxxx c USB interface not used y life augmented startup stm32f30x s Description SIM32F30x devices vector table for EWARM toolchain This module performs L L e Main Characteristics T t Set the initial PC iar program start m et Set the vector table entries with the exceptions ISR et address ud In itial IZes stack pointer PLI Branches to main in the C library which eventually gn calls main After Reset the Cortex M4 processor is in Thread mode s priority is Privileged and the Stack is set to Main 2 EA AAA AAA AAA AAA AAA DATA vector table Contains the vector table for the part e Bo stetcsTack DCD Reset_Handler 7 Reset Handler DCD NMI Handler 7 NMI Handler DCD HardFault Handler 7
24. tup stm32f30x s Files Window retval None wy int main void i uint8 t i 0 SysTick end of count event each 10ms a ks Program counter position SysTick Config RCC Clocks HCLK Frequency 100 Initialize LEDs and User Button available on STM32F3 Discovery board STM EVAL LEDInit LED3 STM EVAL LEDInit LED4 STM FVAT TENTnit TFSi Command n Ea Memory 1 a cre GommnandWindow s a M F 0x08000000 0x0800000A 0x08000014 Ox0800001 0x08000028 40 06 00 20 SD 01 00 08 AB 00 08 4D 13 00 08 AS 1D OU Me rffot y Widows OD OD OD OS OD OD OD OD 00 DD OD OD 00 35 26 00 08 8D gt ASSIGN BreakDisable BreaEEnable Breakkill ST Link Debugger tl 0 00122510 sec Disassembly Window Address O lt 08DDDODD 768 Byte Code 1D 08 00 oc a Es L74 C4 gt KEIL Step 8 Run e Click on the Run button to start the program File Edt View Project Flash Debug NeW s Ga o c et BL 0 e Peo gt ala Hun Button e Your STM32F3DISGOVERY board LD3 thru LD10 will be flashing in a rotating pattern e Note LD2 ST Link Status will be flashing because of the communication occurring between the STLINK V2 and EWARM Ky gt KEIL ife augmented gt EIE Step 8 Run e Mission Accomplished File Edit View Project Flash L Please click on the Stop 16d a asl button O oo 0 0 Stop Button
25. utton stm32f30 discovery_l3gd20 c stm32f3 discovery Ism303dlhc c e Each contains the driver information for the MEMs devices on STM32F3 Discovery Board Each contains board specific functions Gaefgroup SIM32F3 DISCOVERY L3GD20 Exported Functions af ey Sensor Configuration Functions void L36D20 Imit L36D20 InitTypeDef L3GD20 InitStruct void L36D20 RebootCmd void INT1 Interrupt Configuration Functions void L36D20 INTlInterruptCmd uints t Interrupt5tate void L3GD20 INTZInterruptCmd uint8 t Interrupt5tate void L36D20 INTlInterruptConfig L3GD20 InterruptConfigTypeDef L3GD20 IntConfigStruct uint8 t L36D20 GetDataStatus void High Pass Filter Configuration Functions void L36D20 FilterConfig L3GD20 FilterConfigTypeDef L36D20 Filter5truct void L36D20 FilterCmd uint8 t HighPassFilterState void L3GD20 Write uint8 t pBuffer uint8 t WriteAddr uintl6 t NumByteToWrite void L36D20 Read uint8_t pBuffer uint8 t Read ddr uintl6 t NumByteToRead Ly life augmented o M32F30x_sStdPeriph_ Driver Each file contains library functions that can be en used for each peripheral and gives a standard HM SINE EIS Deere Dane a i STM32F3 Discovery API for access to peripheral functions Gy STM2F3Os StdPeriph Drive 2 1 stm32f30x adc c Browse to gt main c line 83 STM EVAL LEDInit LED5 stm32f30x can c to investigate GPIO config E stm32f30x comp c stm32f30x

Download Pdf Manuals

image

Related Search

Related Contents

Tecumseh AE2415Z-AA1AEB Performance Data Sheet  PI300S - Sklep AVT  IBM System x x3400 M3  Exabyte Mammoth Tape Drive  User`s Product Manual  03267$=,21 - Support Sagemcom  Dataram DRH667FB/64GB memory module  SERVICE MANUAL - Altehandys.de  - Cornelsen Experimenta  DELL XPS 13  

Copyright © All rights reserved.
Failed to retrieve file