2016-05-09 12:31 PM
Hello all!
We developed a board with 3 SPI devices, STM32F107 is the master and the slaves are SD Card(SPI mode 0) and ADS1118 (SPI mode 1). So if I run my firmware for anyone of slaves separately is works but when I try to integrate both just reads from ADS1118. Thanks, Giovani2016-05-09 03:32 PM
So does the chip select on the ADS1118 not work properly, or is it asserting a data ready signal?
2016-05-10 12:44 AM
The ADS1118 Data Sheet says,
The chip select pin (CS) selects the ADS1118 for SPI communication. This feature is useful when multiple devices share the same serial bus. Keep CS low for the duration of the serial communication. When CS is taken high, the serial interface is reset, SCLK is ignored, and DOUT/DRDY enters a high-impedance state. In this state, DOUT/DRDY cannot provide data-ready indication. Sounds like the software controlling the Chip Select logic is wrong. If the ADS1118 is not selected, it should be off the bus.2016-05-10 04:35 AM
Thanks for the help, but I believe
I have
found the problem. I didn't follow correctly the steps to disable the SPIand
switching
between modes 0 (SD Card) and
1 (ADS1118)
so
I'll do
some more tests
.
In master or slave full-duplex mode (BIDIMODE=0, RXONLY=0)
1. Wait until RXNE=1 to receive the last data
2. Wait until TXE=1
3. Then wait until BSY=0
4. Disable the SPI (SPE=0) and, eventually, enter the Halt mode (or disable the peripheral
clock)
Thanks,
Giovani