STM32U5 + ADS1293: Clean ECG from Lead I, but Noisy/Incorrect Data from Lead II
Trying to Interface ADS1293 with STM32U5 for 3-Lead ECG – Need Help with Lead II Data
Hi STM32 Community :waving_hand:,
We’re trying to build a 3-lead ECG signal acquisition setup using the ADS1293 analog front-end connected via SPI to an STM32U5G9ZJT6Q microcontroller. The goal is to capture and plot Lead I, Lead II, and derive Lead III using TouchGFX.
What’s Going Well:
-
We are able to receive and plot clean ECG data for Lead I (RA - LA) using CH1 of the ADS1293.
-
SPI communication is stable, and the plotting is handled through TouchGFX without lag.
-
Sampling is working at 500–1000 Hz using a DRDY-based interrupt routine.
What We’re Struggling With:
-
When we try to configure CH2 for Lead II (RA - LL), the data appears noisy, flat, or unstable.
-
We’re using the same initialization and acquisition process for CH2 as we did for CH1, but the result is not usable.
-
For Lead III, we are trying to derive it in software using:
Lead III=Lead II−Lead I\text{Lead III} = \text{Lead II} - \text{Lead I}Lead III=Lead II−Lead IBut since Lead II is not clean, Lead III is also affected.
What We Have Tried:
-
Verified hardware connections and electrode placements – all seem correct.
-
Swapped electrodes to check if the issue is with wiring – no improvement.
-
Checked lead-off detection and ADC status flags – everything seems normal.
-
Confirmed that CH2 is enabled and configured similarly to CH1.
-
SPI read timing and DRDY sync appear to be correct.
Our Current Register Setup:
#define FLEX_CH1_CN_VALUE 0x11 // INP=IN2 (LA), INN=IN1 (RA) for Lead I
#define FLEX_CH2_CN_VALUE 0x19 // INP=IN3 (LL), INN=IN1 (RA) for Lead II
Reference:
We’re referring to the ADS1293 datasheet (TI document SLAS969), and focusing particularly on the channel configuration sections starting from page 43:
If anyone wants to verify the register details, please refer to those pages.
What We’re Looking For:
-
Has anyone successfully acquired clean Lead II ECG data using ADS1293?
-
Are there any specific register settings or hardware considerations for CH2 (IN2–IN3) that we might be missing?
-
Would it be better to acquire only Lead I and Lead II, then derive Lead III entirely in software?
-
Is there any known issue or errata with CH2 channel configuration on ADS1293?
System Summary:
-
MCU: STM32U5G9ZJT6Q
-
AFE: ADS1293 (SPI interface)
-
Display: 5” TFT LCD via TouchGFX
-
Electrodes: 3-lead (RA, LA, LL)
-
Sampling: 500–1000 Hz, DRDY interrupt based
We would really appreciate any guidance, working examples, or known-good register maps for this use case. Thank you in advance!
—
Ganesh
Embedded Software Engineer