Analog.com Analog Dialogue Wiki 简体中文
EngineerZone
EngineerZone
  • Log In
  • Site
  • Search
  • User
  • Support

    Popular Forums

    • RF and Microwave
    • Power Management
    • Video
    • FPGA Reference Designs
    • Precision ADCs
    • Linux Software Drivers
    • SigmaDSP Processors & SigmaStudio Dev. Tool

    Product Forums

    • A2B
    • Amplifiers
    • Analog Microcontrollers
    • Clock and Timing
    • Data Converters
    • Direct Digital Synthesis (DDS)
    • Energy Monitoring and Metering
    • Interface and Isolation
    • MEMS Inertial Sensors
    • Processors and DSP
    • Switches/Multiplexers
    • Temperature Sensors
    • Voltage References
    View All

    Application Forums

    • Audio
    • Automated Test Equipment (ATE)
    • Condition-Based Monitoring
    • Depth, Perception & Ranging Technologies
    • Embedded Vision Sensing Library
    • Motor Control Hardware Platforms
    • Optical Sensing
    • Precision Technology Signal Chains Library
    • Video
    • Wireless Sensor Networks Reference Library

    Design Center Forums

    • ACE Evaluation Software
    • ADEF System Platforms
    • Design Tools and Calculators
    • FPGA Reference Designs
    • Linux Software Drivers
    • Microcontroller no-OS Drivers
    • Reference Designs
    • Signal Chain Power (SCP)
    • Software Interface Tools
    • System Demonstration Platform (SDP) Support
  • Learn

    Highlighted Webinar

    Multidimensional Simulations of Beamformers and other RF Integrated Circuits in Keysight SystemVue

    Recent Discussions

    • Issue running built programs on Pluto
    • Activity: Simple Op Amps, For ADALM1000 Fig. 1.3 Buffering example
    • ADALM-PLUTO [NETWORK] vs [USB_ETHERNET]
    • Using buffer size different from 2**n
    • ADALM1000 Pixelpulse feature Source Voltage / Measure Current explanation

    Places

    • ADI Education Home
    • ADI Education China
    • ADI Education India
    • ADI Education Philippines
    • StudentZone (Analog Dialogue)
    • Virtual Classroom

    Latest Webinars

    • Multidimensional Simulations of Beamformers and other RF Integrated Circuits in Keysight SystemVue
    • Improve Smart Building Energy Efficiency with Industrial Ethernet Controlled Air Conditioning (HVAC) Systems
    • Sustainable Motion Control Solutions for High Performance Servo Drives
    • Audio Design Solutions for Augmented and Virtual Reality (AR/VR) Glasses
    • Robust Industrial Motor Encoder Signal Chain Solutions
    View All Webinars
  • Community Hub

    Challenge Yourself!

      KCC's Quizzes: AQQ 236 about strange marking on airplane engines
    View All

    Places

    • Community Help
    • Logic Lounge

    Resources

    • EZ Code of Conduct
    • Getting Started Guide
    • ADI: Words Matter
    • Community Help Videos
    View All
  • Blogs

    Highlighted Blogs

    Crawl, Walk, And Run - The Journey To Create The Phaser

     

    Hardware Holds The Key To Making Industrial Systems IEC 62443 Compliant

    Latest Blogs

    • Behind the Scenes of DIYRadio Blogs: An Introduction
    • Empowering Surveillance Cameras To Capture A Scene Without Being Heard
    • Mastering The Metrics Makes Specifying Encoders Simpler
    • Understanding Secret Key Cryptography Without Formulas
    • 3 Reasons Why IO-Link is Changing Smart Factory Decision Making
    Read All Blogs

    ADI Blogs

    • EZ Spotlight
    • The Engineering Mind
  • Partners

    Electronic Design Services - PartnerZone

    • Boston Engineering
    • Calian, Advanced Technologies
    • Colorado Engineering Inc. (DBA CAES AT&E)
    • Clockworks Signal Processing
    • Epiq Solutions
    • Fidus
    • PalmSens
    • Richardson RFPD
    • Tri-Star Design, Inc.
    • VadaTech
    • Vanteon
    • X-Microwave
    View All
