IAR PowerPac RTOS for Texas Instruments MSP430 Microcontroller Family

Size: px
Start display at page:

Download "IAR PowerPac RTOS for Texas Instruments MSP430 Microcontroller Family"

Transcription

1 IAR PowerPac RTOS for Texas Instruments MSP430 Microcontroller Family CPU and compiler specifics

2 COPYRIGHT NOTICE Copyright 2008 IAR Systems. All rights reserved. No part of this document may be reproduced without the prior written consent of IAR Systems. The software described in this document is furnished under a license and may only be used or copied in accordance with the terms of such a license. DISCLAIMER The information in this document is subject to change without notice and does not represent a commitment on any part of IAR Systems. While the information contained herein is assumed to be accurate, IAR Systems assumes no responsibility for any errors or omissions. In no event shall IAR Systems, its employees, its contractors, or the authors of this document be liable for special, direct, indirect, or consequential damage, losses, costs, charges, claims, demands, claim for lost profits, fees, or expenses of any nature or kind. TRADEMARKS IAR Systems, IAR Embedded Workbench, C-SPY, visualstate, From Idea To Target, IAR KickStart Kit, IAR PowerPac, IAR YellowSuite, IAR Advanced Development Kit, IAR, and the IAR Systems logotype are trademarks or registered trademarks owned by IAR Systems AB. J-Link is a trademark licensed to IAR Systems AB. Microsoft and Windows are registered trademarks of Microsoft Corporation. All other product names are trademarks or registered trademarks of their respective owners. EDITION NOTICE First edition: June 2008 Part number: Internal reference: ISUD.

3 Contents Preface... 5 Using IAR PowerPac RTOS with IAR Embedded Workbench... 7 First steps... 7 The example application Start_LEDBlink.c... 8 Stepping through the example application using C-SPY... 9 Building an application Required files for an application Change library mode Select another CPU MSP430 specifics Data / Memory models, compiler options Available libraries Low-Power Modes Compiler specifics Standard system libraries Stacks Task stack for MSP System stack for MSP Interrupt stack for MSP Stack specifics of the MSP430 family Stack specifics of the MSP430X family MSP430 clock specifics Introduction IAR PowerPac RTOS timer clock source Interrupts What happens if an interrupt occurs Defining interrupt handlers in C Interrupt-stack Technical data Memory requirements...29 Files shipped with IAR PowerPac RTOS Index

4 4 IAR PowerPac RTOS for Texas Instruments MSP430 Microcontroller Family

5 Preface Welcome to IAR PowerPac RTOS for Texas Instruments MSP430 Microcontroller Family. This guide describes how to use IAR PowerPac RTOS for the MSP430 Microcontroller Family and IAR Embedded Workbench. Who should read this guide You should read this guide if you plan to develop an embedded system using IAR PowerPac RTOS and need to get information about the CPU and compiler specifics using. How to use this guide This guide describes all CPU and compiler specifics of IAR PowerPac RTOS using ARM-based controllers. Before actually using IAR PowerPac RTOS, you should read or at least glance through this guide to become familiar with the software. The chapter Using IAR PowerPac RTOS with IAR Embedded Workbench gives you a step-by-step introduction, how to use IAR PowerPac RTOS for MSP430. If you have no experience using IAR PowerPac RTOS, you should follow this introduction, because it is an easy way to learn how to use IAR PowerPac RTOS in your application. Most of the other chapters in this guide are intended to provide you with important detailed information about functionality and fine-tuning of IAR PowerPac RTOS for the MSP430-based controllers. Document conventions TYPOGRAPHIC CONVENTIONS FOR SYNTAX This guide uses the following typographic conventions: Style Keyword Parameter Sample Reference GUIElement Emphasis Description Table 1: Typographic conventions Text that you enter at the command-prompt or that appears on the display (that is system functions, file- or pathnames). Parameters in API functions. Sample code in program examples. Reference to chapters, tables and figures or other documents. Buttons, dialog boxes, menu names, menu commands. Very important sections 5

6 6 IAR PowerPac RTOS for Texas Instruments MSP430 Microcontroller Family

7 Using IAR PowerPac RTOS with IAR Embedded Workbench This chapter describes how to start with and use IAR PowerPac RTOS for Texas Instruments MSP430 and IAR Embedded Workbench. You should follow these steps to become familiar with IAR PowerPac RTOS for Texas Instruments MSP430 and IAR Embedded Workbench. First steps After you installed IAR PowerPac RTOS you can create your first multitasking application. You received ready to use example workspaces and projects and it is recommended to use one of these as a starting point for all your applications. Your IAR PowerPac RTOS distribution contains a BoardSupport folder which contains the example workspaces and projects and every additional files used for building your application. To get your new application running, follow these steps: 1 Create a working directory for your application, for example c:\work. 2 In the IAR Embedded Workbench IDE, choose Help Startup Screen. Select Example Application in the Startup dialog box. 3 Select RTOS from the Example Application list. 4 Select the project which is consistent to your hardware, or start with the IAR Simulator project. 5 Choose a destination folder for your project, for example C:\Work. After generating the project of your choice, the screen should look something like this: 7

8 6 Build the project; it should be built without any error or warning messages. The example application Start_LEDBlink.c The following is a printout of the example application Start_LEDBlink.c. It is a good starting point for your application. Note that the file included in your IAR PowerPac RTOS installation might look slightly different from this one. What happens is easy to see: After initialization of IAR PowerPac RTOS; two tasks are created and started. The two tasks are activated and they execute until they run into the delay. They are then suspended for the specified time and then they continue to execute. #include "RTOS.h" #include "BSP.h" OS_STACKPTR int StackHP[128], StackLP[128]; /* Task stacks */ OS_TASK TCBHP, TCBLP; /* Task-control-blocks */ static void HPTask(void) { while (1) { BSP_ToggleLED(0); OS_Delay (50); } } static void LPTask(void) { while (1) { BSP_ToggleLED(1); OS_Delay (200); } } /********************************************************************* * * main * *********************************************************************/ int main(void) { OS_IncDI(); /* Initially disable interrupts */ OS_InitKern(); /* initialize OS */ OS_InitHW(); /* initialize Hardware for OS */ BSP_Init(); /* initialize LED ports */ /* You need to create at least one task before calling OS_Start() */ OS_CREATETASK(&TCBHP, "HP Task", HPTask, 100, StackHP); OS_CREATETASK(&TCBLP, "LP Task", LPTask, 50, StackLP); OS_Start(); /* Start multitasking */ return 0; } 8 IAR PowerPac RTOS for Texas Instruments MSP430 Microcontroller Family

9 Using IAR PowerPac RTOS with IAR Embedded Workbench Stepping through the example application using C-SPY When you start the debugger, you will see the main function (see example screenshot below). The main function appears as long as the C-SPY option Run to main is selected, which it is by default. 1 Now you can step through the program. OS_IncDI() initially disables interrupts. OS_InitKern() is part of the IAR PowerPac RTOS library and it is written in assembler; you can therefore only step into it in disassembly mode. The function initializes the relevant OS variables. Because of the previous call of OS_IncDI(), interrupts are not enabled during execution of OS_InitKern(). OS_InitHW() is part of RTOSInit_*.c and therefore part of your application. Its primary purpose is to initialize the hardware required to generate the timer-tick-interrupt for IAR PowerPac RTOS. Step through it to see what is done. OS_Start() is the last line in main, because it starts the multitasking and does not return. 2 Before you step into OS_Start(), you should set two breakpoints in the two tasks as shown below. As OS_Start() is part of the IAR PowerPac RTOS library, you can step through it in disassembly mode only. 9

10 3 Click GO, step over OS_Start(), or step into OS_Start() in disassembly mode until you reach the highest priority task. 4 If you continue stepping, the program execution will reach the task that has the lower priority: 5 Continue to step through the program, there is no other task ready for execution. IAR PowerPac RTOS will therefore start the idle-loop, which is an endless loop that is always executed if there is nothing else to do (no task is ready, no interrupt routine or timer is executing). 10 IAR PowerPac RTOS for Texas Instruments MSP430 Microcontroller Family

11 Using IAR PowerPac RTOS with IAR Embedded Workbench 6 The function OS_Idle() is part of RTOSInit*.c. Step into the OS_Delay() function to reach the idle-loop. You can also set a breakpoint there before you step over the delay in LPTask. If you set a breakpoint in one or both of your tasks, you will see that they continue execution after the given delay. 7 As can be seen by the value of the timer variable OS_Time, displayed in the Watch window, HPTask continues operation the 10-ms delay has expired. 11

