Post Go back to editing

CN0540 survival guide forum post

Thread Summary

The user compiled a survival guide for bringing up the EVAL-CN0540-ARDZ (AD7768-1 + IEPE front end) on a bare Cortex-M7 microcontroller, highlighting critical issues such as incorrect PMOD pin labeling, inverted fault LED polarity, unconnected IO5 and IO4 pins, mandatory front-end amp enable via ADC GPIO registers, and the need for I2C DAC calibration to handle sensor bias. The guide also warns that the board's shift DAC has a bias ceiling of about 13.5 V, which can cause issues with typical CCP microphones (14 V bias).
AI Generated Content
Category: Hardware
Product Number: CN0540
# EVAL-CN0540-ARDZ on a bare microcontroller: a bring-up survival guide

I brought up the EVAL-CN0540-ARDZ (AD7768-1 + IEPE front end) on a bare Cortex-M7
(Teensy 4.1) with no reference host, and hit what I believe is every documented trap
on this board in a single session - plus one wrong theory of my own that I want to
leave here so nobody repeats it. Each trap below is individually confirmed somewhere
on this forum or in the design package, but they are scattered across four threads
spanning 2021 to 2023. This post consolidates them. Corrections welcome; I would
rather be fixed here than in the field.

- Why not the reference host

The design package offers two reference hosts. The DE10-Nano carries an Intel
Cyclone V SoC with a Cortex-A9 hard processor system in the FPGA fabric, driven by a
Linux IIO driver. The SDP-K1 is built on an STM32F469, a Cortex-M4, driven by ADI's
no-OS C driver. Neither is the chip I am shipping: my target is the Cortex-M7 core
inside an i.MX 8M Plus, running FreeRTOS, handing samples to the Linux side over
RPMsg. The DE10-Nano path (Cyclone V HDL plus a Linux driver on an A9) shares
nothing with bare-metal M7 firmware. The SDP-K1 path is closer - the no-OS driver's
register-level SPI protocol is portable and did save me time - but it is still tied
to the SDP-K1's pin mapping and BSP. So board bring-up on my own host was
unavoidable either way. A Teensy 4.1 uses the same ARMv7E-M Cortex-M7 core as my
target, so I validate the driver and the board cheaply before committing to the real
hardware. If you are reading this, you are probably doing some version of the same
thing.

- TL;DR - the traps

1. The PMOD pins silkscreened 3V3 are NOT 3V3. They are IOREF. The board has two
   separate supply nets and both must be powered. Wrong pin = half-dead board with
   maddening symptoms.
2. The red FAULT LED (DS1) is ON during normal operation. Lit means fine, dark
   means fault. Confirmed by ADI as a schematic review oversight.
3. IO5 and IO4 do nothing unless you populate DNI resistors (R64/R65). They are
   dead stubs on a stock board.
4. No firmware you write will produce usable data until you (a) enable the ADA4945
   front-end amp via the ADC's own GPIO registers and (b) program the LTC2606
   level-shift DAC over I2C and run an offset calibration. Neither is optional.
5. Check your sensor's DC bias against the shift circuit's ceiling BEFORE you
   buy anything: the 0-5 V shift range can only null a sensor bias up to about
   13.5 V. Many IEPE accelerometers (8-12 V) are fine. My GRAS 146AE microphone
   (14 V typical bias, per its own datasheet) is not - and I could not find this
   limit stated anywhere, so here it is.

Details and evidence below, in the order I hit them.

- Trap 1: two supply nets, and the silkscreen lies about one of them

The board generates everything (7V boost, 5V, 26V IEPE bias rail, clean 3.3V) from
a single 3.3V input - but the digital side runs from a separate net called IOREF,
which exists so an Arduino-style host can set logic levels. Both nets need 3.3V.
On the Arduino power header P2 the labels are honest: pin 4 is the true 3V3 net,
pin 2 is IOREF. On the PMOD block, the pins silkscreened 3V3 are actually IOREF.
This was reported in 2022 (thread: "CN0540 PMOD CONNECTOR BLOCK P8 pinout") and
ADI staff acknowledged it as an oversight to fix in the next board revision.

I powered the board through the PMOD 3V3 pins. Result: IOREF live, true 3V3 net
completely dead. The symptoms this produces are spectacularly misleading:

- TP9 (labeled 3V3) read 1.7V - leakage into dead rails, not regulation.
- The LTC3459 boost converter's output sat at 1V, below its own input.
- The boost's SHDN_N pin read 0.15V and wandered. It looked exactly like a
  floating enable pin or a broken solder joint. I "fixed" it with a jumper wire
  and the board sprang to life - which convinced me the board had a manufacturing
  defect. It did not. SHDN_N is hard-wired to the 3V3 net in the copper (I later
  verified this in the IPC-356 netlist in the fab files: U5 pins 1 and 6 are both
  on the 3V3 net). An unpowered net floats, and a floating net measures exactly
  like a floating pin. My jumper had accidentally bridged IOREF to the 3V3 net and
  was powering the entire analog tree through it.