CrossCore Embedded Studio and Add-ins
  • Processors and DSP
  • Software and Development Tools
  • CrossCore Embedded Studio and Add-ins
  • Cancel
CrossCore Embedded Studio and Add-ins
Documents FAQ: CrossCore Embedded Studio STDIO is slow, and interrupts processing of real world data
  • Blogs
  • Q&A
  • Docs/FAQs
  • Members
  • Tags
  • More
  • Cancel
  • FAQ
  • +a.b silicon into a x.y silicon target: FAQ
  • +accel_xxxx: FAQ
  • +ADC & DAC in audio application: FAQ
  • +Add version of application in loader file: FAQ
  • +Add-in license: FAQ
  • +ADI_SPI_TRANSCEIVER: FAQ
  • +adi_spu_Init() API: FAQ
  • +ADSO-BF609 EZkit: FAQ
  • +ADSP-21364: FAQ
  • +ADSP-214xx: FAQ
  • +ADSP-21569 Ez-kit: FAQ
  • +ADSP-21569: FAQ
  • +ADSP-BF609 EZKIT: FAQ
  • +ADSP-BF609: FAQ
  • +ADSP-BF707: FAQ
  • +ADSP-BF70x: FAQ
  • +ADSP-SC589: FAQ
  • +ADSP-SC58x: FAQ
  • +ADSP-SC598: FAQ
  • +ADSP-SC5xx: FAQ
  • +ADSP21489: FAQ
  • +ADSP215xx: FAQ
  • +alignment pragma: FAQ
  • +ARM CORE: FAQ
  • +ARM to Sharc: FAQ
  • +avoid when a project is getting build: FAQ
  • +BF-609 Evaluation board: FAQ
  • +BF518 Processor: FAQ
  • +BF703: FAQ
  • +BF706 EZ-KIT: FAQ
  • +BF706: FAQ
  • +BF706mini BSP project: FAQ
  • +BF707 SPI: FAQ
  • +C source file: FAQ
  • +C++ code: FAQ
  • +C-code ISRs: FAQ
  • +Callback function: FAQ
  • +Calling Library Functions: FAQ
  • +cc1138: FAQ
  • +CCES: FAQ's
  • +cldp: FAQ
  • +CLKIN: FAQ
  • +Code folding in CCES: FAQ
  • +Configuring the Loader, Linker and Archiver: FAQ
  • +connect to the Blackfin: FAQ
  • -CrossCore Embedded Studio STDIO: FAQ
    • FAQ: CrossCore Embedded Studio STDIO is slow, and interrupts processing of real world data
    • FAQ: Does CrossCore Embedded Studio have a floating license option?
    • FAQ: Does CrossCore Embedded Studio Support C++ 11?
    • FAQ: Encountering the following error - ‘Invalid license file. The license file may be obsolete, corrupted, missing, or read-only’
    • FAQ: End of availability for Micrium Add-Ins for CrossCore Embedded Studio
    • FAQ: Error "Cannot Satisfy Dependency" when installing 3rd Party Plugin under CrossCore Embedded Studio
    • FAQ: How can I issue multiple Pre-Build or Post-Build Commands in CrossCore Embedded Studio
    • FAQ: How can I obtain the CrossCore Embedded Studio Software License Agreement?
    • FAQ: How do I update the Add-In version being used by my CrossCore Embedded Studio project?
    • FAQ: Importing and creating multi-core projects in CrossCore Embedded Studio
    • FAQ: Increasing the maximum number of sockets in the lwIP Add-In for CrossCore Embedded Studio
    • FAQ: Is it possible to install both a node-locked license and a corporate domain license on the same machine?
    • FAQ: Simulator Support for ADSP-BF70x in CrossCore Embedded Studio 1.1.0
    • FAQ: Support for Parallel Builds in CrossCore Embedded Studio
    • FAQ: Using Blackfin and SHARC from the command line in CrossCore Embedded Studio
    • FAQ: Using CMSIS packs from the command line in CrossCore Embedded Studio
    • FAQ: What are the different types of licenses for CrossCore Embedded Studio?
    • FAQ: What changes are needed to build a CrossCore Embedded Studio project after moving to another directory?
    • FAQ: What is the current working directory for the Elfloader in CrossCore Embedded Studio
    • FAQ: Where can I find details of CrossCore Software and Tools Anomaly Reports?
    • FAQ: Which versions of CrossCore Embedded Studio (CCES) do I need to install?
    • System Services and Device Drivers for CrossCore®︎ Embedded Studio Training Videos
    • [FAQ] : How to use custom platform with CCES_Runner.exe Utility
    • [FAQ] : Is there any restriction for defining normal-word variables in seg_dmda_nw section on SHARC+?
    • [FAQ]: How can I obtain university license for Crosscore embedded studio?
  • +CROSSCORE: FAQ
  • +Data Member Alignment: FAQ
  • +Device Driver programming: FAQ
  • +Difference between Emulator and Simulator: FAQ
  • +disable prelinker: FAQ
  • +Embedded applications: FAQ
  • +EV-21569-SOM: FAQ
  • +EXTCLK_MODE: FAQ
  • +How to access stereo channels individually in the Audio_Passthrough_I2S example present in GUL BSP?
  • +How to avoid CORE0 and DEBUG: FAQ
  • +How to build a specific code from single source file for a specific core?
  • +How to convert long double into string: FAQ
  • +how to deassert Slave: FAQ
  • +How to do profiling: FAQ
  • +How to protect shared code/ data: FAQ
  • +How to resolve audio distortion issue: FAQ
  • +HW Accelerator and SW libraries: FAQ
  • +Interrupt Vector Table: FAQ
  • +LDF from C code: FAQ
  • +linker map file: FAQ
  • +List of Processors: FAQ
  • +Loader File: FAQ
  • +MCAPI package: FAQ
  • +node-locked license: FAQ
  • +non-blocking peek functions: FAQ
  • Optimization in ARM
  • +Optimizer in C/C++ compiler: FAQ
  • +PART_SPECIFIC_HEADERS: FAQ
  • +path variables: FAQ
  • +peripheral Error: FAQ
  • +PINT modules: FAQ
  • +PM bus: FAQ
  • +Project Explorer tree: FAQ
  • +PWM mode: FAQ
  • +quad SPI mode: FAQ
  • +RTOS for older Blackfin or older SHARC: FAQ
  • +SC-573 EZkit: FAQ
  • +SDRAM: FAQ
  • +SHARC 21469: FAQ
  • +SHARC0: FAQ
  • +SHARC: FAQ
  • +sharing global data between cores: FAQ
  • +SigmaStudioForSHARC: FAQ
  • +SIMD code: FAQ
  • +SIMD: FAQ
  • +SPI core mode with callback: FAQ
  • +SPI flash: FAQ
  • +SPORT API: FAQ
  • +SPORT: FAQ
  • +SRCU bit: FAQ
  • +SSLDD 2.0 and SSLDD 3.0: FAQ
  • +SSLDD 3.0: FAQ
  • +SSLDD3.0: FAQ
  • +stack overflow: FAQ
  • +Static library & IP protection: FAQ
  • +suppress assembler preprocessor warning: FAQ
  • +system.svc: FAQ
  • +two PINT modules: FAQ
  • +TX and RX DMA Interrupts: FAQ
  • +U-Law and A-Law: FAQ
  • +UART Device Driver: FAQ
  • +UART ISR Callback: FAQ
  • +VisualDSP++: FAQ
  • +Wakeup processor from Hibernate: FAQ
  • +When callback occurs: FAQ
  • +word addressable program: FAQ
  • [FAQ] : Difference between ADZS-HPUSB and ADZS-USB ICE
  • [FAQ] : Does CCES have any API that can be used to build automation test platform with Python
  • [FAQ] : Does ICE-1000 supported ADSP-CM407F?
  • +[FAQ] : Driver example for Timer windowed watchdog period mode.
  • [FAQ] : Example code for SPORT slave trigger in ADSP-21569 Ezkit
  • [FAQ] : GUL-XP board with EZkit license
  • +[FAQ] : How to access darkmode appearance in CCES?
  • [FAQ] : How to obtain PCB library files for ADI processors
  • [FAQ] : How to pass arguments from command line in CCES runner
  • [FAQ] : How to use Device programmer in EVAL-ADICUP360 board
  • [FAQ] : Interrupt header files along with -char-size-32 switch in Sharc
  • [FAQ] : Is it possible to perform stepping into the code in CCES Runner.
  • [FAQ] : Is there a way to list symbols from library (*.dlb) file?
  • [FAQ] : Is there a way to mangle or remove internal symbols ?
  • [FAQ] : sizeof() built-in function in BF and Sharc processors
  • [FAQ] : Streaming Data input and output in CCES
  • [FAQ] : UART sample driver code for BF706mini
  • [FAQ]: Difference between Debug and Release configurations
  • [FAQ]: How to use "log10f_simd"
  • +µCOS-III Add-In: FAQ