12 12 IAR PowerPac RTOS for Texas Instruments MSP430 Microcontroller Family

13 Building an application This chapter explains how to set up up your own IAR PowerPac RTOS project. To build your own application, you should always start with one of the supplied example workspaces and projects. Therefore, select an IAR PowerPac RTOS workspace as described in First steps on page 7 and modify the project to fit your needs. Using a sample project as a starting point has the advantage that all necessary files are included and all settings for the project are already done. Required files for an application To build an application using IAR PowerPac RTOS, the following files from your IAR PowerPac RTOS distribution are required and have to be included in your project: RTOS.h available in the subfolder RTOS\Inc\. This header file declares all API functions and data types and has to be included in any source file using IAR PowerPac RTOS functions. RTOSInit_*.c available in the subfolder BoardSupport\[DeviceName]\Setup. The file contains hardware-dependent initialization code for the IAR PowerPac RTOS timer. One IAR PowerPac RTOS library from the subfolder RTOS\Lib\. OS_Error.c from subfolder BoardSupport\[DeviceName]\Setup\. The error handler is used if any library other than the Release build library is used in your project. Additional low-level initialization code might be required by the CPU. When you decide to write your own startup code or use a low_level_init function, ensure that non-initialized variables are initialized with zero, according to the C standard. This is required for some IAR PowerPac RTOS internal variables. Also ensure, that main() is called with the CPU running in thread mode using the main stack. Your main() function has to initialize IAR PowerPac RTOS by calling OS_InitKern() and OS_InitHW() prior to any other IAR PowerPac RTOS functions are called. You should then modify or replace the Start_2Task.c source file in the subfolder BoardSupport\[DeviceName]\Application\. Change library mode For your application you might want to choose another library. For debugging and program development you should use a debug library. For your final application you might want to use a release library or a stack check library. Therefore, you have to select or replace the IAR PowerPac RTOS library in your project: If your selected library is already available in your project, just select the appropriate configuration. To add a library, you can add a new Lib group to your project and add this library to the new group. Exclude all other library groups from the build. Delete unused Lib groups or remove them from the configuration. Check and set the appropriate OS_LIBMODE_* symbol as preprocessor option in the Preprocessor option dialog box. Define OS_LIBMODE_D for a debug library, OS_LIBMODE_R for a release library, OS_LIBMODE_XR for an extreme release library, OS_LIBMODE_S for a stack check library. Select another CPU IAR PowerPac RTOS for MSP430 contains CPU-specific code for various MSP430 cores. The folder BoardSupport contains workspaces for different target CPUs and specific evaluation boards. 13

14 Check whether your CPU is supported by IAR PowerPac RTOS. CPU-specific functions are located in the Setup subfolder in each board support project folder. To select a CPU which is already supported, just select the appropriate project from the Example application list in the Embedded Workbench Startup dialog box. If your CPU is currently not supported, examine all RTOSInit files in the CPU-specific subfolders and select one which almost fits your CPU. You might have to modify OS_InitHW() and the interrupt service routines for IAR PowerPac RTOS timer tick. 14 IAR PowerPac RTOS for Texas Instruments MSP430 Microcontroller Family

15 MSP430 specifics Data / Memory models, compiler options IAR PowerPac RTOS for MSP430 is delivered with libraries for the most common data models and other optional settings used by the ARM Embedded Workbench IDE. For MSP430 devices, the IAR compiler offers one data model: Data Model Default memory attribute Data placement Small data16 0-0xFFFF Table 2: MSP430 data model For MSP430X devices, the IAR compiler offers three data models: Data Model Default memory attribute Data placement Small data16 0-0xFFFF Medium data16, data20 possible 0-0xFFFF Large data20 0-0xFFFFF Table 3: MSP430 data models With IAR PowerPac RTOS these limitations exist: The medium data model for MSP430X is not supported. The options that control R4 and R5 utilization must be set to Normal use. Available libraries IAR PowerPac RTOS for Texas Instruments MSP430 is shipped with different libraries, one for each code model/ library mode combination. The libraries are named as follows: os<architecture><datamodel><sizeofdouble><libmode>.r43 Parameter Description Values Architecture Specifies the CPU variant. 430: MSP x: MSP430x extended addr. DataModel Selected data model, only for s: Small data model MSP430x CPUs l: Large data model SizeOfDouble Floating point precision. f: 32-bit floating point d: 64-bit floating point LibMode Library mode XR: Extreme release, a release without roundrobin and task names. R: Release S: Stack check D: Debug Table 4: Library naming conventions Example os430sf_d.r43 is the library for an MSP430 project using 32-bit floating-point calculation and debug support.32- bit64-bit 15

16 For MSP430 CPUs, the following IAR PowerPac RTOS libraries are available: Library name Data model, options Libmode #define os430sf_xr.r43 small, 32-bit float Extreme Release OS_LIBMODE_XR os430sf_r.r43 small, 32-bit float Release OS_LIBMODE_R os430sf_s.r43 small, 32-bit float Stack check OS_LIBMODE_S os430sf_d.r43 small, 32-bit float Debug OS_LIBMODE_D os430sd_xr.r43 small, 64-bit float Extreme Release OS_LIBMODE_XR os430sd_r.r43 small, 64-bit float Release OS_LIBMODE_R os430sd_s.r43 small, 64-bit float Stack check OS_LIBMODE_S os430sd_d.r43 small, 64-bit float Debug OS_LIBMODE_D Table 5: MSP430 prebuilt libraries Note:For MSP430 CPUs, only the small data model is available. For MSP430x CPUs, the following IAR PowerPac RTOS libraries are available: Library name Data model, options Libmode #define os430xsf_xr.r43 small, 32-bit float Extreme Release OS_LIBMODE_XR os430xsf_r.r43 small, 32-bit float Release OS_LIBMODE_R os430xsf_s.r43 small, 32-bit float Stack check OS_LIBMODE_S os430xsf_d.r43 small, 32-bit float Debug OS_LIBMODE_D os430xsd_xr.r43 small, 64-bit float Extreme Release OS_LIBMODE_XR os430xsd_r.r43 small, 64-bit float Release OS_LIBMODE_R os430xsd_s.r43 small, 64-bit float Stack check OS_LIBMODE_S os430xsd_d.r43 small, 64-bit float Debug OS_LIBMODE_D os430xlf_xr.r43 large, 32-bit float Extreme Release OS_LIBMODE_XR os430xlf_r.r43 large, 32-bit float Release OS_LIBMODE_R os430xlf_s.r43 large, 32-bit float Stack check OS_LIBMODE_S os430xlf_d.r43 large, 32-bit float Debug OS_LIBMODE_D os430xld_xr.r43 large, 64-bit float Extreme Release OS_LIBMODE_XR os430xld_r.r43 large, 64-bit float Release OS_LIBMODE_R os430xld_s.r43 large, 64-bit float Stack check OS_LIBMODE_S os430xld_d.r43 large, 64-bit float Debug OS_LIBMODE_D Table 6: MSP430X prebuilt libraries Note:For MSP430X CPUs, the Medium data model is not supported by IAR PowerPac RTOS. Ensure that the defined symbol, according to the library type used, is set as compiler option in your project. Choose Project Options C/C++ compiler Preprocessor Defined symbols and specify the appropriate symbol. Low-Power Modes Using low-power modes is one possibility to save power consumption during idle times. If required, you should modify the OS_Idle() routine, which is part of the hardware dependent module RtosInit_*.c to enter a low-power mode. 16 IAR PowerPac RTOS for Texas Instruments MSP430 Microcontroller Family

17 MSP430 specifics Do not enter a Low-Power mode which stops the IAR PowerPac RTOS timer, as this would stop time scheduled task activations. If the IAR PowerPac RTOS timer is driven from the main clock, LPM0 or LPM1 should be selected during OS_Idle(). When ACLK is used for IAR PowerPac RTOS timer, LPM2 or LPM3 may also be used. The following seven power modes are supported by MSP430X5xx devices: Active mode AM All clocks are active. Low-power mode 0 (LPM0) CPU is disabled. ACLK and SMCLK remain active. MCLK is disabled. Low-power mode 1 (LPM1) CPU is disabled. ACLK and SMCLK remain active. MCLK is disabled. DCO s dc-generator is disabled if DCO not used in active mode. Low-power mode 2 (LPM2) CPU is disabled. MCLK and SMCLK are disabled. DCO s dc-generator remains enabled. ACLK remains active. Low-power mode 3 (LPM3) CPU is disabled. MCLK and SMCLK are disabled. DCO s dc-generator is disabled. ACLK remains active. Low-power mode 4 (LPM4); CPU is disabled. ACLK is disabled. MCLK and SMCLK are disabled. DCO s dc-generator is disabled. Crystal oscillator is stopped. Low-power mode 5 (LPM5); When PMMREGOFF = 1, regulator disabled. No memory retention. POWER MANAGEMENT API FUNCTIONS Routine OS_POWER_GetMask OS_POWER_UsageDec OS_POWER_UsageInc Table 7: Power management API Description Returns a mask that shows which power management counters are set. Decrements power management counters. Increments power management counters. OS_POWER_UsageDec() Description Decrements power management counters. Prototype void OS_POWER_UsageDec( OS_UINT Index ); Parameter Description Index Contains a bit mask. Each bits stands for a counter which should be updated. For example, Bit0 is Counter0, Bit1 is Counter1,... Table 8: OS_POWER_UsageDec() parameter list 17

