I am trying to communicate to an LTC6811(-2) and testwise LTC6804(-1) using an STM32F103. Tried so far two LTC6811 and one LTC6804 without any success.
What is the minimum hardware setup required? Do I need V+ to be connected or is for communication test Vreg sufficient? Can WDT, DRIVE and SWTEN be left floating for a test?
And what command can be used to test communication after power-on?
As a minimum setup I hooked up the LTC6811-2 as follows:
- Pins 45..48: A0 .. A3 = V- (GND) [for LTC6804-1: Pin48 to Pin47 via 100R, Pin46 shorted to Pin45 and both to V- via 20k]
- Pin 44: SDO = STM32 MISO + via 4k7 to +3V3 (STM32 supply)
- Pin 43: SDI = STM32 MISO
- Pin 42: SCK = STM32 CLK
- Pin 41: CSB = STM32 CS
- Pin 40: ISOMD = V- (GND)
- Pin 37: Vreg = +5V
- Pins 30,31: V- = GND
I am measuring 1mA continuously on the 5V pin. That value does not match any value range for Vreg supply current from the data sheet, but is also not completely out of range.
In what states are Core and isoSPI module starting? If core starts in Standby I would have expected it to go to sleep after two seconds if there is no activity on the SPI.
Is that basic hardware setup OK in general to just testing communication to the device?
Software wise I try to communicate to the LTC as follows:
- SPI Mode 3 (CPOL = 1, CPHA = 1 (2nd Edge))
- MSB first
- Motorola 8Bits
- tried 125kBit/s and 500kBit/s
For testing I programmed every 10 seconds to read three times the config with a second in between
- # Wakeup
- cs low for 1ms
- wait 1ms
- cs high for 1ms
- # Write command
- cs low
- send [0x00, 0x02, 0x2b, 0x0A]
- (cs high)
- # Read data
- (cs low)
- read 8Bytes (send 0xFF for reading)
- cs high
Double checked the activity on the SPI lines/pins via oscilloscope, CS, CLK and SDI looks fine from my view, but SDO line stays pulled to 3V3, no reaction from the LTC(s) whatoever.
What am I doing wrong?
How can I get started on the devices or a simple test if they are OK after all?
Thanks for your support.