2020-12-02 06:52 AM
Hello,
I am having problems with STM32C8T6 interfacing with TI ADS8317.
Second image is the enlargement of the first.
The code responsable for this is simply:
HAL_SPI_Receive(&hspi1, tempADCdata, 3, 1); //tempADCdata
The setting is as follow:
SPI: Full Duplex Master
Bit rate: 6 Mbits/s
CPOL: 0
CPHA: 0 (rising edge)
Could you kindly point me to potential solution to solve the above issues?
Best
Danny
2020-12-02 01:07 PM
> STM32C8T6
Which one is that, exactly?
> Long tail at SDO line (first & second image)
I assume you are talking about MISO line.
Why would that be a problem? There are no clocks during that time, so nothing is read.
You can try to switch on a pullup on the MISO line.
> The seperation time between each byte is always significantly long (not sure if this is a problem)
It's you who can judge if it's a problem. The ADC appears to have a relatively wide tolerance for clock, so as long as the longest period (i.e. adding the inter-character gap) converts to above the lowest allowed clock frequency, it should be OK. But I personally would try to avoid it.
Don't use Cube, write your own routine to send/receive. Use higher compiler optimization settings.
JW
2020-12-03 04:19 AM
It seems the line is tristated.