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 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?
  • 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

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?

By definition, the clock phase control bit is used to manage whether data is sampled on the leading or trailing clock edge.  But this bit is also used to manage whether the slave select output pin is driven by hardware or software.  These two attributes are sometimes in contention.  (Note that in hardware slave select mode, the select line is toggled between bytes which can cause an unintentional slave device reset.)

Most Blackfin SPI hardware implementations provide both serial clock phase (CPHA) and serial clock polarity (CPOL) control bits within the SPI_CTL control register. These two serial clock control bits configure the SPI protocol to use one of four industry standard SPI clocking modes to suite external slave device timing requirements.

But the serial clock phase (CPHA) control bit also controls programming of the slave select pin to be generated either: automatically, i.e., using the SPI hardware slave select mode (where CPHA=0); or, in the software mode by application software (where CPHA=1).  Note that in the software mode, the application will directly manipulate an explicit flag pin around each SPI transfer.  So in addition to controlling the clock phase, the CPHA bit also controls selection of the hardware/software slave select mode.

Because the hardware slave select mode (CPHA=0) may (depending on protocol speed) deassert and reassert the slave device select line between each byte of the transfer, some slave devices may interpret this transition as a slave reset request which may interfere with a block transfer.

In cases where the slave device requires use of CPHA=0 on the Blackfin SPI master-mode controller (implying use of the hardware slave select mode), the slave select “reset” between bytes can be avoided by combining the needed hardware select (CPHA=0) mode with a software-driven slave select technique. This solution requires the associated slave select function be disabled in the function enable register (FER) for the port and pin in question and that the application software take responsibility for driving the slave select pin as if CPHA=1 (software slave select mode) were active.  In short, the application programs the slave select pin “manually” (via the flag service) by manipulating the select before and after each transaction (DMA or otherwise): assert the select just prior to the SPI enablement and deselect it at the transaction completion or DMA interrupt.

TAR-45231 describes a feature request to support this workaround in the SPI Device Driver.

http://www.analog.com/processors/tools/anomalies

  • spi
  • slave
  • 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.