FAQ: CrossCore Embedded Studio STDIO is slow, and interrupts processing of real world data

Question:

When I use STDIO functions, such as printf, the process is slow and incoming data is missed. Why?

---------------------------------------------

Answer:

The slow stdio operations which you are seeing are due to the manner in which STDIO operations are performed. A typical example is printf(), which performs three operations when it is used: It first does an open, then a read, then a close.

At each of these events, the DSP is halted by a hidden breakpoint (at the __primio label), the requested operation is performed, then the DSP is run again. When the DSP is halted, the emulator or debug agent gets a context switch request and, in the case of an Emulator, the context is transferred via JTAG, over USB to the host. Then memory operations are then performed as necessary. When the host is done, context is switched back to the DSP which requires USB traffic again, and the debug agent is set running. Multiply this by 3 times for the three operations (open, read, close) that a printf() does, and this takes time.

The context-switches between the DSP and the Host (PC) are performed whenever any STDIO is used, and consume quite a lot of time due to the data transfers necessary to do this. Although the HPUSB-ICE, USB-ICE and the ICE-100B (or EZ-KIT Debug Agent) perform the same switches, it should be quicker using the HPUSB-ICE as the HPUSB-ICE has higher bandwidth availability, and so can perform the context switches much faster.

If you are using an emulator and are unhappy with the speed, then you may simply need to scale down the amount of data you are trying to log via printf. Unfortunately, due to the way stdio operations are performed via JTAG, it is slower, and can disrupt the real-time metrics of your application due to the number of halt/run commands.

