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
    • Optical Sensing
    • Precision Technology Signal Chains
    • 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

    Recent Discussions

    • Pluto + GNURADIO frequency change
    • Pluto SDR
    • pluto sdr pyadi-iio continous iq recording
    • attribute error
    • gps-sdr-sim is not working with my ADALM-PLUTO

    Places

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

    Latest Webinars

    • Webinar Biasing Circuits for GaN and GaAs RF Amplifiers
    • Webinar Improving Switch-Mode Power Supplies Using Noise Cancelling Technology
    • Webinar Accelerate Your Design With a 2 to 24 GHz Wideband Transceiver Reference Design
    • How to Design an Optimized Motion Control System for Intelligent Edge Based Surveillance Camera
    • How to Enhance High Precision Current Sensing Systems
    View All
  • Community Hub

    Challenge Yourself!

      KCC's Quizzes: Buffers and Fan Out
    View All

    Places

    • Community Help
    • Logic Lounge

    Resources

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

     

    How To Design Fieldbus Agnostic Smart Factory Sensors

     

    You Passed EMC Testing… But Wait, Is There More?

    Latest Blogs

    • The 5 Things You Need to Know about RF Matching Networks
    • Does Reliability Prediction Uncertainty Justify Mandating Two Channel Safety?
    • An Inside Look at 2022
    • Meet the Person Behind the Quizzes
    • Updates Required: Why Newer is Better
    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
Blackfin Processors
  • Processors and DSP
Blackfin Processors
Documents Trouble Transferring16-Bit Data on Blackfin SPORT
  • Forums
  • File Uploads
  • FAQs/Docs
  • Members
  • Tags
  • More
  • Cancel
  • +Documents
  • +.ldf file: FAQ
  • +ADI EZ-Kit: FAQ
  • +ADSP-BF50x: FAQ
  • +ADSP-BF527: FAQ
  • +ADSP-BF537: FAQ
  • +ADSP-BF548: FAQ
  • +ADSP-BF592: FAQ
  • +BF506F: FAQ
  • +BF50xF: FAQ
  • +BF51x: FAQ
  • +BF51xF: FAQ
  • +BF525C: FAQ
  • +BF527: FAQ
  • +BF537: FAQ
  • +BF54x/BF52x USB controller: FAQ
  • BF592: FAQ
  • +BF702: FAQ
  • -Blackfin: FAQ
    • Blackfin GPIO Open-Drain Functionality
    • BLACKFIN PROCESSORS
    • DAS U-BOOT FOR BLACKFIN SUPPORT COMMUNITY
    • FAQ: Get total code and data size from Blackfin linker
    • FAQ: How do I reconcile Blackfin SPI serial clock phase control (CPHA) settings with potentially conflicting hardware/software slave select modes, when both these attributes are managed by the same control bit?
    • FAQ: I have a Blackfin based USB application for which I've enabled (unmasked) the Connect and Disconnect interrupts, however, when I plug and unplug the USB cable no interrupt is generated. Why is this?
    • FAQ: I'm interested in the Blackfin processor family but don’t know where to start?
    • FAQ: Using the Blackfin SDP-B as a BF527 Evaluation Platform
    • FAQ:  Blackfin and IEEE 1588
    • How Can I Boot A Blackfin Processor from an Atmel DataFlash SPI Memory Device?
    • Is There A Recommended DHCP Server Test for Blackfin and LwIP?
    • Trouble Transferring16-Bit Data on Blackfin SPORT
    • What training is available for ADI DSPs
    • Where Can I Find the Blackfin assembly code for Cordic Algorithm?
  • +CLI and "Target option Mask interrupts during step: FAQ
  • +Disabling Double Buffering: FAQ
  • +External vs. Internal Voltage Regulator: FAQ
  • +EZ-KITs via USB: FAQ
  • +Floating point to integer conversion: FAQ
  • +generate safe and strong keys: FAQ
  • +global variables for multi cores: FAQ
  • +I2S BUS: FAQ
  • +Lockbox: FAQ
  • +PPI port pins: FAQ
  • +SDP image: FAQ
  • +SDRAM: FAQ
  • SPI example for ADSP-BF592
  • +USB VBUS: FAQ
  • +VisualDSP++: FAQ

Trouble Transferring16-Bit Data on Blackfin SPORT

Q: We are using the BF533 and BF561 Blackfin processors in our project, and we cannot seem to transfer data over the SPORT data transmit pin DT0PRI when we configure the SPORT for 16-bit data or smaller. No data comes out at all!  The same code works fine if the SPORT is configured for 17-bit data or larger, as the data is seen on the DT0PRI pin as expected. We are using core loads to the SPORT FIFO in C, as follows:

short myData[4] = 0x0001, 0x0002, 0x0003, 0x0004;

volatile char i;

for (i = 0; i < 4; i++)

   *pSPORT0_TX = myData[i];

Can you explain what we are doing wrong?

A: The SPORT data registers (SPORTx_TX and SPORTx_RX) are the only registers in the Blackfin memory map that must support both 32-bit and 16-bit accesses, and the correct access width is dependent on the SLEN field in the SPORTx_TCR2 register. It is on the programmer to access the MMR with the correct width. The C headers that are provided with the tools set up macros to define the proper access widths for all the registers in MMR space, but this is not possible when the width can be either. As such, the default pSPORT0_TX macro is defined to support a 32-bit access, but we've provided special alternate macros to support 16-bit access to the same MMR address. If you look in the header file for your processor (e.g., the cdefbf561.h file for the BF561), you will see how the SPORT data registers are defined:

#define pSPORT0_TX         ((volatile unsigned long *)SPORT0_TX)
#define pSPORT0_RX        ((volatile unsigned long *)SPORT0_RX)
#define pSPORT0_TX32     ((volatile long *)SPORT0_TX)
#define pSPORT0_RX32     ((volatile long *)SPORT0_RX)
#define pSPORT0_TX16     ((volatile unsigned short *)SPORT0_TX)
#define pSPORT0_RX16     ((volatile unsigned short *)SPORT0_RX)

The "long" type creates a 32-bit access, whereas the "short" is a 16-bit access. You need to use the macro with the "16" suffix for 16-bit data and smaller. What is happening in the hardware when you have the 32-bit access is that the write is not making it to the FIFO because it is misaligned, so when the SPORT is enabled, there is nothing in the FIFO and nothing is transmitted.

  • 16-bit
  • sport
  • blackfin
  • Share
  • History
  • More
  • Cancel
Related
Recommended
 
Social
Quick Links
  • About ADI
  • Partners
  • Analog Dialogue
  • Careers
  • Contact us
  • Investor Relations
  • News Room
  • Quality & Reliability
  • Sales & Distribution
  • Analog Garage
Languages
  • English
  • 简体中文
  • 日本語
  • Руccкий
Newsletters

Interested in the latest news and articles about ADI products, design tools, training and events? Choose from one of our 12 newsletters that match your product area of interest, delivered monthly or quarterly to your inbox.

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