Meanwhile, because IOREF was live, everything hanging off it worked and made the
board look half-alive: SPI-mode strap read a solid 3.3V (R63 pull-up to IOREF),
RESET_ADC read high (R5 pull-up to IOREF), the blue CC LED lit, the protection
switch defaulted on, the 26V bias rail... no wait, that one was dead until my
accidental bridge. The point: with only IOREF powered you get convincing logic
levels and a dead analog tree; with only 3V3 powered you get analog rails and a
silently dead ADC, because IOREF feeds the ADC's IOVDD through a ferrite AND the
16.384 MHz MCLK oscillator's power and output-enable pins. No IOREF means no SPI
and no MCLK - no conversions, no error, nothing.

Correct hookup for a bare-MCU bring-up: host 3.3V to P2 pin 4 (3V3), host 3.3V to
P2 pin 2 (IOREF), ground to P2 pins 6/7. Do not feed external 5V anywhere - the
board generates its own 5V internally and nothing on the power tree takes 5V as an
input.

- Trap 2: the fault LED is on when everything is fine

With power finally correct, mic connected (GRAS 146AE, TEDS LED lit, 14V bias
measured at the connector, 4.5 mA CCP bias confirmed with a meter in series), the
red FAULT LED stayed on. I power-cycled with the mic attached - still on. I then
spent a long time building a theory: the ADG5421F protection switch is a dual-
channel part, its datasheet says a fault on either channel opens BOTH switches,
the board has two input connectors (SMA and the P1 header), so surely the unused
connector's channel was floating out of range and holding the shared fault
asserted. The theory was internally consistent, datasheet-backed, and wrong.

The actual answer is in the thread "The DS1(fault) is always on for CN0540": ADI
staff confirmed the LED polarity is inverted - an oversight in final schematic
review. The FF flag is open-drain active-low with a pull-up; the LED conducts when
the flag is NOT asserted. DS1 lit = no fault. DS1 dark = fault. You can verify on
the bench: the SW_FF node sits around 1.8-2V when healthy (pull-up clamped by the
LED) and near 0V during a real fault. Note that 1.8-2V is below many 3.3V GPIOs'
VIH, so if you want your host to monitor the flag, use an ADC pin or comparator,
not a digital input.

And for the record, from the netlist, my two-connectors-two-channels theory was
also topologically wrong: both source pins of the ADG5421F and both connectors
(SMA center and P1) sit on the same node, VINP. One switch channel carries the
constant-current bias in (LT3092 -> P10 -> D1 -> S1 -> VINP), the other carries
the signal out (VINP -> S2 -> D2 -> toward the AD8605 buffer). Both channels
default ON via populated 10K pull-ups (R76, R6) to IOREF - no host GPIO needed,
despite older forum advice to the contrary. Had I acted on my theory and grounded
the "unused" SMA connector, I would have shorted the live sensor node and killed
the bias. If you take one meta-lesson from this post: the IPC-356 netlist in the
fab files is per-pin copper ground truth and takes ten seconds to grep. Use it
before acting on any theory derived from reading the schematic PDF.

- Trap 3: IO5 and IO4 are not connected to anything

Sheet 4 shows IO0-IO5 pins that look like handy analog taps. IO5 and IO4 would tap
the ADC driver's differential inputs (FDA_OUT_N and FDA_OUT_P) - through R64 and
R65, which are DNI. On a stock board these pins are dead copper stubs. This is
confirmed in the ESP32-S3 thread, where ADI staff said the pins give access "given
you insert the resistors" and the poster confirmed measuring only mV of noise
until he soldered resistors in. I mention this trap for an embarrassing reason: I
accidentally put 5V on IO5 and spent an evening believing I had blown up the
front-end amp. The netlist shows the IO5 net contains exactly one header pin, one
via, and one pad of an unpopulated resistor. Nothing happened. If you populate
R64/R65, be aware you are tapping a sensitive node and can distort the signal.

- Trap 4: the firmware minimum is bigger than the datasheet suggests

Getting SPI register access working is not the finish line. Two more things are
mandatory before real data comes out, and neither is in the AD7768-1 datasheet
because both are board-level design choices of the CN0540:

First, the ADA4945 front-end amplifier's disable and mode pins are wired to the
AD7768-1's own GPIO2/GPIO3 pins through populated zero-ohm resistors (R59/R60).
Your firmware must write the ADC's GPIO_CONTROL (0x1E) and GPIO_WRITE (0x1F)
registers to configure those as outputs and drive the amp enabled. Skip this and
you get clean SPI, valid register reads, and no signal.