18 Additional Information The debug version checks for underflow, overflow and undefined counter number. OS_POWER_UsageInc() Description Increments power management counters. Prototype void OS_POWER_UsageInc( OS_UINT Index ); Parameter Description Index Contains a bit mask. Each bits stands for a counter which should be updated. For example, Bit0 is Counter0, Bit1 is Counter1,... Table 9: OS_POWER_UsageInc() parameter list Additional Information The debug version checks for underflow, overflow and undefined counter number. Example This example is excerpt from Rtosinit_XMS430F5438.c. /********************************************************************* * * OS_InitHW() * * Initialize the hardware (timer) required for embos to run. * May be modified, if an other timer should be used */ void OS_InitHW(void) { OS_IncDI(); /* Ensure, interrupts are disabled */ TA0CTL = 0 /* Reset Timer_A5, division 1 */ (1 << 2) /* Clear timer */ (2 << 8) /* Use SMCLK as timer clock */ ; TA0CCR0 = (OS_PCLK_TIMER / 1000) - 1; /* Set to 1ms */ TA0CCTL0 = 0 /* Initilize capture control */ (1 << 4); /* Enable compare interrupt */ TA0CTL = (1 << 4); /* Start timer in UP-Mode */ OS_POWER_UsageInc(OS_POWER_USE_SMCLK); /* Mark SMCLK as used */ OS_COM_Init(); /* Initialize UART */ OS_DecRI(); /* Restore interrupt context */ } The available clocks are defined in RTOS.h: #define OS_POWER_USE_ACLK (1 << 0) #define OS_POWER_USE_MCLK (1 << 1) #define OS_POWER_USE_SMCLK (1 << 2) 18 IAR PowerPac RTOS for Texas Instruments MSP430 Microcontroller Family

