Other Parts Discussed in Thread: ADS8319
Hi there,
I've recently done a design using the ADS8319 in 3-wire CS without busy indicator mode and am having troubles interfacing with it. My circuit looks like this:
IN+ connects to a buffer which is biased to 2V5. If I measure across C11 I see 2.5V, on REFIN and VA+ I see 5V and on VBD+ I see 3.3V. AGND and GND are connected via a 0 ohm resistor. +5V from a dedicated regulator is connected to +5VA via a ferrite and an additional 10uF capacitor to ground. I should also mention my 5V regulator is enabled via a pin to my microcontroller so the ADS8319 will receive 3V3 on VBD+ before it sees 5V at VA+, I wonder if that's a problem?
To read from the ADS8319 I'm using this code on my STM32L4 micro:
uint8_t adc_read(uint16_t* result) {
uint8_t data[2];
HAL_GPIO_WritePin(SPI2_CS_GPIO_Port, SPI2_CS_Pin, GPIO_PIN_SET);
dwt_delay_us(2); // Delay at least 1600ns
HAL_GPIO_WritePin(SPI2_CS_GPIO_Port, SPI2_CS_Pin, GPIO_PIN_RESET);
if (HAL_SPI_Receive(&hspi2, data, 2, 100) != HAL_OK) {
return 0;
}
*result = ((uint16_t)data[0] << 8) | data[1];
return 1;
}
I have SPI configured in mode 0 and running at a slow speed of 312kb/s.
On the very first power of the system I seem to be able to correctly get a measurement from the ADS8319 however it doesn't appear to be a half scale reading of ~32768 but instead it's 48643.
In the below scope trace blue is CONVST, red is SCLK and green is SDO.
The second reading then looks like this:
SDO appears to be driven for the MSB of the result after CONVST goes low but then suddenly just starts discharging/floating and after that it drifts to zero volts and despite continually pulsing the CONVST and SCLK thereafter the SDO pin is never driven again. I am pulsing the clock 16 times and can see 16 falling edges so I'm unsure why the ADS8319 can't continue after the first result.
Any help would be greatly appreciated!