Locale Icon
English
EngineerZone
EngineerZone
Precision Microcontrollers
  • Log In
  • User
  • Site
  • Search
OR
Ask a Question
  • Forums

    Popular Forums

    • LTspice
    • Video
    • Power Management
    • RF & Microwave
    • Precision ADCs
    • FPGA Reference Designs

    Product Forums

    • Amplifiers
    • Clocks & Timers
    • Data Converters
    • Direct Digital Synthesis (DDS)
    • Energy
    • Interface and Isolation
    • MEMS Inertial Sensors
    • Power Management
    • Processors & DSP
    • Processors & Microcontrollers
    • Switches & Multiplexers
    • Sensors
    • Voltage References
    View All

    Application Forums

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

    Design Center Forums

    • ACE Evaluation Software
    • ADEF System Platforms
    • Design Tools & Calculators
    • FPGA Reference Designs
    • Linux Software Drivers
    • Microcontroller no-OS Drivers
    • Power Studio Designer
    • Power Studio Planner
    • Reference Designs
    • Robot Operating System (ROS) SDK
    • Signal Chain Power (SCP)
    • Software Interface Tools
    • System Demonstration Platform (SDP) Support
  • Learn

    Highlighted Webinar

    Fast-Track Certification: Leveraging IC Safety App Notes for Functional Safety Designs

    Stop guessing, start certifying. Learn how to use IC safety application notes to streamline your FMEDA and meet IEC 61508 and ISO 13849 standards with...

    Places

    • ADI Academy
    • ADI Webinars
    • EZ Blogs
    • Video Annex
    • Virtual Classroom

    Libraries

    • 3D ToF Depth Sensing Library
    • Continuous-Wave CMOS Time of Flight (TOF) Library
    • Embedded Vision Sensing Library
    • Gigabit Multimedia Serial Link (GMSL) Library
    • Optical Sensing Library
    • Other Products Library
    • Precision Technology Signal Chains Library
    • Software Modules and SDKs Library
    • Supervisory Circuits Library
    • Wireless Sensor Networks Library
  • Community Hub

    Challenge Yourself!

      New KCC Quiz AQQ299 about Opamp open looop gain and LTspice (a kind proposal from Al Butvidas)

      1. Quote of the month: " A good friend calls you in jail. A great friend bails you out of jail. Your best friend sits next to you and says 'wasn't that...

    View All

    What's Brewing

      Read a Blog, Take this Quiz for Another Chance to Win a Gift Card!

      Important: Read the blog first . The quiz questions are all based on the content from the blog: Understanding Voltage Domain Isolation in Field-Bus...

    View All

    Places

    • Community Help
    • Analog Dialogue Quiz
    • Logic Lounge
    • Super User Program

    Resources

    • EZ Code of Conduct
    • EZ How To Help Articles
    • Getting Started Guide
    • ADI: Words Matter
    • Community Help Videos
    View All
  • ContentZone

    Visit ContentZone

    Search content by industry or technology.
    • Blogs
    • Technical Articles
    • Tutorials
    • Videos
    • Webinars
    Your ADI content all in one place.
    View ContentZone

    The Latest Read

    Master FPGA-Based DSP Design: The Complete Building Blocks Guide You Need to Read

    The Engineering Mind Blog on EngineerZone presents an exceptional five-part series titled " DSP Building Blocks " that walks engineers through the essential...

    New Release

    Signal Chain Designer: DC Error Simulation
    Signal Chain Designer: DC Error Simulation

    This video covers the DC error calculation capabilities of Signal Chain Designer. DC error is unique in that often requires calibration and has so many...

    Recent Technical Insights

    Latest Technical Article from Analog.com
    PSM Integration for Enhanced Module Solutions in 48 V Data Centers

    The integration of the LTC2971 into quarter brick solutions for 48 V data centers enhances monitoring, control, and reliability by providing high precision...

Precision Microcontrollers
  • Processors & Microcontrollers