19 MSP430 specifics OS_POWER_GetMask() Description Returns a mask that shows which power management counters are set. Prototype OS_UINT OS_POWER_GetMask( void ); Example This example is excerpt from Rtosinit_XMS430F5438.c. /********************************************************************* * * Idle loop (OS_Idle) * * Please note: * This is basically the "core" of the idle loop. * This core loop can be changed, but: * The idle loop does not have a stack of its own, therefore no * functionality should be implemented that relies on the stack * to be preserved. However, a simple program loop can be programmed * (like toggeling an output or incrementing a counter) * * We just enter low power 0 mode here. */ void OS_Idle(void) { /* Idle loop: No task is ready to exec */ OS_UINT PowerMask; OS_U16 ClkControl; OS_DI(); // // Examine which peripherals may be switched off */ // PowerMask = OS_POWER_GetMask(); // // Switch off peripherals which are not needed // ClkControl = UCSCTL8 & ~OS_POWER_USE_ALL; PowerMask &= OS_POWER_USE_ALL; UCSCTL8 = ClkControl PowerMask; // // Nothing to do... enter low power mode, with interrupts enabled // _BIS_SR(GIE+CPUOFF+OSCOFF+SCG1+SCG0); for (;;); /* Alternative endless loop, required */ /* when simulator is used! */ } 19

20 20 IAR PowerPac RTOS for Texas Instruments MSP430 Microcontroller Family

21 Compiler specifics Standard system libraries IAR PowerPac RTOS for Texas Instruments MSP430 can be used with standard IAR Embedded Workbench system libraries for most projects. The heap management and file operation functions included in the standard system libraries are not reentrant and can therefore not be used with IAR PowerPac RTOS, if non thread safe-functions are used from different tasks. For heap management, IAR PowerPac RTOS delivers its own thread-safe functions which can be used. These functions are described in the IAR PowerPac RTOS User Guide. 21

22 22 IAR PowerPac RTOS for Texas Instruments MSP430 Microcontroller Family

23 Stacks This chapter describes the handling of stacks. Task stack for MSP430 Every IAR PowerPac RTOS task has to have its own stack. Task stacks can be located in any RAM memory location. The stack-size required is the sum of the stack size of all routines plus basic stack size. The basic stack size is the size of memory required to store the registers of the CPU plus the stack size required by IAR PowerPac RTOS routines. System stack for MSP430 The system stack size required by IAR PowerPac RTOS is about 30 bytes. However, because the system stack is also used by the application before the start of multitasking (the call to OS_Start()), and because software timers and IAR PowerPac RTOS internal scheduling functions also use the system stack, the actual stack requirements depend on the application. The size of the system stack is specified in the linker command file as size of CSTACK. We recommend a minimum of 80 bytes. Interrupt stack for MSP430 MSP430 CPUs do not support a separate interrupt stack pointer. Interrupts use the stack of the running application. Therefore, interrupts occupy additional stack space on every task and on the system stack. Stack specifics of the MSP430 family The MSP430 family of microcontroller can address up to 64 Kbytes of memory. Because the stack pointer can address the entire memory area, stacks can be located anywhere in RAM. Stack specifics of the MSP430X family The stack pointer of the MSP430X family of microcontroller can address the whole memory. Stacks can be located anywhere in RAM. 23

24 24 IAR PowerPac RTOS for Texas Instruments MSP430 Microcontroller Family

25 MSP430 clock specifics This chapter describes the options for the CPU and peripheral clock generation. Introduction MSP430 CPUs offer various options for the CPU and peripheral clock generation. You might need to modify the IAR PowerPac RTOS timer initialization function OS_InitHW() in RtosInit_*.c to fit your application. The example OS_InitHW() routine in RTOSInit_430F149.c uses the internal RC oscillator and DCO as CPU clock and selects this clock as source for the IAR PowerPac RTOS timer. IAR PowerPac RTOS timer clock source The IAR PowerPac RTOS timer can be driven from different clock sources. By default, MCLK is used as clock source for the timer. OS_InitHW() initializes the RC oscillator and DCO. Using the RC oscillator Using the RC oscillator and DCO has the advantage that no additional hardware is required. The disadvantage is that an exact frequency is not guaranteed. The frequency of MCLK has to be examined and OS_FSYS has to be adjusted to fit your application. Using an external crystal Using an external Main clock generator crystal has the advantage that the frequency is stable and precise. OS_InitHW() has to be modified to initialize the crystal oscillator. Check OS_FSYS and set a value that corresponds to your crystal frequency. 25

26 26 IAR PowerPac RTOS for Texas Instruments MSP430 Microcontroller Family

27 Interrupts This chapter describes the handling of interrupts. What happens if an interrupt occurs The CPU-core receives an interrupt request. As soon as the interrupts are enabled, the interrupt is accepted. The CPU saves PC and flags on the stack. The CPU jumps to the address specified in the vector table for the interrupt service routine (ISR). The ISR saves the registers. The ISR executes user-defined functionality. The ISR restores the registers from the stack. The ISR executes the RETI command, restores the PC and the flags from the stack. The interrupted function continuos executing. Defining interrupt handlers in C Routines defined with the keyword interrupt automatically save and restore the registers they modify and return with RETI. The interrupt vector number has to be given as additional parameter by the #pragma vector directive prior the interrupt handler function. For a detailed description on how to define an interrupt routine in C, refer to the IAR C/C++ Compiler Reference Guide. Example A simple interrupt routine: #prgama vector=12 interrupt void IntHandlerTimer(void) { IntCnt++; } Interrupt-routine calling IAR PowerPac RTOS function #prgama vector=12 interrupt void IntHandlerTimer(void) { OS_EnterInterrupt(); /* Inform IAR PowerPac RTOS that interrupt function is running */ IntCnt++; OS_PutMailCond(&MB_Data, &IntCnt); OS_LeaveInterrupt(); } OS_EnterInterrupt() has to be the first function called in an interrupt handler using IAR PowerPac RTOS functions, when nestable interrupts are not required. OS_LeaveInterrupt() has to be called at the end of the interrupt handler. If interrupts should be nested, use OS_EnterNestableInterrupt() and OS_LeaveNestableInterrupt() instead. Interrupt-stack Because MSP430 CPUs do not provide a separate stack pointer for interrupts, every interrupt occupies additional stack space on the current stack. This can be the system stack or a task stack of a running task that is interrupted. The additional amount of necessary stack for all interrupts has to be reserved on all task stacks. The current version of IAR PowerPac RTOS for MSP430 does not support extra interrupt stack-switching in an interrupt routine. The routines OS_EnterIntStack() and OS_LeaveIntStack() are supplied for source code compatibility to other processors only and have no functionality. 27

28 28 IAR PowerPac RTOS for Texas Instruments MSP430 Microcontroller Family

29 Technical data This chapter includes information about the memory requirements of IAR PowerPac RTOS. Memory requirements These values are neither precise nor guaranteed but they give you a good idea of the memory-requirements. They vary depending on the current version of IAR PowerPac RTOS. The kernel itself has a minimum ROM size requirement of about bytes. In the table below, you can find the minimum RAM size for IAR PowerPac RTOS resources for a release build. Note that sizes depend on the selected IAR PowerPac RTOS library mode. IAR PowerPac RTOS resource ROM [bytes] RAM [bytes] Kernel approx Event management < Mailbox management < Single-byte mailbox management < Timer management < Additional task Additional counting semaphore -- 4 Additional resource semaphore -- 8 Additional mailbox Additional timer Power management Table 10: Memory requirements 29

30 30 IAR PowerPac RTOS for Texas Instruments MSP430 Microcontroller Family

31 Files shipped with IAR PowerPac RTOS The following table gives an overview about all IAR PowerPac RTOS related deliverables: Directory File Explanation.\Doc *.pdf Generic API and target-specific documentation..\boardsupport Start*.* Example workspaces and project files for IAR Embedded Workbench, including CPU-specific hardware routines for various CPUs and starter boards..\rtos\inc RTOS.h Include file for IAR PowerPac RTOS, to be included in every C-file using IAR PowerPac RTOS functions..\rtos\lib os*.r43 IAR PowerPac RTOS libraries..\rtos\application *.c Example programs to serve as a start..\rtos\example OS_Error.c IAR PowerPac RTOS runtime error handler used in stack check or debug builds. Table 11: Files shipped with IAR PowerPac RTOS 31

32 32 IAR PowerPac RTOS for Texas Instruments MSP430 Microcontroller Family

33 Index Index C Compiler options copyright notice D Data models disclaimer document conventions E edition, of this guide G guidelines, reading I Interrupt stack Interrupts L Library mode Library naming convention Low-Power Modes M Memory models Memory requirements P part number, of this guide Power management OS_POWER_GetMask() OS_POWER_UsageDec() OS_POWER_UsageInc() publication date, of this guide R reading guidelines registered trademarks S Stacks Syntax, conventions used System libraries System stack T Timer clock source trademarks V version, IAR Embedded Workbench

embos Real Time Operating System CPU & Compiler specifics for Texas Instruments MSP430 CPUs and Rowley compiler for MSP430 Document Rev.

embos Real Time Operating System CPU & Compiler specifics for Texas Instruments MSP430 CPUs and Rowley compiler for MSP430 Document Rev. embos Real Time Operating System CPU & Compiler specifics for Texas Instruments MSP430 CPUs and Rowley compiler for MSP430 Document Rev. 1 A product of Segger Microcontroller Systeme GmbH www.segger.com

More information

embos Real-Time Operating System CPU & Compiler specifics for Texas Instruments using TI Code Composer for MSP430

embos Real-Time Operating System CPU & Compiler specifics for Texas Instruments using TI Code Composer for MSP430 embos Real-Time Operating System CPU & Compiler specifics for Texas Instruments MSP430 CPUs using TI Code Composer for MSP430 Document: UM01056 Software version 4.26 Revision: 0 Date: October 18, 2016

More information

IAR PowerPac RTOS for ARM Cores

IAR PowerPac RTOS for ARM Cores IAR PowerPac RTOS for ARM Cores CPU and compiler specifics using IAR Embedded Workbench COPYRIGHT NOTICE Copyright 2006-2008 IAR Systems. No part of this document may be reproduced without the prior written

More information

embos Real Time Operating System CPU & Compiler specifics for RENESAS M16C CPUs and HEW workbench Document Rev. 1

embos Real Time Operating System CPU & Compiler specifics for RENESAS M16C CPUs and HEW workbench Document Rev. 1 embos Real Time Operating System CPU & Compiler specifics for RENESAS M16C CPUs and HEW workbench Document Rev. 1 A product of SEGGER Microcontroller GmbH & Co. KG www.segger.com 2/28 embos for M16C CPUs

More information

embos Real Time Operating System CPU & Compiler specifics for ARM core with ARM RealView Developer Suite 3.0 Document Rev. 1

embos Real Time Operating System CPU & Compiler specifics for ARM core with ARM RealView Developer Suite 3.0 Document Rev. 1 embos Real Time Operating System CPU & Compiler specifics for ARM core with ARM RealView Developer Suite 3.0 Document Rev. 1 A product of SEGGER Microcontroller GmbH & Co. KG www.segger.com 2/25 embos

More information

embos Real Time Operating System CPU & Compiler specifics for RENESAS SH2 CPUs and RENESAS HEW4 Document Rev. 1

embos Real Time Operating System CPU & Compiler specifics for RENESAS SH2 CPUs and RENESAS HEW4 Document Rev. 1 embos Real Time Operating System CPU & Compiler specifics for RENESAS SH2 CPUs and RENESAS HEW4 Document Rev. 1 A product of Segger Microcontroller Systeme GmbH www.segger.com 2/25 embos for SH2 CPUs and

More information

embos Real Time Operating System CPU & Compiler specifics for RENESAS M16C CPUs and IAR compiler Document Rev. 5

embos Real Time Operating System CPU & Compiler specifics for RENESAS M16C CPUs and IAR compiler Document Rev. 5 embos Real Time Operating System CPU & Compiler specifics for RENESAS M16C CPUs and IAR compiler Document Rev. 5 A product of SEGGER Microcontroller GmbH & Co. KG www.segger.com 2/28 embos for M16C CPUs

More information

embos Real Time Operating System CPU & Compiler specifics for PIC18 core using C18 compiler and MPLAB

embos Real Time Operating System CPU & Compiler specifics for PIC18 core using C18 compiler and MPLAB embos Real Time Operating System CPU & Compiler specifics for PIC18 core using C18 compiler and MPLAB Software version 3.88f Document: UM01013 Revision: 0 Date: September 23, 2013 A product of SEGGER Microcontroller

More information

embos Real-Time Operating System CPU & Compiler specifics for embos Visual Studio Simulation

embos Real-Time Operating System CPU & Compiler specifics for embos Visual Studio Simulation embos Real-Time Operating System CPU & Compiler specifics for Document: UM01060 Software Version: 5.02 Revision: 0 Date: July 25, 2018 A product of SEGGER Microcontroller GmbH www.segger.com 2 Disclaimer

More information

embos Real Time Operating System CPU & Compiler specifics for RENESAS SH2A CPUs and KPIT GNU compiler Document Rev. 1

embos Real Time Operating System CPU & Compiler specifics for RENESAS SH2A CPUs and KPIT GNU compiler Document Rev. 1 embos Real Time Operating System CPU & Compiler specifics for RENESAS SH2A CPUs and KPIT GNU compiler Document Rev. 1 A product of SEGGER Microcontroller GmbH & Co. KG www.segger.com 2/24 embos for SH2A

More information

embos Real-Time Operating System CPU & Compiler specifics for Renesas RX using Renesas CCRX compiler and e2studio

embos Real-Time Operating System CPU & Compiler specifics for Renesas RX using Renesas CCRX compiler and e2studio embos Real-Time Operating System CPU & Compiler specifics for Renesas RX using Renesas CCRX compiler and e2studio Document: UM01018 Software version 4.24 Revision: 0 Date: August 8, 2016 A product of SEGGER

More information

embos Real-Time Operating System CPU & Compiler specifics for RH850 using IAR

embos Real-Time Operating System CPU & Compiler specifics for RH850 using IAR embos Real-Time Operating System CPU & Compiler specifics for RH850 using IAR Document: UM01066 Software version 4.24 Revision: 0 Date: August 5, 2016 A product of SEGGER Microcontroller GmbH & Co. KG

More information

embos Real-Time Operating System CPU & Compiler specifics for SH2A core using IAR Embedded Workbench

embos Real-Time Operating System CPU & Compiler specifics for SH2A core using IAR Embedded Workbench embos Real-Time Operating System CPU & Compiler specifics for SH2A core using IAR Embedded Workbench Document: UM01064 Software version 4.22 Revision: 0 Date: May 27, 2016 A product of SEGGER Microcontroller

More information

embos Real-Time Operating System CPU & Compiler specifics for Renesas RX using IAR compiler for RX

embos Real-Time Operating System CPU & Compiler specifics for Renesas RX using IAR compiler for RX embos Real-Time Operating System CPU & Compiler specifics for Renesas RX using IAR compiler for RX Document: UM01020 Software Version: 5.02 Revision: 0 Date: July 10, 2018 A product of SEGGER Microcontroller

More information

embos Real-Time Operating System CPU & Compiler specifics for Renesas RH850 and IAR

embos Real-Time Operating System CPU & Compiler specifics for Renesas RH850 and IAR embos Real-Time Operating System CPU & Compiler specifics for Renesas RH850 and IAR Document: UM01066 Software Version: 5.04 Revision: 0 Date: September 25, 2018 A product of SEGGER Microcontroller GmbH

More information

embos Real-Time Operating System CPU & Compiler specifics for Renesas RX using KPIT GNU tools

embos Real-Time Operating System CPU & Compiler specifics for Renesas RX using KPIT GNU tools embos Real-Time Operating System CPU & Compiler specifics for Renesas RX using KPIT GNU tools Document: UM01019 Software version 4.24 Revision: 0 Date: August 24, 2016 A product of SEGGER Microcontroller

More information

embos Real-Time Operating System CPU & Compiler specifics for ARM core using Keil MDK

embos Real-Time Operating System CPU & Compiler specifics for ARM core using Keil MDK embos Real-Time Operating System CPU & Compiler specifics for ARM core using Keil MDK Document: UM01005 Software version 4.04a Revision: 0 Date: December 2, 2014 A product of SEGGER Microcontroller GmbH

More information

embos Real-Time Operating System CPU & Compiler specifics for RZ core using KPIT GNU and ARM DS-5

embos Real-Time Operating System CPU & Compiler specifics for RZ core using KPIT GNU and ARM DS-5 embos Real-Time Operating System CPU & Compiler specifics for RZ core using KPIT GNU and ARM DS-5 Document: UM01044 Software version 4.16 Revision: 0 Date: March 10, 2016 A product of SEGGER Microcontroller

More information

embos Real-Time Operating System CPU & Compiler specifics for Cortex- M using Rowley CrossStudio for ARM

embos Real-Time Operating System CPU & Compiler specifics for Cortex- M using Rowley CrossStudio for ARM embos Real-Time Operating System CPU & Compiler specifics for Cortex- M using Rowley CrossStudio for ARM Document: UM01026 Software Version: 5.02a Revision: 0 Date: August 22, 2018 A product of SEGGER

More information

embos Real-Time Operating System embos plug-in for IAR C-Spy Debugger Document: UM01025 Software Version: 3.1 Revision: 0 Date: May 3, 2018

embos Real-Time Operating System embos plug-in for IAR C-Spy Debugger Document: UM01025 Software Version: 3.1 Revision: 0 Date: May 3, 2018 embos Real-Time Operating System Document: UM01025 Software Version: 3.1 Revision: 0 Date: May 3, 2018 A product of SEGGER Microcontroller GmbH www.segger.com 2 Disclaimer Specifications written in this

More information

embos Real-Time Operating System embos plug-in for IAR C-Spy Debugger Document: UM01025 Software Version: 3.0 Revision: 0 Date: September 18, 2017

embos Real-Time Operating System embos plug-in for IAR C-Spy Debugger Document: UM01025 Software Version: 3.0 Revision: 0 Date: September 18, 2017 embos Real-Time Operating System embos plug-in for IAR C-Spy Debugger Document: UM01025 Software Version: 3.0 Revision: 0 Date: September 18, 2017 A product of SEGGER Microcontroller GmbH & Co. KG www.segger.com

More information

embos Real-Time Operating System CPU & Compiler specifics for ARM core using Atollic TrueStudio

embos Real-Time Operating System CPU & Compiler specifics for ARM core using Atollic TrueStudio embos Real-Time Operating System CPU & Compiler specifics for ARM core using Atollic TrueStudio Document: UM01015 Software version 3.88b Revision: 0 Date: July 3, 2013 A product of SEGGER Microcontroller

More information

IAR C-SPY Hardware Debugger Systems User Guide

IAR C-SPY Hardware Debugger Systems User Guide IAR C-SPY Hardware Debugger Systems User Guide for the Renesas SH Microcomputer Family CSSHHW-1 COPYRIGHT NOTICE Copyright 2010 IAR Systems AB. No part of this document may be reproduced without the prior

More information

embos Real-Time Operating System CPU & Compiler specifics for ARM core using GCC / emide

embos Real-Time Operating System CPU & Compiler specifics for ARM core using GCC / emide embos Real-Time Operating System CPU & Compiler specifics for ARM core using GCC / emide Document: UM01052 Software version 4.32 Revision: 0 Date: January 27, 2017 A product of SEGGER Microcontroller GmbH

More information

IAR Embedded Workbench

IAR Embedded Workbench IAR Embedded Workbench Getting Started with IAR Embedded Workbench for Renesas Synergy GSEWSYNIDE-1 COPYRIGHT NOTICE 2016 IAR Systems AB. No part of this document may be reproduced without the prior written

More information

embos Real-Time Operating System CPU & Compiler specifics for Cortex M using Atmel Studio

embos Real-Time Operating System CPU & Compiler specifics for Cortex M using Atmel Studio embos Real-Time Operating System CPU & Compiler specifics for Cortex M using Atmel Studio Document: UM01042 Software version 4.06b Revision: 0 Date: April 1, 2015 A product of SEGGER Microcontroller GmbH

More information

IAR Embedded Workbench

IAR Embedded Workbench IAR Embedded Workbench IAR Embedded Workbench for AVR Migration Guide Migrating from version 5.x to version 6.x Mv6x_AVR-1 COPYRIGHT NOTICE Copyright 1996 2011 IAR Systems AB. No part of this document

More information

IAR C-SPY Hardware Debugger Systems User Guide. for Renesas E30A/E30 Emulators

IAR C-SPY Hardware Debugger Systems User Guide. for Renesas E30A/E30 Emulators IAR C-SPY Hardware Debugger Systems User Guide for Renesas E30A/E30 Emulators COPYRIGHT NOTICE Copyright 2007 2009 IAR Systems AB. No part of this document may be reproduced without the prior written consent

More information

embos Real-Time Operating System CPU & Compiler specifics for Document: UM01039 Software Version: 5.02 Revision: 0 Date: June 26, 2018

embos Real-Time Operating System CPU & Compiler specifics for Document: UM01039 Software Version: 5.02 Revision: 0 Date: June 26, 2018 embos Real-Time Operating System CPU & Compiler specifics for Cortex-M using GCC / emide Document: UM01039 Software Version: 5.02 Revision: 0 Date: June 26, 2018 A product of SEGGER Microcontroller GmbH

More information

Getting Started with IAR Embedded Workbench for Renesas Synergy

Getting Started with IAR Embedded Workbench for Renesas Synergy Getting Started with IAR Embedded Workbench for Renesas Synergy GSEWSYNERGY-5 COPYRIGHT NOTICE 2017 IAR Systems AB. No part of this document may be reproduced without the prior written consent of IAR Systems

More information

embos Operating System CPU & Compiler specifics for Altera SoC using ARM DS-5 and GNU compiler

embos Operating System CPU & Compiler specifics for Altera SoC using ARM DS-5 and GNU compiler embos Operating System CPU & Compiler specifics for Altera SoC using ARM DS-5 and GNU compiler Document: UM01053 Software version 4.04 Revision: 0 Date: November 21, 2014 A product of SEGGER Microcontroller

More information

IAR Embedded Workbench

IAR Embedded Workbench IAR Embedded Workbench C-SPY Debugging Guide for Atmel Corporation s AVR Microcontroller Family UCSAVR-1 COPYRIGHT NOTICE Copyright 2011 IAR Systems AB. No part of this document may be reproduced without

More information

Migrating from Keil µvision for 8051 to IAR Embedded Workbench for 8051

Migrating from Keil µvision for 8051 to IAR Embedded Workbench for 8051 Migration guide Migrating from Keil µvision for 8051 to for 8051 Use this guide as a guideline when converting project files from the µvision IDE and source code written for Keil toolchains for 8051 to

More information

Migrating from Keil µvision for 8051 to IAR Embedded Workbench for 8051

Migrating from Keil µvision for 8051 to IAR Embedded Workbench for 8051 Migration guide Migrating from Keil µvision for 8051 to for 8051 Use this guide as a guideline when converting project files from the µvision IDE and source code written for Keil toolchains for 8051 to

More information

CODE TIME TECHNOLOGIES. Abassi RTOS. Porting Document C28X CCS

CODE TIME TECHNOLOGIES. Abassi RTOS. Porting Document C28X CCS CODE TIME TECHNOLOGIES Abassi RTOS Porting Document C28X CCS Copyright Information This document is copyright Code Time Technologies Inc. 2012-2013. All rights reserved. No part of this document may be

More information

H8 C-SPY. User Guide WINDOWS WORKBENCH VERSION

H8 C-SPY. User Guide WINDOWS WORKBENCH VERSION H8 C-SPY User Guide WINDOWS WORKBENCH VERSION COPYRIGHT NOTICE Copyright 1998 IAR Systems. All rights reserved. No part of this document may be reproduced without the prior written consent of IAR Systems.

More information

Lab 1: I/O, timers, interrupts on the ez430-rf2500

Lab 1: I/O, timers, interrupts on the ez430-rf2500 Lab 1: I/O, timers, interrupts on the ez430-rf2500 UC Berkeley - EE 290Q Thomas Watteyne January 25, 2010 1 The ez430-rf2500 and its Components 1.1 Crash Course on the MSP430f2274 The heart of this platform

More information

ATOLLIC TRUESTUDIO FOR STM32 QUICK START GUIDE

ATOLLIC TRUESTUDIO FOR STM32 QUICK START GUIDE ATOLLIC TRUESTUDIO FOR STM32 QUICK START GUIDE This document is intended for those who want a brief, bare bones getting started guide. This should suffice for that purpose, but a lot of detail has been

More information

Lab 4 Interrupts ReadMeFirst

Lab 4 Interrupts ReadMeFirst Lab 4 Interrupts ReadMeFirst Lab Folder Content 1) ReadMeFirst 2) Interrupt Vector Table 3) Pin out Summary Objectives Understand how interrupts work Learn to program Interrupt Service Routines in C Language

