Other Parts Discussed in Thread: LDC1612
I am debugging an LDC1612DNTT on a custom board with an STM32G0B1KCT6.
Communication works correctly while the LDC1612 remains in Sleep mode, but the device intermittently fails when SLEEP_MODE_EN is cleared to enter Normal conversion mode.
Hardware configuration:
- LDC1612DNTT powered from with 3.3 V
- ADDR tied directly to GND, therefore I2C address 0x2A
- SD tied directly to GND
- CLKIN tied directly to GND; internal oscillator selected
- SCL and SDA have external 4.7 kOhm pull-ups to 3.3 V
- INTB connected to the MCU
- Local LDC supply capacitors: 1 uF and 10 uF
- I2C1 on STM32 PB6/PB7
- The same I2C bus also contains an MCP23017 at address 0x20, which communicates correctly
- SCL and SDA are high when idle and neither line is shorted to GND
- The LDC supply was checked with an oscilloscope and remained stable at approximately 3.29 V without a visible voltage drop during startup
- DC continuity between the 3.3 V rail and the LDC supply/decoupling points is approximately 0.2 Ohm
Two passive sensor coils have been tested, both disconnected and connected.
Their measured inductances are approximately 12.2 uH and 13.0 uH. The PCB tank capacitors are 4.7 nF + 1 nF on one channel and 1 nF + 220 pF on the other channel.
I found the warning in LDC1612 data-sheet section 7.5.2 concerning early-terminated I2C transactions.
A generic address-only scan produced an ACK at 0x2A followed by a failed register access.
Therefore, all generic scans and HAL_I2C_IsDeviceReady calls have been removed.
The following test starts from a real power-on reset and uses only complete LDC1612 register transactions.
Conservative minimal test procedure:
- Disconnect USB power and ST-Link for at least 10 seconds.
- Power the board through USB-C only.
- Wait 2 seconds before the first LDC access.
- Use I2C at 10 kHz.
- Wait 20 ms between every complete register transaction.
- Do not perform an address scan.
- Read MANUFACTURER_ID, DEVICE_ID, CONFIG and MUX_CONFIG.
- Leave every LDC register at its documented reset value.
- Write CONFIG=0x0801. This is the reset value 0x2801 with only SLEEP_MODE_EN cleared.
- Wait 100 ms before the intended CONFIG readback.
- Only continue when the write was acknowledged and the readback matches.
Register reads use the data-sheet sequence with an 8-bit register pointer, repeated START, two data bytes, NACK and STOP.
The resulting clean power-on log is:
LDC1612 DATA-SHEET BRING-UP
I2C=10kHz, 20ms guard, reset defaults, ADDR=0x2A
[01 READ ] MANUFACTURER_ID
reg=0x7E expected=0x5449 read=0x5449 HAL=0 PASS
[02 READ ] DEVICE_ID
reg=0x7F expected=0x3055 read=0x3055 HAL=0 PASS
[03 READ ] CONFIG reset
reg=0x1A expected=0x2801 read=0x2801 HAL=0 PASS
[04 READ ] MUX_CONFIG reset
reg=0x1B expected=0x020F read=0x020F HAL=0 PASS
[05 WRITE] CONFIG wake
reg=0x1A write=0x0801
W=1 TXleft=0 FAIL
[RESULT]
error=0x00000004
SCL=1 SDA=1
BERR=1
HAL error 0x00000004 is HAL_I2C_ERROR_AF/NACK.
TXleft=0 means that the STM32 HAL consumed all three outgoing bytes:
- Register pointer: 0x1A
- Data MSB: 0x08
- Data LSB: 0x01
The error therefore appears at the final ACK/STOP phase.
Because the write returns HAL_ERROR, the firmware intentionally does not perform the CONFIG readback. Any logged read value after this failure is only the initialized variable and not an actual register result.
The STM32G0B1 also reports the documented spurious master-mode BERR during this transaction. The firmware clears BERR according to STM32G0B1 errata ES0548 section 2.10.2. However, the remaining HAL error is AF/NACK.
At least once during an earlier 100 kHz test, the complete configuration and CONFIG=0x0001 were acknowledged and read back correctly:
[WRITE] CONFIG
write=0x0001 read=0x0001 PASS
The first conversion result in that run was:
CONFIG=0x0001
STATUS=0x0808
DATA0=0x0FFFFFFF
flags=0x2
INIT_IDRIVE=31
This indicated a watchdog/no valid sensor oscillation, but it also showed that the LDC identity, register interface and Sleep-to-Normal transition have worked at least once.
Other controlled configurations tested:
- CONFIG=0x0001 with automatic amplitude correction
- CONFIG=0x1401 with fixed IDRIVE=20 and DRIVE_CURRENT0=0xA000
- CONFIG=0x1C01 with fixed IDRIVE=20 and low-power sensor activation
- CONFIG=0x0801 with all other registers at reset defaults
- I2C at 100 kHz and 10 kHz
- Long delays between transactions
- Coils disconnected
- Both coils connected
- Full power-on resets with both USB and ST-Link disconnected
The failure was not eliminated by using fixed current, low-power activation, slower I2C or longer delays.
My questions are:
- Is CONFIG=0x0801 a valid minimal value to exit Sleep mode when CLKIN is grounded and the internal oscillator is used?
- Does the LDC1612 ever intentionally NACK the final byte of a CONFIG write that clears SLEEP_MODE_EN?
- Can a disconnected, invalid or non-oscillating LC tank cause the CONFIG write itself to be NACKed or make the I2C interface unavailable?
- My understanding is that an invalid sensor should produce watchdog, amplitude or conversion errors while the I2C interface remains operational. Is this correct?
- Is there an additional timing requirement between the final CONFIG data byte, its ACK and the beginning of sensor activation?
- Is it valid to perform this minimal test using the documented reset values for all channel registers, or must specific RCOUNT, SETTLECOUNT, CLOCK_DIVIDERS and DRIVE_CURRENT values be programmed before Sleep mode may be cleared?
- Are 1 uF and 10 uF local VDD capacitors acceptable for the LDC1612?
- Can you provide a known-good minimal register sequence for the internal oscillator which should keep the I2C interface operational even when no valid sensor oscillation is present?
- Which signals should we capture with the oscilloscope? We can simultaneously capture SDA, SCL, LDC VDD and either INTB or one sensor input.
ec_coin_classifier_PCB.pdf ec_coin_classifier_SCHEMATIC.pdf
ldc1612.c board.c main.c ldc1612.h
Thank you.