The best way to improve the STDIO performance, though, is to eradicate the context switches by taking the Emulator/Debug agent out of the process, which can be done by redirecting STDIO to a local peripheral, for example UART or USB, which would allow you to pipe data to a terminal application (such as HyperTerminal) via the Serial Port on your PC. You can find detailed information on how to do this in the System Runtime Documentation within CCES Help (Help->Contents->CrossCore Embedded Studio 2.x.x->System Runtime Documentation->STDIO PrimIO). You can also find information within the System Services and Device Drivers User Guide (Help->Contents->CrossCore Embedded Studio 2.x.x->System Runtime Documentation->System Services and Device Drivers->ADSP-BF609 API Reference->Modules->STDIO Service).

  • Share
  • History
  • More
  • Cancel
Related
Recommended
Social
Quick Links
  • About ADI
  • ADI Signals+
  • Analog Dialogue
  • Careers
  • Contact us
  • Investor Relations
  • News Room
  • Quality & Reliability
  • Sales & Distribution
  • Incubators
Languages
  • English
  • 简体中文
  • 日本語
Newsletter

Interested in the latest news and articles about ADI products, design tools, training and events? Subscribe today!

Sign Up
Analog Logo
©1995 - 2023 Analog Devices, Inc. All Rights Reserved
沪ICP备09046653号-1
  • Sitemap
  • Legal
  • Privacy & Security
  • Privacy Settings
EngineerZone Uses cookies to ensure you get the best experience in our community. For more information on cookies, please read our Privacy & Security Statement.