More information

Introduction to the ThreadX Debugger Plugin for the IAR Embedded Workbench C-SPYDebugger

Introduction to the ThreadX Debugger Plugin for the IAR Embedded Workbench C-SPYDebugger C-SPY plugin Introduction to the ThreadX Debugger Plugin for the IAR Embedded Workbench C-SPYDebugger This document describes the IAR C-SPY Debugger plugin for the ThreadX RTOS. The ThreadX RTOS awareness

More information

MetaWatch Firmware Design Guide

MetaWatch Firmware Design Guide MetaWatch Firmware Design Guide MetaWatch Firmware Design Guide Page 1 of 14 1 Contents 1 Contents... 2 2 Introduction... 3 2.1 Revision History... 4 3 Hardware... 5 3.1 Common Watch Features... 5 3.2

More information

Application Note. Using embos tickless support with STM32

Application Note. Using embos tickless support with STM32 Application Note Using embos tickless support with STM32 Document: AN01002 Revision: 0 Date: June 26, 2014 A product of SEGGER Microcontroller GmbH & Co. KG www.segger.com 2 Disclaimer Specifications written

More information

Programming in the MAXQ environment

Programming in the MAXQ environment AVAILABLE The in-circuit debugging and program-loading features of the MAXQ2000 microcontroller combine with IAR s Embedded Workbench development environment to provide C or assembly-level application