Precision Microcontrollers
Documents ADuCM350 FAQ AFE Sequencer
  • Q&A
  • Docs/FAQs
  • File Uploads
  • Members
  • Tags
  • Cancel
  • +Documents
  • +ADuCM Cortex-M3: FAQ
  • +ADuCM310 FAQ:
  • +Aducm320: FAQ
  • -ADuCM350: FAQ
    • 4Wire-Isolated-Bioimpedance ADuCM350 Connections To Sensor
    • ADUCM350 DESIGN SUPPORT COMMUNITY - INTRO
    • ADuCM350 FAQ DFT / Impedance Measurement
    • ADuCM350 FAQ Debug
    • ADuCM350 FAQ Evaluation Kit Software Platform
    • AFE Transmit Stage
    • ADuCM350 FAQ GPIOs and Pinmuxing
    • ADuCM350 FAQ I2C serial interface
    • ADuCM350 FAQ Operational Supply Range / Power Supplies
    • ADuCM350 FAQ Parallel Display Interface(PDI)
    • ADuCM350 FAQ Power Consumption
    • ADuCM350 FAQ Power Management Unit
    • ADuCM350 FAQ Random Number Generator
    • ADuCM350 FAQ SDK Driver Specific FAQs
    • ADuCM350 FAQ SPI
    • ADuCM350 FAQ Switch Matrix
    • ADuCM350 FAQ System Clocks
    • ADuCM350 FAQ System Integrity
    • ADuCM350 SDK v2.3.0.0 now available
    • Bioimpedance Measurement Using ADuCM350
    • Optimizing RCAL,RTIA,CTIA and DAC voltage of ADuCM350 for 4-Wire Measurement.
    • Potentiostat / Amperometric Measurement Using ADuCM350
    • Unipolar Current Measurement Using ADuCM350
    • Errata for ADuCM350 I2C serial interface
    • FAQ ADuCM350 Embedded Software Development
    • How to get SDK + Eval-ADuCM350EBZ Working together.
    • FAQ for Captouch on ADuCM350
    • Known Issues for ADuCM350 Silicon and Support Material
    • ADuCM350 FAQ ADuCM350 Evaluation Kit
    • ADuCM350 FAQ AFE / ADC Measurement Channel
    • ADuCM350 FAQ AFE Measurement Circuit Impedance Range
    • ADuCM350 FAQ AFE TIA
    • ADuCM350 FAQ AFE Sequencer
    • ADuCM350 FAQ Amperometric Measurement Example
    • ADuCM350 FAQ Calibrate
    • ADuCM350 FAQ CRC accelerator
    • ADuCM350 FAQ GP Timers
    • ADuCM350 FAQ LCD controller
    • New Revision of UG-587 Available
    • ADuCM350 FAQ Potentiostat / Amperometric
    • ADuCM350 FAQ Real Time Clock (RTC)
    • First Steps: Quick Measurement with Eval-ADuCM350 & EKSP Labview GUI
    • ADuCM350 SDK v2.4.0.0 Released!
  • +ADuCM355: FAQ
  • +ADuCM360: FAQ
  • +ADuCM361: FAQ
  • +ADuCM362 FAQ:
  • +ADuCRF101: FAQ
  • +Bio-Impedance & ECG Measurement Solution: FAQ
  • +CN0300: FAQ
  • +Continuously Amperometric Measurement: FAQ
  • Do we need new Maxim supplied algorithms for the MAX32664, as I assume that the ones provided for the MAXREFDES101 do not support SpO2?
  • +EVAL-ADUCRF101MKxZ FAQ:
  • +MAX32663A: FAQ
  • MAX32664-A HRM & SPO2 FIRMWARE V10.0.0: FAQ
  • +MAX32664GTGA+: FAQ
  • +MAX32664GTGC+: FAQ
  • +MAX32664GTGZ+: FAQ
  • +MAX32664GWEA+: FAQ
  • +MAX32664GWEB+: FAQ
  • +MAX32664GWEC+: FAQ
  • +MAX32664GWED+T: FAQ
  • +MAX32674C: FAQ

ADuCM350 FAQ AFE Sequencer

Q: How do I start writing an AFE squence ?

A: Advise to use the example sequences in the Software Development Kit as a reference, e.g. ImpedanceMeasurement_2wire.c

Then use the ADuCM350 ASH (AFE Sequence Helper) Tool to modify the sequence.

Link to ADuCM350 ASH: ADuCM350 ASH Tool (v1.0).

Q: Details on how to program the sequencer ?

A:

  • AN-1293 in Design Support Package - A Quick Guide to the ADuCM350 Sequencer.
  • Examples in Analog Front End Interface Chapter of Product Userguide. UG-587.
  • Use the ADuCM350 AFE Sequence Helper tool (see above).

Q: How deep / how many steps are available in Sequencer ?

A: Used correctly there is no limit to the sequncer depth ? If you feel adventurous you can feed it in commands from external memory.

Q: How are sequences for the AFE sequencer represented in software?

A: The afe_sequences.h file in the Software Development Kit (SDK) contains a number of example sequences. Each sequence is represented by an array of unsigned, 32-bit numbers in hexadecimal format. Each array consists of 2 pieces; the Safety Word and the sequence itself.

The first element (element [0]) of any example sequence array is the Safety Word. This is NOT part of the sequence itself. It is used to check the integrity of the sequence that has been executed. The upper half-word (bits[31:16]) contains the command count. This indicates how many commands the sequence comprises of. Note that this does NOT include the Safety Word. Each time the sequencer executes a sequence, the value in the AFE_SEQ_COUNT register is incremented by 1. When the sequence has finished executing, this value should match the command count element of the Safety Word.

The lowest byte (bits[7:0]) contains the CRC of the sequence. The CRC algorithm used is CRC-8, using the polynomial x8 + x2 + x + 1, with a seed of 1. There is a function in afe.c called crc8 which performs the calculation and mirrors the ADuCM350 hardware exactly. There is also an appendix in AN-1293 with instructions on how to use a Python CRC calculator (which is available online). Note that the CRC calculation should NOT include the Safety Word. The sequencer performs a CRC calculation on the sequences that it executes and returns the result to the AFE_SEQ_CRC register. This value should match the CRC element of the Safety Word.

