Home

Micriµm μC/OS-II μC/Probe

image

Contents

1. os flag c La st I Eos mbox c L F stm32 10x_conf h IE os mem c a tssP os mutex c AQ General Les a c x H Bpsp c fos sem c L sp n Les task c Ls riash xci Les time c L srsgs2 nRam xci d Les twr c Pa FuLin L B ucos_ii h inc Lg Guc Probe Lgmsrc Ls Target Ha Guc cru Ha Ci Communication I B cpu n HaGos eru a asm agucos 11 cpu def h L probe com os c I g C3 uc Lcp aGyrs 232 Haos reos agucos 11 amgnucos 11 lica os c rrebe ra232 os c x Lag Source a Ports B 1ca c B probe rs232c c B L 8 1ca h probe rs232c h g C1uc LIB Lg source I F lib_def n I F probe_rs232 c x F 1ib mem c L probe_rs232 h F lib_mem n AEA Source iib str c F probe_com c iib str h T rrobe com h Lg Plugins STM32 SK 0S Probe LCD g uCOS II I ios probe c L fos probe h STM32 SK 05 Probe LCD a Figure 2 3 IAR EWARM Project Tree for STM32 SK OS Probe LCD ewp 13 Micripm uC OS Il and uC Probe for the STMicroelectronics STM32 CPU Options for node STM32 SK OS Probe LCD Category General Options C C Compiler Assembler Custom Build Build Actions Linker Debugger Simulator Angel IAR ROM monitor J Link J Trace LMI FTDI Ma
2. STSTM32 RS232Communication 0S Task Info nares pC Probe Example Y OS Task Into OS Task CPU U on the as sage OS Task Stack Usage IAR LCD j OS Events Es 05 Timers STM32 SK Micrium uC OS II Evaluation Board ij 05 Configuration STMicro STM32 This workspace is an example pC Probe OSMemTblSize workspace for the IAR STM32 SK evaluation OSMutexEn board which employs the STMicroelectronics OSPrioCur STM32 ARM Cortex M3 processor OSPricHighRdy Accompanying this workspace is the source code PB1 PB2 PB3 OSProbe CallbackFnct for this example project demonstrating how easily These LEDs vill Start Button Pise mad uC Probe can be used to provide greater insight pueris pine This button OSProbe Task cycles di into the behavior of your embedded target Q Q board are pressed switches vule esie Pig Download the code onto the target start between Design OSProbe TaskStk execution on the target and then press the 3 OSProbe_TaskStkUsage Start button on the upper left tool bar in and Run Time OSProbe TmiCntsPrev this program The components to the right Potentiometer Views During OSPuSize labels LEDs gauges and spreadsheets will OSQEn begin to update with values from the target Run Time View OSGFreeList uC Probe can download data from the STM32 when data is ae through RS 232 at 115200 baud collected this erem For more info
3. 1 650 287 4250 1 650 287 4253 FAX e mail Info QIAR com WEB http www IAR com Micrium 949 Crestview Circle Weston FL 33327 USA 1 954 217 2036 1 954 217 2037 FAX e mail Jean Labrosse Micrium com WEB http www Micrium com CMP Books Inc 1601 W 23rd St Suite 200 Lawrence KS 66046 9950 USA 1 785 841 1631 1 785 841 2624 FAX e mail rushorders cmpbooks com WEB http www cmpbooks com ST Microelectronics 39 Chemin du Champ des Filles C P 21 CH 1228 Plan Les Ouates Geneva Switzerland 41 22 929 29 29 41 22 929 29 00 FAX WEB http www st com
4. 32 Micripm uC OS Il and uC Probe for the STMicroelectronics STM32 CPU 6 yu C Probe uC Probe is a Windows program which retrieves the values of global variables from a connected embedded target and displays the values in a engineer friendly format To accomplish this an ELF file created by the user s compiler and containing the names and addresses of all the global symbols on the target is monitored by uC Probe The user places components such as gauges labels and charts into a Data Screen in a pC Probe workspace and assigns each one of these a variable from the Symbol Browser which lists all symbols from the ELF file The symbols associated with components placed on an open Data Screen will be updated after the user presses the start button assuming the user s PC is connected to the target uC Probe currently interfaces with a target processor with a RS 232 A small section of code resident on the target receives commands from the Windows application and responds to those commands The commands ask for a certain number of bytes located at a certain address for example Send 16 bytes beginning at 0x0040102C The Windows application upon receiving the response updates the appropriate component s on the screens with the new values Micripm pC Probe STM32 SK OS Probe LCD Workspace wsp i Eile Tools Help gu NeosuBuansRaauBosuE gt 2 Bi 4 Bp Bie ee o B Workspe Ae Explorer
5. Figure 2 19 Example Application Hardware Use STM3210E EVAL 21 Micripm uC OS Il and uC Probe for the STMicroelectronics STM32 CPU 3 Directories and Files Application Notes WMicriumVAppNotesVAN Ixxx RTOSVAN1018 u COS II Cortex M3 This directory contains AN 1018 pdf the application note describing the ARM Cortex M3 port for p C OS II WMicriumVAppNotesVAN Ixxx RTOSVAN1320 u COS II ST STM32 This directory contains this application note AN 1320 pdf Licensing Information Micrium Licensing Licensing agreements are located in this directory Any source code accompanying this appnote is provided for evaluation purposes only If you choose to use pu C OS II in a commercial product you must contact Micrium regarding the necessary licensing pu C OS II Files WMicriumYSoftwareiu COS II Doc This directory contains documentation for u C OS II Micrium Software uCOS II Ports ARM Cortex M3 Generic AR Micrium Software uCOS II Ports ARM Cortex M3 Generic RealView This directory contains the standard processor specific files for the generic wC OS II ARM Cortex M3 port assuming the IAR toolchain These files could easily be modified to work with other toolchains i e compiler assembler linker locator debugger however the modified files should be placed into a different directory The following files are in this directory os_cpu h os cpu a asm OS cpu c c os dbg c The ARM Cortex M3 port is described in application note
6. IAR B uc Lcp uC LIB B os O ucos 4t O Source C3 uC LIB B O Ports C3 ARM Cortex M3 O IAR Run Time Libraries Figure 2 2 Directory Structure 11 Micripm uC OS Il and uC Probe for the STMicroelectronics STM32 CPU uC OS II The Real Time Kernel 3 ucos r uem eb E a 2 EN documentation C3 ARM Cortex M3 C3 Generic ARM Cortex M3 O IAR uC OS II port C3 Realview m 3 HC OS II processor B C3 Target independent source code C3 Communication C3 Generic a e os C3 ucos I E C3 Rs 232 a e os O ucos II C3 Ports a ST STM32 O uC Probe Q3 source STM32 Port 3 Plugins O ucos 4r uC Probe Real Time Viewer Figure 2 2 Directory Structure continued 2 03 STM32 SK IAR Project An IAR project file named STM32 SK OS Probe LCD ewp is located in the directory marked STM32 SK IAR Example Project in Figure 2 2 Micrium Software EvalBoards S T S TM32 SK IAR OS Probe LCD To view this example project start an instance of IAR EW and open the workspace file STM32 SK OS Probe LCD eww To do this select the Open menu command under the File menu select the Workspace submenu command and select the workspace file after navigating to the project directory The project tree shown in Figure 2 3 should appear In addition the workspace should be openable by double clicking on the file itself in a Windows explorer window 2 03 01 Project Options Onc
7. uC OS Il and uC Probe for the STMicroelectronics STM32 CPU Document Conventions Numbers and Number Bases Hexadecimal numbers are preceded by the Ox prefix and displayed in a monospaced font Example 0xFF886633 Binary numbers are followed by the suffix b for longer numbers groups of four digits are separated with a space These are also displayed in a monospaced font Example 0101 1010 0011 1100b Other numbers in the document are decimal These are displayed in the proportional font prevailing where the number is used Typographical Conventions Hexadecimal and binary numbers are displayed in a monospaced font Code excerpts variable names and function names are displayed in a monospaced font Functions names are always followed by empty parentheses e g OS Start Array names are always followed by empty square brackets e g BSP Vector Array File and directory names are always displayed in an italicized serif font Example Micrium Sofware uCOS II Source A bold style may be layered on any of the preceding conventions or in ordinary text to more strongly emphasize a particular detail Any other text is displayed in a sans serif font Micripm uC OS IIl and uC Probe for the STMicroelectronics STM32 CPU Table of Contents 1 Introduction 6 2 Getting Started 10 2 01 Setting up the Hardware 10 2 02 Directory Tree 10 2 03 STM32 SK IAR Project 12 2 03 01 Project Options 12 2 03 02 uC OS II Kerne
8. 2 14 is reached Screen 1 will again be shown Screen 2 displays the version of uC OS II currently running on the target and its tick timer frequency Screen three shows the percent CPU usage and CPU clock speed Two cumulative measures are shown in Screen 4 the number of ticks and the number of context switches that have occurred since pu C OS I began running Pressing PB2 will toggle the LCD backlight and the potentiometer controls the rate of movement of the LEDs Figure 2 11 Screen 1 Figure 2 12 Screen 2 u C OS II Version Number and Tick Rate Figure 2 13 Screen 3 Figure 2 14 Screen 4 CPU Usage and CPU Speed Cumulative Ticks and Context Switches 2 05 01 STM3210B EVAL STM3210E EVAL Application Information When the example application is started a summary of the current uC OS II state is displayed on the LCD screen as shown in Figure 2 15 Pressing the push button labelled Key will cause the screen shown in Figure 2 16 to appear which displays the list of uyC OS II tasks Micripm uC OS IIl and uC Probe for the STMicroelectronics STM32 CPU Mic crium uc OS um uC OS 11 ST STM32 foe eM _STM32 Cortex M3 Pric Taskname uC OS 1 2 V2 059 uC OS ll Idle TickRate 0100 uC OS 11l Stat CPU Usage 07 29 uC OS 1 Tmr CPU Speed 72 MHz 3 Start Task Ticks 00019796 Probe RS 232 4CtxSw 00027061 uC Probe OS User I F Figure 2 15 Screen 1 Figure 2 16 Screen 2 yu C OS II Task List 2 05 03 Additiona
9. AN 0 8 which is available from the Micrium web site MicriumYSoftwareu COS Il Source This directory contains the processor independent source code for pC OS II pu C Probe Files Micrium Software uC Probe Communication Generic This directory contains the C Probe generic communication module the target side code responsible for responding to requests from the pu C Probe Windows application including requests over RS 232 Micrium Software uC Probe Communication Generic Source This directory contains probe_com c and probe_com h the source code for the generic communication module 22 Micripm uC OS IIl and uC Probe for the STMicroelectronics STM32 CPU Micrium Software uC Probe Communication GenericVOS u COS II This directory contains probe com os c which is the wC OS II port for the uC Probe generic communication module Micrium Software uC Probe Communication Generic Source RS 232 This directory contains the RS 232 specific code for uC Probe generic communication module the target side code responsible for responding to requests from the wC Probe Windows application over RS 232 Micrium Software uC Probe Communication Generic Source RS 232 Source This directory contains probe_rs232 c and probe_rs232 h the source code for the generic communication module RS 232 code Micrium Software uC Probe Communication Generic Source RS 232 Ports S T STM32 This directory contains probe_rs232c c and probe rs232c h the STM32 po
10. LEDs and the LCD app cfg h is a configuration file specifying stack sizes and priorities for all user tasks and defines for important global application constants app vect v5 c defines the ARM Cortex M3 exception vector table for the application code This vector table would be different for each application based on the interrupt service routines needed in that application includes h is the master include file used by the application os cfg h is the uC OS II configuration file probe com cfg h is the nC Probe target communications module configuration file STM3210E EVAL OS Probe v5 are the IAR Embedded Workbench v5 11 project files 24 Micripm uC OS Il and uC Probe for the STMicroelectronics STM32 CPU Micrium Software CPU ST STM32 This directory contains the ST driver library for the STM32 microprocessors e src c is the driver library source code e inc h are header files containing prototypes for the library API 25 Micripm uC OS Il and uC Probe for the STMicroelectronics STM32 CPU 4 Application Code The example application described in this appnote 4N 320 is a simple demonstration of uC OS II and uC Probe for the STMicroelectronics processors with IAR STM32 SK ST STM3210B EVAL and ST STM3210E EVAL evaluation boards The basic procedure for setting up and using each of these can be gleaned from an inspection of the application code contained in app c which should serve as a beginning template for furt
11. SIZE void I Be INT16U OS_TASK OPT STK CLR OS TASK OPT STK CHK if OS TASK NAME SIZE gt 11 Note 5 OSTaskNameSet APP TASK START PRIO Start Task Serr endif OSStart Note 6 Listing 4 1 main Listing 4 1 Note 1 As with most C applications the code starts in main Listing 4 1 Note 2 All interrupts are disabled to make sure the application does not get interrupted until it is fully initialized Listing 4 1 Note 3 OSTnit must be called before creating a task or any other kernel object as must be done with all nC OS II applications Listing 4 1 Note 4 At least one task must be created in this case using OSTaskCreateExt to obtain additional information about the task In addition uyC OS II creates either one or two internal tasks in OSInit pC OS II always creates an idle task OS Taskrdle and will create a statistic task OS TaskStat if yu set oS TASK STAT EN to 1 in os cfg h Listing 4 1 Note 5 As of V2 6x you can now name ju C OS II tasks and other kernel objects and display task names at run time or with a debugger In this case the AppTaskStart is given the name Start Task Because C Spy can work with the Kernel Awareness Plug In available from Micrium task names can be displayed during debugging Listing 4 1 Note 6 Finally multitasking under uC OS II is started by calling oSSTart uC OS II will then begin executing AppTaskStart since that i
12. have been found in the directory Micrium Appnotes AN Ixxx RTOS AN1320 uCOS II ST STM32 and the code files referred to herein are located in the directory structure displayed in Section 2 02 these files are described in Section 3 Micripm uC OS Il and uC Probe for the STMicroelectronics STM32 CPU ST M25 Serial NOR Flash UART1 for uC Probe USB Device 5V DC Power ut The executable zip also includes example workspaces for pC Probe pu C Probe is a Windows program which retrieves the value of variables form a connected embedded target and displays the values in an engineer friendly format It interfaces with the STM32 via RS 232 For more information including instructions for downloading a trial version of the program please refer to Section 6 Micripm uC OS IIl and uC Probe for the STMicroelectronics STM32 CPU Micripm pC Probe STM32 SK OS Probe LCD Workspace wsp File Tools Help i STSTM32 RS 232 Communication OS Task Info Task Stack Information Jeod 3 a2eds yo M nz Ux uC OS II Idle 0x20001874 0x200018Bc 0x200016BC uC OS II Stat 0x20001650 0x200016BC 0x200014BC uC OS II Tmr 0x20001F2C 124 512 0x20001FA8 0x20001DA8 Start Task 0x20000388 180 1024 120 1024 0x20000400 0x20000000 Probe RS 232 0x20002938 136 1024 120 1024 0x200029B0 0x200025B0 uC Probe OS 0x20002430 136 1024 136 1024 0x200024B8 0x200020B8 User I F 0x20000784 188 1024 124 1024 0x
13. project files Micrium Software EvalBoards S T STM3210B EVAL IAR OS Probe This directory contains the source code for the example application for the ST STM3210B EVAL evaluation board with IAR EWARM project files app c contains the test code for the example application including calls to the functions that start multitasking within wC OS II register tasks with the kernel and update the user interface the LEDs and the LCD app cfg h is a configuration file specifying stack sizes and priorities for all user tasks and defines for important global application constants app vect v5 c defines the ARM Cortex M3 exception vector table for the application code This vector table would be different for each application based on the interrupt service routines needed in that application includes h is the master include file used by the application os cfg h is the un C OS II configuration file probe com cfg h is the uC Probe target communications module configuration file STM3210B EVAL OS Probe v5 are the IAR Embedded Workbench v5 11 project files Micrium Software EvalBoards S T STM3210E EVAL TAR OS Probe This directory contains the source code for the example application for the ST STM3210E EVAL evaluation board with IAR EWARM project files app c contains the test code for the example application including calls to the functions that start multitasking within wC OS II register tasks with the kernel and update the user interface the
14. 20000800 0x20000400 Keyboard 0x20000B80 128 1024 128 1024 0x20000C00 0x20000800 JasMolg Joqui o rn General Task Information uC OS II Idle uC OS II Stat uC OS II Tmr Semaphore Start Task Delay Probe RS 232 Ready uC Probe OS Delay User I F Mailbox Keyboard Delay RS 232 115200 COM1 sp 1548 bytes sec Figure 1 4 uy C Probe Micripm uC OS IIl and uC Probe for the STMicroelectronics STM32 CPU 2 Getting Started The following sections step through the prerequisites for using the demonstration application described in this document AN 1320 First the setup of the hardware will be outlined Second the use and setup of the IAR Embedded Workbench and the Keil y Vision3 projects will be described Thirdly the steps to build the projects and load the application onto the board through a JTAG will be described Lastly instructions will be provided for using the example application 2 01 Setting up the Hardware The processors on all evaluation boards can be programmed and debugged through the 20 pin JTAG port using a JTAG emulator such as a J Link which we used for the IAR projects or a ULINK which we used for the Keil projects All boards can use power from a standard DC converter For the STM3210B EVAL and STM3210E EVAL this should supply 5VDC for the STM32 SK this should supply 9VDC To use uC Probe with the STM32 download and install the trial version of the program from the Micrium website as disc
15. E EVAL OS Probe ewp is located in the directory marked STM32102E EVAL IAR Example Project in Figure 2 2 Micrium Software EvalBoards S T STM310E EVAL IAR OS Probe The information in this section though specifically addressing the STM3210B EVAL also applies to the STM3210B EVAL 2 04 01 Project Options Once the connections described in Section 2 01 are made between your PC and the ST STM3210B EVAL evaluation board the code can be built and loaded onto the board To build the code select the Rebuild All menu item from the Project menu To load the code through a JTAG debugger onto the connected evaluation board select the Debug menu item from the Project menu 2 04 02 pu C OS II Kernel Awareness When running the IAR C Spy debugger the u C OS II Kernel Awareness Plug In can be used to provide useful information about the status of uC OS II objects and tasks If the uC OS II Kernel Awareness Plug In is currently enabled then a uC OS Il menu should be displayed while debugging Otherwise the plug in can be enabled Stop the debugger if it is currently active and select the Options menu item from the Project menu Select the Debugger entry in the list box and then select the Plugins tab pane Find the u C OS II entry in the list and select the check box beside the entry as shown in Figure 2 9 15 Micripm uC OS Il and uC Probe for the STMicroelectronics STM32 CPU Files ev
16. EVAL STM3210E EVAL 1 of a analog input and returns the current conversion value On the STM32 SK an ID of 1 corresponds to the potentiometer output BSP Joystick GetStatus returns the status of the joystick 31 Micripm uC OS IIl and uC Probe for the STMicroelectronics STM32 CPU 5 03 Processor Initialization Function void BSP Init void eNO tee IE RCC DeInit RCC HSEConfig RCC HSE ON RCC WaitForHSEStartUp RCC HCLKConfig RCC SYSCLK Divl RCC PCLK2Config RCC HCLK Div1 RCC PCLKlConfig RCC HCLK Div2 RCC ADCCLKConfig RCC PCLK2 Div6 FLASH SetLatency FLASH Latency 2 FLASH PrefetchBufferCmd FLASH PrefetchBuffer Enable RCC PLLConfig RCC PLLSource HSE Divl RCC PLLMul 9 RCC PLLCmd ENABLE while RCC GetFlagStatus RCC FLAG PLLRDY RESET RCC SYSCLKConfig RCC SYSCLKSource PLLCLK while RCC GetSYSCLKSource 0x08 Initialize board I Os ADCs LCD etc Note 2 Listing 5 1 BSP_Init Listing 5 1 Note 1 The CPU clock which is also the peripheral clock is setup With the settings here specified the PLL clock will equal the on board oscillator with a frequency output of 8 MHz divided by 1 and multiplied by 9 resulting in a 72 MHz clock Listing 5 1 Note 2 The peripherals for the user interface components are initialized This includes setting up the I O pins for the PBs and LEDs and if applicable initializing an LCD or ADC inputs
17. Files E B srM3210B EVAL 0S Probe Flash v l Ha Ga uc os 11 APP PagiPort Em os cpu h app c OS cpu a asm app cfg h L8 os cpu c c app vect c L Bios dbg c B ineiuses h H Source B os_cfg n 1 I F os_core c x E E probe com cfg h I Bos 1ag c Gast os mbox c L i stm32 10x conf h E os mem c L a Ga BSP I Bos mutex c HAE eneral I ies a c EE vl ERES os task c z Bsrg2 riasn xci Dos time c Bsrgs2 nam xci L fBes tmr c Larc ucos ii h B fonts h Lg C3 uc Probe led c z La Target Fi led h Ha Ci communication pem ib HaGos J inc Lg uCOS II src of miu probe com os c Hime Pagins 232 cpu h t E cpu a asm x HS cu E cpu_def h L E probe rs232 os c es m emer ib def Jen be E probe rs232c c NH PU meme 2 probe rs232c h FB lib mem h Ce source lib str c i E probe rs232 c n ff lib str h E L E probe rs232 h ert d Eai Source probe_com h L a Plugins Ls Gucos 11 I os probe c X L Bos probe h STM3210B EVAL D0S Probe Figure 2 7 IAR EWARM Project Tree for STM3210B EVAL OS Probe ewp 16 Micripm uC OS Il and uC Probe for the STMicroelectronics STM32 CPU Options for node STM3210B EVAL OS Probe Category General Options C C Compiler Target Output L
18. Micrium Empowering Embedded Systems uC OS Il uC Probe and the STMicroelectronics STM32 Processor Using the ST STM3210B EVAL Evaluation Board ST STM3210E EVAL Evaluation Board and the IAR STM32 SK Evaluation Board Application Note AN 1320 www Micrium com Micripm uC OS IIl and uC Probe for the STMicroelectronics STM32 CPU About Micrium Micrium provides high quality embedded software components in the industry by way of engineer friendly source code unsurpassed documentation and customer support The company s world renowned real time operating system the Micrium pu C OS I features the highest quality source code available for today s embedded market Micrium delivers to the embedded marketplace a full portfolio of embedded software components that complement u C OS II A TCP IP stack USB stack CAN stack File System FS Graphical User Interface GUI as well as many other high quality embedded components Micrium s products consistently shorten time to market throughout all product development cycles For additional information on Micrium please visit www micrium com About pC OS II uC OS II is a preemptive real time multitasking kernel u C OS I has been ported to over 45 different CPU architectures uC OS II is small yet provides all the services you d expect from an RTOS task management time and timer management semaphore and mutex message mailboxes and queues event flags an much more You will fin
19. S II and defines the maximum number of tasks that your application can have which services will be enabled semaphores mailboxes queues etc the size of the idle and statistic task and more In all there are about 60 or so define that you can set in this file Each entry is commented and additional information about the purpose of each define can be found in Jean Labrosse s book uC OS Il The Real Time Kernel 2nd Edition os cfg h assumes you have uC OS II V2 83 or higher but also works with previous versions of pC OS II e OS APP HOOKS EN is set to 1 so that the cycle counters in the OS TCBS will be maintained e Task sizes for the Idle O5 TASK IDLE STK SIZE statistics OS TASK STAT STK SIZE and timer O5 TASK TMR STK SIZE task are set to 128 OS STK elements each is 4 bytes and thus each task stack is 512 bytes If you add code to the examples make sure you account for additional stack usage e OS DEBUG EN is set to 1 to provide valuable information about uC OS II objects to IAR s C Spy through the Kernel Awareness plug in Setting OS DEBUG EN to 0 should some code space though it will not save much e OS LOWEST PRIO is set to 31 allowing up to 32 total tasks e OS MAX TASKS determines the number of application tasks and is currently set to 16 allowing 7 more tasks to be added to the example code e OS TICKS PER SECis set to 100 Hz This value can be changed as needed and the proper tick rate will be adjusted i
20. U Task List Name i State Diy Waiting On Msg Ctx su Stk Ptr Max Cur Size Starts B Ends Start Task Dly 46 1334 20000188 20000200 20000000 Keyboard Dly 13 4188 20000580 20000600 20000400 User I F Mbox 34 2234 20000384 x 20000400 20000200 Probe Str Dly 447 20000790 20000800 20000600 Probe R5 232 Sem Probe R 232 367 20002594 20002600 20002200 uC Probe 05 8 Dly 1091 20001E70 20001EF8 Z20001CF8 uC O5 II Tur Sem 0S TurSiq 673 20001B6C 20001BE8 200019E8 uC O5 II Stat Dly 626 20001290 200012FC 200010FC gt uC 0S II Idle Ready 5359 20001458 200014FC 200012FC Figure 2 6 y C OS II Task List for TM32 SK OS Probe LCD ewp 2 04 STM3210B EVAL STM3210E EVAL IAR Project An IAR project file named TM3210B EVAL OS Probe ewp is located in the directory marked STM32102B EVAL IAR Example Project in Figure 2 2 Micrium Software EvalBoards S T STM310B EVAL IAR OS Probe To view this example project start an instance of IAR EW and open the workspace file S7M3210B EVAL OS Probe eww To do this select the Open menu command under the File menu select the Workspace submenu command and select the workspace file after navigating to the project directory The project tree shown in Figure 2 7 should appear In addition the workspace should be openable by double clicking on the file itself in a Windows explorer window The basically identical STM3210E EVAL IAR project file named S7M3210
21. Waiting On Switches CPU Usage OSProbe_TaskCPUUsage OSProbe_TaskCPUUsage 70 OSProbe_TaskCPUUsage 80 60 7 OSProbe_TaskCPUUsage OSProbe_TaskCPUUsage OSProbe_TaskCPUUsage OSProbe_TaskCPUUsage 30 OSProbe_TaskCPUUsage 50 40 20 OSProbe_TaskCPUUsage 8 OSProbe_TaskCPUUsage 9 10 0 213 symbols sec ai 188 symbols sec Figure 6 3 uy C Probe Run Time ui C OS II Task Information 35 Micripm uC OS IIl and uC Probe for the STMicroelectronics STM32 CPU Licensing uC OS II is provided in source form for FREE evaluation for educational use or for peaceful research If you plan on using u C OS II in a commercial product you need to contact Micrium to properly license its use in your product We provide ALL the source code with this application note for your convenience and to help you experience uu C OS II The fact that the source is provided does NOT mean that you can use it without paying a licensing fee Please help us continue to provide the Embedded community with the finest software available Your honesty is greatly appreciated References p C OS II The Real Time Kernel 2nd Edition Jean J Labrosse R amp D Technical Books 2002 ISBN 1 57820 103 9 Embedded Systems Building Blocks Jean J Labrosse R amp D Technical Books 2000 ISBN 0 87930 604 1 Contacts IAR Systems Century Plaza 1065 E Hillsdale Blvd Foster City CA 94404 USA
22. an be between 1 and 16 for the STM32 SK If an argument of O is provided the appropriate action will be performed on all LEDs e BSP PB GetStatus takes as its argument the ID on the STM32 SK 1 to 3 of a push button and returns DEF TRUE if the push button is being pressed and DEF FALSE if the push button is not being pressed Micripm uC OS IIl and uC Probe for the STMicroelectronics STM32 CPU BSP LCD LightToggle BSP LCD LightOn and BSP LCD LightOff will toggle turn on and turn off respectively the LCD backlight BSP ADC GetStatus takes as its argument the ID on the STM32 SK 1 of a analog input and returns the current conversion value On the STM32 SK an ID of 1 corresponds to the potentiometer output For the ST ST3210B EVAL STM3210E EVAL six functions provide access to the user interface components BSP LED Toggle BSP LED On and BSP LED Off will toggle turn on and turn off respectively the LED corresponding to the ID passed as the argument which can be between 1 and 4 for the ST3210B EVAL If an argument of 0 is provided the appropriate action will be performed on all LEDs BSP PB GetStatus takes as its argument the ID on the ST3210B EVAL STM3210E EVAL 1 of a push button and returns DEF TRUE if the push button is being pressed and DEF FALSE if the push button is not being pressed BSP ADC GetStatus takes as its argument the ID on the ST3210B
23. craigor RDI Third Party Driver Target Output Library Configuration Library options MISRA c Processor variant C Core CotexM3 wd Device ST STM32F10x D Endian mode Stack align Little 4 bytes Big C 8 bytes Cancel Options for node STM32 SK OS Probe LCD Category General Options C C Compiler Assembler Custom Build Build Actions Linker Simulator Angel IAR ROM monitor J Link J Trace LMIFTDI Macraigor RDI Third Party Driver Factory Settings Setup Download Extra Options Plugins Select plugins to load pC OS l pC OS I Code Coverage ORTI RTOS Profiling Stack Description uC 05 II Kernel Awareness Location C Program Files IAR Systems E mbedded Workbench 4 05 Originator Micrium Version Figure 2 5 Enabling the C OS II Kernel Awareness Plug In When the code is reloaded onto the evaluation board the uC OS II menu should appear Options are included to display lists of kernel objects such as semaphores queues and mailboxes including for each entry the state of the object Additionally a list of the current tasks may be displayed including for each task pertinent information such as used stack space task status and task priority in addition to showing the actively executing task An example task list for this project is shown in Figure 2 6 14 Micripm uC OS IIl and uC Probe for the STMicroelectronics STM32 CP
24. d that uC OS 1 delivers on all your expectations and you will be pleased by its ease of use Licensing uC OS II is provided in source form for FREE evaluation for educational use or for peaceful research If you plan on using u C OS II in a commercial product you need to contact Micrium to properly license its use in your product We provide ALL the source code with this application note for your convenience and to help you experience uC OS II The fact that the source is provided DOES NOT mean that you can use it without paying a licensing fee Please help us continue to provide the Embedded community with the finest software available Your honesty is greatly appreciated Micripm uC OS IIl and uC Probe for the STMicroelectronics STM32 CPU Manual Version If you find any errors in this document please inform us and we will make the appropriate corrections for future releases V 1 01 2008 08 15 Updated V 1 00 2007 07 02 BAN Initial version Software Versions This document may or may not have been downloaded as part of an executable file Micrium ST uCOS II LCD STM32 exe containing the code and projects described here If so then the versions of the Micrium software modules in the table below would be included In either case the software port described in this document uses the module versions in the table below Module Version Commen scios n vae S uciProbe vo SOS Micripm
25. e the connections described in Section 2 01 are made between your PC and the IAR STM32 SK evaluation board the code can be built and loaded onto the board To build the code select the Rebuild All menu item from the Project menu To load the code through a JTAG debugger onto the connected evaluation board select the Debug menu item from the Project menu 12 Micripm uC OS IIl and uC Probe for the STMicroelectronics STM32 CPU 2 03 02 pu C OS II Kernel Awareness When running the IAR C Spy debugger the u C OS II Kernel Awareness Plug In can be used to provide useful information about the status of uC OS II objects and tasks If the uC OS II Kernel Awareness Plug In is currently enabled then a uC OS Il menu should be displayed while debugging Otherwise the plug in can be enabled Stop the debugger if it is currently active and select the Options menu item from the Project menu Select the Debugger entry in the list box and then select the Plugins tab pane Find the u C OS II entry in the list and select the check box beside the entry as shown in Figure 2 5 Ce E x Files Files on Ra E lst 32 sk os Probe LcD Flash v Ha Cuc os 11 Ha Garp Harot HOO General Bes cpu h B arr c Bios epu a asm Bapp_etg n Bes eru c c Bapp vect c UB os_dbg c B ineiuses n Le Source Bos_etg n I Bos core c L_ Ea probe com cfg h s
26. ectory select the file and choose OK Configure the RS 232 Options In uC Probe choose the Options menu item on the Tools menu A dialog box as shown in Figure 6 2 left should appear Choose the RS 232 radio button Next select the RS 232 item in the options tree and choose the appropriate COM port and baud rate The baud rate for the projects accompanying this appnote is 115200 gt Start Running You should now be ready to run pC Probe Just press the run button to see the variables in the open data screens update Figure 6 3 displays two screens in the uC OS II workspace which display detailed information about each task s state 34 Micripm uC OS Il and uC Probe for the STMicroelectronics STM32 CPU Options x Options i Settings O ik J Link COM Port Settings RS 232 Baud Rate Slow Update Rate Figure 6 2 uC Probe Options Micripm pC Probe OS Probe Workspace DE x Micripm pC Probe OS Probe Workspace wsp About OS Tasks OS CPU Usage About OS Tasks 05 CPU Usage Task Names amp Functions T Task Stack Information The tasks managed by pC OS II are listed on the right The first column contains the index at which that task s TCB is stored in OSTCBTbI The second column contains the task name Task Information CPU Usage f General Task Information 100 em Trl an o 930 State Del
27. h between 0x08000000 and OxO801FFFF 5 02 BSP bsp c and bsp h The file bsp c implements several global functions each providing some important service be that the initialization of processor functions for uC OS II to operate or the toggling of an LED Several local functions are defined as well to perform some atomic duty initializing the I O for the LED or initialize the uC OS II tick timer The discussion of the BSP will be limited to the discussion of the global functions that might be called from user code and may be called from the example application The global functions defined in bsp c and prototyped in bsp h may be roughly divided into two categories critical processor initialization and user interface services Two functions constitute the former e BSP Init is called by the application code to initialize critical processor features particularly the uC OS II tick interrupt after multitasking has started i e OS Start has been called This function should be called before any other BSP functions are used See Listing 5 1 for more details e BSP IntDisAll is called to disable all interrupts thereby preventing any interrupts until the processor is ready to handle them For the IAR STM32 SK eight functions provide access to the user interface components e BSP LED Toggle BSP LED On and BSP LED Off will toggle turn on and turn off respectively the LED corresponding to the ID passed as the argument which c
28. her use of these software modules Being but a basic demonstration of software and hardware functionality this code will make evident the power and convenience of u C OS II The Real Time Kernel used on the STMicroelectronics STM32 processor without the clutter or confusion of a more complex example 4 01 app c Five functions of interest are located in app c 1 main is the entry point for the application as it is with most C programs This function initializes the operating system creates the primary application task AppTaskStart begins multitasking and exits 2 AppTaskStart after creating the user interface tasks enters an infinite loop in which it blinks the LED on the board based on the state of the push buttons 3 AppTaskUserIF writes information to the LCD 4 AppTaskKbd monitors the current state of the push button When the push button is pressed this task will post a message to AppTaskUserIF which will advance the LCD to the next Screen Micripm uC OS Il and uC Probe for the STMicroelectronics STM32 CPU int main void Note 1 CEUMUN TOS Umea Stat BSP IntDisAll Note 2 OSInit Note 3 OSTaskCreateExt void void App TaskStart Note 4 void se E OS STK amp App TaskStartStk APP TASK START STK SIZE 1 INT8U EAEE RTAS SUVARI JEIRSILC INT16U APP TASK START PRIO OS STK amp App TaskStartStk 0 INT32U APP TASK START STR
29. ibrary Configuration Library options MISRA C Assembler Custom Build Build Actions Linker Debugger Simulator Angel IAR ROM monitor J Link J Trace LMI FTDI Macraigor RDI Processor mo r Endian mode Stack align Third Party Driver Little 4bytes Is Big C 8 bytes Processor variant Cancel Figure 2 8 Project Options General Options Options for node STM3210B EVAL OS Probe Category Factory Settings General Options C C Compiler Setup Download Extra Options Plugins Assembler Custom Build Select plugins to load Build Actions pC OS l Linker pC OS I Debugger Code Coverage Simulator DRTI RTOS Angel Profiling IAR ROM monitor Stack J Link J Trace LMIFTDI Description yu C 08 lI Kernel Awareness Macraigor RDI Third Party Driver Location C Program Files I4R Systems Embedded Workbench 4 0N Originator Micripm Version 21 0 0 Figure 2 9 Enabling the j C OS II Kernel Awareness Plug In When the code is reloaded onto the evaluation board the uC OS II menu should appear Options are included to display lists of kernel objects such as semaphores queues and mailboxes including for each entry the state of the object Additionally a list of the current tasks may be displayed including for each 17 Micripm uC OS Il and uC Probe for the STMicroelectronics STM32 CPU task pertinent information such as used stack space task status and task prior
30. ies Each has two RS 232 ports one CAN port one USB device port an SD card slot which on the STM3210B EVAL STM3210E EVAL is a micro SD card slot and a 20 pin JTAG for debugging and loading the processor The IAR STM32 SK has three user push buttons one potentiometer up to 16 LEDs depending on other hardware usage and a 2 x16 character LCD The ST STM3210B EVAL STM3210E EVAL has two user push buttons one potentiometer four LEDs and a 240 x 320 pixel LCD Petit ELLO HHH InR COn F a P E SIAR Y i ret Ad SYSTEMS STM32 SK t gt USB Device 9V DC Power Potentiometer Figure 1 1 IAR STM32 SK Evaluation Board STMicroelectronics provides a driver library for its STM32 processors as it does for its ARM7 and ARM9 offerings Each processor peripheral is represented by a family of functions intended to quickly acquaint the new user with the basic capability and basic functional details of that peripheral Though the libraries may be adequate only as a reference when more complex requirements are faced the example Micripm uC OS IIl and uC Probe for the STMicroelectronics STM32 CPU application detailed in this application note accomplishes much of its peripheral access through the driver library Micro SD Card a ST M25 Serial NOR Flash UART4 for uC Probe 5V DC Power Figure 1 2 ST STM3210B EVAL Evaluation Board If this appnote was downloaded in a packaged executable zip file then it should
31. ity in addition to showing the actively executing task An example task list for this project is shown in Figure 2 10 Task List Le et arto stece pos Vetting on nou cus sul sre pee mere ours tex cur size acerco 8 Enss 6 Start Task Keyboard User I F 20000390 20000404 20000004 20000B8C z0000c04 20000804 20000740 20000804 20000404 20000F94 20001004 20000C04 Probe R5 232 20002ED0 2000zF48 20002548 20002938 200029CO0 200025C0 20002434 200024680 20002250 20001B58 20001BC4 200019C4 20001D80 20001DC4 20001504 Probe Str Probe RS 232 uC Probe 05 uC 0S II Tur uC O0S II Stat uC 0S II Idle Q HF t9 Ci CO CO J CO Figure 2 10 y C OS II Task List for S7M3210B EVAL OS Probe ewp 18 Micripm uC OS IIl and uC Probe for the STMicroelectronics STM32 CPU 2 05 Example Applications Both the STM32 SK and STM3210B EVAL example applications contain application tasks which respond to the push buttons update the LED and toggle the LEDs In addition either can be used with the Micrium s real time monitor uC Probe as covered in Section 6 2 05 01 STM32 SK Application Information When the example application is started a summary of the current uC OS II state is displayed on the LCD screen as shown in Figure 2 11 Successive presses of PB1 will progress the LCD through a series of screens shown in Figures 2 12 through 2 14 If the push button is pressed after Screen 4 shown in Figure
32. l Application Information The project is configured so that code is loaded into Flash and the stacks and data are loaded into RAM as shown in Table 2 1 The tasks that run in the example application are listed in Table 2 2 Memory Range Sze segmen EX Code in Flash Z0KB Stacks and data n RAW Table 2 1 Memory Setup Task Name Priority Funcion AppTaskStart cur M Initializes C TCP IP toggles LEDs AppTaskKbd 4 Reads status of push buttons and joystick passing Keyboard new input to AppTaskUserIF AppTaskUserIF User I F Updates the LCD FuciProbe OS 8 UpdwesCPUussgeforuCiProbe Table 2 2 Example Application Tasks 20 Micripm uC OS Il and uC Probe for the STMicroelectronics STM32 CPU Pots AIN15 GPIOC 5 Pot GPIOC 0 4 6 9 12 GPIOC 13 LCD PB1 GPIOB 5 LIBET us 4 TM UART2 uC Probe GPIOA 4 7 9 10 GPIOB 6 7 10 15 Leos Jeo GPIOC 6 7 PB2 Figure 2 17 Example Application Hardware Use STM32 SK GPIOD 8 12 14 GPIOB 2 GPIOD 7 15 GPIOE 0 1 Joystick oe Ln SPI2 GPIOB 12 15 o key r GPIOB 9 STM32 UART1 GPIOC 6 9 HC Probe tens PES Figure 2 18 Example Application Hardware Use STM3210B EVAL GPIOD 3 GPIOB 2 GPIOD 7 15 GPIOE 7 13 14 15 Joystick SPI2 GPIOB 12 15 LCD GPIOG 8 UART1 GPIOF 6 9 y C Probe se Jere
33. l Awareness 13 2 04 STM3210B EVAL STM3210E EVAL IAR Project 15 2 04 01 Project Options 15 2 04 02 pu C OS I Kernel Awareness 15 2 05 Example Applications 19 2 05 01 STM32 SK Application Information 19 2 05 01 STM3210B EVAL STM3210E EVAL Application Information 19 2 05 03 Additional Application Information 20 3 Directories and Files 22 4 Application Code 26 4 01 app c 26 4 02 app_vect c Or vector s 29 4 03 os_cfg h 29 5 Board Support Package BSP 30 5 01 IAR Specific BSP Files 30 5 02 BSP bsp c and bsp h 30 5 03 Processor Initialization Function 32 6 uC Probe 33 Licensing 36 References 36 Contacts 36 Micripm uC OS IIl and uC Probe for the STMicroelectronics STM32 CPU 1 Introduction This document AN 1320 explains example code for using pC OS II and wC Probe with the STMicroelectronics STM32 Cortex M3 processor on three different evaluation boards The first is ST s STM3210B EVAL evaluation board shown in Figure 1 2 the second is IAR s STM32 SK evaluation board shown in Figure 1 1 the third is ST s STM3210E EVAL evaluation board shown in Figure 1 3 The STM32 tested on these evaluation boards included a 128 kB flash and 20 kB SRAM and could operate at clock speeds as high as 72 MHz Peripherals for several communications busses are provided including UARTS IC SPI CAN and USB Two twelve channel ADCs 3 general purpose timers and up to 80 GPIOs round out the features on the chip All boards provide similar capabilit
34. n bsp c if you change this value You would typically set the tick rate betweek 10 and 1000 Hz The higher the tick rate the more overhead u C OS II will impose on the application However you will have better tick granularity with a higher tick rate Micripm uC OS IIl and uC Probe for the STMicroelectronics STM32 CPU 5 Board Support Package BSP The Board Support Package BSP provides functions to encapsulate common I O access functions and make porting your application code easier Essentially these files are the interface between the application and the STM32 or its evaluation board Though one file bsp c contains some functions which are intended to be called directly by the user all of which are prototyped in bsp h the other files serve the compiler as with STM32_Flash xcl 5 01 IAR Specific BSP Files The BSP includes one file intended specifically for use with IAR tools S7M32_Flash xcl This serves to define the memory map of the processor If the example application is to be used with other toolchains the services provided by this file must be replicated as appropriate Before the processor memories can be programmed the compiler must know where code and data should be placed IAR requires a linker command file such as STM32 Flash xcl that provides directives to accomplish this All data stack and heap segments are placed in the 20 kB internal RAM between 0x20000000 and 0x20004FFF Code is loaded into the 128 kB Flas
35. ne of the example workspaces that accompanies this appnote which are located in the project directories Connect Target to PC Currently uC Probe can use RS 232 to retrieve information from the target You should connect a RS 232 cable between your target and computer Load Your ELF File The example projects included with this application note are already configured to output an ELF file If you are using your own project please refer to Appendix A of the uC Probe user manual for directions for generating an ELF file with your compiler For IAR EWARM this ELF file should be in Project Directory gt lt Configuration Name gt exe where lt Project Directory gt is the directory in which the IAR EWARM project is located extension ewp and Configuration Name is the name of the configuration in that project which was built to generate the ELF file and which will be loaded onto the target The ELF file will be named Project Name gt elf unless you specify otherwise In Keil uVision3 the ELF file will either be in the same directory as the UV2 project file or in a rvmdk subdirectory and will have a axf extension the name will be the name configured in the Output tab of the target options dialog For the workspaces accompanying this appnote the name of the output is the same as the name of the workspace file To load this ELF file right click on the symbol browser and choose Add Symbols Navigate to the file dir
36. rd party certification purposes The files Jib str c and lib str h contain code to replace the standard library functions str with their equivalent Str functions Again this is to simplify third party certification for avionics and medical use Micrium Software uC LIB Doc This directory contains the documentation for uC LIB 23 Micripm uC OS Il and uC Probe for the STMicroelectronics STM32 CPU Application Code Micrium Software EvalBoards ST S TM32 SK IAR OS Probe LCD This directory contains the source code for the example application for the IAR STM32 SK evaluation board with IAR EWARM project files app c contains the test code for the example application including calls to the functions that start multitasking within uC OS II register tasks with the kernel and update the user interface the LEDs and the LCD app cfg h is a configuration file specifying stack sizes and priorities for all user tasks and defines for important global application constants app vect v5 c defines the ARM Cortex M3 exception vector table for the application code This vector table would be different for each application based on the interrupt service routines needed in that application includes h is the master include file used by the application os cfg h is the uC OS II configuration file probe com cfg h is the uC Probe target communications module configuration file STM32 SK OS Probe L CD v5 are the IAR Embedded Workbench v5 11
37. rmation will appear as a OSRdyTbl about this workspace or stop button a OSRdyTblSize about piC Probe refer to Callback Counter A counter is kept in p OSRunning the pC Probe user manual C Rc cs Ed uc ibas OSSemEn isi plug in callback blue square OSStatRdy ye 00031976 which is displayed DSStkWidth BI with this gauge OSTaskCreateEn www micrium com OSTaskCreateExtEn OSTaskCtr OSTaskDelEn OSTaskldleStk OSTaskldeeSt ize RS 232 115200 COM1 x Disconnected Data Screen Components are placed onto the data screen and assigned symbols during Design View During Run Time View these components are updated with values of those symbols from the target Symbol Browser Contains all symbols from the ELF files added to the workspace Figure 6 1 yC Probe Windows Program 33 Micripm uC OS Il and uC Probe for the STMicroelectronics STM32 CPU To use u C Probe with the example project or your application do the following 1 Download and Install jyC Probe A trial version of uC Probe can be downloaded from the Micrium website at http www micrium com products probe probe html 2 Open uC Probe After downloading and installing this program open the example uC Probe workspace for pC OS II named OS Probe Workspace wsp which should be located in your installation directory at Program Files Micrium uC Probe Target Plugins uCOS II Workspace You can also open o
38. rt for the RS 232 communications Micrium Software uC Probe Communication Generic Source RS 232 O0S uCOS H This directory contains probe rs232 os c which is the u C OS II port for the uC Probe RS 232 communication module u C CPU Files Micrium Software uC CPU This directory contains cpu_def h which declares define constants for CPU alignment endianness and other generic CPU properties Micrium Software uC CPU ARM Cortex M3 IAR Micrium Software uC CPU ARM Cortex M3 RealView This directory contains cpu h and cpu a s cpu h defines the Micrium portable data types for 8 16 and 32 bit signed and unsigned integers such as CPU INT16U a 16 bit unsigned integer These allow code to be independent of processor and compiler word size definitions cpu a s contains generic assembly code for ARM Cortex M3 processors which is used to enable and disable interrupts within the operating system This code is called from C with CPU CRITICAL ENTER and CPU CRITICAL EXIT pu C LIB Files Micrium Software uC LIB This directory contains lib_def h which provides defines for useful constants like DEF TRUE and DEF DISABLED and macros The files lib_mem c and lib_mem h contain code to replace the standard library functions memclr memset memcpy and memcmp These functions are replaced by Mem Clr Mem Set Mem Copy and Mem Cmp respectively The reason we declared our own functions is for thi
39. s the highest priority task created both OS TaskStat and OS TaskIdle having lower priorities 27 Micripm uC OS IIl and uC Probe for the STMicroelectronics STM32 CPU Static void AppTaskStart void p arg CEU INT32U i CPU INT32U jj void p arg ISI iiwbE E Note 1 OSNCEUNSVSII Cms i IENS Ee t2 if OS_TASK_STAT_EN gt 0 OSStatInit Note 3 fendif if APP PROBE COM EN DEF ENABLED Note 4 APP OS PROBE EN DEF ENABLED Nie dosubiEJeseteloxe 01 5 endif AppEventCreate Note 5 AppTaskCreate while DEF TRUE IENOtCORORS Toggle LEDs Listing 4 2 AppTaskStart Listing 4 2 Note 1 BSP Init initializes the Board Support Package the I Os tick interrupt etc See Section 5 for details Listing 4 2 Note 2 OS_CPU_SysTickInit initializes Cortex M3 SysTick timer which generates the u C OS II time tick Listing 4 2 Note 3 OSStatInit initializes uC OS Il s statistic task This only occurs if you enable the statistic task by setting OS TASK STAT EN to 1inos cfg h The statistic task measures overall CPU usage expressed as a percentage and performs stack checking for all the tasks that have been created with OSTaskCreateExt with the stack checking option set Listing 4 2 Note 4 App InitProbe initializes the pC Probe plug in for uyC OS II which maintains CPU usage statistics for each task and the uC Probe generic communica
40. tion module including the RS 232 communication module After these have been initialized the uC Probe Windows program will be able to download data from the processor For more information see Section 6 Listing 4 2 Note 5 The even used in the application is created a mailbox that provides the communication between the two application tasks App TaskKbd and App TaskUserIF When the push button is pressed App TaskKbd will send a message using App UserIFMbox to App TaskUserIF containing the new state of the display The two application tasks are then created Listing 4 2 Note 6 Any task managed by u C OS II must either enter an infinite loop waiting for some event to occur or terminate itself This task enters an infinite loop in which an LED is toggled if one of the push buttons is pressed 28 Micripm uC OS Il and uC Probe for the STMicroelectronics STM32 CPU 4 02 app vect c Or vector s Either app vect c on IAR EWARM or vector s on Keil uVision RVMDK contains the exception vector table for the ARM Cortex M3 We only filled in the first 64 entries because the STM32 only provides up to this many vectors However this table can contain up to 256 elements pointers app vect c or vector s is part of the application code and not the BSP because the vector table can change based on how many interrupts the application has and the use of those interrupts 4 03 os cfg h The file os cfg h is used to configure uC O
41. ussed in Section 6 After programming your target with one of the included example projects connect a RS 232 cable between your PC and the evaluation board configure the RS 232 options also covered in Section 6 and start running the program The open data screens should update as shown in Figure 1 2 The STM32 SK example application is configured to use UART2 via the RS 232 port labeled RS232 2 The STM3210B EVAL STM3210E EVAL example applications are configured to use UART1 Both are configured to operate at 115200 baud 2 02 Directory Tree If this file were downloaded as part of an executable zip file which should have been named Micrium ST uCOS II LCD STM32 exe then the code files referred to herein are located in the directory structure shown in Figure 2 2 10 Micripm uC OS IIl and uC Probe for the STMicroelectronics STM32 CPU i Micrium Licensing agreements E C AppNotes AN 1015 If uC OS II is used B O AMixxx RTOS f commercially O AN1018 uCOS II Cortex M3 Contact C3 Licensing www Micrium com T E B Software for pricing B Q3 cru B CST c srM32 STM32 SK amp EvalBoards IAR Example Project m esr S STM32 SK a C3 IAR STM3210B EVAL B esp IAR Example Project O OS Probe LCD C3 STM3210B EVAL C3 Ian STM3210E EVAL Bsp IAR Example Project O 05 Probe 2 C3 STM3210E EVAL C3 IAR D BsP O OS Probe uC LCD C3 uc cPu LCD Driver C3 ARM Cortex M3

Download Pdf Manuals

image

Related Search

Related Contents

Handbuch A4 - Siemens Schweiz AG  SIG-SVT Mode d`emploi  Wir danken Ihnen für den Kauf dieser Wetterstation. Entwickelt und  Multipette® M4  Dynamix VC2-MS User`s Manual  コチラ    CitanFurgón y Mixta - Galería de catálogos Mercedes-Benz  PRIMA DNT Trainer User Manual  1-3013-IT_Segmentverteiler PSG2.indd  

Copyright © All rights reserved.
Failed to retrieve file