More information

ATOLLIC TRUESTUDIO FOR ARM QUICK START GUIDE

ATOLLIC TRUESTUDIO FOR ARM QUICK START GUIDE ATOLLIC TRUESTUDIO FOR ARM QUICK START GUIDE This document is intended for those who want a brief, bare bones getting started guide. This should suffice for that purpose, but a lot of detail has been left

More information

Timer Module Timer A. ReadMeFirst

Timer Module Timer A. ReadMeFirst Timer Module Timer A ReadMeFirst Lab Folder Content 1) ReadMeFirst 2) TimerModule Lecture material 3) PinOutSummary 4) InterruptsVectorTable 5) Source code for screencast Interrupt Review Overview A Timer

More information

Integrating a visualstate application with a Real-Time Operating System (RTOS)

Integrating a visualstate application with a Real-Time Operating System (RTOS) Integrating a visualstate application with a Real-Time Operating System (RTOS) The information in this document is based on version 5.0.4 of the IAR visualstate software. It may also apply to subsequent

More information

5/11/2012 CMSIS-RTOS. Niall Cooling Feabhas Limited CMSIS. Cortex Microcontroller Software Interface Standard.

5/11/2012 CMSIS-RTOS. Niall Cooling Feabhas Limited  CMSIS. Cortex Microcontroller Software Interface Standard. Niall Cooling Feabhas Limited www.feabhas.com Cortex Microcontroller Software Interface Standard CMSIS 2 1 ARM Cortex Family A Series Application MMU Linux, Android, Windows R Series Real-Time MPU M Series

More information

real-time kernel documentation

real-time kernel documentation version 1.1 real-time kernel documentation Introduction This document explains the inner workings of the Helium real-time kernel. It is not meant to be a user s guide. Instead, this document explains overall

More information

CODE TIME TECHNOLOGIES. Abassi RTOS. Porting Document MSP430/X CCS

CODE TIME TECHNOLOGIES. Abassi RTOS. Porting Document MSP430/X CCS CODE TIME TECHNOLOGIES Abassi RTOS Porting Document MSP430/X CCS Copyright Information This document is copyright Code Time Technologies Inc. 2011,2012. All rights reserved. No part of this document may

More information

ZiLOG Real-Time Kernel Version 1.2.0

ZiLOG Real-Time Kernel Version 1.2.0 ez80acclaim Family of Microcontrollers Version 1.2.0 PRELIMINARY Introduction The (RZK) is a realtime, preemptive, multitasking kernel designed for time-critical embedded applications. It is currently

More information

Installation and Licensing Guide for the IAR Embedded Workbench

Installation and Licensing Guide for the IAR Embedded Workbench Installation and Licensing Guide for the IAR Embedded Workbench COPYRIGHT NOTICE Copyright 2001 IAR Systems. All rights reserved. No part of this document may be reproduced without the prior written consent

More information

CODE TIME TECHNOLOGIES. Abassi RTOS. Porting Document. ARM Cortex-M3 CCS

CODE TIME TECHNOLOGIES. Abassi RTOS. Porting Document. ARM Cortex-M3 CCS CODE TIME TECHNOLOGIES Abassi RTOS Porting Document ARM Cortex-M3 CCS Copyright Information This document is copyright Code Time Technologies Inc. 2011,2012. All rights reserved. No part of this document

More information

Getting Started. with IAR Embedded Workbench GSEW-2

Getting Started. with IAR Embedded Workbench GSEW-2 Getting Started with IAR Embedded Workbench GSEW-2 COPYRIGHT NOTICE Copyright 2009 2010 IAR Systems AB. No part of this document may be reproduced without the prior written consent of IAR Systems AB. The

More information

MSP430 IAR Embedded Workbench IDE User Guide. for Texas Instruments MSP430 Microcontroller Family

MSP430 IAR Embedded Workbench IDE User Guide. for Texas Instruments MSP430 Microcontroller Family MSP430 IAR Embedded Workbench IDE User Guide for Texas Instruments MSP430 Microcontroller Family COPYRIGHT NOTICE Copyright 1995 2003 IAR Systems. All rights reserved. No part of this document may be reproduced

More information

Getting Started with the Texas Instruments ez430

Getting Started with the Texas Instruments ez430 1 of 6 03.01.2009 01:33 HOME Running Your Code>> Getting Started with the Texas Instruments ez430 Working with the Workbench Software Step 1: Each program needs an associated project. The project includes

More information

ECE PRACTICE EXAM #2 Clocks, Timers, and Digital I/O

ECE PRACTICE EXAM #2 Clocks, Timers, and Digital I/O ECE2049 -- PRACTICE EXAM #2 Clocks, Timers, and Digital I/O Study HW3, Class Notes, Davies Ch 2.6, 5.8, 8, 9.2-3, 9.7, MSP43F5529 User's Guide Ch 5, 17, 28 Work all problems with your note sheet first