Second, the board is DC-coupled end to end. The IEPE sensor sits at its bias point
(mine idles around 14V) and an LTC2606 16-bit DAC - on I2C, not SPI - generates
the SHIFT voltage that subtracts that bias before the ADC driver. The LTC2606
powers up at 0V. Uncalibrated, the ADC pins at a rail: the ESP32-S3 poster read a
constant 0x7FFFFE until he fixed exactly this, and I suspect the 2021 Teensy
poster's "just noise" was the same disease. You need a small I2C driver (the 4.7K
bus pull-ups are already on the board, header P6) plus an offset calibration loop:
read the ADC, step the DAC, converge on zero mean - a successive approximation,
like balancing a seesaw. ADI staff posted a starting-point formula in the ESP32
thread: DAC_OUT is approximately 0.3 * Vbias + VOCM / 2.6 with VOCM = 2.5V, and a
simplified LTspice model of the whole analog chain if you want to sanity-check
numbers.

My suggested bring-up order, each step isolating one layer: (1) make init loud -
log the scratchpad test and read CHIP_TYPE at boot, SPI mode 3; a silent init
failure cost the 2023 poster weeks. (2) Confirm DRDY interrupts arrive at your
configured rate. (3) Use the AD7768-1's internal diagnostic mux to read known
internal voltages - this validates ADC, SPI, MCLK and DRDY end to end with the
analog front end completely out of the picture. (4) Enable the FDA via the GPIO
registers. (5) Bring up the LTC2606 and run offset calibration. (6) Only now
expect a waveform from the sensor.

- Bench checklist for a correctly wired, healthy board

- P2 pin 4 (3V3) and P2 pin 2 (IOREF): both 3.3V
- LTC3459 boost output: about 7V
- TP9: 3.3V regulated
- Green POWER LED (DS2): on
- Blue CC LED (DS4): on (switch control high via pull-up - normal)
- Red FAULT LED (DS1): ON means fine (inverted, see trap 2)
- Sensor connector, open circuit: rails up near 24-25V (current source at
  compliance, and per the ADG5421F thresholds this does NOT trip a fault - the
  protection is for external overvoltage on the exposed connector, not the
  board's own bias)
- Sensor connected: bias settles to the sensor's operating point (8-15V typical
  IEPE; my 146AE sits near 14V), 4.5 mA loop current
- SW_FF node: about 1.8V (no fault; I measure 1.79V on my unit, and another
  poster reported 1.83-1.85V on a DE10-Nano setup)

- Trap 5: the shift DAC has a bias ceiling, and a typical CCP microphone is past it

This one cost me a full day and is, as far as I can tell, not written down
anywhere, so read it before choosing a sensor. The level-shift circuit that
subtracts your sensor's DC bias has a hard range: the 16-bit DAC's 2.5 V
output is buffered with a gain of two, giving a 0-5 V shift. Run that through
the compensation transfer function an ADI engineer posted in the ESP32-S3
thread (DAC_OUT = 0.3 x Vbias + VOCM/2.6, VOCM = 2.5 V) and the maximum
sensor bias the board can null works out to about 13.5 V.

IEPE accelerometers typically idle at 8-12 V, comfortably inside. CCP
measurement microphones do not: my GRAS 146AE specifies 14 V typical DC bias
on its own datasheet, and my unit sits at 13.81 V. The calibration runs out
of DAC at 0xFFFF and the ADC parks about 12 %FS above zero, permanently.

The failure mode is nasty because it hides during bring-up: an IEPE sensor
charges up from zero over several seconds at power-on, so a calibration run
shortly after boot succeeds perfectly (it nulls the still-charging bias),
and then the input sails to positive full scale a few seconds later as the
sensor finishes settling. It looks exactly like drift or a broken board. It
is neither - measure your sensor's settled bias with a meter and compare
against 13.5 V before debugging anything else. Diagnostic signature: the
calibration converges to DAC code 0xFFFF with a large residual, and the
SHIFT test point (header P7) reads ~5 V.

If your sensor is past the ceiling and you do not need DC response (a
microphone never does), the fix is printed on the schematic next to R11:
"REPLACE R11 WITH C, TO AC-COUPLE THE INPUT." That single capacitor removes
the bias, the warm-up transient, and the entire calibration procedure from
your problem list at once. With it in place I finally captured clean tap
transients at -24 dBFS over a -55 dBFS floor... actually, full disclosure: I
captured those with the DAC pinned and the input parked at +12 %FS, which
works fine once the sensor is warm since the ADC is back in range - but it
donates 12% of positive headroom and depends on your unit's exact bias, so
the capacitor is the real answer for anything beyond a bench demo.

- Credit where due

The pieces of this were solved by CK3 (PMOD pinout thread, 2022), sam007 and ADI's
Brandon (fault LED thread, 2023), Girija and rogueC (Teensy thread, 2021), and
BananzSplit and ADI's Malcolm (ESP32-S3 thread, 2023). All I did was hit every one
of their problems in one evening and then read their homework. Hopefully having it
all in one place saves the next bare-MCU person the archaeology.

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.