Q: How are sequences triggered by the software?

A: The AFE driver (afe.c) in the SDK contains a function called adi_AFE_RunSequence which illustrates how a sequence can be triggered in software. It should be noted that this function is not optimised for performance and may not be suited to all applications, in particular where the core is required to perform other tasks while the sequencer is running. adi_AFE_RunSequence is a function which does a number of things, but remember that all of these tasks are executed on the core, the sequencer is a separate piece of hardware. First it initializes the sequencer (adi_AFE_SeqInit), pointing to the sequence to be run (txbuffer), where to put the results (rxbuffer) and how big the set of results will be (size). Some error checking is performed, some flags are set to keep track of what is happening and then the sequencer is started (adi_AFE_SeqStart). At this point, the core kicks the sequencer into action and then goes into CORE_SLEEP mode. When both the Rx DMA Done and Sequence Finished interrupts have fired, the core wakes from CORE_SLEEP mode, does some error checking and disables the FIFO and the DMA (adi_AFE_SeqStop). The very last thing the function does before returning is it checks that the CRC and command count elements of the safety word of the sequence array are equal to the CRC and command count values returned by the sequencer (adi_AFE_SeqCheck).

Q: How do I determine if I have a CRC error?  Is there a flag or error code that I can look at?

A: If you are using the adi_AFE_RunSequence function, look at the return code. If it returns ADI_AFE_ERR_SEQ_CHECK, this indicates a CRC error (i.e. a mismatch between the CRC value in the safety word and the value returned by the sequencer to the AFE_SEQ_CRC register) or a command count error (i.e. a mismatch between the command count value in the safety word and the final value in the AFE_SEQ_COUNT register after the sequence has finished). If you step through the function (you will need to set multiple breakpoints to ensure that you “run” through the piece of code where the sequence is executing, remember, the sequence executes in a separate piece of hardware to the core) you will notice that the last function, adi_AFE_SeqCheck, will return this error. Also remember that if you are setting breakpoints within the adi_AFE_RunSequence function, this is called many times for the power up and calibration steps, before the code ever gets to the actual measurement!

Q: I keep getting Command FIFO Underflow interrupts (INT_CMD_FIFO_UDF) when I run my sequence, but I can't see any reason for it.

A: The Command FIFO is 8 commands deep. The sequencer will execute 1 MMR write command in a single clock cycle. Once the Command FIFO is no longer full, it will trigger to the DMA that more commands are needed. If the command FIFO is filled with 8 MMR write commands (i.e. if the sequence has 8 consecutive MMR write commands), then these commands will be executed by the sequencer in 8 clock cycles. As soon as the FIFO starts to empty, the DMA gets a request to add more commands. But the DMA cannot fullfill this request in 8 clock cycles, so the sequencer finds an empty Command FIFO and generates an underflow interrupt (INT_CMD_FIFO_UDF). To resolve this, we can delay the sequencer a little to allow the DMA controller to catch up. After (every) 7 consecutive MMR write commands in a sequence, add a short wait (100us should be sufficient). This should resolve the problem. Don't forget to update the command count!!

Tags: safety_word aducm350 afe sdk sequencer_crc sequencer underflow aducm35x software_development_kit Show More
  • Share
  • History
  • More
  • Cancel
analog-devices logo

About Analog Devices

  • Who We Are
  • Careers
  • Newsroom
  • What We Do (Signals+)
  • Investor RelationsExternalLink
  • Quality & Reliability
  • Sales and Distribution
  • What's New on Analog.com
  • Contact Us

Find Help

  • Support
  • Resources
  • WikiExternalLink
  • Analog Dialogue
  • ADI Developer PortalExternalLink

myAnalog

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

Go to myAnalog
  • Instagram page
  • Twitter page
  • Linkedin page
  • Youtube page
  • Facebook
  • Legal and Risk
  • Accessibility
  • Privacy Policy
  • Privacy Settings
  • Cookie Settings

©2026 Analog Devices, Inc. All Rights Reserved

analog-devices

About Analog Devices

Down Up
  • Who We Are
  • Careers
  • Newsroom
  • What We Do (Signals+)
  • Investor RelationsExternalLink
  • Quality & Reliability
  • Sales and Distribution
  • What's New on Analog.com
  • Contact Us

Find Help

Down Up
  • Support
  • Resources
  • WikiExternalLink
  • Analog Dialogue
  • ADI Developer PortalExternalLink

myAnalog

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

Go to myAnalog
Instagram page Facebook Twitter page Linkedin page Youtube page
  • Legal and Risk
  • Accessibility
  • Privacy Policy
  • Privacy Settings
  • Cookie Settings

©2026 Analog Devices, Inc. All Rights Reserved