More information

CODE TIME TECHNOLOGIES. Abassi RTOS. Porting Document. ATmega128 IAR

CODE TIME TECHNOLOGIES. Abassi RTOS. Porting Document. ATmega128 IAR CODE TIME TECHNOLOGIES Abassi RTOS Porting Document ATmega128 IAR Copyright Information This document is copyright Code Time Technologies Inc. 2011,2012. All rights reserved. No part of this document may

More information

CODE TIME TECHNOLOGIES. Abassi RTOS. Porting Document MSP430 IAR

CODE TIME TECHNOLOGIES. Abassi RTOS. Porting Document MSP430 IAR CODE TIME TECHNOLOGIES Abassi RTOS Porting Document MSP430 IAR Copyright Information This document is copyright Code Time Technologies Inc. 2011,2012. All rights reserved. No part of this document may

More information

CODE TIME TECHNOLOGIES. Abassi RTOS. CMSIS Version 3.0 RTOS API

CODE TIME TECHNOLOGIES. Abassi RTOS. CMSIS Version 3.0 RTOS API CODE TIME TECHNOLOGIES Abassi RTOS CMSIS Version 3.0 RTOS API Copyright Information This document is copyright Code Time Technologies Inc. 2011-2013. All rights reserved. No part of this document may be

More information

University of Texas at El Paso Electrical and Computer Engineering Department. EE 3176 Laboratory for Microprocessors I.

University of Texas at El Paso Electrical and Computer Engineering Department. EE 3176 Laboratory for Microprocessors I. University of Texas at El Paso Electrical and Computer Engineering Department EE 3176 Laboratory for Microprocessors I Fall 2016 LAB 03 Low Power Mode and Port Interrupts Goals: Bonus: Pre Lab Questions:

More information

IAR PowerPac File System User Guide

IAR PowerPac File System User Guide IAR PowerPac File System User Guide COPYRIGHT NOTICE Copyright 2007-2009 IAR Systems AB. No part of this document may be reproduced without the prior written consent of IAR Systems AB. The software described

More information

Texas Instruments Mixed Signal Processor Tutorial Abstract

Texas Instruments Mixed Signal Processor Tutorial Abstract Texas Instruments Mixed Signal Processor Tutorial Abstract This tutorial goes through the process of writing a program that uses buttons to manipulate LEDs. One LED will be hard connected to the output

More information

CODE TIME TECHNOLOGIES. Abassi RTOS. Porting Document. ATmega IAR

CODE TIME TECHNOLOGIES. Abassi RTOS. Porting Document. ATmega IAR CODE TIME TECHNOLOGIES Abassi RTOS Porting Document ATmega IAR Copyright Information This document is copyright Code Time Technologies Inc. 2011-2013. All rights reserved. No part of this document may

More information

CODE TIME TECHNOLOGIES. Abassi RTOS. Porting Document. ARM Cortex-A9 CCS

CODE TIME TECHNOLOGIES. Abassi RTOS. Porting Document. ARM Cortex-A9 CCS CODE TIME TECHNOLOGIES Abassi RTOS Porting Document ARM Cortex-A9 CCS Copyright Information This document is copyright Code Time Technologies Inc. 2012. All rights reserved. No part of this document may

More information

IAR Embedded Workbench

IAR Embedded Workbench IAR Embedded Workbench IDE Project Management and Building Guide for Advanced RISC Machines Ltd s ARM Cores UIDEARM-3 COPYRIGHT NOTICE Copyright 1999 2012 IAR Systems AB. No part of this document may be

More information

Team 3. By: Miriel Garcia. Microcontrollers/ TI MSP430F5438A. ECE 480 senior Design. Application Note 4/3/15

Team 3. By: Miriel Garcia. Microcontrollers/ TI MSP430F5438A. ECE 480 senior Design. Application Note 4/3/15 Microcontrollers/ TI MSP430F5438A ECE 480 senior Design Team 3 Application Note By: Miriel Garcia 4/3/15 Abstract Microcontrollers are key components on today s modern world. These devices have the ability

More information

CODE TIME TECHNOLOGIES. Abassi RTOS. Porting Document MSP430 GCC

CODE TIME TECHNOLOGIES. Abassi RTOS. Porting Document MSP430 GCC CODE TIME TECHNOLOGIES Abassi RTOS Porting Document MSP430 GCC Copyright Information This document is copyright Code Time Technologies Inc. 2011,2012. All rights reserved. No part of this document may

More information

CPE 323: MSP430 Timers

CPE 323: MSP430 Timers CPE 323: MSP430 Timers Aleksandar Milenkovic Electrical and Computer Engineering The University of Alabama in Huntsville milenka@ece.uah.edu http://www.ece.uah.edu/~milenka Outline Watchdog Timer TimerA

More information

IAR PowerPac RTOS User Guide

IAR PowerPac RTOS User Guide IAR PowerPac RTOS User Guide COPYRIGHT NOTICE Copyright 2006 2007 IAR Systems. All rights reserved. No part of this document may be reproduced without the prior written consent of IAR Systems. The software

More information

Getting Started with the MSP430 IAR Assembly

Getting Started with the MSP430 IAR Assembly Getting Started with the MSP430 IAR Assembly by Alex Milenkovich, milenkovic@computer.org Objectives: This tutorial will help you get started with the MSP30 IAR Assembly program development. You will learn

More information

AT09381: SAM D - Debugging Watchdog Timer Reset. Introduction. SMART ARM-based Microcontrollers APPLICATION NOTE

AT09381: SAM D - Debugging Watchdog Timer Reset. Introduction. SMART ARM-based Microcontrollers APPLICATION NOTE SMART ARM-based Microcontrollers AT09381: SAM D - Debugging Watchdog Timer Reset APPLICATION NOTE Introduction This application note shows how the early warning interrupt can be used to debug a WDT reset

More information

IAR PowerPac USB User Guide

IAR PowerPac USB User Guide IAR PowerPac USB User Guide COPYRIGHT NOTICE Copyright 2007 2008 IAR Systems AB. No part of this document may be reproduced without the prior written consent of IAR Systems AB. The software described in

More information

Lab 4: Interrupt. CS4101 Introduction to Embedded Systems. Prof. Chung-Ta King. Department of Computer Science National Tsing Hua University, Taiwan

Lab 4: Interrupt. CS4101 Introduction to Embedded Systems. Prof. Chung-Ta King. Department of Computer Science National Tsing Hua University, Taiwan CS4101 Introduction to Embedded Systems Lab 4: Interrupt Prof. Chung-Ta King Department of Computer Science, Taiwan Introduction In this lab, we will learn interrupts of MSP430 Handling interrupts in MSP430

More information

Zilog Real-Time Kernel

Zilog Real-Time Kernel An Company Configurable Compilation RZK allows you to specify system parameters at compile time. For example, the number of objects, such as threads and semaphores required, are specez80acclaim! Family

More information

PICMICRO C-SPY. User Guide

PICMICRO C-SPY. User Guide PICMICRO C-SPY User Guide COPYRIGHT NOTICE Copyright 1998 IAR Systems. All rights reserved. No part of this document may be reproduced without the prior written consent of IAR Systems. The software described

More information

Viewing the tm4c123gh6pm_startup_ccs.c file, the first piece of code we see after the comments is shown in Figure 1.

Viewing the tm4c123gh6pm_startup_ccs.c file, the first piece of code we see after the comments is shown in Figure 1. Viewing the tm4c123gh6pm_startup_ccs.c file, the first piece of code we see after the comments is shown in Figure 1. Figure 1 Forward declaration for the default handlers These are the forward declarations,

More information

CPE 323: Laboratory Assignment #1 Getting Started with the MSP430 IAR Embedded Workbench

CPE 323: Laboratory Assignment #1 Getting Started with the MSP430 IAR Embedded Workbench CPE 323: Laboratory Assignment #1 Getting Started with the MSP430 IAR Embedded Workbench by Alex Milenkovich, milenkovic@computer.org Objectives: This tutorial will help you get started with the MSP30

More information

IDE Project Management and Building Guide

IDE Project Management and Building Guide IDE Project Management and Building Guide for Microchip Technology s AVR Microcontroller Family UIDEAVR-8 COPYRIGHT NOTICE 1996-2018 IAR Systems AB. No part of this document may be reproduced without the

More information

IAR C/C++ Compiler Reference Guide

