Home
Getting Started with Freescale MQX™ RTOS
Contents
1. For more details about Processor Expert refer to Processor Expert User Manual which can be found in lt CW_MCU_10 x Install Directory gt MCU Help PDF ProcessorExpertHelp pdf 6 2 Processor Expert Ready BSPs All Kinetis BSPs are enabled to host the Processor Expert components Starting at MQX version 3 8 1 the special PE versions of the BSPs were removed and the functionality is available in the standard BSP projects The BSP projects contain the ProcessorExpert pe file containing e Pre configured CPU component e MQX RTOS Adapter component e Set of peripheral components needed by pe_demo example application Freescale MQX Getting Started 20 Freescale Semiconductor Other components may be added to the BSP project as needed 6 3 Processor Expert MQX Demo Application The Demo application which demonstrates the integration of Processor Expert drivers is available here lt install dir gt demo pe demo cwl0 pe demo lt board gt project The application executes the following tasks 1 The sine signal of specified period is generated on DACO pin The signal amplitude sweeps between minimal to maximal value It can be observed by scope on DACO_OUT A32 pin on TWR ELEV FUNCTIONAL or TWR PROTO board 2 The PWM signal is generated using FlexTimer FTMO Channel 0 It can be observed by scope on PWMO A40 pin on TWR ELEV FUNCTIONAL or TWR PROTO board To signalize that application is running it toggles LEDs D
2. 3 2 Other Development Tools Process of creating new projects typically heavily depends on the development environment being used Describing this process for tools other than Freescale CodeWarrior is out of scope of this document For more information refer to MQX support documentation provided by the tool vendor A general recommendation for starting a new MQX project in any IDE environment is to clone one of the existing example applications save it under a custom name and modify it to meet your specific needs In this case please be aware that there may be relative paths to support files referred in the project This may apply to include search paths linker command files debugger configuration files etc Make sure that you update the relative paths in the new clone of the project Freescale MQX Getting Started Freescale Semiconductor 9 4 MQX Standard Input and Output Channel Setting 4 1 Default IO Channel One of the I O communication devices installed by MQX BSP may be used as the standard IO channel e g Serial line IO Debug telnet USB CDC The default console setting for each supported development board is specified in the 7 Board specific Information Related to MQX chapter The Freescale Tower evaluation kits offer several ways to connect the lO console The most common options are listed below e Serial lO channel routed via TWR SER or TWR SER2 boards using RS232 connector This port can be connected directly to t
3. Address Size Type Hex 0x200004c4 0x410 Interrupt Stack 0x200008d4 Oft System Stack 0x200009c4 Oxec Ready Qs 0x20000ab0 Dx3c Interrupt Table 0x20000aec Ox ic Interrupt Vector 0x20000b08 Dx3c I O Serial polled device struct 0x20000b44 0x38 1 0 Device 0x20000b7c 0x90 5 2 IAR Embedded Workbench for ARM and ColdFire TAD is currently available for the following IAR Embedded Workbench CSpy Debugger versions e IAR EWARM version 6 x tested with version 6 40 3 e AREWCF version 5 3 See detailed information about setting up the TAD in separate document Getting Started with Freescale MQX RTOS and IAR Embedded Workbench The document is included in the MQX installation as the lt mqx install dir gt doc tools iar MQX IAR Getting Started pdf 5 3 ARM Keil uVision4 TAD viewer is currently available for ARM Keil uVision4 Debugger tested with version 4 22 See detailed information about setting up the TAD in separate document Getting Started with Freescale MQX RTOS and MDK ARM Keil uVision4 The document is included in the MQX installation as the lt mqx install dir gt doc tools uv4 MQX uVision4 Getting Started pdf 5 4 ARM DS 5 TAD viewer is currently available for ARM DS 5 Debugger tested with version 5 12 See detailed information about setting up the TAD in separate document Getting Started with Freescale MQX RTOS and Development Studio 5 The document is included in the MQX installation a
4. mqx source io pccard twr mem pccard cpld folder The firmware can be loaded to the TWR MEM CPLD using Altera Quartus Il design tool and BLASTER connection cable e Example projects contain different build configurations for code execution from Flash or RAM memory The RAM based execution may be faster to debug but not all examples fit into RAM and may fail to link Other Notes e The default console interface ttyf is routed to OSBDM COM USB mini connector J13 Use the P amp E Micro OSJTAG terminal to access board serial line e To enable TWR SER RS232 interface change the BSP_DEFAULT_IO_CHANNEL configuration option to ttyd in the mgx source bsp twrk60n512 twrk60n512 h file 7 2 9 TWR K60F120M Primary SW1 Connector SW2 Infra Red LZ Touch TWRPI General Purpose S i Hi Sal Tower Plug In 5 55 Milla z TWRPI Socket LED Touch fe Buttons SW3 Reset 7 LEA eg MK60FN1MOVLQ12 Mini B USB 3 Microcontroller Connector Secondary MMA8451 Connector Accelerometer Core Clock 120 MHz Bus Clock Default Console OSJTAG USB mini connector BSP Timer Systick Important jumper settings board REV A e For standalone operation o TWR K60FN1M Jumper J9 on position 1 2 e To enable Ethernet communication use with TWR SER o TWR K60FN1M Jumper J9 on position 2 3 processor clock taken from the TWR SER board Freescale MQX Getting Started Freescale Semiconductor 33 o TWR SER CLK_SEL 3 4 o TWR SER CLKIN
5. 1 2 default connects reset to on board push button and debug connectors o 2 3 connects reset signal to common ground holds CPU in reset e 3V3 power supply J5 o 1 2 powered from elevator o 2 3 default onboard 3V3 regulator e 1V2 power supply for CPU core J15 o 1 2 default connects on board 1V2 power supply to the CPU o 2 3 selects external supply from J14 e VREG_INT_ENABLE J17 o 1 2 disables internal VREG of the CPU o 2 3 default enables internal VREG of the CPU e FlexCANO J6 o 1 3 and 2 4 connect CAN though elevator to TWR SER board o 3 5 and 4 6 default to connect on board CAN transceiver TWR SER jumper settings e FlexCAN1 through TWR SER board o J5 CAN SEL all jumpers closed e Ethernet o J12 ETH CONFIG all positions open o J2 CLK SEL set to position 1 2 o J3 CLKIN SEL set to position 2 3 TWR MEM jumper settings e SDCARD slot o J12 SD SEL1 position 1 2 and 2 3 has to be open o J2 SD SEL2 set to position 1 2 o J3 SD CS set to position 1 2 Freescale MQX Getting Started Freescale Semiconductor 51 Microcontroller mode The PXS30 microcontroller may operate either in lock step mode LSM or decoupled parallel mode DPM In LSM both cores execute the same code at the same time for safety applications while in DPM cores execute code independently on each other so there are effectively two processors available The mode is selected by LSM DPM bit in shadow FLASH area Factory setting is DPM The mode cann
6. J18 and J21 in positions 1 3 and 2 4 connect UART A to RS 485 o Jumpers J18 and J21 in positions 3 5 and 4 6 connect UART A to J24 header e UART B J23 o Jumpers in 3 5 and 4 6 position connect UART B to OSJTAG virtual serial port e Switches and LEDs J3 install jumper to indicated position to use a switch or LED o SW1 3 4 o SW2 1 2 o D1 5 6 o D2 7 8 TWR SER jumper settings e Ethernet o J12 ETH CONFIG all positions open o J2 CLK_SEL set to position 1 2 o J3 CLKIN_SEL open TWR MEM jumper settings e SDCARD slot o J12 SD SEL1 position 1 2 has to be closed for card detection o J2 SD_SEL2 set to position 1 2 o J3 SD_CS set to position 1 2 Freescale MQX Getting Started Freescale Semiconductor
7. K60D100M Freescale MQX Getting Started Freescale Semiconductor 31 Jit HEN V 2011 FREESCALE 25 TWR K60D100M Core Clock Bus Clock Default Console BSP Timer SS og O Z o AE OSJTAG USB mini connector Systick Important jumper settings e For standalone operation O TWR K60D100M Jumper J10 on position 1 2 e For using USB Host mode jumpers on position O O TWR SER board J16 on position 1 2 VB_HOST TWR SER board J10 on default position 1 2 USB host e For using USB Device mode jumpers on position O O TWR SER board J16 on position 3 4 VB_DEV TWR SER board J10 on position 2 3 USB device e To enable Ethernet communication use with TWR SER O 32 TWR K60D100M Jumper J10 on position 2 3 processor clock taken from the TWR SER board TWR SER CLK_SEL 3 4 TWR SER CLKIN SEL 2 3 processor clock is taken from PHY TWR SER ETH CONFIG J12 9 10 to select RMII communication mode Important Both processor and serial board TWR SER has to be plugged in the Tower Processor is using external clock from Ethernet PHY on the serial card Freescale MQX Getting Started Freescale Semiconductor Known Issues e Some Compact Flash cards does not work correctly with TWR MEM and MQX CF Card driver An issue in the TWR MEM CPLD code REV A causes incorrect communication with some types of cards e g Kingston A fixed CPLD firmware is available in lt install dir gt
8. Licenses IV Limit console output eip Install Update Processor Expert Remote Launch Remote Systems Run Debug Console H A D H External Tools Launching Perspectives String Substitution View Management Target Configurations Team Terminal Traditional Memory Rendering Console buffer size characters fan Displayed tab width Je IV Show when program writes to standard out IV Show when program writes to standard error Standard Out text color a Standard Error text color mn Standard In text color mn Background color E Restore Defaults Apply 9 ct Freescale Semiconductor Freescale MQX Getting Started 11 4 2 2 IAR Embedded Workbench for ARM The IAR EWARM IDE supports the Semihost communication channel for both input and output directions The Semihost options must be enabled in project preferences Options for node hello_twrk60n51 2 Category General Options C C Compiler Assembler Output Converter Output Library Configuration Library Options MISRA C 2004 MISR 4 Custom Build J ES Build Actions Library Description Linker Normal Use the normal configuration of the C C Debugger runtime library No locale interface C locale no file descriptor support no multibytes in printf and scanf and no hex floats in strtod Simulator Angel GDB Server IAR ROM monitor J Link J Trace TOOL
9. Process After any change to the compile time user configuration file or MQX kernel source files the MQX libraries need to be re built The build process is similar with all core components e The output directory is lt install dir gt lib lt board gt lt ide gt lt target gt lt component gt where lt ide gt is a name of build tool For example when CodeWarrior 10 tool is used to build MQX PSP and BSP libraries for TWR K60D100M board in debug targets the libraries are built into the lib twrk60d100m cw10 debug psp and lib twrk60d100m cw10 debug bsp directories Note In the MQX 4 0 the libraries output paths were changed The target names are now part of library output path while the name of the library file is the same for all targets The Debug versions of the libraries are no longer created with the d suffix which makes it easier to create custom build targets and change different versions of libraries easily in the application projects e All public header files needed by application are automatically copied from internal include folders to the same output directory as the library itself e During PSP or BSP build process also the user_config h file and other header files from the config lt board gt and config common directories are copied into the lib lt board gt lt compiler gt lt target gt output directory Freescale MQX Getting Started 4 Freescale Semiconductor It is strongly recommended to recompile all MQ
10. Processor Expert Ready BSP Sins os 20 6 3 Processor Expert MQX Demo Application ENNEN 21 6 4 Processor Expert and Default Clock Settings in Kinetis BSPS 000oocccccnncconncccaccccccnccccnnanaannnnnos 21 7 Board specific Information Related to MQX nnnvvvnnnnnnnnnnnnnnnnvnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnvennnnnnnnnnnn 22 GE eo EE 22 rn GEER ER 22 TA GEER E ONE A EA 23 7 2 1 TWR K20D50M AAA EEEE 23 AP 24 72 S 550 RE AE E E EAEE 25 TFT je 26 2225 TR ON 28 7205 MR TB Pape 29 TDN 30 728 TRE TIM ee esse 31 ER EE 33 Freescale MQX Getting Started Freescale Semiconductor 72 10 TIRA TO OM dias 35 7 2 11 KwikStik MK40X256 rrrnnnnnnrrrrrrrrrrrrrrrrrrrrrrrrrerrrrrsrrrrrrrsrrrsrerrsrssrrrsrrsrsrsrssrrersrsrersrssessen 37 To GOOFI VI Lassen eee 38 TS TWRMGESTIET28 does 38 4 ele 40 7 4 1 TWR MCF52259 K IT i eeruvrnnnvnrarnvrnnnevrannnrnnnenvannernnnenvanenrnnnenvanenrnnnennunenrnnnennnnenrnnnernunenvnnnen 40 7 4 2 M52259DEMO ee 42 7 4 3 M52259EVB silke ls eee 43 A A 44 5 TWREMGE5441 8 KIM cei coi e rear 44 TO a IETA aa OE E E AN dd traca rat 48 7 65 TWRPXD 102 ee 48 RU E BEEN 49 TO TIA PA O a ee td 50 RER E d ME EE 52 Freescale MQX Getting Started 2 Freescale Semiconductor 1 Read Me First This document describes steps required to configure the CodeWarrior development tool and use it to build run and debug applications of the Freescale MQX RTOS operating system This document also provides board specif
11. SEL 2 3 processor clock is taken from PHY o TWR SER ETH CONFIG J12 9 10 to select RMII communication mode o Important Both processor and serial board TWR SER has to be plugged in the Tower Processor is using external clock from Ethernet PHY on the serial card e To enable USB communication o TWR SER2 J21 USB VBUS EN shunt for USBHS Known Issues e Some Compact Flash cards does not work correctly with TWR MEM and MQX CF Card driver An issue in the TWR MEM CPLD code REV A causes incorrect communication with some types of cards e g Kingston A fixed CPLD firmware is available in lt install dir gt mqx source io pccard twr mem pccard cpld folder The firmware can be loaded to the TWR MEM CPLD using Altera Quartus Il design tool and BLASTER connection cable e The layout design of TWR_K60F120M RevB board does not allow Nandflash module to run at 24Mhz clock In order to increase working clock speed we may use drive strength attribute for nandflash pins In this package Nandflash module in RevB board worked properly at 20Mhz clock e Example projects contain different build configurations for code execution from Flash or RAM memory The RAM based execution may be faster to debug but not all examples fit into RAM and may fail to link Board specific build targets e Int Flash SramData Debug and Release this target enables to build applications that execute code from internal flash and use internal SRAM for application d
12. SetupKinetisClock UsingPE pdf Freescale MQX Getting Started Freescale Semiconductor 21 7 Board specific Information Related to MQX This section provides more details about all boards and BSPs supported by current MQX distribution All jumper and other hardware switches not specifically described below are expected in factory default positions Please refer to the board User s Guide for the default settings 7 1 Vybrid 7 1 1 TWR VF65GS10 USB Standard A routed to EHCI1 USB Host functionality USB Micro AB routed to EHCIO USB Host and Device functionality OpenSDA debug interface Power Supply ARM Cortex A5 core twrvf65gs10_a5 BSP Core Clock 396 Mhz Default Console ttyb ttyc for boards TWR SER or TWR SER2 RS232 RevA RevB BSP Timer EPIT1 ARM Cortex M4 core twrvf65gs10_m4 BSP Core Clock 132 Mhz Default Console ttyb ttyc for boards TWR SER or TWR SER2 RS232 RevA RevB BSP Timer Systick Freescale MQX Getting Started 22 Freescale Semiconductor 7 2 Kinetis 7 2 1 TWR K20D50M Core Clock 48 MHz Bus Clock 48 MHz Default Console OSJTAG USB mini connector BSP Timer Systick Important jumper settings e For using USB Device mode jumpers on position o TWR K20D50M board J26 open o TWR K20D50M board J30 on position 5 6 VREGIN e For using USB Host mode jumpers on position o TWR K20D50M board J26 on position 1 2 o TWR K20D50M board J30 on position 5 6 VREGIN Kn
13. arar ps 4 LE 51015 Mee 4 EAR Build Targets IP AP PP 5 2 3 1 Library Build Pare Sesion eee ee en ee eee 5 2 3 2 Application Build Targets cansion aise desea ieee Os eed 5 2 4 Freescale CodeWarrior Development Studio version 10x 6 2 5 IAR Embedded Workbench for ARM and Code 6 2 6 ARM Keil uVision4 Development Environment Gupport 6 2 7 ARM Development Studio 5 DS 5 Environment Support 7 2 8 Building NOX using WAGES corista on ia fs acc 7 3 Creating New MQX Proj ct ima 8 3 1 Freescale CodeWarrior Development Studio version 10x 8 3 2 Other Development Tools ENNEN 9 4 MQX Standard Input and Output Channel Setting cccccccccccccccccccccccncncncncnnononononnnnnnnnns 10 4 1 Default IO Gramenet 10 4 2 Using the DebuglO Driver as the Default IO Channel 10 4 2 1 Freescale CodeWarrior Development Studio version 10 11 4 2 2 IAR Embedded Workbench for ADM 12 42 3 ARM Kol UVISIONA octanos 12 5 Task Aware Debugging Plug in 14 5 1 CodeWarrior Development Studio version 10 14 5 1 1 Debugging in CodeWarrior Development Studio version 10 X cccccccccncccncnnnnnnnnnnnnnnnnos 14 5 1 2 CodeWarrior 10 x Task Aware Debugger plug jn 15 5 2 IAR Embedded Workbench for ARM and Cold Fire cccccocccccnnccocococcccnccononcnananocononononananano nono 19 5 3 ARM Keil REE ade 19 EM 19 6 Integrating Processor Expert Drivers into MQX BSP nsssvvnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnvnnnnnnnnnnnnn 20 An PA o ee ee 20 6 2
14. new one Select application type Ze New application Example application Select example application Di Basic examples Di Demos MFS examples RTCS examples USB Device examples USB Host examples Finish Cancel Select the MQX libraries to be included in your project MQX 3 6 Project Jl x MQX options Select additional MQX libraries to add to the project IV Add RTCS support IV Add MFS support IV Add USB Host support IV Add Shell support IV Add USB Device support 2 om The Wizard offers two types of project Freescale MQX Getting Started 8 Freescale Semiconductor e Empty application a simple Hello world application with selected MQX libraries included e Basic application an application showing basic code to initialize selected MQX components lolx MQX project type Select empty application or basic application Application type Empty application Basic application 7 lt Back Finish Cancel e f the Basic application is selected the Wizard continues by several other steps to gather information about what initialization code to generate o RTCS option RTCS TCP IP stack is initialized and set to static or dynamic IP address based on user selection o USB Device or Host option Stack and selected class drivers are initialized based on user selection o MFS option the RAM disk initialization code can be enabled
15. proper Launch Configuration e For selected Launch Configuration go to the Debugger tab and then activate the OS Awareness sub tab e Inthe Target OS drop down list box select the MQX OS for your target platform Freescale MQX Getting Started 16 Freescale Semiconductor Debug Configurations xj Create manage and run configurations Download an application to a target then debug or run the application Name lwdemo twrk60n512 Int Flash Debug PEOSJTAG Source PE Environment E Common g Trace and Profile E CodeWarrior Attach M Debugger options i E CodeWarrior Connect CodeWarrior Download Debug Exceptions Interrupts Download PIC Other Executables Symboligs 05 Awareness E lwdemo_twrk60n512_In p a T OS MQX OS for Cort r Iwdemo twrk60n512 Inl test3_twrk60n512_Int_f test3_twrk60n512_Int_f i test3 twrk60n512 Int F Launch Group JPJPPIPP Filter matched 10 of 10 items 2 Ces o e All example applications coming with Freescale MQX RTOS are already configured for the MQX OS Awareness CodeWarrior 10 x TAD Features The MQX plug in implements the System Browser window showing all running MQX tasks Open the Show View dialog by selecting the Window Show View Other menu In the Show View tree view select the System Browse
16. pull down Freescale MQX Getting Started Freescale Semiconductor e J3 SD CS on position 1 2 to enable SD Card data 3 signal e J13 on position 1 2 to enable SD Card write protect signal Board specific build targets Ext Flash Debug and Release these targets enable to build applications suitable for booting the system up from external NAND Flash memory After the reset the initialization code of the application bootstrap is loaded from NAND Flash to SRAM This initialization code copies the rest of the application to the DDR RAM memory and executes the application there Note that this could take a while especially if a large application is started See NAND Flashing procedure bellow There are two variants of Ext Flash target in the application projects one for external P amp E BDM interface PEBDM Ext Flash and one for on board OSBDM interface OSBDM Ext Flash The OSBDM debugging connection does not work correctly with the old version of the OSBDM firmware Please update the OSBDM firmware before using this target Note that when using the OSBDM interface the TWR MCF54418 KIT still has to be powered by the USB attached to the primary elevator See chapter Olt is strongly recommended to recompile all MQX libraries after any change to the config common user_config h file Important No changes should be made to header files in the output build directory 1ib The files get overwritten any time the libraries are built Build T
17. 2 e To enable USB operation in DEVICE mode o TWR SER board J16 shunt on pins 3 4 o TWR SER board J10 shunt on pins 2 3 e To enable SD Card operation o TWR MEM Board J3 on position 1 2 to route QSPI_PCSO to SD Card Chip Select o TWR MEM Board J4 remove shunt on pins 1 2 to disable ASPI_PCSO routing to serial Flash o TWR MEM board J13 on position 1 2 to enable SD Card write protect signal e To enable CompactFlash Card operation available on Memory Storey board o TWR MEM board J16 on position 2 3 e To use write protect detection signals with SD Card on the Memory Storey board o TWR MCF52259 board turn off switch 3 on SW2 dip switch e To select either CSO or CS1 for SPI Flash o TWR MEM board J14 on position 1 2 CSO e To use TWR LCD board with eGUI o TWR LCD board SW5 all switches to ON enable touch screen o TWR LCD board SW1 switches depending on usage either SPI 01111110 or 16 bits FlexBus 10111110 o TWR MCF52259 board to enable navigation buttons set SW2 dip 2 and SW2 dip 3 to OFF Board specific build targets None See Freescale chapter Olt is strongly recommended to recompile all MQX libraries after any change to the config common user config h file Important No changes should be made to header files in the output build directory 1ib The files get overwritten any time the libraries are built e Build Targets for more details about standard build targets The Ext MRAM Debug target can be used only with Mem
18. 2 3 processor clock is taken from PHY o TWR SER ETH CONFIG J12 9 10 to select RMII communication mode o Important Both processor and serial board TWR SER has to be plugged in the Tower Processor is using external clock from Ethernet PHY on the serial card e To use TWR LCD board with eGUI o TWR LCD board SW5 all switches to ON enable touch screen o TWR LCD board SW1 switches depending on usage either SPI 01111110 or 16 bits FlexBus 10111110 o TWR K60N512 open J3 13 14 Known Issues e The FlexBus FB_AD9 PTC6 signal on the TWR K60N512 REV C board is directly connected to IRDA sensor This prevents using FlexBus for communication with MRAM and CF CARD on TWR MEM card e Example projects contain different build configurations for code execution from Flash or RAM memory The RAM based execution may be faster to debug but not all examples fit into RAM and may fail to link e TWR LCD board doesn t work correctly when navigation buttons are used o Usage of center navigation button on TWR LCD board is in conflict with LCD RESET signal Both signals are shared on main elevator A11 and A63 Other Notes e The default console interface ttyf is routed to OSBDM COM USB mini connector J13 Use the P amp E Micro OSJTAG terminal to access board serial line e To enable TWR SER RS232 interface change the BSP_DEFAULT_IO_CHANNEL configuration option to ttyd in the mgx source bsp twrk60n512 twrk60n512 h file 7 2 8 TWR
19. 9 D11 on board using GPIO driver The ewm_task task is periodically refreshing watchdog within a time out period at which watchdog can be refreshed A o See the FSL MOX in CW 10 x pdf document for detailed information about demo application importing and building the MQX library projects and debugging MQX application in CodeWarrior 10 x This document is a part of the MQX installation package 6 4 Processor Expert and Default Clock Settings in Kinetis BSPs The MQX 3 8 introduces the low power management features on Kinetis platforms Key building blocks of this solution are the Low Power Manager and Clock Manager modules The Clock Manager allows runtime switching between clock configurations statically defined at the BSP level Three predefined clock configurations are available for Kinetis based platforms e 96MHz normal run mode MGG PEE mode e 12MHz normal run mode MCG PEE mode used also for auto trimming the internal oscillator e 2MHz low power run mode MCG BLPI mode The code behind setting the clock configuration in the Kinetis BSPs was generated by the Processor Expert tool and it is not trivial do be changed manually see bsp_cm c and hfiles Use the Processor Expert to generate new or change the existing clock configurations Refer to separate document How to Change Default Clock Settings in Kinetis BSPs The document is included in the MQX installation as the lt mgx_install_dir gt doc tools cwl0 Howto
20. C_MDC o J10 at position 2 3 FEC MDIO e To enable RTC operation from external crystal o H2 at position 1 2 e To enable RTC sourced from battery o J17 at position 1 2 Board specific build targets None See chapter Olt is strongly recommended to recompile all MQX libraries after any change to the config common user_ config h file e Important No changes should be made to header files in the output build directory lib The files get overwritten any time the libraries are built Build Targets for more details about standard build targets Freescale MQX Getting Started Freescale Semiconductor 43 Other information Firmware source code for Altera CPLD is available in lt MQX install dir gt mqx source io pccard m52259evb_pccard_cpld directory 7 5 ColdFire V4 7 5 1 TWR MCF54418 KIT The MCF54418 Patch supports the following hardware configuration TWR MCF54418 Rev D processor board TWR SER2 Rev C serial board TWR ELEV Primary and Secondary four storey elevator boards TWR MEM Rev B memory extension board Re ECH 111 w4 RB SSS BRR BRAS Core Clock 250 MHz Bus Clock 125 MHz Default Console ttyd RS232 BSP Timer PITO Important both processor and serial board TWR SER2 has to be plugged into the Elevator bus The MCF54418 processor is using external clock generated by Ethernet PHY on the Serial card Jumper settings TWR MCF54418 Rev D board use highlighted setting for basic MQX o
21. Getting Started 24 Freescale Semiconductor Known Issues e AR IDE version 6 40 has problems to connect board using JLINK probe Use OSBDM instead e Example projects contain different build configurations for code execution from Flash or RAM memory The RAM based execution may be faster to debug but not all examples fit into RAM and may fail to link e Unable to use USB host with onboard usb connection when led D9 is used There is shared pin PTC9 to control the led and power supply for USB host on board REV B e For correct SD card driver operation on this board the default console has to be changed to ttya The SCI1 module mapped to ttyb and SPI1 module used as SD card communication channel share pin PTE1 Other Notes e The default console interface ttyb is routed to OSBDM COM USB mini connector Use the P amp E Micro OSJTAG terminal to access board serial line e tis recommended to use TTYA for terminal when SPI1 module is used because SCI1 module and SPI1 module share pin PTE1 7 2 3 TWR K21D50M o 1 1 52 AMMAR M AAAS Core Clock Bus Clock Default Console BSP Timer Systick OSJTAG USB mini connector Important jumper settings e For using Tower USB Freescale MQX Getting Started Freescale Semiconductor 25 o TWR K21D50M board shoot 6 8 on J11 o Install R224 R226 on nets USBO DP and USBO_DN and remove R225 R227 on K21 MICRO USB DP and K21 MICRO USB DN For using Micro USB in K21 tow
22. Getting Started with Freescale MQX RTOS PRODUCT Freescale MQX RTOS PRODUCT VERSION 4 0 0 DESCRIPTION Getting Started with the Freescale MQX RTOS version 4 0 0 RELEASE DATE December 7 2012 Freescale Semiconductor Inc 2012 All rights reserved A N 8 freescale semiconductor How to Reach Us Home Page www freescale com Web Support http www freescale com support USA Europe or Locations Not Listed Freescale Semiconductor Inc Technical Information Center EL516 2100 East Elliot Road Tempe Arizona 85284 1 800 521 6274 or 1 480 768 2130 www freescale com support Europe Middle East and Africa Freescale Halbleiter Deutschland GmbH Technical Information Center Schatzbogen 7 81829 Muenchen Germany 44 1296 380 456 English 46 8 52200080 English 49 89 92103 559 German 33 1 69 35 48 48 French www freescale com support Japan Freescale Semiconductor Japan Ltd Headquarters ARCO Tower 15F 1 8 1 Shimo Meguro Meguro ku Tokyo 153 0064 Japan 0120 191014 or 81 3 5437 9125 support japan freescale com Asia Pacific Freescale Semiconductor China Ltd Exchange Building 23F No 118 Jianguo Road Chaoyang District Beijing 100022 China 86 10 5879 8000 support asia freescale com Information in this document is provided solely to enable system and software implementers to use Freescale Semiconductor products There are no express or implied co
23. KIT_DIR ANCACADLib TI Stellaris FTDI Macraigor Library low level interface implementation CMSIS PE micro O None stdout stderr Use CMSIS ST LINK a e DSP library Third Party Driver IAR breakpoint O Via SWO TI XDS100 The console can be opened from View Terminal I O IAR menu See detailed information about setting up the debugger connection in separate document Getting Started with Freescale MQX RTOS and IAR Embedded Workbench The document is included in the MQX installation as the lt max install dir gt doc tools iar MQX IAR Getting Started pdf 4 2 3 ARM Keil uVision4 As the ARM Keil uVision4 IDE does not support the Semihost output The ITM mode must be used instead The ITM communication channel for both input and output directions is supported The following pictures show how to set up ITM when the UlinkPro programmer is used Freescale MQX Getting Started 12 Freescale Semiconductor Cortex M Target Driver Setup Debug Trace Flash Download UUNK USB JTAG SW Adapter r SW Device Serial No Pos481 06 v IDCODE Device Name Move SWDIO 0x2B401477 ARM CoreSight Sw DP Up ULINK Version ULINKpro SR RE J Device Family EE M Down Firmware Version Men 50 great ID CODE EN SW F sws Par sw Manual Configuration Device Name Max Clock 1MH2 D Add Delete Update IF len Debug Connect amp Reset Options Cache Options r Download Options Connect No
24. Mode connects RE to DE Freescale MQX Getting Started 45 3 4 Loopback Mode connects TXO_P to RXO P 5 6 Loopback Mode connects TXO_N to RXO N 78 NC 9 10 5V Supply to DB9 J13 on position 1 2 RS232 485 Disable UART 1 1 2 Disables RS485 2 3 Disables RS232 J16 no jumper VBUS OC Isolation 1 2 Connects USB VBUS OC to Elevator J19 no jumper UART2 Connector J20 no jumper UART3 Connector J21 no jumper VBUS EN Isolation 1 2 Connects USB VBUS EN to Elevator J22 no jumper RS232 UART2 Isolation 1 2 Connects TX to T1IN 3 4 Connects RX to R1OUT 5 6 Connects RTS to T2IN 7 8 Connect CTS to R2OUT J23 no jumper RS232 UARTS Isolation 1 2 Connects TX to T1IN 3 4 Connects RX to R1OUT 5 6 Connects RTS to T2IN 7 8 Connect CTS to R2OUT J24 no jumper USB Device Mode 1 2 Device Mode capable of powering Tower System SW1 1 on 2 on MII MODE pull up RXDV 3 4 5 6 7 8 off SW2 1 on 3 on MII MODE pull up 50MHz 2 4 5 6 7 8 off TWR MEM Rev A TWR MEM can operate only with TWR SER2 card in default setting Use TWR SER board for SDHC operation For eSDHC operation 46 J12 SD SEL1 on position 1 2 to enable SD Card detect signal J12 SD SEL1 on position 5 6 to enable SD Card data 1 signal J12 SD SEL1 on position 7 8 to enable SD Card data 2 signal J12 SD SEL1 on position 9 10 to enable SD Card cmd pull up J12 SD SEL1 on position 11 12 to enable SD Card data 0 pull up J2 SD SEL2 on position 2 3 to enable SD Card data 3
25. SB VBUS EN shunt Known Issues FlexCAN1 pins PTC16 and PTC17 are shared with NAND flash memory pins on the TWR K70FN1M REV A board Even these pins are correctly set for the FlexCAN1 functionality CAN1_RX CAN1_TX signals are not correctly routed to the TJA1050 High speed CAN transceiver on the TWR SER board This prevents correct FlexCAN example functionality As RTC and CTS signals are not routed correctly from the TWR K70FN1M REV A board to the RS485 connector of the TWR SER board the RS485 demo application does not work correctly Example projects contain different build configurations for code execution from Flash or RAM memory The RAM based execution may be faster to debug but not all examples fit into RAM and may fail to link Board specific build targets 36 Int Flash SramData Debug and Release this target enables to build applications that execute code from internal flash and use internal SRAM for application data Int Flash DDRData Debug and Release this target enables to build applications that execute code from internal flash and use external DDR2 memory for application data See chapter Olt is strongly recommended to recompile all MQX libraries after any change to the config common user_ config h file Important No changes should be made to header files in the output build directory lib The files get overwritten any time the libraries are built Build Targets for more details about standard build
26. X libraries after any change to the config common user config n file Important No changes should be made to header files in the output build directory 1ib The files get overwritten any time the libraries are built 2 3 Build Targets 2 3 1 Library Build Targets Each build project in Freescale MQX RTOS contains multiple compiler linker configurations so called build targets Two different types of build targets exist for different compiler optimization settings e Debug the compiler optimizations are turned off or set to low The compiled code is easy to debug but may be less effective and much larger than the Release build Libraries are compiled into 1ib lt board gt lt compiler gt debug lt component gt directories e Release the compiler optimizations are set to maximum The compiled code is very hard to debug and should be used for final applications only Libraries are compiled into lib lt board gt lt compiler gt release lt component gt directories Note The library path name pattern was changed in the MQX 4 0 The _d suffix for was removed from library This change simplifies creation of custom build targets and also enables to change different versions of libraries easily in the application projects In order for the application to use libraries compiled in a different build target it is enough to set proper library search paths in the application project settings The library names referred by the
27. alized data bss type sections including MQX system memory pool to the 160 KB on chip Graphics SRAM no ECC protection starting at the real address 0x60000000 The 48 KB on chip ECC protected SRAM is initialized by the BSP cleared on MCU startup Unsupported peripherals and features TWR PXD10 processor board s Winbond Dual QuadSPI memory W25Q64CV is not supported by the TWRPXD10 BSP Because TWR PXD10 REV B processor board doesn t connect the MCU to SPI SD card module of TWR MEM the TWRPXD10 BSP doesn t support SD card The TWR MEM serial flash memory AT26DF081A SU is supported by the BSP 7 6 2 TWR PXS20 The TWRPXS20 BSP TWR PXS20 REV A board pal fi BLE ES freescal la fo AXION n WWW QXMAN CO pi ME BE ALAN System Clock Crystal oscillator Default Console OSJTAG virtual serial port BSP Timer E200 decrementer Optionally PITO QPIT Important jumper settings e 5V power supply J16 Freescale MQX Getting Started Freescale Semiconductor 49 o 1 2 powered from elevator o 3 4 default powered from onboard mini USB o 5 6 powered from onboard DC in connector e 3V3 power supply J5 o 1 2 powered from elevator o 2 3 default onboard 3V3 regulator e FlexCAN o By default FlexCAN 1 connected to TWR_SER board is used o To use FlexCAN 0 connected to J14 connector position J6 jumpers to 3 5 and 4 6 and set J5 as closed factory default positions Microcontroller mode The PXS20 microcont
28. and building MQX libraries and debugging MQX application in CodeWarrior 10 This document is a part of the MQX installation package 2 5 IAR Embedded Workbench for ARM and ColdFire The Freescale MQX RTOS provides support for IAR EWARM version 6 40 2 The support of the IAR EWARM version 5 50 6 was discontinued in MQX 3 7 0 To rebuild the MQX libraries open and batch build the following IAR EWARM workspace lt mgx install dir gt config lt board gt iar build libs eww The output directory is lt mqx install dir gt lib lt board gt iar See detailed information about the MQX support in IAR tools in separate document Getting Started with Freescale MQX RTOS and IAR Embedded Workbench The document is included in the MQX installation in the lt mqx install dir gt doc tools iar MQX IAR Getting Started paf 2 6 ARM Keil uVision4 Development Environment Support The Freescale MQX RTOS provides support for MDK ARM Keil uVision4 version 4 50 Freescale MQX Getting Started 6 Freescale Semiconductor To rebuild the MQX libraries open and batch build the following uVision4 Multi Project Workspace lt mgx install dir gt config lt board gt uv4 build libs uvmpw The output directory is lt mgx install dir gt lib lt board gt uv4 See detailed information about the MQX support in ARM tools in separate document Getting Started with Freescale MQX RTOS and MDK ARM Keil uVision4 The document is included in the MQX
29. application project remain unchanged Different ABI options are not supported anymore by MQX User may add different ABI builds as custom targets 2 3 2 Application Build Targets Build target name of any MQX application project makes a reference either to Debug or Release builds of the core libraries On top of that the target names also specify board memory configuration which gets built For example e Devices with internal Flash memory e g K60D100M o Int Flash Release this target is suitable for final application deployment When programmed to Flash the application starts immediately after reset Variables are allocated in internal SRAM memory o Int Flash Debug same as above only the Debug compiled libraries are used This target is suitable for debugging before deployment On boards without external memory this is the only target suitable for debugging larger applications e Boards with external MRAM memory M52259EVB etc o Ext MRAM Debug solely for debugging purposes with code located in external MRAM memory available e g on the M52259EVB Variables are located in internal SRAM Part of the external MRAM memory may also be used for additional RAM memory pools Application executable is loaded to MRAM automatically by the debugger e Boards with external RAM memory o Ext Ram Debug solely for debugging purposes with code located in external RAM memory available as SDRAM e g on the M54455EVB Both code and v
30. argets for more details about standard build targets NAND Flashing Procedure The CodeWarrior Development Studios for ColdFire V7 2 2 and for MCU v10 x do not provide NAND Flashing functionality this functionality is planned for future releases The MQX release contains standalone CFFlashprog utility which enables NAND Flashing using P amp E Micro BDM interface OSBDM is not supported The NAND Flashing Procedure is as follows e Connect the P amp E Micro BDM cable to the board and switch on the power e Compile the PEBDM Ext Flash target in the selected CodeWarrior project e Ensure you have SW1 DIP switch set correctly for the NAND booting see jumper setting above e Locate lt output_name gt rbin file which should be created in the application output directory e Open Windows Command Line Prompt run cmd exe and change directory to lt install dir gt tools flash programmer CFFlashprog e Use cf exe NAND erase M54418TWR_nand 0 200000 command to erase first 2Mbytes of NAND Flash memory e Use cf exe NAND write M54418TWR_nand 0 200000 1 lt path_to_rbin_file gt command to write application code to the NAND Flash memory e For more detailed description of the NAND Flash tool see lt install dir gt tools flash programmer CFFlashprog ReadMe txt Known Issues e Some Compact Flash cards does not work correctly with TWR MEM and MQX CF Card driver There may be several reasons o An issue in the TWR MEM CPLD code REV A cause
31. ariables are Freescale MQX Getting Started Freescale Semiconductor located in this external memory Application executable is loaded to RAM automatically by the debugger e Boards and devices with internal Flash memory and additional external RAM for data TWR K70F120M o Int Flash lt mem gt Data Debug The name of each target additionally defines a memory used as the default data storage For example the application built with target named Int Flash DDRData Debug will execute code out of internal Flash memory and will use the DDR memory for data storage 2 4 Freescale CodeWarrior Development Studio version 10 x To rebuild the MQX libraries navigate to an appropriate folder in the Windows Explorer drag the lt board gt wsd file and drop it into the CodeWarrior project view The MQX library projects will be imported to CodeWarrior working space together with build configurations settings Location of working set description wsd file is lt mqx install dir gt config lt board gt cw10 lt board gt wsd The output directory is max install dir gt lib lt board gt cw10 Note The wsd file import requires the MQX CodeWarrior plugins to be installed Functionality is supported for CodeWarrior version 10 2 or newer and requires the MQX CW plugin installed see chapter 5 1 2 for installation description See lt mqx install dir gt doc tools cw FSL MQX in CW 10 x pdf document for detailed information about importing
32. arted pdf Freescale MQX Getting Started Freescale Semiconductor 13 5 Task Aware Debugging Plug in MQX Task Aware Debugging plug in TAD is an optional extension to a debugger tool which enables easy debugging of multi tasking applications It helps to visualize internal MQX data structures task specific information l O device drivers and other MQX context data The MQX TAD is available for the following platforms e Eclipse based CodeWarrior Development Studio version 10 x e IAR Embedded Workbench for ARM versions 5 and 6 e ARM Keil uVision4 tested with version 4 22 e ARM DS 5 version 5 12 TAD plug in available directly from ARM e Lauterbach TAD plug in available directly from Lauterbach 5 1 CodeWarrior Development Studio version 10 x 5 1 1 Debugging in CodeWarrior Development Studio version 10 x Follow the steps bellow to debug an MQX application e Import open the application project in to CodeWarrior workspace using the File Import General Existing Project menu e Build project using the Project Build Project menu e Open Debug Configurations settings using the Run Debug Configurations menu and select target you want to debug in the CodeWarrior Download tree Freescale MQX Getting Started 14 Freescale Semiconductor Debug Configurations pp xj Create manage and run configurations O The file associated with this launch configuration is read only and cannot be modified Lexa Na
33. ask Aware Debugger Plug in TAD for CodeWarrior 10 x Development Studio Installing CodeWarrior 10 3 TAD and New Project Wizard Plug ins Both TAD and New Project Wizard plug ins can be installed directly from CW10 3 IDE using Help Install New Software menu Installing CodeWarrior 10 1 amp 10 2 TAD and New Project Wizard Plug ins TAD plug in DLL is installed into the selected CodeWarrior tool automatically during Freescale MQX RTOS setup process In case plug in was not properly installed for example to a newly installed CodeWarrior studio perform the following steps to install TAD manually Freescale MQX Getting Started Freescale Semiconductor 15 e Close The CodeWarrior 10 x IDE e Locate the tools codewarrior extensions CW MCU v10 x directory in the Freescale MQX RTOS installation folder by default c Program Files Freescale Freescale MOX x y e Navigate to lt mox install dir gt tools codewarrior extensions CW MCU v10 x directory e Open the command like console and execute the command install cwlO plugin bat lt CW10 x install dir gt Note that the typical CodeWarrior 10 x installation folder is c Program Files Freescale CW MCU v10 x e Re start the CodeWarrior 10 x IDE Enabling the TAD functionality when debugging your MQX application project e Open Debug Configurations settings of your application project by selecting the Run Debug Configurations menu In the Debugger Configuration panel select
34. ata Other Notes e The default console interface ttyf is routed to OSBDM COM USB mini connector J13 Use the P amp E Micro OSJTAG terminal to access board serial line e To enable TWR SER RS232 interface change the BSP_DEFAULT_IO_CHANNEL configuration option to ttyd in the max1sourceYbspltwrk60 120m1twrk60 120m h file Freescale MQX Getting Started 34 Freescale Semiconductor 7 2 10 TWR K70F120M Primary swi Connector SW2 Infra red Touch SLCD General TWRPI Socket Purpose Tower Plug In TWRPI Accelerometer zg K LED Touch g Cf Buttons E1 E4 PK70FN1MOVMJ12 Processor SW3 Reset Power OSJTAG Mini B USB Connector Secondary Connector Core Clock 120 MHz Bus Clock 60 MHz Default Console OSJTAG USB mini connector BSP Timer Systick Important jumper settings board REV A e For standalone operation o TWR K70FN1M Jumper J18 on position 1 2 e To enable Ethernet communication use with TWR SER o TWR K70FN1M Jumper J18 on position 2 3 processor clock taken from the TWR SER board o TWR SER CLK_SEL 3 4 o TWR SER CLKIN SEL 2 3 processor clock is taken from PHY o TWR SER ETH CONFIG J12 9 10 to select RMII communication mode o Important Both processor and serial board TWR SER has to be plugged in the Tower Processor is using external clock from Ethernet PHY on the serial card e USB communication TWR SER setup o USBFS KHCIO module this BSP is pre confi
35. e builds will be expanded to cover all boards and BSPs in future MQX versions Please use the mingw32 make version 3 8 2 or higher Download the latest version from http sourceforge net projects mingw To rebuild the MQX libraries navigate to the lt mgx install dir gt build lt board gt make directory and run the following command building MQX using the GCC from CW10 3 toolchain C VMinGW bin mingw32 make exe build TOOL gcc cw CONFIG debug Note Prior the build you should specify the path TOOLCHAIN ROOTDIR variable to your build tools in the lt mgx install dir gt build common make global mak Freescale MQX Getting Started Freescale Semiconductor 7 3 Creating New MQX Project 3 1 Freescale CodeWarrior Development Studio version 10 x The Freescale MQX RTOS setup installs the MQX New Project Wizard plug in into CodeWarrior 10 x installation directory The Project Wizard helps to select one of the supported evaluation boards include appropriate MQX libraries and create initial application project The project wizard is available in the File New MQX Projects menu in the CodeWarrior 10 x IDE Follow the steps displayed by the Wizard specify application name and select the target evaluation board The wizard may create a new application or import one of existing examples to your workspace Start with the New application wizard Select Application type and template Select example project or create a
36. er board o TWR K21D50M board shoot 5 6 on J11 o Leave R225 and R227 on nets K21 MICRO USB DP and K21 MICRO USB DN and do not populate R224 and R226 on USBO DP and USBO DN For using USB Host mode jumpers on position o TWR SER board J16 on position 1 2 VB HOST o TWR SER board J10 on default position 1 2 USB host For using USB Device mode jumpers on position o TWR SER board J16 on position 3 4 VB DEV o TWR SER board J10 on position 2 3 USB device For using UARTO with Primary Elevator PTA14 and PTA15 jumper J13 on position 2 3 For SD card operation o TWR MEM board J2 SD SEL2 set to position 1 2 o TWR MEM board J3 SD CS set to position 1 2 o TWR MEM board J12 SD SEL1 jumper on position 3 4 IRQA o TWR MEM board J13 jumper installed Known Issues Example projects contain different build configurations for code execution from Flash or RAM memory The RAM based execution may be faster to debug but not all examples fit into RAM and may fail to link K21D50M has issues flashing by J Link in CW 10 2 Other Notes For KEIL ARM Compiler the libraries are pre compiled for Release target only Debug target need to be compiled before first use 7 2 4 TWR K40X256 Freescale MQX Getting Started Freescale Semiconductor Core Clock Bus Clock Default Console BSP Timer Systick OSJTAG USB mini connector Important jumper settings e To use TWR LCD board with eGUI o TWR LCD board SW5 all s
37. g USB Device mode jumpers on position o TWR SER board J16 on position 3 4 VB DEV o TWR SER board J10 on position 2 3 USB device Known Issues e Example projects contain different build configurations for code execution from Flash or RAM memory The RAM based execution may be faster to debug but not all examples fit into RAM and may fail to link Freescale MQX Getting Started 28 Freescale Semiconductor Other Notes e The default console interface ttya is routed to OSBDM COM USB mini connector Use the P amp E Micro OSJTAG terminal to access board serial line e To enable the TWR SER RS232 interface change the BSP DEFAULT IO CHANNEL configuration option to ttyd in the mgx source bsp twrk40x256 twrk40x256 h file 7 2 6 TWR K53N512 SW2 Primary SW1 Connector lu 000000 Infra Red Touch SLCD G IP e eneral Purpos TWRPI Socket Tower Plug In TWRPI Socket LED Touch Buttons SWS Reset E1 E2 Power OSJTAG PK53N512CMD100 Mini B USB Microcontroller Connector Medical Connector Secondary Connector MMA7660 Accelerometer Core Clock Bus Clock Default Console BSP Timer Systick OSJTAG USB mini connector Important jumper settings board REV C e For standalone operation using clock from TWR K53N512 board o To use 50MHz Jumper J11 on position 1 2 e To enable Ethernet communication use with TWR SER o TWR K53N512 Jumper 11 on position 2 3 processor clock taken from
38. gured to use USBFS module KHCIO by default Try various USB Host and Device example applications and use USB MINIAB connector on TWR SER board as USB communication channel o USBHS EHCIO module TWR SER does not allow use of the USBHS module e USB communication TWR SER2 setup Freescale MQX Getting Started Freescale Semiconductor 35 o USBFS KHCIO module This BSP is pre configured to use USBFS module by default The USBFS is connected to USB HOST USB A connector only USB device functionality is not available due to HW limitations o USBHS EHCIO module To enable USBHS EHCIO change BSP settings as follows and recompile BSP The USBHS EHCIO is connected to USB OTG USB mini AB connector define USBCFG DEFAULT DEVICE CONTROLLER bsp usb dev ehci0 if define USBCFG DEFAULT HOST CONTROLLER bsp usb host ehci0 if in the lt mgx_install_dir gt mqx source bsp twrk70f120m twrk70f 120m h TWR SER2 J21 USB VBUS EN shunt o The keyboard2mouse example application demonstrates usage of the KHCI Host and EHCI Device modules in one demo The example requires following setup in BSP recompilation of BSP is required define USBCFG DEFAULT DEVICE CONTROLLER bsp usb dey ehci0 if define USBCFG DEFAULT HOST CONTROLLER bsp usb khci ehci0 if in the lt mgx_install_dir gt mqx source bsp twrk70f120m twrk70f 120m h TWR SER2 J21 U
39. he PC serial interface and used with a suitable terminal program e g Hyper Terminal e Serial lO channel routed via combined OSBDM OSJTAG debugging and communication port directly on the board On the microcontroller side the communication interface is connected to one of serial SCI UART ports On the PC Host side you can use either a virtual USB serial port driver or a special USB communication terminal application Refer to the development board documentation more details e DebuglO channel connecting PC and target processor using the debugging probe lO functionality See more information below in Using the DebuglO Driver as the Default IO Channel Default serial IO channel setting e Baud Rate 115200 e Data bits 8 e no parity e 1 stop bit and no flow control Pre defined default IO channel setting is specified for each board in the mgx source bsp lt board_name gt board_name h header file This setting can be overridden in the user config h file by adding the following code and rebuilding BSP library To set the default IO channel to the UART2 serial interface mapped to ttyc device in MQX use define BSP DEFAULT IO CHANNEL EYES Also ensure that the serial channel ttyc in this case in enabled in user config h file define BSPCFG ENABLE TTYC 1 4 2 Using the DebuglO Driver as the Default IO Channel The standard input and output channel can be redirected to the DebuglO driver allowing processor to c
40. ic information related to the MQX RTOS Freescale MQX Getting Started Freescale Semiconductor 2 Building the MQX Libraries 2 1 Compile time Configuration Major compile time configuration options are centralized in a single user configuration file located in lt install_dir gt config lt board gt user_ config h This user configuration file is included internally by private configuration files in MQX PSP and BSP and other core components such as RTCS USB Shell etc To share configuration settings between different boards the user config h file may include other header files with common settings The header files may only be located in the same lt board gt directory or in the common directory lt install_dir gt config common Note In MQX releases prior MQX 4 0 the configuration header files were included from different locations when compiling the BSP PSP projects and other library projects The BSP and PSP code included the user config h file from the original config folder while other libraries like RTCS or MFS were using a copied version of the this file from the 1ib folder This was changed in MQX 4 0 such that all libraries are using the user config h file from the conf ig folder Note This change removes the requirement to build the libraries in certain order Prior the MQX 4 0 the PSP and BSP libraries must have been built first before other libraries Keeping this order is no longer required 2 2 Build
41. installation in the lt mqx install dir gt doc tools uv4 MQX uVision4 Getting Started pdf 2 7 ARM Development Studio 5 DS 5 Environment Support The Freescale MQX RTOS provides support for ARM DS 5 version 5 12 To rebuild the MQX libraries import library projects to the DS 5 workspace lt mgx install dir gt mqx build ds5 bsp lt board gt project lt mqx install dir gt mqx build ds5 psp lt board gt project lt mqx install dir gt mfs build ds5 mfs lt board gt project lt mqx install dir gt rtcs build ds5 rtcs lt board gt project lt mgx install dir gt usb host build ds5 usbh lt board gt project lt mgx install dir gt usb device build ds5 usbd lt board gt project lt mgx install dir gt shell build ds5 shell lt board gt project The output directory is lt mgx install dir gt lib lt board gt ds5 See detailed information about the MQX support in ARM tools in separate document Getting Started with Freescale MQX RTOS and ARM Design Studio 5 The document is included in the MQX installation in the lt mqx install dir gt doc tools uv4 MQX DS5 Getting Started pdf 2 8 Building MQX using Makefiles The MQX version 4 0 contains the Makefiles for command line build of libraries and applications for selected platforms The Makefiles were tested using the GCC compiler included in the CodeWarrior 10 3 as well as by the other build tools supported in MQX The support for Makefile command lin
42. me hello twrk40x256 Int Flash Debug PEOSJTAG type filter text a Main Gr Arguments 5 Debugger E7 Source PS Environment E Common S Trace and Profile E CodeWarrior Attach E CodeWarrior Connect M CiC application CodeWarrior Download Project hello_twrk40x256 EE c hello_twrk40x256_Int_Flash_Debug_PEOSITAG a hello tmrk40x256 Int Flash Release PEOSJTAG Application int Flash Debug intflash d afx Search Project Browse Variables i E hello twrk40x256 Int Ram Debug PEOSJTAG J Connect process input output to a terminal Launch Group Remote system LA EA Darata Systeme sid Apply Revert Filter matched 7 of 7 items E o e Select connection type you want to use in the Remote system list If your connection is not available in the list define new one using New menu o Select Hardware and Simulator Connection name and System type o In System tab specify nitialize target as lib lt board gt cwl10 bsp lt target gt dbg init_kinetis tcl and Memory configuration as 1ib lt board gt cw10 bsp lt target gt dbg lt board gt mem e Press the Debug button in Debug configuration Window The CodeWarrior will be switched to a debug perspective and will stop the program in the main function 5 1 2 CodeWarrior 10 x Task Aware Debugger plug in Freescale MQX RTOS introduces a new version of T
43. n o TWR MCF51JF board J6 on position 1 2 JF_USB_ENA o TWR MCF51JF board J7 on position 1 2 JF_USB_FLGA o TWR MCF51JF board J13 on position 1 2 and 6 8 e For using USB Host mode jumpers on position o TWR SER board J16 on position 1 2 VB HOST o TWR SER board J10 on default position 1 2 USB host o TWR MCF51JF board J13 on position 1 2 and 6 8 e For using USB Device mode jumpers on position o TWR SER board J16 on position 3 4 VB DEV o TWR SER board J10 on position 2 3 USB device o TWR MCF51JF board J13 on position 1 2 and 6 8 e For using RAM disk jumpers on position o TWR MEM board J16 remove o TWR MEM board J11 remove default e For using USBDCD jumpers on position o Remove J8 jumper and short between pin 1 of J8 and pin 5 of J13 on TWR MCF51JF board e For using SD Card o TWR MEM board J3 SD CS jumper on position 1 2 to enable SD Card CS signal o TWR MEM board J12 SD SEL1 remove jumper from 1 2 and insert jumper on 3 4 Board specific build targets e Internal Flash Debug and Release these targets enable to build applications suitable for booting the system up from Internal Flash memory After the reset the code will be executed from Internal Flash See chapter Olt is strongly recommended to recompile all MQX libraries after any change to the config common user_config h file Important No changes should be made to header files in the output build directory 1ib The files get overwritten any time the libra
44. ommunicate with computer via the debugger probe The MQX RTOS currently supports ARM Freescale MQX Getting Started 10 Freescale Semiconductor Cortex M Semihost and ITM technologies Note that the communication has to be properly set up in the debugger on the PC host side The default IO channel to can be set to the DebuglO adding following code to the user config h define BSP DEFAULT IO CHANNEL iodebug The debuglO driver has to be enabled define BSPCFG_ENABLE_ IOD EBUG 1 See the MQX I O User Guide for more information on the DebuglO driver setting ITM vs semihost mode buffer setting The tool related setting is described in following chapters Note Using the IO Debug as input should be avoided reading from Semihost port causes the microprocessor core to halt 4 2 1 Freescale CodeWarrior Development Studio version 10 The Code Warrior 10 IDE supports the Semihost communication channel for output direction only input is not supported by CW10 1 Internal DebuglO buffer should be used to speed up communication see IO manual for detailed description The console can be opened from Window Show View Console CW10 menu Note The Fixed width console option should be unchecked in the Run Debug Console preferences in CW10 1 i ox Console 5 rv General E Analysis S El CCH I Fixed width console Coloring Editor Maximum character width 80 Geert
45. ory Storey Board Freescale MQX Getting Started Freescale Semiconductor 41 Other notes The OSBDM Firmware compatibility issue may affect application debugging See Freescale MQX Release Notes for more details about OSBDM Firmware Compatibility 7 4 2 M52259DEMO Core Clock Bus Clock Default Console BSP Timer RS232 Important jumper settings e None Other notes The FEC_MDC pin is shared with GPIO signal used to sense the SW1 button state The Ethernet link status monitoring is not functional in demos which use SW1 button all HVAC demos The OSBDM Firmware compatibility issue may affect application debugging See Freescale MQX Release Notes for more details about OSBDM Firmware Compatibility Board specific build targets e None See chapter Olt is strongly recommended to recompile all MQX libraries after any change to the config common user config h file Freescale MQX Getting Started 42 Freescale Semiconductor e Important No changes should be made to header files in the output build directory lib The files get overwritten any time the libraries are built e Build Targets for more details about standard build targets 7 4 3 M52259EVB Core Clock Bus Clock Default Console BSP Timer RS232 Important jumper settings e To enable MDIO MDC communication between processor and Ethernet PHY device needed in RTCS applications to detect Ethernet link status o J9 at position 2 3 FE
46. ot be changed in runtime thus proper mode needs to be set prior running application on the MCU The TWRPXS30 BSP expects the microcontroller to work in DPM As this is the factory default there is no need for switching the microcontroller mode The TWRPXS30 BSP takes advantage of DPM by starting two instances of MQX one on each core from a single image Each instance of MQX may use different set of drivers and execute different set of tasks For details see separate document describing MQX operation on multicore devices Unsupported peripherals and features Onboard 12C accelerometer does not need any extra support from BSP side expect of 12C however the accelerometer used is currently not currently covered by accelerometer demo application Card presence in SDCARD slot on TWR MEM cannot be detected due to HW limitation of TWR PXS30 board Current version of BSP does not perform initialization of DRAM interface and thus does not use external on board memory 7 6 4 TWR PXN20 The TWRPXN20 BSP supports TWR PXN20 REV A board System Clock 80 MHz Crystal oscillator Default Console ttya J24 header ttyb default OSJTAG virtual serial port Freescale MQX Getting Started 52 Freescale Semiconductor ttyc TWR SER BSP Timer E200 decrementer Optionally PIT timer QPIT Important jumper settings e Crystal oscillator J8 J9 o J8 and JQ in 1 2 position connect 40 MHz crystal to the CPU e UART A J18 J21 o Jumpers
47. own Issues e The default console ttyb which is used by the OSJTAG is also routed to the RS232 TWR SER interface what sometimes may lead to conflicts e Timer interrupt wakeup from LLS power mode leads to chip reset with the reset cause Set to core lockup e The switch to VLPR power mode does not work the chip does not acknowledge the power mode change in PMSTAT register Freescale MQX Getting Started Freescale Semiconductor 23 Other Notes e USB is only available on TWR K20D50M board it is not routed to the port on the TWR SER board e In contrary to majority of other boards example projects are provided only with configurations to be run from Internal Flash Memory due to small RAM size available on the K20D50 processor 7 2 2 TWR K20D72M Core Clock 72 MHz Bus Clock Default Console OSJTAG USB mini connector BSP Timer Systick Important jumper settings e Onboard connector do not work as Host by default See known issues bellow For using USB Host mode with TWR SER board set jumpers on position o TWR SER board J16 on position 1 2 VB_HOST o TWR SER board J10 on default position 1 2 USB host e By default use on board connector In case you want use the USB Device mode with TWR SER board set jumpers on position o TWR SER board J16 on position 3 4 VB DEV o TWR SER board J10 on position 2 3 USB device e For SD card operation o TWR MEM board jumper J12 on position 3 4 IRQA Freescale MQX
48. peration J2 on position 1 2 Input Clock Selection Freescale MQX Getting Started 44 Freescale Semiconductor 1 2 2 3 J8 on position 1 2 1 2 2 3 J6 on position 1 2 J5 on position 3 4 external clock RMII clock from TWR SER2 board onboard 25MHz clock TCK PSTCLK Routing PSCCLK routed to pin 24 of BDM header J11 PSTCLK routed to pin 6 of BDM header J11 To enable PE micro debugger Boot Mode Selection 1 2 amp 3 4 Internal RCON 3 4 External RCON No Jumper Serial Boot J4 no jumper J10 no jumper 8 Ohm speaker connector IRQ active at high level J12 no jumper MCU Reset In Sw Both off SW1 1 on 2 off 3 on 4 off 5 off 6 on 7 on 8 on booting from NAND TWR SER2 rev C Board use highlighted setting for basic MQX operation J1 on position 2 3 1 2 2 3 J2 on position 2 3 1 2 2 3 J4 no jumper 1 2 3 4 5 6 RS232 485 RX Select UART1 RS485 Mode connects RX to RO RS232 Mode connects RX to R1OUT RS232 485 TX Select UART1 RS485 Mode connects TX to Dl RS232 Mode connects TX to T1IN Can Isolation Connects CAN Sto S Connects CAN TX to TXD Connects CAN RX to RXD J7 on positions 1 2 3 4 JS16 RS232 Isolation UARTO 1 2 3 4 J8 no jumper 1 2 J9 no jumper 1 2 J11 no jumper 1 2 Freescale Semiconductor Connects RX to S08JS16 RXD Connects TX to S08JS16 TXD Power Down Port B Disables Ethernet PHY B Power Down Port A Disables Ethernet PHY A RS485 Config UART1 Loopback
49. products for any such unintended or unauthorized application Buyer shall indemnify and hold Freescale Semiconductor and its officers employees subsidiaries affiliates and distributors harmless against all claims costs damages and expenses and reasonable attorney fees arising out of directly or indirectly any claim of personal injury or death associated with such unintended or unauthorized use even if such claim alleges that Freescale Semiconductor was negligent regarding the design or manufacture of the part 2 freescale Freescale and the Freescale logo are trademarks of Freescale Semiconductor Inc ARC the ARC logo ARCangel ARCform ARChitect ARCompact ARCtangent BlueForm CASSEIA High C C High C iCon186 MetaDeveloper MQX Precise Solution Precise BlazeNet Precise EDS Precise MFS Precise MQX Precise MQX Test Suites Precise RTCS RTCS SeeCode TotalCore Turbo186 Turbo86 V8 u RISC V8 microRISC and VAutomation are trademarks of ARC International High C and MetaWare are registered under ARC International All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2012 All rights reserved Rev 09 12 2012 Table of Contents Getting Started with Freescale MQX RTOS i ernsavennnnnnnvrnnnvnnnnnnnnnennnnnnnnnnnnernnnvennnnnnnnnnsnnennnnnnnnennner i THead Me Fel 3 2 Building the MQX Libraries ii nia 4 2 1 Compile time Configuration iciincnta
50. pyright licenses granted hereunder to design or fabricate any integrated circuits or integrated circuits based on the information in this document Freescale Semiconductor reserves the right to make changes without further notice to any products herein Freescale Semiconductor makes no warranty representation or guarantee regarding the suitability of its products for any particular purpose nor does Freescale Semiconductor assume any liability arising out of the application or use of any product or circuit and specifically disclaims any and all liability including without limitation consequential or incidental damages Typical parameters that may be provided in Freescale Semiconductor data sheets and or specifications can and do vary in different applications and actual performance may vary over time All operating parameters including Typicals must be validated for each customer application by customer s technical experts Freescale Semiconductor does not convey any license under its patent rights nor the rights of others Freescale Semiconductor products are not designed intended or authorized for use as components in systems intended for surgical implant into the body or other applications intended to support or sustain life or for any other application in which the failure of the Freescale Semiconductor product could create a situation where personal injury or death may occur Should Buyer purchase or use Freescale Semiconductor
51. r item in Debug tree You can double click any task entry in this view to activate the task in the CodeWarrior 10 x debugger Freescale MQX Getting Started Freescale Semiconductor 17 HVAC ID 0x10001 TD 0x2000146c 0x10001 Suspended KHCI Task ID 0x 10004 TD 0x20003214 0x10004 Running Shell ID 0x 10002 TD 0x2000 laac 0x10002 Running TCP IP ID 0x 10005 TD 0x20004238 0x10005 Running USB ID 0x 10003 TD 0x200026c8 0x10003 Running httpd server ID 0x 10006 TD 0x20009034 0x10006 Running El HVAC 0x2000 1368 Examine Task Task Identification HVAC Scheduling AutoStart Task Status A Active Messages 0x0 Shell 0x200019a8 Ready USB 0x200025c4 LW Event Blocked KHCI Task 0x20003110 LW Event Blocked TCP IP 0x20004134 Rx Msg Blocked timeout httpd server 0x20008f30 Msg Send Blocked Examine Task Task Identification Name HVAC Scheduling Flags AutoStart Task Status State Active Messages Cur Msg 0x0 Shell 0x200025b4 0x2000 1260 0x2000230c USB 0x20002f14 0x2000267c 0x20002c5c KHCI Task 0x20003828 0x200031e8 0x200036ec TCP IP 0x20004dc4 0x2000420c 0x20004b28 httpd server 0x200099cc 0x20009008 0x200095c4 Interrupt 0x20000ec0 0x20000ac0 0x20000de4 Freescale MQX Getting Started 18 Freescale Semiconductor The MQX Memory Block Summary screen is available in the MQX Lightweight Memory Blocks menu Start 0x200004c4 End Ox2000fff0 Size 0x0000fb2c 62 0K Highest 0x2000474c 16 0K 26 Pool valid Yes
52. ries are built Freescale MQX Getting Started Freescale Semiconductor 39 e Build Targets for more details about standard build targets 7 4 ColdFire V2 7 4 1 TWR MCF52259 KIT TWR MCF52259 KIT Rev A consists of o MCF52259 microcontroller module board o TWR ELEV four storey elevator boards o TWR SER serial board o optional TWR MEM memory extension board o optional TWR LCD display board Core Clock 80 MHz Bus Clock 40 MHz Default Console ttyb RS232 BSP Timer PITO Important jumper settings e For abasic operation make sure the following settings is applied o TWR SER board J2 on default position 1 2 PHY CLK SEL 25MHz o TWR SER board J3 shunt removed CLKIN_SEL o TWR SER board J15 on default position 1 2 SER SEL enabling RS232 operation o TWR SER board J17 on default position 1 2 RXD_SEL enabling RS232 operation Freescale MQX Getting Started 40 Freescale Semiconductor o TWR SER board J18 shunt removed RTS SEL no RS232 flow control o TWR SER board J19 on default position 1 2 TXD SEL enabling RS232 operation e To enable external MRAM memory available on Memory Storey board o TWR MEM board J10 on position 1 2 o TWR MEM board J11 shunt removed e To enable Ethernet in addition to basic operation jumper setting above o TWR SER board J12 shunt on pins 15 16 for duplex operation e To enable USB operation in HOST mode o TWR SER board J16 shunt on pins 1 2 o TWR SER board J10 shunt on pins 1
53. rmal y Reset Autodetect y Iw Cache Code I Verify Code Download mg in ee M Cache Memory Download to Flash DK Cancel Cortex M Target Driver Setup Debug Trace Flash Download Core Clock 10 000000 MHz IV Trace Enable UnlimitedTrace I ETM Trace Enable o m Timestamps m Trace Events Serial Wire Output Manchester y IV Enable Prescaler hr D CPI Cycles per Instruction I EXC Exception overhead SWD Clock Prescaler 1 PC Sampling SLEEP Sleep Cycles IV Autodetect 102416 y EH Prescaler 1024716 I LSU Load Store Unit Cycles SWO Clock 10 000000 MHz IV Periodic Period 1 638 ms I FOLD Folded Instructions Ton Data RAW Sample Y EXCTRC Exception Tracing ITM Stimulus Ports Port 24 23 Port 16 15 Port oe Port 0 Enable OXFFFFFFFF aas seg WII VV WM Privilege 0x00000008 Port 31 24 v Port 23 16 I Port 15 8 I Port 7 0 I To show the console view during the debug session go to menu View Serial Windows Debug printf Viewer You can find more information about using Keil and ULINK settings at http Awww arm com files pdf Kinetis LAB pdf See detailed information about setting up the debugger connection in separate document Getting Started with Freescale MQX RTOS and MDK ARM Keil uVision4 The document is included in the MQX installation as the lt mgx_install_dir gt doc tools uv4 MOX uVision4 Getting St
54. roller may operate either in lock step mode LSM or decoupled parallel mode DPM In LSM both cores execute the same code at the same time for safety applications while in DPM cores execute code independently on each other so there are effectively two processors available The mode is selected by LSM DPM bit in shadow FLASH area Factory setting is LSM The mode cannot be changed in runtime thus proper mode needs to be set prior running application on the MCU The TWRPXS20 BSP expects microcontroller to work in LSM As this is the factory default there is no need for switching the microcontroller mode Unsupported peripherals The current BSP does not contain support for analog peripherals no ADC support Onboard SPI accelerometer does not need any extra support from BSP side except of SPI however the accelerometer used is currently not currently covered by accelerometer demo application 7 6 3 TWR PXS30 The TWRPXS30 BSP supports TWR PXS30 REV B board UO K 3 freescale TET vy da e ET 4 date p be e es PS Freescale MQX Getting Started 50 Freescale Semiconductor System Clock 180 MHz Crystal oscillator 40 MHz Default Console ttyb core 0 OSJTAG virtual serial port ttyd core 1 TWR SER2 J20 or J23 header BSP Timer E200 decrementer Optionally PITO QPIT Important jumper settings e Crystal oscillator J19 o 3 5 and 4 6 default connect 40 MHz crystal to the CPU e CPU reset J7 o
55. rong processor pins SDHCO_D4 SDHCO_D7 The problem is present on KwikStik Rev 1 4 boards the Rev 5 boards are solving this issue 7 3 ColdFire V1 7 3 1 TWR MCF51JF128 The MCF51JF128 BSP was tested with following hardware configuration e TWR MCF51JF128 Rev A processor board e TWR SER Rev C serial board e TWR ELEV Primary and Secondary four storey elevator boards e TWR MEM Rev B memory extension board optional Core Clock 48 MHz Bus Clock Default Console RS232 on TWR SER board BSP Timer MTIM1 Important jumper settings For basic operations make sure following jumper settings are applied e For using CHIP in normal mode o TWR MCF51JF board J17 no Shunt Disable Bootload e For using CRC module o TWR SER board J3 on position 2 3 external clock 50MHz o TWR MCF51JF board J2 on default position 1 2 external clock 50MHz Freescale MQX Getting Started 38 Freescale Semiconductor e For using USB MICRO AB5 port for USB DCD module connecting by supported cable o TWR MCF51JF board J13 on default position 1 2 P5V_TRG_USB o TWR MCF51JF board J13 on default position 5 6 P5V_JF_USB e For using USB Device Charger Detection jumpers on position o TWR MCF51JF board J8 removed o Pin1 on J8 connect to position 5 6 on J13 PTD5 connect to JF_VREGIN e For using ADC connect to POTENTIOMETER jumpers on position o TWR MCF51JF board J8 on position 1 2 ADCO_SE12 e For using USB host or device jumpers on positio
56. s incorrect communication with some types of cards e g Kingston A fixed CPLD firmware is available in Freescale MQX Getting Started Freescale Semiconductor 47 install dir gt mqx source io pccardtwr mem pccard cpld folder The firmware can be loaded to the TWR MEM CPLD using Altera Quartus II design tool and BLASTER connection cable o M54418 MQX CF card driver incorrectly detects the card in the slot If you experience this behavior connect two pull up resistors between card detect pins CF CD1 CF CD2 and 3 3V VCC 7 6 PowerPC 7 6 1 TWR PXD10 The TWRPXD10 BSP supports TWR PXD10 REV B board System Clock 64 MHz Crystal oscillator 8 MHz Default Console ttyb LINFlex 1 OSJTAG virtual serial port or TWR SER board BSP Timer PIT Channel 0 Important jumper settings e OSJTAG virtual serial port console o TWR PXD10 board J17 on position 1 2 o TWR PXD10 board J18 on position 1 2 e TWR SER serial port console o TWR PXD10 board J17 on position 2 3 o TWR PXD10 board J17 on position 2 3 o TWR SER board J15 on position 1 2 o TWR SER board J19 on position 1 2 o TWR SER board J17 on position 1 2 Freescale MQX Getting Started 48 Freescale Semiconductor e TWR SER CAN bus o TWR PXD10 board J13 on position 2 3 o TWR PXD10 board J14 on position 2 3 o TWR SER board J5 as TWR SER defaults J5 shunts on 1 2 3 4 5 6 7 8 and 9 10 Microcontroller memory map TWRPXD10 BSP maps the initialized and non initi
57. s the lt mqx install dir gt doc tools ds5 MQX DS5 Getting Started pdf Freescale MQX Getting Started Freescale Semiconductor 19 6 Integrating Processor Expert Drivers into MQX BSP 6 1 Introduction The Processor Expert tool which is available in CodeWarrior 10 x allows configuration and driver code generation by using graphical user interface The special RTOS Adapter component in Processor Expert and updated BSP code coming in MQX enables to integrate the Processor Expert drivers into the BSP library The Processor Expert drivers can be used by the MQX application just like other drivers from the BSP Currently this integration is supported only for Freescale Kinetis platforms Processor Expert Logical Device Drivers LDD available for Kinetis family can be added into PE ready BSPs and used in the end user application Debug amp Documentation 3 Generated_Code Generic IO Drivers Peripheral IO Drivers Sources twrk60n512 BSP Files gt twrk60n512 User Config i D B ProcessorExpert pe Configurations dl TWRK60NS12 amp Operating System MQX1 MQX 5 Cpus i amp BD Cpu MK60NS12VMD100 Embedded Components 1 88 GPIO1 GPIO LDD z ED TRG TimerUnit_LDD SN DAL DAC_LDD 4 59 wDog1 watchDog LDD i 6 Pwm TimerUnit LDD pe demo twrks0n512 A
58. targets Freescale MQX Getting Started Freescale Semiconductor Other Notes e The default console interface ttyf is routed to OSBDM COM USB mini connector J13 Use the P amp E Micro OSJTAG terminal to access board serial line e To enable TWR SER RS232 interface change the BSP_DEFAULT_IO_CHANNEL configuration option to ttyc in the mqx source bsp twrk70 120m twrk70 120m h file 7 2 11 KwikStik MK40X256 The KwikStik BSP was tested in following hardware configuration e KwikStik processor board tested with Rev 4 e TWR SER serial board e TWR ELEV Primary and Secondary four storey elevator boards e TWR MEM memory extension board optional jojo AAA III Core Clock 96 MHz Bus Clock Default Console RS232 DB9 on TWR SER board The board have to be powered from USB connected to TWR ELEV card BSP Timer Systick Important jumper settings e For using RAM disk jumpers on position o TWR MEM board J16 remove o TWR MEM board J11 remove default Board specific build targets Known issues e RTC clock The VBAT pin is not being powered R117 is DNP in the schematics on the KwikStik Rev 1 4 boards Rev 5 boards are solving this issue Enabling RTC in older revision boards prevents using the card board is automatically rebooted during startup Freescale MQX Getting Started Freescale Semiconductor 37 e SD Card driver The SD card connector s data pins DATAO DATAS are connected to the w
59. the TWR SER board Jumper 32 on position 1 2 jumper 33 on position 1 2 o TWR SER CLK SEL 3 4 o TWR SER CLKIN SEL 2 3 processor clock is taken from PHY o TWR SER ETH CONFIG J12 9 10 to select RMII communication mode Freescale MQX Getting Started Freescale Semiconductor 29 o Important Both processor and serial board TWR SER has to be plugged in the Tower Processor is using external clock from Ethernet PHY on the serial card e For using USB Host mode jumpers on position o TWR SER board J16 on position 1 2 VB_HOST o TWR SER board J10 on default position 1 2 USB host e For using USB Device mode jumpers on position o TWR SER board J16 on position 3 4 VB_DEV o TWR SER board J10 on position 2 3 USB device e For using RAM disk jumpers on position o TWR MEM board J16 remove o TWR MEM board J11 remove default e For using TWRPI SLCD o TWR K53N512 jumper 32 on position 1 2 jumper 33 on position 1 2 7 2 7 TWR K60N512 A nui N Wm u Wu Core Clock 96 MHz Bus Clock 48 MHz Default Console OSJTAG USB mini connector BSP Timer Systick Freescale MQX Getting Started 30 Freescale Semiconductor Important jumper settings board REV C e For standalone operation o TWR K60N512 Jumper J6 on position 1 2 e To enable Ethernet communication use with TWR SER o TWR K60N512 Jumper J6 on position 2 3 processor clock taken from the TWR SER board o TWR SER CLK_SEL 3 4 o TWR SER CLKIN SEL
60. witches to ON enable touch screen o TWR LCD board SW1 switches depending on usage either SPI 01111110 or 16 bits FlexBus 10111110 o TWR K40X256 open J7 3 4 5 6 7 8 o TWR K40X256 open J14 15 16 o TWR K40X256 board to enable navigation buttons open J4 1 2 Known Issues e The FlexBus FB OE B signal is directly connected to OE pin of the address latch on the TWR MEM card This prevents using FlexBus for communication with MRAM and CF CARD on TWR MEM card e Example projects contain different build configurations for code execution from Flash or RAM memory The RAM based execution may be faster to debug but not all examples fit into RAM and may fail to link Other Notes e The default console interface ttya is routed to OSBDM COM USB mini connector Use the P amp E Micro OSJTAG terminal to access board serial line Freescale MQX Getting Started Freescale Semiconductor 27 e To enable the TWR SER RS232 interface change the BSP DEFAULT IO CHANNEL configuration option to ttyd in the mgx source bsp twrk40x256 twrk40x256 h file 7 2 5 TWR K40D100M DAM E Dafa VI a 3 PAG tre bai RAZ gt s it tA 2011 FRE Core Clock 96 MHz Bus Clock 48 MHz BSP Timer Systick OSJTAG USB mini connector Important jumper settings e For using USB Host mode jumpers on position o TWR SER board J16 on position 1 2 VB_HOST o TWR SER board J10 on default position 1 2 USB host e For usin
Download Pdf Manuals
Related Search
Related Contents
Manual de Utilização do Sócio Media Player Mdea User Manual Generic Operational Control Manual Manual de instruções Manual de Usuario95.cdr SERVICE MANUAL - Appliance Factory Parts Fusion Splicer TCW-605 - HIK User`s Manual - BCM Advanced Research Samsung F359 用户手册 fi9851p user manual - Foscam.us Copyright © All rights reserved.
Failed to retrieve file