ADS8688 SPI communication issues with STM32F446RET6 - Reading random/garbage values
- June 18, 2025
- 3 replies
- 1209 views
Hello everyone,
I'm currently working on a project using an ADS8688 ADC IC and an STM32F446RET6 microcontroller.
I'm encountering an issue where I'm consistently reading random or garbage values over SPI, even when I'm applying stable input voltages to all 8 channels of the ADS8688. I've verified the input voltages with a multimeter, and they are as expected.
Here's a brief overview of my setup and what I've tried so far:
Hardware:
- ADC: Texas Instruments ADS8688 (8-channel, 16-bit, SAR ADC)
- MCU: STM32F446RET6 (using one of its SPI peripherals)
Problem Description: When I apply known DC voltages to the input channels of the ADS8688, the data I receive over SPI from the STM32F446RET6 is not the expected digital conversion result. Instead, it appears to be random or corrupted, showing no correlation with the input voltage.
What I've Checked/Tried So Far:
SPI Configuration (STM32F446RET6):
- SPI Mode: I'm using SPI Mode 1 (CPOL=0, CPHA=1), which is typically recommended for the ADS8688.
- Clock Prescaler: I've experimented with different clock prescalers (2,8, 16) to ensure the SCK frequency is within the ADS8688's specifications and the STM32 can reliably sample.
- Data Size: Configured for 16-bit data transfer.
- LSB First/MSB First: Configured for MSB First, as expected for the ADS8688.
- CS PIN:GPIO toggling for CS.
ADS8688 Configuration:
- I've tried basic configurations, ensuring the device is powered up correctly and the internal reference is enabled (or an external one if used).
- I've sent commands to configure the input range (e.g., ±10.24V, 0−10.24V).
Wiring & Connections:
- Triple-checked all SPI lines (SCK, MISO, MOSI, CS) for continuity and correct connections between the STM32 and ADS8688.
- Ensured proper grounding.
- Power supply for both ICs is stable and within specified ranges.
Code Logic:
- CS Control: Ensuring CS is pulled low before initiating SPI transfer and pulled high after the transfer is complete.
- Read/Write Sequence: Following the datasheet's timing diagrams for read and write operations, especially for initiating conversions and reading data registers.
- Dummy Reads/Writes: Performing dummy reads/writes as per the datasheet's recommendations for command cycles and data retrieval.
Specific Questions/Areas for Advice:
- Are there any common pitfalls when interfacing the ADS8688 with an STM32 that I might be overlooking?
- Could this be a power supply decoupling issue, even though the supply looks stable?
- Are there specific register configurations on the ADS8688 that are critical for initial sanity checks or basic functionality?
- Has anyone experienced similar "random/garbage" values and found a specific solution (e.g., related to SPI clock phase/polarity, timing, or sample rate)?
- Any suggestions for debugging SPI communication at a lower level (e.g., using an oscilloscope on the SPI lines)?
Hello everyone,
I'm currently working on a project using an ADS8688 ADC IC and an STM32F446RET6 microcontroller.
I'm encountering an issue where I'm consistently reading random or garbage values over SPI, even when I'm applying stable input voltages to all 8 channels of the ADS8688. I've verified the input voltages with a multimeter, and they are as expected.
Here's a brief overview of my setup and what I've tried so far:
Hardware:
- ADC: Texas Instruments ADS8688 (8-channel, 16-bit, SAR ADC)
- MCU: STM32F446RET6 (using one of its SPI peripherals)
Problem Description: When I apply known DC voltages to the input channels of the ADS8688, the data I receive over SPI from the STM32F446RET6 is not the expected digital conversion result. Instead, it appears to be random or corrupted, showing no correlation with the input voltage.
What I've Checked/Tried So Far:
SPI Configuration (STM32F446RET6):
- SPI Mode: I'm using SPI Mode 1 (CPOL=0, CPHA=1), which is typically recommended for the ADS8688.
- Clock Prescaler: I've experimented with different clock prescalers (e.g., /2, /4, /8, /16) to ensure the SCK frequency is within the ADS8688's specifications and the STM32 can reliably sample.
- Data Size: Configured for 16-bit data transfer.
- LSB First/MSB First: Configured for MSB First, as expected for the ADS8688.
- NSS Management: Using software NSS control (GPIO toggling for CS).
ADS8688 Configuration:
- I've tried basic configurations, ensuring the device is powered up correctly and the internal reference is enabled (or an external one if used).
- I've sent commands to configure the input range (e.g., ±10.24V, 0−10.24V).
Wiring & Connections:
- Triple-checked all SPI lines (SCK, MISO, MOSI, CS) for continuity and correct connections between the STM32 and ADS8688.
- Ensured proper grounding.
- Power supply for both ICs is stable and within specified ranges.
Code Logic:
- CS Control: Ensuring CS is pulled low before initiating SPI transfer and pulled high after the transfer is complete.
- Read/Write Sequence: Following the datasheet's timing diagrams for read and write operations, especially for initiating conversions and reading data registers.
- Dummy Reads/Writes: Performing dummy reads/writes as per the datasheet's recommendations for command cycles and data retrieval.
Specific Questions/Areas for Advice:
- Are there any common pitfalls when interfacing the ADS8688 with an STM32 that I might be overlooking?
- Could this be a power supply decoupling issue, even though the supply looks stable?
- Are there specific register configurations on the ADS8688 that are critical for initial sanity checks or basic functionality?
- Has anyone experienced similar "random/garbage" values and found a specific solution (e.g., related to SPI clock phase/polarity, timing, or sample rate)?
- Any suggestions for debugging SPI communication at a lower level (e.g., using an oscilloscope on the SPI lines)?