IAR C/C++ Compiler Reference Guide IAR C/C++ Compiler Reference Guide for Freescale s HCS12 Microcontroller Family CHCS12-2 COPYRIGHT NOTICE Copyright 1997 2010 IAR Systems AB. No part of this document may be reproduced without the prior

More information

CODE TIME TECHNOLOGIES. Abassi RTOS. Porting Document. ATmega128 GCC

CODE TIME TECHNOLOGIES. Abassi RTOS. Porting Document. ATmega128 GCC CODE TIME TECHNOLOGIES Abassi RTOS Porting Document ATmega128 GCC Copyright Information This document is copyright Code Time Technologies Inc. 2011,2012. All rights reserved. No part of this document may

More information

IAR Embedded Workbench MISRA C:2004. Reference Guide

IAR Embedded Workbench MISRA C:2004. Reference Guide IAR Embedded Workbench MISRA C:2004 Reference Guide COPYRIGHT NOTICE Copyright 2004 2008 IAR Systems. All rights reserved. No part of this document may be reproduced without the prior written consent of

More information

AN10955 Full-duplex software UART for LPC111x and LPC13xx

AN10955 Full-duplex software UART for LPC111x and LPC13xx Rev. 1 13 July 2010 Application note Document information Info Content Keywords LPC111X, LPC13XX, UART, software Abstract This application note illustrates how software running on an LPC111X or LPC13XX

More information

IDE Project Management and Building Guide

IDE Project Management and Building Guide IDE Project Management and Building Guide for the Texas Instruments MSP430 Microcontroller Family UIDE430-7 COPYRIGHT NOTICE 2015 2017 IAR Systems AB. No part of this document may be reproduced without

More information

EMBEDDED SYSTEMS: Jonathan W. Valvano INTRODUCTION TO THE MSP432 MICROCONTROLLER. Volume 1 First Edition June 2015

EMBEDDED SYSTEMS: Jonathan W. Valvano INTRODUCTION TO THE MSP432 MICROCONTROLLER. Volume 1 First Edition June 2015 EMBEDDED SYSTEMS: INTRODUCTION TO THE MSP432 MICROCONTROLLER Volume 1 First Edition June 2015 Jonathan W. Valvano ii Jonathan Valvano First edition 3 rd printing June 2015 The true engineering experience

More information

DSP/BIOS Kernel Scalable, Real-Time Kernel TM. for TMS320 DSPs. Product Bulletin

DSP/BIOS Kernel Scalable, Real-Time Kernel TM. for TMS320 DSPs. Product Bulletin Product Bulletin TM DSP/BIOS Kernel Scalable, Real-Time Kernel TM for TMS320 DSPs Key Features: Fast, deterministic real-time kernel Scalable to very small footprint Tight integration with Code Composer

More information

IAR C/C++ Development Guide Compiling and linking

IAR C/C++ Development Guide Compiling and linking IAR C/C++ Development Guide Compiling and linking for Advanced RISC Machines Ltd s ARM Cores DARM-6 COPYRIGHT NOTICE Copyright 1999 2010 IAR Systems AB. No part of this document may be reproduced without

More information

AN HONORS UNIVERSITY IN MARYLAND UMBC. AvrX. Yousef Ebrahimi Professor Ryan Robucci

AN HONORS UNIVERSITY IN MARYLAND UMBC. AvrX.   Yousef Ebrahimi Professor Ryan Robucci AvrX https://github.com/kororos/avrx Yousef Ebrahimi Professor Ryan Robucci Introduction AvrX is a Real Time Multitasking Kernel written for the Atmel AVR series of micro controllers. The Kernel is written

More information

Interrupt/Timer/DMA 1

Interrupt/Timer/DMA 1 Interrupt/Timer/DMA 1 Exception An exception is any condition that needs to halt normal execution of the instructions Examples - Reset - HWI - SWI 2 Interrupt Hardware interrupt Software interrupt Trap

More information

Salvo Compiler Reference Manual CrossWorks for MSP430

Salvo Compiler Reference Manual CrossWorks for MSP430 RM-RA430 Reference Manual 750 Naples Street San Francisco, CA 94112 (415) 584-6360 http://www.pumpkininc.com Salvo Compiler Reference Manual CrossWorks for MSP430 created by Andrew E. Kalman on Mar 21,

More information

AVR IAR Embedded Workbench IDE Migration Guide. for Atmel Corporation s AVR Microcontroller

AVR IAR Embedded Workbench IDE Migration Guide. for Atmel Corporation s AVR Microcontroller AVR IAR Embedded Workbench IDE Migration Guide for Atmel Corporation s AVR Microcontroller COPYRIGHT NOTICE Copyright 1996 2007 IAR Systems. All rights reserved. No part of this document may be reproduced

More information

Using the FreeRTOS Real Time Kernel

Using the FreeRTOS Real Time Kernel Using the FreeRTOS Real Time Kernel i ii Using the FreeRTOS Real Time Kernel Renesas RX600 Edition Richard Barry iii First edition published 2011. All text, source code and diagrams are the exclusive property

More information

CODE TIME TECHNOLOGIES. Abassi RTOS. Porting Document. 8051/8052 Keil Compiler

CODE TIME TECHNOLOGIES. Abassi RTOS. Porting Document. 8051/8052 Keil Compiler CODE TIME TECHNOLOGIES Abassi RTOS Porting Document 8051/8052 Keil Compiler Copyright Information This document is copyright Code Time Technologies Inc. 2011. All rights reserved. No part of this document

More information

Embedded System Curriculum

Embedded System Curriculum Embedded System Curriculum ADVANCED C PROGRAMMING AND DATA STRUCTURE (Duration: 25 hrs) Introduction to 'C' Objectives of C, Applications of C, Relational and logical operators, Bit wise operators, The

More information

ssj1708 User s Manual Version 1.3 Revised February 2nd, 2009 Created by the J1708 Experts

ssj1708 User s Manual Version 1.3 Revised February 2nd, 2009 Created by the J1708 Experts ssj1708 User s Manual Version 1.3 Revised February 2nd, 2009 Created by the J1708 Experts ssj1708 Protocol Stack License READ THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT CAREFULLY BEFORE OPENING

More information

Development Tools. 8-Bit Development Tools. Development Tools. AVR Development Tools

Development Tools. 8-Bit Development Tools. Development Tools. AVR Development Tools Development Tools AVR Development Tools This section describes some of the development tools that are available for the 8-bit AVR family. Atmel AVR Assembler Atmel AVR Simulator IAR ANSI C-Compiler, Assembler,

More information

ECE2049: Embedded Computing in Engineering Design C Term Spring Lecture #11: More Clocks and Timers

ECE2049: Embedded Computing in Engineering Design C Term Spring Lecture #11: More Clocks and Timers ECE2049: Embedded Computing in Engineering Design C Term Spring 2018 Lecture #11: More Clocks and Timers Reading for Today: Davie's Ch 8.3-8.4, 8.9-8.10, User's Guide Ch. 17 Reading for Next Class: User's

More information

BASICS OF THE RENESAS SYNERGY PLATFORM

BASICS OF THE RENESAS SYNERGY PLATFORM BASICS OF THE RENESAS SYNERGY PLATFORM TM Richard Oed 2017.12 02 CHAPTER 9 INCLUDING A REAL-TIME OPERATING SYSTEM CONTENTS 9 INCLUDING A REAL-TIME OPERATING SYSTEM 03 9.1 Threads, Semaphores and Queues

More information

Device support in IAR Embedded Workbench for 8051

Device support in IAR Embedded Workbench for 8051 Device support in IAR Embedded Workbench for 8051 This guide describes how you can add support for a new device to IAR Embedded Workbench and how you can modify the characteristics of an already supported

More information

Application Note. Startup DevKit16. History 19 th June 00 TKa V1.0 started 20 th June 00 TKa V1.1 Some minor text corrections

Application Note. Startup DevKit16. History 19 th June 00 TKa V1.0 started 20 th June 00 TKa V1.1 Some minor text corrections Application Note Startup DevKit16 Fujitsu Mikroelektronik GmbH, Microcontroller Application Group History 19 th June 00 TKa V1.0 started 20 th June 00 TKa V1.1 Some minor text corrections 1 Warranty and

More information

The ThreadX C-SPY plugin

The ThreadX C-SPY plugin The ThreadX C-SPY plugin Introduction to the ThreadX Debugger Plugin for the IAR Embedded Workbench C-SPY Debugger This document describes the IAR C-SPY Debugger plugin for the ThreadX RTOS. The ThreadX

More information